SlideShare a Scribd company logo
1. Show that single-tape TMs that cannot write on the portion of the tape containing the
input string recognize only regular languages.
Answer: Let M = (Q, Σ, Γ, q0, qaccept, qreject) be a single-tape TM that cannot write on the
input portion of the tape. A typical case when M works on an input string x is as follows:
the tape head will stay in the input portion for some time, and then enter the non-input
portion (i.e., the portion of the tape on the right of the |x|th
cells) and stay there for some
time, then go back to the input portion, and stay there for some time, and then enter the
non-input portion, and so on. We call the event that the tape head switches from input
portion to non-input portion an out event, and the event that the tape head switches from
non-input portion to input-portion an in event.
Let firstx denote the state that M is in just after its first “out” event (i.e., the state of M
when it first enters the non-input portion). In case M never enters the non-input portion,
we assign firstx = qaccept if M accepts x, and assign firstx = qreject if M does not accept x.
Next, we define a characteristic function fx such that for any q ∈ Q, fx(q) = q implies that
if M is at state q and about to perform an “in” event, the next “out” event will change M
in state q ; in case M never enters the non-input portion again, we assign fx(q) = qaccept if
M enters the accept state inside the input portion, and qreject otherwise.
It is easy to check that if for two strings x and y, if firstx = firsty and for all q, fx(q) = fy(q),
we have x and y are indistinguishable by M. (That is, M accepts xz if and only if M
accepts yz.) As there are finite choices of firstx and fx (precisely, |Q||Q|+1
such choices),
the number of distinguishable strings are finite. By Myhill-Nerode theorem, the language
recognized by M is regular.
2. Let A be a Turing-recognizable language consisting of descriptions of Turing machines,
{ M1 , M2 , . . .}, where every Mi is a decider. Prove that some decidable language D is
not decided by any decider Mi whose description appears in A.†
(Hint: You may find it
helpful to consider an enumerator for A, and re-visit the diagonalization technique.)
Answer: Since A is Turing-recognizable, there exists an enumerator E that enumerates
it. In particular, we let Mi be the ith
output of E (note: Mi may not be distinct).
Let s1, s2, s3 . . . be the list of all possible strings in {0, 1}∗
. Now, we define a TM D as
follows:
D = “On input w:
1. If w /∈ {0, 1}∗
, reject.
2. Else, w is equal to si for a specific i.
3. Use E to enumerate M1 , M2 , . . . until Mi .
4. Run Mi on input w.
5. If Mi accepts, reject. Otherwise, accept.”
1
THEORY OF COMPUTATION
Our online Tutors are available 24*7 to provide Help with Theory Of Computation
Homework/Assignment or a long term Graduate/Undergraduate Theory Of Computation Project. Our
Tutors being experienced and proficient in Theory Of Computation sensure to provide high quality
Theory Of Computation Homework Help. Upload your Theory Of Computation Assignment at ‘Submit
Your Assignment’ button or email it to info@assignmentpedia.com. You can use our ‘Live Chat’ option to
schedule an Online Tutoring session with our Theory Of Computation Tutors.
Clearly, D is a decider (why??). However, D is different from any Mi (why??), so that D
is not in A.
3. Let E = { M | M is a DFA that accepts some string with more 1s than 0s}. Show that
E is decidable. (Hint: Theorems about CFLs are helpful here.)
Answer: Let A = {x | x has more 1s than 0s}. The language A is context-free, as we can
easily construct a PDA to recognize A. Now, we construct the TM M below to decide E
as follows:
M = “On input M where M is a DFA:
1. Construct B = A ∩ L(M). Note that B is CFL, since L(M) is regular and A is CFL.
2. Test whether B is empty.
3. If yes, reject. Otherwise, accept.
4. Let C be a language. Prove that C is Turing-recognizable if and only if a decidable language
D exists such that C = {x | ∃y( x, y ∈ D)}.
Answer: If D exists, we can construct a TM M such that we search each possible string
y, and testing whether x, y ∈ D. If such y exists, accept. Such a machine M will accept
any string in C in finite steps, so C is Turing-recognizable.
If C is recognized by some TM M, we define D = { x, y | M accepts x within |y| steps }.
Clearly, D is decidable. Also, x ∈ C if and only if there exists y such that x, y ∈ D.
Thus, C = {x | ∃y( x, y ∈ D)}.
5. (Bonus Question) Show that the problem of determining whether a CFG generates all
string in 1∗
is decidable. In other words, show that { G | G is a CFG over {0, 1} and 1∗
⊆
L(G)} is a decidable language.
Answer: Please discussed the solution with Yu-Han directly.
2visit us at www.assignmentpedia.com or email us at info@assignmentpedia.com or call us at +1 520 8371215

