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

  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