Question 1 |

4 | |

2 | |

1 | |

0 |

**Linear Algebra**

**GATE-CS-2002**

**Discuss it**

Rank of the matrix is defined as the maximum number of linearly independent vectors (or) the number of non-zero rows in its row-echelon matrix. A = | 1 1| | 0 0| Since, the matrix A is already in echelon form, Just count the number of non-zero rows to get the rank of the matrix = 1.

Please refer http://en.wikipedia.org/wiki/Rank_%28linear_algebra%29 This solution is contributed by**Anil Saikrishna Devarasetty**.

Question 2 |

0 but not 1 | |

1 but not 0 | |

0 or 1 | |

2 |

**Numerical Methods and Calculus**

**GATE-CS-2002**

**Discuss it**

Question 3 |

^{k}) = 3 T(2

^{k-1}) + 1, T (1) = 1, is:

2 ^{k} | |

(3 ^{k + 1} - 1)/2 | |

3 ^{log}2k | |

2 ^{log}3k |

**Analysis of Algorithms (Recurrences)**

**GATE-CS-2002**

**Discuss it**

^{k}) = 3 T (2

^{k-1}) + 1 = 3

^{2}T (2

^{k-2}) + 1 + 3 = 3

^{3}T (2

^{k-3}) + 1 + 3 + 9 . . . (k steps of recursion (recursion depth)) = 3

^{k}T (2

^{k-k}) + (1 + 3 + 9 + 27 + ... + 3

^{k-1}) = 3

^{k}+ ( ( 3

^{k}- 1 ) / 2 ) = ( (2 * 3

^{k}) + 3

^{k}- 1 )/2 = ( (3 * 3

^{k}) - 1 ) / 2 = (3

^{k+1}- 1) / 2 Hence, B is the correct choice. Please comment below if you find anything wrong in the above post.

Question 4 |

2 | |

3 | |

4 | |

n - 2⌊n/2⌋ + 2 |

**Graph Theory**

**GATE-CS-2002**

**Discuss it**

Question 5 |

log _{2} n | |

n/2 | |

log _{2}n - 1 | |

n |

**GATE-CS-2002**

**Discuss it**

Question 6 |

The set of all rational negative numbers forms a group under multiplication. | |

The set of all non-singular matrices forms a group under multiplication. | |

The set of all matrices forms a group under multiplication. | |

Both (2) and (3) are true. |

**Set Theory & Algebra**

**GATE-CS-2002**

**Discuss it**

Question 7 |

Context Free | |

Regular | |

Deterministic Context Free | |

Recursive |

**Context free languages and Push-down automata**

**GATE-CS-2002**

**Discuss it**

But in the given case, length of stack is restricted. Thus, this pushdown automata can only accept languages which can also be accepted by finite state automata and a finite state automata accepts only regular languages.

Thus, B is the correct choice.

Please comment below if you find anything wrong in the above post.

Question 8 |

(X ^ ¬ Z) → Y | |

(X ^ Y) → ¬ Z | |

(X → (Y ^ ¬ Z) | |

(X → Y(^ ¬ Z) |

**Propositional and First Order Logic.**

**GATE-CS-2002**

**Discuss it**

So option

**(a)**is (X

Question 9 |

A) is active B) HOLD is active C) READY is active D) None of these

A | |

B | |

C | |

D |

**Microprocessor**

**GATE-CS-2002**

**Discuss it**

**Explanation:**INTR is a signal which if enabled then microprocessor has interrupt enabled .It receives high INTR signal and activates INTA signal, So another request can’t be accepted till CPU is busy in servicing interrupt So (A) is correct option.

Question 10 |

Only PCHL instruction | |

Only ADD instructions | |

Only JMP and CALL instructions | |

All instructions |

**Microprocessor**

**GATE-CS-2002**

**Discuss it**

Question 11 |

Receiver is to be synchronized for byte reception | |

Receiver recovers lost ‘0’ and ‘1’s from these padded bits | |

Padded bits are useful in parity computation | |

None of these |

**Data Link Layer**

**GATE-CS-2002**

**Discuss it**

'0' is added in the beginning of data as start bit and '1' is added at the end as a stop bit. The start signal tells the receiver about the arrival of data and the stop signal resets the receiver's state for the arrival of a new data.

Thus, in serial communication receiver is to be synchronized for byte reception.

Please comment below if you find anything wrong in the above post.

Question 12 |

_{yz}\^{wx} |
00 | 01 | 11 | 10 |

00 | 0 | 1 | 1 | 0 |

01 | x | 0 | 0 | 1 |

11 | x | 0 | 0 | 1 |

