File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Programming Diversions and the fly likes A puzzle 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 "A puzzle" Watch "A puzzle" New topic
Author

A puzzle

Mohanlal Karamchand
Ranch Hand

Joined: Jan 14, 2003
Posts: 189
From Brainjuice

Alvin and Buzz are nerds and like doing nerdy things. So Alvin called Buzz one day...

"Buzz, I've finished tracing my family tree back from the year 500 AD, and I found one quite special guy".

"What's so special about him?" asked Buzz.

"Well, he was x years old in the year x^2 (x squared) and he had a son who was y years old in the year y^3 (y cubed)".

Buzz looked perplexed "Sorry Alvin, but I can't solve for x or y".

"Well, he was your age when his son was born." said Alvin.

"You're right" said Buzz "He was a special old guy! But I still can't solve for x or y".
How old was the old guy when his son was born?
Jason Menard
Sheriff

Joined: Nov 09, 2000
Posts: 6450
Moved to Programming Diversions.
Stefan Wagner
Ranch Hand

Joined: Jun 02, 2003
Posts: 1923

I got multiple solutions, depending on what you think which is 'really old'.
Today, ages of over 130 years where reported.
For 1320 this would be a nearly impossible age, but do we have a proof?

0011000100110011001100000010000000110001001100100011000000100000001100010011001000110000
0011011100110110001000000011011100110000001000000011011000110000001000000011011000110000


http://home.arcor.de/hirnstrom/bewerbung
Warren Dew
blacksmith
Ranch Hand

Joined: Mar 04, 2004
Posts: 1332
    
    2
Try winnowing your answers down with the "but I still can't solve for x or y" constraint? If Buzz is 130, he can uniquely determine both x and y, I think.
Stefan Wagner
Ranch Hand

Joined: Jun 02, 2003
Posts: 1923

Ah - I thought Buzz is a fool.
Not a perfect logican...

So I will look at my approach again.
ravinder thirumala
Greenhorn

Joined: May 20, 2004
Posts: 6
son at 11----->year was 1331
father at 36--->year was 1296
father was 60 years when got son...
Sonny Pondrom
Ranch Hand

Joined: Jun 05, 2001
Posts: 128
OR ....
son at 12----->year was 1728 son born in 1716
father at 41--->year was 1681 dad born in 1640
father was 76 years when his son was born 0076
Stefan Wagner
Ranch Hand

Joined: Jun 02, 2003
Posts: 1923


Two possibilities, so Buzz doesn't know x and y.
Sonny Pondrom
Ranch Hand

Joined: Jun 05, 2001
Posts: 128
OR...
120 age of F at birth Age F: 0 year: 0 Age s: 5 year: 125
120 age of F at birth Age F: 10 year: 100 Age s: 6 year: 216

:roll:

Whoops: I forgot about the 500 AD rule
I had to look at the answer. Buzz was 60 years old.
[ June 26, 2004: Message edited by: Sonny Pondrom ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: A puzzle
 
Similar Threads
Only fun forwards for fun ...
Story...You must Read
Dirty math problem
World's Youngest SCJP
NRI in America....