diff options
author | Ben Sima <ben@bsima.me> | 2018-07-11 12:57:18 -0700 |
---|---|---|
committer | Ben Sima <ben@bsima.me> | 2018-07-11 12:57:18 -0700 |
commit | b26eb3413979ddf8a676b604401f9853d5a342bc (patch) | |
tree | 4f4e7373f4b50353cf5c4b08fb2fde03d544f305 /simspace/README.md | |
parent | 781400254cf01bc564ddf96b68a4ba690424a264 (diff) |
Rename to anonco
Diffstat (limited to 'simspace/README.md')
-rw-r--r-- | simspace/README.md | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/simspace/README.md b/simspace/README.md deleted file mode 100644 index d97846e..0000000 --- a/simspace/README.md +++ /dev/null @@ -1,35 +0,0 @@ -We're going to simulate "Rule 110", which is essentially a way of turning one -string of bits into another string of bits. (You won't need any background -knowledge to complete the problem, but if you're curious, check out -https://en.wikipedia.org/wiki/Rule_110) - -The program should take one argument N on the command line, and should then -display a possibly-infinite sequence of rows of N digits each. A digit may be -either zero or one. - -Create the first row randomly. Then, to construct the digit at position x of row -y, consider the digits at positions (x-1), x, and (x+1) of row (y-1), and select -the new digit according to the following table: - -| Pattern | New Digit for Center Cell | -| ------- | ------------------------- | -| 111 | 0 | -| 110 | 1 | -| 101 | 1 | -| 100 | 0 | -| 011 | 1 | -| 010 | 1 | -| 001 | 1 | -| 000 | 0 | - -Wrap around at the edges, so the pattern for position 1 is obtained by looking -at positions N, 1, and 2. - -Stop after printing a row consisting entirely of zero or ones. Note that -depending on your random initial row, this might never happen! - -For example, if N is 3, an example run might be: - -001 -011 -111 |