Algorithms

Straight bet Outcomes are the easiest to generate.

Procedure 7.1. Generating Straight Bets

Split bet Outcomes are more complex because of the various cases: corners, edges and down-the-middle.

We note that there are two kinds of split bets: left-right pairs and up-down pairs. The left-right pairs all have the form (n, n+1). The up-down paris have the form (n, n+3). We can look at the number 5 as being part of 4 different pairs: (4,4+1), (5,5+1), (2,2+3), (5,5+3). The corner number 1 is part of 2 split bets: (1,1+1), (1,1+3).

We can generate the “left-right” split bets by iterating through the left two columns; the numbers 1, 4, 7, ..., 34 and 2, 5, 8, ..., 35.

Procedure 7.2. Generating Split Bets

Similarly, for the numbers 1 through 33, we can generate the “up-down” split bets. For each number, n, we generate a “n, n+3” split bet. This Outcome belongs to two Bins: n and n+3.

Street bet Outcomes are very simple.

We can generate the street bets by iterating through the twelve rows of the layout.

Procedure 7.3. Generating Street Bets

Corner bet Outcomes are as complex as split bets because of the various cases: corners, edges and down-the-middle.

Eacb corner has four numbers, n, n+1, n+3, n+4. We can generate the corner bets by iterating through the numbers 1, 4, 7, ..., 31 and 2, 5, 8, ..., 32. For each number, n, we generate four corner bets: “n, n+1, n+3, n+4” corner bet. This Outcome object belongs to four Bins.

We generate corner bets by iterating through the lines between rows and columns. There are two lines between the three columns, and 11 lines between the 12 rows. The column lines are to the right of the first two columns. Similarly the row lines are below the first 11 rows.

Procedure 7.4. Generating Corner Bets

Line bet Outcomes are similar to street bets. However, these are based around the 11 lines between the 12 rows.

For lines s numbered 0 to 10, the numbers on the line bet can be computed as follows: 3s+1, 3s+2, 3s+3, 3s+4, 3s+5, 3s+6. This Outcome object belongs to six individual Bins.

Procedure 7.5. Generating Line Bets

Dozen bet Outcomes require enumerating all twelve numbers in each of three groups.

Procedure 7.6. Generating Dozen Bets

Column bet Outcomes require enumerating all twelve numbers in each of three groups. While the outline of the algorithm is the same as the dozen bets, the enumeration of the individual numbers in the inner loop is slightly different.

Procedure 7.7. Generating Column Bets

The even money bet Outcomes are relatively easy to generate.

Procedure 7.8. Generating Even-Money Bets

  1. Create the Red outcome, with odds of 1:1.

  2. Create the Black outcome, with odds of 1:1.

  3. Create the Even outcome, with odds of 1:1.

  4. Create the Odd outcome, with odds of 1:1.

  5. Create the High outcome, with odds of 1:1.

  6. Create the Low outcome, with odds of 1:1.

  7. For All Numbers. For each number, n, from 1 to 36:

    1. Low? If n is between 1 and 18, associate the low Outcome with Bin n.

      High? Otherwise, n is between 19 and 36, associate the high Outcome with Bin n.

    2. Even? If n % 2 is zero, associate the even Outcome with Bin n.

      Odd? Otherwise, n % 2 is 1, associate the odd Outcome with Bin n.

    3. Red? If n is one of 1, 3, 5, 7, 9, 12, 14, 16, 18, 19, 21, 23, 25, 27, 30, 32, 34, or 36, associate the red Outcome with Bin n.

      Black? Otherwise, associate the black Outcome with Bin n.