GATE CS 2008

Last Updated : 02 Dec, 2021

Question 1
1
Tick
1
Cross
-1
Cross
INF
Cross
-INF


Question 1-Explanation: 
 \\lim_{x\\leftarrow \\infty } \\frac{x - sin(x)}{x + cos(x)} = \\lim_{x\\leftarrow 0} \\frac{1-\\frac{sin(x)}{x}}{1+\\frac{cos(x)}{x}} = \\frac{1-\\lim_{x\\leftarrow \\infty } \\frac{Sin(x)}{x} }{1+\\lim_{x\\leftarrow \\infty } \\frac{Cos(x)}{x} }= \\frac{1-0}{1+0} = 1
Question 2

If P, Q, R are subsets of the universal set U, then 

2

Cross

Qc U Rc
 

Cross

P U Qc U Rc
 

Cross

Pc U Qc U Rc
 

Tick

U
 



Question 2-Explanation: 

The given set theory expression can be converted into an equivalent boolean algebra expression as follows:

=p.q.r + p'.q.r + q'+r'
=qr(p+p')+q'+r'
=qr+q'+r'
=(q+q') . (r+q') +r'
=r+r'+q'
=1+q'
=1
=U

Option (D) is correct

Question 3

The following system of equations 

 


has a unique solution. The only possible value(s) for α is/are
 

Cross

either 0 or 1
 

Cross

any real number 
 

Cross

0
 

Tick

any real number other than 5
 



Question 3-Explanation: 

Augment the given matrix as
1 1 2 | 1
1 2 3 | 2
1 4 a | 4
Apply R2 <- R2 - R1 and R3 <- R3 - R1
1 1 2 | 1
0 1 1 | 1
0 3 a-2 | 3
Apply R3 <- R3 - 3R2
1 1 2 | 1
0 1 1 | 1
0 0 a-5 | 0
So for the system of equations to have a unique solution,
a - 5 != 0
or
a != 5
or
a = R - {5} 

Question 4
In the IEEE floating point representation, the hexadecimal value 0 × 00000000 corresponds to
Cross
the normalized value 2-127 
Cross
the normalized value 2-126
Cross
the normalized value +0 
Tick
the special value +0 


Question 4-Explanation: 

 \\frac{Exponent}{All \\hspace{0.1cm} Zero} \\frac{Fraction}{All \\hspace{0.1cm} Zero} \\frac{Number}{Positive  \\hspace{0.1cm} or\\hspace{0.1cm} negative \\hspace{0.1cm}zero}
Question 5

In the Karnaugh map shown below, X denotes a don't care term. What is the minimal form of the function represented by the Karnaugh map?


A)   


B) 

C) 

D)  
Tick

A

Cross

B

Cross

C

Cross

D



Question 5-Explanation: 

107
\"107\" One group consists of (0000, 0010, 1000, 1010) which gives b’d’ Other group is (0000, 0001, 1000, 1001) which gives a’d’ So, solution is b’d’ + a’d’

Question 6
Let r denote number system radix. The only value(s) of r that satisfy the equation 12
Cross
decimal 10
Cross
decimal 11
Cross
decimal 10 and 11
Tick
any value > 2


Question 6-Explanation: 
As we can see 121 contains digit ‘2’ which can’t be represented directly in base ‘2’ (as digits should be less than base) so number system must have   “r>2”. Ans (D) part.
Question 7
Given f1, f3 and f in canonical sum of products form (in decimal) for the circuit 14 15
A) sigma_Em(4, 6)

B) sigma_Em(4, 8)

C) sigma_Em(6, 8)

D) sigma_Em(4, 6, 8)
Cross
A
Cross
B
Tick
C
Cross
D


Question 7-Explanation: 
From logic diagram  we have f=f1.f2+f3 f=m(4,5,6,7,8).f2+m(1,6,15)----(1) from eq(1) we need to find such f2 so that we can get  f=m(1,6,8,15) eq(1)  says we can get m(1,6,15) from f3 ,so only  8 left now from option (a,b,d) we get (4,6), (4,8) ,(4,6,8) respectively for m(4,5,6,7,8)f2 which is not required as m4 is undesired. But option (C) m(4,5,6,7,8)(6,8)+(1,6,15)
  • m(6,8)+m(1,6,15)
  • m(1,6,8,15)an
Option (C) is correct.
Question 8
Which of the following is true for the language 16
Cross
It is not accepted by a Turing Machine
Cross
It is regular but not context-free
Cross
It is context-free but not regular
Tick
It is neither regular nor context-free, but accepted by a Turing machine


