Re: [algogeeks] Re: Google puzzles

2011-03-30 Thread Tushar Bindal
Arpit
The formula that you have written is wrong. You would have approached it
correctly but the formula written here is incorrect.

m= n + (n**1/6* + (n-1)) + ((n**7/6* + (n-1))**1/6* + n-2) +..

If you add all the terms there should be 1/6 in these terms as the terms
give the number of medals given on each day.
If you use 7/6, you only need to solve for one term where n-6 would come. As
the terms in the series when 7/6 is used give the number of medals remaining
at (n-i)th day.


Sukhmeet,
You have to apply the formula
n = k - [(n-1) + (1/7)(k- (n-1))]
where k is taken to be the number of medals at the start of (n-1)th day.
on (n-1)th day, n-1 medals are given. Then (k - (n-1)) medals are left.
1/7 of these are given away as well.
So after (n-1) days  the medals left are given by RHS of the equation which
is equal to n - the medals left which are given on nth day.

Solving this equation we get:
k - (n-1) = 7/6*n

Thus, medals given away on (n-1)th day = (n-1) + (1/7)*(7/6*n) = (n-1) +
1/6*n
Similarly medals given away on (n-2)th day = (n-2) + (1/7)*(7/6*(sum of
medals given on (n-1)th and nth days))
   = (n-2) +
(1/7)*(7/6*(n-1 + 7/6*n))
   = (n-2) +
(1/6)*(n-1 + 1/6*n))

For  (n-i)th day,
medals given away = (n-i) + (1/6)*(sum of medals given away from (n-
(i-1))th to nth day)
It goes on like this till we get the term for first day.


SO total medals, m = n + [(n-1) + 1/6*n]  +  [(n-2) + (1/6)*(n-1 + 7/6*n))]
+...
Put 6 in this equation and we get the required answer m = 36


Simple formula
m = n + [(n-1) + 1/6*first term]+ [(n-2) + (1/6)*(sum of 1st and 2nd term)]+
 + [(n-i) + (1/6)*(sum of all terms till now)] + 
i goes upto n

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: Google puzzles

2011-03-29 Thread sukhmeet singh
arpit can u a bit more explain how u came up with this formula ???

On Thu, Mar 17, 2011 at 11:11 PM, arpit.gupta arpitg1...@gmail.com wrote:

 ans is n=6, m=36;
 m= n + (n*7/6 + (n-1)) + ((n*7/6 + (n-1))*7/6 + n-2) +..
 now n must be a multiple of 6. taking n=6, we get the answer m= 36

 On Mar 16, 3:27 pm, may.I.answer may.i.answ...@gmail.com wrote:
  In a sports contest there were m medals awarded on n successive days
  (n  1).
 1. On the first day 1 medal and 1/7 of the remaining m - 1 medals
  were
 awarded.
 2. On the second day 2 medals and 1/7 of the now remaining medals
  was
 awarded; and so on.
  3. On the nth and last day, the remaining n medals were awarded.
 
  How many days did the contest last, and how many medals were awarded
  altogether?

 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: Google puzzles

2011-03-18 Thread bittu
Hi here is the basic approach as we know in a week atmost  7 days ..so
start with hit and trial

Total 36 medals were awarded and the contest was for 6 days.

On day 1: Medals awarded = (1 + 35/7) = 6 : Remaining 30 medals
On day 2: Medals awarded = (2 + 28/7) = 6 : Remaining 24 medals
On day 3: Medals awarded = (3 + 21/7) = 6 : Remaining 18 medals
On day 4: Medals awarded = (4 + 14/7) = 6 : Remaining 12 medals
On day 5: Medals awarded = (5 +7/7) = 6 : Remaining 6 medals
On day 6: Medals awarded 6

Clear and Simple

Thanks
Sahshank

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: Google puzzles

2011-03-18 Thread murthy.krishn...@gmail.com
hey we can do like dis man using trial and error, so start with m = 15, 22,
29 etc. obviuosly we cant start with 8 as n must be greater than 1. I think
u people got the reason for starting with 15(1+14 is divisible by 7),
22(1+21 is divisible by 7) etc.

test for m = 15;

Day 1:- medals = 1+14/7 = 3;
Day 2:- medals = 2 + 10 which is not divisible by 7

test for m = 22;

Day 1:- medals = 1+21/7=4;
Day 2:- medals = 2+16 which is not divisible by 7

test for m = 29;

Day 1:- medals = 1+28/7 = 5;
Day 2:-medals = 2+22 which is not divisible by 7

test for m = 36

Day 1:- medals = 1+35/7=6;
Day 2:- medals = 2+28/7=6;
Day 3:- meadals = 3+21/7 = 6;
Day 4:- medals = 4+ 14/7 = 6;
Day 5:- medals = 5+7/7 = 6;
Day 6:- medals = 6;

So m = 36 and n = 6. Hope I am clear.



On Fri, Mar 18, 2011 at 12:02 PM, bittu shashank7andr...@gmail.com wrote:

 Hi here is the basic approach as we know in a week atmost  7 days ..so
 start with hit and trial

 Total 36 medals were awarded and the contest was for 6 days.

 On day 1: Medals awarded = (1 + 35/7) = 6 : Remaining 30 medals
 On day 2: Medals awarded = (2 + 28/7) = 6 : Remaining 24 medals
 On day 3: Medals awarded = (3 + 21/7) = 6 : Remaining 18 medals
 On day 4: Medals awarded = (4 + 14/7) = 6 : Remaining 12 medals
 On day 5: Medals awarded = (5 +7/7) = 6 : Remaining 6 medals
 On day 6: Medals awarded 6

 Clear and Simple

 Thanks
 Sahshank

 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.