More Related Content

PPTX
PDF
Formal Languages and Automata Theory unit 4
PPTX
Unit v
PPTX
Improper integral
PDF
Unit ii
PDF
3-Move Undeniable Signature Scheme
PDF
Formal language & automata theory
PDF
How were the first error correcting codes constructed? A historical introduct...
Formal Languages and Automata Theory unit 4
Unit v
Improper integral
Unit ii
3-Move Undeniable Signature Scheme
Formal language & automata theory
How were the first error correcting codes constructed? A historical introduct...

What's hot (19)

PPTX
Thoery of Computaion and Chomsky's Classification
PPTX
linear codes and cyclic codes
PPT
Hamming codes
PPTX
Formal methods 1 - introduction
PPTX
Linear Block Codes
PDF
Problem set3 | Theory of Computation | Akash Anand | MTH 401A | IIT Kanpur
PDF
Benginning Calculus Lecture notes 2 - limits and continuity
PDF
Error Detection and Correction in SRAM Cell Using Decimal Matrix Code
PDF
Basics of coding theory
PPT
5 linear block codes
PPT
Ch10 2 v1
PPT
Cn lec-06
PDF
Theory of Computation Lecture Notes
PPTX
Chapter 10
PDF
NFA to DFA
PPT
Identitieslong
PPT
Section 2.4
PDF
Convolution
PDF
Kolmogorov Complexity, Art, and all that
Thoery of Computaion and Chomsky's Classification
linear codes and cyclic codes
Hamming codes
Formal methods 1 - introduction
Linear Block Codes
Problem set3 | Theory of Computation | Akash Anand | MTH 401A | IIT Kanpur
Benginning Calculus Lecture notes 2 - limits and continuity
Error Detection and Correction in SRAM Cell Using Decimal Matrix Code
Basics of coding theory
5 linear block codes
Ch10 2 v1
Cn lec-06
Theory of Computation Lecture Notes
Chapter 10
NFA to DFA
Identitieslong
Section 2.4
Convolution
Kolmogorov Complexity, Art, and all that
Ad

Viewers also liked (6)

PDF
Computer Graphics and Multimedia Techniques Paper (RTU VI Semester)
DOCX
Mis assignment
PDF
Theory of computation assignment help
DOC
MIS assignment for share
PDF
Cs6503 theory of computation november december 2015 be cse anna university q...
PDF
Cs2303 theory of computation all anna University question papers
Computer Graphics and Multimedia Techniques Paper (RTU VI Semester)
Mis assignment
Theory of computation assignment help
MIS assignment for share
Cs6503 theory of computation november december 2015 be cse anna university q...
Cs2303 theory of computation all anna University question papers
Ad

Similar to Theory of computation homework help (20)

