
Show HN: Turing machine simulator in C - yedhukrishnan
https://github.com/yedhukrishnan/turing-machine
======
pflanze
Any recommendation for literature on turing machines? The wikipedia article
seems to be a bit clouded to me. I know turing machines and CPUs with infinite
memory are similar in some ways, and that like lambda calculus they can
(somewhat equivalently) be used as a basis to think about computation, but I
don't know the details and not having a computer science background will
probably be missing some context, but would love to get a proper introduction.

~~~
asQuirreL
Kozen's book that has been mentioned is very good. I also recommend Sipser's
"Introduction to the Theory of Computation".

It goes from Deterministic Finite Automata (equivalent in power to regular
expressions in their purest sense, as opposed to POSIX regexps) to Context-
Free Grammars and then finally Turing Machines. So this will give an idea of
the hierarchy that TMs sit in.

Also, there are plenty of variations of Turing Machines with lots of cool
properties. If you want to have a look, try searching for "Non-Deterministic
Turing Machines", "Probabilistic Turing Machines", or "Alternating Turing
Machines".

~~~
geekam
Second Sipser's "Introduction to the Theory of Computation"

------
rgawdzik
How do you use SampleMultiplication?

~~~
yedhukrishnan
You can simply call the program with that file name as a commandline argument.

~~~
rgawdzik
Right, but what sort of operations can you perform? Can you give me an example
of how you would do 2*2?

~~~
yedhukrishnan
Yeah! ./turingmachine SampleMultiplication 11011 You will get output 11110. If
you want to multiply 3 & 2, give 111011. You will get 111111.

------
p4bl0
I understand that it may have been fun to program, but I don't see why this is
upvoted to the frontpage of HN.

It is just the "Turing machine" keyword? Or is there something that I missed?
Because it seems like a very basic program, and not with a particularly
interesting implementation (again my point is not to criticize the work, I am
just wondering why is it considered of interest to HN).

~~~
yedhukrishnan
I don't know :) I did this 2 years back while I was in my college. Just
thought about posting it in HN today. Why it is considered of interest, it is
entirely up to the community.

