Kennylee 0 Newbie Poster

Hello!
I will attempt to
explain what I am trying to
achieve here...I want
develop a function that will
accomplish the following:
First of all the called
function will look like this
Balanced_Matrix(b,g,l,f)
Where:
b = base
g = groupnumber
l = number of lines
f = frequency of occurrence of each number
Example: Balanced_Matrix(8,6,4,3)
Result:
1-2-3-5-6-7
1-2-4-5-6-8
1-3-4-5-7-8
2-3-4-6-7-8
Breakdown:
b = 8 .............. this base number can be from 8-21
g = 6 .............. this is always the same (Constant)
L = 4 .............. this test run would have produced exactly 4 lines
f = 3 .............. notice that each number appears exactly 3 times (This is where the term balance comes to play)
This is the magic of my lottery program I am writing; It is 99% complete...and I have no clue of how to finish it with the included Balanced_Matrix Function.
If you opened the program I included you will see that each group number has several different frequency-combination possibilities in this case I used the number 8 because it has the fewest possibilities of all of them out of the 8 - 21 group numbers that can be chosen. For example, the number 9 has 84, 10, 210, 11, 462...and so forth the function should work with any group number chosen.
Please note that the 4 example combinations are hand written because like I said I do not know to generate them with the function
This is how the function should work;
Run the module that I included select from the frequency from list box 1 or the combinations from list box 2 and dump the generated list in list box 3.
Please note that if you are successful in making the function work that whatever you generated is not the only possibility. There are countless possibilities especially in the higher base numbers. So, for different possibilities the first generated list must be randomized without loss of frequency until the user decides which one to use. My part of the program will automatically analyze all the winning possibilities of each generation.
I hope that I have been clear in explaining what I am trying to accomplish and what ever help anyone can give me will be greatly appreciated and please know that I would never take credit for your efforts, but what I will do is make sure that all of Daniweb knows what you did!!!
Regards
Kenneth L. Shank

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.