So I'm tutoring at the library and an elementary or pre K student shows me a sheet with one problem on it:
Put 9 pigs into 4 pens so that there are an odd number of pigs in each pen.
I tried to solve it and failed! Does anybody know how to solve this? This question seems ridiculously difficult and impossible IMO.
$\endgroup$2718 Answers
$\begingroup$Since this has been exposed, some claim, to be a riddle and not a bona fide math question, why not completely drive the stake through its heart:
Pen 1: 7 pigs
Pen 2: 1 pig
Pen 3: 3 pigs
Pen 4: -2 pigs
Now the astute reader will note that -2 pigs is a pretty darn odd number of pigs to be in a pen!
$\endgroup$13$\begingroup$It appears to be a trick question.
Make 3 pens, put 3 pigs in each pen. Then put a 4th pen around all 3 of the other ones, and you have 9 pigs in that pen.
Update
@MJD found a source for this problem with solution, see Boys' Life magazine from 1916.
$\endgroup$24$\begingroup$Lemma: $-\frac{1}{12}$ is an integer.
proof: Consider the Riemann zeta function $\zeta$ evaluated at $-1$. By analytic continuation, $\zeta(-1) = -\frac{1}{12}$. However, we also have the series expansion $\zeta(s)=\displaystyle \sum_{n=1}^\infty n^{-s}$, so (ignoring issues with convergence), $\zeta(-1)=1+2+3+\cdots$. This is an infinite sum of integers. Any finite sum of integers is an integer, and the since the integers are a closed set (and hence contain all limit points) this also holds in the limiting case. Hence $-\frac{1}{12}$ is an integer.
Corollary $\frac{2}{3}$ is odd.
proof: By above, since $-\frac{1}{12}$ is an integer, $4 (-\frac{1}{12})=-\frac{1}{3}$ is an even integer. Since the successor of any even integer is odd, $-\frac13 +1 = \frac23$ is odd.
Theorem It is possible to put 9 pigs in 4 pens such that each pen has an odd number of pigs.
proof: For the first pen, put $7$ of the pigs in. Cut the remaining $2$ pigs into equal thirds and put two of the thirds in each of the remaining pens. Since $7=2\times3+1$, $7$ is odd. By corollary above, $\frac23$ is odd. Hence all four pens have an odd number of pigs.
Note: The above is humor.
$\endgroup$8$\begingroup$It's not possible. Adding an even number of odd numbers will give an even number: $(2a+1) + (2b+1) = 2(a+b+1)$.
$\endgroup$5$\begingroup$Put 9 pigs into 4 pens so that there are an odd number of pigs in each pen.
What about the simplest solution? The case where the pens are 'embedded' within each other:

Four pens, Nine in each. Nine is odd.
$\endgroup$4$\begingroup$I think I finally got the teachers intended solution ;)
A pen is a closed fence, and since the earth is spherical there is no preferred side of the fence which is the enclosed one. Solution: Put 9 pigs anywhere, put 4 separate pens beside them.
$\endgroup$2$\begingroup$There is many ways to do it. The real question is: how many? I wonder does the last in this picture counts?

