Description: GATE Exam Previous Year Question Paper Solution Computer Science(CS) - 2011 | |

Number of Questions: 64 | |

Created by: Aliensbrain Bot | |

Tags: Previous Year Paper Computer Science GATE CS |

Attempted
0/63
Correct 0
Score 0

‹
›

The simplified SOP (Sum of Product) from the Boolean expression

$$(P + \bar{Q} + \bar{R}) . (P + \bar{Q} + R) . (P + Q +\bar{R})$$ is

The minimum number of D flip-flops needed to design a mod-258 counter is

Which of the following circuits is NOT equivalent to a 2-input XNOR (exclusive NOR) gate?

K4 and Q3 are graphs with the following structures

Which one of the following statements is TRUE in relation to these graphs?

char c[ ] "GATE2011";

char *p =c;

printf "%s", p+p [3] - p[1];

A layer-4 firewall (a device that can look at all protocol headers up to the transport layer) CANNOT

^{6} memory accesses, what is the effective access time for the memory?

In a compiler, keywords of a language are recognized during

An algorithm to find the length of the longest monotonically increasing sequence of numbers in an array $A[0:n-1]$ is given below.

Let $L_i$, denote the length of the longest monotonically increasing sequence starting at index $i$ in the array.

Initialize $L_{n-1} = 1$.

For all $i$ such that $0 \leq i \leq n-2$

$ L_i = \begin{cases} 1+ L_{i+1} & \quad\text{if A[i] < A[i+1]} \\ 1 & \quad\text{Otherwise}\end{cases} $

Finally the the length of the longest monotonically increasing sequence is $\text{Max} :(L_0, L_1, \dots , L_{n-1}).$

Which of the following statements is TRUE?

m1: Send an email from a mail client to a mail server

m2: Download an email from mailbox server to a mail client

m3: Checking email in a web browser

Which is the application level protocol used in each activity?

*q^*$ and $Q$ be ${p^nq^n \mid n \in N})$. Then which of the following is ALWAYS regular?

Which of the following pairs have DIFFERENT expressive power?

Which of the following is NOT desired in a good Software Requirement Specifications (SRS) document?

_{1 }while the time taken to switch between two processes be t_{2}. Which of the following is TRUE?

Consider the matrix as given below.

$$\begin{bmatrix} 1 & 2 & 3 \\ 0 & 4 & 7 \\ 0 & 0 & 3\end{bmatrix}$$

Which one of the following options provides the CORRECT values of the eigenvalues of the matrix?

Definition of a language $L$ with alphabet ${a}$ is given as following.

$$ L = \left\{a^{nk} \mid k > 0, :: and :: n \text{ is a positive integer constant} \right\}$$

What is the minimum number of states needed in a DFA to recognize $L$?

Consider an instruction pipeline with four stages (S1, S2, S3 and S4), each with combinational circuit only. The pipeline registers are required between each stage and at the end of the last stage. Delays for the stages and for the pipeline registers are as given in the figure:

What is the approximate speed up of the pipeline in steady state under ideal conditions when compared to the corresponding non-pipeline implementation?

1 Valid bit

1 Modified bit

As many bits as the minimum needed to identify the memory block mapped in the cache.

What is the total size of memory needed at the cache controller to store metadata (tags) for the cache?

Interrupt from CPU temperature sensor

Interrupt from Mouse

Interrupt from Keyboard

Interrupt from Hard Disk

A deterministic finite automation DFAD with alphabet $\sum$ is given below:

Which of the following finite state machines is a valid minimal DFA which accepts the same language as D?

Consider a relational table with a single record for each registered student with the following attributes.

- Registration_Number: Unique registration number for each registered student
- UID: Unique Identity number, unique at the national level for each citizen
- BankAccount_Number: Unique account number at the bank. A student can have multiple accounts or joint accounts. This attributes stores the primary account number
- Name: Name of the Student
- Hostel_Room: Room number of the hostel Which of the following options is INCORRECT?

A company needs to develop a strategy for software product development for which it has a choice of two programming languages L1 and L2. The number of lines of code (LOC) developed using L2 is estimated to be twice the LOC developed with L1. The product will have to be maintained for five years. Various parameters for the company are given in the table below.

Parameter |
Language L1 |
Language L2 |

Man years needed for development | LOC/10000 | LOC/10000 |

Development Cost per year | Rs. 10,00,000 | Rs. 7,50,000 |

Maintenance time | 5 years | 5 years |

Cost of maintenance per year | Rs. 1,00,000 | Rs. 50,000 |

Total cost of the project includes cost of development and maintenance. What is the LOC for L1 for which the cost of the project using L1 is equal to the cost of the project using L2?

Four matrices M1, M2, M3, and M4 have dimensions p x q, q x r, r x s, and s x t respectively can be multiplied in several ways with different number of total scalar multiplications. For example, when multiplied as ((M1 x M2) x (M3 x M4)) total number of scalar multiplications is pqr + rst + prt.

