Welcome Guest
Log In | Register )
You last visited December 8, 2016, 10:57 am
All times shown are
Eastern Time (GMT-5:00)

A New Way of Generating Key Numbers For The P4

Topic closed. 36 replies. Last post 8 years ago by edge.

Page 1 of 3
51
PrintE-mailLink
Avatar

United States
Member #7437
October 3, 2004
383 Posts
Offline
Posted: April 23, 2009, 11:24 am - IP Logged

Several weeks ago I posted the C Code I wrote, keyNumberFinderP3, for generating a set of key numbers for the P3.  In this thread I'm offering a new way to generate key numbers for the P4 based on keyNumberFinderP3.

The P4 consists of 4 P3 segments. If we write a P4 draw as ABCD, then the 4 P3 segements are: ABC, ABD, ACD, and BCD. If we make a draw list for each of the 4 segments and run keyFinderP3 with each list, then in effect, we'll generate a set of key numbers for each of the 4 segments.

As an example let's take the NY P4 day and eve results from 3/11/09 - 3/31/09:

4982
4707
0050
1877
9159
1703
7516
8516
4604
4447
3559
9504
1765
3704
6096
6815
9978
1975
7332
4025

The 4 segments of the P3 are:

ABC   ABD   ACD  BCD

498   492   482  982
470   477   407  707
005   000   050  050
187   187   177  877
915   919   959  159
170   173   103  703
751   756   716  516
851   856   816  516
460   464   404  604
444   447   447  447
355   359   359  559
950   954   904  504
176   175   165  765
370   374   304  704
609   606   696  096
681   685   615  815
997   998   978  978
197   195   175  975
733   732   732  332
402   405   425  025

Here's the output of our new key number finder:

***ABC SEGMENT***
Key Number Set -> 4-5-6-7
Final draw count used to find key number set was 20
***ABD SEGMENT***
Key Number Set -> 0-6-7-9
Final draw count used to find key number set was 20
***ACD SEGMENT***
Key Number Set -> 0-1-4-9
Key Number Set -> 1-4-5-9
Final draw count used to find key number set was 18
***BCD SEGMENT***
Key Number Set -> 0-2-5-7
Key Number Set -> 2-5-6-7
Final draw count used to find key number set was 20
Enter any key to exit

The next winning draws on 04/01/09 were: 5964 for the midday and 2494 for the eve.

What's more interesting is that we have determined some  powerful positional information. For example: the ABC key numbers, 4-5-6-7, tells us that at least one of these numbers will come up in the A, B, or C position, and this did happen with the 5. Notice we had a "bullseye" with the ACD key number set 1-4-5-9, (5964). The weakest set of key numbers, realtive to these two results,  seems to be the ones from the BCD segment.

Here's another angle: Let's say we chose the key numbers 4-5-6-7 for the ABC segment and 0-1-4-9 for the ACD segment. ABC and ACD, have the numbers A and C in common. Notice that the 4 is the only number in common with 4-5-6-7 and 0-1-4-9. If we took the chance in predicting that either the A or C will be a 4, we would have been correct! 

Below the asterisks is the modified C Code for the new P4 key number generator. Paste the code into you compiler's editor, save as newKeyNumberFinderP4.c, and run the compiler to get an executable. For the input past draw list, all you need is the past 20 draws for the P4 you are playing. The file should be a list text file with the latest draw on top, and the oldest on bottom. One draw to a line, no extrra characters. Call the file drawsP4.txt, and remember, drawsP4.txt must be in the same working folder as the executable code.

There needs to be some work done in how to accurately analze the key numbers for each segement, and the results of that work can promise good rewards.

 

jayemmar

*************************************************************************

 

#include <math.h>
#include <stdlib.h>
#include <stdio.h>

