[PDF] Solutions to Problem Set 4 Feb 23 2007 If. A





Previous PDF Next PDF



CS 373: Theory of Computation

decidable (or simply decidable) if there exists a TM M which decides L. • Every finite language is decidable: For example by a TM that has all the strings in ...



BBM401-Lecture 7: Decidable Languages and the Halting Problem

Every finite language is decidable: For e.g. by a TM that has all the Proof. If Atm is recognizable



A note on algebras of languages A note on algebras of languages

study some immunity properties: for instance we prove that for every coinfinite decidable language L there exists a decidable language L′ such that L ⊆ L′ L′ 



CSE 135: Introduction to Theory of Computation Decidability and

▷ Every finite language is decidable. Page 10. Decidable and Recognizable Languages. Recall: Definition. A Turing machine M is said to recognize a language L 



CSE 6321 - Solutions to Problem Set 1

Show that the collection of decidable languages is closed under the following operations. 1. complementation. Solution: Proof. Let L be a decidable language and 



Adriana Palacio - University of California San Diego Instructor

Jul 29 2004 Since all finite languages are regular



Practice Problems for Final Exam: Solutions CS 341: Foundations of

In each part below if you need to prove that the given language L is decidable



Lecture 33: Reductions and Undecidability SD & Turing Enumerable

• Can only happen if L is finite. • But all finite languages are decidable. • Fixes proof. • But not decidable whether L is finite!! Undecidable Problems. The 



Decidability

If any generate w accept





CS 373: Theory of Computation

Every finite language is decidable: For example by a TM that has all the Proposition 2. If L and L are recognizable



Solutions to Problem Set 4

