Need some help with algorithm

dimitri30

Member
Hi, I'm trying so solve following problem:

Let's say, we have a set A={1,2,3,.....49}.

Now, I am defining sets A1, A2, A3,....An as follow: A1={a1,a2,a3,....a30}, A2={b1,b2,b3,...b30}, and so on, where all elements of sets Ai are also elements of set A, which means they are subsets of set A. (All sets Ai have 30 elements).

Now, I am looking for a set C={ {A1},{A2},{A3},....{An} } so, that if I pick randomly 6 elements of set A, they will be (at least) in one of sets Ai.

What is n? Let's see: first of all, how much possibilities are to pick 6 elements of set A? There are (49*48*47*46*45*44)/6!=13.983.816

Secondly, how much of these posibilities covers one of sets Ai? Because set Ai has 30 elements, it covers (30*29*28*27*26*25)/6!=593.775

Now dividing both results, it gives 23,55 what means, that we need at least n=24 (probably more, I don't sure).

So the question is, how to find this set C?

Let's say, we can start so: A1={1,2,3,....30}, this will be first set. But what next? With some algorithm I can implement it in C or Java, but I dont know how to start. Thanks.
 

PAB

Member
Hi dimitri30,

Welcome to the Forum :agree: .

dimitri30 said:
Let's say, we have a set A={1,2,3,.....49}.

Now, I am defining sets A1, A2, A3,....An as follow: A1={a1,a2,a3,....a30}, A2={b1,b2,b3,...b30}, and so on, where all elements of sets Ai are also elements of set A, which means they are subsets of set A. (All sets Ai have 30 elements).
I don't quite follow what you are exactly after.
Are the references Excel cell references where you have the numbers?
Perhaps you could explain in a bit more detail please?
Could you also put your location in your profile please, this will help when replying to future questions.

Regards,
PAB
:wavey:

-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-
12:45, restate my assumptions.
Mathematics is the language of nature.
Everything around us can be represented and understood through numbers.
If you graph the numbers of any system, patterns emerge. Therefore, there are patterns everywhere in nature.
 

dimitri30

Member
Hi PAB,
Thanks!
I wanted to delete this thread, because I've found already a solution. But don't know how to do that.
Anyways, what I was looked for, is all lines of numbers, (30 in each line, it's like a big full "wheel" but I don't want call it a wheel because the usual wheels that we know has usually 6 numbers in a line.)
I found 210 lines of numbers, 30 numbers each line, so, that if I randomly pick 6 numbers from my 49 lotto numbers, they will be sure (100%) in one of this 210 lines.

Regards
 

PAB

Member
Hi dimitri30,

dimitri30 said:
Thanks!
I wanted to delete this thread, because I've found already a solution. But don't know how to do that.
I am glad you found a solution. Perhaps you could post the solution here so other members and guests following this thread can see.

Regards,
PAB
:wavey:

-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-
12:45, restate my assumptions.
Mathematics is the language of nature.
Everything around us can be represented and understood through numbers.
If you graph the numbers of any system, patterns emerge. Therefore, there are patterns everywhere in nature.
 

dimitri30

Member
PAB said:
I am glad you found a solution. Perhaps you could post the solution here so other members and guests following this thread can see.

Here is the solution: need to divide 49 numbers into 10 groups (5 numbers in each group, and one group will contain 4 numbers).
Group 1 = {1,2,3,4,5}
Group 2 = {6,7,8,9,10}
.......
Group 10 = {46,47,48,49}

(Of course, it's only one possible solution, it depends how you creates this 10 groups)

Then need to make ALL possible permutations with 6 groups out of 10, will be exactly 210 lines.
(10*9*8*7*6*5/6!=210)

Then write it down in excel:
line1: 1, 2, 3, 4, 5, 6
line2: 1, 2, 3, 4, 5, 7
line3: 1, 2, 3, 4, 5, 8
line4: 1, 2, 3, 4, 5, 9
line5: 1, 2, 3, 4, 5, 10
line6: 1, 2, 3, 4, 6, 7
..............
line210 :5, 6, 7, 8, 9, 10

Then, change numbers 1-10 with numbers from the groups, and you will get:

1 ). 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
2 ). 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 31 32 33 34 35
3 ). 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 36 37 38 39 40
4 ). 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 41 42 43 44 45
5 ). 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 46 47 48 49
6 ). 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 26 27 28 29 30 31 32 33 34 35
.................................
.................................
.................................
206 ). 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 41 42 43 44 45 46 47 48 49
207 ). 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 36 37 38 39 40 41 42 43 44 45 46 47 48 49
208 ). 16 17 18 19 20 21 22 23 24 25 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
209 ). 16 17 18 19 20 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
210 ). 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49

Some lines have 29 numbers, but it doesn't matter. Now if you pick randomly 6 numbers out of 49, they are sure contained in at least one of 210 above lines.

SO: What it all gives?? Now need to find a strategy how to find the correct line for the next draw, and you will play already with 30 numbers instead of 49!
Any suggestions would be appreciated.

Regards,
dimitri30
:beer:
 

newb2

Member
dimitri30 said:
SO: What it all gives?? Now need to find a strategy how to find the correct line for the next draw, and you will play already with 30 numbers instead of 49!
Any suggestions would be appreciated.

Regards,
dimitri30
:beer:

This will be difficult.

What you have is a fixed table of 210 lines x 30 numbers. You can narrow your number selection down to 30 numbers but you dont know which line. If you were to check previous winning lottery numbers against this table I bet there would not any significant advantage between choosing one line over another line i.e. each line will contain at least one set of winning numbers from previous draws.

You could reduce the size of the table by removing numbers which will not come up in the next draw but there's the risk that the more numbers you remove the more chance you will be removing a winning number.
 

jack

Member
Hello, dimitri30, you can do this, split the 6:0 pm 4/12 groups 49 numbers, a group will have 13 numbers, default is thus always a groups of 12 will have zero or a number, and another group will have the minimum condition of two numbers, so if the Group of zero or a number
Der two numbers you lose, and if in the group that the two numbers (minimum condition, can give more) if in this group play a dozen, you will make mistakes, this standard is 100% in any giveaway, of course you don't know the groups, will have to do in 4 editions, because they do not know which of the 4 groups, then we need to create a rotating formula to go against this pattern
It is 100%, you can shuffle the 4 groups as you want, always give this pattern
So instead of 210 lines, only 4 groups
 

Sidebar

Top