Turing_Machine/README.md

19 lines
806 B
Markdown
Raw Normal View History

2018-04-06 05:28:40 +00:00
I asked my programming teacher how to create a Turing Machine that reaches the nth prime.
2018-04-07 13:57:19 +00:00
2018-04-06 05:28:40 +00:00
He thought I was joking.
He was WRONG.
2018-04-07 13:57:19 +00:00
2018-04-06 05:28:40 +00:00
I never make jokes :)
2018-04-07 13:57:19 +00:00
2018-04-06 05:28:40 +00:00
Anyways, to grok how Turing machines, as described in Automata and Computability, by Dexter C. Kozen, work, here are:
- A Turing Machine that accepts if a number n doesn't divide another number m and rejects otherwise.
2018-04-06 19:35:59 +00:00
- A Turing Machine that accepts if n doesn't divide m, or if n=m, and rejects otherwise.
- A Turing Machine that accepts if n is prime, and rejects otherwise.
- A Turing Machine that accepts once it has found the nth prime.
Early versions, deprecated, start with 0.
- A Turing Machine that accepts if a number n doesn't divide another number m and rejects otherwise.
2018-04-06 05:28:40 +00:00
- A Turing Machine that detects whether a number >=2 is prime.