Question

In: Computer Science

Turing Machine and Closure Operations Show that Turing-decidable languages are closed under the following operations: union...

Turing Machine and Closure Operations

Show that Turing-decidable languages are closed under the following operations:

  • union

  • concatenation

  • star

Solutions

Expert Solution

Answer :-

1.Union

Both decidable and Turing recognizable languages are closed under union.-

For decidable languages the proof is easy.

Suppose L1 and L2   are two decidable languages accepted by halting TMs   M1 and M2 respectively.

The machine for L1 ∪ L2 is designed as follows:

Given an inputx, simulate M1 on   x. If M1 accepts then   accept, else simulate   M2 on x.If M2   accepts then accept else reject.

Now suppose L1 and L2 are two Turing recognizable languages accepted by TMs   M1 and M2 respectively. Since L1 and L2 are Turing recognizable languages, therefore for strings that do not belong to these languages, the corresponding machines may not even halt.

The previous strategy will not work because we can have a scenario where M2   accepts x   but M1 loops forever.

the trick is to simulate both M1 and M2 “simultaneously”. In other words, we design a machine that executes one step of M1, followed by one step of M2, then again one step of M1and so on.

2.Concatenation

Let K and L be two turing recognizable languages ,and let MK and ML denote the turing machines that recognize K and L respectively.

We construct a non-deterministic turing machine MKL that recognizes the language KL.

i. Non-deterministically cut input w into w1 and w2

ii. Run MK on w1. If it halts and rejects,reject.

iii. Run ML on w2. If it accepts,accept. If it halts and rejects,reject .

Note the difference between the turing machines for recognizable and decidable languages.

Here, we need to take care of the fact that the machines MK and ML need not halt.

3.Star

For a turing recognizable language L , we construct a non-deterministic turing machine ML∗ that recognizes L.

The idea is similar to the decidable case.

i. On input w, non-deterministically cut w into parts w1 w2 ··· wn

ii. Run   ML   on wi for all i. If ML accepts all of them,accept. If ML halts and rejects for any i, reject.

If there is a way to cut w into strings w1 w2 ··· wn such that each wi ∈ L,then there is a computation path in ML∗ that accepts win a finite number of steps.


Related Solutions

Turing Machine and Closure Operations Show that Turing-recognizable languages are closed under the following operations: union...
Turing Machine and Closure Operations Show that Turing-recognizable languages are closed under the following operations: union concatenation star Each answer needs only be a short informal description of a Turing Machine (but it must still be sufficiently precise so someone could reconstruct a formal machine if needed). Also, be careful with non-termination (when appropriate)!
Show that Turing-decidable languages are closed under the following operations: union concatenation star Show that Turing-recognizable...
Show that Turing-decidable languages are closed under the following operations: union concatenation star Show that Turing-recognizable languages are closed under the following operations: union concatenation star Each answer needs only be a short informal description of a Turing Machine (but it must still be sufficiently precise so someone could reconstruct a formal machine if needed).
Closure under Context-Free Languages Show that the following operations are closed under context-free languages: union concatentation...
Closure under Context-Free Languages Show that the following operations are closed under context-free languages: union concatentation Kleene star
Show that (0^n1^n) + (01)^n is decidable using a Turing machine
Show that (0^n1^n) + (01)^n is decidable using a Turing machine
Prove the following Closure Properties with respect to Context Free Languages. 1. Show that Context Free...
Prove the following Closure Properties with respect to Context Free Languages. 1. Show that Context Free Languages are Closed under union(∪), concatenation(·), kleene star(*). (Hint: If L1 and L2 are Context Free languages then write Context Free grammar equivalent to L1 ∪ L2, L1 · L2, L∗ 1 ) 2. Show that if L1 and L2 are Context Free Languages, then L1 ∩ L2 is not necessarily Context Free. (Hint: Use Proof by Counter Example)
Show that the following problem i undecidable: Input: A Turing machine M. Output: Yes if M...
Show that the following problem i undecidable: Input: A Turing machine M. Output: Yes if M eventually halts when started on a blank tape, no otherwise Input: A Turing machine M and a tape symbol a. Output: Yes if M eventually writes a when started on an blank tape, no otherwise. Input: A Turing machine M. Output: Yes if M ever writes a nonblank symbol when started on a blank tape, No otherwise. Input: A Turing machine M and a...
Show that the following language is decidable APDA = { | M is a push down...
Show that the following language is decidable APDA = { | M is a push down automata that accepts string w} Explain your steps.
Show that the language F={M| M is a Turing machine , and L(M) contains infinite elements}...
Show that the language F={M| M is a Turing machine , and L(M) contains infinite elements} is not Turing recognizable.
Turing machine A that does the following: • On its first and second tape, A receives...
Turing machine A that does the following: • On its first and second tape, A receives two strings w and v, w, v ∈ {0, 1}? , representing two integer numbers. When machine A is started, the tape heads are located on the left-most position, on the most significant bits of w and v. • If none of the inputs w and v is the empty word, the Turing machine A writes the binary representation of the sum of the...
Find the output for the following Turing machine when run on the tape b1001b, assuming that...
Find the output for the following Turing machine when run on the tape b1001b, assuming that the machine begins in state 1 and on the left side of the tape. (1, 1, 1, 2, R) (1, 0, 0, 2, R) (1, b, 1, 2, R) (2, 0, 0, 2, R) (2, 1, 0, 1, R)
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT