The St. Čapek Crowd Control Academy, June, 2115.
Commander Gall is worried. On one hand, the graduating class this year is the most promising in the institution's history, every cadet's reasoning skills honed to perfection. On the other, General Domin is visiting and has insisted on writing and administering the robostanchion exam himself, despite the fact that robostanchion squads as a crowd-control technique came after his time, and he doesn't always grasp their limitations.
Fortunately, the format of a robostanchion exam is fairly standardized: a cadet takes control of a squad chosen for them by the examiner, all robostanchions initially inactive and in the hangar, and must maneuver it into a formation given by the examiner. There are only three kinds of commands that a cadet can issue:
A cadet can deploy an inactive robostanchion, commanding it to teleport itself to any unoccupied point on the field—which happens to be an infinite integer lattice—and become active.
A cadet can move an active robostanchion, commanding it to teleport to a different, unoccupied point on the field. The robostanchion remains active.
A cadet can recall an active robostanchion, commanding it to teleport back to the hangar and become inactive.
Their primary function being crowd control, whenever two active robostanchions are adjacent, they automatically establish a laser barrier between themselves:
Laser barriers require power to maintain, which must be drawn from some active robostanchion's power supply; each robostanchion has just enough power to maintain one barrier, but it may share this power wirelessly. For example, the six robostanchions on the right side of this formation may use the left robostanchion to power their seventh barrier:
Ordinarily, there are only two ways to fail a robostanchion exam: (1) damaging the squad by running out of power or (2) not achieving the requested formation within the generous time limit. Now the general, to gratify his ego, has decided that his version of the exam should be more challenging, and he has added (3) ever not using all of the available power.
Commander Gall, appropriately mortified, has, after much obsequious persuasion, gotten the general to agree to some concessions. First, the general will allow cadets four commands before he enforces his additional requirement. Second, the general has agreed to only ask for connected formations, i.e., formations where every robostanchion is joined to the others by at least one laser barrier.
While further promises from the general are improbable, there is one more fact working in the cadets' favor: To prevent cheating, school policy is that cadets are always given squads of distinct sizes. For instance, if one cadet makes the exam with a squad of 90, no other cadet will have exactly 90 robostanchions at their command.
Unsure whether these facts are enough to contain the general's caprice, Gall consults with Chief Engineer Fabry, asking for a worst-case analysis. What does Fabry reply? That is, in the worst case possible, how many cadets can Gall expect to fail?
Clarifications: General Domin is sensible enough not to ask for formations that require more robostanchions than are in the squad, nor for formations that violate his condition (3).