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
0
votes
1 answer

How to solve Turing Machine example for anbncn / n>=1?

Can anyone tell me whether my answer is right or not for this example of Turing Machine?? Q. Construct Turing Machine for L={ anbncn / n>=1 } Ans: Transition function for string…
0
votes
2 answers

Turing machine mod function

Can anyone explaine me how to do Turing machine for following: Y= X mod 3, where (X, Y) binary numbers with minimum time complexity 10
Anton
  • 227
  • 2
  • 11
0
votes
0 answers

How do I prove something is Turing recognizable?

I need to prove that natural numbers are Turing recognizable. How do I start? I understand the basic definition of Turing recognizable and Turing decidable, but am having a hard time applying it to proofs
user3277633
  • 1,891
  • 6
  • 28
  • 48
0
votes
2 answers

natural numbers and the difference between recognizable and decidable?

I found the following explanation from Math exchange A language is Recognizable iff there is a Turing Machine which will halt and accept only the strings in that language and for strings not in the language, the TM either rejects, or does not halt…
user3277633
  • 1,891
  • 6
  • 28
  • 48
0
votes
1 answer

How to prove a Turing Machine property is trivial

Imagine I have a Turing Machine Property that looks like this: P = {M | L(M) is accepted by a Turing machine that does not halt in an even number of steps for any input} How can I prove that this property is trivial? Or, more generally, are there…
user2497586
0
votes
0 answers

How do I get this section of code to run until the tape is done?

So here is my code: The purpose of it is to take in a single input tape, and the description of a turing machine and say whether or not the string was rejected. I have had no issues with loading either the input tape or the description of the…
0
votes
2 answers

Turing Machine that finds even or odd length

I have a question that I am stuck on: Describe formally (i.e., by means of a transition function) a Turing machine which decides whether the input word a^n has an even or an odd length. Would someone please be able to enlighten me on what I am…
hunterge
  • 657
  • 2
  • 10
  • 15
0
votes
2 answers

How to interpret Turing Machine illustrations on p79 of Stephen Wolfram's “A New Kind of Science” book?

I am reading Stephen Wolfram's "A New Kind of Science". At present, I cannot understand how the cellular automata illustrations on p79 are created. In the patterns, the active cell, representing the head, appears to change orientation between up and…
Lee
  • 29,398
  • 28
  • 117
  • 170
0
votes
1 answer

Navigating a Turing Machine

Say I'm in state q5 with the following input: 000[q5]100 I'm about to read in a 1 and my instructions are 1->x,L while moving to q6 Would the tape then look like this? 00[q6]0x00? I'm not sure what to do when reading something from the right but…
user2853262
  • 43
  • 1
  • 6
0
votes
2 answers

A Decidability Question

Can there be an NFA that decides on real numbers ?
0
votes
1 answer

Why isn't the class of Turing-Recognizable languages closed under Complement?

I'm studying Turing Machines and I've already showed how Turing-Decidable is closed for the operations of Union, Intersection, Concatenation, Complement and Kleene Star. Next I did some demonstrations to show how T-Recognizable languages are closed…
Sasha Fonseca
  • 2,257
  • 23
  • 41
0
votes
3 answers

How to define a global variable before a function, then refer to it within the function in python?

I just familarized myself with a Turing machine. I'm in the process of making a semi-accurate virtual Turing machine but I ran into a seemingly simple problem that I just know there is a solution for. I researched online but couldn't find anything…
01110100
  • 793
  • 4
  • 9
  • 17
0
votes
1 answer

Can a Language accept Infinite numbers

I have a question whether a language can accept infinite numbers I have to reduce Lempty to Linf where Lempty ={e|L(Pe) is null} Linf={e|L(Pe) is infinite} so can i define a program P like this " input n Run Pe on 1...n for n steps if Pe accept any…
bourne
  • 1,083
  • 4
  • 14
  • 27
0
votes
1 answer

Turing machine ends when input is like 000111

we have a tape of random 0s and 1s, how do design a turning machine that ends when the input is like #000111#, where numbers of 0 and 1 are equal. homework. First time posting a question, thank you!
0
votes
2 answers

Are all infinite languages undecidable?

I am wondering are all infinite languages undecidable? They must be right, as the TM trying to decide an infinite language would just loop forever, which makes it a recgonizer, not a decider. Thanks guys.
user1974753
  • 1,359
  • 1
  • 18
  • 32