A sliding window of length four.
efgh is completely independent of abcd.
then the next number greater than ABCD or ABCD+1
0001 2501 5001 7501 . 0002 2502 5002 7502 . 0003
Just a wild random thought.
Actually, I never gave it much thought, and it shows.
Just print all the possible choices and use a computer
program to search the shortest path thorough it.
Djikstra (<- spelling?) comes to mind.