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
  • The "Top-Left" Rule
  • The "At Least One Tally" Rule
  • The "Leftmost Tally" Rule

Was this helpful?

Edit on GitHub
Export as PDF
  1. The Varphi Language Standard

Addressing Ambiguities

The "Top-Left" Rule

Arguably the only ambiguity in a Varphi program is the starting state. How is the state which the Turing machine starts with determined?

The "Top-Left" Rule is a rule that can be applied to determine the starting state of any Varphi program. Simply select the state located at the top-left corner of the program. For example, suppose your program looks like this:

q0 1 q0 1 R
q0 0 q1 1 R
q1 0 q2 1 R

Then, the starting state is q0.

The "At Least One Tally" Rule

Input tapes must include at least one tape cell with a tally. If not, a runtime error will be thrown.

The "Leftmost Tally" Rule

A standard that is followed by Turing machine developers is to make the initial position of the head be the leftmost tally on the tape. This convention is adopted by Varphi. The leftmost tally is guaranteed to exist by the "At Least One Tally" Rule.

PreviousVarphi ProgramsNextYour First Varphi Program

Last updated 4 months ago

Was this helpful?