• 0 Posts
  • 4 Comments
Joined 2 years ago
cake
Cake day: April 13th, 2024

help-circle

  • I dont think that works. If i try the 5 ingredient set and get sick, i gained no information about ingrediences 6,7,8,9,10 (if there are 10 ingredients in total).

    Wait why not?

    Maybe we’re not thinking of the same scenario here. I thought we were searching for exactly one ingredient that makes you sick. In which case this result would tell you the ones outside the set are all fine.



  • Can’t you easily reduce this to a compatible problem though?

    Let’s say you have the set of foods you suspect: red blue green yellow brown purple

    You construct an ordered set from this by making the elements sets of foods such that each set is the one to its left plus any one more entry, the leftmost set is the empty one, and the rightmost is the one containing all your suspects:

    {}, {red}, {red, blue}, {red, blue, green} … {red, blue, green, yellow, brown}, {red, blue, green, yellow, brown, purple}

    Now a check operation means eating the elements in the current set, if you get sick you go half way to the left border and update the right one, if you don’t get sick you go half way to the right border and update the left one.

    You should end up with the smallest set that makes you sick. Subtract the set to the left of it and you have the food that makes you sick left over.