# GATE-CS-2007

 Question 1
Consider the following two statements about the function f(x)=|x|
P. f(x) is continuous for all real values of x
Q. f(x) is differentiable for all real values of x 
Which of the following is TRUE?
 A P is true and Q is false. B P is false and Qis true. C Both P and Q are true D Both P and Q are false.
Numerical Methods and Calculus    GATE-CS-2007
Discuss it

Question 1 Explanation:
A function is continuous if for every value of 'x', we have a corresponding f(x). Here, for every x, we have f(x) which is actually the value of x itself, without the negative sign for x < 0.

But, the given function is not differentiable for x = 0 because for x < 0, the derivative is negative and for x > 0, the derivative is positive. So, the left hand derivative and right hand derivative do not match.

Hence, P is correct and Q is incorrect. Thus, A is the correct option.

Please comment below if you find anything wrong in the above post.
 Question 2
Let S be a set of nelements. The number of ordered pairs in the largest and the smallest equivalence relations on S are:
 A n and n B n2 and n C n2 and 0 D n and 1
Set Theory & Algebra    GATE-CS-2007
Discuss it

Question 2 Explanation:
Consider an example set, S = (1,2,3)

Equivalence property follows, reflexive, symmetric
and transitive

Largest ordered set are s x s =
{ (1,1) (1,2) (1,3) (2,1) (2,2) (2,3) (3,1) (3,2)
(3,3) } which are 9 which equal to 3^2 = n^2

Smallest ordered set are { (1,1) (2,2) ( 3,3)}
which are 3 and equals to n. number of elements.
 Question 3
What is the maximum number of different Boolean functions involving n Boolean variables?
 A n2 B 2n C 22n D 2n2
Combinatorics    GATE-CS-2007
Discuss it

Question 3 Explanation:
No of inputs sequences possible for a n variable Boolean function = 2n

Each input sequence can give either T or F as output ( 2 possible values )

So, Total no of Boolean functions are -

2X2X2X2X2X2X.............X2X2X2X2X2X2

<-------------------- 2n Times -------------->

22n

 Question 4
Let G be the non-planar graph with the minimum possible number of edges. Then G has
 A 9 edges and 5 vertices B 9 edges and 6 vertices C 10 edges and 5 vertices D 10 edges and 6 vertices
Graph Theory    GATE-CS-2007
Discuss it

Question 4 Explanation:
For a simple, connected, planar graph with v vertices and e edges, the following simple conditions hold: If v ≥ 3 then e ≤ 3v − 6; Note that the question is about non-planar graph G. Only option C doesn't follow above.   Alternate Explanation: We know that K5">K5K5 (which has 10 edges and 5 vertices) and K3,3">K3,3K3,3 (which has 9 edges and 6 vertices) are non-planar graphs. Since we are asked about minimum number of edges, answer should be k3,3">k3,3k3,3 i.e. option (B) is correct. Source: http://www.cse.iitd.ac.in/~mittal/gate/gate_math_2007.html
 Question 5
Consider the DAG with Consider V = {1, 2, 3, 4, 5, 6}, shown below. Which of the following is NOT a topological ordering?
 A 1 2 3 4 5 6 B 1 3 2 4 5 6 C 1 3 2 4 6 5 D 3 2 4 1 6 5
Graph Traversals    GATE-CS-2007
Discuss it

Question 5 Explanation:
In option D, 1 appears after 2 and 3 which is not possible in Topological Sorting. In the given DAG it is directly visible that there is an outgoing edge from vertex 1 to vertex 2 and 3 hence 2 and 3 cannot come before vertex 1 so clearly option D is incorrect topological sort. But for questions in which it is not directly visible we should know how to find topological sort of a DAG. This solution is contributed by Parul sharma.
 Question 6
Which of the following problems is undecidable? [2007]
 A Membership problem for CFGs B Ambiguity problem for CFGs. C Finiteness problem for FSAs. D Equivalence problem for FSAs.
Undecidability    GATE-CS-2007
Discuss it

Question 6 Explanation:

A set is closed under an operation means when we operate an element of that set with that operator we get an element from that set.
Here, CFG generates a CFL and set of all CFLs is the set. But ambiguity is not an operation and hence we can never say that CFG is closed under such operation.
Only ambiguity problem for CFGs are undecidable.

Thus, option (B) is correct.

Please comment below if you find anything wrong in the above post.
 Question 7
Which of the following is TRUE?
 A Every subset of a regular set is regular. B Every finite subset of a non-regular set is regular. C The union of two non-regular sets is not regular. D Infinite union of finite sets is regular.
Regular languages and finite automata    GATE-CS-2007
Discuss it

Question 7 Explanation:
Some points for Regular Sets:
• A set is always regular if it is finite.
• A set is always regular if a DFA/NFA can be drawn for it.
Option A: Every subset of a regular set is regular is False. For input alphabets a and b, a*b* is regular. A DFA can be drawn for a*b* but a n b n for n≥0 which is a subset of a*b* is not regular as we cannot define a DFA for it.
Option B: Every finite subset of a non-regular set is regular is True. Each and every set which is finite can have a well-defined DFA for it so whether it is a subset of a regular set or non-regular set it is always regular.
Option C: The union of two non-regular sets is not regular is False. For input alphabets a and b, an bn for all n≥0 is non-regular as well as an bm for n≠m is also non- regular but their union is a*b* which is regular.
Option D: TInfinite union of finite sets is regular is False. For input alphabets a and b sets {ab}, {aabb}, {aaabbb}…….. are regular but their union {ab} U {aabb} U {aaabbb} U …………………….. gives {a n b n for n>0} which is not regular.

This solution is contributed by Yashika Arora.
 Question 8
How many 3-to-8 line decoders with an enable input are needed to construct a 6-to-64 line decoder without using any other logic gates?
 A 7 B 8 C 9 D 10
Digital Logic & Number representation    GATE-CS-2007
Discuss it

Question 8 Explanation:
So total signals in=a, b, c, x, y, z  i.e. 6 And total output =8*8=64 hence required decoders (from fig.) = 9  so ans is ( C) part.
 Question 9
Consider the following Boolean function of four variables: f(w,x,y,z) = ∑(1,3,4,6,9,11,12,14) The function is:
 A independent of one variables. B independent of two variables. C independent of three variables. D dependent on all the variables.
Digital Logic & Number representation    GATE-CS-2007
Discuss it

Question 9 Explanation:
On solving K-MAP we get ZX’+XZ’ so  it is independent of w,y Ans (B) part.
 Question 10
Consider a 4-way set associative cache consisting of 128 lines with a line size of 64 words. The CPU generates a 20-bit address of a word in main memory. The number of bits in the TAG, LINE and WORD fields arerespectively:
 A 9,6,5 B 7, 7, 6 C 7, 5, 8 D 9, 5, 6
Computer Organization and Architecture    GATE-CS-2007
Discuss it

Question 10 Explanation:
Here the number of sets = 128/4 = 32 (as it is 4 say set associative)

We have total 64 words then we need 6 bits to identify the word

So the line offset is 5 bits and the word offset is 6 bits

and the TAG = 20-(5+6) =9 bits

so it should be 9,5,6
There are 85 questions to complete.