Time Left - 15:00 mins
TOC Rapid Quiz - 2 (App update required to attempt this test)
Attempt now to get your rank among 616 students!
Question 1
Consider the following grammar :
S → A / aAb / aC
A → aa / bb / B
B → ab / ba / A
C → c / cC
What is the grammar after eliminating all the unit productions ?
Question 2
Consider the following languages.
L1 = { an bn cm| m >= 0 and n >= 0 }
L2 = { am bncn| n >= 0 and m >= 0 }
L3 = L1 ∪ L2 = { anbncm∪ ambncn| n >= 0, m >= 0 }
How many of the above language L1, L2, L3 are context free language?
Question 3
Find the number of states in minimal DFA for language L which is subset of (a+b+c)* and which follows the following constraints :
* number of a's = 0 mod 2
* number of b's = 0 mod 5
* number of c's = 0 mod 7
Question 4
Consider the following problem X.
Given a Turing machine M over the input alphabet Σ, any state q of M
And a word w ∈Σ*, does the computation of M on w visit the state q?
Which of the following statements about X is correct?
Given a Turing machine M over the input alphabet Σ, any state q of M
And a word w ∈Σ*, does the computation of M on w visit the state q?
Which of the following statements about X is correct?
Question 5
Consider a problem Z, in it-
“Suppose there is a Turing Machine L over the input alphabet ∑ any state of L and a word s € ∑, does the computation of L on s visit the state q?
Choose the correct statement about Z?
“Suppose there is a Turing Machine L over the input alphabet ∑ any state of L and a word s € ∑, does the computation of L on s visit the state q?
Choose the correct statement about Z?
Question 6
Which of the following languages is regular?
1) L= { (bba(ba)n a(n-1) | n>0 ) }
2) L= { (an bn) | n<1000 ) }
3) L= { (an bk) | n is odd or k is even) }
4) L= { (wxwr | w,x ∈ ( 0+1)^ * ) }
1) L= { (bba(ba)n a(n-1) | n>0 ) }
2) L= { (an bn) | n<1000 ) }
3) L= { (an bk) | n is odd or k is even) }
4) L= { (wxwr | w,x ∈ ( 0+1)^ * ) }
- 616 attempts
- 0 upvotes
- 1 comment
Nov 13GATE & PSU CS