int main()
{
int i, j,  temp1, temp2, temp3, temp4, a1, a2, a3, a4, a;
int drawCount, hit, results;
FILE *in;
int drawArray[20];

int arrayOfFours[210] =
{123,124,125,126,127,128,129,134,135,136,137,138,139,
145,146,147,148,149,156,157,158,159,167,168,169,178,
179,189,234,235,236,237,238,239,245,246,247,248,249,
256,257,258,259,267,268,269,278,279,289,345,346,347,
348,349,356,357,358,359,367,368,369,378,379,389,456,
457,458,459,467,468,469,478,479,489,567,568,569,578,
579,589,678,679,689,789,1234,1235,1236,1237,1238,1239,1245,
1246,1247,1248,1249,1256,1257,1258,1259,1267,1268,1269,1278,1279,
1289,1345,1346,1347,1348,1349,1356,1357,1358,1359,1367,1368,1369,
1378,1379,1389,1456,1457,1458,1459,1467,1468,1469,1478,1479,1489,
1567,1568,1569,1578,1579,1589,1678,1679,1689,1789,2345,2346,2347,
2348,2349,2356,2357,2358,2359,2367,2368,2369,2378,2379,2389,2456,
2457,2458,2459,2467,2468,2469,2478,2479,2489,2567,2568,2569,2578,
2579,2589,2678,2679,2689,2789,3456,3457,3458,3459,3467,3468,3469,
3478,3479,3489,3567,3568,3569,3578,3579,3589,3678,3679,3689,3789,
4567,4568,4569,4578,4579,4589,4678,4679,4689,4789,5678,5679,5689,
5789,6789};


      /*
      **Open files
      */
       in = fopen("drawsP4.txt", "r");
       if(in == NULL)
       {
          printf("error in opening drawsP3.txt\n");
          getch();
          exit(0);
       }



       /*
       ** Get the past 20 draws into memory and then
       ** loop through the first 20 draws and see if
       ** there's a key number set for these draws
       */
       i = 0;
       while(!feof(in) && i < 20)
       {
           fscanf(in, "%d", &a);
           drawArray[i] = a;
           i++;
           drawCount++;         
       }
       drawCount = i;

       results = 0;
startABC:
       printf("***ABC SEGMENT***\n");     
       for(i = 0; i < 210; i++)
       {     hit = 0;
             /*
             ** Peel off the digits from the key number set
             */
             temp1 = arrayOfFours[i]/1000;
             temp2 = (arrayOfFours[i] - 1000*temp1)/100;
             temp3=  (arrayOfFours[i] - 1000*temp1 - 100*temp2)/10;
             temp4 = (arrayOfFours[i] - 1000*temp1 - 100*temp2 - 10*temp3);

             for(j = 0; j < drawCount; j++)
             {
                /*
                ** Peel off the digits from this draw
                */
                a = drawArray[j];         
                a1 = a/1000;
                a2 = (a - 1000*a1)/100;
                a3=  (a - 1000*a1 - 100*a2)/10;
                a4 = (a - 1000*a1 - 100*a2 - 10*a3);
             
                /*
                ** Check to see if at least one digit matches one
                ** in the key set
                */
             
                if((a1 == temp1 || a1 == temp2 || a1 == temp3 || a1 == temp4)
                  ||(a2 == temp1 || a2 == temp2 || a2 == temp3 || a2 == temp4)
                  ||(a3 == temp1 || a3 == temp2 || a3 == temp3 || a3 == temp4))
               {
                  /*
                  ** Bump the match count when a match occurs
                  */
                  hit++;
               } 
                         
             }
         
           
             /*
             ** If the at least one number
             ** in the key number set matched
             ** for all draws, print out the key number set
             */
             if(hit == drawCount)
             {
                printf("Key Number Set -> %i-%i-%i-%i\n",
                        temp1,  temp2, temp3, temp4);
                     
                /*
                ** Signal that a key number set was found
                */
                results = 1;
             }
             
               

       }


       /*
       ** If no key number set was found, drop the last draw
       ** and search again
       */
       if(results == 0)
       {
            drawCount = drawCount - 1;
            goto startABC;
       }

       /*
       ** Tell the user how many reductions it took
       ** to find a key number set.
       */
       printf("Final draw count used to find key number set was %i\n", drawCount);

       rewind(in); 
       i = 0;
       while(!feof(in) && i < 20)
       {
           fscanf(in, "%d", &a);
           drawArray[i] = a;
           i++;
           drawCount++;         
       }
       drawCount = i;

       results = 0;

       printf("***ABD SEGMENT***\n");     
startABD:
       for(i = 0; i < 210; i++)
       {     hit = 0;
             /*
             ** Peel off the digits from the key number set
             */
             temp1 = arrayOfFours[i]/1000;
             temp2 = (arrayOfFours[i] - 1000*temp1)/100;
             temp3=  (arrayOfFours[i] - 1000*temp1 - 100*temp2)/10;
             temp4 = (arrayOfFours[i] - 1000*temp1 - 100*temp2 - 10*temp3);

             for(j = 0; j < drawCount; j++)
             {
                /*
                ** Peel off the digits from this draw
                */
                a = drawArray[j];         
                a1 = a/1000;
                a2 = (a - 1000*a1)/100;
                a3=  (a - 1000*a1 - 100*a2)/10;
                a4 = (a - 1000*a1 - 100*a2 - 10*a3);
             
                /*
                ** Check to see if at least one digit matches one
                ** in the key set
                */
             
                if((a1 == temp1 || a1 == temp2 || a1 == temp3 || a1 == temp4)
                  ||(a2 == temp1 || a2 == temp2 || a2 == temp3 || a2 == temp4)
                  ||(a4 == temp1 || a4 == temp2 || a4 == temp3 || a4 == temp4))
               {
                  /*
                  ** Bump the match count when a match occurs
                  */
                  hit++;
               } 
                         
             }
         
           
             /*
             ** If the at least one number
             ** in the key number set matched
             ** for all draws, print out the key number set
             */
             if(hit == drawCount)
             {
                printf("Key Number Set -> %i-%i-%i-%i\n",
                        temp1,  temp2, temp3, temp4);
                     
                /*
                ** Signal that a key number set was found
                */
                results = 1;
             }
             
               

       }


       /*
       ** If no key number set was found, drop the last draw
       ** and search again
       */
       if(results == 0)
       {
            drawCount = drawCount - 1;
            goto startABD;
       }

       /*
       ** Tell the user how many reductions it took
       ** to find a key number set.
       */
       printf("Final draw count used to find key number set was %i\n", drawCount);
   
       /*
       **Now do segment ACD
       */


       rewind(in);
       i = 0;
       while(!feof(in) && i < 20)
       {
           fscanf(in, "%d", &a);
           drawArray[i] = a;
           i++;
           drawCount++;         
       }
       drawCount = i;

       results = 0;
       

       printf("***ACD SEGMENT***\n");     
startACD:
       for(i = 0; i < 210; i++)
       {     hit = 0;
             /*
             ** Peel off the digits from the key number set
             */
             temp1 = arrayOfFours[i]/1000;
             temp2 = (arrayOfFours[i] - 1000*temp1)/100;
             temp3=  (arrayOfFours[i] - 1000*temp1 - 100*temp2)/10;
             temp4 = (arrayOfFours[i] - 1000*temp1 - 100*temp2 - 10*temp3);

             for(j = 0; j < drawCount; j++)
             {
                /*
                ** Peel off the digits from this draw
                */
                a = drawArray[j];         
                a1 = a/1000;
                a2 = (a - 1000*a1)/100;
                a3=  (a - 1000*a1 - 100*a2)/10;
                a4 = (a - 1000*a1 - 100*a2 - 10*a3);
             
                /*
                ** Check to see if at least one digit matches one
                ** in the key set
                */
             
                if((a1 == temp1 || a1 == temp2 || a1 == temp3 || a1 == temp4)
                  ||(a3 == temp1 || a3 == temp2 || a3 == temp3 || a3 == temp4)
                  ||(a4 == temp1 || a4 == temp2 || a4 == temp3 || a4 == temp4))
               {
                  /*
                  ** Bump the match count when a match occurs
                  */
                  hit++;
               } 
                         
             }
         
           
             /*
             ** If the at least one number
             ** in the key number set matched
             ** for all draws, print out the key number set
             */
             if(hit == drawCount)
             {
                printf("Key Number Set -> %i-%i-%i-%i\n",
                        temp1,  temp2, temp3, temp4);
                     
                /*
                ** Signal that a key number set was found
                */
                results = 1;
             }
             
               

       }


       /*
       ** If no key number set was found, drop the last draw
       ** and search again
       */
       if(results == 0)
       {
            drawCount = drawCount - 1;
            goto startACD;
       }

       /*
       ** Tell the user how many reductions it took
       ** to find a key number set.
       */
       printf("Final draw count used to find key number set was %i\n", drawCount);


       rewind(in);
       i = 0;
       while(!feof(in) && i < 20)
       {
           fscanf(in, "%d", &a);
           drawArray[i] = a;
           i++;
           drawCount++;         
       }
       drawCount = i;

       results = 0;
     

       printf("***BCD SEGMENT***\n");     
startBCD:
       for(i = 0; i < 210; i++)
       {     hit = 0;
             /*
             ** Peel off the digits from the key number set
             */
             temp1 = arrayOfFours[i]/1000;
             temp2 = (arrayOfFours[i] - 1000*temp1)/100;
             temp3=  (arrayOfFours[i] - 1000*temp1 - 100*temp2)/10;
             temp4 = (arrayOfFours[i] - 1000*temp1 - 100*temp2 - 10*temp3);

             for(j = 0; j < drawCount; j++)
             {
                /*
                ** Peel off the digits from this draw
                */
                a = drawArray[j];         
                a1 = a/1000;
                a2 = (a - 1000*a1)/100;
                a3=  (a - 1000*a1 - 100*a2)/10;
                a4 = (a - 1000*a1 - 100*a2 - 10*a3);
             
                /*
                ** Check to see if at least one digit matches one
                ** in the key set
                */
             
                if((a2 == temp1 || a2 == temp2 || a2 == temp3 || a2 == temp4)
                  ||(a3 == temp1 || a3 == temp2 || a3 == temp3 || a3 == temp4)
                  ||(a4 == temp1 || a4 == temp2 || a4 == temp3 || a4 == temp4))
               {
                  /*
                  ** Bump the match count when a match occurs
                  */
                  hit++;
               } 
                         
             }
         
           
             /*
             ** If the at least one number
             ** in the key number set matched
             ** for all draws, print out the key number set
             */
             if(hit == drawCount)
             {
                printf("Key Number Set -> %i-%i-%i-%i\n",
                        temp1,  temp2, temp3, temp4);
                     
                /*
                ** Signal that a key number set was found
                */
                results = 1;
             }
             
               

       }


       /*
       ** If no key number set was found, drop the last draw
       ** and search again
       */
       if(results == 0)
       {
            drawCount = drawCount - 1;
            goto startBCD;
       }

       /*
       ** Tell the user how many reductions it took
       ** to find a key number set.
       */
       printf("Final draw count used to find key number set was %i\n", drawCount);
       printf("Enter any key to exit\n");
       getch();




       close(in);


}

 

 

 


    Avatar

    United States
    Member #7437
    October 3, 2004
    383 Posts
    Offline
    Posted: April 23, 2009, 3:56 pm - IP Logged

    As an addendum to this posting, if you make a frequency chart for the key numbers, it will help to put things into perspective. In the example given, the chart would look something like this:

    Key Number   Frequency

    0                        3

    1                        2

    2                        2

    3                        0

    4                        3

    5                        4

    6                        3

    7                        4

    8                        0

    9                        3

    Note that 5 has the highest frequency(it appears a total of 5 times in the key number sets).

    Also note that 3 and 8 were not included in any of the key number sets. These are also important numbers.  Look at the next five days worth of results:

    04/05/2009 Mid-day    9    4    7    4
    04/04/2009 Evening    7    7    5    7
    04/04/2009 Mid-day    9    8    0    6
    04/03/2009 Evening    0    5    7    2
    04/03/2009 Mid-day      1    6    7
    04/02/2009 Evening    5    0    3    3
    04/02/2009 Mid-day    1        5    5
    04/01/2009 Evening    2    4    9    4
    04/01/2009 Mid-day      9    6    4

    jayemmar

      Avatar

      United States
      Member #7437
      October 3, 2004
      383 Posts
      Offline
      Posted: April 23, 2009, 4:01 pm - IP Logged

      Whoops -  forgot to include 7 also as the highest frequency key number

       

      04/05/2009 Mid-day    9    4    7    4
      04/04/2009 Evening    7    7    5    7
      04/04/2009 Mid-day    9    8    0    6
      04/03/2009 Evening    0    5    7    2
      04/03/2009 Mid-day      1    6    7
      04/02/2009 Evening    5    0    3    3
      04/02/2009 Mid-day    1        5    5
      04/01/2009 Evening    2    4    9    4
      04/01/2009 Mid-day      9    6    4

       

      jayemmar

        edge's avatar - waveform

        United States
        Member #68609
        December 26, 2008
        2204 Posts
        Offline
        Posted: April 23, 2009, 7:48 pm - IP Logged

        thats good solid work. might engage what i call "forward trace" in NY  using your approach, suggestion: possible to include "sum" (as an option) or at least "sum" range (might not apply) ?

        I can compile (and sure others can) your app on the spot, so posting src is great and of course appreciation for the efforts taken!

        ab actu ad posse valet illatio - from the past one can infer the future

          Avatar

          United States
          Member #7437
          October 3, 2004
          383 Posts
          Offline
          Posted: April 24, 2009, 2:12 am - IP Logged

          Thanks edge. Would like to see if we can turn this into something. Keep us posted.

           

          jayemmar

            retxx's avatar - mrthumbs
            BOSTON
            United States
            Member #48
            September 9, 2001
            3593 Posts
            Offline
            Posted: April 24, 2009, 8:49 pm - IP Logged

            for us dummies out here can someone write this as an excel spreadsheet? then we can enter past #'s and see how it works. Thanks

              edge's avatar - waveform

              United States
              Member #68609
              December 26, 2008
              2204 Posts
              Offline
              Posted: April 25, 2009, 10:43 pm - IP Logged

              Engaging "forward-trace" of the application in NY, extending big thanks  to the author regardless of the outcome! run will attempt to predict midday numbers for a week with possible extension.

              NY P4 - Forward Trace & Verification of Segmentation Based System:  http://www.lotterypost.com/thread/192869

              ab actu ad posse valet illatio - from the past one can infer the future

                edge's avatar - waveform

                United States
                Member #68609
                December 26, 2008
                2204 Posts
                Offline
                Posted: April 25, 2009, 11:30 pm - IP Logged

                Several weeks ago I posted the C Code I wrote, keyNumberFinderP3, for generating a set of key numbers for the P3.  In this thread I'm offering a new way to generate key numbers for the P4 based on keyNumberFinderP3.

                The P4 consists of 4 P3 segments. If we write a P4 draw as ABCD, then the 4 P3 segements are: ABC, ABD, ACD, and BCD. If we make a draw list for each of the 4 segments and run keyFinderP3 with each list, then in effect, we'll generate a set of key numbers for each of the 4 segments.

                As an example let's take the NY P4 day and eve results from 3/11/09 - 3/31/09:

                4982
                4707
                0050
                1877
                9159
                1703
                7516
                8516
                4604
                4447
                3559
                9504
                1765
                3704
                6096
                6815
                9978
                1975
                7332
                4025

                The 4 segments of the P3 are:

                ABC   ABD   ACD  BCD

                498   492   482  982
                470   477   407  707
                005   000   050  050
                187   187   177  877
                915   919   959  159
                170   173   103  703
                751   756   716  516
                851   856   816  516
                460   464   404  604
                444   447   447  447
                355   359   359  559
                950   954   904  504
                176   175   165  765
                370   374   304  704
                609   606   696  096
                681   685   615  815
                997   998   978  978
                197   195   175  975
                733   732   732  332
                402   405   425  025

                Here's the output of our new key number finder:

                ***ABC SEGMENT***
                Key Number Set -> 4-5-6-7
                Final draw count used to find key number set was 20
                ***ABD SEGMENT***
                Key Number Set -> 0-6-7-9
                Final draw count used to find key number set was 20
                ***ACD SEGMENT***
                Key Number Set -> 0-1-4-9
                Key Number Set -> 1-4-5-9
                Final draw count used to find key number set was 18
                ***BCD SEGMENT***
                Key Number Set -> 0-2-5-7
                Key Number Set -> 2-5-6-7
                Final draw count used to find key number set was 20
                Enter any key to exit

                The next winning draws on 04/01/09 were: 5964 for the midday and 2494 for the eve.

                What's more interesting is that we have determined some  powerful positional information. For example: the ABC key numbers, 4-5-6-7, tells us that at least one of these numbers will come up in the A, B, or C position, and this did happen with the 5. Notice we had a "bullseye" with the ACD key number set 1-4-5-9, (5964). The weakest set of key numbers, realtive to these two results,  seems to be the ones from the BCD segment.

                Here's another angle: Let's say we chose the key numbers 4-5-6-7 for the ABC segment and 0-1-4-9 for the ACD segment. ABC and ACD, have the numbers A and C in common. Notice that the 4 is the only number in common with 4-5-6-7 and 0-1-4-9. If we took the chance in predicting that either the A or C will be a 4, we would have been correct! 

                Below the asterisks is the modified C Code for the new P4 key number generator. Paste the code into you compiler's editor, save as newKeyNumberFinderP4.c, and run the compiler to get an executable. For the input past draw list, all you need is the past 20 draws for the P4 you are playing. The file should be a list text file with the latest draw on top, and the oldest on bottom. One draw to a line, no extrra characters. Call the file drawsP4.txt, and remember, drawsP4.txt must be in the same working folder as the executable code.

                There needs to be some work done in how to accurately analze the key numbers for each segement, and the results of that work can promise good rewards.

                 

                jayemmar

                *************************************************************************

                 

                #include <math.h>
                #include <stdlib.h>
                #include <stdio.h>

                int main()
                {
                int i, j,  temp1, temp2, temp3, temp4, a1, a2, a3, a4, a;
                int drawCount, hit, results;
                FILE *in;
                int drawArray[20];

                int arrayOfFours[210] =
                {123,124,125,126,127,128,129,134,135,136,137,138,139,
                145,146,147,148,149,156,157,158,159,167,168,169,178,
                179,189,234,235,236,237,238,239,245,246,247,248,249,
                256,257,258,259,267,268,269,278,279,289,345,346,347,
                348,349,356,357,358,359,367,368,369,378,379,389,456,
                457,458,459,467,468,469,478,479,489,567,568,569,578,
                579,589,678,679,689,789,1234,1235,1236,1237,1238,1239,1245,
                1246,1247,1248,1249,1256,1257,1258,1259,1267,1268,1269,1278,1279,
                1289,1345,1346,1347,1348,1349,1356,1357,1358,1359,1367,1368,1369,
                1378,1379,1389,1456,1457,1458,1459,1467,1468,1469,1478,1479,1489,
                1567,1568,1569,1578,1579,1589,1678,1679,1689,1789,2345,2346,2347,
                2348,2349,2356,2357,2358,2359,2367,2368,2369,2378,2379,2389,2456,
                2457,2458,2459,2467,2468,2469,2478,2479,2489,2567,2568,2569,2578,
                2579,2589,2678,2679,2689,2789,3456,3457,3458,3459,3467,3468,3469,
                3478,3479,3489,3567,3568,3569,3578,3579,3589,3678,3679,3689,3789,
                4567,4568,4569,4578,4579,4589,4678,4679,4689,4789,5678,5679,5689,
                5789,6789};


                      /*
                      **Open files
                      */
                       in = fopen("drawsP4.txt", "r");
                       if(in == NULL)
                       {
                          printf("error in opening drawsP3.txt\n");
                          getch();
                          exit(0);
                       }



                       /*
                       ** Get the past 20 draws into memory and then
                       ** loop through the first 20 draws and see if
                       ** there's a key number set for these draws
                       */
                       i = 0;
                       while(!feof(in) && i < 20)
                       {
                           fscanf(in, "%d", &a);
                           drawArray[i] = a;
                           i++;
                           drawCount++;         
                       }
                       drawCount = i;

                       results = 0;
                startABC:
                       printf("***ABC SEGMENT***\n");     
                       for(i = 0; i < 210; i++)
                       {     hit = 0;
                             /*
                             ** Peel off the digits from the key number set
                             */
                             temp1 = arrayOfFours[i]/1000;
                             temp2 = (arrayOfFours[i] - 1000*temp1)/100;
                             temp3=  (arrayOfFours[i] - 1000*temp1 - 100*temp2)/10;
                             temp4 = (arrayOfFours[i] - 1000*temp1 - 100*temp2 - 10*temp3);

                             for(j = 0; j < drawCount; j++)
                             {
                                /*
                                ** Peel off the digits from this draw
                                */
                                a = drawArray[j];         
                                a1 = a/1000;
                                a2 = (a - 1000*a1)/100;
                                a3=  (a - 1000*a1 - 100*a2)/10;
                                a4 = (a - 1000*a1 - 100*a2 - 10*a3);
                             
                                /*
                                ** Check to see if at least one digit matches one
                                ** in the key set
                                */
                             
                                if((a1 == temp1 || a1 == temp2 || a1 == temp3 || a1 == temp4)
                                  ||(a2 == temp1 || a2 == temp2 || a2 == temp3 || a2 == temp4)
                                  ||(a3 == temp1 || a3 == temp2 || a3 == temp3 || a3 == temp4))
                               {
                                  /*
                                  ** Bump the match count when a match occurs
                                  */
                                  hit++;
                               } 
                                         
                             }
                         
                           
                             /*
                             ** If the at least one number
                             ** in the key number set matched
                             ** for all draws, print out the key number set
                             */
                             if(hit == drawCount)
                             {
                                printf("Key Number Set -> %i-%i-%i-%i\n",
                                        temp1,  temp2, temp3, temp4);
                                     
                                /*
                                ** Signal that a key number set was found
                                */
                                results = 1;
                             }
                             
                               

                       }


                       /*
                       ** If no key number set was found, drop the last draw
                       ** and search again
                       */
                       if(results == 0)
                       {
                            drawCount = drawCount - 1;
                            goto startABC;
                       }

                       /*
                       ** Tell the user how many reductions it took
                       ** to find a key number set.
                       */
                       printf("Final draw count used to find key number set was %i\n", drawCount);

                       rewind(in); 
                       i = 0;
                       while(!feof(in) && i < 20)
                       {
                           fscanf(in, "%d", &a);
                           drawArray[i] = a;
                           i++;
                           drawCount++;         
                       }
                       drawCount = i;

                       results = 0;

                       printf("***ABD SEGMENT***\n");     
                startABD:
                       for(i = 0; i < 210; i++)
                       {     hit = 0;
                             /*
                             ** Peel off the digits from the key number set
                             */
                             temp1 = arrayOfFours[i]/1000;
                             temp2 = (arrayOfFours[i] - 1000*temp1)/100;
                             temp3=  (arrayOfFours[i] - 1000*temp1 - 100*temp2)/10;
                             temp4 = (arrayOfFours[i] - 1000*temp1 - 100*temp2 - 10*temp3);

                             for(j = 0; j < drawCount; j++)
                             {
                                /*
                                ** Peel off the digits from this draw
                                */
                                a = drawArray[j];         
                                a1 = a/1000;
                                a2 = (a - 1000*a1)/100;
                                a3=  (a - 1000*a1 - 100*a2)/10;
                                a4 = (a - 1000*a1 - 100*a2 - 10*a3);
                             
                                /*
                                ** Check to see if at least one digit matches one
                                ** in the key set
                                */
                             
                                if((a1 == temp1 || a1 == temp2 || a1 == temp3 || a1 == temp4)
                                  ||(a2 == temp1 || a2 == temp2 || a2 == temp3 || a2 == temp4)
                                  ||(a4 == temp1 || a4 == temp2 || a4 == temp3 || a4 == temp4))
                               {
                                  /*
                                  ** Bump the match count when a match occurs
                                  */
                                  hit++;
                               } 
                                         
                             }
                         
                           
                             /*
                             ** If the at least one number
                             ** in the key number set matched
                             ** for all draws, print out the key number set
                             */
                             if(hit == drawCount)
                             {
                                printf("Key Number Set -> %i-%i-%i-%i\n",
                                        temp1,  temp2, temp3, temp4);
                                     
                                /*
                                ** Signal that a key number set was found
                                */
                                results = 1;
                             }
                             
                               

                       }


                       /*
                       ** If no key number set was found, drop the last draw
                       ** and search again
                       */
                       if(results == 0)
                       {
                            drawCount = drawCount - 1;
                            goto startABD;
                       }

                       /*
                       ** Tell the user how many reductions it took
                       ** to find a key number set.
                       */
                       printf("Final draw count used to find key number set was %i\n", drawCount);
                   
                       /*
                       **Now do segment ACD
                       */


                       rewind(in);
                       i = 0;
                       while(!feof(in) && i < 20)
                       {
                           fscanf(in, "%d", &a);
                           drawArray[i] = a;
                           i++;
                           drawCount++;         
                       }
                       drawCount = i;

                       results = 0;
                       

                       printf("***ACD SEGMENT***\n");     
                startACD:
                       for(i = 0; i < 210; i++)
                       {     hit = 0;
                             /*
                             ** Peel off the digits from the key number set
                             */
                             temp1 = arrayOfFours[i]/1000;
                             temp2 = (arrayOfFours[i] - 1000*temp1)/100;
                             temp3=  (arrayOfFours[i] - 1000*temp1 - 100*temp2)/10;
                             temp4 = (arrayOfFours[i] - 1000*temp1 - 100*temp2 - 10*temp3);

                             for(j = 0; j < drawCount; j++)
                             {
                                /*
                                ** Peel off the digits from this draw
                                */
                                a = drawArray[j];         
                                a1 = a/1000;
                                a2 = (a - 1000*a1)/100;
                                a3=  (a - 1000*a1 - 100*a2)/10;
                                a4 = (a - 1000*a1 - 100*a2 - 10*a3);
                             
                                /*
                                ** Check to see if at least one digit matches one
                                ** in the key set
                                */
                             
                                if((a1 == temp1 || a1 == temp2 || a1 == temp3 || a1 == temp4)
                                  ||(a3 == temp1 || a3 == temp2 || a3 == temp3 || a3 == temp4)
                                  ||(a4 == temp1 || a4 == temp2 || a4 == temp3 || a4 == temp4))
                               {
                                  /*
                                  ** Bump the match count when a match occurs
                                  */
                                  hit++;
                               } 
                                         
                             }
                         
                           
                             /*
                             ** If the at least one number
                             ** in the key number set matched
                             ** for all draws, print out the key number set
                             */
                             if(hit == drawCount)
                             {
                                printf("Key Number Set -> %i-%i-%i-%i\n",
                                        temp1,  temp2, temp3, temp4);
                                     
                                /*
                                ** Signal that a key number set was found
                                */
                                results = 1;
                             }
                             
                               

                       }


                       /*
                       ** If no key number set was found, drop the last draw
                       ** and search again
                       */
                       if(results == 0)
                       {
                            drawCount = drawCount - 1;
                            goto startACD;
                       }

                       /*
                       ** Tell the user how many reductions it took
                       ** to find a key number set.
                       */
                       printf("Final draw count used to find key number set was %i\n", drawCount);


                       rewind(in);
                       i = 0;
                       while(!feof(in) && i < 20)
                       {
                           fscanf(in, "%d", &a);
                           drawArray[i] = a;
                           i++;
                           drawCount++;         
                       }
                       drawCount = i;

                       results = 0;
                     

                       printf("***BCD SEGMENT***\n");     
                startBCD:
                       for(i = 0; i < 210; i++)
                       {     hit = 0;
                             /*
                             ** Peel off the digits from the key number set
                             */
                             temp1 = arrayOfFours[i]/1000;
                             temp2 = (arrayOfFours[i] - 1000*temp1)/100;
                             temp3=  (arrayOfFours[i] - 1000*temp1 - 100*temp2)/10;
                             temp4 = (arrayOfFours[i] - 1000*temp1 - 100*temp2 - 10*temp3);

                             for(j = 0; j < drawCount; j++)
                             {
                                /*
                                ** Peel off the digits from this draw
                                */
                                a = drawArray[j];         
                                a1 = a/1000;
                                a2 = (a - 1000*a1)/100;
                                a3=  (a - 1000*a1 - 100*a2)/10;
                                a4 = (a - 1000*a1 - 100*a2 - 10*a3);
                             
                                /*
                                ** Check to see if at least one digit matches one
                                ** in the key set
                                */
                             
                                if((a2 == temp1 || a2 == temp2 || a2 == temp3 || a2 == temp4)
                                  ||(a3 == temp1 || a3 == temp2 || a3 == temp3 || a3 == temp4)
                                  ||(a4 == temp1 || a4 == temp2 || a4 == temp3 || a4 == temp4))
                               {
                                  /*
                                  ** Bump the match count when a match occurs
                                  */
                                  hit++;
                               } 
                                         
                             }
                         
                           
                             /*
                             ** If the at least one number
                             ** in the key number set matched
                             ** for all draws, print out the key number set
                             */
                             if(hit == drawCount)
                             {
                                printf("Key Number Set -> %i-%i-%i-%i\n",
                                        temp1,  temp2, temp3, temp4);
                                     
                                /*
                                ** Signal that a key number set was found
                                */
                                results = 1;
                             }
                             
                               

                       }


                       /*
                       ** If no key number set was found, drop the last draw
                       ** and search again
                       */
                       if(results == 0)
                       {
                            drawCount = drawCount - 1;
                            goto startBCD;
                       }

                       /*
                       ** Tell the user how many reductions it took
                       ** to find a key number set.
                       */
                       printf("Final draw count used to find key number set was %i\n", drawCount);
                       printf("Enter any key to exit\n");
                       getch();




                       close(in);


                }

                 

                 

                 


                actually want to ask you about something, in the statement below you said:

                "

                Here's another angle: Let's say we chose the key numbers 4-5-6-7 for the ABC segment and 0-1-4-9 for the ACD segment. ABC and ACD, have the numbers A and C in common. Notice that the 4 is the only number in common with 4-5-6-7 and 0-1-4-9. If we took the chance in predicting that either the A or C will be a 4, we would have been correct! 

                .."

                but the winning numbers on 04/01/09 were: 5964 for the midday and 2494 for the eve, or differently:

                A B C D    A B C D

                5 9 6 4    2 4 9 4

                in neither case (A and C position) resulted in 4, as I see it you are attempting to predict position D from position A and C (having the same number in common) but isn't this case of mix and match?

                I understand your "frequency approach" and maybe i missed something! thanks in advance.

                ab actu ad posse valet illatio - from the past one can infer the future

                  retxx's avatar - mrthumbs
                  BOSTON
                  United States
                  Member #48
                  September 9, 2001
                  3593 Posts
                  Offline
                  Posted: April 26, 2009, 7:36 pm - IP Logged

                  Question; On the key number chart en and then entered the last draw in the target and the chart reflected the change but the 2 key numbers below did not move. In the instruction line it says to use keyfinder to show the 2 key numbers. What is meant by this? thanks

                    Avatar

                    United States
                    Member #7437
                    October 3, 2004
                    383 Posts
                    Offline
                    Posted: April 27, 2009, 10:44 am - IP Logged

                    Hi Edge:

                     

                    Your question is well taken. Here's the answer:

                    The two sets of key numbers that were chosen gave different results, as you pointed out, because both sets had two numbers in common with the 5964, namely the 49 and the 45. For the 2494 result the key number set 4-5-6-7 only had the 4 and no other number. In other words you need two numbers in each set  for this angle to work. That's why I said "If you took the chance in predicting...".

                     

                    jayemmar

                      Avatar

                      United States
                      Member #7437
                      October 3, 2004
                      383 Posts
                      Offline
                      Posted: April 27, 2009, 11:33 am - IP Logged

                      For those who would like to see the frequency chart listed, I made a modification to the C code code to perform this. Below the asterisks is the C code listing. Follow the instructions for compiling and setting up the past draw files given in the first posting. 

                      As an example of how to put everthing together lets look at the NJ P4 day and eve combined(by the way you don't have to play combined), from 3/21/09(eve) - 3/31/09(day). Here is the print out of results:

                      ***ABC SEGMENT***
                      Key Number Set -> 1-3-4-9
                      Key Number Set -> 1-3-6-9
                      Key Number Set -> 2-4-7-8
                      Final draw count used to find key number set was 20
                      ***ABD SEGMENT***
                      Key Number Set -> 1-4-7-8
                      Key Number Set -> 3-4-7-8
                      Key Number Set -> 3-6-7-8
                      Key Number Set -> 4-5-6-7
                      Key Number Set -> 4-5-7-8
                      Final draw count used to find key number set was 20
                      ***ACD SEGMENT***
                      Key Number Set -> 1-2-3-4
                      Key Number Set -> 1-3-4-6
                      Key Number Set -> 1-3-4-9
                      Final draw count used to find key number set was 20
                      ***BCD SEGMENT***
                      Key Number Set -> 0-2-7-8
                      Key Number Set -> 2-4-7-8
                      Key Number Set -> 2-7-8-9
                      Final draw count used to find key number set was 20
                      ***Key Number Frequency***
                      0    1
                      1    6
                      2    5
                      3    7
                      4    10
                      5    2
                      6    4
                      7    9
                      8    8
                      9    4
                      Enter any key to exit

                      The key number frequency chart shows how many times each of the ten digits, 0 -9,  were referenced in all of the key number sets, that were determined for each segment. 4 has the highest frequency(10), and 0 has the lowest frequency(1).

                      The idea now is to determine a strategy using the chart and the key number sets. This will take some deep thinking, and I don't have  a mechanical set of rules for it. I think the lowest frequecy number and the highest frequecy digits are a good start(0 and 4). Also you may want to consider the three highest frequecy digits and the lowest frequecy digit(4,7,8,and 0). Additionally, if you ever see the lowest  frequency as 1, (the 0 digit in this case), go to the key number set that contains this digit and consider the numbers in that key number set(since the frequecy is 1 there is only one key number set that contains the 0). In this case, we find that the key number set is 0-2-7-8 on BCD segment.

                      Let's look at the next five days worth of results:

                      04/02/2009    Evening   0 3 1 2
                      04/02/2009    Midday    0 8 0 3
                      04/01/2009    Evening   3 4 7 7
                      04/01/2009    Midday    3 3 7 2
                      03/31/2009    Evening   8 0 8

                      I think what's remarkable here is that the prediction  for the BCD segment was right on. The key numbers for the BCD segment were 0-2-7-8, and at least one of them landed right on the B C or D in the next 4 draws, as was predicted.

                      jayemmar

                       

                      **************************************************************************

                      #include <math.h>
                      #include <stdlib.h>
                      #include <stdio.h>

                      int main()
                      {
                      int i, j,  temp1, temp2, temp3, temp4, a1, a2, a3, a4, a;
                      int drawCount, hit, results;
                      FILE *in;
                      int drawArray[20], knfArray[10];

                      int arrayOfFours[210] =
                      {123,124,125,126,127,128,129,134,135,136,137,138,139,
                      145,146,147,148,149,156,157,158,159,167,168,169,178,
                      179,189,234,235,236,237,238,239,245,246,247,248,249,
                      256,257,258,259,267,268,269,278,279,289,345,346,347,
                      348,349,356,357,358,359,367,368,369,378,379,389,456,
                      457,458,459,467,468,469,478,479,489,567,568,569,578,
                      579,589,678,679,689,789,1234,1235,1236,1237,1238,1239,1245,
                      1246,1247,1248,1249,1256,1257,1258,1259,1267,1268,1269,1278,1279,
                      1289,1345,1346,1347,1348,1349,1356,1357,1358,1359,1367,1368,1369,
                      1378,1379,1389,1456,1457,1458,1459,1467,1468,1469,1478,1479,1489,
                      1567,1568,1569,1578,1579,1589,1678,1679,1689,1789,2345,2346,2347,
                      2348,2349,2356,2357,2358,2359,2367,2368,2369,2378,2379,2389,2456,
                      2457,2458,2459,2467,2468,2469,2478,2479,2489,2567,2568,2569,2578,
                      2579,2589,2678,2679,2689,2789,3456,3457,3458,3459,3467,3468,3469,
                      3478,3479,3489,3567,3568,3569,3578,3579,3589,3678,3679,3689,3789,
                      4567,4568,4569,4578,4579,4589,4678,4679,4689,4789,5678,5679,5689,
                      5789,6789};


                            /*
                            **Open files
                            */
                             in = fopen("drawsP4.txt", "r");
                             if(in == NULL)
                             {
                                printf("error in opening drawsP3.txt\n");
                                getch();
                                exit(0);
                             }


                             /*
                             ** Zero array
                             */
                             for(i = 0; i < 10; i++)
                             {
                                knfArray[i] = 0; 
                             }
                           
                             /*
                             ** Get the past 20 draws into memory and then
                             ** loop through the first 20 draws and see if
                             ** there's a key number set for these draws
                             */
                             i = 0;
                             while(!feof(in) && i < 20)
                             {
                                 fscanf(in, "%d", &a);
                                 drawArray[i] = a;
                                 i++;
                                 drawCount++;         
                             }
                             drawCount = i;

                             results = 0;
                             printf("***ABC SEGMENT***\n");     
                      startABC:
                             for(i = 0; i < 210; i++)
                             {     hit = 0;
                                   /*
                                   ** Peel off the digits from the key number set
                                   */
                                   temp1 = arrayOfFours[i]/1000;
                                   temp2 = (arrayOfFours[i] - 1000*temp1)/100;
                                   temp3=  (arrayOfFours[i] - 1000*temp1 - 100*temp2)/10;
                                   temp4 = (arrayOfFours[i] - 1000*temp1 - 100*temp2 - 10*temp3);

                                   for(j = 0; j < drawCount; j++)
                                   {
                                      /*
                                      ** Peel off the digits from this draw
                                      */
                                      a = drawArray[j];         
                                      a1 = a/1000;
                                      a2 = (a - 1000*a1)/100;
                                      a3=  (a - 1000*a1 - 100*a2)/10;
                                      a4 = (a - 1000*a1 - 100*a2 - 10*a3);
                                   
                                      /*
                                      ** Check to see if at least one digit matches one
                                      ** in the key set
                                      */
                                   
                                      if((a1 == temp1 || a1 == temp2 || a1 == temp3 || a1 == temp4)
                                        ||(a2 == temp1 || a2 == temp2 || a2 == temp3 || a2 == temp4)
                                        ||(a3 == temp1 || a3 == temp2 || a3 == temp3 || a3 == temp4))
                                     {
                                        /*
                                        ** Bump the match count when a match occurs
                                        */
                                        hit++;
                                     } 
                                               
                                   }
                               
                                 
                                   /*
                                   ** If the at least one number
                                   ** in the key number set matched
                                   ** for all draws, print out the key number set
                                   */
                                   if(hit == drawCount)
                                   {
                                      printf("Key Number Set -> %i-%i-%i-%i\n",
                                              temp1,  temp2, temp3, temp4);
                                      knfArray[temp1]++;       
                                      knfArray[temp2]++;       
                                      knfArray[temp3]++;       
                                      knfArray[temp4]++;       
                                           
                                      /*
                                      ** Signal that a key number set was found
                                      */
                                      results = 1;
                                   }
                                   
                                     

                             }


                             /*
                             ** If no key number set was found, drop the last draw
                             ** and search again
                             */
                             if(results == 0)
                             {
                                  drawCount = drawCount - 1;
                                  goto startABC;
                             }

                             /*
                             ** Tell the user how many reductions it took
                             ** to find a key number set.
                             */
                             printf("Final draw count used to find key number set was %i\n", drawCount);

                             rewind(in); 
                             i = 0;
                             while(!feof(in) && i < 20)
                             {
                                 fscanf(in, "%d", &a);
                                 drawArray[i] = a;
                                 i++;
                                 drawCount++;         
                             }
                             drawCount = i;

                             results = 0;

                             printf("***ABD SEGMENT***\n");     
                      startABD:
                             for(i = 0; i < 210; i++)
                             {     hit = 0;
                                   /*
                                   ** Peel off the digits from the key number set
                                   */
                                   temp1 = arrayOfFours[i]/1000;
                                   temp2 = (arrayOfFours[i] - 1000*temp1)/100;
                                   temp3=  (arrayOfFours[i] - 1000*temp1 - 100*temp2)/10;
                                   temp4 = (arrayOfFours[i] - 1000*temp1 - 100*temp2 - 10*temp3);

                                   for(j = 0; j < drawCount; j++)
                                   {
                                      /*
                                      ** Peel off the digits from this draw
                                      */
                                      a = drawArray[j];         
                                      a1 = a/1000;
                                      a2 = (a - 1000*a1)/100;
                                      a3=  (a - 1000*a1 - 100*a2)/10;
                                      a4 = (a - 1000*a1 - 100*a2 - 10*a3);
                                   
                                      /*
                                      ** Check to see if at least one digit matches one
                                      ** in the key set
                                      */
                                   
                                      if((a1 == temp1 || a1 == temp2 || a1 == temp3 || a1 == temp4)
                                        ||(a2 == temp1 || a2 == temp2 || a2 == temp3 || a2 == temp4)
                                        ||(a4 == temp1 || a4 == temp2 || a4 == temp3 || a4 == temp4))
                                     {
                                        /*
                                        ** Bump the match count when a match occurs
                                        */
                                        hit++;
                                     } 
                                               
                                   }
                               
                                 
                                   /*
                                   ** If the at least one number
                                   ** in the key number set matched
                                   ** for all draws, print out the key number set
                                   */
                                   if(hit == drawCount)
                                   {
                                      printf("Key Number Set -> %i-%i-%i-%i\n",
                                              temp1,  temp2, temp3, temp4);
                                      knfArray[temp1]++;       
                                      knfArray[temp2]++;       
                                      knfArray[temp3]++;       
                                      knfArray[temp4]++;       
                                           
                                      /*
                                      ** Signal that a key number set was found
                                      */
                                      results = 1;
                                   }
                                   
                                     

                             }


                             /*
                             ** If no key number set was found, drop the last draw
                             ** and search again
                             */
                             if(results == 0)
                             {
                                  drawCount = drawCount - 1;
                                  goto startABD;
                             }

                             /*
                             ** Tell the user how many reductions it took
                             ** to find a key number set.
                             */
                             printf("Final draw count used to find key number set was %i\n", drawCount);
                         
                             /*
                             **Now do segment ACD
                             */


                             rewind(in);
                             i = 0;
                             while(!feof(in) && i < 20)
                             {
                                 fscanf(in, "%d", &a);
                                 drawArray[i] = a;
                                 i++;
                                 drawCount++;         
                             }
                             drawCount = i;

                             results = 0;
                             

                             printf("***ACD SEGMENT***\n");     
                      startACD:
                             for(i = 0; i < 210; i++)
                             {     hit = 0;
                                   /*
                                   ** Peel off the digits from the key number set
                                   */
                                   temp1 = arrayOfFours[i]/1000;
                                   temp2 = (arrayOfFours[i] - 1000*temp1)/100;
                                   temp3=  (arrayOfFours[i] - 1000*temp1 - 100*temp2)/10;
                                   temp4 = (arrayOfFours[i] - 1000*temp1 - 100*temp2 - 10*temp3);

                                   for(j = 0; j < drawCount; j++)
                                   {
                                      /*
                                      ** Peel off the digits from this draw
                                      */
                                      a = drawArray[j];         
                                      a1 = a/1000;
                                      a2 = (a - 1000*a1)/100;
                                      a3=  (a - 1000*a1 - 100*a2)/10;
                                      a4 = (a - 1000*a1 - 100*a2 - 10*a3);
                                   
                                      /*
                                      ** Check to see if at least one digit matches one
                                      ** in the key set
                                      */
                                   
                                      if((a1 == temp1 || a1 == temp2 || a1 == temp3 || a1 == temp4)
                                        ||(a3 == temp1 || a3 == temp2 || a3 == temp3 || a3 == temp4)
                                        ||(a4 == temp1 || a4 == temp2 || a4 == temp3 || a4 == temp4))
                                     {
                                        /*
                                        ** Bump the match count when a match occurs
                                        */
                                        hit++;
                                     } 
                                               
                                   }
                               
                                 
                                   /*
                                   ** If the at least one number
                                   ** in the key number set matched
                                   ** for all draws, print out the key number set
                                   */
                                   if(hit == drawCount)
                                   {
                                      printf("Key Number Set -> %i-%i-%i-%i\n",
                                              temp1,  temp2, temp3, temp4);
                                      knfArray[temp1]++;       
                                      knfArray[temp2]++;       
                                      knfArray[temp3]++;       
                                      knfArray[temp4]++;       
                                           
                                      /*
                                      ** Signal that a key number set was found
                                      */
                                      results = 1;
                                   }
                                   
                                     

                             }


                             /*
                             ** If no key number set was found, drop the last draw
                             ** and search again
                             */
                             if(results == 0)
                             {
                                  drawCount = drawCount - 1;
                                  goto startACD;
                             }

                             /*
                             ** Tell the user how many reductions it took
                             ** to find a key number set.
                             */
                             printf("Final draw count used to find key number set was %i\n", drawCount);


                             rewind(in);
                             i = 0;
                             while(!feof(in) && i < 20)
                             {
                                 fscanf(in, "%d", &a);
                                 drawArray[i] = a;
                                 i++;
                                 drawCount++;         
                             }
                             drawCount = i;

                             results = 0;
                           

                             printf("***BCD SEGMENT***\n");     
                      startBCD:
                             for(i = 0; i < 210; i++)
                             {     hit = 0;
                                   /*
                                   ** Peel off the digits from the key number set
                                   */
                                   temp1 = arrayOfFours[i]/1000;
                                   temp2 = (arrayOfFours[i] - 1000*temp1)/100;
                                   temp3=  (arrayOfFours[i] - 1000*temp1 - 100*temp2)/10;
                                   temp4 = (arrayOfFours[i] - 1000*temp1 - 100*temp2 - 10*temp3);

                                   for(j = 0; j < drawCount; j++)
                                   {
                                      /*
                                      ** Peel off the digits from this draw
                                      */
                                      a = drawArray[j];         
                                      a1 = a/1000;
                                      a2 = (a - 1000*a1)/100;
                                      a3=  (a - 1000*a1 - 100*a2)/10;
                                      a4 = (a - 1000*a1 - 100*a2 - 10*a3);
                                   
                                      /*
                                      ** Check to see if at least one digit matches one
                                      ** in the key set
                                      */
                                   
                                      if((a2 == temp1 || a2 == temp2 || a2 == temp3 || a2 == temp4)
                                        ||(a3 == temp1 || a3 == temp2 || a3 == temp3 || a3 == temp4)
                                        ||(a4 == temp1 || a4 == temp2 || a4 == temp3 || a4 == temp4))
                                     {
                                        /*
                                        ** Bump the match count when a match occurs
                                        */
                                        hit++;
                                     } 
                                               
                                   }
                               
                                 
                                   /*
                                   ** If the at least one number
                                   ** in the key number set matched
                                   ** for all draws, print out the key number set
                                   */
                                   if(hit == drawCount)
                                   {
                                      printf("Key Number Set -> %i-%i-%i-%i\n",
                                              temp1,  temp2, temp3, temp4);
                                      knfArray[temp1]++;       
                                      knfArray[temp2]++;       
                                      knfArray[temp3]++;       
                                      knfArray[temp4]++;       
                                           
                                      /*
                                      ** Signal that a key number set was found
                                      */
                                      results = 1;
                                   }
                                   
                                     

                             }


                             /*
                             ** If no key number set was found, drop the last draw
                             ** and search again
                             */
                             if(results == 0)
                             {
                                  drawCount = drawCount - 1;
                                  goto startBCD;
                             }

                             /*
                             ** Tell the user how many reductions it took
                             ** to find a key number set.
                             */
                             printf("Final draw count used to find key number set was %i\n", drawCount);
                             printf("***Key Number Frequency***\n");
                             for(i = 0; i < 10; i++)
                             {
                                printf("%i\t%i\n", i, knfArray[i]); 
                             }

                             printf("Enter any key to exit\n");
                             getch();




                             close(in);


                      }

                        Avatar
                        Florida
                        United States
                        Member #61951
                        June 11, 2008
                        48 Posts
                        Offline
                        Posted: April 27, 2009, 5:50 pm - IP Logged

                        Hi, jayemmar

                        Question:

                         if I want  to use Input data set up to last 50 draws

                        how do I change the code ?

                        thanks ,nice programs

                        Jim

                          edge's avatar - waveform

                          United States
                          Member #68609
                          December 26, 2008
                          2204 Posts
                          Offline
                          Posted: April 27, 2009, 10:45 pm - IP Logged

                          update status for NY P4:

                          1. box hit on first try in 35 sequences.

                          2. upgraded to a "helper" functionality to generate number/frequency pairs from key sets to guide wheel generation.

                          planned:

                          1. to try to identify invariants across segments and key sets, to yield direct straight  in reasonable time frame.

                          ab actu ad posse valet illatio - from the past one can infer the future

                            Avatar

                            United States
                            Member #7437
                            October 3, 2004
                            383 Posts
                            Offline
                            Posted: April 28, 2009, 11:24 am - IP Logged

                            To change the draw stack to 50 look for the line of code that reads:

                                  while(!feof(in) && i < 20);

                            There should be four occurrances of this(one for each segment). The number 20 assumes that the first 20 draws will be considered in the draw file. Change each 20 to 50 if you want to analyze the first 50 draws and then recompile the code. Remember that you must have at least 50 past draws in the draw file, otherwise you'll get an error.

                            jayemmar

                              Avatar

                              United States
                              Member #7437
                              October 3, 2004
                              383 Posts
                              Offline
                              Posted: April 28, 2009, 11:25 am - IP Logged

                              Edge:

                               

                              Can you be a little more specific in telling us what exactly you are doing?

                               

                              jayemmar