Questions tagged [turing-machines]

A Turing machine is an idealized model of computation consisting of a finite-state control, an infinite tape holding information, and a read head positioned somewhere over the tape. Turing machines are used in computability theory to reason about the limits of computation, to provide a formal definition for an algorithm, and to provide formal models for nondeterminism.

Wiki

A Turing machine is a device that manipulates symbols on a strip of tape according to a table of rules. Despite its simplicity, a Turing machine can be adapted to simulate the logic of any computer algorithm, and is particularly useful in explaining the functions of a CPU inside a computer.

Turing machines are not physical objects but mathematical ones. A Turing machine is a kind of state machine. At any time the machine is in any one of a finite number of states. Instructions for a Turing machine consist in specified conditions under which the machine will transition between one state and another.

The tape is used to store data. In addition, it can also store a series of transitions (a small programs) and thus, the head can run sub-programs. By analogy with modern computers, the tape is the memory and the head is the microprocessor.

Tag usage

The tag can be used for programming related problems in implementing features of a turing machine. The tag can also be used for algorithmic problems related to turing machine. Try to avoid theoretical and research based questions on Stack Overflow.

Please note https://cstheory.stackexchange.com is another stack exchange website which you can use to ask theoretical and conceptual problems with tag

Source

487 questions
5
votes
3 answers

Why aren't recursively enumerable languages undecidable

This is the definition of decidable from Wikipedia In computability theory, an undecidable problem consists of a family of instances for which a particular yes/no answer is required, such that there is no computer program that, given any…
user602774
  • 1,093
  • 7
  • 19
  • 31
5
votes
3 answers

Construct a Turing-Machine to decide ww^Rw

w^R is the reverse of w and w is {0, 1}* . So the TM needs to decide a word followed by the reverse of this word followed by the word. I don't want the answer, I just want a lead to start and to get on the right track.
mravey
  • 4,380
  • 2
  • 21
  • 31
5
votes
2 answers

Time complexity versus space complexity in Turing machines

I think defenitions of time complexity and space complexity for Turing machines are identical and I can't differentiate between them. Please help me. Thanks.
5
votes
3 answers

Turing machine for addition and comparison of binary numbers

Good Day everyone! I am trying to solve this Exercise for learning purpose. Can someone guide me in solving these 3 questions? Like I tried the 1st question for addition of 2 binary numbers separated by '+'. where I tried 2 numbers addition by…
5
votes
3 answers

Turing machine algorithm to count 0's and write how many there were in binary

I happen to need an algorithm for a turing machine that reads a string of 0's and then writes on the tape how many there were in binary. I realize that in practice the machine won't actually count the 0's but I am pretty stumped as for how to do it.…
João Fernandes
  • 51
  • 1
  • 1
  • 2
5
votes
1 answer

Prove whether this language is decidable and recognizable

If L1 and L2 are languages we have a new language INTERLACE(L1, L2) = {w1v1w2v2 . . . wnvn | w1w2 . . . wn ∈ L1, v1v2 . . . vn ∈ L2}. For example, if abc ∈ L1 and 123 ∈ L2, then a1b2c3 ∈ INTERLACE(L1, L2) How can I prove that the INTERLACE is:…
5
votes
3 answers

My simple turing machine

I'm trying to understand and implement the simplest turing machine and would like feedback if I'm making sense. We have a infinite tape (lets say an array called T with pointer at 0 at the start) and instruction table: ( S , R , W , D , N ) S->STEP…
Yehonatan
  • 1,172
  • 2
  • 11
  • 21
5
votes
1 answer

Example of a recursively enumerable language that is not context free

What is a simple example of a recursively enumerable language that is not context free? My textbook is awful in providing such an example explicitly. To be clear this isn't a hmk question.
5
votes
3 answers

Why is this an invalid Turing machine?

Whilst doing exam revision I am having trouble answering the following question from the book, "An Introduction to the Theory of Computation" by Sipser. Unfortunately there's no solution to this question in the book. Explain why the following is not…
Danny King
  • 1,941
  • 6
  • 24
  • 37
5
votes
2 answers

Why are there a finite number of Turing machines?

In Michael Sipser's Introduction to the Theory of Computation, he states: "some languages are not decidable or even Turing recognizable, for the reason that there are uncountably many languages yet only countably many Turing machines. Because each…
Archer
  • 111
  • 3
  • 10
5
votes
2 answers

Turing Machine Instruction Table

The definitions of Turing Machine say that it is prohibited for one to read/modify it's instruction table (program). Exactly, Turing Machine has no access to it's own program. What benefits can be achieved if one could weaken this restriction? If a…
Bubba88
  • 1,910
  • 20
  • 44
4
votes
3 answers

Is pure Prolog Turing-complete, and if so, why can't it implement list intersection?

The Wikipedia section on this topic is a mess. It states: Pure Prolog is based on a subset of first-order predicate logic, Horn clauses, which is Turing-complete. Turing completeness of Prolog can be shown by using it to simulate a Turing…
4
votes
1 answer

Is the Starbucks menu Turing Complete?

If we were to interpret the Starbuck's mini-language menu system as some sort of grammar or state machine, would that grammar be Turing complete? A description of the Starbuck's order mini-language can be found here
4
votes
2 answers

Is C++ a turing complete language?

Is C++ a turing complete language? Obviously that would be the case, but how is it proven practically? Is there a minimally reproducible example that shows that this is the case?
user2039981
4
votes
1 answer

How to design a Turing machine for division of two numbers?

The machine takes 2 natural numbers (a, b) as input in unary form and outputs the integer quotient and the remainder of the integer division a / b. What would the initial and final state on the tape be? What would the functionality diagram look…