There exist two equal length spans of a rickety bridge over a raging, hazardous river that a group of nine androids must safely cross in the wee hours of a dark, moonless night.
To safely cross the spans, each crossing android needs to be plugged into a portable device that allows their eye-sensors to use the dim starlight to "see". Available to the androids for this purpose are two cyberbotic lanterns. Each cyberbotic lantern has two sockets that permit one or two androids to plug into it.
The problem with the device is that it only works if the sum of the voltages of the androids plugged into it is not prime (i.e., a voltage of 1, though not composite, will still work).
Each of the nine androids have an internal power source with a different positive integer voltage that ranges from 1 to 9. The voltage of each android also is in direct relation to the maximum time in which the android may cross a span. That is, Android A, with voltage 1, can move across a span in 1 minute; Android B, with voltage 2, can move across a span in 2 minutes; Android C, with voltage 3, can move across a span in 3 minutes; etc. The speed at which two androids may cross a span of the bridge is no greater than the slowest of the two in a pair.
Assuming that the androids do not need to "see" to plug into the device, it takes virtually no time to connect to the device or disconnect from it, and that the center of the bridge between the two spans can safely support all nine robots yet takes virtually no time to enter or exit it, what is the shortest amount of time it would take for all nine androids to safely
cross both spans of the bridge during the dark night using only the two cyberbotic lanterns?
Note: No android may carry or be plugged into more than one cyberbotic lantern.
BONUS: What would be the shortest amount of time it would take for the androids to cross the two spans if a cyberbotic lantern would only work if the sum of the voltages was not composite (i.e., the sum needing to be prime or 1)?
This puzzle was inspired by Five People on
Two Bridges.