Imagine the following game A and B play against each other. Player A chooses a number X between 1 and N. And player B should guess the number X asking the question "Is it true that X >= K". If the answer is yes, then player B pays 2$ to player A. If the answer is no then he pays 1$ to player A.
The question is what is the minimum amount of money player B will need if he plays optimally for given N.
What I am thinking is that the optimal strategy could be that player B will do a binary search for the number and then he will need in the worst case $2 \cdot \lceil log_2N \rceil$ amount of money. But I am not sure how to convince myself this the best strategy as if the answer to the question is No the player only pays 1$ compared to 2$ if the answer is yes. So maybe it is not optimal to ask for the middle number.