xxx_hw3sol

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

• Notes
• 10
• 100% (1) 1 out of 1 people found this document helpful

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

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 configurations 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 definition 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 first tape square and it tries to move left. It will stay in place instead of falling off the tape. However, 1

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

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 different start state would be necessary in order for the TM to read any input whatsoever.
This is the end of the preview. Sign up to access the rest of the document.
• Spring '09
• Ib
• Halting problem, Alan Turing, Random access machine

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern