/TuringMultiply

Turing machine to multiply unary numbers

Primary LanguageJava

TuringMultiply

Turing machine to multiply unary numbers

Usage

The numbers to multiply must be given as arguments like this: *** **** (for 3 * 4)

You can also enter normal numbers like 3 4 (for 3 * 4)

Requirements

  • Step mode: Step-by-step, show every configuration
  • Run mode: All-in-one, show result at the end (end-configuration)

Output

  • correct result
  • current state
  • tape with 15 cells before and after the head
  • current position of the head
  • counter of steps

Presentation

  • max. 5 mins
  • show implementation
  • calculate:
    • 2 * 4
    • 13 * 17
    • 1 * 27
    • 23 * 0

Hints

  • 3x points
  • multiple stripes/tapes are allowed
    • must be part of the output
  • unary coding (use 0^n)

Optional

Graphical implementation of a state diagram in step mode.