Let R be the total reds on inner disk. Consider a half with 'r' reds. Half1 = r reds and 100-r whites Half2 = R-r reds and 100-R+r whites.
If r >= R-r, match half1 with Red half of outer disk. Total matching = r + 100 - R + r = 100 - R + 2*r Now r >= R - r => 2*r - R >= 0 Total matching = 100 - R + 2*r >= 100 If r < R - r, match half1 with white half of outer disk. Rest calculations are similar. On 3/18/07, Santhosh Suresh <[EMAIL PROTECTED]> wrote: > > This problem has been troubling me from quite a long time. > > The circumference of two concentric disks is divided into 200 sections > each. For the outer disk, 100 of the sections are painted red and 100 of > the sections are painted white. For the inner disk the sections are > painted > red or white in an arbitrary manner. Show that it is possible to align the > two disks so that 100 or more of the sections on the inner disk have their > > colors matched with the corresponding sections on the outer disk. > > > Please send in solutions. It seems to be trivial application of PHP. > > Thanks, > > > > --~--~---------~--~----~------------~-------~--~----~ 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.google.com/group/algogeeks -~----------~----~----~----~------~----~------~--~---