Question 1
In a certain town, the probability that it will rain in the afternoon is known to be 0.6. Moreover, meteorological data indicates that if the temperature at noon is less than or equal to 25°C, the probability that it will rain in the afternoon is 0.4. The temperature at noon is equally likely to be above 25°C, or at/below 25°C. What is the probability that it will rain in the afternoon on a day when the temperature at noon is above 25°C?
 A 0.4 B 0.6 C 0.8 D 0.9
GATE IT 2006
Discuss it

Question 1 Explanation:

 Question 2
For the set N of natural numbers and a binary operation f : N x N → N, an element z ∊ N is called an identity for f, if f (a, z) = a = f(z, a), for all a ∊ N. Which of the following binary operations have an identity?
1. f (x, y) = x + y - 3
2. f (x, y) = max(x, y)
3. f (x, y) = xy

 A I and II only B II and III only C I and III only D None of these
Set Theory & Algebra    GATE IT 2006
Discuss it

Question 2 Explanation:
I f(x,y) = x+y-3 = x= y+x-3  =>  y=3 Here identity elements is 3 II f(x,y) = max(x,y)=x=max(y,x)  => y=1 Here identity elements is 1 (III f(x,y) =x^y is not same as f(y,x) = y^x. So no identity element.
 Question 3
In the automaton below, s is the start state and t is the only final state.               Consider the strings u = abbaba, v = bab, and w = aabb. Which of the following statements is true?
 A The automaton accepts u and v but not w B The automaton accepts each of u, v, and w C The automaton rejects each of u, v, and w D The automaton accepts u but rejects v and w
Regular languages and finite automata    GATE IT 2006
Discuss it

Question 3 Explanation:
For the acceptance and rejection of any string we can simply check for the movement on each input alphabet between states. A string is accepted if we stop at any final state of the DFA. For string u=abbaba the string ends at t (final state) hence it is accepted by the DFA. For string v=bab the string ends at s (non-final state) and hence rejected by the DFA. For string w=aabb the string ends at s (non-final state) and hence rejected by the DFA.   This solution is contributed by Yashika Arora.
 Question 4
In the context-free grammar below, S is the start symbol, a and b are terminals, and ϵ denotes the empty string S → aSa | bSb | a | b | ϵ Which of the following strings is NOT generated by the grammar?
 A aaaa B baba C abba D babaaabab
Regular languages and finite automata    GATE IT 2006
Discuss it

Question 4 Explanation:
The given Language is  Palindrome. A,C and D follow the language but  baba  is not a palindrome  , so B is the answer
 Question 5
Which regular expression best describes the language accepted by the non-deterministic automaton below?
 A (a + b)* a(a + b)b B (abb)* C (a + b)* a(a + b)* b(a + b)* D (a + b)*
Regular languages and finite automata    GATE IT 2006
Discuss it

 Question 6
Given a boolean function f (x1, x2, ..., xn), which of the following equations is NOT true
 A f (x1, x2, ..., xn) = x1'f(x1, x2, ..., xn) + x1f(x1, x2, ..., xn) B f (x1, x2, ..., xn) = x2f(x1, x2, …, xn) + x2'f(x1, x2, …,xn) C f (x1, x2, ..., xn) = xn'f(x1, x2, …, 0) + xnf(x1, x2, …,1) D f (x1, x2, ..., xn) = f(0, x2, …, xn) + f(1, x2, .., xn)
Functions    Set Theory & Algebra    GATE IT 2006
Discuss it

Question 6 Explanation:
Option A: f (x1, x2, …, xn) = x1’f(x1, x2, …, xn) + x1f(x1, x2, …, xn) Case 1: taking x1=0 RHS = 1.f(x1, x2, …, xn) + 0.f(x1, x2, …, xn) RHS =f(x1, x2, …, xn). Case 2: taking x1=1 RHS = 0.f(x1, x2, …, xn) + 1.f(x1, x2, …, xn) RHS =f(x1, x2, …, xn). In both cases RHS=LHS, so, (A) is true Option B: f (x1, x2, …, xn) = x2f(x1, x2, …, xn) + x2’f(x1, x2, …, xn) Case 1: taking x2=0 RHS= 0.f(x1, x2, …, xn) + 1.f(x1, x2…,xn) RHS =f(x1, x2, …, xn). Case 2: taking x2=1 RHS = 1.f(x1, x2, …, xn) + 0.f(x1, x2, …, xn) RHS =f(x1, x2, …, xn). In both cases RHS=LHS, so, (B) is true. Option C: f (x1, x2, …, xn) = xn’f(x1, x2, …, 0) + xnf(x1, x2, …,1) Case 1: taking xn=0 RHS= 1.f(x1, x2, …, 0) + 0.f(x1, x2, …, 1) RHS =f(x1, x2, …, 0) Case 2: taking xn=1 RHS = 0.f(x1, x2, …, 0) + 1.f(x1, x2, …, 1) RHS =f(x1, x2, …, 1)In both cases RHS=LHS, so, (C) is true. Option D: f (x1, x2, …, xn) = f(0, x2, …, xn) + f(1, x2, .., xn) Here, no way to equate LHS and RHS so ‘NOT true’. NO term depends on value of ‘x1’.   This solution is contributed by Sandeep pandey.
 Question 7
The addition of 4-bit, two's complement, binary numbers 1101 and 0100 results in
 A 0001 and an overflow B 1001 and no overflow C 0001 and no overflow D 1001 and an overflow
Digital Logic & Number representation    GATE IT 2006
Discuss it

Question 7 Explanation:
Its  -3+4=1, so no overflow So Answer is C.
 Question 8
Which of the following DMA transfer modes and interrupt handling mechanisms will enable the highest I/O band-width?
 A Transparent DMA and Polling interrupts B Cycle-stealing and Vectored interrupts C Block transfer and Vectored interrupts D Block transfer and Polling interrupts
Process Management    Input Output Systems    Computer Organization and Architecture    GATE IT 2006
Discuss it

 Question 9
In a binary tree, the number of internal nodes of degree 1 is 5, and the number of internal nodes of degree 2 is 10. The number of leaf nodes in the binary tree is
 A 10 B 11 C 12 D 15
Binary Trees    GATE IT 2006
Discuss it

Question 9 Explanation:
In a binary tree, the number of leaf nodes is always 1 more than number of internal nodes with 2 children, refer http://www.geeksforgeeks.org/handshaking-lemma-and-interesting-tree-properties/ So, Number of Leaf Nodes = Number of Internal nodes with 2 children + 1 Number of Leaf Nodes = 10 + 1 Number of Leaf Nodes = 11
 Question 10
A problem in NP is NP-complete if
 A It can be reduced to the 3-SAT problem in polynomial time B The 3-SAT problem can be reduced to it in polynomial time C It can be reduced to any other problem in NP in polynomial time D some problem in NP can be reduced to it in polynomial time
Analysis of Algorithms    NP Complete    GATE IT 2006
Discuss it

Question 10 Explanation:
A problem in NP becomes NPC if all NP problems can be reduced to it in polynomial time. This is same as reducing any of the NPC problem to it. 3-SAT being an NPC problem, reducing it to a NP problem would mean that NP problem is NPC.   Please refer: http://www.geeksforgeeks.org/np-completeness-set-1/
 Question 11
If all the edge weights of an undirected graph are positive, then any subset of edges that connects all the vertices and has minimum total weight is a
 A Hamiltonian cycle B grid C hypercube D tree
Tree Traversals    Graph Theory    GATE IT 2006
Discuss it

Question 11 Explanation:
As here we want subset of edges that connects all the vertices and has minimum total weight i.e. Minimum Spanning Tree Option A - includes cycle, so may or may not connect all edges. Option B - has no relevance to this question. Option C - includes cycle, so may or may not connect all edges. Related: http://www.geeksforgeeks.org/greedy-algorithms-set-2-kruskals-minimum-spanning-tree-mst/ http://www.geeksforgeeks.org/greedy-algorithms-set-5-prims-minimum-spanning-tree-mst-2/ This solution is contributed by Mohit Gupta.
 Question 12
In the working-set strategy, which of the following is done by the operating system to prevent thrashing?
1. It initiates another process if there are enough extra frames.
2. It selects a process to suspend if the sum of the sizes of the working-sets exceeds the total number of available frames.

 A I only B II only C Neither I nor II D Both I and II
Process Management    GATE IT 2006
Discuss it

Question 12 Explanation:
According to concept of thrashing,
• I is true because to prevent thrashing we must provide processes with as many frames as they really need "right now".If there are enough extra frames, another process can be initiated.
• II is true because The total demand, D, is the sum of the sizes of the working sets for all processes. If D exceeds the total number of available frames, then at least one process is thrashing, because there are not enough frames available to satisfy its minimum working set. If D is significantly less than the currently available frames, then additional processes can be launched.
 Question 13
The process state transition diagram of an operating system is as given below.
Which of the following must be FALSE about the above operating system?
 A It is a multiprogrammed operating system B It uses preemptive scheduling C It uses non-preemptive scheduling D It is a multi-user operating system
GATE IT 2006
Discuss it

Question 13 Explanation:
A - It is Correct - In a multiprogramming environment,  multiple processes can be in ready state B - It is Incorrect because once in running state there is no provision to go back to ready state C - It is Correct because once in running state there is no provision to go back to ready state D- It is Correct In a multi User environment,  multiple processes can be in ready state
 Question 14
Consider the relations r1(P, Q, R) and r2(R, S, T) with primary keys P and R respectively. The relation r1 contains 2000 tuples and r2 contains 2500 tuples. The maximum size of the join r1⋈ r2 is :
 A 2000 B 2500 C 4500 D 5000
SQL    GATE IT 2006
Discuss it

Question 14 Explanation:
r1⋈ r2  is a join operation done on the common attribute R. Further R is the primary key of R2 When we take a , the value of common attribute( R2 in this case) should match.The value of  R in r2 is matched with corresponding R in r1 . So it will have 2000 tuples. So correct option is (A).
 Question 15
Which of the following relational query languages have the same expressive power?
1. Relational algebra
2. Tuple relational calculus restricted to safe expressions
3. Domain relational calculus restricted to safe expressions

 A II and III only B I and II only C I and III only D I, II and III
ER and Relational Models    GATE IT 2006
Discuss it

Question 15 Explanation:
Relational algebra is a procedural query language where we input - relations and it yields relations as output. It provides method to get the result. It is performed recursively on a relation and the in between results are relations(output). Basic set of operations for the relational model. Relational calculus is a non - procedural query language. It provides the query to get result. Higher level declarative language for specifying relational queries. Tupple Relational Calculus operates on each tupple. Domain Relational Calculus operates on each column or attribute. Safe expression means fixed no. of tupple or column or attribute as a result But all of them has same expressive power. Just different ways to do so. This solution is  contributed by Mohit Gupta.
 Question 16
The cyclomatic complexity of the flow graph of a program provides
 A an upper bound for the number of tests that must be conducted to ensure that all statements have been executed at most once B a lower bound for the number of tests that must be conducted to ensure that all statements have been executed at most once C an upper bound for the number of tests that must be conducted to ensure that all statements have been executed at least once D a lower bound for the number of tests that must be conducted to ensure that all statements have been executed at least once
Graph    Software Engineering    GATE IT 2006
Discuss it

 Question 17
With respect to software testing, consider a flow graph G with one connected component. Let E be the number of edges, N be the number of nodes, and P be the number of predicate nodes of G. Consider the following four expressions:
1. E - N + P
2. E - N + 2
3. P +  2
4. P + 1
The cyclomatic complexity of G is given by
 A I or III B II or III C II or IV D I or IV
GATE IT 2006
Discuss it

 Question 18
HELO and PORT, respectively, are commands from the protocols
 A FTP and HTTP B TELNET and POP3 C HTTP and TELNET D SMTP and FTP
HTML and XML    GATE IT 2006
Discuss it

Question 18 Explanation:
Simple Mail Transfer Protocol (SMTP) : It is an Internet standard used for transmitting email. Electronic mail servers and other mail transfer agents use SMTP to send and receive mail messages. The client sends 'HELO' command to the SMTP server to identify itself and initiate the SMTP conversatio. File Transfer Protocol (FTP) : It is a network protocol used to transfer computer files between a client and server on a computer network. FTP communications use two port number values -- one for commands (port 21 by default), and one for data transfer. This is where the PORT command comes into play. The PORT command is sent by an FTP client to establish a secondary connection (address and port) for data to travel over. This solution is contributed by Mohit Gupta .
 Question 19
Which of the following statements is TRUE?
 A Both Ethernet frame and IP packet include checksum fields B Ethernet frame includes a checksum field and IP packet includes a CRC field C Ethernet frame includes a CRC field and IP packet includes a checksum field D Both Ethernet frame and IP packet include CRC fields
Network Layer    GATE IT 2006
Discuss it

Question 19 Explanation:
ETHERNET FRAME FORMAT: 1. It also called IEEE 802.3 protocol. 2. Used at data link layer, bus topology, CSMA/CD access control, NO acknowledgement used. 3. For securing CRC is used, more precisely, CRC-32 bit. IP DATAGRAM FORMAT: IP datagram uses 16-bit checksum. So, ETHERNET->CRC and IP->checksum. This solution is contributed by Sandeep pandey.
 Question 20
Which of the following statement(s) is TRUE?
1. A hash function takes a message of arbitrary length and generates a fixed length code.
2. A hash function takes a message of fixed length and generates a code of variable length.
3. A hash function may give the same hash value for distinct messages.

 A I only B II and III only C I and III only D II only
Hash    GATE IT 2006    Data Type
Discuss it

Question 20 Explanation:
Hash function is defined as any function that can be used to map data of arbitrary size of data to a fixed size data.. The values returned by a hash function are called hash values, hash codes, digests, or simply hashes  :  Statement 1 is correct Yes, it is possible that a Hash Function maps a value to a same location in the memmory that's why collision occurs and we have different technique to handle  this problem : Statement 3 is coorect. eg : we have hash function, h(x) = x mod 3 Acc to Statement 1, no matter what the value of 'x' is h(x) results in a fixed mapping location. Acc. to Statement 3, h(x) can result in same mapping mapping location for different value of 'x' e.g. if x = 4 or x = 7 , h(x) = 1 in both the cases, although collision occurs.   This solution is contributed by Mohit Gupta.
 Question 21
Consider the following first order logic formula in which R is a binary relation symbol. ∀x∀y (R(x, y)  => R(y, x)) The formula is
 A satisfiable and valid B satisfiable and so is its negation C unsatisfiable but its negation is valid D satisfiable but its negation is unsatisfiable
Set Theory & Algebra    GATE IT 2006
Discuss it

Question 21 Explanation:
VxVy R(x,y) => R(y,x) The above given relation is symmetry But, we have both symmetric relastions possible and also possibility of anti symmetric relation  But neither of always holds for all possibilites of sets. => Both are satisfiable but not valid This solution is contributed by Anil Saikrishna Devarasetty.   One more solution : We are given a logical formula. So, to be valid it must be a symmetric relation. Hence, Option A is incorrect. Since, it is a logical formula => it is along with it's negation is satisfiable. Hence, option B is correct. This solution is contributed by Mohit Gupta .
 Question 22
When a coin is tossed, the probability of getting a Head is . Let be the random variable denoting the number of tosses till the first Head appears, including the toss where the Head appears. Assuming that successive tosses are independent, the expected value of is
 A 1/p B 1/(1−p) C 1/p2 D 1/(1−p2)
Misc    Probability    GATE IT 2006
Discuss it

Question 22 Explanation:
For a continuous variable X ranging over all the real numbers, the expectation is defined by E(X)= ∫ xf(x) dx probability for head = p probability for tail = 1-p if in first time, head appears, probability will be 1*p if firstly tail occurs,and then head occurs, then the probability will be (1-p)*p and so on.... for the nth time, probaility will be (1-p) n-1 * p E= 1*p + 2*(1−p)*p + 3*(1−p)*(1−p)*p + ................... equation(1) multiply both side with (1−p): E*(1-p) = 1*p*(1-p) + 2*(1-p)*(1-p)*p + 3*(1-p)*(1-p)*(1-p)*p +............. equation (2) Subtract equation 2 from equation 1: E−E*(1−p)= 1*p+ (1−p)*p+ (1−p)*(1−p)*p +... E*p =p[1+ (1-p) + (1-p)*(1-p) + ......] It's a infinite geometric progression. E = 1/(1-(1-p)) = 1/p E=1/p correct answer is A. This solution is contributed by Nitika Bansal.
 Question 23
Let P, Q and R be sets let Δ denote the symmetric difference operator defined as PΔQ = (P U Q) - (P ∩ Q). Using Venn diagrams, determine which of the following is/are TRUE? PΔ (Q ∩ R) = (P Δ Q) ∩ (P Δ R) P ∩ (Q ∩ R) = (P ∩ Q) Δ (P Δ R)
 A I only B II only C Neither I nor II D Both I and II
Set Theory & Algebra    GATE IT 2006
Discuss it

Question 23 Explanation:

From above venn diagrams answer C
 Question 24
What is the cardinality of the set of integers X defined below? X = {n | 1 ≤ n ≤ 123, n is not divisible by either 2, 3 or 5}
 A 28 B 33 C 37 D 44
Set Theory & Algebra    GATE IT 2006
Discuss it

Question 24 Explanation:
This solution is contributed by Anil Saikrishna Devarasetty.
 Question 25
Consider the undirected graph G defined as follows. The vertices of G are bit strings of length n. We have an edge between vertex u and vertex v if and only if u and v differ in exactly one bit position (in other words, v can be obtained from u by flipping a single bit). The ratio of the chromatic number of G to the diameter of G is
 A 1/(2n-a) B 1/n C 2/n D 3/n
GATE IT 2006
Discuss it

Question 25 Explanation:
Bipartite graph:- A bipartite graph is a graph G(V,E) where vertices can be decomposed into two disjoint sets such that no two vertices within the same set are adjacent. Diameter of a graph:- The longest shortest path in between any two vertices of a graph The given graph is a bipartite graph => chromatic number is equals to 2 The diameter of graph is equals to n because at most we need to traverse n-1 edges. The ratio = 2/n Refernce:https://en.wikipedia.org/wiki/Hypercube_graph This solution is contributed by Anil Saikrishna Devarasetty
 Question 26
What are the eigenvalues of the matrix P given below
 A a, a -√2, a + √2 B a, a, a C 0, a, 2a D -a, 2a, 2a
GATE IT 2006
Discuss it

Question 26 Explanation:
det(A-λ.I))=0 (a-λ)*[(a-λ)2-1] -1*(a-λ)= 0 (a-λ)3 - 2(a-λ) = 0 (a-λ)((a-λ)2 - 2) = 0 (a-λ)(a-λ+√2)(a-λ-√2) = 0
 Question 27
