March 18, 2006
Blog has been moved
This post has been moved to blogspot. No further posts will be made to this location.
Pigs Pens and Ball Bearings
A math teacher friend gave me a puzzle the other day. I'll post her's and one that I heard too. In a couple of days I'll post the answers if no one has gotten it.
You have 27 pigs that you must place in 4 pens. Each pen must contain an odd number of pigs (zero is not an odd number). You can't have 1/2 pigs or anything like that.
Posted by jim at March 18, 2006 09:53 AM
You have 7 ball bearings and an equal arm balance. One ball is slightly heavier than the others. What is the fewest number of weighings that you will need to find the heavy ball?
The answer to the second problem is two.
First you weigh three and three. If they are equal, the heaviest is the seventh you didn't measure. If not, take the three on the heaviest side... and weigh one against one. If the are equal, the heaviest is the third.
An answer to the first problem:
Have four pens A, B, C and D. Put 7 pigs in each A, B and C and put 6 pigs in D. That's 27 pigs. A, B and C all have odd numbers of pigs so far.
BUT put pen C inside pen D. Now D has 13 pigs in it. A, B and C still have 7 pigs inside.
For the pig problem I thought that I had asked if you could put pens inside pens, to which I thought the answer was "no". Well, the person who gave me the problem said I didn't make it a "question", so they didn't answer... grrr...
Another solution is that you put 27 pigs in pen A, and put each pen inside another. Then each pen has 27 pigs in it.
There are really a whole set of solutions...
Thats a stupid question with the pigs. If you have w,x,y,z pigs in each of the pens, then you can never have all w,x,y,z be odd and still add up to 27, since 2 odd numbers (or any even number of odd numbers) always add up to an even number. This right off points out that something is wrong. The fact that you put a fence inside a pen doesn't stop it from being 1 pen. What really threw me off was that you said that a math teacher gave you the problems, so I assumed they were math related and not riddles. Also stating that zero isn't odd (when has it ever been) and that you aren't allowed to have half pigs, I thought that we weren't allowed to have stupid things like pigs being in 2 pens. Putting 1 pig in 2 different pens is pretty equivalent to using 1/2 pigs.
And ryan, good answer on the ball bearing, that's an actual math-type problem.
The pig question was to allow people to think "out of the box" or "pen" if you will... ;-)
No where do you use 1/2 of a pig so I don't agree with you on that. The solution with nested pens fits the criteria for a "correct" answer. The point is to challenge the reader, not to argue if you thought it was a stupid question.
For my part, I was given the problem while drunk. A couple of days later I ended up writing a short program to test for valid solutions (since I had *thought* that I asked if you can put pens inside of pens). Just for interest, there are 2600 solitions where the sum of pigs in different pens add up to 27. ;-)
Here it goes. If you put pen B inside Pen A, and then you put a pig in Pen B then the pig isn't also in Pen A. The pigs in Pen B have no contact with the pings in Pen A, and therefore they are not in Pen A, You've just decreased the area of Pen A by the Area of Pen B. Pen A now is shaped like a donut, and Pen B is shaped like a circle. That or something like it. I'd draw it out with ascii art, but that doesn't work with variable width fonts.
"The pigs in Pen B have no contact with the pings in Pen A, and therefore they are not in Pen A".
I don't think that follows.
Here's a different example that (I think) follows your logic:
Kibbee puts on a t-shirt, then puts a jacket on. Since Kibbee doesn't have any direct contact with his jacket, so is he wearing the jacket?
Kibbee drives a car into a garage. Jim is standing beside the car tapping on the window. Jim has no contact with Kibbee. Are they both in the garage?
Since I feel I need to draw pictures, I posted my response here.
I'm glad to hear that someone is finally taking this problem seriously. Enough ignorance, we need to get this settled once and for all.
how do you get 9 pig into 4 pens???
Due to the proliferation of comment spam, Iíve had to close comments on this entry. If you would like to leave comment, please use one of my recent entries. Thank you and sorry for any inconvience caused.