Deck 13: Modeling Computation
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
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
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/71
Play
Full screen (f)
Deck 13: Modeling Computation
1
Suppose a phrase-structure grammar has productions
of 011111.


2
Let G be the phrase-structure grammar with vocabulary V={A, B, 0,1, S} , terminal elements T={0,1} , start symbol S , productions 
from S ?
(1) 000 ,
(2) 11 ,
(3) 010 ,
(4) 0000 ,
(5) 0001
(6) 110 ,
(7) 0010 .

from S ?
(1) 000 ,
(2) 11 ,
(3) 010 ,
(4) 0000 ,
(5) 0001
(6) 110 ,
(7) 0010 .
(3),(7)
3
Suppose a phrase-structure grammar has productions
Find a derivation of 1000 .


4
Suppose a phrase-structure grammar has productions
Find a derivation of 0011 .

Unlock Deck
Unlock for access to all 71 flashcards in this deck.
Unlock Deck
k this deck
5
Suppose a phrase-structure grammar has productions
Find a derivation of 01

Unlock Deck
Unlock for access to all 71 flashcards in this deck.
Unlock Deck
k this deck
6
Suppose A = {0, 1}. Describe all strings belonging to A∗.
Unlock Deck
Unlock for access to all 71 flashcards in this deck.
Unlock Deck
k this deck
7
Find a set of two productions that produces 

Unlock Deck
Unlock for access to all 71 flashcards in this deck.
Unlock Deck
k this deck
8
Suppose V={S, A, a, b}, T={a, b} , and S is the start symbol. Find a set of productions that includes
and generates the language {a, b, ba, baa} .

Unlock Deck
Unlock for access to all 71 flashcards in this deck.
Unlock Deck
k this deck
9
Suppose a phrase-structure grammar has productions
Find a derivation of 0100 .

Unlock Deck
Unlock for access to all 71 flashcards in this deck.
Unlock Deck
k this deck
10
Suppose V={S, A, a, b}, T={a, b} , and S is the start symbol. Find a set of productions that includes
and
and generates the language {a, aa} .


Unlock Deck
Unlock for access to all 71 flashcards in this deck.
Unlock Deck
k this deck
11
Let G be the phrase-structure grammar with vocabulary V={A, B, a, b, S} , terminal element set T={a, b} , start symbol S , and production set 
derivable from S?
(1) ba ,
(2) ab ,
(3) baab,
(4) aababa,
(5) aba .

derivable from S?
(1) ba ,
(2) ab ,
(3) baab,
(4) aababa,
(5) aba .
Unlock Deck
Unlock for access to all 71 flashcards in this deck.
Unlock Deck
k this deck
12
Let G be the phrase-structure grammar with vocabulary V={A, B, a, b, S} , terminal element set T={a, b} , start symbol S , and production set 
derivable from ABa?
(1) ba ,
(2) abb ,
(3) aba ,
(4) b ,
(5) aababa.

derivable from ABa?
(1) ba ,
(2) abb ,
(3) aba ,
(4) b ,
(5) aababa.
Unlock Deck
Unlock for access to all 71 flashcards in this deck.
Unlock Deck
k this deck
13
The productions of a phrase-structure grammar are S → S1, S → 0A, A → 1
Find a derivation of 0111 .
Find a derivation of 0111 .
Unlock Deck
Unlock for access to all 71 flashcards in this deck.
Unlock Deck
k this deck
14
Suppose a phrase-structure grammar has productions 
Find a derivation of 110000 .

Find a derivation of 110000 .
Unlock Deck
Unlock for access to all 71 flashcards in this deck.
Unlock Deck
k this deck
15
Find a production of the form
such that
produces {00} .


Unlock Deck
Unlock for access to all 71 flashcards in this deck.
Unlock Deck
k this deck
16
Suppose a phrase-structure grammar has productions
Finf a derivation of 01 .

Unlock Deck
Unlock for access to all 71 flashcards in this deck.
Unlock Deck
k this deck
17
Let G be the phrase-structure grammar with vocabulary V={A, B, a, b, S} , terminal element set T={a, b} start symbol S , and production set 
derivable from A ?
(1) babaa,
(2) aab ,
(3) bba .

derivable from A ?
(1) babaa,
(2) aab ,
(3) bba .
Unlock Deck
Unlock for access to all 71 flashcards in this deck.
Unlock Deck
k this deck
18
Find a production of the form
such that
produces 



Unlock Deck
Unlock for access to all 71 flashcards in this deck.
Unlock Deck
k this deck
19
Suppose a phrase-structure grammar has productions
Find a derivation of 00 .

Unlock Deck
Unlock for access to all 71 flashcards in this deck.
Unlock Deck
k this deck
20
Suppose a phrase-structure grammar has productions 
Find a derivation of 010 .

