Ten boxes are given with $a_1,a_2,a_3,a_4,a_5 ......a_{10}$ number of balls in them respectively .These boxes are randomly ordered but $a_1,a_2 .....a_{10}$ is told.We can arbitrary select a box and guess number of balls in it.If our guess is greater or equal to number of balls in it then we win that box.We are told if our guess is right or wrong , if our guess is wrong then we can change our guess and make another for same box(in this case our previous guess for this box will not be considered ).
Rules - 1.Only final guess for a chosen box will be considered for sum.
2.We can make guess for given box as many times we want and we can select any box any number of time (but only final guess for given box will be considered) till we have not won it.
3.Our guess for given box must be greater than previous guess for same box if we want to guess again for that box.
We can select boxes and guess as many times we want.
We need to select four boxes.
If our sum of guesses is least possible but guarenteed to win four boxes , then we win the lottery.After winning lottery we return boxes for next candidates .
How to choose the boxes to win the lottery ? How to solve this problem in general where $n$ is total number of boxes , $a_1,a_2,....a_n$ and we need to select $k$ boxes to win the lottery in minimum number of guesses possible.
Hint 1 -
suppose two boxes , one with 200,10 balls is given .We need to select 1 box in minimum sum of guesses to win lottery .Answer is 20 .
Hint 2 -
The explanation of above is - first i randomly select any box and i guess if it has 10 balls.Now if the box i selected was really having 10 boxes i win the lottery.But if i did not win then now i know that the box was having 200 balls.Hence i select the other box and again guess 10.Now i win the lottery.sum of guesses (for guaranteed success) = 20.Also it is minimum.
Hint 3 -
Suppose i have two boxes with 99, 101 balls and i need to win one box for winning the lottery.Minimum guess required is 101.First we choose a box and guess 99.If the box was really having 99 balls we win the lottery , else now we know that the box was having 101 balls.Hence for same box we change our guess and we say 101.Answer is 101.