Match the following iterative methods for solving algebraic equations and their orders of convergence.
 A I-R, II-S, III-P, IV-Q B I-S, II-R, III-Q, IV-P C I-S, II-Q, III-R, IV-P D I-S, II-P, III-Q, IV-R
GATE IT 2006
Discuss it

Question 27 Explanation:
This solution is contributed by Anil Saikrishna Devarasetty.
 Question 28
The following definite integral evaluates to
 A 1/2 B √10 C None
GATE IT 2006
Discuss it

Question 28 Explanation:
This solution is contributed by Anil Saikrishna Devarasetty.
 Question 29
Consider the regular grammar below
S → bS | aA | ϵ
A → aS | bA
The Myhill-Nerode equivalence classes for the language generated by the grammar are
 A {w ∊ (a + b)* | #a(w) is even) and {w ∊ (a + b)* | #a(w) is odd} B {w ∊ (a + b)* | #a(w) is even) and {w ∊ (a + b)* | #b(w) is odd} C {w ∊ (a + b)* | #a(w) = #b(w) and {w ∊ (a + b)* | #a(w) ≠ #b(w)} D {ϵ}, {wa | w ∊ (a + b)* and {wb | w ∊ (a + b)*}
GATE IT 2006
Discuss it

Question 29 Explanation:
 Question 30
Which of the following statements about regular languages is NOT true?
 A Every language has a regular superset B Every language has a regular subset C Every subset of a regular language is regular D Every subset of a finite language is regular
GATE IT 2006
Discuss it

Question 30 Explanation:
Regular Languages are not closed under subset. Reference: https://courses.engr.illinois.edu/cs373/sp2009/handouts/closure/regular-closure.html
 Question 31
Which of the following languages is accepted by a non-deterministic pushdown automaton (PDA) but NOT by a deterministic PDA?
 A {anbncn ∣ n≥0} B {albmcn ∣ l≠m or m≠n} C {anbn ∣ n≥0} D {ambn∣ m,n≥0}
GATE IT 2006
Discuss it

Question 31 Explanation:
1. L = {a n b n c n |n >= 0} this is not a CFL, as there is no PDA that can derive this language. Same can be proved using pumping lemma, as can be seen intuitively as well. [INCORRECT] 2. L = {a l b m c n |l! = m or m! = n} is union of two CFLs L1 = {a l b m c n |l! = m} and L2 = {a l b m c n |m! = n} both having DPDA. Hence L is sure a CFL, thus it will have a DFA, though not necessarily a deterministic one. L = {a n b n c n } and DPDA are closed under complementation - thus if L is a DPDA then its complement should be a DPDA as well, which is not true. Hence, L is accepted by a NPDA. [CORRECT] 3. L = {a n b n |n ≥ 0} can be derived from a deterministic PDA - push if current alphabet is a and pop if it is b. Accept if stack is empty on the end of the string and reject otherwise. [INCORRECT] 4. L = {a n b m |n, m ≥ 0} is a regular language of the form a ∗ b ∗ , hence it has a DPDA. [INCORRECT]   Reference : https://cs.wmich.edu/elise/courses/cs6800/DCFL.pptx This solution is contributed by vineet purswani.
 Question 32
Let L be a context-free language and M a regular language. Then the language L ∩ M is
 A always regular B never regular C always a deterministic context-free language D always a context-free language
GATE IT 2006
Discuss it

Question 32 Explanation:
L is a context free language and M is a regular language, hence context free as well. Therefore, L ∩ M is context free for sure, according to closure laws of context free languages. We need to check whether it would be regular or non-regular always. We can prove that by giving examples s.t. L ∩ M can be regular and non-regular both. • L = {anbn |n ≥ 0} and M = a*b*, in this case L ∩ M will be L itself, hence context free but not regular. L ∩ M won’t be deterministic CFL everytime either, like in this example. L = {anbn |n ≥ 0} and M = a, in this case L ∩ M will be M itself, hence regular. Considering the above statement, correct answer would be (D) always a context-free language. Refernce: https://www.wikipedia.org/wiki/Theory_of_computation This solution is contributed by vineet purswani .
 Question 33
Consider the pushdown automaton (PDA) below which runs over the input alphabet (a, b, c). It has the stack alphabet {Z0, X} where Z0 is the bottom-of-stack marker. The set of states of the PDA is (s, t, u, f} where s is the start state and f is the final state. The PDA accepts by final state. The transitions of the PDA given below are depicted in a standard manner. For example, the transition (s, b, X) → (t, XZ0) means that if the PDA is in state s and the symbol on the top of the stack is X, then it can read b from the input and move to state t after popping the top of stack and pushing the symbols Z0 and X (in that order) on the stack.
(s, a, Z0) → (s, XXZ0)
(s, ϵ, Z0) → (f, ϵ)
(s, a, X) → (s, XXX)
(s, b, X) → (t, ϵ)
(t, b, X) → (t,.ϵ)
(t, c, X) → (u, ϵ)
(u, c, X) → (u, ϵ)
(u, ϵ, Z0) → (f, ϵ)
The language accepted by the PDA is
 A {albmcn | l = m = n} B {albmcn | l = m} C {albmcn | 2l = m+n} D {albmcn | m=n}
Context free languages and Push-down automata    GATE IT 2006
Discuss it

 Question 34
In the context-free grammar below, S is the start symbol, a and b are terminals, and ϵ denotes the empty string.
S → aSAb | ϵ
A → bA | ϵ
The grammar generates the language
 A ((a + b)* b)* B {ambn | m ≤ n} C {ambn | m = n} D a* b*
GATE IT 2006
Discuss it

Question 34 Explanation:
from A:
((a + b)* b)*
It accepts aa string but, given grammer does not.
The simplest string accepted by grammer given is abb, so option C not true and option D is also false.
 Question 35
The boolean function for a combinational circuit with four inputs is represented by the following Karnaugh map.

Which of the product terms given below is an essential prime implicant of the function?
 A QRS B PQS C PQ'S' D Q'S'
GATE IT 2006
Discuss it

Question 35 Explanation:
Essential prime implicants are prime implicants that cover an output of the function that no combination of other prime implicants is able to cover.
 Question 36
The majority function is a Boolean function f(x, y, z) that takes the value 1 whenever a majority of the variables x, y, z and 1. In the circuit diagram for the majority function shown below, the logic gates for the boxes labeled P and Q are, respectively,
 A XOR, AND B XOR, XOR C OR, OR D OR, AND
GATE IT 2006
Discuss it

Question 36 Explanation:
Truth tables of given operations are as follows:
 y z XOR OR AND 0 0 0 0 0 0 1 1 1 0 1 0 1 1 0 1 1 0 1 1
Thus we have OR and AND which give different outputs on (0, 0) and (1, 1). The encoder can hence select from the two and decide output of the function according to x. Reference: http://nptel.ac.in/courses/117106086/30 This solution is contributed  by Kriti Kushwaha .
 Question 37
For a state machine with the following state diagram the expression for the next state S+ in terms of the current state S and the input variables x and y is
 A S+ = S' . y' + S . x B S+ =S. x . y' + S' . y . x' C S+ =x . y' D S+ =S' . y + S . x'
GATE IT 2006
Discuss it

Question 37 Explanation:
For the next state to be S=1 there are two possible cases:
• S=1, x=1
• S=0, y=0
For the next state to be S=0 there are two possible cases:
• S=1, x=0
• S=0, y=1
The above conditions can be tabulated as (where X means that variable has no effect on state transition)
 x y S S+ 1 X 1 1 X 0 0 1 0 X 1 0 X 1 0 0
It is clearly visible that S+ depends on state S and either of the variable x or y. This directly eliminates option (B) and option (C). Now we can check for the other two options. When S=1 and x=1 option (D) gives S+ as 0 which should otherwise be one hence (D) can also be eliminated. Option (A) satisfies all, hence the answer.  This solution is contributed by Yashika Arora.
 Question 38
When multiplicand Y is multiplied by multiplier X = xn - 1xn-2 ....x0 using bit-pair recoding in Booth's algorithm, partial products are generated according to the following table. The partial products for rows 5 and 8 are
 A 2Y and Y B -2Y and 2Y C -2Y and 0 D 0 and Y
GATE IT 2006
Discuss it

Question 38 Explanation:
ALU cannot directly multiply numbers, it can only add, subtract or shift. Booth’s algorithm is a means by which we can perform multiplication with the help of addition, subtraction and shift. For performing multiplication, write both the signed numbers in binary and make the no. of bits in both equal by padding 0 . Here, partial product is calculated by bit pair recoding in booth’s algorithm. (-2 x(i+1)+x(i)+x(i-1))Y So, option C is correct. This solution is contributed by Shashank Shanker khare.
 Question 39
 A It enables reduced instruction size B It allows indexing of array elements with same instruction C It enables easy relocation of data D It enables faster address calculations than absolute addressing
Computer Organization and Architecture    GATE IT 2006
Discuss it

Question 39 Explanation:
 Question 40
The memory locations 1000, 1001 and 1020 have data values 18, 1 and 16 respectively before the following program is executed.<br> MOVI         Rs, 1                     ; Move immediate <br> LOAD        Rd, 1000(Rs)     ; Load from memory<br> ADDI         Rd, 1000             ; Add immediate<br> STOREI    0(Rd), 20            ; Store immediate<br> Which of the statements below is TRUE after the program is executed ?
 A Memory location 1000 has value 20 B Memory location 1020 has value 20 C Memory location 1021 has value 20 D Memory location 1001 has value 20
GATE IT 2006
Discuss it

Question 40 Explanation:
Rs<-1
Rd<-1
Rd<-1001
store in address 1001 <- 20
 Question 41
The data path shown in the figure computes the number of 1s in the 32-bit input word corresponding to an unsigned even integer stored in the shift register.
The unsigned counter, initially zero, is incremented if the most significant bit of the shift register is

The micro-program for the control is shown in the table below with missing control words for micro-instructions I1, I2, ..... In.

The counter width (k), the number of missing micro-instructions (n), and the control word for microinstructions I2, ..... In are, respectively,
 A 32, 5, 010 B 5, 32, 010 C 5, 31, 011 D 5, 31, 010
GATE IT 2006
Discuss it

Question 41 Explanation:
For a number to be even LSB bit has to be 0.<br> So there may be only 31 1’s for an unsigned EVEN integer.<br> And 31 left shifts are needed to determine number of 1's.
 Question 42
A cache line is 64 bytes. The main memory has latency 32ns and bandwidth 1G.Bytes/s. The time required to fetch the entire cache line from the main memory is
 A 32 ns B 64 ns C 96 ns D 128 ns
Computer Organization and Architecture    GATE IT 2006
Discuss it

Question 42 Explanation:
for 1 GBps bandwidth => it takes 1 sec to load 109 bytes on line
so, for 64 bytes it will take 64 * 1 /109 = 64 ns
main memory latency given is 32
so, total time required to place cache line is 64+32 = 96 ns
 Question 43
A computer system has a level-1 instruction cache (1-cache), a level-1 data cache (D-cache) and a level-2 cache (L2-cache) with the following specifications:

The length of the physical address of a word in the main memory is 30 bits. The capacity of the tag memory in the I-cache, D-cache and L2-cache is, respectively,
 A 1 K x 18-bit, 1 K x 19-bit, 4 K x 16-bit B 1 K x 16-bit, 1 K x 19-bit, 4 K x 18-bit C 1 K x 16-bit, 512 x 18-bit, 1 K x 16-bit D 1 K x 18-bit, 512 x 18-bit, 1 K x 18-bit
Computer Organization and Architecture    GATE IT 2006
Discuss it

Question 43 Explanation:
Number of blocks in cache = Capacity / Block size = 2m
Bits to represent blocks = m
Number of words in a block = 2n words
Bits to represent a word = n
tag bits = (length of the physical address of a word) – (Bits to represent blocks ) – (Bits to represent a word)
Each block will have it's own tag bits. So total tag bits = number of blocks x tag bits.
 Question 44
Which of the following sequences of array elements forms a heap?
 A {23, 17, 14, 6, 13, 10, 1, 12, 7, 5} B {23, 17, 14, 6, 13, 10, 1, 5, 7, 12} C {23, 17, 14, 7, 13, 10, 1, 5, 6, 12} D {23, 17, 14, 7, 13, 10, 1, 12, 5, 7}
Heap    GATE IT 2006
Discuss it

Question 44 Explanation:
When they are asking for heap, by default it's max heap. Basic Requirement: Array representation of binary tree Starting from basics lets first understand heap trees We have 2 types of heap – Min heap and Max heap In Min heap the parent is always smaller than its children and in Max heap parent is always greater than its children. Looking at the options we can tell that which tree is Max heap tree. Now consider each option one by one and draw a tree From options it is clear that only option C satisfies the Max heap tree property. This explanation has been contributed by Parul Sharma.
 Question 45
Suppose that we have numbers between 1 and 100 in a binary search tree and want to search for the number 55. Which of the following sequences CANNOT be the sequence of nodes examined?
 A {10, 75, 64, 43, 60, 57, 55} B {90, 12, 68, 34, 62, 45, 55} C {9, 85, 47, 68, 43, 57, 55} D {79, 14, 72, 56, 16, 53, 55}
Binary Search Trees    GATE IT 2006
Discuss it

Question 45 Explanation:
In BST on right side of parent number should be greater than it, but in C after 47, 43 appears that is wrong.
 Question 46
Which of the following is the correct decomposition of the directed graph given below into its strongly connected components?
 A {P, Q, R, S}, {T}, {U}, {V} B {P,Q, R, S, T, V}, {U} C {P, Q, S, T, V}, {R}, {U} D {P, Q, R, S, T, U, V}
GATE IT 2006
Discuss it

Question 46 Explanation:
 Question 47
Consider the depth-first-search of an undirected graph with 3 vertices P, Q, and R. Let discovery time d(u) represent the time instant when the vertex u is first visited, and finish time f(u) represent the time instant when the vertex u is last visited. Given that
d(P) = 5 units f(P) = 12 units
d(Q) = 6 units f(Q) = 10 units
d(R) = 14 unit f(R) = 18 units
which one of the following statements is TRUE about the graph
 A There is only one connected component B There are two connected components, and P and R are connected C There are two connected components, and Q and R are connected D There are two connected components, and P and Q are connected
GATE IT 2006
Discuss it

Question 47 Explanation:
since d(q)=d(p)+1 and f(q)< f(p) which means p and q are connected and r is separate so d is the answer
 Question 48
The characters a to h have the set of frequencies based on the first 8 Fibonacci numbers as follows
a : 1, b : 1, c : 2, d : 3, e : 5, f : 8, g : 13, h : 21/
A Huffman code is used to represent the characters. What is the sequence of characters corresponding to the following code? 110111100111010
 A fdheg B ecgdf C dchfg D fehdg
Analysis of Algorithms    GATE IT 2006
Discuss it

Question 48 Explanation:
Background Required -  Generating Prefix codes using Huffman Coding. First we apply greedy algorithm on the frequencies of the characters to generate the binary tree as shown in the Figure given below. Assigning 0 to the left edge and 1 to the right edge, prefix codes for the characters are as below. a - 1111110 b - 1111111 c - 111110 d - 11110 e - 1110 f - 110 g - 10 h - 0 Given String can be decomposed as 110 11110 0 1110 10 f        d     h    e     g This solution is contributed by Pranjul Ahuja .
 Question 49
Which one of the choices given below would be printed when the following program is executed ?
 #include <stdio.h>
struct test {
int i;
char *c;
}st[] = {5, "become", 4, "better", 6, "jungle", 8, "ancestor", 7, "brother"};
main ()
{
struct test *p = st;
p += 1;
++p -> c;
printf("%s,", p++ -> c);
printf("%c,", *++p -> c);
printf("%d,", p[0].i);
printf("%s \n", p -> c);
}

 A jungle, n, 8, nclastor B etter, u, 6, ungle C cetter, k, 6, jungle D etter, u, 8, ncestor
GATE IT 2006
Discuss it

Question 49 Explanation:
Basic Requirement – Knowledge of Structures
struct test *p = st;
st is a array of structures in which the integer is the “i” variable of structure and the character array is the “c” variable of structure. p is a pointer of structure test type which is pointing to the array of structures (first element). p contains the base address of first structure in st array i.e { 5, become}.
p += 1;
This statement increments p by one which means p now point to the next structure (because p is pointer of type structure test, so on incrementing it by one it will jump one structure). p now points to {4, better}. Before moving on to further statements we first discuss about the operators and their precedence. “->” is structure operator which gets the member of the structure being referred. It has higher priority than increment/decrement (++, --) and dereferencing operation (*). Now a brief discussion about post increment and pre increment operator. Pre-increment operator is used to increment the value of variable before using in the expression. In the Pre-Increment value is first incremented and then used inside the expression. Post-increment operator is used to increment the value of variable as soon as after executing expression completely in which post increment is used. In the Post-Increment value is first used in a expression and then incremented.
 ++p -> c;
In this statement the structure operator (higher priority) will first make p point to the c variable inside the structure. Now pointer is inside the character array, now incrementing the pointer in character array ‘c’ will jump one character in character array. Hence the character array now starts from “e”. p->c moves pointer inside the structure to the variable “c”.
printf("%s,", p++ -> c);
In this statement there is post increment operator used. First the statement will be executed and then operator will work. Currently p is pointing to second structure { 4, better} and inside structure the character array is starting from e because of the previous statement so p->c will print the string “etter” and after that the post increment operator will increment the structure and p now will point to next structure.
printf("%c,", *++p -> c);
In this statement p->c points to “jungle” (p was currently pointing to 3rd structure {6, jungle}) and then the pre incrementing operator just like in previous pre increment statement moves one character and now the pointer points to “u”, dereferencing operator here prints the value at the address where the pointer is pointing and since the pointer is pointing at “u” so u is printed.
printf("%d,", p[0].i);
In this statement p[0] will give the address where p is currently pointing i.e {6, jungle} and the structure operator (.) will point to the “i” variable of the structure printing 6 as a result.
printf("%s \n", p -> c);
This statements prints the character string of the structure to which p is currently pointing and since because of earlier increment of character array, character array starts from “u” therefore “ungle” is printed. This explanation has been contributed by Parul Sharma.
 Question 50
Which one of the choices given below would be printed when the following program is executed?
#include
void swap (int *x, int *y)
{
static int *temp;
temp = x;
x = y;
y = temp;
}
void printab ()
{
static int i, a = -3, b = -6;
i = 0;
while (i <= 4)
{
if ((i++)%2 == 1) continue;
a = a + i;
b = b + i;
}
swap (&a, &b);
printf("a =  %d, b = %d\n", a, b);
}
main()
{
printab();
printab();
}

 A a = 0, b = 3 a = 0, b = 3 B a = 3, b = 0 a = 12, b = 9 C a = 3, b = 6 a = 3, b = 6 D a = 6, b = 3 a = 15, b = 12
C Quiz - 110    GATE IT 2006
Discuss it

Question 50 Explanation:
Things to ponder:swap function doesn’t actually swaps two variables, rather just swaps their addresses in local variables x and y - which is effectively nothing once swap function returns.printab function adds 9 to static variables a and b. The number 9 comes from the fact that the while loop executes those arithmetic statements only when i = 1, 3, 5. Hence, when printab is called for the first time, these are the local variable values: a = −3 + 9 and b = −6 + 9. On the second time, a = −3 + 9 + 9 and b = −6 + 9 + 9 are the desired values. Therefore, correct answer would be (D) a = 6, b = 3; a = 15, b = 12.   This solution is contributed by vineet purswani .
 Question 51
Which one of the choices given below would be printed when the following program is executed?
 #include
int a1[] = {6, 7, 8, 18, 34, 67};
int a2[] = {23, 56, 28, 29};
int a3[] = {-12, 27, -31};
int *x[] = {a1, a2, a3};
void print(int *a[])
{
printf("%d,", a[0][2]);
printf("%d,", *a[2]);
printf("%d,", *++a[0]);
printf("%d,", *(++a)[0]);
printf("%d\n", a[-1][+1]);
}
main()
{
print(x);
}

 A 8, -12, 7, 23, 8 B 8, 8, 7, 23, 7 C -12, -12, 27, -31, 23 D -12, -12, 27, -31, 56
GATE IT 2006
Discuss it

Question 51 Explanation:
int *x[] = {a1, a2, a3}; line makes x[0] = a1 and likewise. Therefore whenever x[0] is referenced, internally a1 array is being looked upon.a[0][2] = a1[2] = 8*a[2] = *a3 = a3[0] = -12*++a[0] = *(++a[0]) = a1[1] = 7 : a[0] is now pointing to second element of a1.*(++a)[0] = *a2 = a2[0] = 23 : a is now pointing to array a2.a[-1][+1] = *(a1+1+1) = a1[2] = 8 : *(a-1) = a1+1 due to last two expressions. Hence, correct answer would be (A) 8, -12, 7, 23, 8. This solution is contributed by vineet purswani .
 Question 52
The following function computes the value of mCn correctly for all legal values m and n (m≥1,n≥0 and m>n)
 int func(int m, int n)
{
if (E) return 1;
else return(func(m -1, n) + func(m - 1, n - 1));
}

In the above function, which of the following is the correct expression for E?
 A (n = = 0) || (m = = 1) B (n = = 0) && (m = = 1) C (n = = 0) || (m = = n) D (n = = 0) && (m = = n)
C Quiz - 110    GATE IT 2006
Discuss it

Question 52 Explanation:
Make a recursion tree of the given function recursion.
 Question 53
Match the following concepts and their best possible descriptions.<br>
 A i-b, ii-d, iii-e, iv-f, v-g, vi-a B i-c, ii-a, iii-e, iv-d, v-h, vi-f C i-c, ii-f, iii-h, iv-a, v-g, vi-d D i-b, ii-e, iii-c, iv-f, v-g, vi-s
OOP Concepts    GATE IT 2006
Discuss it

 Question 54
The arrival time, priority, and duration of the CPU and I/O bursts for each of three processes P1, P2 and P3 are given in the table below. Each process has a CPU burst followed by an I/O burst followed by another CPU burst. Assume that each process has its own I/O resource.

The multi-programmed operating system uses preemptive priority scheduling. What are the finish times of the processes P1, P2 and P3 ?
 A 11, 15, 9 B 10, 15, 9 C 11, 16, 10 D 12, 17, 11
GATE IT 2006
Discuss it

Question 54 Explanation:

So finishing time of p1 p2 p3 are 10 15 9
 Question 55
Consider the solution to the bounded buffer producer/consumer problem by using general semaphores S, F, and E. The semaphore S is the mutual exclusion semaphore initialized to 1. The semaphore F corresponds to the number of free slots in the buffer and is initialized to N. The semaphore E corresponds to the number of elements in the buffer and is initialized to 0.
Which of the following interchange operations may result in a deadlock?
1. Interchanging Wait (F) and Wait (S) in the Producer process
2. Interchanging Signal (S) and Signal (F) in the Consumer process
 A I Only B II Only C Neither I nor II D Both I and II
GATE IT 2006
Discuss it

Question 55 Explanation:
Suppose F = 0. Now, if Wait(F) and Wait(S) are interchanged and Wait(S) in producer succeeds, the producer will wait for Wait(F) which is signalled in Consumer, which is never going to succeed as it is waiting for Wait(S) to be signal by producer. So, deadlock can happen.
 Question 56
For each of the four processes P1, P2, P3 and P4. The total size in kilobytes (KB) and the number of segments are given below.
The page size is 1 KB. The size of an entry in the page table is 4 bytes. The size of an entry in the segment table is 8 bytes. The maximum size of a segment is 256 KB. The paging method for memory management uses two-level paging, and its storage overhead is P. The storage overhead for the segmentation method is S. The storage overhead for the segmentation and paging method is T. What is the relation among the overheads for the different methods of memory management in the concurrent execution of the above four processes ?
 A P < S < T B S < P < T C S < T < P D T < S < P
GATE IT 2006
Discuss it

 Question 57
The wait and signal operations of a monitor are implemented using semaphores as follows. In the following,
• x is a condition variable,
• mutex is a semaphore initialized to 1,
• x_sem is a semaphore initialized to 0,
• x_count is the number of processes waiting on semaphore x_sem, initially 0, next is a semaphore initialized to 0,
• next_count is the number of processes waiting on semaphore next, initially 0.
• The body of each procedure that is visible outside the monitor is replaced with the following:
 P(mutex);
body of procedure
if (next_count > 0)
V(next);
else
V(mutex);

Each occurrence of x.wait is replaced with the following:
x_count = x_count + 1;
if (next_count > 0)
V(next)
else
V(mutex);
------------------------------------------------------------ E1;
x_count = x_count - 1;

Each occurrence of x.signal is replaced with the following:
if (x_count > 0)
{
next_count = next_count + 1;
------------------- E2;
P(next),
next_count = next_count - 1;
}

For correct implementation of the monitor, statements E1 and E2 are, respectively,
 A P(x_sem), V(next) B V(next), P(x_sem) C P(next), V(x_sem) D P(x_sem), V(x_sem)
GATE IT 2006
Discuss it

 Question 58
A software program consists of two modules M1 and M2 that can fail independently, but never simultaneously. The program is considered to have failed if any of these modules fails. Both the modules are 'repairable' and so the program starts working again as soon as the repair is done. Assume that the mean time to failure (MTTF) of M1 is T1 with a mean time to repair (MTTR) of R1. The MTTF of M2 is T2 with an MTTR of R2. What is the availability of the overall program given that the failure and repair times are all exponentially distributed random variables?
 A ((T1T2)/(T1R1 + T2R2)) B ((R1R2)/(T1R1 + T2R2)) C ((T1T2)/(T1T2 + T1R1 + T2R2)) D ((T1T2)/(T1T2 + T1R2 + T2R1))
GATE IT 2006
Discuss it

 Question 59
Consider the following structure chart diagram. The boxes have function names embedded in them, while the variables are indicated along the arcs.

Given below are a set of statements relevant to the above diagram.
I. F3 and F6 can be in the same module.
II. F4 and F6 can be in the same module.
III. A4 is both an output and a control variable.
IV. It is incorrect to pass A1 as data and use it as a control variable.
Which combination of these statements is TRUE?
 A III and IV B I and IV C II and IV D I, II and IV
GATE IT 2006
Discuss it

Question 59 Explanation:
Out of syllabus now
 Question 60
Consider a relation R with five attributes V, W, X, Y, and Z. The following functional dependencies hold:
VY→ W, WX → Z, and ZY → V.
Which of the following is a candidate key for R?
 A VXZ B VXY C VWXY D VWXYZ
GATE IT 2006
Discuss it

Question 60 Explanation:
Using VY, W can be explored. With WX, Z can be explored
 Question 61
In a database file structure, the search key field is 9 bytes long, the block size is 512 bytes, a record pointer is 7 bytes and a block pointer is 6 bytes. The largest possible order of a non-leaf node in a B+ tree implementing this file structure is
 A 23 B 24 C 34 D 44
GATE IT 2006
Discuss it

Question 61 Explanation:
For B+ tree with order n, index pointer p, and block size = B
For a non leaf node it can be given that
n*p + (n-1)*(k) <= B
n*6 + (n-1)*9 <= 512
n <= 34.77
 Question 62
Consider the following XML DTD describing course information in a university:
<!ELEMENT Univ (Course+, Prof+)>
<!ELEMENT Course (Title, Eval*)>
<!ATTLIST Course Number ID #REQUIRED Instructor IDREF #IMPLIED>
<!ELEMENT Title (#PCDATA)>
<!ELEMENT Eval (#PCDATA)>
<!ATTLIST Eval Score CDATA #REQUIRED>
<!ELEMENT Prof EMPTY>
<!ATTLIST Prof Name ID #REQUIRED Teaches IDREF #IMPLIED>

What is returned by the following XQuery? let $as := / /@Score for$c in /Univ/Course[Eval]
let $cs :=$c/Eval?@Score
where min($cs) > avg($as)
return \$c
 A The professor with the lowest course evaluation B Professors who have all their course evaluations above the university average C The course with the lowest evaluation D Courses with all evaluations above the university average
GATE IT 2006
Discuss it

Question 62 Explanation:
Out of syllabus now
 Question 63
A router uses the following routing table:

A packet bearing a destination address 144.16.68.117 arrives at the router. On which interface will it be forwarded?
 A eth0 B eth1 C eth2 D eth3
GATE IT 2006
Discuss it

Question 63 Explanation:
For sure A and B can not be answer
For C: subnet address of interface = 144. 16 . 68 .0
Subnet address of incoming IP = 144. 16. 68. 117 AND 255.255.255.0 = 144. 16. 68.0
Both subnetwork addresses are same, so can be forwarded to this interface eth2
D:
Subnet address of incoming IP = 144. 16. 68. 117 AND 255.255.255.224 = 144. 16. 68.96
Hence both subnet addresses are different, so cannot be forwarded to this eth3 interface.
 Question 64
Suppose that it takes 1 unit of time to transmit a packet (of fixed size) on a communication link. The link layer uses a window flow control protocol with a window size of N packets. Each packet causes an ack or a nak to be generated by the receiver, and ack/nak transmission times are negligible. Further, the round trip time on the link is equal to N units. Consider time i > N. If only acks have been received till time i(no naks), then the goodput evaluated at the transmitter at time i(in packets per unit time) is
 A 1 - N/i B i/(N + i) C 1 D 1 - e(i/N)
GATE IT 2006
Discuss it

Question 64 Explanation:
successfully delivered packets = (i-N) {transmission time of a packet =1 unit, so in i time i packets can be transmitted. And RTT = N, so only N packets are ACKed}
So, for time i, i-N packets are transmitted
Goodput = Successfully delivered data/ Time = (i-N)/i = 1- N/i
 Question 65
In the 4B/5B encoding scheme, every 4 bits of data are encoded in a 5-bit codeword. It is required that the codewords have at most 1 leading and at most 1 trailing zero. How many such codewords are possible?
 A 14 B 16 C 18 D 20
GATE IT 2006
Discuss it

Question 65 Explanation:
The possible codewords should not have 00xxx or xxx00
=> Total possible combinations of 5 bits – for (00xxx or xxx00)+ (00x00) {as 00x00 is subtracted twice once each from both cases}
=> 232 – (8+8) +2 = 18
 Question 66
A router has two full-duplex Ethernet interfaces each operating at 100 Mb/s. Ethernet frames are at least 84 bytes long (including the Preamble and the Inter-Packet-Gap). The maximum packet processing time at the router for wirespeed forwarding to be possible is (in micro­seconds)
 A 0.01 B 3.36 C 6.72 D 8
GATE IT 2006
Discuss it

Question 66 Explanation:
Here, we need to maintain the speed of wire, it means the receiving and sending rates both are the maximum possible ,i.e. maximum throughput. So, processing time should be at most same as minimum transmission time to maintain the wire speed. As if router will process it in the minimum transmission time even if a packet is transmitted in minimum time it gets processed and the packet doesn’t get delayed for transmission. So, maximum processing time = minimum transimission time => As,84 Bytes= 84 * 8 bits => 84*8 bits / 100 Mbps = 6.72 micro seconds. This solution is contributed by Shashank Shanker khare Another One To make delay at router =0, processing time = transmission time.
=> 84*8 bits / 100 Mbps = 6.72 micro seconds.
 Question 67
A link of capacity 100 Mbps is carrying traffic from a number of sources. Each source generates an on-off traffic stream; when the source is on, the rate of traffic is 10 Mbps, and when the source is off, the rate of traffic is zero. The duty cycle, which is the ratio of on-time to off-time, is 1 : 2. When there is no buffer at the link, the minimum number of sources that can be multiplexed on the link so that link capacity is not wasted and no data loss occurs is S1. Assuming that all sources are synchronized and that the link is provided with a large buffer, the maximum number of sources that can be multiplexed so that no data loss occurs is S2. The values of S1 and S2 are, respectively,
 A 10 and 30 B 12 and 25 C 5 and 33 D 15 and 22
GATE IT 2006
Discuss it

Question 67 Explanation:
10 Mbps * n <= 100 Mbps {n= number of stations}
n = 10
if n is very large:
a station transmits with probability 1/(1+2 = 1/3, with a capacity of 10Mbps
so, for n stations:
(1/3)*10+(1/3)*10+(1/3)*10+ ……… + n times <= 100 Mbps
(1/3)*10[1+1+1+1+…….+ n times] <= 100
(1/3)*10*n<=100
n=30
 Question 68
On a wireless link, the probability of packet error is 0.2. A stop-and-wait protocol is used to transfer data across the link. The channel condition is assumed to be independent from transmission to transmission. What is the average number of transmission attempts required to transfer 100 packets?
 A 100 B 125 C 150 D 200
GATE IT 2006
Discuss it

Question 68 Explanation:
Probability of success = 0.8
E = 0.8 * 1 + 0.8 * 1 +... n times = 100 {for 100 packets}
=> 0.8 * 1 * n = 100
=> n = 125
to receive 100 packets we have to transmit 125 packets
 Question 69
A program on machine X attempts to open a UDP connection to port 5376 on a machine Y, and a TCP connection to port 8632 on machine Z. However, there are no applications listening at the corresponding ports on Y and Z. An ICMP Port Unreachable error will be generated by
 A Y but not Z B Z but not Y C Neither Y nor Z D Both Y and Z
GATE IT 2006
Discuss it

Question 69 Explanation:
A Destination Unreachable message may be generated as a result of a TCP, UDP or another ICMP transmission.
Reference: https://en.wikipedia.org/wiki/Internet_Control_Message_Protocol
 Question 70
 A is necessarily 255.255.224.0 B is necessarily 255.255.240.0 C is necessarily 255.255.248.0 D could be any one of 255.255.224.0, 255.255.240.0, 255.255.248.0
GATE IT 2006
Discuss it

Question 70 Explanation:
Class B network has first 16 bits dedicated for network and last 16 for hosts. In subnetting bits are borrowed from host part.144.16.95.255 In broadcast address the host bits are all made 1’s and the sub-network ID bits are kept as it is. So ,144.16.95.255 10010000.00010000.01011111.11111111 Clearly, last 13 bits are 1 So, according to broadcast address definition last 13 bits can be host bits Now ,as the sub-network ID bits are kept as it is so these 13 bits can also be representing subnet. So,last 13 bits are representing subnet ID bits + host bits Subnet mask is represented by putting 1’s in place of all bits representing subnet ID and 0’s in place of all bits representing hosts. a) 255.255.224.0 11111111.11111111.11100000.00000000 As last 13 bits can be host bits ,so this can be subnet mask but not necessarily as we have seen already that from last 13 bits can be subnet ID bits+ host bits. So,not option a. b) 255.255.240.0 11111111.11111111.11110000.00000000 As last 12 bits can be host bits ,so this can be subnet mask but not necessarily as we have seen already that last 13 bits can be host bits + subnet bits. So,not option b. c) 255.255.248.0 11111111.11111111.11111000.00000000 As last 11 bits can be host bits ,so this can be subnet mask but not necessarily as we have seen already that last 13 bits can be host bits + subnet bits. So,not option c. d) As shown in the above explanation 255.255.224.0, 255.255.240.0, 255.255.248.0 anyone can be subnet mask. This solution is contributed by Shashank Shanker khare. Another Explanation: For broadcast address of a subnet, all the host bits are set to 1.
So possible host bits can be 13 to 0
 Question 71
