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,n20f \left( n _ { 1 } , n _ { 2 } \right) = n _ { 2 } + 1 , \text { where } n _ { 1 } , n _ { 2 } \geq 0

Free
(Short Answer)
4.9/5
(36)
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
(41)
Correct Answer:
Verified

SA101S \Rightarrow A 1 \Rightarrow 01

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

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

Use the grammar with productions S00S1S \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
(37)

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

(Essay)
4.9/5
(36)

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

(Short Answer)
4.9/5
(37)

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

(Essay)
4.9/5
(30)

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
(39)

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

(Essay)
4.8/5
(34)

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

(Short Answer)
4.8/5
(30)

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
(44)

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. - SB,AB,BAS \rightarrow B , A \rightarrow B , B \rightarrow A

(Short Answer)
4.8/5
(30)

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

(Short Answer)
4.8/5
(33)

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

(Short Answer)
4.9/5
(33)

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
(33)

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

(Short Answer)
4.8/5
(37)

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
(33)

What is the language generated by the grammar with productions SSA,S0,A1AS \rightarrow S A , S \rightarrow 0 , A \rightarrow 1 A , and A1A \rightarrow 1 , where S is the start symbol?

(Essay)
4.8/5
(27)

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

(Short Answer)
4.8/5
(28)

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
(29)
Showing 1 - 20 of 67
close modal

Filters

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