Turing machines, first described by Alan Turing, are simple abstract computational devices intended to help investigate the extent and limitations of what can be computed. To read more about Turing machines theory, visit Stanford site or this site.
Our turing machine simulator uses following 5-tuple formulation: State0ld, SymbolOld, SymbolNew, Movement, StateNew, where:
s0 1 1 R s1 s1 1 1 R s2 s2 1 1 N sOK
This program ends in state sOK if there are at least three 1 symbols.
You can assume, that tape is infinite. But it is possible, that for some problems, there will be constraints. It is possible to use left constraint - tape will be infinite only to the right, or to use both left and right constraints - tape will be finite and its length is same as memory limit for that problem.
All numbers are natural or zero (no negative numbers) and are unary encoded. So 0 = '1', 1 = '11', 2 = '111' etc. So the number n will be encoded as n+1 successive 1s.
There are several facts, that can be assumed true if not defined in problem description:
Simulátor si môžeš stiahnuť tu: