Construct a recognizer, Theory of Computation

Assignment Help:

Let L1 and L2 be CGF. We show that L1 ∩ L2 is CFG too.

Let M1 be a decider for L1 and M2 be a decider for L2 .

Consider a 2-tape TM M:

"On input x:

1. copy x on the second tape

2. on the ?rst tape run M1 on x

M=

3. if M1 accepted then goto 4. else M rejects

4. on the second tape run M2 on x

5. if M2 accepted then M accepts else M rejects."

The machine M is a decider and it accepts a string x i? both M1 and M2 accept x.

Two-tape TM is as expressive as the single tape TM.

 

8.3 b)

Let L1 and L2 be recognizable languages with the corresponding recognizers M1 and M2 . We construct a recognizer M for L1 ∪ L2 .

Strategy I: run M1 and M2 in parallel on a 2-tape TM M

M = "On input x:

1. Copy x on the second tape.

2. Do one step of M1 on tape 1 and one step of M2 on tape 2.

3. If either M1 or M2 accepted, then M accepts, else goto 2."

Strategy II: nondeterministically choose to run M1 or M2

M = "On input x:

1. Nondeterministically choose i ∈ {1, 2}.

2. Run machine Mi on the input x.

3. If Mi accepted, then M accepts.

If Mi rejected, then M rejects."


Related Discussions:- Construct a recognizer

Applying the pumping lemma, Applying the pumping lemma is not fundamentally...

Applying the pumping lemma is not fundamentally di?erent than applying (general) su?x substitution closure or the non-counting property. The pumping lemma is a little more complica

Class of local languages is not closed under union, Both L 1 and L 2 are ...

Both L 1 and L 2 are SL 2 . (You should verify this by thinking about what the automata look like.) We claim that L 1 ∪ L 2 ∈ SL 2 . To see this, suppose, by way of con

D c o, Prove xy+yz+ýz=xy+z

Prove xy+yz+ýz=xy+z

Trees and graphs , Trees and Graphs Overview: The problems for this ...

Trees and Graphs Overview: The problems for this assignment should be written up in a Mircosoft Word document. A scanned hand written file for the diagrams is also fine. Be

Describe the algorithm and draw the transition diagram, 1. Simulate a TM wi...

1. Simulate a TM with infinite tape on both ends using a two-track TM with finite storage 2. Prove the following language is non-Turing recognizable using the diagnolization

Turing machine , Let ? ={0,1} design a Turing machine that accepts L={0^m ...

Let ? ={0,1} design a Turing machine that accepts L={0^m 1^m 2^m } show using Id that a string from the language is accepted & if not rejected .

Algorithm for the universal recognition problem, Sketch an algorithm for th...

Sketch an algorithm for the universal recognition problem for SL 2 . This takes an automaton and a string and returns TRUE if the string is accepted by the automaton, FALSE otherwi

Venkatesh, What is the arbwnememmsmdbdbfbfjmfksmjejfnfnfnnrndmnfjfjfnrnkrkf...

What is the arbwnememmsmdbdbfbfjmfksmjejfnfnfnnrndmnfjfjfnrnkrkfjfnfmkrjrbfbbfjfnfjruhrvrjkgktithhrbenfkiffnbr ki rnrjjdjrnrk bd n FBC..jcb?????????????????????????????????????????

Write Your Message!

Captcha
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