Win a copy of Functional Reactive Programming this week in the Other Languages forum!

# Missing page

HS Thomas
Ranch Hand
Posts: 3404
As Mr Blogger picks up his morning papae one of the sheets slips out. Simply by seeing the two numbers on the pages facing you,5 and 15, can you deduce how many pages are in the whole paper ?

[ December 10, 2003: Message edited by: HS Thomas ]

Anupam Sinha
Ranch Hand
Posts: 1090
Can there be a single paper with two sides like pg no. 18 and 19 on a single sheet of paper?

HS Thomas
Ranch Hand
Posts: 3404
I guess so. If it was the middle page so the numbers would be 18 and 19 on the top facing page and behind, 17 and 20.

HS Thomas
Ranch Hand
Posts: 3404
(In case anyone thinks it is)

Jim Yingst
Wanderer
Sheriff
Posts: 18671

Jason Menard
Sheriff
Posts: 6450
The answer's 24. Not counting the coupons and other inserts of course.
The page on the bottom of p5 is p16 (that is, if we consider p5 to be the "top of the four pages contained on that sheet of paper, then p16 is the "bottom"), therefore the bottom of p4 is p18, p3 is p20, p2 is p22, and p1 is p24.

HS Thomas
Ranch Hand
Posts: 3404
Er,no, Jason.
p4 is not on top.
(Isn't that smiley cool. Someone's tapping his/her head whle someone else is looking on)
[ December 11, 2003: Message edited by: HS Thomas ]

HS Thomas
Ranch Hand
Posts: 3404
Another question :
Drill sergeant Fibius was born on the 256th day of 20 B.C. and died on the 24th day of 20 A.D. How old was Fibius when he died ?

Jim Yingst
Wanderer
Sheriff
Posts: 18671
I'm not sure what you guys mean by "bottom" here - you mean the other side of the page? It's a bit confusing since the 5 and 15 are on opposite sidesof the same peice of paper. But I say that on the other side of page 5 is page 6; the other side of page 15 is 16. (In any book I've seen, an odd page number n always has page n+1 on the other side.) So that's the one sheet we see. There's another sheet somewhere with pages 3 & 4 on opposite sides, and the other half has pages 17 & 18. Likewise there's a sheet with pages 1 & 2, and 19 & 20. Assuming a newpaper (unlike many books) has no pages prior to page 1, there should also be no pages after 19/20 - so the number of pages is 20.
Unless of course those wacky Brits number newpaper pages the way they do floors. In that case the first page isn't 1, but rather the "ground page" or some such, which is then followed by 1. I can't see any way this could lead to the page shown - unless maybe the fold is reversed and we're looking at it upside down, and the 5 and 15 are really 5 and 51 - in which case there would be 56 pages total, numbered 0-55. Which seems unlikely, but you never know...

HS Thomas
Ranch Hand
Posts: 3404
so the number of pages is 20.

Page numbering must be universal even the ones read right to left (RTL)

"bidirectional, or "bidi" for short. Although text is written from right-to-left, numbers are generally written the same way as with left-to-right languages. That is, numbers are written with the most significant digit positioned left-most."
So we are all bidi readers.
[ December 11, 2003: Message edited by: HS Thomas ]

Jim Yingst
Wanderer
Sheriff
Posts: 18671
Drill sergeant Fibius was born on the 256th day of 20 B.C. and died on the 24th day of 20 A.D. How old was Fibius when he died ?
Offhand: a little over 37 years and 4 months. I'm not going to try to figure out for myself how many leap years really occurred in that time frame. But since this is the programming diversions forum...

Good thing you HS chose dates after Julius reformed the calendar...

HS Thomas
Ranch Hand
Posts: 3404
I was going to question whether one can give an offhand answer and a programming solution. But as this is Jim's answer I guess offhand means it's precision may be off by 10^-3 (or whatver precision you need with months and dates.)
The answer given seems to cater for there not being a year '0'; A straight number count would have given the answer as 39 years.
Well ,if going with a programming solution the answer has to be exact.
A double check is required.

HS Thomas
Ranch Hand
Posts: 3404
Well, offhand I'd have said 38 years but I haven't got a machine at the moment that seems to want to run Java.
I guess if the Java solution was run it would say 37 years and 4 months....

Jason Menard
Sheriff
Posts: 6450
Originally posted by HS Thomas:
Er,no, Jason.
p4 is not on top.

Jim's answer is correct. I didn't read the question carefully and misinterpreted the image.