ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   A counting problem? (https://www.excelbanter.com/excel-programming/289846-counting-problem.html)

Dizzy[_3_]

A counting problem?
 
Hi all,

Given some parameters N,k,t,B where N=k=t and B1
- Generate B random combinations from 1 to N of size k
- Calculate the unique and overlapping combinations of size t
that belong to the B combinations.

Ex:
N=12 k=4 t=3 B=7

1 2 4 5
1 3 6 7
1 3 10 11
2 7 9 11
3 4 5 8
1 2 3 6
4 6 7 9

My results a
Combinations appearing once =10
twice =288
3 times=190
4 times=7

How can we count the above faster than brute force?

TIA

Tim Williams

A counting problem?
 
Explain what you mean by "brute force".

If you mean can it be done without actuallly producing the random
combinations then probably the answer is no. The problem as stated is
not a *probability* question, so a general approach using probability
theory is not applicable.

Presumably the only scope for non-brute force is in the
post-generation stage of the problem.

I'm also not sure what you mean by "overlapping" combinations. You
might explain further there....

Tim.


"Dizzy" wrote in message
ble.rogers.com...
Hi all,

Given some parameters N,k,t,B where N=k=t and B1
- Generate B random combinations from 1 to N of size k
- Calculate the unique and overlapping combinations of size t
that belong to the B combinations.

Ex:
N=12 k=4 t=3 B=7

1 2 4 5
1 3 6 7
1 3 10 11
2 7 9 11
3 4 5 8
1 2 3 6
4 6 7 9

My results a
Combinations appearing once =10
twice =288
3 times=190
4 times=7

How can we count the above faster than brute force?

TIA





All times are GMT +1. The time now is 12:24 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com