*
The moose likes Programming Diversions and the fly likes [Easy] Eating books. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Other » Programming Diversions
Bookmark "[Easy] Eating books." Watch "[Easy] Eating books." New topic
Author

[Easy] Eating books.

David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

This is an easy one, and you shuld have encountered it before...
Tom the bookworm crawls onto a bookcase containing the complete works of Shakespear (Trevor, not William). There are 10 books, each 100 pages (no covers), arranged from the first volume to the tenth, in order. Tom eats through the first page of the first colume, and eats through each book until he eats through the last page of volume ten.
How many pages does he eat through?
Shalu Ban
Ranch Hand

Joined: Feb 18, 2003
Posts: 72
802
As the books are arranged from 1 - 10 in order so from the first page of first volume to last page of tenth volume will be 1(First page of volume 1)+ 800(8 books of 100 pages are in between) + 1 (Last page of volume 10). So 1+ 800+ 1 = 802


Happiness is doing what is right.
Arjun Shastry
Ranch Hand

Joined: Mar 13, 2003
Posts: 1874
How are the books arranged?


MH
fred rosenberger
lowercase baba
Bartender

Joined: Oct 02, 2003
Posts: 11168
    
  16

The books are arranged with vol. 1 on the far left of the shelf, then numerically up to vol 10 on the far right.


There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
HS Thomas
Ranch Hand

Joined: May 15, 2002
Posts: 3404
10 x 100 = 1000 pages.
No book has covers and the worm eats through each book..
Tom the bookworm eats through 1000 pages.
Sameer Jamal
Ranch Hand

Joined: Feb 16, 2001
Posts: 1870
Originally posted by HS Thomas:
10 x 100 = 1000 pages.
No book has covers and the worm eats through each book..
Tom the bookworm eats through 1000 pages.

The bookworm starts from page 1 of volume 1 then eats all pages between this page and up to the back cover of volume 10.
In any encyclopedia the first page of volume 1 is actually closest to volume 2!
page 100 of volume 10 is actually next to volume 9!
So, starting from page 1 of vol. 1 (which the bookworm DOES NOT EAT) it eats all pages of vol. 2, 3, 4, 5, 6, 7, 8, and 9 which adds up to 800 pages.
[ April 22, 2004: Message edited by: Sameer Jamal ]
Shalu Ban
Ranch Hand

Joined: Feb 18, 2003
Posts: 72
Originally posted by Sameer Jamal:

So, starting from page 1 of vol. 1 (which the bookworm DOES NOT EAT) it eats all pages of vol. 2, 3, 4, 5, 6, 7, 8, and 9 which adds up to 800 pages.

The question says :
Tom eats through the first page of the first colume, and eats through each book until he eats through the last page of volume ten.
So , it is 802 pages
ChanSan Mehbubani
Ranch Hand

Joined: Dec 30, 2003
Posts: 108
{
In any encyclopedia the first page of volume 1 is actually closest to volume 2!
}
Is this some Jamal's theorem or axiom?
Can you explain this,how is that?What is meant by closest?


I am a Papad
Sonny Pondrom
Ranch Hand

Joined: Jun 05, 2001
Posts: 128
Is it two-sided? then Volume 4 page 100, has Volume 5 page 1 on the back side. :roll:
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24183
    
  34

Originally posted by Tanga Palti:

Is this some Jamal's theorem or axiom?
Can you explain this,how is that?What is meant by closest?

Take two books. Put them on a shelf, spine out. Look at them. You'll see that the first page of the left-hand book is in between the two books.


[Jess in Action][AskingGoodQuestions]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: [Easy] Eating books.
 
Similar Threads
2 process.
Encyclopedia
It's alright, I've updated my profile.....
"Building Java Enterprise Applications, Volume 1:" - Release Announcement - O'Reilly
is Head First Servlets & JSP the right book for me?