An array X of n distinct integers is interpreted as a complete binary tree. The index of the first element of the array is 0. The index of the parent of element X[i],i≠0 is?
 A lowerbound[i/2] B upperbound[(i-1)/2] C upperbound[i/2] D upperbound[i/2] -1
GATE IT 2006
Discuss it

Question 71 Explanation:
left child of ith element will be at 2*i+1 and right child at 2(i+1)
 Question 72
An array X of n distinct integers is interpreted as a complete binary tree. The index of the first element of the array is 0. If only the root node does not satisfy the heap property, the algorithm to convert the complete binary tree into a heap has the best asymptotic time complexity of
 A O (n) B O (log n) C O (nlog n) D O (n log log n)
GATE IT 2006
Discuss it

Question 72 Explanation:
It takes O(logn) to heapify an element of heap
 Question 73
An array X of n distinct integers is interpreted as a complete binary tree. The index of the first element of the array is 0. If the root node is at level 0, the level of element X[i], i ≠ 0, is
 A ⌊log2 i⌋ B ⌈log2 (i + 1)⌉ C ⌊log2 (i + 1)⌋ D ⌈log2 i⌉
GATE IT 2006
Discuss it

 Question 74
 void swap(float* A1, float* A2)
{
float temp;
if (*A1 = = *A2) return;
temp = *A1;
*A1 = *A2;
*A2 = temp;
return;
}