When multiplied as (((Mi x M2) x M3) x M4) the total number of scalar multiplications is pqr + prs + pst.

If p = 10, q = 100, r = 20, s = 5, and t = 80, then what is the minimum number of scalar multiplications needed ?

Consider the languages $L1, :L2 :and : L3$ as given below.

$L1={0^p 1^q \mid p, q \in N}, \\ L2 = {0^p 1^q \mid p, q \in N :and :p=q} : and \\ L3 = {0^p 1^q 0^r \mid p, q, r \in N: and : p=q=r}.$

Which of the following statements is NOT TRUE?

Initialize the address register

Initialize the count to 500

LOOP: Load a byte from device

Store in memory at address given by address register

Increment the address register

Decrement the count

If count != 0 go to LOOP

Assume that each statement in this program is equivalent to a machine instruction which takes one clock cycle to execute if it is a non-load/store instruction. The load-store instructions take two clock cycles to execute.

The designer of the system also has an alternate approach of using the DMA controller to implement the same transfer. The DMA controller requires 20 clock cycles for initialization and other overheads. Each DMA transfer cycle takes two clock cycles to transfer one byte of data from the device to the memory.

What is the approximate speedup when the DMA controller based design is used in place of the interrupt driven program based input-output?

$$P\left(x\right) = \neg \left(x=1\right)\wedge \forall y \left(\exists z\left(x=y*z\right) \Rightarrow \left(y=x\right) \vee \left(y=1\right) \right)$$

_{1}, f_{2}, f_{3 }and f_{4}?

f_{1} (n) = 2^{n}; f_{2} (n) = n^{3/2}; f_{3} (n) = n log_{2} n; f_{4} (n) = n^{log}_{2}^{n}

Consider a relational table $r$ with sufficient number of records, having attributes $A_1, A_2, \dots ,A_n$ and let $1 \leq p \leq n$. Two queries $Q1$ and $Q2$ are given below.

$Q1: \pi_{A_1, \dots ,A_p} \left(\sigma_{A_p=c}\left(r\right)\right)$ where $c$ is a constant

$Q2: \pi_{A_1, \dots ,A_p} \left(\sigma_{c_1 \leq A_p \leq c_2}\left(r\right)\right)$ where $c_1$ and $c_2$ are constants.

The database can be configured to do ordered indexing on $A_p$ or hashing on $A_p$. Which of the following statements is TRUE?

Consider the following recursive C function that takes two arguments

```
unsigned int foo (unsigned int n, unsigned int r) {
if (n > 0) return (n%r) foo (n / r, r));
else return 0;
}
```

What is the return value of the function foo when it is called as foo (513, 2)?

Consider the following circuit involving three D-type flip-flops used in a certain type of counter configuration.

If at some instance prior to the occurrence of the clock edge, P, Q and R have a value 0, 1 and 0 respectively, what shall be the value of PQR after the clock edge?

Consider the following circuit involving three D-type flip-flops used in a certain type of counter configuration.

If all the flip-flops were reset to 0 at power on, what is the total number of distinct outputs (states) represented by PQR generated by the counter?

Consider the following recursive C function that takes two arguments

unsigned int foo (unsigned int n, unsigned int r) {

if (n > 0) return (n%r) foo (n / r, r));

else return 0;

}

What is the return value of the function foo when it is called as foo (345, 10) ?

Database table by name Loan_Records is given below.

Borrower | Bank_Manager | Loan_Amount |
---|---|---|

Ramesh | Sunderajan | 10000.00 |

Suresh | Ramgopal | 5000.00 |

Mahesh | Sunderajan | 7000.00 |

What is the output of the following SQL query?

```
SELECT count(*)
FROM(
(SELECT Borrower. Bank_Manager FROM Loan_Records) AS S
NATURAL JOIN
(SELECT Bank_Manager, Loan_Amount FROM Loan_Records) AS T
);
```

An undirected graph G(V,E) contains n ( n >2 ) nodes named v_{1} , v_{2} ,....v_{n}. Two nodes v_{i} , v_{j} are connected if and only if 0 < |i – j| $\le$ 2. Each edge (v_{i} ,v_{j}) is assigned a weight i + j. A sample graph with n = 4 is shown below:

What will be the cost of the minimum spanning tree (MST) of such a graph with n nodes?

**Amalgamate**

Consider a network with five nodes, N1 to N5, as shown below:

The net work uses a Distance Vector Routing protocol. Once the routes have stabilized, the distance vectors at different nodes are as following:

N1: (0, 1, 7, 8, 4)

N2: (1, 0, 6, 7, 3)

N3: (7, 6, 0, 2, 6)

N4: (8, 7, 2, 0, 4)

N5: (4, 3, 6, 4, 0)

