# Data structures and algorithms for bridge game play?

In a bridge game, a deck of 52 cards (13 spades , 13 clubs, 13 diamonds, 13 spades) are dealt to 4 players (13 cards each) then game starts.Game session ends after 13 tricks each having 4 cards.There are 28561 possible non repeated 4 card groups.

What is the best method of generating and storing all possible trick combinations (played according to the bridge rules just for one session) to be further processed by a computer program (i.e., data structures such as game trees, and any open source algorithms written for any computer language if any).

All resources to read to get the theory behind or any references are welcome. Thank you.

• There are too many of them, in fact at least $13! \approx 6 \times 10^9$, which is still somewhat reasonable but probably a substantial underestimate. (I get $13!$ since at each trick, the player who leads can choose any of her remaining cards.) Commented Dec 27, 2012 at 13:08
• In the extreme case where one person has all the clubs, another all the hearts, a third all the spades, and the fourth all the diamonds, then the number of trick combinations is $(13!)^4$, even though it's trivial to figure out who wins the hand. Commented Dec 28, 2012 at 5:39
• This is a very vague question. What does "to be further processed" mean (and the 'best' method probably depends on it, don't you think)? In any case, have you consider looking at the papers behind GIB (the double dummy solver by Matt Ginsberg)? Commented Dec 29, 2012 at 5:09
• perhaps you can study bidding in Bridge hands? Commented Sep 2, 2013 at 14:05