Find a derivation of 010 .
Unlock Deck
Unlock for access to all 71 flashcards in this deck.
Unlock Deck
k this deck
21
What is the language generated by the grammar with productions S → SA, S → 0, A → 1A,and A → 1, where S is the start symbol?
Unlock Deck
Unlock for access to all 71 flashcards in this deck.
Unlock Deck
k this deck
22


Unlock Deck
Unlock for access to all 71 flashcards in this deck.
Unlock Deck
k this deck
23
Suppose that A={1,11,01} and B={0,10} . Find BA .
Unlock Deck
Unlock for access to all 71 flashcards in this deck.
Unlock Deck
k this deck
24

Unlock Deck
Unlock for access to all 71 flashcards in this deck.
Unlock Deck
k this deck
25

Unlock Deck
Unlock for access to all 71 flashcards in this deck.
Unlock Deck
k this deck
26
What is the output produced by this finite-state machine when the input string is 11101? 

Unlock Deck
Unlock for access to all 71 flashcards in this deck.
Unlock Deck
k this deck
27

Unlock Deck
Unlock for access to all 71 flashcards in this deck.
Unlock Deck
k this deck
28

Unlock Deck
Unlock for access to all 71 flashcards in this deck.
Unlock Deck
k this deck
29


Unlock Deck
Unlock for access to all 71 flashcards in this deck.
Unlock Deck
k this deck
30
Construct a finite-state machine with output that produces a 1 if and only if the last 3 input bits read are 0's.
Unlock Deck
Unlock for access to all 71 flashcards in this deck.
Unlock Deck
k this deck
31
In questions determine the output for
each input string, using this state table. 


Unlock Deck
Unlock for access to all 71 flashcards in this deck.
Unlock Deck
k this deck
32
Let A={1,10} . Which strings belong to A* ?
Unlock Deck
Unlock for access to all 71 flashcards in this deck.
Unlock Deck
k this deck
33
Construct a finite-state machine that models a vending machine accepting only quarters that gives a container
of orange juice when 50 cents has been deposited, followed by a button being pushed. (The possible inputs
are quarters and the button, and the possible outputs are nothing, orange juice, and a quarter. The machine
returns any extra quarters.)
of orange juice when 50 cents has been deposited, followed by a button being pushed. (The possible inputs
are quarters and the button, and the possible outputs are nothing, orange juice, and a quarter. The machine
returns any extra quarters.)
Unlock Deck
Unlock for access to all 71 flashcards in this deck.
Unlock Deck
k this deck
34
In questions determine the output for


Unlock Deck
Unlock for access to all 71 flashcards in this deck.
Unlock Deck
k this deck
35
What language is generated by the phrase-structure grammar if the productions are S → S11, S → λ, where S is the start symbol?
Unlock Deck
Unlock for access to all 71 flashcards in this deck.
Unlock Deck
k this deck
36

Unlock Deck
Unlock for access to all 71 flashcards in this deck.
Unlock Deck
k this deck
37

Unlock Deck
Unlock for access to all 71 flashcards in this deck.
Unlock Deck
k this deck
38
In questions determine the output for


Unlock Deck
Unlock for access to all 71 flashcards in this deck.
Unlock Deck
k this deck
39
Suppose that A={1,11,01} and B={0,10} . Find A B .
Unlock Deck
Unlock for access to all 71 flashcards in this deck.
Unlock Deck
k this deck
40
In questions determine the output for


Unlock Deck
Unlock for access to all 71 flashcards in this deck.
Unlock Deck
k this deck
41
Determine if 1101 belongs to the regular set
.

Unlock Deck
Unlock for access to all 71 flashcards in this deck.
Unlock Deck
k this deck
42
Construct a finite-state automaton that recognizes the set represented by the regular expression 10∗.
Unlock Deck
Unlock for access to all 71 flashcards in this deck.
Unlock Deck
k this deck
43
Find all strings recognized by this deterministic finite-state automaton. 

Unlock Deck
Unlock for access to all 71 flashcards in this deck.
Unlock Deck
k this deck
44
Determine if 1101 belongs to the regular set 

Unlock Deck
Unlock for access to all 71 flashcards in this deck.
Unlock Deck
k this deck
45
Find the Kleene closure of A = {00}.
Unlock Deck
Unlock for access to all 71 flashcards in this deck.
Unlock Deck
k this deck
46
Find the language recognized by this nondeterministic finite-state automaton. 

Unlock Deck
Unlock for access to all 71 flashcards in this deck.
Unlock Deck
k this deck
47
Which strings belong to the regular set represented by the regular expression 

Unlock Deck
Unlock for access to all 71 flashcards in this deck.
Unlock Deck
k this deck
48
Find the language recognized by this nondeterministic finite-state automaton. 