The program volume for the above module using Halstead's method is
 A 60 B 63 C 66 D 69
GATE IT 2006
Discuss it

 Question 75
void swap(float* A1, float* A2)
{
float temp;
if (*A1 = = *A2) return;
temp = *A1;
*A1 = *A2;
*A2 = temp;
return;
}

The program effort for the above module using Halstead's method is
 A 315 B 330 C 393 D 403
GATE IT 2006
Discuss it

Question 75 Explanation:
Out of syllabus
 Question 76
x + y/2 = 9 3x + y = 10 The value of the Frobenius norm for the above system of equations is:
 A 0.5 B 0.75 C 1.5 D 2
GATE IT 2006
Discuss it

Question 76 Explanation:
This solution is contributed by Anil Saikrishna Devarasetty.
 Question 77
x + y/2 = 9 3x + y = 10 What can be said about the Gauss-Siedel iterative method for solving the above set of linear equations?
 A it will converge B It will diverse C It will neither converge nor diverse D It is not applicable
GATE IT 2006
Discuss it

Question 77 Explanation:
This solution is contributed by Anil Saikrishna Devarasetty.
 Question 78
A pipelined processor uses a 4-stage instruction pipeline with the following stages: Instruction fetch (IF), Instruction decode (ID), Execute (EX) and Writeback (WB). The arithmetic operations as well as the load and store operations are carried out in the EX stage. The sequence of instructions corresponding to the statement X = (S - R * (P + Q))/T is given below. The values of variables P, Q, R, S and T are available in the registers R0, R1, R2, R3 and R4 respectively, before the execution of the instruction sequence.

