ECTest ID: 00
www.gateforum.com
( )=
+
+
+
≠
∀
! "! # ! $ %! & '
(
' *
)
=
×
+
! ×
"!
+
! %!
{
, - . &}
/ )
0
1
! 2 "! ! %! . #
3
(
) (
/
)
<
! 4 "!
5 5
! %! ,
> 6
+7
6 6
+7
3
'!
2 5
! +
:
"! %
:
! 5
:
/ /
2
5
2 5!
9
1
/
%! ' $
3
6
8 9
3
: / 5;9 $
7 7 <
=
© All rights reserved by GATE Forum Educational Services Pvt. Ltd. No part of this booklet may be reproduced or utilized in any form without the written permission. Discuss this questions paper at www.gateforum.com. Page 1 of 29
ECTest ID: 00
/ /
www.gateforum.com
/ 1 %
/ =
(
! "! ! %! # -
// →
>
→ →
+
→ →
( )
/ !
→
>
!
→
+
!
→
+
/
/
0 9 9 !
!
"!
!
!
!
!
!
/
1
!
%! 4 .
?
/
/
:
/ /
/
:
%
/ 9
/
, @ : )
/
!
. A1 !
"!
© All rights reserved by GATE Forum Educational Services Pvt. Ltd. No part of this booklet may be reproduced or utilized in any form without the written permission. Discuss this questions paper at www.gateforum.com. Page 2 of 29
ECTest ID: 00
www.gateforum.com
!
%!
&
5;
#9
)
/
/ /
/
! !1
! # "! , ! $ %! 2
= !
( )
"!
(
/
!
(
/ /
%!
/
) )
( ) / /
/ /
(ν
ν
)
=
9
{ν
ν
ν
/
} /
0 ! "!
− −
! %! %B :
C
/
/
/
! D
© All rights reserved by GATE Forum Educational Services Pvt. Ltd. No part of this booklet may be reproduced or utilized in any form without the written permission. Discuss this questions paper at www.gateforum.com. Page 3 of 29
ECTest ID: 00 "! E
www.gateforum.com
:
! < %! "9 /
F FG H 8 /
FG H
2
= / F FGH FG I H (
!
F
/
"!
#
!
+
%!
−
)
/
/
/
1 ! D
:
"! 2 ! E %! < ,
/
(
J
/
BJ K L K M J
/
/ BIJ ) K
( )
'
)
/
!
( ) =θ(
/
"!
( ) =θ(
)
! %!
$
9
' E
1
)
( ) =θ( ) ( ) =θ( 459 45 D 3 )
! 3
459
"! 3
459
! D
459
%! D
459
/
) D
3 E
/
E 1
: 9
© All rights reserved by GATE Forum Educational Services Pvt. Ltd. No part of this booklet may be reproduced or utilized in any form without the written permission. Discuss this questions paper at www.gateforum.com. Page 4 of 29
ECTest ID: 00 -
F /
F
/ /
! E
/
"! E
/
! E
/
)
/ /
θ
7
θ
%! E
.
www.gateforum.com
(
/
)
( ) ={
/
}
=
⊆
=
/
=
! "! ! %!
&
=
' =
{
{
+!
+!
+!
!
!≥
+!
!≥
} }
=
{
+!
+!
!≥
!
)
}
/ /
46
=
1
! "! ! %!
/ /
7
: //
,@ "
J
N
J
"
J
J J
# , $
J
,
E
B
/
-
) 1
! ) "! )
/ /
$
" $
, "
/
© All rights reserved by GATE Forum Educational Services Pvt. Ltd. No part of this booklet may be reproduced or utilized in any form without the written permission. Discuss this questions paper at www.gateforum.com. Page 5 of 29
ECTest ID: 00 ! )
www.gateforum.com
/
%! )
8
( / =
!
#
"! !
%!
' +8
0
(
=
'
)−(
)
)
=
/ !
⊂
"!
⊃
!
=
%!
−
≠∅
−
×
×
ν
(
)) − (
−(
−
)
1
≠∅
=
/
≠ν
×
E =" ν =" )
1
! %
(
"!
#" ≠
!
=
%! #
$= {
0 %⊆ $
&⊆ $
(π ( %) ) =
(π ( &) )
} O
( )
π
4
4
/
© All rights reserved by GATE Forum Educational Services Pvt. Ltd. No part of this booklet may be reproduced or utilized in any form without the written permission. Discuss this questions paper at www.gateforum.com. Page 6 of 29
ECTest ID: 00 π
/
www.gateforum.com
( )
/
π
/
1 ! "!
(
− % &) % &
(% + &)
!
% &
O
% &
%! % &
,
% &
={
'
!} ! >
'
E
()
%
( )= !
}
∈
()
=
!
{
(
!
"! !+
!
+
%! $
) =
/ /+ /
/
1
:
/
! ∀
(
/
( )∧
( ) ) → {(
/
( )∨
( )) →
"! ∀
(
/
( )∨
( ) ) → {(
/
( )∨
( )) ∧
! ∀
(
/
( )∨
( )) → {
:(
%! ∀
(
/
( )∨
( ) ) → {(
/
-
)→(
( )∨
/
( )∨ ( )) →
:( :(
)} )}
( ) )} :(
)}
/ ' '
( ( %∧ &) → () ) ≡ ( ( %→ () ∧ ( &→ () ) (( %∨ &) → () ) ≡ (( %→ () ∨ ( &→ () )
)
/
1
! 5
/
5
"! 5
/
5
! 5 %! "
5 5
/ 5
/
© All rights reserved by GATE Forum Educational Services Pvt. Ltd. No part of this booklet may be reproduced or utilized in any form without the written permission. Discuss this questions paper at www.gateforum.com. Page 7 of 29
ECTest ID: 00
.
www.gateforum.com
/
% &
"
8 8
8
8
' )
8
P !
/ /
(P %
46 !
/ %∧ &1
7
&)
"! P ( % P &) ! P (P % P &) %! P (P % &)
&
2 )
(
/
())
) /
+
())
)
>
C
C
) )
/
/ /
1
!
= {) ∈ ( +
"!
= )∈( +
! %!
)>
())
{
)>
= )∈( +
{
)>
()) −
= {) ∈ ( +
)>
())
}
9 / =) ′
8
∈( +
)>
())
'
= {) ∈ ( +
) > ())
)
())
( )′ ) −
)
( )′ )
≤
}
}
≤#
-=
( ))
,=
} )
/
(
) = ,!
- ≠ #}
())
,=
/
1
! ' "! '
=9
! ' %! ' ' <
=9
/
/
E< N = (* )
/ %< N
* =
/
)
<
/ / /
1
© All rights reserved by GATE Forum Educational Services Pvt. Ltd. No part of this booklet may be reproduced or utilized in any form without the written permission. Discuss this questions paper at www.gateforum.com. Page 8 of 29
ECTest ID: 00 ! "
%< N
www.gateforum.com
E< N
459
"! E< N
459
%< N
! %< N
459
E< N
%! 4
%< N
E< N
459
/ ={
2
→
0
→ "
→"
=
/
C
C
→∈}
/
2 2 0
/
7
2 2 20
+, +!
)
), ' %
=
01
! 2 "! 2 ! 2 2 %! 2 2 2 '
2 2 2 2 2 2 2 2 2 /
/ /
=9 / /
)
/ / /
1 !
8'
"! !
=
%!
#
/ %8
(
/ /
=
+
/
/ /
)>
! "! , ! . %! & , -.
-.
© All rights reserved by GATE Forum Educational Services Pvt. Ltd. No part of this booklet may be reproduced or utilized in any form without the written permission. Discuss this questions paper at www.gateforum.com. Page 9 of 29
ECTest ID: 00
(
$
!
+
+
"!
+
+
!
+
+
%!
+
+
www.gateforum.com
)
)1
/
0
""" / !
"+
"+
"+
"" +
"" +
"" +
"""
"!
"+
"" +
"" +
"" +
"+
"" +
""
"" +
"""
! %!
⊕ ") (
+"+(
"+
"+
+"+(
"+
-
+ "))
⊕ ") (
"" +
"" + ⊕
/ (
7
D
(
%
+=963
%
9
!
7
D
%
7
/
Q
D
%
,
R
:
/// ! "! ! %! .
(0
" /
=
2
= 0
(
) = 0
=
:
)
/ /
© All rights reserved by GATE Forum Educational Services Pvt. Ltd. No part of this booklet may be reproduced or utilized in any form without the written permission. Discuss this questions paper at www.gateforum.com. Page 10 of 29
ECTest ID: 00
(0
'
www.gateforum.com
)=
(, -
,) )
7 ! 0
0
"! 0
0
0 0
%! 0
0
0
0
) −
1
0
! 0
&
C /
−
"− "−
)
"
/ −
9
−
,
/
(
!
,
"!
−
!
+
−
−
⊕ "− ⊕
−
⊕
−
1
)
⊕ "−
−
"−
,
%!
"−
−
−
#
#9
(
/
)(
+
/
$)
' 1111 2222
)
/ / /
1 ! 2 (1 1 1 1
)=
(
"! 2 ( 1 1 1 1
)=
(#
&
#
! 2 (1 1 1 1
)=
(
#, $ -
,)
%! 2 ( 1 1 1 1
)=
(
$ -
#
5; :
# ,)
$
,)
)
: ( $# :
9
: : (
: : :
/ /
:
−
/
+
: :
: /
: / 7 :
.
2
=
= #
) /
(
! & "! !
# -
© All rights reserved by GATE Forum Educational Services Pvt. Ltd. No part of this booklet may be reproduced or utilized in any form without the written permission. Discuss this questions paper at www.gateforum.com. Page 11 of 29
ECTest ID: 00 %! #
www.gateforum.com
.# 5;
9
/
0<(
7
2
/ /
/ / :
/ /
@
2 /
&
= :
=
/
! "! !
#
%!
$
#
9 Q "") +2 +2
) /
9
9
!
"+RB
/
/
)
/
/ "")
, +! ← +23 ! ) "
/
, +! /
: ! ! ) ←
×
"! ! ) ←
×
! ! ) ← %! ! ) ←
##
9(
"+
8
) )
) ×
E
:
/
:
E " "
(
" . . :
/
/
)
1
! "! # !
$
%! #, &-
, : ,,
: ,, ,, ,,
&
/ .
2 5 /
2 5 &- -, 1
© All rights reserved by GATE Forum Educational Services Pvt. Ltd. No part of this booklet may be reproduced or utilized in any form without the written permission. Discuss this questions paper at www.gateforum.com. Page 12 of 29
ECTest ID: 00
www.gateforum.com
!
:
"!
: :
!
: :
%! #$
:
E
/ /
(
/
!
/9
:
" /
&
:
E
:9 2
/ :
" /
/
,
/ :
:
! /
"1
! "!
#
!
$
%!
.
#-
//
#
, $
#
-
)
/ / !
(
− ")
(
−
) ( "− ) (
"!
(
− ")
(
−
) (
!
(
−
) (
− ")
(
%!
(
−
) (
− ")
( "− ) (
/S
) (
− +)
−
) ( "− ) (
− +)
−
) ( "− ) (
− +)
−
− +)
(
−
7 : C
/
/ 1
)
© All rights reserved by GATE Forum Educational Services Pvt. Ltd. No part of this booklet may be reproduced or utilized in any form without the written permission. Discuss this questions paper at www.gateforum.com. Page 13 of 29
ECTest ID: 00 #.
www.gateforum.com
' 4
/
ν
/
4 /
1
ν
!
=
=0
"!
=
=0
!
=
0
/
%!
=
0
/
#&
ν
0 T 0
7 void insert (Q, x) {
B
0
ν
D
/
0
ν / : E
E
0 /
push (S1, x); } void delete (Q) { if (stack-empty(S2)) then if (stack-empty(S1)) then { print(“Q is empty”); return; } else while (!(stack-empty(S1))){ x=pop(S1); push(S2,x); } x=pop(S2); }
! (≤
insert
'
7
) delete push
D ' )
/
1
!
,
pop
!
+!≤
<
!≤
≤
"!
+!≤
<
!≤
≤
!
!≤
<
!≤
≤
%!
!≤
<
!≤
≤
+! +!
F =
∈
/ /
(
"
(
algorithm zzz(x[ ], y[ ], z [ ] ) { int i;
© All rights reserved by GATE Forum Educational Services Pvt. Ltd. No part of this booklet may be reproduced or utilized in any form without the written permission. Discuss this questions paper at www.gateforum.com. Page 14 of 29
ECTest ID: 00
www.gateforum.com
for(i=0;i
U *
/
!
(
)
"!
(
)
!
(
−
) (
−
)
%!
(
−
) (
−
)
, 4
( )=
4
/
(
)+
)
4
( )=
/ ! 4
( ) =θ(
/ /
"! 4
( ) =θ(
/
! 4
( ) =θ (
)
%! 4
1
)
)
( ) =θ( ) ( )
, =
7
)
/
:
1 ! θ "! θ
( ) (
/
)
( ) θ( )
! θ %!
,
/ 9 +!
"!
/
/
void xyz(int a[], int b [], int c []){ int i,j,k; i=j=k=0; while ((i
© All rights reserved by GATE Forum Educational Services Pvt. Ltd. No part of this booklet may be reproduced or utilized in any form without the written permission. Discuss this questions paper at www.gateforum.com. Page 15 of 29
ECTest ID: 00 )
www.gateforum.com
/
!
!
1 !
!
<
=
−
−
= !+ −
!
!
"!
!
!
!
%! ,#
+
<"
"! −
=
≤
=!
! !
!
0
" / +
+
+
!
:
"!
:
!
:
%!
:
= " + "+ +
( ) ( ) Θ(
(
/
+
"
)
+"
( ) Ω( )
Ω
/
,
:
)
( )
,,
E
E
int work1(int *a, int i, int j)
int work2(int *a, int i, int j)
{
{ int x = a[i+2];
int t1 = i+2;
a[j] = x+1;
int t2 = a[t1];
return a[i+2] – 3;
a[j] = t2+1;
}
return t2 – 3; } work1 work2 work1
E / / E
5; ! E
E
"! E
E
! E
E
%! E
E
!
work2
work1 :
/
/ work2 work1
© All rights reserved by GATE Forum Educational Services Pvt. Ltd. No part of this booklet may be reproduced or utilized in any form without the written permission. Discuss this questions paper at www.gateforum.com. Page 16 of 29
ECTest ID: 00 ,$
www.gateforum.com
/
9
9
/ /
:
863 3 4 subroutine swap(ix,iy) it = ix L1 :
ix = iy
L2 :
iy = it end ia = 3 ib = 8 call swap (ia, 1b+5) print *, ia, ib end
E
/ (
E
6
=
/
'
E
6
=
/
'
E#
/
.
E,
/
9
+=
/
! E
!
E
"! E
E#
! E %! E
E,
,-
/
> = > =J > =9 > >
J > =I >
> =J >
>
!V
K K
9 > =K
U
E E
/ /
E
/
/
/ /
/
© All rights reserved by GATE Forum Educational Services Pvt. Ltd. No part of this booklet may be reproduced or utilized in any form without the written permission. Discuss this questions paper at www.gateforum.com. Page 17 of 29
ECTest ID: 00
www.gateforum.com
E# E,
/
! E "! E
E
! E
E#
%! E
E,
,.
// →
ε
→> → 2 -
N
!
{
→
}
{
"!
{
→
}
{}
!
{
→
}
{
%!
{
→
}
{
,&
→ ε}
→>
}
→ ε} /
→
>X (X )K } ε → + { IX (X )K } →( ) { (
→>
{
)K }
:
< / ! "!
$
/
W
/
8
/ X>
+ + #X
+#
> >+
#
!
>#+
%!
#I>
/ for (i – 0, i
/
for (j=0; j
© All rights reserved by GATE Forum Educational Services Pvt. Ltd. No part of this booklet may be reproduced or utilized in any form without the written permission. Discuss this questions paper at www.gateforum.com. Page 18 of 29
ECTest ID: 00
www.gateforum.com
} } }
)
/
1
! "!
9 =
!
/
%! $
5)+, =
+,15 =
=
/
=
/
/
5
T void P (binary_semaphore *s) { unsigned y; unsigned *x = &(s->value); do { fetch-and-set x, y; }
while (y);
} void V (binary_semaphore *s) { S->value = 0; }
)
/
1
!
:
"! 2
/ +,15
!
=
/ M
6)+, T
5
/
%! $
5; /
9 :9
/
(
# S"
'"!
#9
(
'"
. /
/
! "! !
,
%! $
9
9
E
( /
/ /
) ! +
9
/ 1 /
© All rights reserved by GATE Forum Educational Services Pvt. Ltd. No part of this booklet may be reproduced or utilized in any form without the written permission. Discuss this questions paper at www.gateforum.com. Page 19 of 29
ECTest ID: 00 "!
www.gateforum.com
/
(
! < %!
/
5;
/
/
$#
! # / /
. /
'3 8!
( 2 '3 8
/ /
:
/
/
! "!
#
!
,
%!
$
$,
/
(
= @
+ /2 M 6 /2 M 6 /
= - @
/
/
/
:
8 !
@
/ /
/
=
/
2 M 6 2 M 6
/
/
5;
1
@
"!
$@
!
@
%! .& #@ $$
/ /
3
≤
/
≤
5 3
8
7 /
= =
/
/
=
)
/
/
/
:1 ! "! ! %!
(
)<
=≠
/
+
/
=(
(
≥
≠
/
/
)>
/
)>
/
$-
! :
) /
: /
:
/ /
:
© All rights reserved by GATE Forum Educational Services Pvt. Ltd. No part of this booklet may be reproduced or utilized in any form without the written permission. Discuss this questions paper at www.gateforum.com. Page 20 of 29
ECTest ID: 00 :
: /
www.gateforum.com
:
=
:
/
:
/
" D
!
" YJ" / I
"
D
!
" Y" /
D
D
D
D
"
D
D
D #
D
4
,
D /
D
/ /
: /
/
7 :
)
: /6%"
/
1 !
,
"! !
#
%!
,
$.
! : :
! ! / :
0
/
/
7
D
!
D
!
D
+
D
+
#
5
J5
= >
)
J /
!
+
!
1
7
"! D
D
#
= D
!
=
D D
D © All rights reserved by GATE Forum Educational Services Pvt. Ltd. No part of this booklet may be reproduced or utilized in any form without the written permission. Discuss this questions paper at www.gateforum.com. Page 21 of 29
ECTest ID: 00 %!
www.gateforum.com
=
D
#
$&
/
!
!
: :
! $
@ Q
-
. 7
/ :
/
5
5 =R
&
:
5
E 7
=
5
=
/ !
E 7
L=
2
=
B
2
5 B
=
B
E
L=
5 B
:
: :
#
: /
N"M :
Z
)
: / /
1 ! 5
5
"!
5
! 8
=J ,
5
=
5
%! 8
=J &
5
2=
5
-
/ %& → (
/ % →
→
)
/ !
{( }
"!
{& }
!
{% }
%!
{ %&}
+
= { %(
(→
→
→ %
1
}
+
= { %&(
}
+
= { %(
}
+
= { %&(
}
© All rights reserved by GATE Forum Educational Services Pvt. Ltd. No part of this booklet may be reproduced or utilized in any form without the written permission. Discuss this questions paper at www.gateforum.com. Page 22 of 29
ECTest ID: 00
www.gateforum.com
! "
#!
/ B
0
0
≥$ =
( /
-
/
(
0
! "! !
+
%! -
=
/
=
0
! "!
−
!
−
%!
−
×
-
0 ! "!
+
! %!
"
$
/
!
(
S"
: ( 9 /
(
1
-#
9
( =
9
9 ( $
9
1 1
!
#
"! !
.
%!
-
-,
1 !
#
© All rights reserved by GATE Forum Educational Services Pvt. Ltd. No part of this booklet may be reproduced or utilized in any form without the written permission. Discuss this questions paper at www.gateforum.com. Page 23 of 29
ECTest ID: 00
www.gateforum.com
"! !
.
%!
-
% )
&
!
" %
9
'
&
= 9
( '*
:
!
=
GH
=
/
GH = GH
/= -$
GH G #H
/ 9
) / 9 !
/
/ / 1
=
7
, $ . &
"! & $
. ,
! &
$ . ,
%! & , $ . --
E
-
# 7
= 7 !
"
,
"!
& . - $ , #
!
& # , - $ .
%! )
- & .
. $ & " %
9 D -$ ) /
/ 1
$ #
#
,
&
( * +!
(
( ' 5
T
/ E /
void barrier (void) {
© All rights reserved by GATE Forum Educational Services Pvt. Ltd. No part of this booklet may be reproduced or utilized in any form without the written permission. Discuss this questions paper at www.gateforum.com. Page 24 of 29
ECTest ID: 00
www.gateforum.com
1:
P(S);
2:
process_arrived++;
3.
V(S);
4:
while (process_arrived !=3);
5:
P(S);
6:
process_left++;
7:
if (process_left==3) {
8:
process_arrived = 0;
9:
process_left = 0;
10:
}
11:
V(S);
}
(
[ 2
(
[ / ( /
/
-.
)
/
1 !
/
E
"!
:
! '
$
%!
-&
)
/ ! '
1
$
"!
[ /
/ [
!
/ /
/
=
5 E! 9
[ " %
5;
(
=
%! )
99
&
(
S"
( , ×, / / 5 P1: for (i=0; i<512; i++) {
*( !
.9
: ( E .9
9
5
for (j=0; j<512; j++) { x +=A[i] [j]; } }
© All rights reserved by GATE Forum Educational Services Pvt. Ltd. No part of this booklet may be reproduced or utilized in any form without the written permission. Discuss this questions paper at www.gateforum.com. Page 25 of 29
ECTest ID: 00
www.gateforum.com
P2: for (i=0; i<512; i++) { for (j=0; j<512; j++) { x +=A[j] [i]; } }
5
5
= /
5
5
-
.
'
=
-
! "! ! %!
#. $ .# $
## -
. ! "! ! %! )
$ . $ " %
! / /
/
&
/ / (
(
2
* (#!
: / 4= /
/
'4 /
/ 8
/ / ! /
/ +
/ / 5 ) /
!
/ = /
!
:
/ /
'4 /
/
© All rights reserved by GATE Forum Educational Services Pvt. Ltd. No part of this booklet may be reproduced or utilized in any form without the written permission. Discuss this questions paper at www.gateforum.com. Page 26 of 29
ECTest ID: 00
www.gateforum.com
" <
<
<#
<
# ",
"
#
<$
<,
<-
"#
.
8
"
<
<&
<.
<
/
'4
<
/
/ /
! " "! " ! " %! "
", " " "
"# "
", "
", "
/ 1
"#
"
"#
"# ", "
.
/ : ) " 1
/ / !
7
'
<
/ "!
< <
5 <
<
<#
<, <$ <& <
© All rights reserved by GATE Forum Educational Services Pvt. Ltd. No part of this booklet may be reproduced or utilized in any form without the written permission. Discuss this questions paper at www.gateforum.com. Page 27 of 29
<
ECTest ID: 00
<- <. <
5 www.gateforum.com #
<
<
<
<#
<, <$
<
<- <. <& < ! 5
<
<#
<
<, <$ <& < <
.#
5 <
<
<#
<, <- <& <
<
#
<- <. <
)
<
%!
< <
<
<- <. <
<
#
<
" %
&
($ * ( !
)
// !
/
/ / →
"!
=
{
"
≠
}1
" "
→ %( (&
( → (" " %→
%∈
& → &" ∈ !
%! → %( (&
→ %( (&
( → (" ∈
( → (" ∈
%→
%→
%∈
& → &" ∈ .,
2
& → &"" /
/ !
E!
/
/
/ "!
≠ !1
=( ! ) +
"!
+!+
!
+!+
%!
%
=( ! ) +
© All rights reserved by GATE Forum Educational Services Pvt. Ltd. No part of this booklet may be reproduced or utilized in any form without the written permission. Discuss this questions paper at www.gateforum.com. Page 28 of 29
ECTest ID: 00
www.gateforum.com
© All rights reserved by GATE Forum Educational Services Pvt. Ltd. No part of this booklet may be reproduced or utilized in any form without the written permission. Discuss this questions paper at www.gateforum.com. Page 29 of 29