10 | 0 | 1 | 1 | x |

xz + y'z | |

xz' + zx' | |

x'y + zx' | |

None of these |

**Digital Logic & Number representation**

**GATE-CS-2002**

**Discuss it**

Question 13 |

instruction cache | |

instruction register | |

instruction opcode | |

translation lookaside buffer |

**Memory Management**

**GATE-CS-2002**

**Discuss it**

Question 14 |

is equivalent to the binary value 0.1 | |

is equivalent to the binary value 0.01 | |

is equivalent to the binary value 0.00111.... | |

cannot be represented precisely in binary |

**Number Representation**

**GATE-CS-2002**

**Discuss it**

_{10}0.25 * 2 =

**0**.50 0 (whole part) 0.50 * 2 =

**1**.00 1 (whole part) So, 0.25

_{10}= 0.01

_{2}Thus, B is the correct choice. Please comment below if you find anything wrong in the above post.

Question 15 |

1111 | |

11111 | |

111111 | |

10001 |

**Number Representation**

**GATE-CS-2002**

**Discuss it**

_{10}= 1 1111

_{2}1's complement of -15 = 1 0000 (Here, 1 represents negative sign) 2's complement of -15 = 1 0001 Hence, D is the correct choice. Please comment below if you find anything wrong in the above post.

Question 16 |

floating point multiplication | |

signed 16 bit integer addition | |

arithmetic left shift | |

converting a signed integer from one size to another |

**Number Representation**

**GATE-CS-2002**

**Discuss it**

Question 17 |

At most one activation record exists between the current activation record and the activation record for the main | |

The number of activation records between the current activation record and the activation record for the main depends on the actual function calling sequence. | |

The visibility of global variables depends on the actual function calling sequence. | |

Recursion requires the activation record for the recursive function to be saved on a different stack before the recursive function can be called. |

**GATE-CS-2002**

**Discuss it**

- Locals to the callee
- Return address to the caller
- Parameters of the callee

__:__Option a- The statement is false as any number of functions can be called from the main. It might not be necessary that at-most one activation record exist and activation record of main. For example- as in case of recursion.

Recurse (int n) { if(n==0) return ; else recurse(n-1); }In above example activation record of main and recurse(4) will have activation record of recurse(5), recurse(6) (more than one) if we pass n=6 initially to the function.

__Option b__- True as soon as a function is called its activation record is created in the function stack.

__Option c__- In C language variables are statically scoped not dynamically, the global variables are statically assigned address space when the execution starts not depending on when and where they are used.

__Option d__- The functions are stored in the same each time recursive call is made, considering the above recurse function

Recurse(4) |

Recurse(5) |

Recurse(6) |

Main() |

**Parul sharma.**

Question 18 |

Do not differ | |

Differ in the presence of loops | |

Differ in all cases | |

May differ in the presence of exceptions |

**Principles of Programming Languages**

**GATE-CS-2002**

**Discuss it**

**Anil Saikrishna Devarasetty**

Question 19 |

Zero | |

More than zero but less than that of an equivalent 3NF decomposition | |

Proportional to the size of F+ | |

Indeterminate |

**Database Design(Normal Forms)**

**GATE-CS-2002**

**Discuss it**

Question 20 |

Relational algebra is more powerful than relational calculus | |

Relational algebra has the same power as relational calculus | |

Relational algebra has the same power as safe relational calculus | |

None of the above |

**Database Design(Normal Forms)**

**GATE-CS-2002**

**Discuss it**

A query can be formulated in relational calculus if and only if it can be formulated in relational algebra. So, relational algebra has the same power as relational calculus.

But, it is possible to write syntactically correct relational calculus queries that have infinite number of answers. Such queries are unsafe. Queries that have an finite number of answers are safe relational calculus queries.

Thus, Relational algebra has the same power as safe relational calculus.

Thus, option (C) is the answer.

Please comment below if you find anything wrong in the above post.

Question 21 |

is flagged whenever there is carry from sign bit addition | |

cannot occur when a positive value is added to a negative value | |

is flagged when the carries from sign bit and previous bit match | |

none of the above |

**Number Representation**

**GATE-CS-2002**

**Discuss it**

Question 22 |

Round Robin | |

First-In First-Out | |

Multilevel Queue Scheduling | |

Multilevel Queue Scheduling with Feedback |

**GATE-CS-2002**

**CPU Scheduling**

**Discuss it**

Question 23 |

Has not been used for the longest time in the past. | |

Will not be used for the longest time in the future. | |

Has been used least number of times. | |

Has been used most number of times. |

