LogoLogo
1.0.0
  • Home
  • Install
  • Docs
  • Contribute
  • Journey
  • Welcome
  • The Varphi Language Standard
    • Welcome
    • State Names
    • Tallies and Blanks
    • Head Directions
    • Lines
    • Comments
    • Varphi Programs
    • Addressing Ambiguities
  • Writing Varphi Programs
    • Your First Varphi Program
    • Running Varphi Programs
    • Debugging Varphi Programs
    • The Varphi VS Code Extension
    • Good Practices
    • More Examples
      • Addition By One
      • Add Two Numbers
      • Multiplication By Two
      • Rock, Paper, Scissors
      • Coin Flip
  • Turing Machine Theory
    • The Unary Number System
    • Turing Machine Tapes
    • Turing Machine Heads
    • Turing Machine States
    • Turing Machines
    • Nondeterministic Turing Machines
Powered by GitBook
LogoLogo

© 2025 Hassan El-Sheikha

On this page
  • Nondeterminism
  • Example

Was this helpful?

Edit on GitHub
Export as PDF
  1. Turing Machine Theory

Nondeterministic Turing Machines

Nondeterminism

The Turing machines discussed in this section so far, such as the one that adds two tallies to any number, are called deterministic machines, since their outputs are guaranteed to be the same every time if the input tape is the same between runs.

Turing machines can also be nondeterministic, meaning their outputs can vary between runs with the same input tape.

Example

For example, consider the following transition function (written as a Turing program, or Varphi program):

qStart 1 qHalt 1 R
qStart 1 qHalt 0 R

Notice that we have defined two different rules for when the Turing machine is on state qStart and encounters a tally. The first rule instructs the Turing machine to leave the tally untouched and halt, while the other rule instructs it to make the tape cell blank and halt.

Which path will the Turing machine take on an input tape with one tally? There is no way to tell. The machine actually has a 50% chance of using the first rule over the second, and vice versa. So, for one run of the machine, the output tape may have one tally, and for another run, it will have no tallies.

PreviousTuring Machines

Last updated 4 months ago

Was this helpful?