Construct a turing machine

Assignment Help Theory of Computation
Reference no: EM131222260

ASSIGNMENT

1. Construct a Turing machine which, given a string over the al- phabet {0, 1}, accepts the following language

{x | x contains the same number of 0's and 1's}.

2. (Problem 3.11 in the textbook) A Turing machine with doubly infinite tape is similar to an ordinary Turing machine, but its tape is infinite to the left as well as to the right. The tape is initially filled with blanks except for the portion that contains the input. Computation is defined as usual except that the head never encounters an end to the tape as it moves leftward. Show that if a Turing machine of this type accepts a language L, then there is a regular Turing machine (as defined in class) which also accepts L.

Hint: Suppose that the two-way infinite tape of the machine contains input a-ma-m+1 . . . a-2a-1a0a1a2 . . . an, for some input symbols ai ∈ Σ, which is preceded and followed by infinitely many blanks to the left and to the right.

Imagine that we "fold" the two-way infinite tape in the fol- lowing way

a0 a1 a2 ...
# a-1 a-2 ...

to turn it into two one-way infinite tapes (# is a new symbol, a delimiter.) At the beginning, we may assume that a-1 = a-2 = . . . = a-m = |_|

since we can fold the tape at any position. When the head is to the right of a0 the simulation is on the upper tape; if the head is to the left of a0, the simulation is on the lower tape. Your task is to provide the details. You do not need to write the explicit table of the transition function but define Q, Σ, Γ as precisely as possible and explain how the simulation proceeds.

3. Early on in the course, we mentioned that the problem of de- ciding whether a given positive integer n is prime is solvable in polynomial time but that the proof is highly nontrivial. This is based on the assumption that n is given in base 2, i.e. as a binary string. In this problem, we will see that primality has a much simpler algorithm, if we change the base in which we represent n; so the complexity of a problem does depend on how we represent the input.

Assume that n is represented in unary notation: namely, the string that represents n is 1n (the string of n ones.) In this representation, show that the Eratosthenes' Sieve which checks whether n is divisble by any integer ≤ √n runs in time O(n2) when implemented on a Turing machine. (You may assume that there exists a Turing machine which, given n, computes ⌈√n⌉, the first integer greater than or equal to √n.) The key to solving this is to understand how to check divisibility of one integer by another, if they are both given in unary notation.

Reference no: EM131222260

Questions Cloud

Analysis of the supreme court of the united states : nalysis of The Supreme Court of the United States case of Griggs v. Duke Power Company (1971) Search the internet and find the case The Supreme Court of the United States case of Griggs v. Duke Power Company (1971). Analyze and present a summary of..
What is the factorys present value : A factory forecasts to produce the following cash flows: - If the cost of capital is 6%, -  what is the factory's present value?
Supreme court of the united states case : Analysis of The Supreme Court of the United States case of Griggs v. Duke Power Company (1971) Search the internet and find the case The Supreme Court of the United States case of Griggs v. Duke Power Company (1971). Analyze and present a summary o..
What additional functionality do these features provide : Analyze one of the relational DBMSs that you currently use. Discuss the object-oriented features provided by the system. What additional functionality do these features provide?
Construct a turing machine : MTH814 - COMPUTATIONAL COMPLEXITY - Construct a Turing machine which, given a string over the al- phabet and the key to solving this is to understand how to check divisibility of one integer by another, if they are both given in unary notation.
What was the annual percentage increase : What was the annual percentage increase in the winnerAccs check over this period? - If the winnerAccs prize increases at the same rate, what will it be in 2050?
Course-human resource management foundations : Topic: High Performance and the Choices Managers Make Note: Please answer EACH of the questions in at least 200 words. Answers should be correct, substantive, professional like a work of graduate student, and must be plagiarism-free. Use in-text ci..
What are implications for accounting in different countries : ACC307 - Accounting Theory Assignment. Critically examine the validity of the above statement. What are the implications for accounting in different countries if the above allegation is true
Does the importance of these selected principles change : In reviewing the text, the author identifies Ten Principles of the Community-Oriented Policing Chief. Select four of the principles, in rank order, that you deem to be most important for the Chief's success. Provide your opinion as to why these pr..

Reviews

Write a Review

 

Theory of Computation Questions & Answers

  Determine using propositional logic where diamond is

Write in propositional logic, outside Prover9, the knowledge basis and describe the methodology you will use. Show a concrete finite ER on a finite set, including the proof that it is an ER.

  What activities can a leader use to help get the team to

what activities can a leader use to help get the team to buy-in to the vision so that it becomes a shared

  Issue that requires the use of simple linear regression

Explain how to collect the data for the independent and dependent variables. Explain how to determine the regression equation. Make a case for the main point.

  Perform acl test and prepare a report with conclusions

Perform the ACL test and prepare a report with your conclusions. Document your report with ACL printouts showing details of test results and the command log - Identify an operational concern related to the revenue procedures.

  How many memory cells does a i-gigabyte memory contain

How many memory cells does a 4-Kbyte memory contain? How many memory cells does a I-gigabyte memory contain?

  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

  Show turing machine recognizes class of truing-recognizable

Computation is defined as usual except that the head never encounters an end to the tape as it moves leftward. Show that this type of Turing machine recognizes the class of Truing-recognizable languages.

  Test coupled with real users views of the product

Explain the importance of having a test coupled with real users' views of the product at the end of the development effort, even if it is the test of a prototype and not the fully developed software.

  Prepare regular expression and finite automata

You need to prepare regular expression and finite automata - Explain each and every question in depth with examples.

  Create a recursive java method maximum

Create a recursive java method maximum that calculate the maximum element of a linked list of integers.The solution must be simplified and should not use class Node or head

  Where could errors occur

Where could errors occur in Figure and for each error, what action would you take should the error occur

  Deterministic finite state machine

Determine, formally, whether L(R1(R1 + R2)*) = L((R1 + R2)*). That is, if it is true, provide a proof; otherwise provide a counter example.It is a well known result that every PDA with acceptance condition of an empty stack and reachability of a fin..

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