Question 8-Explanation: 
Turing machine can be designed for ap using the concept of ‘Sieve of Eratosthenes’.
 
Suppose we are given an integer ‘n’ and we want to find out all the prime numbers less than or equal to ‘n’. We repeat the following steps : We find the smallest number in the list, declare it prime and eliminate all the multiples of that number from the list. We keep doing this until each element has been declared prime or eliminated from the list.
 
Now, if p = 0 or p = 1, we reject the input. Else, we replace the first and the last ‘a’ with symbol $.
 
In the above steps, what we do is we find the first non-black symbol from the left. Let this symbol occur at position ‘x’. Suppose ‘x’ is a prime number. If this non-blank symbol is $, input string will be accepted. But, if the symbol is ‘a’, we mark it as a* and replace all the multiples of ‘x’ with the symbol ‘blank’. If at the end, symbol $ is replaced with \'blank’, we reject the input string (because p will be multiple of some ‘x’ in that case). Else, we go back and repeat the steps.
 
Thus, the input is neither regular nor context-free, but is accepted by a Turing machine.
 
Please comment below if you find anything wrong in the above post.
Question 9
Which of the following are decidable?
I. Whether the intersection of two regular languages is infinite
II. Whether a given context-free language is regular
III. Whether two push-down automata accept the same language
IV. Whether a given grammar is context-free
Cross
I and II
Tick
I and IV
Cross
II and III
Cross
II and IV


Question 9-Explanation: 
(A) Intersection of two regular languages is regular and checking if a regular language is infinite is decidable. (B) Deciding regularity of a context free language is undecidable. We check if L(CFG) contains any string with length between n and 2n−1 , where n is the pumping lemma constant. If so, L(CFG) is infinite otherwise it is finite. (C) Equality problem is undecidable for all languages except in case of finite automata i.e. for regular languages. (D) We have to check if the grammar obeys the rules of CFG. If, it obeys such rules then it is decidable.  Thus, option (B) is correct. Please comment below if you find anything wrong in the above post.
Question 10
Which of the following describes a handle (as applicable to LR-parsing) appropriately?
Cross
It is the position in a sentential form where the next shift or reduce operation will occur
Cross
It is non-terminal whose production will be used for reduction in the next step
Cross
It is a production that may be used for reduction in a future step along with a position in the sentential form where the next shift or reduce operation will occur
Tick
It is the production p that will be used for reduction in the next step along with a position in the sentential form where the right hand side of the production may be found


Question 10-Explanation: 
Let\'s first understand the terminology used here. LR Parsing - Here \'L\' stands for Left to Right screening of input string, and \'R\' stands for Right Most Derivation in Reverse ( because it is about bottom-up parsing). Sentential Form - Suppose For a given Context Free Grammar G, we have a start symbol S, then to define Language generated by Grammar G, i.e. L(G), we start the derivation starting from S using the production rules of the grammar. After one complete derivation we get a string w which consists of only terminal symbols, i.e. w belongs to L(G). Then we can say that w is a sentence of the Grammar G. Now, while the derivation process, if it gets some form q, where q may contain some Non-terminal then we say that q is a sentential form of the Grammar G. Even the start symbol S is also the sentential form of the Grammar G ( because it also contains Non-terminal S).

For Ex :

Grammar is :

S-> aAcBe

A->Ab|b

B->d

Input string : abbcde

Derivation : ( Top-Down, Right Most Derivation)

S->aAcBe
->aAcde
->aAbcde
->abbcde 
Here { abbcde } is the sentence of the Grammar( because it contains only terminal symbols), and { S, aAcBe, aAcde, aAbcde } are the sentential forms of the G ( because these forms contain non-terminals during the derivation process ) Now, let\'s look at the question. The question is related to LR parsing which is a bottom-up parsing. Let\'s take the same grammar above, as it is a bottom up parsing we need to start from the string \"abbcde\" and try to get S using production rules.

: abbcde

->aAbcde ( using A-> b )

->aAcde ( using A-> Ab )

->aAcBe ( using B -> d )

->S ( using S-> aAcBe ) 
The above process is called reduction. The RHS of the Production which is being replaced by their LHS is called Handle, So , { b, Ab, d, aAcBe} are handles, and replacing it with its LHS is called Handle-Pruning. Hence option D suits best.
There are 85 questions to complete.

Share your thoughts in the comments

Similar Reads