The number of Read-After-Write (RAW) dependencies, Write-After-Read( WAR) dependencies, and Write-After-Write (WAW) dependencies in the sequence of instructions are, respectively,
 A 2, 2, 4 B 3,2,3 C 4,2,2 D 3,3,2
GATE IT 2006
Discuss it

Question 78 Explanation:
2. MUL -> SUB (R6)
3. SUB-> DIV (R5)
4. DIV->STORE (R6)
1. MUL -> SUB (R5)
2. DIV -> STORE (R6)
Write After Write
2. MUL - DIV (R6)
 Question 79
A pipelined processor uses a 4-stage instruction pipeline with the following stages: Instruction fetch (IF), Instruction decode (ID), Execute (EX) and Writeback (WB). The arithmetic operations as well as the load and store operations are carried out in the EX stage. The sequence of instructions corresponding to the statement X = (S - R * (P + Q))/T is given below. The values of variables P, Q, R, S and T are available in the registers R0, R1, R2, R3 and R4 respectively, before the execution of the instruction sequence. The IF, ID and WB stages take 1 clock cycle each. The EX stage takes 1 clock cycle each for the ADD, SUB and STORE operations, and 3 clock cycles each for MUL and DIV operations. Operand forwarding from the EX stage to the ID stage is used. The number of clock cycles required to complete the sequence of instructions is
 A 10 B 12 C 14 D 16
