By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,131 Members | 2,321 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,131 IT Pros & Developers. It's quick & easy.

Source code c++ to filter lottery

P: n/a
Hi All,

Any body help me in this problem?

I want source code for generation very fast possible random
combinations for "n,k" but filtering collection of (n,k) combinations
such have no more than 4 elements in common?

It sees this example:

C 10,6 = 210 FULL

But, filtering C 10,6 with maximum 4 elements in common = 18

01 02 03 04 05 06
01 02 03 04 07 08
01 02 03 04 09 10
01 02 03 05 07 09
01 02 03 05 08 10
01 02 03 06 07 10
01 02 03 06 08 09
01 02 04 05 07 10
01 02 04 05 08 09
01 02 04 06 07 09
01 02 04 06 08 10
01 02 05 06 07 08
01 02 05 06 09 10
01 02 07 08 09 10
03 04 05 06 07 08
03 04 05 06 09 10
03 04 07 08 09 10
05 06 07 08 09 10

Thanks
Jul 23 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.