The number of legal bidding sequences.

  If you just want the answer then catch the bus otherwise start here with




  ENUMERATING A BIDDING SEQUENCE

7N

7S

7H

7D

7C

6N

6S

6H

6D

6C

5N

5S

5H

5D

5C

4N

4S

4H

4D

4C

3N

3S

3H

3D

3C

2N

2S

2H

2D

2C

1N

1S

1H

1D

1C

0

0

0

0

0

0

0

1

0

0

0

0

1

0

0

1

0

7

0

0

0

0

0

5

0

0

0

4

1

0

0

0

1

0

0

There are 35 bids 1C to 7NT, ignoring the passes doubles redoubles for the moment, if all the bids are written out right to left then it’s easy to enumerate any sequence of bidding: Place a 1 below the bid if it was called and 0 if it was not. So the bid sequence 1H,2D,3S,4D,5C,5S,6H can be written as a backward list with the higher bid on the left.

{0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1,0,0}.

Ignoring the left-side hi-order zeros the list is equivalent to the binary number 10001001000100100010010001002 equal to 35932305 in common (base10) decimal notation. This enumeration is missing the transitions from one bid to next. These are passes, doubles etc. To expand the enumeration a slot is 0 if the bid is not used or the slot has a value 1 ↔ 21. These are the 21 possible call sequences (see table) that connect two successive bids. The last bid is similar but the value is an exit transition. There are 7 exit call sequences(see table) and all finish with p p p of course.
To avoid confusion interpreting the double character transition digits 10-21 the base22 number notation is used. This maps single characters 0 1 2 3 4 5 6 7 8 9 A B C D E F G H I J K L to the numbers 0-21.
See the short note on number bases at the end.

Other considerations are the 4 cases of lead-in call sequences starting with an immediate bid by the dealer, and the hand-passed-out dilemma. The PPPP bid sequence is a one-off and sits outside the enumeration scheme for generic sequences. As such it is tempting to place it on Page 0 of a book of bids and 1 is added to calculated total.

This complete sequence of bids and calls with the extended coding expands to the right-side WNES table (nb. The lead-in is assumed to be 0, with Dealer West and first to bid).

7N

7S

7H

7D

7C

6N

6S

6H

6D

6C

5N

5S

5H

5D

5C

4N

4S

4H

4D

4C

3N

3S

3H

3D

3C

2N

2S

2H

2D

2C

1N

1S

1H

1D

1C

0

0

0

0

0

0

0

4

0

0

0

0

H

0

0

6

0

A

0

0

0

0

0

I

0

0

0

D

1

0

0

0

F

0

0


 

std transitions (bid to bid)

Exits (bid to finish)

lead-in

W

N

E

S

1

bb

8

bppdpb

15(F)

bppdrppb

1

bpppf

0

b

1H

P

P

X

2

bpb

9

bppdppb

16(G)

bdpprb

2

bdpppf

1

pb

XX

P

P

2D

3

bppb

10(A)

bdrb

17(H)

bdpprpb

3

bppdpppf

2

ppb

2H

P

P

X

4

bdb

11(B)

bdrpb

18(I)

bdpprppb

4

bdrpppf

3

pppb

XX

3D

X

P

5

bdpb

12(C)

bdrppb

19(J)

bppdpprb

5

bppdrpppf

P

XX

P

P

6

bdppb

13(D)

bppdrb

20(K)

bppdpprpb

6

bdpprpppf

4H

X

XX

5H

7

bppdb

14(E)

bppdrpb

21(L)

bppdpprppb

7

bppdpprpppf

X

P

P

XX

b is a bid so bb is an immediate over-call, p indicates a pass, d is a double , r is the redouble of a double, f is the end

6H

X

XX

P

P

P

Setting aside the 4 lead-in cases, make m the position of the last suit bid (1 ↔ 35). The direction of travel is right to left. This associates low contracts with enumerations that are relatively small and vice versa. There has to be a last suit bid position  or it's hand-passed-out. The 0 code or one of the 21 non-zero transitions codes can to be applied to each of the preceding (m-1) bid positions. As a last suit bid there are 7 variants of endings that end with 3 passes. All  sequences that have a final bid in position [m] are referred to collectively as an m-sequence group (or m-group). The counts of all generic sequences within each m-sequence group is: 22^(m-1).  After summing across all m-groups  2 multipliers are applied to obtain a final total.

To illustrate the m-group count calculation a method template with familiar (base10) arithmetic is examined. Consider the last suit bid is at position 21(5C) with an arbitrary exit code #. Assume there are only 9 non-zero transitions available so the codes in the lesser bids (positions 1 to 20) are 0 to 9.
The highest m-sequence is # 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 and
The lowest  m-sequence is # 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 and
The highest enumeration has all 9s. In this case (20x 9s):
_9999999999999999999 and
The lowest  enumeration has all 0s. In this case (20x 0s):
_0000000000000000000
Add 1 to the highest enumeration
10000000000000000000
This is the count of all possible generic sequences with the last suit bid in position 21. 