23 févr. 2007 these machines only recognize regular languages). ... A is finite it is decidable because all finite languages are decidable (just hardwire ...



Practice Problems for Final Exam: Solutions CS 341: Foundations of

In each part below if you need to prove that the given language L is decidable



BBM401-Lecture 7: Decidable Languages and the Halting Problem

Every finite language is decidable: For e.g. by a TM that has Proposition. If L and L are recognizable



CMPE 350 - Spring 2018

26 avr. 2018 Prove or disprove: “The class of non-context-free languages is closed under com- ... decidable because all finite languages are decidable.



Languages and Finite Automata

Every decidable language is Turing-Acceptable a finite language? ... If a language is decidable then its complement is decidable too. L. L. Proof:.



Undecidability - Lecture in INF4130

18 oct. 2018 Theorem. Any finite language is decidable. Proof. If A is a finite language a decider MD for A can be constructed by hard-coding all.



Co-finiteness of VASS coverability languages

24 juil. 2019 and ?fin(A) to denote the set of all finite subsets of A. ... for VASS coverability languages is decidable. Proof. Consider finite sets of ...



CSE 6321 - Solutions to Problem Set 1

Show that the collection of decidable languages is closed under the following operations. 1. complementation. Solution: Proof. Let L be a decidable language and 



Equations over finite sets of words and equivalence problems in

a given regular language. L i.e. whether cr(.x)=t(.~) holds for all x in L

U.C. Berkeley - CS172: Automata, Computability and Complexity Solutions to Problem Set 4 Professor Luca Trevisan 2/23/2007Solutions to Problem Set 4

1. (Sipser, Problem 3.13) A Turing machine with stay put instead of left is similar to an ordinary

Turing machine, but the transition function has the form

δ:Q×T→Q×T× {R,S}

At each point the machine can move its head right or let it stay in the same position. Show that this Turing machine variant isnotequivalent to the usual version. (Hint:Show that these machines only recognize regular languages).[20 points] Solution:It is easy to see that we can simulate any DFA on a Turing machine with stay put instead of left. The only non-trivial modification is to add transitions from state inFto q acceptupon reading a blank, and from states outsideFtoqrejectupon reading a blank. Next, we start with a Turing machineM= (Q,Σ,Γ,δ,q0,qaccept,qreject) with stay put instead of left, and show how we can construct a DFA (Q?,Σ?,δ?,q?0,F) that recognizes the same language. The intuition here is thatMcannot move left and cannot read anything it has written on the tape as soon as it moves right, and therefore it has essentially only one-way access to its input, much like a DFA. First, we modifyMas follows; note that these changes do not affect the language it recognizes. •Add a new symbol so thatMnever writes blanks on the tape; instead,Mwrites the new symbol when it"s going to write blanks, and we extend the transition function so that upon reading this new symbol, it behaves as though it read a blank. •WhenMtransitions intoqrejectorqaccept, the reading head moves right (and never stays put). SetQ?=Q, Σ?= Σ,q?0=q0, and consider the transition function: ?(q,σ) =? ????q,ifq? {qaccept,qreject} q reject,ifMstarting at stateqand readingσkeeps staying put. q ?,whereq?is the state theMenters when it first moves right upon starting at stateqand readingσ. (forq?Qandσ?Σ). Observe that there are finitely many state-alphabet pairs,Meither ends up either staying put and looping, or eventually moves right, and thusδ?is well-defined. Finally, we defineFto be the set containingqacceptand all statesq?Q,q?=qaccept,qreject such thatMstarting atqand reading blanks, eventually entersqaccept.

2. (Sipser, Problem 3.18) Show that a language is decidable iff some enumerator enumerates the

language in lexicographic order.[15 points] Solution:IfAis decidable by some TMM, the enumerator operates by generating the strings in lexicographic order, testing each in turn for membership inAusingM, and printing the string if it is inA. 1 IfAis enumerable by some enumeratorEin lexicographic order, we consider two cases. If Ais finite, it is decidable because all finite languages are decidable (just hardwire each of the strings into theTM). IfAis infinite, a TMMthat decidesAoperates as follows. On receiving inputw,MrunsEto enumerate all strings inAin lexicographic order until some string lexicographically afterwappears. This must occur eventually becauseAis infinite. If whas appeared in the enumeration already, then accept; else reject. Note: It is necessary to consider the case whereAis finite separately because the enumerator may loop without producing additional output when it is enumerating a finite language. As a result, we end up showing that the language is decidable without using the enumerator for the language to construct a decider. This is a subtle, but essential point.

3. Say that stringxis aprefixof stringyif a stringzexists wherexz=y, and say thatxis a

proper prefixofyif in additionx?=y. A language isprefix-freeif it doesn"t contain a proper prefix of any of its members. Let

PrefixFree

REX={R|Ris a regular expression whereL(R) is prefix-free}

Show thatPrefixFreeREXis decidable.[15 points]

Solution:We construct a TM that decidesPrefixFreeREXas follows1. On inputR, reject ifR is not a valid regular expression. Otherwise, construct a DFADfor the languageL(R) (refer to chapter 1 of Sipser for the algorithm that constructs an equivalent NFA forL(R) fromR, and for the algorithm that converts an NFA to a DFA). By running a DFS starting fromq0, we can remove all states that are not reachable fromq0from the automaton. Finally, for each accept stateq, we run a DFS starting fromqand check if another accept state (not equal toq) is reachable fromq, or if there is a loop fromqto itself. If any such paths or loops are found, reject. Otherwise, accept. Note that it is first required to remove all the states (actually, just accepting states) not reachable fromq0as these states cannot lead to any string being in the language.

4. LetNon-Emptybe the following language

Non-Empty={< M >|Maccepts some string}.

Show thatNon-Emptyis Turing recognizable.[10 points] Solution:We simply proceed as in the construction of an enumerator from a Turing machine: simulateMon all strings of length at mostiforisteps, and keep increasingi. We accept if the computation ofMaccepts some string. IfL(M) is non-empty, we are certain that for someiour machine will halt and accept.1 Note thatPrefixFreeREXcan contain infinite languages. For instance, takeR= 0?1. 2quotesdbs_dbs22.pdfusesText_28
[PDF] all font types list

[PDF] all fonts family css

[PDF] all fonts name list

[PDF] all fonts supported in html

[PDF] all fonts that can be used in html

[PDF] all formula of solution chapter

[PDF] all formulas of chapter 2 chemistry class 11

[PDF] all formulas of chemical kinetics class 12

[PDF] all formulas of electrochemistry

[PDF] all formulas of electrochemistry class 12

[PDF] all formulas of solutions class 12 chemistry

[PDF] all formulas of statistics class 10th

[PDF] all formulas of statistics class 11

[PDF] all formulas of statistics class 11 economics

[PDF] all formulas of statistics class 11 maths