You are given $15$ pieces of paper, you are asked to write down any distinct integer numbers on them as you wish. Then these pieces of paper will be turned back, mixed and put on the table in a straight order. After that, you are allowed to ask the sum of numbers in the face down papers for as many papers next to each other as you want, but you cannot ask separate paper sums, they have to be consecutive papers. Though you may even ask a specific number in a piece of paper if you wish.

What is the minimum number of questions you need to ask to know every single number on the papers?

$\begingroup$I think you should ask for 15 distinct numbers, otherwise I could write 42 on each paper and ask no questions.$\endgroup$
– Daniel MathiasMar 25 at 8:29

1

$\begingroup$@DanielMathias you are right, I fixed that part.$\endgroup$
– OrayMar 25 at 8:30

5

$\begingroup$^ Upvote for @DanielMathias purely for the choice of 42 as the arbitrary number...$\endgroup$
– StivMar 25 at 12:17

$\begingroup$Is there some particular reason the puzzle doesn't have 16 paper pieces? Rand's solution could solve that, too: with "n, o" as the final sum, 15 pieces get positively identified, so there'd only be one possibility for the 16th one.$\endgroup$
– BassMar 25 at 20:56

$\begingroup$@Bass no actually i knew that 16 pieces of paper would have the same answer. though i just want to make sure whether if 15/16 would be different answers or not. Someone could come up with better solution than mine.$\endgroup$
– OrayMar 25 at 21:17

$\begingroup$Since we are (probably) getting the sums in decimal, I think I'd choose 12-19 and 23-29 instead, each multiplied by a unique power of 100; that'd be 12, 1300, 140000 and so on. As long as the possible sums are all unique, the actual numbers are arbitrary, and this way each constituent number is clearly visible in the sum, making partitioning a breeze. The effect is purely practical of course, and doesn't affect the solution. (Which seems curiously optimal, by the way: I don't think there's anything better, but this method would work with 16 pieces of paper too.)$\endgroup$
– BassMar 25 at 13:44

The difficulty comes in distinguishing each of the 14 pairs of neighboring slips of paper, as well as the first and last papers. There are 15 such pairs of slips of paper. If a question includes or excludes both slips, the response will be the same if those slips were swapped. In contrast, a question can only distinguish the ordering of two slips if it includes one but not the other. We can only recover the full ordering if we distinguish the ordering of each pair. But each question can only distinguish two pairs - corresponding to the two endpoints of the sequence queried. In particular, the first and last papers can only be distinguished if one of the endpoints is an end of the sequence.

Since we have 15 pairs to distinguish, and we can distinguish at most 2 per question,

$\begingroup$One can prove better than that: if there are 16 slips of paper, any set of questions which each involve at least two slips, and collectively involve all 16 endpoints excluding the one following the last one, will allow one to determine the ordering. In fact, if one is told which sum includes the leftmost slip, one wouldn't need to be told anything else about the questions!$\endgroup$
– supercatMar 25 at 22:33

Maybe I missed the point here but surely if you used values 1,2,4,8,16....32768 you could tell which two values were selected in any pair, so you'd have at most 2 possibilities for each piece of paper. By mutual exclusion and 'walking' your way along you could identify each value. This would take 14 goes at most.

$\begingroup$I think you did miss the point, which is to find the minimum required number of questions. Yes, it can very easily be done in 14 goes, but we don't need that many.$\endgroup$
– Rand al'ThorMar 26 at 11:40