**Memory Management**

**GATE-CS-2002**

**Discuss it**

Question 24 |

the operand is inside the instruction | |

the address of the operand is inside the instruction | |

the register containing address of the operand is specified inside the instruction | |

the location of the operand is implicit |

**Microprocessor**

**GATE-CS-2002**

**Discuss it**

Question 25 |

n ^{2} | |

n(n - 1)/2 | |

n - 1 | |

(n + 1) (n)/2 |

**Graph Theory**

**GATE-CS-2002**

**Discuss it**

**Pranjul Ahuja.**

Question 26 |

f(dx, y, z) f1(dx, y, z) f2(dx, y, z) f3(dx, y, z) = ?Given that

f1(dx, y, z) = ∑(d0, 1, 3, 5), f1(dx, y, z) = ∑(d6, 7) and f1(dx, y, z) = ∑(d1, 4, 5), f3 is :

∑(1, 4, 5) | |

∑(6, 7) | |

∑(0, 1, 3, 5) | |

None of these |

**Digital Logic & Number representation**

**GATE-CS-2002**

**Discuss it**

Question 27 |

xyz' | |

xy + z | |

x + z | |

None of these |

**Digital Logic & Number representation**

**GATE-CS-2002**

**Discuss it**

**F = (A1’A0’I0 + A1’A0I1 + A1A0’I2 + A1A0I3) * EN**F = (XYZ' +XYZ + Y'ZY + ZY')Z' F = (XYZ' +XYZ + ZY'(Y + 1))Z' F = (XYZ' +XYZ + ZY' * 1)Z' F = (XY(Z’ + Z) + ZY’)Z’ F = (XY + ZY’)Z’ F = XYZ’ + 0 F = XYZ'

**Thus, option (A) is correct.**Please comment below if you find anything wrong in the above post.

Question 28 |

x' + z | |

xyz | |

xy' + z | |

None of these |

**Digital Logic & Number representation**

**GATE-CS-2002**

**Discuss it**

Simplified expression for given function 'g' is :

g = f( f(x + y, y), z) g = f( ((x + y)’ + y), z) g = f( (x’y’ + y), z) g = f( ((y + y’) * (x’ + y)), z) g = f( (1 * (x’ + y)), z) g = f( (x’ + y), z) g = (x’ + y)’ + z) g = xy’ + z

Thus, option (C) is correct.

Please comment below if you find anything wrong in the above post.

Question 29 |

MVI L, 5DH MVI L, 6BH MOV A, H ADD L

AC = 0 and CY = 0 | |

AC = 1 and CY = 1 | |

AC = 1 and CY = 0 | |

AC = 0 and CY = 0 |

**Microprocessor**

**GATE-CS-2002**

**Discuss it**

**Mohit Gupta**.

Question 30 |

Outputs the sum of the present and the previous bits of the input. | |

Outputs 01 whenever the input sequence contains 11. | |

Outputs 00 whenever the input sequence contains 10. | |

None of these |

**Regular languages and finite automata**

**GATE-CS-2002**

**Discuss it**

We assume the input string to be 1101.

1. (A, 1) --> (B, 01) Here, previous input bit + present input bit = 0 + 1 = 01 = output

2. (B, 1) --> (C, 10) Here, previous input bit + present input bit = 1 + 1 = 10 = output

3. (C, 0) --> (A, 01) Here, previous input bit + present input bit = 1 + 0 = 01 = output

4. (A, 1) --> (B, 01) Here, previous input bit + present input bit = 0 + 1 = 01 = output

Thus, option (A) is correct.

Please comment below if you find anything wrong in the above post.

Question 31 |

the pipeline stages have different delays | |

consecutive instructions are dependent on each other | |

the pipeline stages share hardware resources | |

all of the above |

**Computer Organization and Architecture**

**GATE-CS-2002**

**Discuss it**

Question 32 |

does not require use of signal decoders | |

results in larger sized microinstructions than vertical microprogramming | |

uses one bit for each control signal | |

all of the above. |

**Microprocessor**

**GATE-CS-2002**

**Discuss it**

But, one bit is used for all control signals to execute the microinstruction. If the bit is set to ‘1’ the control signal field is activated. If the bit is set to ‘0’ the control signal field is deactivated.

Thus, option (D) is correct.

Please comment below if you find anything wrong in the above post.

Question 33 |

char a[100][100];Assuming that the main memory is byte-addressable and that the array is stored starting from memory address 0, the address of a [40][50] is :

4040 | |

4050 | |

5040 | |

5050 |

**GATE-CS-2002**

**Discuss it**

