Question

You may recall in last weeks extra credit, we showed that if you give a PDA 2 stacks instead of 1, its able to accept the language a b c that no normal PDA could accept. This week, well show an even stronger result Show how any Turing machine can be converted to an equivalent 2-stack PDA. (This proves that the set of languages 2-stack PDAs can be built to accept is exactly the set of decidable languages

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Solution:

To convert the turning machine into 2 stack PDA we need our turning machine to be infinite in only one side of the tape, contents of the tape to
the left of the current position and the second stack as the contents to the right. We can start by pushing the elements in Bottom of the stack
markers like an element Z then we can use these two stack for the direction of Turing Machine, we can simulate the TM by popping from the left stack
and pushing to the right to move left, and vice versa to move right. Now in the process if bottom of the left stack is met then we can halt and reject,
but if we hit the bottom of the right stack first we can push a blank symbol onto the left stack.


Basically all we need to do is pop to read and push to write.

Add a comment
Know the answer?
Add Answer to:
You may recall in last week's extra credit, we showed that if you give a PDA...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Many of you asked why we couldn't have two stacks for PDAs? Now here comes a...

    Many of you asked why we couldn't have two stacks for PDAs? Now here comes a problem for you. It is natural to add an extra stack to a PDA Say M is a two-stack PDA if M is exactly the same as a PDA but with two stacks. Each instruction (transition) in M is in the form of which means that if M is at state q and reading input symbol a with the M to state p, and...

  • LANGUAGE IS C++ Lab Ch14 Recursion In this lab, you are provided with startup code which...

    LANGUAGE IS C++ Lab Ch14 Recursion In this lab, you are provided with startup code which has six working functions that use looping (for, while, or do loops) to repeat the same set of statements multiple times. You will create six equivalent functions that use recursion instead of looping. Although looping and recursion can be interchanged, for many problems, recursion is easier and more elegant. Like loops, recursion must ALWAYS contain a condition; otherwise, you have an infinite recursion (or...

  • This C++ Program consists of: operator overloading, as well as experience with managing dynamic memory allocation...

    This C++ Program consists of: operator overloading, as well as experience with managing dynamic memory allocation inside a class. Task One common limitation of programming languages is that the built-in types are limited to smaller finite ranges of storage. For instance, the built-in int type in C++ is 4 bytes in most systems today, allowing for about 4 billion different numbers. The regular int splits this range between positive and negative numbers, but even an unsigned int (assuming 4 bytes)...

  • You need not run Python programs on a computer in solving the following problems. Place your...

    You need not run Python programs on a computer in solving the following problems. Place your answers into separate "text" files using the names indicated on each problem. Please create your text files using the same text editor that you use for your .py files. Answer submitted in another file format such as .doc, .pages, .rtf, or.pdf will lose least one point per problem! [1] 3 points Use file math.txt What is the precise output from the following code? bar...

  • How can we assess whether a project is a success or a failure? This case presents...

    How can we assess whether a project is a success or a failure? This case presents two phases of a large business transformation project involving the implementation of an ERP system with the aim of creating an integrated company. The case illustrates some of the challenges associated with integration. It also presents the obstacles facing companies that undertake projects involving large information technology projects. Bombardier and Its Environment Joseph-Armand Bombardier was 15 years old when he built his first snowmobile...

  • While reading the story, consider the culture (or sub culture) and related communication styles the story...

    While reading the story, consider the culture (or sub culture) and related communication styles the story reveals. Consider too, possibly, the values, behavioral norms, social practices, social artifacts, etc. After reading the story through the lens of this idea, please compose a full academic length (evidence-based 7 to 11 sentence long) paragraph which addresses the following prompt: What does the story reveal about the culture it portrays and/OR the communication styles the culture shares? In other words, what does the...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT