100 doors: Difference between revisions

Content added Content deleted
imported>Regattaguru
Line 2,350: Line 2,350:
This computes the characteristic sequence of squares by flipping every i'th door in round i, for infinitely many rounds i. But since it's computed lazily and the prefix stabilizes, we can still take the first 100 bits and print them! See corresponding source code at https://github.com/tromp/AIT/blob/master/characteristic_sequences/squares.lam
This computes the characteristic sequence of squares by flipping every i'th door in round i, for infinitely many rounds i. But since it's computed lazily and the prefix stabilizes, we can still take the first 100 bits and print them! See corresponding source code at https://github.com/tromp/AIT/blob/master/characteristic_sequences/squares.lam


<syntaxhighlight>0001000100010101000110100000010110000011001110110010100011010000000000101111111000000101111101011001011001000110100001111100110100101111101111000000001011111111110110011001111111011100000000101111110000001011111010110011011100101011000000101111011001011110011110011110110100000000001011011100111011110000000001000000111001110100000000101101110110</syntaxhighlight>
<pre>0001000100010101000110100000010110000011001110110010100011010000000000101111111000000101111101011001011001000110100001111100110100101111101111000000001011111111110110011001111111011100000000101111110000001011111010110011011100101011000000101111011001011110011110011110110100000000001011011100111011110000000001000000111001110100000000101101110110</pre>


Output
Output


<syntaxhighlight>1001000010000001000000001000000000010000000000001000000000000001000000000000000010000000000000000001</syntaxhighlight>
<pre>1001000010000001000000001000000000010000000000001000000000000001000000000000000010000000000000000001</pre>


=={{header|Blade}}==
=={{header|Blade}}==