You are not logged in.
Pages: 1
Bob built a Web site and gave the URL only to his n friends, which he numbered from 1 to n. He
told friend number i that he/she can visit the Web site at most i times. Now Bob has a counter, C,
keeping track of the total number of visits to the site (but not the identities of who visits). What is
the minimum value for C such that Bob should know that one of his friends has visited his/her
maximum allowed number of times?
Offline
Hi eagerlearner;
I am not following you. The first friend ( i = 1 ) can visit at most 1 time. So wouldn't the minimum value of C be 1? That could mean friend #1 has been here the maximum.
In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.
Offline
and what if "the maximum value of C" is required instead of mimum?
Offline
You reason about it like this:
Supposing he had 2 friends.
The bottom row shows the maximum amount they can use the site without exceeding their limit. 0 + 1 = 1. If C is 1 or less than no one has come in to many times.
How about 3 friends:
The maximum amout is 0 + 1 + 2 = 3
For 4 friends:
The maximum number without anyone exceeding his limit is 0 + 1 + 2 + 3 = 6
For 5 friends:
0 + 1 + 2 + 3 + 4 = 10
if their is one more than this number than someone has reached his limit.
Can you finish now?
Last edited by bobbym (2013-03-22 19:21:13)
In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.
Offline
Pages: 1