Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Overlapping combinations 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 that brute force?

TIA
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Overlapping combinations problem

Are you generating all combinations of size 3 from each of the 7 four digit
combinations. Or are you generating 3 digit combinations from the pool of 7
* 4 = 28 numbers? It is unclear to me what you are actually doing to get
your results.

--
Regards,
Tom Ogilvy





Dizzy wrote in message
le.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 that brute force?

TIA



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Overlapping combinations problem

Tom Ogilvy wrote:
Are you generating all combinations of size 3 from each of the 7 four digit
combinations. Or are you generating 3 digit combinations from the pool of 7
* 4 = 28 numbers? It is unclear to me what you are actually doing to get
your results.

--
Regards,
Tom Ogilvy



Hi Tom,

We generate all the combinations of c(N,k)=495
Then we compare every combination above, with the given B=7.
If that combination intersects any of the given 7 in at least t=3
elements then we have a match.
If one other of the 7 given also intersects that combination in at least
t points then than combination overlaps and appears twice.
That is how my list was generated.


Example:
The first combination we compare is
{1,2,3,4}
From the given 7, the 6th intersects the above in 3 elements {1,2,3}
So this one appears only once in our collection of sets.

The second is {1,2,3,5}
This one intersects the 1st & 6th set in 3 points so this one appears twice.
..
..
..
{1,3,6,10}
This one intersects the 2nd ,3rd & 6th so it appears 3 times
and so on.

But counting with brute force is very inefficient
when N and k is increasing.
I imagine that shall be some other way of doing this mathematically.
Like counting the overlapping N-tuplets of the given sets.
If you can imagine of any other way that this can be done faster I'll
appreciate your input.

I have prepared a worksheet that can do this by brute force.
If you wish to see it I'll post it.

Thanks again for your input.

Dizzy,





Dizzy wrote in message
le.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 that brute force?

TIA




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with pivot tables overlapping with new data jjonessnl Excel Discussion (Misc queries) 1 October 6th 09 03:00 PM
Overlapping Cells catlady Excel Discussion (Misc queries) 4 May 3rd 09 05:42 PM
Odd overlapping problem with standard column chart MJW[_2_] Charts and Charting in Excel 4 August 15th 07 09:09 PM
Overlapping Charts malewis48 Charts and Charting in Excel 1 March 9th 07 10:52 PM
Overlapping Pie Charts [email protected] Charts and Charting in Excel 1 June 22nd 06 03:44 PM


All times are GMT +1. The time now is 05:31 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"