The m-sequences actually have 21-non zero transitions (1 to L). L is the base22 character for the number 21. Just write down the highest enumeration as before  but in base22 notation:
_LLLLLLLLLLLLLLLLLLLLL[base22].   Add 1 as before
10000000000000000000[base22].  Convert this to base10, 22^20 = 70542949868640404420794777610 sequences.
That last [m] suit bid has 7 exit patterns to give 7x (22^20) inclusive sequences.

The grand count of sequences is obtained by summing the values of expression 7x 22^(m-1) for m=1 to 35 to give 7x (22^35-1)/(22-1), multiply by 4 for each lead-in call sequence and then optionally add 1 for hand-passed-out


4/3 x (22^35-1) +1.
Mathematica calculated this number of complete bidding sequences as:
128745 650347 030683 120231 926111 609371 363122 69755710
128746 SeptillionGB
AND MOST OF THEM ARE MEANINGLESS RUBBISH!!!

The count of generic sequences (i.e. without lead-in and no hand-passed-out sequence) →
32186412586757670780057981527902342840780674389
10
To obtain the number of sequences without exit transitions specified simply divide the above by 7 and convert to base22
11 111 111 111 111 111 111 111 111 111 111 11122

The easiest example of a rubbish sequence is the longest bidding sequence of 319 bids+calls

N

E

S

W

N

E

S

W

N

E

S

W

N

E

S

W

N

E

S

W

P

P

P

1n

P

P

X

3h

P

P

X

5c

P

P

X

6s

P

P

X

1c

P

P

X

P

P

XX

P

P

P

XX

P

P

P

XX

P

P

P

XX

P

P

P

XX

P

P

2c

P

P

P

3s

P

P

P

5d

P

P

P

6n

P

P

P

1d

P

P

X

P

P

XX

X

P

P

XX

X

P

P

XX

X

P

P

XX

X

P

P

XX

P

P

2d

P

P

P

3n

P

P

P

5h

P

P

P

7c

P

P

P

1h

P

P

X

P

P

P

X

P

P

P

X

P

P

P

X

P

P

P

X

P

P

XX

P

P

2h

XX

P

P

4c

XX

P

P

5s

XX

P

P

7d

XX

P

P

1s

P

P

X

P

P

P

X

P

P

P

X

P

P

P

X

P

P

P

X

P

P

XX

P

P

P

XX

P

P

P

XX

P

P

P

XX

P

P

P

XX

P

P

2s

P

P

X

4d

P

P

X

5n

P

P

X

7h

P

P

X

P

P

XX

P

P

P

XX

P

P

P

XX

P

P

P

XX

P

Calls made

P

2n

P

P

P

4h

P

P

P

6c

P

P

P

7s

P

P

N

E

S

W

X

P

P

XX

X

P

P

XX

X

P

P

XX

X

P

P

XX

52p

54p

54p

54p

P

P

3c

P

P

P

4s

P

P

P

6d

P

P

P

7n

P

9x

9x

8x

9x

P

X

P

P

P

X

P

P

P

X

P

P

P

X

P

P

9xx

8xx

9xx

9xx

XX

P

P

3d

XX

P

P

4n

XX

P

P

6h

XX

P

P

P

9#

9#

9#

8#

P

P

X

P

P

P

X

P

P

P

X

P

P

XX

P

P

P

XX

P

P

P

XX

P

P


 

A MINI NOTE ON NUMBERS, BASES, AND PRECISION

The number 00234 decimal is 0x104 + 0x103 +2x102 + 3x101 +4x100 = 234
It is customery to specify the bigger bits first.

Binary numbers are just the same except the base is two instead of ten so the number 001011binary is
0x25 + 0x24 + 1x23 + 0x22 + 1x21 +1x20 = 11 decimal.
Base22 numbers follow the same pattern but using additional characters A ↔ L
7C DFK L5H22 expands as
7x227 + 12x226 +13x225 + 15x224+ 20x223 + 21x222 + 5x221 +17x220 =1889179936610

The total of sequences is 4/3 x (22^35-1) +1. To evaluate that term 2235 to full precision in you need the equivalent of a 48 digit calculator. The complete expression can be calculated with a spreadsheet that models 48 column wide exact long multiplication with carry forwards and shift. Surprisingly Windows Calc offers 32 significant decimal digits with an answer of 1.2874565034703068312023192611161e+47 but standard EXCEL '97 using double precision arithmetic only calculates to about 17 significant decimal digits.