I asked a question over on Math.SE, pointing to this puzzle, and @Elaqqad gave a very long answer with lots of links to math that might help. @Elaqqad also produced a concrete solution with only 59 tests — beating @noedne's long-standing solution of 63 tests!
Background math
The "wolves and sheep" puzzle is a specific case of non-adaptive group testing. The problem is exactly equivalent to:
Find the smallest 5-separable matrix with exactly 100 columns.
A "5-separable" matrix is a matrix of 0s and 1s where no two sets of 5 columns have the same bitwise-OR. In terms of wolves and sheep, this is the same as saying that if we know which blood tests came up positive (i.e. we have the bitwise-OR of some 5 columns corresponding to wolves), then we can "decode" those results and deduce exactly which 5 animals (i.e. columns) contributed the positive results (i.e. were bitwise-ORed together).
59 tests: the math part
@Elaqqad's solution starts with a mathematical structure called a $(60,6,1)$-pairwise balanced design. At least I think that's what we have here. I could be wrong. Anyway, I have no insight into how this particular structure was derived.
BaseBlocks = [
{(0,0,0,0), (0,1,0,2), (0,2,1,0), (1,0,1,1), (1,1,1,2), (1,2,+∞,+∞)},
{(0,0,0,0), (0,1,0,1), (1,0,0,2), (1,1,0,2), (1,2,1,1), (0,2,+∞,+∞)},
{(0,0,0,0), (0,1,0,0), (0,2,1,1), (1,0,0,0), (1,1,0,3), (1,2,+∞,-∞)},
{(0,0,0,0), (0,1,0,3), (1,0,1,3), (1,1,1,1), (1,2,0,3), (0,2,+∞,-∞)}
]
Blocks = [
{ (a, b+i, c+j, d+k) for (a,b,c,d) in B }
for B in BaseBlocks
for i in {0,1,2}
for j in {0,1}
for k in {0,1,2,3}
]
There are exactly 96 blocks in Blocks
. Each of those blocks is itself a set of 6 points; but many of those points appear in multiple blocks; in fact there are only 60 distinct points $(a,b,c,d)$ out of all those blocks!
Define the 5-separable matrix $M$ by $$
M_{t,n} = \begin{cases}
\text{1}&\text{if point}_t\in \text{block}_n\\
\text{0}&\text{if point}_t\not\in \text{block}_n\\
\end{cases}
$$ for each of the 96 blocks (animals) and 60 points (tests). This matrix $M$ is 5-separable, and so we can use it to find 5 wolves among 96 animals using only 60 tests.
To get up to 100 animals, we take our 96 Blocks
and add the following 8 more:
Blocks += [
{(0,0,+∞,+∞), (0,1,+∞,+∞), (0,2,+∞,+∞), (1,0,+∞,-∞), (1,1,+∞,-∞), (1,2,+∞,-∞)},
{(0,0,+∞,-∞), (0,1,+∞,-∞), (0,2,+∞,-∞), (1,0,+∞,+∞), (1,1,+∞,+∞), (1,2,+∞,+∞)},
{(0,0,0,0), (0,0,0,1), (0,0,0,2), (0,0,0,3), (0,0,1,0), (0,0,1,1), (0,0,1,2), (0,0,1,3)},
{(0,1,0,0), (0,1,0,1), (0,1,0,2), (0,1,0,3), (0,1,1,0), (0,1,1,1), (0,1,1,2), (0,1,1,3)},
{(0,2,0,0), (0,2,0,1), (0,2,0,2), (0,2,0,3), (0,2,1,0), (0,2,1,1), (0,2,1,2), (0,2,1,3)},
{(1,0,0,0), (1,0,0,1), (1,0,0,2), (1,0,0,3), (1,0,1,0), (1,0,1,1), (1,0,1,2), (1,0,1,3)},
{(1,1,0,0), (1,1,0,1), (1,1,0,2), (1,1,0,3), (1,1,1,0), (1,1,1,1), (1,1,1,2), (1,1,1,3)},
{(1,2,0,0), (1,2,0,1), (1,2,0,2), (1,2,0,3), (1,2,1,0), (1,2,1,1), (1,2,1,2), (1,2,1,3)}
]
This modification increases the size of Blocks
from 96 to 104, and it preserves the magic "PBD-ness" of our block design (again, I have no insight as to why this is so), but it doesn't actually add any more points — we still have 60 points in our "alphabet." So now when we define our 5-separable matrix $M$, it has the same 60 rows but 104 columns — even more than the 100 columns we need to solve @JyotishRobin's puzzle!
Furthermore, it turns out that — as in @noedne's solution — we can just skip at least one of those tests and we'll still be able to use the process of elimination to find the last wolf if necessary. (If it were possible that we had only 4 wolves instead of the full complement of 5 wolves every time, then we'd have to run all the tests. Mathematically, this is the difference between requiring that our matrix $M$ be 5-disjunct or only 5-separable.)
Here is the $59\times 100$ matrix $M$ that I got by following @Elaqqad's algorithm. Each of the 59 rows represents a test; each column represents an animal. Each test $t$ combines blood from the animals $i$ where $M_{t,i} = 1$. For the counting-impaired, the numbers in the left margin simply count up the tests from 1 to 59; the (numbers)
in the right margin indicate how many animals are involved in each test. This series of 59 tests can identify the 5 wolves from among our 100 animals.
59 tests: TLDR
The C++ code that produced this diagram is available at github.com/Quuxplusone/wolves-and-sheep.
1 11111111111......................................................................................... (11)
2 1..........1111111111............................................................................... (11)
3 1....................1111111111..................................................................... (11)
4 1..............................1111111111........................................................... (11)
5 1........................................1111111111................................................. (11)
6 1..................................................1111111111....................................... (11)
7 1............................................................1111111111............................. (11)
8 1......................................................................1111111111................... (11)
9 .1.........1.........1.........1.........1.........1.........1.........1.........111................ (11)
10 ..1.........1.........1.........1.........1.........1.........1.........1........1..11.............. (11)
11 ...1.........1.........1.........1.........1.........1.........1.........1.......1....11............ (11)
12 ....1.........1.........1.........1.........1.........1.........1.........1......1......11.......... (11)
13 .....1.........1.........1.........1.........1.........1.........1.........1.....1........11........ (11)
14 ......1.........1.........1.........1.........1.........1.........1.........1....1..........11...... (11)
15 .......1.........1.........1.........1.........1.........1.........1.........1...1............11.... (11)
16 ........1.........1.........1.........1.........1.........1.........1.........1..1..............11.. (11)
17 ....1..............1.......1....1................1.....1............1.......1.....1...1............. (10)
18 ........1......1.............1......1....1.................1.......1......1.........1.1............. (10)
19 ....1.............1...........1.....1.....1..............1...........1.....1.......1...1............ (10)
20 .....1.....1............1..............1.........1........1.......1..........1.......1.1............ (10)
21 ...1........1.............1.............1....1...........1............1.......1...1.....1........... (10)
22 .........1.......1.....1...........1..............1.......1..1..............1.......1...1........... (10)
23 ..........1.....1..........1.......1............1...........1.1..........1.........1.....1.......... (10)
24 ......1...........1..........1.......1.......1.......1.......1.................1.....1...1.......... (10)
25 ......1.............1.......1.....1........1...............1..1..............1....1.......1......... (10)
26 ..........1.1................1........1........1...1............1...........1..........1..1......... (10)
27 ........1....1........1.................1.........1.....1.......1............1.....1.......1........ (10)
28 .........1.1..................1......1........1.......1.......1...............1.......1....1........ (10)
29 ..........11................1....1..........1............1.......1..............1...1.......1....... (10)
30 ..1................1.1..................1..1..............1........1.......1.............1..1....... (10)
31 .......1...........1.....1.......1.......1..................1...1.............1......1.......1...... (10)
32 ........1...........1......1...........1..1..........1...........1.....1................1....1...... (10)
33 ...1............1...........1..1..................1....1.............1....1..........1........1..... (10)
34 .1.............1..............1.......1....1................1.....1.....1...............1.....1..... (10)
35 .........1....1......1...........1........1.............1...........1..........1..........1...1..... (10)
36 .....1.......1...............1..1...............1.....1...............11....................1.1..... (10)
37 .1................1......1........1..............1......1.............1..1..........1..........1.... (10)
38 ...1...........1......1................1......1....1................1...........1........1.....1.... (10)
39 ......1............1...1..............1.....1.......1................1.1...................1...1.... (10)
40 .........1..1...........1......1................1..........1...1...........1.................1.1.... (10)
41 .......1......1........1........1............1.............1......1.............1..1............1... (10)
42 .1..............1.......1...............1......1....1............1.............1......1.........1... (10)
43 ..1..............1........1............1.1............1..............1...1................1.....1... (10)
44 ....1...............1....1...........1............11...........1........1...................1...1... (10)
45 .....1...........1....1.............1.......1...............1..1...............1..1..............1.. (10)
46 .......1............11.............1..........1.....1.................1...1............1.........1.. (10)
47 ..........1...1...........1....1.................1...1.............1....1..................1.....1.. (10)
48 ..1..........1................1...1............1.......1.....1..................1............1...1.. (10)
49 ...1..........1..........1..........1..........1..........1...1........1..........................1. (9)
50 ........1...1........1...............1......1..........1..........1......1........................1. (9)
51 .1...............1..........1...1.............1......1..........1..........1......................1. (9)
52 ....1..........1..........1......1..............1...1........1...............1....................1. (9)
53 .........1..........1........1..........1........1..........1........1..........1.................1. (9)
54 ..................................................................................1.1..1.1.1.11.1.1. (9)
55 ......1......1..........1..........1.....1...............1..........1...1..........................1 (9)
56 ..1........1...............1..........1......1..........1......1..........1........................1 (9)
57 .......1..........1...1........1...........1..........1..........1..........1......................1 (9)
58 ..........1........1..........1........1..........1........1..........1........1...................1 (9)
59 ...................................................................................1.11.1.1.1..1.1.1 (9)