Each distance vector is the distance of the best known path at that instance to nodes, N1 to N5, where the distance to itself is 0. Also, all links are symmetric and the cost is identical in both directions. In each round, all nodes exchange their distance vectors with their respective neighbours. Then all nodes update their distance vectors. In between two rounds, any change in cost of a link will cause the two incident nodes to change only that entry in their distance vectors

The cost of link N2-N3 reduces to 2 in (both directions). After the next round of updates, what will be the new distance vector at node, N3?

I contemplated ________ Singapore for my vacation but decided against it.

An undirected graph G(V,E) contains n ( n >2 ) nodes named v_{1} , v_{2} ,....v_{n}. Two nodes v_{i} , v_{j} are connected if and only if 0 < |i – j| $\le$ 2. Each edge (v_{i} ,v_{j}) is assigned a weight i + j. A sample graph with n = 4 is shown below:

The length of the path from v_{5} to v_{6} in the MST of previous question with n = 10 is

If Log (P) = (1/2) Log (Q) = (1/3) Log (R), then which of the following options is TRUE?

__ Directions:__ Choose the most appropriate word from the options given below to complete the following sentence.

If you are trying to make a strong impression on your audience, you cannot do so by being understated, tentative or _____________.

Which of the following options is the closest in the meaning to the word below?

**Inexplicable**

Consider a network with five nodes, N1 to N5, as shown below:

The net work uses a Distance Vector Routing protocol. Once the routes have stabilized, the distance vectors at different nodes are as following:

N1: (0, 1, 7, 8, 4)

N2: (1, 0, 6, 7, 3)

N3: (7, 6, 0, 2, 6)

N4: (8, 7, 2, 0, 4)

N5: (4, 3, 6, 4, 0)

Each distance vector is the distance of the best known path at that instance to nodes, N1 to N5, where the distance to itself is 0. Also, all links are symmetric and the cost is identical in both directions. In each round, all nodes exchange their distance vectors with their respective neighbours. Then all nodes update their distance vectors. In between two rounds, any change in cost of a link will cause the two incident nodes to change only that entry in their distance vectors.

After the update in the previous question, the link N1-N2 goes down. N2 will reflect this change immediately in its distance vector as cost,$\infty$. After the NEXT ROUND of update, what will be the cost to N1 in the distance vector of N3?

P, Q, R and S are four types of dangerous microbes recently found in a human habitat. The area of each circle with its diameter printed in brackets represents the growth of a single microbe surviving human immunity system within 24 hours of entering the body. The danger to human beings varies proportionately with the toxicity, potency and growth attributed to a microbe shown in the figure below.

A pharmaceutical company is contemplating the development of a vaccine against the most dangerous microbe. Which microbe should the company target in its first attempt?

**Few school curricula include a unit on how to deal with bereavement and grief, and yet all students at some point in their lives suffer from losses through death and parting.**

Based on the above passage, which topic would not be included in a unit on bereavement?

Let MX and MY denote the respective maximum values of X and Y among all records in the table at any point in time. Using MX and MY, new records are inserted in the table 128 times with X and Y values being MX+1, 2*MY+1 respectively. It may be noted that each time after the insertion, values of MX and MY change.

What will be the output of the following SQL query after the steps mentioned above are carried out?

SELECT Y FROM T WHERE X = 7;

The following is comment written for a C function

```
/* This function computes the roots of a quadratic equation
a.x<sup>2</sup>+b.x+c = 0. The function stores two real roots
in *root1 and *root2 and returns the status of validity of
roots. It handles four different kinds of cases.
(i) When coefficient a is zero irrespective of discriminant
(ii) When discriminant is positive
(iii) When discrimanant is zero
(iv) When discrimanant is negative
Only in cases (ii) and (iii), the stored roots are valid.
Otherwise 0 is stored in the roots, the function returns 0 when the roots are valid and -1 otherwise.
The function also ensures root1 greater than or equal to root2.
int get_QuadRoots float a, float b, float c, float *root1, float *root2;
*/
```

A software test engineer is assigned the job of doing black box testing. He comes up with the following test cases, many of which are redundant.

Test Case | Input set | Expected Output set |

--- | --- | --- |

a | b | |

T1 | 0.0 | 0.0 |

T2 | 0.0 | 1.0 |

T3 | 1.0 | 2.0 |

T4 | 4.0 | -12.0 |

T5 | 1.0 | -2.0 |

T6 | 1.0 | 1.0 |

Which one of the following options provide the set of non-redundant tests using equivalence class, partitioning approach from input perspective for black box testing?

Consider the following table of arrival time and burst time for three processes P0, P1 and P2.

**Process** **Arrival time** **Burst Time** P0 0 ms 9 ms P1 1 ms 4 ms P2 2 ms 9 ms

The preemptive shortest job first scheduling algorithm is used. Scheduling is carried out only at arrival or completion of processes. What is the average waiting time for the three processes?