Turing Machine - Generate number sequences -



Turing Machine - Generate number sequences -

http://morphett.info/turing/turing.html

how create looping number sequence such as:

01011011101111011111...

so adding zero, adding 1, zero, 1 on top of previous number of ones.

write 01 on tape. move 1 space right. if you're looking @ zero, scan left until see zero. move 1 space right. if you're looking @ one, replace 2 , move right until see zero; maintain moving right until zero. replace 0 one. then, move until see two. replace 2 one. move 1 right; if you're looking @ one, repeat process of replacing 2 , again. eventually, you'll exhaust previous supply of 1s, you're looking @ 0 when move 1 right. in case, move right next zero, , replace one. loop on entire process (minus "write 01 part) longer strings of ones.

the intuition behind straightforward. if move right , see zero, move 2 zeroes left, re-create one's between lastly , second-to-last 0 after 0 found, , add together 1 more one. 2 used way maintain track of position in string of ones you're copying. basic thought sound, should seek write out states , transitions create rigorous.

example:

> ^ >0 ^ >01 ^ >010 ^ >010 ^ >010 ^ >020 ^ >0200 ^ >0201 ^ >0201 ^ >0101 ^ >0101 ^ >01010 ^ >010110 ^

numbers sequence turing-machines

Comments

Popular posts from this blog

web services - java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer -

Accessing MATLAB's unicode strings from C -

javascript - mongodb won't find my schema method in nested container -