Exam 13: A: Modeling Computation

arrow
  • Select Tags
search iconSearch Question
  • Select Tags

Construct a Turing machine that computes f(n1,n2)=n2+1, where n1,n2≥0f \left( n _ { 1 } , n _ { 2 } \right) = n _ { 2 } + 1 , \text { where } n _ { 1 } , n _ { 2 } \geq 0

Free
(Short Answer)
4.9/5
(81)
Correct Answer:
Verified

(s0,1,s1,B,R),(s1,1,s1,B,R),(s1,∗,s2,1,R)\left( s _ { 0 } , 1 , s _ { 1 } , B , R \right) , \left( s _ { 1 } , 1 , s _ { 1 } , B , R \right) , \left( s _ { 1 } , * , s _ { 2 } , 1 , R \right)

Suppose a phrase-structure grammar has productions S → S11, S → 0A, S → A1, A → 0. Find a derivation of 01.

Free
(Short Answer)
4.8/5
(79)
Correct Answer:
Verified

S⇒A1⇒01S \Rightarrow A 1 \Rightarrow 01

Find a grammar for the set {02n1n∣n≥0}\left\{ 0 ^ { 2 n } 1 ^ { n } \mid n \geq 0 \right\}

Free
(Essay)
4.9/5
(74)
Correct Answer:
Verified

Use the grammar with productions S→00S1S \rightarrow 00 S 1 and S→λS \rightarrow \lambda , where S is the start symbol.

Suppose a phrase-structure grammar has productions S → 1S0, S → 0A, A → 0. Find a derivation of 00.

(Short Answer)
4.8/5
(86)

Construct a finite-state automaton that recognizes all strings that end with 11.

(Essay)
4.9/5
(78)

Find the Kleene closure of A={0,1,2} .

(Short Answer)
4.9/5
(85)

What language is generated by the phrase-structure grammar if the productions are S→S11,S→λS \rightarrow S 11 , S \rightarrow \lambda where SS is the start symbol?

(Essay)
4.9/5
(73)

Suppose a phrase-structure grammar has productions S → S11, S → 0A, S → A1, A → 0. Find a derivation of 0011.

(Short Answer)
4.9/5
(85)

Suppose A = {0, 1}. Describe all strings belonging to A∗.

(Essay)
4.7/5
(77)

Determine if 1101 belongs to the regular set 1(10)*1*.

(Short Answer)
4.8/5
(77)

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): \@cdots 0 0 0 1 0 \@cdots ,0,,0,R , ,1,,0,R , ,0,,1,R , ,1,,1,L , ,B,,1,L

(Short Answer)
4.9/5
(88)

let V={S,A,B,0,1} and T={0,1}. For each set of productions determine whether the V = \{ S , A , B , 0,1 \} \text { and } T = \{ 0,1 \} \text {. For each set of productions determine whether the } resulting grammar G is (i) type 0 grammar, but not type 1 , (ii) type 1 grammar, but not type 2 , (iii) type 2 grammar, but not type 3 , (iv) type 3 grammar. - S→B,A→B,B→AS \rightarrow B , A \rightarrow B , B \rightarrow A

(Short Answer)
4.8/5
(77)

Find a production of the form "A → ____" such that S → 1S , S → 0A, A → ____ produces {1n00 | n ≥ 0}.

(Short Answer)
4.8/5
(75)

Suppose a phrase-structure grammar has productions S → 1S0, S → 0A, A → 0. Find a derivation of

(Short Answer)
4.8/5
(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): \@cdots 0 0 0 1 0 \@cdots ,0,,0,R , ,B,,1,R , ,0,,1,R , ,0,,1,L , ,1,,1,R

(Short Answer)
4.8/5
(82)

Determine if 1101 belongs to the regular set (11)*0*(11)*.

(Short Answer)
4.9/5
(84)

Find the set recognized by this deterministic finite-state machine. Find the set recognized by this deterministic finite-state machine.

(Short Answer)
4.9/5
(68)

What is the language generated by the grammar with productions S→SA,S→0,A→1AS \rightarrow S A , S \rightarrow 0 , A \rightarrow 1 A , and A→1A \rightarrow 1 , where S is the start symbol?

(Essay)
4.9/5
(73)

Which strings belong to the regular set represented by the regular expression (1∗01∗0) ?

(Short Answer)
4.8/5
(66)

Consider the Turing machine T : (s0,0,s1,1,R),(s0,1,s1,1,R),(s1,0,s0,1,L),(s1,1,s0,0,R),(s0,B,s1,1,R)\left( s _ { 0 } , 0 , s _ { 1 } , 1 , R \right) , \left( s _ { 0 } , 1 , s _ { 1 } , 1 , R \right) , \left( s _ { 1 } , 0 , s _ { 0 } , 1 , L \right) , \left( s _ { 1 } , 1 , s _ { 0 } , 0 , R \right) , \left( s _ { 0 } , B , s _ { 1 } , 1 , R \right)

(Short Answer)
4.8/5
(78)
Showing 1 - 20 of 67
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)