GATE IT 2006
Discuss it

Question 79 Explanation:
Pipelining is a technique in which the instructions are performed in parallel by executing different phases of the instructions. Generally, if two operations are performed in which second operation has dependent operands on first then, the second should not fetch operands until the first one executes as it will otherwise fetch incorrect operands. Hence, stalls are created . Now to overcome this , operand forwarding technique was introduced in which there is an interface through which the operand results are transferred. So, even if the incorrect operands were fetch during the fetch operations during the execution phase the incorrect operands are replaced by the correct operands. Thus,in the given question,though MUL is dependent on ADD due to R5,SUB is dependent on MUL due to R6 DIV is dependent on SUB and STORE dependent on DIV still we can perform Instruction fetch and decode operations in the pipelined processor. Where, IF-instruction fetch ID-instruction decode EX-execute WB-write back As shown in the table 12 clock cycles will be taken to perform the given instructions. This solution is contributed by Shashank Shanker khare
 Question 80
Let L be a regular language. Consider the constructions on L below:
I. repeat (L) = {ww | w ∊ L}
II. prefix (L) = {u | ∃v : uv ∊ L}
III. suffix (L) = {v | ∃u : uv ∊ L}
IV. half (L) = {u | ∃v : | v | = | u | and uv ∊ L}
Which of the constructions could lead to a non-regular language?
 A Both I and IV B Only I C Only IV D Both II and III
