{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

xxx_hw3sol - CSE 105 Introduction to the Theory of...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
CSE 105: Introduction to the Theory of Computation, Winter 2003 A. Hevia and J. Mao Solutions to Problem Set 3 March 7, 2003 Solutions to Problem Set 3 3.2 This concerns the Turing machine M 1 whose description and state diagram appears in Example 3 . 5 on the textbook. In each of the parts, give the sequence of conFgurations that M 2 enters when started on the indicated input string. a. 11 . q 1 11 ⇒ t q 3 1 ⇒ t 1 q 3 t ⇒ t 1 t q rej t . b. 1#1 . q 1 1#1 ⇒ t q 3 #1 ⇒ t # q 5 1 ⇒ t #1 q 5 t ⇒ t # q 7 1 ⇒ t q 7 #1 q 7 t #1 ⇒ t q 9 #1 t # q 11 1 ⇒ t q 12 #x q 12 t #x ⇒ t q 13 #x ⇒ t # q 14 x ⇒ t #x q 14 t ⇒ t #x t q acc t . c. 1#1 . q 1 1#1 ⇒ t q 3 #1 ⇒ t # q 5 #1 ⇒ t ## q rej 1 . d. 10#11 . q 1 10#11 ⇒ t q 3 0#11 ⇒ t 0 q 3 #11 ⇒ t 0# q 5 11 ⇒ t 0#1 q 5 1 ⇒ t 0#11 q 5 t ⇒ t 0#1 q 7 1 t 0# q 7 11 ⇒ t 0 q 7 #11 ⇒ t q 7 0#11 q 7 t 0#11 ⇒ t q 9 0#11 ⇒ t 0 q 9 #11 ⇒ t 0# q 11 11 t 0 q 12 #x1 ⇒ t q 12 0#x1 q 12 t 0#x1 ⇒ t q 13 0#x1 ⇒ t x q 8 #x1 ⇒ t x# q 10 x1 ⇒ t x#x q 10 1 t x#x1 q rej . e. 10#10 . q 1 10#10 ⇒ t q 3 0#10 ⇒ t 0 q 3 #10 ⇒ t 0# q 5 10 ⇒ t 0#1 q 5 0 ⇒ t 0#10 q 5 t ⇒ t 0#1 q 7 0 t 0# q 7 10 ⇒ t 0 q 7 #10 ⇒ t q 7 0#10 q 7 t 0#10 ⇒ t q 9 0#10 ⇒ t 0 q 9 #10 ⇒ t 0# q 11 10 t 0 q 12 #x0 ⇒ t q 12 0#x0 q 12 t 0#x0 ⇒ t q 13 0#x0 ⇒ t x q 8 #x0 ⇒ t x# q 10 x0 ⇒ t x#x q 10 0 t x# q 12 xx ⇒ t x q 12 #xx ⇒ t q 12 x#xx q 12 t x#xx ⇒ t q 13 x#xx ⇒ t x q 13 #xx ⇒ t x# q 14 xx t x#x q 14 x ⇒ t x#xx q 14 ⇒ t x#xx t q acc t . 3.5 This exercise tests your detail understanding of the formal deFnition of a Turing machine as given in Def. 3.1 on page 128-129 of the textbook. This was also covered in last week’s discussion section. a) Can a Turing machine ever write the blank symbol t on its tape? Yes. The Turing machine can write any symbol from the tape alphabet Γ to the tape and the blank symbol t is mandated to be part of the tape alphabet Γ. b) Can the tape alphabet Γ be the same as the input alphabet Σ? No. The tape alphabet Γ always contains the blank symbol t , while the input alphabet Σ cannot contain this symbol. If the blank symbol were part of the input alphabet, the Turing machine would never know when the input actually ends. c) Can a Turing machine’s head ever be in the same location in two successive steps? Yes. But the only situation this can happen is when the Turing machine is on the Frst tape square and it tries to move left. It will stay in place instead of falling o± the tape. However, 1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
CSE 105, Solutions to Problem Set 3 2 if it is not on the leftmost square, then in the next move the tape head cannot remain in the same location. d) Can a Turing machine contain just a single state? No. A Turing machine must contain at least two states: an accept state and a reject state. Because being in either of these states halts the computation, a diFerent start state would be necessary in order for the TM to read any input whatsoever.
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 10

xxx_hw3sol - CSE 105 Introduction to the Theory of...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon bookmark
Ask a homework question - tutors are online