N identical "Soldier" finite automata are in a line in their "Ready"
state. Each Soldier can change states once at every time interval
based on its own current state and the states of the automata
immediately to its right and left. At one end is the General in his
"Aim" state. At the other end is the "Captain" in his "Captain" state.
Give the state transitions as a function of the state of the soldier
and his left and right neighbors to accomplish the following:

At some point, the General changes into "Fire when ready" state. All
the Soldiers, at some interval after the "Fire when ready" command is
given, must change into their "Fire" state. The General and Captain do
not need to "Fire". They serve only as markers for the ends of the
line of soldiers. Any number of intervals can pass between the "Fire
when ready" command and the soldiers firing, but all soldiers must
transition to "Fire" in the same interval. The algorithm must work
regardless of the value of N, and the soldiers do not know the value
of N. Each one knows only his own state and the states of his two
immediate neighbors.

Don

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to