# logic question

#### Royal Pineapple

##### macrumors 65816
Original poster
übergeek asked me to post this here, apparently its been driving her nuts.
i have no idea how to go about solving this.

There is a bookshelf, with 10 shelves that each have 20 books on it. For the purposes of this problem, all of the 200 books are exactly the same in outward appearance, except one shelf that has books that vary in weight from the other books. There is a scale next to that bookshelf, where you pile whatever you would like on it, press the button and get the weight. Given that the scale only works once, how would you figure out which shelf has the books that are different from the others?

#### janey

##### macrumors 603
just to clarify, because my original blog post was not clear enough, maybe a few hints scattered here and there too
• the scale weighing is necessary (otherwise it would be subjective, and on top of that if the weight variation was so minimal that it could not be discerned...)
• the physical action of picking each book up, aside for the purpose of putting it on the scale, is not significant.
• there is an answer that is not "there is no answer to this problem" or "this problem cannot be solved"
• the books on the outside look exactly the same, it's just that 20 books on one shelf weigh slightly different from the others
• re: above point...uniform variance among all the books on that one shelf.

##### Moderator emeritus
I don't suppose you can rearrange the books on the shelf?

#### janey

##### macrumors 603
I don't suppose you can rearrange the books on the shelf?
if you can explain how you can find the shelf with the different books, i don't see why not.

##### Moderator emeritus
übergeek said:
if you can explain how you can find the shelf with the different books, i don't see why not.

Nah, I thought I was onto something. Sorry.

Uh...no idea.

#### Guitarius

##### macrumors 6502a
Could you put one book on the scale at a time, one book from each shelf, and watch for a larger increase in weight?

##### Moderator emeritus
Guitarius said:
Could you put one book on the scale at a time, one book from each shelf, and watch for a larger increase in weight?

I'm assuming you can only press the button once so probably not.

#### clayj

##### macrumors 604
Do we know what a "standard" book weighs and what a "non-standard" book weighs? Because if so, here's what you do:

1. Take one book from Shelf One, two books from Shelf Two, three books from Shelf Three, etc. (all the way up to ten books from Shelf Ten) and put them on the scale.

2. Weigh the books.

Assuming that a standard book weighs "x" and that a non-standard book weighs "x+y", if all of the books weighed the same, the weight on the scale would be 55x. The difference between 55x and the ACTUAL weight is "z"; divide z by y to get how many y's make up the difference. If there are 1 y's in z, then the heavier books are on Shelf One; if 5 y's, then the heavier books are on Shelf Five (since 5 books came from Shelf Five).

#### ravenvii

##### macrumors 604
It says "press the button to get the weight", so it ain't a normal scale if you know what I mean.

EDIT: damn, I had to sit there and try to think through the problem before pressing submit. Disregard.

#### janey

##### macrumors 603
yeah, you can only use it once. assume the scale won't give you a reading until you press the button.

#### janey

##### macrumors 603
clayj said:
Do we know what a "standard" book weighs and what a "non-standard" book weighs? Because if so, here's what you do:
Yeah, I got lots of those replies. Assume you are not given the weights, just that if
x = weight of "normal" books
y = weight of different books
and x != y, but x>y or x<y, but that is not given.

#### ravenvii

##### macrumors 604
Well, then you can use the formula made by clayj above, and do a painfully slow and thorough test of various numbers to the forumula. You'll eventually get the number...

Let's hope we come up with an pill of immortality soon.

#### me_94501

##### macrumors 65816
übergeek said:
yeah, you can only use it once. assume the scale won't give you a reading until you press the button.
What if I put something on the scale, push the button, then add or remove items? Will the scale's readout change as I add/remove items or stay at what it was when I pressed the button?

Why am I wasting my time with this thread? I have a final to study for!

#### janey

##### macrumors 603
Raven VII said:
Well, then you can use the formula made by clayj above,...
i really hope you're being sarcastic right now

#### clayj

##### macrumors 604
übergeek said:
Yeah, I got lots of those replies. Assume you are not given the weights, just that if
x = weight of "normal" books
y = weight of different books
and x != y, but x>y or x<y, but that is not given.
So my solution would not work, because we do not KNOW the weights of any of the books (example: standard book = 1000 g, non-standard book = 1025 g or 975 g)?

If you only get one weighing, the only way to differentiate books from each other (that I can think of at the moment) is to vary the number of books taken from each shelf, systematically.

#### janey

##### macrumors 603
me_94501 said:
What if I put something on the scale, push the button, then add or remove items? Will the scale's readout change or stay at what it was when I pressed the button?

Why am I wasting my time with this thread? I have a final to study for!
lets say its a stupid scale, and you can only press the button once, and it will give you only one readout, and nothing else. You can pile whatever you want on it, but it's going to stay the way it did when you pressed the button.

#### janey

##### macrumors 603
clayj said:
So my solution would not work, because we do not KNOW the weights of any of the books (example: standard book = 1000 g, non-standard book = 1025 g or 975 g)?

If you only get one weighing, the only way to differentiate books from each other (that I can think of at the moment) is to vary the number of books taken from each shelf, systematically.
you have an equation with a few variables, so it gives a range of possible answers, but not _the_ answer.

and yeah. /me emails person who originally told her this problem to clarify some points

#### janey

##### macrumors 603
me_94501 said:
very funny
but really, what if you had no choice but to use that broken scale? what would your answer be?

#### clayj

##### macrumors 604
übergeek said:
you have an equation with a few variables, so it gives a range of possible answers, but not _the_ answer.

and yeah. /me emails person who originally told her this problem to clarify some points
Clarification would be good.

But I gotta tell you, I think I'm right... the way to tell the books apart is to vary how many from each shelf are placed on the scale (1 from Shelf 1, 2 from Shelf 2, 10 from Shelf 10, etc.) and then compare the actual weight measured to what it would be if all of the books were the same, and do the math. This all assumes that you know what a standard book weighs. If you don't know what a standard book weighs, I don't think you can solve this problem.

EDIT: You do have to know what a NON-standard book weighs, as well. Otherwise, you don't know if the difference is caused by a single really heavy book, or ten slightly-heavy books, or something in between.

#### janey

##### macrumors 603
clayj said:
Clarification would be good.

But I gotta tell you, I think I'm right... the way to tell the books apart is to vary how many from each shelf are placed on the scale (1 from Shelf 1, 2 from Shelf 2, 10 from Shelf 10, etc.) and then compare the actual weight measured to what it would be if all of the books were the same, and do the math. This all assumes that you know what a standard book weighs. If you don't know what a standard book weighs (you don't even have to know what a NON-standard book weighs), I don't think you can solve this problem.
yeah, a bunch of people had the same answer, but not given the weights..
Eh. I guess I'll just have to wait for his email.

#### Guitarius

##### macrumors 6502a
This is why I'm a writer. Because I can't figure stuff like this out. I have no problem solving skills of that nature.

#### ravenvii

##### macrumors 604
You said 10 shelves and 20 books. There gotta be a reason those two numbers are picked specifically... **** if I know, just throwing in ideas.