Re. Zhou in the WSJ article
She was an engineering student, not CS (though CS is sometimes in the Engineering college of a university). I can somewhat relate to this problem of the soda machine. During my freshman year as a CS major, I took a hardware course, and one of the problems we had to work out was how to build a machine that could add coin amounts together. We didn't have to worry about determining what kind of coins were inserted into the machine, but it had to be able to add up the amounts, and then enter an "accept" state if the correct amount was entered for a particular item in a vending machine. It sounds like Zhou got that far. We didn't actually build it. We went through an engineering process to draft out the circuitry to do it. I don't recall us having to have the machine compute change, however. Just quickly thinking about it, it seems like the typical case would involve reversing the process. Rather than accepting coins and accumulating an amount, you'd be spitting out coins and subtracting from an established amount (the difference between the price of the product, and the accumulated amount.) The sticky part would be the exceptional case where the machine had run out of some kinds of coins...