==> logic/weighing/weighings.p <== Some of the supervisors of Scandalvania's n mints are producing bogus coins. It would be easy to determine which mints are producing bogus coins but, alas, the only scale in the known world is located in Nastyville, which isn't on very friendly terms with Scandalville. In fact, Nastyville's king will only let you use the scale twice. Your job? You must determine which of the n mints are producing the bogus coins using only two weighings and the minimum number of coins (your king is rather parsimonious, to put it nicely). This is a true scale, i.e. it will tell you the weight of whatever you put on it. Good coins are known to have a weight of 1 ounce and it is also known that all the bogus mints (if any) produce coins that are light or heavy by the same amount. Some examples: if n=1 then we only need 1 coin, if n=2 then clearly 2 coins suffice, one from each mint. What are the solutions for n=3,4,5? What can be said for general n?