@ Sharad
 I think the replier's logic and explanation for the same can be found here
.
 http://www.topcoder.com/tc?module=Static&d1=tutorials&d2=algorithmGames
Besides i think dp can also be applied here .but it needs lot of memory
 Santhosh .

On Sat, Aug 15, 2009 at 8:42 PM, sharad kumar <[email protected]>wrote:

> pls explain a bit.suppose there aaaaaare 2 baskets and lets assume 12 eggs
> in basket 1 and 15 in b2.wat will u do....
>
>
> On Sat, Aug 15, 2009 at 8:33 PM, Arun N <[email protected]> wrote:
>
>> this is same as NIM
>> the concept is Grundy Numbers
>> just xor all the numbers
>> if it is zero 1st player will lose
>> else 1st player will win
>> assuming both play optimally
>>
>> Arun,
>>
>> On Fri, Aug 14, 2009 at 7:50 PM, sharad kumar <[email protected]>wrote:
>>
>>> both
>>>
>>> On Fri, Aug 14, 2009 at 7:35 PM, ganesa thandavam 
>>> <[email protected]>wrote:
>>>
>>>>
>>>> is the number of eggs same in all baskets ???
>>>>
>>>> On Aug 14, 7:00 pm, sharad kumar <[email protected]> wrote:
>>>> > There are N egg baskets and the number of eggs in each basket is a
>>>> known
>>>> > quantity. Two players take turns to remove these eggs from the
>>>> baskets. On
>>>> > each turn, a player must remove at least one egg, and may remove any
>>>> number
>>>> > of eggs provided they all belong to the same basket. The player
>>>> picking the
>>>> > last egg(s) wins the game. If you are allowed to decide who is going
>>>> to
>>>> > start first, what mathematical function would you use to decide so
>>>> that you
>>>> > end up on the winning side?
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>
>>
>> --
>> Potential is not what U have, its what U think U have!!!
>> It is better to worn out than rust.
>>
>>
>>
>>
>>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at http://groups.google.com/group/algogeeks
-~----------~----~----~----~------~----~------~--~---

Reply via email to