LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 394
Default Looping Problem

Hi Everyone,

I will be Completely Honest Up Front, this is a Lotto Problem, But has
NOTHING to do with Prediction Or Such Like.
If we were to Use 6 Numbers Drawn from 24 Numbers for Example, the FULL
Wheel would Consist of 134,596 Combinations, Achieved Using the Excel
Formula COMBIN(24,6).
For Example, if I was to Use the Following Abbreviated Wheel ( in Cells
"G13:L27" ) of 15 Combinations, it Guarantees that if I have 4 of the 6
Numbers Drawn Within my 24 Numbers, I will have a Minimum Match of 2
Numbers in at Least 1 of my Combinations.

01 03 07 12 15 16
01 04 05 17 20 21
01 08 09 10 19 22
01 13 14 18 23 24
02 03 06 09 21 23
02 10 12 14 16 20
02 11 15 19 20 24
03 04 07 10 18 24
03 05 07 14 17 19
04 06 08 14 15 22
04 09 11 13 16 19
05 10 13 15 17 23
05 11 12 18 21 22
06 08 12 16 17 24
07 08 13 20 22 23

How can I Produce the Total Combinations "Covered" by the Abbreviated
Wheel for Each of the "Matched" Categories Against that of the FULL
Wheel Please.
So the Results ( I Don't Know if the "Covered" Results are Accurate )
would Look something like this :-

Matched Tested Covered
2 if 2 276 209
2 if 3 2,024 2,008
2 if 4 10,626 10,626
2 if 5 42,504 42,504
2 if 6 134,596 134,596
3 if 3 2,024 300
3 if 4 10,626 5,289
3 if 5 42,504 35,720
3 if 6 134,596 131,922
4 if 4 10,626 225
4 if 5 42,504 4,140
4 if 6 134,596 35,304
5 if 5 42,504 90
5 if 6 134,596 1,635

The Formulas for Tested are ...

Matched Tested Formula
2 if 2 COMBIN(24,2) = 276
2 if 3 COMBIN(24,3) = 2,024
2 if 4 COMBIN(24,4) = 10,626
2 if 5 COMBIN(24,5) = 42,504
2 if 6 COMBIN(24,6) = 134,596
3 if 3 COMBIN(24,3) = 2,024
3 if 4 COMBIN(24,4) = 10,626
3 if 5 COMBIN(24,5) = 42,504
3 if 6 COMBIN(24,6) = 134,596
4 if 4 COMBIN(24,4) = 10,626
4 if 5 COMBIN(24,5) = 42,504
4 if 6 COMBIN(24,6) = 134,596
5 if 5 COMBIN(24,5) = 42,504
5 if 6 COMBIN(24,6) = 134,596

.... if that Helps.
I think to Achieve the Total Combinations "Covered" by the Abbreviated
Wheel is to Probably Loop through ALL the Categories of Possible
Combinations of 6 Numbers from 24 Numbers ( 134,596 Combinations ) and
Keep a Count of the "Covered" Abbreviated Wheel Combinations Against
the Matched FULL Wheel Combinations. Unfortunately I have NO Idea how
to Approach this.
The Abbreviated Wheel Combinations can be Less Or More than they are
Currently ( 15 Combinations ). The Code will Need to Recognise when it
is the Last Combination to Check.
I Hope I have Explained this Clearly Enough.

Any Help will be Greatly Appreciated.
Many Thanks in Advance.
All the Best.
Paul

 
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
Scrolling Looping Problem Nick Wakeham Excel Discussion (Misc queries) 0 June 12th 07 01:42 PM
Looping problem Sleeping Bear Excel Programming 2 July 7th 05 07:41 PM
If Then Else looping problem Kieran1028[_12_] Excel Programming 1 November 11th 04 06:27 PM
complex looping problem Max Bialystock Excel Programming 16 April 10th 04 01:56 PM
Looping Problem Todd Huttenstine[_3_] Excel Programming 5 January 25th 04 12:51 AM


All times are GMT +1. The time now is 06:55 AM.

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

About Us

"It's about Microsoft Excel"