If 1234 and 5678 don’t weigh the same youd need 4 seesaws in some cases
Comment on Programmer tries to explain binary search to the police
Mr_Dr_Oink@lemmy.world 11 months agoHow do you solve that? I saw a solution in the comments where it says to start with numbering all the people and butting 1234 and 5678 on the see saw, then it says if they weight the same then continue and that seems to work. But if they dont weigh the same it doesnt work and it doesnt say what to do in that case.
NotSoCoolWhip@lemmy.world 11 months ago
adrian783@lemmy.world 11 months ago
you can do it like you weight 6v6 then 3v3 then for the last weighing you weight the 2 out of 3.
or you weigh 4v4 to find out which grouping of 4 the light weight person is in, then do 2v2 and 1v1.
ChairmanMeow@programming.dev 11 months ago
You don’t know if the person is lighter or heavier yet.
Sagifurius@lemm.ee 11 months ago
That’s not the question.
ChairmanMeow@programming.dev 11 months ago
I mean that not knowing it is part of the question, and the proposed solution doesn’t work without knowing if the person is heavier or lighter.
If you know if the person is heavier or lighter, the question becomes trivial.