Undecidability using rices theorem

Assignment Help Theory of Computation
Reference no: EM132896659

COMP 3722 Theory and Practice of Computing - Flinders University

1. Finite State Automata and Regular Languages

Use the construction given in the lecture handouts (and also in Theorem 1.45 of Sipser) to give the state diagram for a nondeterministic finite-state automaton that recognizes the union of the following two languages over the alphabet {0, 1}:

a. {w | every pair of 0's in w has at least one 1 between them}
b. {w | the symbol in every odd position of w is a 1}

2. Pumping Lemma ( answer either Part A or Part B)

Part A: Regular Languages (answer either this part or Part B)

Let Σ = {0, 1, +, = } and ADD = {x=y+z | x, y, z are binary integers, and x is the sum of y and z}.
For example, 110=101+1 is in ADD.
Use the pumping lemma for regular languages to show that ADD is not regular.

Hint: It may be helpful to choose s = 1p=0+1p.

Part B: Context-free Languages (answer either this part or Part A)

Let Σ = {1, 2, 3, 4} and C = {w ∈ Σ* | the number of 1s in w equals the number of 2s, and the number of 3s in w equals the number of 4s}.

For example, 14332124 is in C.
Use the pumping lemma for context-free languages to show that C is not context-free.

Hint: It may be helpful to choose s = 1p3p2p4p.

3. Decidability

A string s is a proper prefix of a string t if t starts with s but is not equal to s (i.e. t is equal to s followed by one or more additional symbols). A language is prefix-free if it does not contain any string that is a proper prefix of any other string in the language. Let PREFIX-FREEREX = {R | R is a regular expression where L(R) is prefix-free}.

Show that PREFIX-FREEREX is decidable.

You may use (without proof) the fact that regular languages are closed under the operations of
• Star
• Concatenation
• Union
• Intersection
• Complement

and that each of the following languages is decidable:
• ADFA = {<D, w> | D is a DFA and D accepts w}
• ANFA = {<N, w> | N is a NFA and N accepts w}
• APDA = {<P, w> | P is a PDA and P accepts w}
• AREX = {<R, w> | R is a regular expression and R generates w}
• EDFA = {<D> | D is a DFA and L(D) = Ø}
• EQDFA = {<D, E> | D and E are DFAs and L(D) = L(E)}
• ACFG = {<G, w> | A is a CFG and A generates w}
• ECFG = {<G, w> | E is a CFG and L(E) = Ø }
• any regular language
• any context-free language.

Hint: Given a particular regular expression R over the alphabet Σ, construct a regular expression R′ for: the language of all strings that consist of a string from L(R) followed by some additional symbols. The language L(R′) is the language of all strings that have some string from L(R) as a prefix. Consider what relationship should hold between L(R) and L(R′) in order for L(R) to be prefix-free.

4. Non-computability using a reduction from an undecidable language MAXIMUM_STEPS(k)

For this problem, we first define a computable function as follows: For a particular alphabet Σ, a function f: Σ*→ Σ*, i.e. a function that takes in the input string x and produces the output string y, so that f (x) = y, is computable if there exists a Turing machine that, when started with any string x as the input string on its tape, will halt with the output string y = f (x) on its tape.

Secondly, we describe a function called MAXIMUM_STEPS that takes a whole number as input and produces a whole number as output. This problem will ask you to show that MAXIMUM_STEPS is not computable.

Recall that, for a deterministic Turing Machine with a particular tape alphabet, the transition function tells us what the next step of execution is at any point. Given a current state and current tape symbol, a step is defined as: writing a symbol onto the tape, changing to a particular state, and moving either right or left.

We consider only Turing machines with a fixed number of k states. For any value of k, there are a finite number of Turing machines with k states. This is because a Turing machine is entirely determined by its transition function, and there are only finitely many such possible transition functions for a fixed number of k states.

Still considering the set of k-state Turing Machines, therefore, there are only a limited number of things that these machines can do on a particular input. For the purpose of this problem, we restrict our attention to the case where the input string is the empty string (for any Turing machine we can define the transitions to be made when faced with a blank symbol, so that an empty input string does not restrict the computations that the Turing machine can perform).

Because there are only finitely many Turing machines with k states, there are finitely many Turing machines with k states that halt (and finitely many that do not halt).
Therefore, there is a k-state Turing machine T, that halts on the empty string as input, such that no other Turing machine with k states takes longer (a larger number of steps) than T to halt. The function MAXIMUM_STEPS is equal to the number of steps that T takes to halt.

The function MAXIMUM_STEPS(k) is defined as follows:
For any whole number k > 0, MAXIMUM_STEPS(k) is the size of the longest sequence of steps that any Turing machine with k states can perform when started with the empty string on the input tape before halting. (This function gives one output value for a particular value of k, i.e. it considers all k-state machines together, and picks the running time of one that runs for the longest time before halting).

Show that the function MAXIMUM_STEPS(k) is not computable, i.e. that there is no TM that starts with a tape input of k (written in an appropriate format, e.g. as a string of k 1s) and writes as output the maximum number of steps that a k-state TM, starting with the input of an empty tape, can take before halting.

Hints for a solution: Suppose that, on the contrary, MAXIMUM_STEPS(k) is computable, i.e. that there exists a Turing machine MMS that computes it. Show that, in that case, you can use MMS to construct a decider for ATM, i.e. a Turing machine that can decide whether or not a particular Turing machine M will terminate on any input w or not.

Note that MMS does not itself necessarily contain k states; it is not itself the machine that takes the maximum number of steps for a given k. Instead MMS is a Turing machine that takes in any k as input and produces MAXIMUM_STEPS(k) as output.

Also note that, for a particular M and w, we can always construct a TM Mw, such that Mw ignores its own input, and just simulates the action of that particular M on that particular w, accepting/rejecting if M accepts/rejects, and looping if M loops.
Therefore, Mw will simulate M on w when started with the blank tape. You can make use of the machine Mw in your answer if you wish.

5. Undecidability using Rice's Theorem

Use Rice's Theorem to show that the language ALLTM is undecidable, where
ALLTM = {<M> | M is a TM and L(M) = Σ*}.

(Show that both conditions for applying the theorem are true.)

Attachment:- Theory and Practice of Computing.rar

Reference no: EM132896659

Questions Cloud

Business model depends on key trends of the market : An organization's business model depends on the key trends of the market. What are the current trends and assumptions within that industry?
What stages of lyme disease are the igg and igm antibodies : What is the cardinal sign of Lyme disease? (always on the boards) What is the Therapeutic goal for Lyme Disease and what is the recommended treatment.
Determine timelines and responsibilities for each objective : Create at least 3 measurable project objectives based on your analyses. Determine timelines and responsibilities for each objective (e.g. with a RACI chart)
Key reasons why multinational corporation : Determine the key reasons why a multinational corporation might decide to borrow in a country such as Brazil,
Undecidability using rices theorem : Undecidability using Rices Theorem - Use the pumping lemma for context-free languages to show that C is not context-free.
How the change proposal for the new technology : Describe how the change proposal for the new technology will be measured to assess the impact of your change and be communicated to staff and implemented
Crowdfunding and crowd funding : Search for both "crowdfunding" and "crowd funding" to get a wider variety of topics.
Evaluate pathophysiologic alterations : Evaluate pathophysiologic alterations that affect the neurologic and respiratory systems. J.S. is a 42-year-old man who lives in the Midwest
What is a short sale of stock : FIN 100 Principles of Finance Assignment - Investments Activity - Strayer University, USA - What is a short sale of stock? Provide an example in your own words

Reviews

Write a Review

Theory of Computation Questions & Answers

  Finite-state machine design

Create a finite-state machine design to turn your FPGA development board into a simple programmable music box.

  Redundant sequence identi cation

Redundant sequence identi cation

  Compute a shortest superstring

Dynamic programming algorithm to compute a shortest superstring.

  Propositional and predicate logic

Write down a structural induction principle for the PlayTree free type

  Design a syntactic analyzer

Design a syntactic analyzer for the language specified by the grammar

  Design unambiguous grammar to parse expressions

Write a program would read two numbers and then print all numbers between the first and the second, inclusive. Design unambiguous grammar to parse expressions

  Consider a logic function with three outputs

Consider a logic function with three outputs,  A ,  B , and  C , and three inputs,  D ,  E , and  F . The function is defined as follows:  A  is true if at least one input is true,  B  is true

  Considering a single programmed operating system

Considering a single programmed operating system, what is the minimal total time required to complete executions of the two processes? You should explain your answer with a diagram.

  How to construct an nfa

Give a construction that assumes you are given a DFA for L and show how to construct an NFA (with or without ε-moves) to recognize sort(L).

  Equivalence classes to construct minimal dfa for language

How many equivalence classes does this relation have and what are they? Use these equivalence classes to construct the minimal DFA for the language.

  Impact of moore-s law on data center costs

Discuss the impact of Moore's law on data center costs on such things as servers and communications equipment. List at least 3 steps or recommendations your data center can take to offset some or all of the effect of Moore's law.

  Problem encountered in statements in predicate logic

How the problem would be encountered in attempting to represent the following statements in Predicate logic. it should be possible to: John only likes to see French movies.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd