Proof that a "$4$-word" can't exist in a recursive sequence In the proof to the problem below, I'm not able to understand what they've done for the case $(c)=1977$?  How did they know that $1977$ implied that there are only finitely many $4$-words?  And why is invertibility relevant here? 


 A: This is not written very clearly. 
The fact that there are only finitely many distinct possible $4$-words in a sequence is obvious, since there are only finitely many possible $4$-words, period! The number of possible distinct words is $10^4$. 
Any deterministic process on finitely many states must eventually fall into a period. If you start at some specific state $w_0$ and proceed according to the rule (whatever rule) to switch to states $w_1, w_2, w_3, \ldots$ since there are only finitely many possible distinct states, at some point some $w_N$ must equal some earlier $w_M$, with $M<N$. From this point onwards things repeat themselves. 
The distinction made here is between a pure cycle, which is the case $M=0$, and a non-pure one, which is the case $M>0$. In words, did you come back to the very first state, or to some other state? That's what these two diagrams depict: a pure circle or a figure-6. 
Invertibility is relevant because in an invertible transformation, the figure-6 case is impossible. See why? At the junction there, two states merge into the same state. This means that the process is not invertible. Put differently, if a process is invertible, meaning distinct states yield distinct outcomes, then from any given starting point you must always come back to that very starting point. You can't find yourself cycling in some smaller cycle. 
In this particular case, what this means is that starting with $1,9,7,7$ you must eventually come back to $1,9,7,7$, and the word just before that must be $0,1,9,7$, and therefore both $1977$ and $0197$ are bound to show up infinitely many times in this infinite sequence. 