PPT
Turing machine power point presentations
PDF
practice-final-soln.pdf
PPT
15hjhkllkhhkljbghgfyhgjkhjghfgjgjkghg336479.ppt
PPTX
Winter 9 Decidability.pptx
PPTX
chapter 2.pptx
PPT
Turing Machine
PPT
Finite automata
PPT
TuringMachines and its introduction for computer science studetns
PPT
FiniteAutomata-DFA and NFA from Theory of Computation.ppt
PDF
Theory of Computer Science - Post Correspondence Problem
PPT
TuringMachineS FOUNDATION OF DATA SCIENCE
PPT
THEORY OF COMPUTATION PROCESS AND MECHANISUMS
PPT
TuringMachineS FOUNDATION OF DATA SCIENCE
PPT
THEORY OF COMPUTATION PROCESS AND MECHANISUMS
PDF
PPT
FiniteAutomata (1).ppt
PPT
FiniteAutomata.ppt
PDF
Hwsoln03 toc
PDF
CS 162 Fall 2015 Homework 1 Problems September 29, 2015 Timothy Johnson 1. Ex...
PPTX
Winter 9 Tutorial Decidability.pptx
Turing machine power point presentations
practice-final-soln.pdf
15hjhkllkhhkljbghgfyhgjkhjghfgjgjkghg336479.ppt
Winter 9 Decidability.pptx
chapter 2.pptx
Turing Machine
Finite automata
TuringMachines and its introduction for computer science studetns
FiniteAutomata-DFA and NFA from Theory of Computation.ppt
Theory of Computer Science - Post Correspondence Problem
TuringMachineS FOUNDATION OF DATA SCIENCE
THEORY OF COMPUTATION PROCESS AND MECHANISUMS
TuringMachineS FOUNDATION OF DATA SCIENCE
THEORY OF COMPUTATION PROCESS AND MECHANISUMS
FiniteAutomata (1).ppt
FiniteAutomata.ppt
Hwsoln03 toc
CS 162 Fall 2015 Homework 1 Problems September 29, 2015 Timothy Johnson 1. Ex...
Winter 9 Tutorial Decidability.pptx

More from Assignmentpedia (20)

PDF
Transmitter side components
PDF
Single object range detection
PDF
Sequential radar tracking
PDF
Resolution project
PDF
Radar cross section project
PDF
Radar application project help
PDF
Parallel computing homework help
PDF
Network costing analysis
PDF
Matlab simulation project
PDF
Matlab programming project
PDF
Links design
PDF
Image processing project using matlab
PDF
Help with root locus homework1
PDF
Transmitter subsystem
PDF
Computer Networks Homework Help
PDF
Econometrics Homework Help
PDF
Video Codec
PDF
Radar Spectral Analysis
PDF
Pi Controller
PDF
Help With Digital Communication Project
Transmitter side components
Single object range detection
Sequential radar tracking
Resolution project
Radar cross section project
Radar application project help
Parallel computing homework help
Network costing analysis
Matlab simulation project
Matlab programming project
Links design
Image processing project using matlab
Help with root locus homework1
Transmitter subsystem
Computer Networks Homework Help
Econometrics Homework Help
Video Codec
Radar Spectral Analysis
Pi Controller
Help With Digital Communication Project

Recently uploaded (20)

PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
Big Data Technologies - Introduction.pptx
PPTX
MYSQL Presentation for SQL database connectivity
PDF
A comparative analysis of optical character recognition models for extracting...
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Machine learning based COVID-19 study performance prediction
PDF
Getting Started with Data Integration: FME Form 101
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Approach and Philosophy of On baking technology
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
Machine Learning_overview_presentation.pptx
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Accuracy of neural networks in brain wave diagnosis of schizophrenia
The Rise and Fall of 3GPP – Time for a Sabbatical?
Spectral efficient network and resource selection model in 5G networks
Network Security Unit 5.pdf for BCA BBA.
Unlocking AI with Model Context Protocol (MCP)
Advanced methodologies resolving dimensionality complications for autism neur...
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Big Data Technologies - Introduction.pptx
MYSQL Presentation for SQL database connectivity
A comparative analysis of optical character recognition models for extracting...
Diabetes mellitus diagnosis method based random forest with bat algorithm
Machine learning based COVID-19 study performance prediction
Getting Started with Data Integration: FME Form 101
gpt5_lecture_notes_comprehensive_20250812015547.pdf
Reach Out and Touch Someone: Haptics and Empathic Computing
Approach and Philosophy of On baking technology
“AI and Expert System Decision Support & Business Intelligence Systems”
Building Integrated photovoltaic BIPV_UPV.pdf
Machine Learning_overview_presentation.pptx
Dropbox Q2 2025 Financial Results & Investor Presentation
Accuracy of neural networks in brain wave diagnosis of schizophrenia