Address of a[40][50] = Base address + 40*100*element_size + 50*element_size 0 + 4000*1 + 50*1 4050

Question 34 |

n/2 | |

(n - 1)/3 | |

(n - 1)/2 | |

(2n + 1)/3 |

**GATE-CS-2002**

**Discuss it**

Question 35 |

1. Choose an i uniformaly at random from 1..... n; 2. If A[i] = x then Stop else Goto 1;Assuming that x is present in A, what is the expected number of comparisons made by the algorithm before it terminates ?

n | |

n - 1 | |

2n | |

n/2 |

**GATE-CS-2002**

**Discuss it**

If you remember the coin and dice questions, you can just guess the answer for the above.

Below is proof for the answer.

Let expected number of comparisons be E. Value of E is sum of following expression for all the possible cases.

number_of_comparisons_for_a_case * probability_for_the_case

Case 1

If A[i] is found in the first attempt number of comparisons = 1 probability of the case = 1/n

Case 2

If A[i] is found in the second attempt number of comparisons = 2 probability of the case = (n-1)/n*1/n

Case 3

If A[i] is found in the third attempt number of comparisons = 2 probability of the case = (n-1)/n*(n-1)/n*1/n

There are actually infinite such cases. So, we have following infinite series for E.

E = 1/n + [(n-1)/n]*[1/n]*2 + [(n-1)/n]*[(n-1)/n]*[1/n]*3 + …. (1)

After multiplying equation (1) with (n-1)/n, we get

E (n-1)/n = [(n-1)/n]*[1/n] + [(n-1)/n]*[(n-1)/n]*[1/n]*2 + [(n-1)/n]*[(n-1)/n]*[(n-1)/n]*[1/n]*3 ……….(2)

Subtracting (2) from (1), we get

E/n = 1/n + (n-1)/n*1/n + (n-1)/n*(n-1)/n*1/n + …………

The expression on right side is a GP with infinite elements. Let us apply the sum formula (a/(1-r))

E/n = [1/n]/[1-(n-1)/n] = 1 E = n

Question 36 |

If n < = 2 return (1) else return (A(Image not present√nImage not present));is best described by :

O(n) | |

O(log n) | |

O(log Log n) | |

O(l1) |

**GATE-CS-2002**

**Discuss it**

**log**on both side (base 2). Taking

**log**again. Running time complexity = number of function calls = k = Therefore Running time complexity = . See question 5 of http://www.geeksforgeeks.org/data-structures-and-algorithms-set-11/ This solution is contributed by

**Parul Sharma.**

Question 37 |

log _{2} n | |

log _{4/3} n | |

log _{3} n | |

log _{3/2} n |

**GATE-CS-2002**

**Discuss it**

**Anil Saikrishna Devarasetty**

Question 38 |

2 states | |

3 states | |

4 states | |

5 states |

**Regular languages and finite automata**

**GATE-CS-2002**

**Discuss it**

Question 39 |

The complement of a recursive language is recursive. | |

The complement of a recursively enumerable language is recursively enumerable. | |

The complement of a recursive language is either recursive or recursively enumerable. | |

The complement of a context-free language is context-free. |

**Recursively enumerable sets and Turing machines**

**GATE-CS-2002**

**Discuss it**

Question 40 |

_{n + 1}= (X

_{n}/2) + 3/(2X

_{n}) can be used to solve the equation

X ^{2} = 3 | |

X ^{3} = 3 | |

X ^{2} = 2 | |

X ^{3} = 2 |

**Numerical Methods and Calculus**

**GATE-CS-2002**

**Discuss it**

**Option (A)**

X^{2}= 3 f(x) = X^{2}- 3 X_{n + 1}= X_{n}- (X_{n}^{2}- 3) / (2*X_{n}) = (X_{n}/2) + 3/(2x_{n})

Question 41 |

1/16 | |

1/8 | |

7/8 | |

15/16 |

**Probability**

**GATE-CS-2002**

**Discuss it**

Question 42 |

Neither reflexive nor symmetric | |

Symmetric and reflexive | |

Transitive and reflexive | |

Transitive and symmetric |

**Set Theory & Algebra**

**GATE-CS-2002**

**Discuss it**

**Reflexive**: A relation is reflexive if every element of set is paired with itself. Here none of the element of A is paired with themselves, so S is not reflexive.**Symmetric**: This property says that if there is a pair (a, b) in S, then there must be a pair (b, a) in S. Since there is no pair here in S, this is trivially true, so S is symmetric.**Transitive**: This says that if there are pairs (a, b) and (b, c) in S, then there must be pair (a,c) in S. Again, this condition is trivially true, so S is transitive.**Thus, option (D) is correct.**Please comment below if you find anything wrong in the above post.

