Professional Documents
Culture Documents
Cs402 Latest Midterm Paper 1
Cs402 Latest Midterm Paper 1
If an alphabet has n number of letter, then number of strings of length m will be n+m (n)(m) mn nm Question No: 2 ( Marks: 1 ) - Please choose one
Languages generated by kleene star are always ______________. Finite Infinite Sometimes finite & sometimes infinite None of the these Question No: 3 ( Marks: 1 ) - Please choose one
1*(1 + ) = 1* this statement is True False Sometimes true & sometimes false None of these Question No: 4 ( Marks: 1 ) - Please choose one
True False Cant be assumed None of these Question No: 5 ( Marks: 1 ) - Please choose one
a,b
1
a,b
2+
Above given FA can be expressed as ________ (a + b)* a* + b* (ab + ba)* None of these Question No: 6
a,b
a a b
2+ 1
a,b
4+
5+
a,b
a,b
Finite Infinite Depends on alphabet None of these Question No: 7 ( Marks: 1 ) - Please choose one
If a language is expressed through TG, then that language will have its RE. True False Depends on language None of these Question No: 8 ( Marks: 1 ) - Please choose one
In TG there may exist more than one path for certain string. True False Depends on the language None of these Question No: 9 ( Marks: 1 ) - Please choose one
In TG there may exist no paths for certain string. True False Depends on the language
GTG can have _______________ final state. 0 1 More than 1 All of the given Question No: 11
a, b
x1-
x2
x3+
Above given diagram is an NFA. If we convert it into an FA using transition table, then new FA will be consisted on ______________ number of states. 6 5 4 3 Question No: 12
a,b b
+
Above given TG accepts the language in which all strings Ends in b Begins with b
a 1b
a,b 3 b 5+
Above given TG has _____________ RE. a(a + b)*b + b(a + b)*a b(b + a)*a + b(a + b)*a None of these a(a + b)*a + b(a + b)*b Question No: 14 ( Marks: 1 ) - Please choose one
Every FA should be __________ Deterministic Non- Deterministic Deterministic & Non- Deterministic None of these Question No: 15 If in an NFA, ( Marks: 1 ) - Please choose one
NFA with NFA with null string Either "NFA with null string" OR "NFA with Question No: 16
a, b
"
Above given structure is a ______________ FA NFA NFA - ^ None of the given options Question No: 17 ( Marks: 1 )
In transition diagram of an FA, how can we represent initail and final states? Question No: 18 ( Marks: 1 )
How can we say that two REs are equal? Question No: 19 ( Marks: 2 )
Can you accept the following statement? Or there is a condition to accept it? For every Mealy machine there is a Moore machine that is equivalent to it. Question No: 20 ( Marks: 3 )
Let S be all string of as and bs with odd length. What is S*? Question No: 21 ( Marks: 5 )
2 a 1b 3 a b 4+
Question No: 22
( Marks: 10 )
Give the recursive deflations for the following languages over the alphabet {a, b}: (i) The language EVENSTRING of all words of even length. (ii) The language ODDSTRING of all words of odd length.