Line Elimination Ideas

GillesD

Member
Sum of numbers

You are right, Flexalong, there are many ways to achieve this, macro or formulas. I will give you a formula-based solution that gives you some flexibility to see where the number that adds up to two other is.

Let's assume your data has draw # in column A and the winning numbers in columns B to G (in increasing order).

- If you want to see if the third number (column D) is the sum of the first two, then in cell H2, you could put the formula =IF(B2+C2=D2,1,0) to give you a 1 if it is the sum of the first two numbers and a 0 if it is not.

- If you want to see if the fourth number (column E) is the sum of any of the first two, then in cell I2, you could put the formula =IF(OR(B2+C2=E2,B2+D2=E2,C2+D2=E2),1,0) to give you a 1 if it is the sum of the two of the first three numbers and a 0 if it is not.

You can continue like this for the fifth or sixth number, although the OR(...) condition will get longer and longer.

Then you can delete lines where you get a 1 in one of the columns (H to K) depending on which condition you want to eliminate a line.
 

Flexalong

Member
GillesD said:
You are right, Flexalong, there are many ways to achieve this, macro or formulas. I will give you a formula-based solution that gives you some flexibility to see where the number that adds up to two other is.

Let's assume your data has draw # in column A and the winning numbers in columns B to G (in increasing order).

- If you want to see if the third number (column D) is the sum of the first two, then in cell H2, you could put the formula =IF(B2+C2=D2,1,0) to give you a 1 if it is the sum of the first two numbers and a 0 if it is not.

- If you want to see if the fourth number (column E) is the sum of any of the first two, then in cell I2, you could put the formula =IF(OR(B2+C2=E2,B2+D2=E2,C2+D2=E2),1,0) to give you a 1 if it is the sum of the two of the first three numbers and a 0 if it is not.

You can continue like this for the fifth or sixth number, although the OR(...) condition will get longer and longer.

Then you can delete lines where you get a 1 in one of the columns (H to K) depending on which condition you want to eliminate a line.

Very long condition indeed, thanks GilesD. :beer:
 

CMF

Member
FlexAlong

Before coding it's a good idea to set out what you're trying to do in pseudo-code or logical every day language.

My understanding is that from the six integers in numerical order you want to eliminate any combination where the product of any two integers equals a following integer. This means you really have a problem with the integer 1 and I can't for the life of me figure out how it has so offended you! Closely following this is integer 2 which when multiplied by up to 24 is less than 49 and so on.

Setting aside your reasoning for wanting to do this the exercise intrigued me. I work it out that the combinations left will be 702,878.

My suggestion for doing things like this is to download a free copy of Visual Basic Express and print out to a console or message box. You can use it as a calculator only if you want to without getting in to more sophisticated coding. Also you can still use the debug window in VB8 and I have to admit for something rough and ready I still use the debug window in my old copy of Access 2000.

Regards
Colin Fairbrother
 

CMF

Member
Correction:

Combinations left: 13,280,938
Combinations eliminated: 702,878

Colin Fairbrother
 

Flexalong

Member
CMF said:
FlexAlong

Before coding it's a good idea to set out what you're trying to do in pseudo-code or logical every day language.

My understanding is that from the six integers in numerical order you want to eliminate any combination where the product of any two integers equals a following integer. This means you really have a problem with the integer 1 and I can't for the life of me figure out how it has so offended you! Closely following this is integer 2 which when multiplied by up to 24 is less than 49 and so on.

Setting aside your reasoning for wanting to do this the exercise intrigued me. I work it out that the combinations left will be 702,878.

My suggestion for doing things like this is to download a free copy of Visual Basic Express and print out to a console or message box. You can use it as a calculator only if you want to without getting in to more sophisticated coding. Also you can still use the debug window in VB8 and I have to admit for something rough and ready I still use the debug window in my old copy of Access 2000.

Regards
Colin Fairbrother

Hi Colin,

Maybe I am not thinking this deep enough but why would I have a problem? From my analysis of my lottery, past 281 draws only have 10 such combinations where the product of 2 numbers equal a third number in a combination.
 

CMF

Member
Flexalong

Point conceded.

At first glance it would appear that the lower integers are being favored especially with 06 08 46 47 48 49 being the last combination in your 702,878 combinations eliminated for a lexicographic enumeration.

At the outset each integer appears 1,712,304 times in the 13,983,816 combinations. There are 47,397 combinations eliminated with the integer 1 and the same applies to integer 49. There will be overlaps.

However, I still scratch my head and wonder at what you have achieved by reducing the possibilities, in your way of looking at things, to 13,280,938. In my mind at every draw the possibilities are 13,983,816. For that not to be so there would have to be a predictable bias. In any case even if you thought there was a bias it still has to be useful. A 5% percent elimination from 13,983,816 possibilities is simply not enough.

Regards
Colin Fairbrother
 

newb2

Member
You should also keep in mind that as you delete groups of lines you may be deleting potential 3, 4 or 5 number hits. You may end up with 10,000 lines with one line hitting the jackpot but the other 9,999 lines will win you absolutely nothing. This is an extreme example but removing large numbers of lines also reduces the chances of winning anything.
 

Sidebar

Top