Deck 3: Computational Theory : Grammar, Language, and Complexity
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/25
Play
Full screen (f)
Deck 3: Computational Theory : Grammar, Language, and Complexity
1
Let SHAM3 be the problem of finding a Hamiltonian cycle in a graph G =(V,E)with
divisible by 3 and DHAM3 be the problem of determining if a Hamiltonian cycle exists in such graphs. Which one of the following is true?
A)Both DHAM3 and SHAM3 are NP-hard
B)SHAM3 is NP-hard, but DHAM3 is not
C)DHAM3 is NP-hard, but SHAM3 is not
D)Neither DHAM3 nor SHAM3 is NP-hard

A)Both DHAM3 and SHAM3 are NP-hard
B)SHAM3 is NP-hard, but DHAM3 is not
C)DHAM3 is NP-hard, but SHAM3 is not
D)Neither DHAM3 nor SHAM3 is NP-hard
Both DHAM3 and SHAM3 are NP-hard
2
Consider the following statements about the context free grammar G = {S - >SS,S - >ab,S ->ba, S - ?}
I. G is ambiguous
II. G produces all strings with equal number of a's and b's
III. G can be accepted by a deterministic PDA.
Which combination below expresses all the true statements about G?
A)1 only
B)1 and 3
C)2 and 3
D)1,2 and 3
I. G is ambiguous
II. G produces all strings with equal number of a's and b's
III. G can be accepted by a deterministic PDA.
Which combination below expresses all the true statements about G?
A)1 only
B)1 and 3
C)2 and 3
D)1,2 and 3
1,2 and 3
3
Consider the regular language L =(111+11111)*. The minimum number of states in any DFA accepting this languages is:
A)3
B)5
C)8
D)9
A)3
B)5
C)8
D)9
9
4
Give a production grammar for the language L = {x/x ? (a,b)*, the number of a's in x is multiple of 3}.
A){S->bS,S->b,S->aA,S->bA,A->aB,B->bB,B->aS,S->a}
B){S->aS,S->bA,A->bB,B->bBa,B->bB}
C){S->aaS,S->bbA,A->bB,B->ba}
D)None of the above
A){S->bS,S->b,S->aA,S->bA,A->aB,B->bB,B->aS,S->a}
B){S->aS,S->bA,A->bB,B->bBa,B->bB}
C){S->aaS,S->bbA,A->bB,B->ba}
D)None of the above
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
5
The production Grammar is {S->aSbb,S->abb} is
A)type-3 grammar
B)type-2 grammar
C)type-1 grammar
D)type-0 grammar
A)type-3 grammar
B)type-2 grammar
C)type-1 grammar
D)type-0 grammar
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
6
Regular expression (x/y)(x/y) denotes the set
A){xy,xy}
B){xx,xy,yx,yy}
C){x,y}
D){x,y,xy}
A){xy,xy}
B){xx,xy,yx,yy}
C){x,y}
D){x,y,xy}
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
7
The regular expression have all strings in which any number of 0's is followed by any number of 1's followed by any number of 2's is :
A)(0+1+2)*
B)0*1*2*
C)0* + 1 + 2
D)(0+1)*2*
A)(0+1+2)*
B)0*1*2*
C)0* + 1 + 2
D)(0+1)*2*
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
8
Suppose that a problem A is known to have a polynomial-time verification algorithm. Which of the following statements can be deduced.
A)A is in NP.
B)A is in NP but not P
C)A is in both NP and P.
D)A is NP-complete.
A)A is in NP.
B)A is in NP but not P
C)A is in both NP and P.
D)A is NP-complete.
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
9
Which of the following assertions about Turing Machines is true? Blank symbol(s) may occur in the input. At any stage of a computation, there are only finitely many non-blank Symbols on the tape.
A)Assertions (a) and (b) are both true.
B)Neither (a) nor (b) is true.
C)Both False
D)None of above
A)Assertions (a) and (b) are both true.
B)Neither (a) nor (b) is true.
C)Both False
D)None of above
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
10
A PC not connected to a network is equivalent to
A)A Deterministic Finite-State Automaton,
B)A Turing Machine,
C)A Push-Down Automaton,
D)None of the above.
A)A Deterministic Finite-State Automaton,
B)A Turing Machine,
C)A Push-Down Automaton,
D)None of the above.
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
11
Recursively enumerable languages are not closed under:
A)Union
B)Intersection
C)Complementation
D)Concatenation
A)Union
B)Intersection
C)Complementation
D)Concatenation
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
12
Let L1 be a recursive language, and let L2 be a recursively enumerable but not a recursive language. Which one of the following is TRUE?
A)( L1)' is recursive and (L2)' is recursively enumerable
B)( L1)' is recursive and (L2)' is not recursively enumerable
C)( L1)' and (L2)' are recursively enumerable
D)( L1)' is recursively enumerable and (L2)' is recursive
A)( L1)' is recursive and (L2)' is recursively enumerable
B)( L1)' is recursive and (L2)' is not recursively enumerable
C)( L1)' and (L2)' are recursively enumerable
D)( L1)' is recursively enumerable and (L2)' is recursive
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
13
Let S be an NP-complete problem, Q and R be two other problems not known to be in NP. Q is polynomial-time reducible to S and S is polynomial-time reducible to R. Which one of the following statements is true?
A)R is NP-complete
B)R is NP-hard
C)Q is NP-complete
D)Q is NP-hard
A)R is NP-complete
B)R is NP-hard
C)Q is NP-complete
D)Q is NP-hard
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
14
For s ? (0+1)* let d(s) denote the decimal value of s(e.g.d(101)) = 5 Let L = {s ? (0+1)* d(s) mod 5=2 and d(s) mod 7 != 4} Which one of the following statements is true?
A)L is recursively enumerable, but not recursive
B)L is recursive, but not context-free
C)L is context-free, but not regular
D)L is regular
A)L is recursively enumerable, but not recursive
B)L is recursive, but not context-free
C)L is context-free, but not regular
D)L is regular
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
15
A FSM can be considered, having finite tape length without rewinding capability and unidirectional tape movement
A)Turing machine
B)Pushdown automata
C)Context free languages
D)Regular languages
A)Turing machine
B)Pushdown automata
C)Context free languages
D)Regular languages
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
16
Which of the following statement is true?
A)All languages can be generated by CFG
B)The number of symbols necessary to simulate a Turing Machine(TM) with m symbols and n states is mn.
C)Any regular languages have an equivalent CFG.
D)The class of CFG is not closed under union.
A)All languages can be generated by CFG
B)The number of symbols necessary to simulate a Turing Machine(TM) with m symbols and n states is mn.
C)Any regular languages have an equivalent CFG.
D)The class of CFG is not closed under union.
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
17
Recursively enumerable languages are not closed under
A)Complementation
B)Union
C)Intersection
D)None of the above
A)Complementation
B)Union
C)Intersection
D)None of the above
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
18
The following CFG is in
S ? Abb
B ? bAA
A ? a
B ? b
A)Chomsky normal form but not strong Chomsky normal form
B)Weak Chomsky normal form but not Chomsky normal form
C)Strong Chomsky normal form
D)Greibach normal form
S ? Abb
B ? bAA
A ? a
B ? b
A)Chomsky normal form but not strong Chomsky normal form
B)Weak Chomsky normal form but not Chomsky normal form
C)Strong Chomsky normal form
D)Greibach normal form
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
19
The languages -------------- are the examples of non regular languages.
A)PALINDROME and PRIME
B)PALINDROME and EVEN-EVEN
C)EVEN-EVEN and PRIME
D)FACTORIAL and SQURE
A)PALINDROME and PRIME
B)PALINDROME and EVEN-EVEN
C)EVEN-EVEN and PRIME
D)FACTORIAL and SQURE
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
20
Let L be any infinite regular language, defined over an alphabet ? then there exist three strings x, y and z belonging to ? such that all the strings of the form XY^ n Z for n=1,2,3, … are the words in L called
A)Complement of L
B)Pumping Lemma
C)Kleene's theorem
D)None in given
A)Complement of L
B)Pumping Lemma
C)Kleene's theorem
D)None in given
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
21
Languages are proved to be regular or non regular using pumping lemma.
A)True
B)False
C)Not always true
D)can't say anything
A)True
B)False
C)Not always true
D)can't say anything
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
22
___________ states are called the halt states.
A)ACCEPT and REJECT
B)ACCEPT and READ
C)ACCEPT AND START
D)ACCEPT AND WRITE
A)ACCEPT and REJECT
B)ACCEPT and READ
C)ACCEPT AND START
D)ACCEPT AND WRITE
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
23
The part of an FA, where the input string is placed before it is run, is called _______
A)State
B)Transition
C)Input Tape
D)Output Tape
A)State
B)Transition
C)Input Tape
D)Output Tape
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
24
The PDA is called non-deterministic PDA when there are more than one out going edges from……… state
A)START or READ
B)POP or REJECT
C)READ or POP
D)PUSH or POP
A)START or READ
B)POP or REJECT
C)READ or POP
D)PUSH or POP
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
25
If an effectively solvable problem has answered in yes or no, then this solution is called
A)Decision procedure
B)Decision method
C)Decision problem
D)Decision making
A)Decision procedure
B)Decision method
C)Decision problem
D)Decision making
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck