Using only combinations of either single or double button presses:
Using 1 press
Using 2 presses
Using 3 presses
Using 4 presses
Using 5 presses
For anyone curious as to my internal process of coming up with these values, I made a quick chart of each type of press combo and how many variations there were for each type, with x indicating it has ...
This is, I'm sure, answered somewhere else. It is also related to Pascal's triangle.
Simply fill out the grid as follows:
In this grid, each number represents the number of ways of getting to that particular intersection. And that number is precisely the number of ways to get to the intersection below it added to the number of ways to get to the ...
tests of nine sheep on all but one sheep according to the illustrated patterns:
The two important properties exhibited are
The claim is that given a set of test results there is at most one possible group of five wolves. Suppose instead that some set of test results could have been produced by two different groups of five wolves A and B. Then both ...
You have all the possibilities using only single button press
Then the possible combinations using one pair are:
Then you have the possibilities using multiples pairs:
Adding all cases, you get:
Which is the expected answer from the question!
Thinking out loud, not a solution yet, but spoilery enough that I didn't want to put it in a comment:
I also notice that the situation is not symmetrical: we may know a way to find $k$ wolves among $n$ sheep using $t$ tests, but that won't help us at all to find $n-k$ wolves among $n$ sheep. (Under the ...
Of course @Gareth_McCaughan got this well-known puzzle immediately. But for people who aren't up on their combinatorics, here's the same calculation in a way that seems easier (at least to me).
There are 9x9 = 81 corners.
For each of these there are 8x8 = 64 corners that are not in the same row or column.
Each pair of these makes a rectangle.
But then each ...
Here is a method for constructing a solution without the use of a computer.
[EDIT: This generalises to any even number of sets, but not to odd numbers. See the edit at the end for a different method that I think will work for any number of sets.]
Here is a different method that I believe generalises to any number of sets. I will use 5 sets in this ...
Well, let's see. It's possible for 1 to 5 buttons to be pushed to create a combination, so let's calculate the number of possibilities for each individually, assuming you can pick the order of the buttons to be pushed.