Theory of computation homework help

  • 1. 1. Show that single-tape TMs that cannot write on the portion of the tape containing the input string recognize only regular languages. Answer: Let M = (Q, Σ, Γ, q0, qaccept, qreject) be a single-tape TM that cannot write on the input portion of the tape. A typical case when M works on an input string x is as follows: the tape head will stay in the input portion for some time, and then enter the non-input portion (i.e., the portion of the tape on the right of the |x|th cells) and stay there for some time, then go back to the input portion, and stay there for some time, and then enter the non-input portion, and so on. We call the event that the tape head switches from input portion to non-input portion an out event, and the event that the tape head switches from non-input portion to input-portion an in event. Let firstx denote the state that M is in just after its first “out” event (i.e., the state of M when it first enters the non-input portion). In case M never enters the non-input portion, we assign firstx = qaccept if M accepts x, and assign firstx = qreject if M does not accept x. Next, we define a characteristic function fx such that for any q ∈ Q, fx(q) = q implies that if M is at state q and about to perform an “in” event, the next “out” event will change M in state q ; in case M never enters the non-input portion again, we assign fx(q) = qaccept if M enters the accept state inside the input portion, and qreject otherwise. It is easy to check that if for two strings x and y, if firstx = firsty and for all q, fx(q) = fy(q), we have x and y are indistinguishable by M. (That is, M accepts xz if and only if M accepts yz.) As there are finite choices of firstx and fx (precisely, |Q||Q|+1 such choices), the number of distinguishable strings are finite. By Myhill-Nerode theorem, the language recognized by M is regular. 2. Let A be a Turing-recognizable language consisting of descriptions of Turing machines, { M1 , M2 , . . .}, where every Mi is a decider. Prove that some decidable language D is not decided by any decider Mi whose description appears in A.† (Hint: You may find it helpful to consider an enumerator for A, and re-visit the diagonalization technique.) Answer: Since A is Turing-recognizable, there exists an enumerator E that enumerates it. In particular, we let Mi be the ith output of E (note: Mi may not be distinct). Let s1, s2, s3 . . . be the list of all possible strings in {0, 1}∗ . Now, we define a TM D as follows: D = “On input w: 1. If w /∈ {0, 1}∗ , reject. 2. Else, w is equal to si for a specific i. 3. Use E to enumerate M1 , M2 , . . . until Mi . 4. Run Mi on input w. 5. If Mi accepts, reject. Otherwise, accept.” 1 THEORY OF COMPUTATION Our online Tutors are available 24*7 to provide Help with Theory Of Computation Homework/Assignment or a long term Graduate/Undergraduate Theory Of Computation Project. Our Tutors being experienced and proficient in Theory Of Computation sensure to provide high quality Theory Of Computation Homework Help. Upload your Theory Of Computation Assignment at ‘Submit Your Assignment’ button or email it to [email protected]. You can use our ‘Live Chat’ option to schedule an Online Tutoring session with our Theory Of Computation Tutors.
  • 2. Clearly, D is a decider (why??). However, D is different from any Mi (why??), so that D is not in A. 3. Let E = { M | M is a DFA that accepts some string with more 1s than 0s}. Show that E is decidable. (Hint: Theorems about CFLs are helpful here.) Answer: Let A = {x | x has more 1s than 0s}. The language A is context-free, as we can easily construct a PDA to recognize A. Now, we construct the TM M below to decide E as follows: M = “On input M where M is a DFA: 1. Construct B = A ∩ L(M). Note that B is CFL, since L(M) is regular and A is CFL. 2. Test whether B is empty. 3. If yes, reject. Otherwise, accept. 4. Let C be a language. Prove that C is Turing-recognizable if and only if a decidable language D exists such that C = {x | ∃y( x, y ∈ D)}. Answer: If D exists, we can construct a TM M such that we search each possible string y, and testing whether x, y ∈ D. If such y exists, accept. Such a machine M will accept any string in C in finite steps, so C is Turing-recognizable. If C is recognized by some TM M, we define D = { x, y | M accepts x within |y| steps }. Clearly, D is decidable. Also, x ∈ C if and only if there exists y such that x, y ∈ D. Thus, C = {x | ∃y( x, y ∈ D)}. 5. (Bonus Question) Show that the problem of determining whether a CFG generates all string in 1∗ is decidable. In other words, show that { G | G is a CFG over {0, 1} and 1∗ ⊆ L(G)} is a decidable language. Answer: Please discussed the solution with Yu-Han directly. 2visit us at www.assignmentpedia.com or email us at [email protected] or call us at +1 520 8371215