Unlock Deck
Unlock for access to all 71 flashcards in this deck.
Unlock Deck
k this deck
49
Let A={0,11} . Find A3 .
Unlock Deck
Unlock for access to all 71 flashcards in this deck.
Unlock Deck
k this deck
50
Find a deterministic finite-state automaton equivalent to the following nondeterministic finite-state machine. 

Unlock Deck
Unlock for access to all 71 flashcards in this deck.
Unlock Deck
k this deck
51
Find all strings recognized by this deterministic finite-state automaton. 

Unlock Deck
Unlock for access to all 71 flashcards in this deck.
Unlock Deck
k this deck
52
Which strings belong to the set represented by the regular expression 0∗ ∪ 11?
Unlock Deck
Unlock for access to all 71 flashcards in this deck.
Unlock Deck
k this deck
53
Determine if 1101 belongs to the regular set 1*0*1 .
Unlock Deck
Unlock for access to all 71 flashcards in this deck.
Unlock Deck
k this deck
54
Determine if 1101 belongs to the regular set
.

Unlock Deck
Unlock for access to all 71 flashcards in this deck.
Unlock Deck
k this deck
55
Find the Kleene closure of A = {0, 1, 2}.
Unlock Deck
Unlock for access to all 71 flashcards in this deck.
Unlock Deck
k this deck
56
Determine if 1101 belongs to the regular set
.

Unlock Deck
Unlock for access to all 71 flashcards in this deck.
Unlock Deck
k this deck
57
Construct a finite-state automaton that recognizes all strings that end with 11.
Unlock Deck
Unlock for access to all 71 flashcards in this deck.
Unlock Deck
k this deck
58
Let A={0,11} . Find A2
Unlock Deck
Unlock for access to all 71 flashcards in this deck.
Unlock Deck
k this deck
59
Determine if 1101 belongs to the regular set
.

Unlock Deck
Unlock for access to all 71 flashcards in this deck.
Unlock Deck
k this deck
60
Find the Kleene closure of A={1} .
Unlock Deck
Unlock for access to all 71 flashcards in this deck.
Unlock Deck
k this deck
61
For the following Turing machine T, find the final tape when T is run on the following tape, beginning in the
initial position (the first nonzero entry from the left):
initial position (the first nonzero entry from the left):

Unlock Deck
Unlock for access to all 71 flashcards in this deck.
Unlock Deck
k this deck
62
For the following Turing machines T, find the final tape when T is run on the following tape, beginning in the
initial position (the first nonzero entry from the left):
initial position (the first nonzero entry from the left):

Unlock Deck
Unlock for access to all 71 flashcards in this deck.
Unlock Deck
k this deck
63
Which strings are recognized by the following finite-state automaton? 

Unlock Deck
Unlock for access to all 71 flashcards in this deck.
Unlock Deck
k this deck
64
Consider the Turing machine 
For the following tape, determine the final tape when T halts, assuming that T begins in state s0 at the leftmost nonblank symbol.


For the following tape, determine the final tape when T halts, assuming that T begins in state s0 at the leftmost nonblank symbol.

Unlock Deck
Unlock for access to all 71 flashcards in this deck.
Unlock Deck
k this deck
65
Construct a Turing machine that computes
where 


Unlock Deck
Unlock for access to all 71 flashcards in this deck.
Unlock Deck
k this deck
66
Determine if 1101 belongs to the regular set
.

Unlock Deck
Unlock for access to all 71 flashcards in this deck.
Unlock Deck
k this deck
67
Construct a Turing machine that computes
where 


Unlock Deck
Unlock for access to all 71 flashcards in this deck.
Unlock Deck
k this deck
68


Unlock Deck
Unlock for access to all 71 flashcards in this deck.
Unlock Deck
k this deck
69
For the following Turing machine T, find the final tape when T is run on the following tape, beginning in the
initial position (the first nonzero entry from the left):
initial position (the first nonzero entry from the left):

Unlock Deck
Unlock for access to all 71 flashcards in this deck.
Unlock Deck
k this deck
70
For the following Turing machine T, find the final tape when T is run on the following tape, beginning in the
initial position (the first nonzero entry from the left):
initial position (the first nonzero entry from the left):

Unlock Deck
Unlock for access to all 71 flashcards in this deck.
Unlock Deck
k this deck
71
Consider the Turing machine 
For the following tape, determine the final tape when T halts, assuming that T begins in state s0 at the leftmost nonblank symbol.


For the following tape, determine the final tape when T halts, assuming that T begins in state s0 at the leftmost nonblank symbol.

Unlock Deck
Unlock for access to all 71 flashcards in this deck.
Unlock Deck
k this deck