This is follow-up question to All (red and blue) roads lead to Rome
Eight cities lie in a kingdom, with Rome at the center of power.
Every morning, the Emperor shouts a sequence of colors from his balcony. Every messenger in the kingdom obeys blindly, moving from city to city, taking a Red road whenever "Red" is called, and a Blue road whenever "Blue" is called. The Emperor's goal is to ensure that, no matter which city a messenger starts in, they all end up in Rome at the exact same time when the sequence ends.
The Rules of the Kingdom:
- There are exactly 8 cities (Rome + 7 others).
- Every city has exactly two one-way exits: one Red road and one Blue road.
- A road cannot leave a city and immediately return to that same city.
- No city may be touched by more than 4 roads in total. (Since every city has exactly 2 outgoing roads, this mathematically forces every city to have exactly 2 incoming roads as well).
Design a valid road network for 8 cities and find the shortest possible sequence of colors the Emperor can shout to guarantee every messenger ends up in Rome.
What is your road map, and what is the shortest command?
If this question was asked for 4 cities including Rome:
BRB
would be the answer.
Here is the applet where you can play the game!
EMPEROR'S COMMAND GAMEPLAY (this is not perfect app)
