Lonnie is doing the office coffee run one morning. There are two coffee machines in the building: one from STACO and one from TRUCKBASS. They dispense two types of coffee: black (no milk) and white (with milk). The machines are both rather temperamental. Every fourth coffee dispensed from STACO is black and the rest are white. The coffees dispensed from TRUCKBASS are alternately black and white. Lonnie visited one of the machines and bought some coffees, of which three turned out to be white. He went back to the same machine for the afternoon run and bought the same number of coffees again. What are the possible numbers of white coffees that Lonnie could have received this time?

Respuesta :

If Lonnie purchased 3 coffees the first time, he could have only purchased them from the STACO machine (WWWB).  No matter which coffee came first from the TRUCKBASS machine, he would have not ended up with all 3 white coffees (BWB or WBW).  Buying 3 coffees from the STACO machine again would have resulted in a black coffee and 2 more white coffees (BWW).
If Lonnie purchased 4 coffees the first time, he still could have only purchased them from the STACO machine.  He would have received 3 whites and one black coffee.  If he had purchased them from the TRUCKBASS machine, he would have ended up with 2 black and 2 white, regardless of the order.  Buying 4 more coffees from the STACO machine would have again resulted in 3 whites and one black.
If Lonnie purchased 5 coffees, the only way to receive only 3 white would have been to purchase from the TRUCKBASS machine, and only if he received a white coffee first (WBWBW).  If he received a black coffee first, he would have received 3 black and 2 white (BWBWB).  If he purchased from the STACO machine he would have had too many white (WWWBW).  Purchasing 5 coffees from the TRUCKBASS machine again would have resulted in BWBWB, so 2 additional white coffees.
If Lonnie purchased 6 coffees, he would have had to purchase from the TRUCKBASS machine, no matter the order (BWBWBW or WBWBWB).  Buying 6 from the STACO machine would have given him too many whites (WWWBWW).  Buying again from the TRUCKBASS machine would have given him 3 additional white coffees (either BWBWBW or WBWBWB).
If Lonnie purchased 7 coffees, he would have had to purchase from the TRUCKBASS machine and would have had to receive a black coffee first (BWBWBWB).  If he had purchased from the STACO machine he would have had too many whites (WWWBWWW).  If he received a white first from the TRUCKBASS machine he would again have too many whites (WBWBWBW).  Buying 7 coffees again from the TRUCKBASS machine would give him 4 more whites (WBWBWBW).