All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Logic
Prisoner's Visitors Problem (Posted on 2009-01-21) Difficulty: 3 of 5
There are 60 records given to you which correspond to a prisoner who is imprisoned for 60 days. He has 6 relatives one of whom visits him daily and the others visit him every ith day from the day of his imprisonment (i=2,3,4,5,6 for these 5 relatives).
Every record is sealed with the day number on it which indicates the number of days he is jailed when the record is filed with the names of visitors on that particular day. You have to make a new record which should be filled with the following details:

visitor name - number of visits after 60 days

Assume that no other relatives visited him at all, names of these 6 relatives are different and you don't know their names. Find the minimum number of records that need to be checked to make the new record correctly. Find the number of ways you can choose the minimum number of records and you can still make the new record correctly.

See The Solution Submitted by Praneeth    
Rating: 4.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
initial idea | Comment 1 of 8

well so far the best I can come up with is 5 records.

Start with record 60, since this is a multiple of 1,2,3,4,5,6 all names will be on it

then open record 15, this will give you names 1,3,5 and by elimination from record 60 also give you 2,4,6

then open record 4, this will have names 1,2,4 but 1 will be the only name also on record 15 so will now have name for i=1

now open record 5, this gives 1 and 5, since we know 1 then we get 5 and by elimination from record 15 we also get 3.

finally open record 2 and this gives 1 and 5, since we know 1 then we get 2 and by elimination from record 4 we get 4.

So we now know all the names for i=1,2,3,4,5,6

and i=1 visits 60 times

i=2 visits 30 times

i=3 visits 20 times

i=4 visits 15 times

i=5 visits 12 times

i=6 visits 10 times

As for how many different ways this can be done, I'm currently working on that.  I'm doubting it can be done with fewer records but I could be wrong :-)


  Posted by Daniel on 2009-01-21 15:52:15
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (16)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information