Question 43 |

A context free language | |

A context sensitive language | |

A regular language | |

Parasble fully only by a Turing machine |

**GATE-CS-2002**

**Discuss it**

Question 44 |

One stack is enough | |

Two stacks are needed | |

As many stacks as the height of the expression tree are needed | |

A Turing machine is needed in the general case |

**Stack**

**GATE-CS-2002**

**Discuss it**

Any expression can be converted into Postfix or Prefix form.

Prefix and postfix evaluation can be done using a single stack.

For example : Expression '10 2 8 * + 3 -' is given. PUSH 10 in the stack. PUSH 2 in the stack. PUSH 8 in the stack. When operator '*' occurs, POP 2 and 8 from the stack. PUSH 2 * 8 = 16 in the stack. When operator '+' occurs, POP 16 and 10 from the stack. PUSH 10 * 16 = 26 in the stack. PUSH 3 in the stack. When operator '-' occurs, POP 26 and 3 from the stack. PUSH 26 - 3 = 23 in the stack. So, 23 is the answer obtained using single stack.

Thus, option (A) is correct.

Please comment below if you find anything wrong in the above post.

Question 45 |

Security is dynamic | |

The path for searching dynamic libraries is not known till runtime | |

Linking is insecure | |

Crytographic procedures are not available for dynamic linking |

**Memory Management**

**GATE-CS-2002**

**Discuss it**

**Static Linking and Static Libraries**is the result of the linker making copy of all used library functions to the executable file. Static Linking creates larger binary files, and need more space on disk and main memory. Examples of static libraries (libraries which are statically linked) are,

**files in Linux and**

*.a***files in Windows.**

*.lib***Dynamic linking and Dynamic Libraries**Dynamic Linking doesn’t require the code to be copied, it is done by just placing name of the library in the binary file. The actual linking happens when the program is run, when both the binary file and the library are in memory. Examples of Dynamic libraries (libraries which are linked at run-time) are,

**in Linux and**

*.so***in Windows. In Dynamic Linking,the path for searching dynamic libraries is not known till runtime**

*.dll*Question 46 |

(a) More than one program may be loaded into main memory at the same time for execution. (b) If a program waits for certain events such as I/O, another program is immediately scheduled for execution. (c) If the execution of program terminates, another program is immediately scheduled for execution.

a | |

a and b | |

a and c | |

a, b and c |

**GATE-CS-2002**

**Discuss it**

(a) More than one program may be loaded into main memory at the same time for execution.True:Only done in a multiprogrammed OS, not in single programmed OS (b) If a program waits for certain events such as I/O, another program is immediately scheduled for execution.True:Only done in a multiprogrammed OS, not in single programmed OS (c) If the execution of program terminates, another program is immediately scheduled for execution.False:Done in both Multiprogrammed and single programmed OSs

Question 47 |

the size of the blocks, and the size of the address of the blocks. | |

the number of blocks used for the index, and the size of the blocks. | |

the size of the blocks, the number of blocks used for the index, and the size of the address of the blocks. | |

None of these |

**File structures (sequential files, indexing, B and B+ trees)**

**GATE-CS-2002**

**Discuss it**

In the index allocation method, an index block stores the address of all the blocks allocated to a file.

When indexes are created, the maximum number of blocks given to a file depends upon the size of the index which tells how many blocks can be there and size of each block(i.e. same as depending upon the number of blocks for storing the indexes and size of each index block).

Thus, option (B) is correct.

Please comment below if you find anything wrong in the above post.

Question 48 |

16 | |

42 | |

43 | |

44 |

**B and B+ Trees**

**GATE-CS-2002**

**Discuss it**

Size of 1 record = 8 + 4 = 12 Let the order be N. No. of index values per block = N - 1 (N - 1) 12 + 4 = 512 12N - 12 + 4 = 512 16N = 1009 N = 43.3333

Question 49 |

Dependency-preservation | |

Lossless-join | |

BCNF definition | |

3NF definition |

**Database Design(Normal Forms)**

**GATE-CS-2002**

**Discuss it**

Question 50 |

A | B | C |

1 | 1 | 1 |

1 | 1 | 0 |

2 | 3 | 2 |

2 | 3 | 2 |

A functionally determines B and B functionally determines C
| |

A functionally determines B and B does not functionally determine C | |

B does not functionally determine C | |

A does not functionally determine B and B does not functionally determine C |

**Database Design(Normal Forms)**

**GATE-CS-2002**

**Discuss it**