GATE IT 2006
Discuss it

 Question 81
Let L be a regular language. Consider the constructions on L below: repeat (L) = {ww | w ∊ L} prefix (L) = {u | ∃v : uv ∊ L} suffix (L) = {v | ∃u uv ∊ L} half (L) = {u | ∃v : | v | = | u | and uv ∊ L} Which of the constructions could lead to a non-regular language?
 A Both I and IV B Only 1 C Only IV D Both II and III
GATE IT 2006
Discuss it

Question 81 Explanation:
1. repeat(L) should not be confused with concatenation as there is a specific order to it. Only same strings are concatenated with each other and not all. Moreover, double word language is not even a CFG. [non-regular] 2. prefix(L) is a regular language - all the states in L’s DFA could be made final, giving result to a DFA which would accept prefix(L). [regular] 3. suffix(L) is a regular language as a NFA could be constructed which would accept suffix(L). Every state in L’s DFA can get an incident # − edge from start state - this NFA would accept suffix(L). [regular] 4. half(L) is not a regular language as there is no way for a finite automaton to remember string’s lengths, hence half of it couldn’t be produced. [non-regular] All the above conclusions could be derived using pumping lemme as well. Correct answer would be (A) Both I and IV.   This solution is contributed by vineet purswani.
 Question 82
