|
|
|
|
|
by thaumasiotes
3882 days ago
|
|
You should be following the 1 white path before the n black paths, not afterwards. In particular, following "3 blacks then 1 white" in the last step, when the final digit is three, is an error; it will produce the wrong modulus for any number that is not divisible by 7. (1) 1 white then 1 black, ending up in state 1
(6) 1 white then 6 blacks, ending up in state 2
(0) 1 white then 0 blacks, ending up in state 6
(3) 1 white then 3 blacks, ending up in state 0
The graph keeps track of ((the number so far) mod 7); following a white arrow multiplies your total by 10, and following a black arrow increases your total by 1. |
|
Your initial white doesn't change anything, since it brings you back to the starting node. Any whites after the the final digit either keep you on the starting node or keep you in the graph where.