Put 9 pigs into 4 pens so that there are an odd number of pigs in each pen.
Each of pens $1,2,3,$ and $4$ have an odd number of pigs in them with $1$ each. The last $5$ pigs are liberally interpreted as being 'put into' the $4$ pens. Though they aren't inside one of the four pens they're inside the four pens.
I didn't see this in the pictured solutions so I thought I'd add it. Apologies if it was already mentioned. It was however mentioned that you could put $1$ in each of the $4$ pens and let the other $5$ roam free. But, what good are your pigs if when you want bacon you discover they walked away? This fixes your bacon in place. Nevertheless, I had fun drawing piggy banks!
$\endgroup$$\begingroup$Put one in each pen and let the other 5 roam.
No one said they all had to be enclosed in pens when you were done.
$\endgroup$1$\begingroup$Here are 88 solutions (I believe this is all of them):
[2,[2,[4,[1]]]] [4,[2,[2,[1]]]] [2,[1]],[3],[3] [1],[[3]],[5] [4,[[2,[3]]]] [[6,[[3]]]] [6,[1,[1],[1]]] [2,[[[7]]]] [1],[3],[4,[1]] [[3]],[3],[3] [2,[1],[1],[5]] [2,[4,[2,[1]]]] [1,[2,[1]],[5]] [1],[3],[[5]] [1,[3],[4,[1]]] [[4,[4,[1]]]] [1,[[3]],[5]] [2,[5,[1],[1]]] [7,[[1]],[1]] [4,[[[5]]]] [5,[1],[[3]]] [1],[1],[6,[1]] [[8,[[1]]]] [1,[1],[[7]]] [[2,[6,[1]]]] [[[2,[7]]]] [6,[1],[1],[1]] [[1]],[3],[5] [1,[3],[2,[3]]] [3,[1],[2,[3]]] [[2,[[7]]]] [[4,[[5]]]] [[6,[2,[1]]]] [1,[[1]],[7]] [1],[1],[2,[5]] [2,[6,[[1]]]] [1,[1],[4,[3]]] [2,[[2,[5]]]] [[3],[3],[3]] [[[6,[3]]]] [[[8,[1]]]] [5,[1],[2,[1]]] [4,[4,[[1]]]] [[[4,[5]]]] [2,[2,[[5]]]] [1,[1],[2,[5]]] [1],[1],[4,[3]] [2,[4,[[3]]]] [6,[2,[[1]]]] [[[[9]]]] [6,[[[3]]]] [[1,[1],[7]]] [1],[2,[1]],[5] [1,[1],[6,[1]]] [2,[1,[1],[5]]] [2,[[4,[3]]]] [8,[[[1]]]] [4,[3,[1],[1]]] [1,[3],[[5]]] [4,[1],[1],[3]] [[4,[2,[3]]]] [2,[2,[2,[3]]]] [[3,[3],[3]]] [[3,[1],[5]]] [3,[[3]],[3]] [3,[1],[[5]]] [[2,[4,[3]]]] [2,[1,[3],[3]]] [[1],[3],[5]] [2,[[6,[1]]]] [4,[1,[1],[3]]] [3,[2,[1]],[3]] [6,[[2,[1]]]] [[1],[1],[7]] [2,[3,[1],[3]]] [1],[3],[2,[3]] [[7,[1],[1]]] [[1,[3],[5]]] [[5,[1],[3]]] [[2,[2,[5]]]] [2,[1],[3],[3]] [5,[[1]],[3]] [4,[2,[[3]]]] [3,[[1]],[5]] [[1]],[1],[7] [4,[[4,[1]]]] [3,[1],[4,[1]]] [1],[1],[[7]] $\endgroup$1$\begingroup$Suppose you have 4 pens. An odd number looks like this: $2a + 1$ for some integer $a \ge 0$. Now make for pens and add.
$$2a+1+2b+1+2c+1 +2d+1 = 2(a+b+c+d) + 4 = 2(a+b+c+d+2).$$
The result is even.
$\endgroup$2$\begingroup$Nobody said the pens were disjoint. With non-disjoint pens, there are many solutions.
$\endgroup$2$\begingroup$Just put the pigs in the first pen, then put that pen inside the next pen, etc.
The last pen will contain a pen that contains a pen that contains a pen that contains 9 pigs, but all 4 pens will contain 9 pigs.
You could also put 3 pigs each in 3 pens, and put those 3 pens inside the bigger pen.
$\endgroup$$\begingroup$The problem as stated is impossible under the usual interpretation, because the sum of four odd numbers will be even, and so can't equal $9$. But the trick question interpretation from Amzoti's comment/answer seems pretty plausible!
$\endgroup$$\begingroup$Put 6 pigs in the first pen, then 1 pig in each subsequent pen. Don't feed the pigs in the first pen. The first pen will contain an odd number of pigs soon enough.
Another option is to make sure that of the 6 pigs in the first pen, one is the mother, the remainder being piglets and hope for the worst. Same result. That's how pigs get down.
$\endgroup$2$\begingroup$Let's rephrase the problem using well defined mathematical terms: as far as I know pigs and pens are not such well defined unambiguous mathematical terms.
Maybe something like:
Dispatch integers from 1 to 9 between 4 sets of integers.
It becomes obvious that it is impossible if sets are disjoint, and trivial if they are not.
And as more "classical" question we could also ask how many ways there is to dispatch these integers between 4 sets where number of items in every set is odd.
$\endgroup$3$\begingroup$Just put all the 9 pigs within a pen. Then build a second pen all around the first, a third one all around the second and so on. You will end up by having each pen containing an odd number of pigs.
$\endgroup$$\begingroup$I assume in elementary school they are not expected to know the parity of zero, so why not this:
3,3,3,0
Thats 9, and all "not even" (again, forget about the parity of zero).
$\endgroup$5