Let L be a regular language. Consider the constructions on L below: repeat (L) = {ww | w ∊ L} prefix (L) = {u | ∃v : uv ∊ L} suffix (L) = {v | ∃u uv ∊ L} half (L) = {u | ∃v : | v | = | u | and uv ∊ L} Which choice of L is best suited to support your answer above?
 A (a + b)* B {ϵ, a, ab, bab} C (ab)* D {anbn | n ≥ 0}
GATE IT 2006
Discuss it

Question 82 Explanation:
A counter example which proves all the conclusions of the last question in one go should have the following properties 1) L should be regular due to the demand of the question 2) L should be an infinite set of strings, otherwise half(L) would be regular 3) L should have more than one alphabets in its grammar, otherwise repeat(L) would be regular. i. (a + b) ∗ is perfect example to support the conclusions of last question. It is regular, has more than one alphabets and is an infinite set. ii. {#, a, ab, bab} is a finite set, hence wrong. iii. (ab) ∗ is equivalent to c ∗ , which is one alphabet language, hence wrong. iv. {a n b n |n ≥ 0} is not even a regular language, hence wrong. This solution is contributed by vineet purswani.
 Question 83
A software project has four phases P1, P2, P3 and P4. Of these phases, P1 Is the first one and needs to be completed before any other phase can commence. Phases P2 and P3 can be executed in parallel. Phase P4 cannot commence until both P2 and P3 are completed. The optimistic, most likely, and pessimistic estimates of the phase completion times in days, for Pl, P2, P3 and P4 are, respectively, (11, 15, 25), (7, 8, 15), (8, 9, 22), and (3, 8, 19).
The critical path for the above project and the slack of P2 are, respectively,
 A P1-P2-P4, 1 day B P1-P3-P4, 1 day C P1-P3-P4, 2 days D P1-P2-P4, 2 days
GATE IT 2006
Discuss it

 Question 84
A software project has four phases P1, P2, P3 and P4. Of these phases, P1 Is the first one and needs to be completed before any other phase can commence. Phases P2 and P3 can be executed in parallel. Phase P4 cannot commence until both P2 and P3 are completed. The optimistic, most likely, and pessimistic estimates of the phase completion times in days, for Pl, P2, P3 and P4 are, respectively, (11, 15, 25), (7, 8, 15), (8, 9, 22), and (3, 8, 19).
The costs (in Rupees per day) of crashing the expected phase completion times for the four phases, respectively, are 100, 2000, 50, and 1000. Assume that the expected phase completion times of the phases cannot be crashed below their respective most likely completion times. The minimum and the maximum amounts (in Rupees) that can be spent on crashing so that ALL paths are critical are, respectively.
 A 100 and 1000 B 100 and 1200 C 150 and 1200 D 200 and 2000
GATE IT 2006
Discuss it

Question 84 Explanation:
 Question 85
Consider a database with three relation instances shown below. The primary keys for the Drivers and Cars relation are did and cid respectively and the records are stored in ascending order of these primary keys as given in the tables. No indexing is available in the database. What is the output of the following SQL query?
 A Karthikeyan, Boris B Sachin, Salman C Karthikeyan, Boris, Sachin D Schumacher, Senna
GATE IT 2006
Discuss it

Question 85 Explanation:
The sub-query always executes before the execution of the main query. Subqueries are completed first.The result of the subquery is used as input for the outer query. from the first inner query: select R.did from Cars C, Reserves R where R.cid = C.cid and C.colour = 'red'. C.color = "Red", corresonding C.cid={102,104}. R.cid=C.cid so there are five rows extracted to this where condition. R.did = {22, 22, 31,31, 64} from the second inner query: select R.did from Cars C, Reserves R where R.cid = C.cid and C.colour = 'green' C.color = "Green", corresponding C.cid={103} R.cid=C.cid so there are three rows extracted to this where condition. R.did = {22, 31, 74} Finally, the outer query selects driver names whose did = {22,31} which corresponds to Karthikeyan and Boris. so the correct option is A.   This solution is contributed by Nitika Bansal.
 Question 86
Consider a database with three relation instances shown below. The primary keys for the Drivers and Cars relation are did and cid respectively and the records are stored in ascending order of these primary keys as given in the tables. No indexing is available in the database. Let n be the number of comparisons performed when the above SQL query is optimally executed. If linear search is used to locate a tuple in a relation using primary key, then n lies in the range
 A 36 - 40 B 44 - 48 C 60 - 64 D 100 - 104
GATE IT 2006
Discuss it

Question 86 Explanation:
here we have to calculate the number of comparisons performed when the above SQL query is optimally executed. from the first inner query: select R.did from Cars C, Reserves R where R.cid = C.cid and C.colour = 'red' C.color = "Red", comparisons=4 (Cars has four rows) R.cid=C.cid so there are five rows extracted to this where condition. comparisons=(2 red cars * 10 Reserves rows)=20 from the second inner query: select R.did from Cars C, Reserves R where R.cid = C.cid and C.colour = 'green' C.color = "Green", comparisons=4 (Cars has four rows) R.cid=C.cid so there are three rows extracted to this where condition. comparisons=(1 green car*10 Reserves rows)=10 R.did = {22, 22, 31,31, 64} for first inner query R.did = {22, 31, 74} for second inner query Here unique sets are, R.did={22,31,64} and R.did={22,31,74} respectively for first and second inner queries. so for intersection, 6 comparisons (for 22, we hit on the first try and for 31,we hit on the second try,and for 74,we hit on all three try, so comaprisons=1+2+3) Finally we have to locate the did - 22 and did 31 from the driver table and did is the primary key. As told in the question, we use linear search and for 22, we hit on the first try and for 31 we hit on the third try. So, 1 + 3 = 4 comparisons. so total no of comparisons= 4+20+4+10+6+4=48 therefore B is the answer. In short: So, first get 2 red cars by scanning 4 tuples of the cars relation. Now, for each of the two 'red' cars, we scan all the 10 tuples of the 'Reserves' relation and thus we get 2*10 + 4 = 24 comparisons.Similarly for the 'green' car we get 4+10 = 14 comparisons. This solution is contributed by Nitika Bansal.
There are 86 questions to complete.

GATE CS Corner

See Placement Course for placement preparation, GATE Corner for GATE CS Preparation and Quiz Corner for all Quizzes on GeeksQuiz.