I think this one might have some optimal substructure, though it's not exactly clear what that may be. I'll give it some thought.
On Dec 1, 6:26 am, "smartdude" <[EMAIL PROTECTED]> wrote: > Reading about hamming distance and clustering methods might help. > > bullockbefriending bard wrote: > > A single 6 Pick bet looks like this: > > > RACE1 RACE2 RACE3 RACE4 RACE5 RACE6 > > runner1 / runner 2 / runner 3 / runner4 / runner5 / runner6 - $amount > > > e.g. we might have: > > > 5 / 3 / 11 / 7 / 1 / 9 - $50 (5 to come 1st or 2nd in Race1, 3 to > > come first or 2nd in Race 2, etc.) > > 7 / 3 / 11 / 7 / 1 / 9 - $50 > > 5 / 3 / 11 / 14 / 1 / 9 - $50 > > 7 / 3 / 11 / 14 / 1 / 9 - $50 > > > The totalizator system allows us to merge or group these four bets as > > follows: > > > 5 + 7 / 3 / 11 / 7 + 14 / 1 / 9 - $50 ($200 total) > > > This method of expressing multiple bets in one line is advantageous > > because we may have many thousands of combinations we wish to bet and > > only a limited amount of time in which to bet them. > > > There are up to 14 horses in each race, so 7,529,536 possible 6 Pick > > bets. In practice, one might wish to bet (say) 15,000 combinations out > > of these 7.5 million. However, it would be very nice to be able to > > *optimally* merge (as shown above) these 15,000 combinations so that > > they might fit on (say) 2,000 betting tickets instead of trying to > > write out 15,000 single tickets. > > > To keep things simple, let's assume that all single bets are for the > > same amount. (In practice, however, this is not so.) > > > Now, it's certainly possible to go about this via brute force > > iteration, but I would really appreciate it if anyone with a CS > > background could point me toward a smarter plan of attack. I have > > perused Skiena's Algorithm Handbook and various websites and can't seem > > to find an analogous problem. I'm hoping this is just my ignorance and > > that my brief exposition rings a bell for someone here. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---