We Define an array Win[] which its i'th element
shows the best result player one can get if every
one plays his/her best games.
the base case is :
Win[1] = Win[3] = Win[4] = 1;
Win[2] = 3 (draw)


for filling the element Win[n]
we consider elements Win[n-1] , Win[n-3] , Win[n-4] . if
any of them is 2 then Win[n] is 1 else if any of them is 3
then Win[n] is 3 and if non of them occurs then Win[n] is 2.

For Win[5] = { Win[4], Win[2], Win[1] }  = 3
For Win[6] = { Win[5], Win[3], Win[2] } = 3

In this way we will all the array elemetns with 3....
So we will always find a startagy for draw only...

Am I missed anything?

Ragards
Ravi.


--~--~---------~--~----~------------~-------~--~----~
 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups-beta.google.com/group/algogeeks
-~----------~----~----~----~------~----~------~--~---

Reply via email to