what are the odds?

AnonymousAnonymous GUESTS
edited February 2009 in Bug Reports
So here's a few brainteasers for all you mathematically inclined green felt players that I've been mulling over lately:

1. How many SHT games are there? (52! ...?)

Defining a unique SHT "hand" by the shortest game-winning set of ordered moves...

2. How many hands are there? (52! / 4! ...?)

3. What's the distribution of hand lengths? (Did you guys ever explore this experimentally with your solver?)

I often play hands of SHT other than the "game of the day". I have never seen another person's score on the list when I finish one of these games. I am assuming that these games are all stored in the score database and so the reason I never see this event is that it is impossibly rare.

4. Are any examples of a hand being randomly assigned twice in the history of green felt score database?

5. Given the level of traffic/traffic growth on the site, when is this event expected to occur for the first time?

Comments

  • daviddavid REGISTERED, ADMINISTRATORS
    Hi Robb,
    Robb wrote:
    3. What's the distribution of hand lengths? (Did you guys ever explore this experimentally with your solver?)

    I often play hands of SHT other than the "game of the day". I have never seen another person's score on the list when I finish one of these games. I am assuming that these games are all stored in the score database and so the reason I never see this event is that it is impossibly rare.
    Yes. We'd like to rectify that by making new games go to previous game of the days that you haven't played yet. When those are exhausted then you'd start getting random games. Even then we'd pick "games that someone else has played that you haven't yet" (in fact, that might cover both cases, especially if we sorted by "number of people that have played the game"). The main issue is that that is a tricky SQL query on our current schema. If there are any Green Felt players that happen to be DB gurus, we'd gladly accept hints on how to do that query quickly (very very quickly, we're talking milliseconds).
    4. Are any examples of a hand being randomly assigned twice in the history of green felt score database?
    I could probably query that for you but it might hang up the whole database for too long. :-) Also, we don't keep track of whether the game was randomly assigned or not--all we see is the game number. So we could look for games numbers that have just 2 games played, but that could be because someone shared their game number with a friend. Jim and I have occasionally passed random game numbers to each other when the hand was notable (I remember one where it practically played itself with autoplay--there were only about 2 or three moves you had to make manually).

    I'll let someone else answer the math ones. :-)

    -David
  • So I thought about it some more. I think the number of games should be found by picking the cards for each column:

    stacks ={1,1,0,0,0,0,0,0,0,0}+Table[5,{x,1,10}]
    remaining = Append[{52}, Drop[Table[52-Total[stacksRange[1,x]], {x,1,10}],-1]]//Flatten
    @ Binomial[#1,#2] & [remaining, stacks]

    = 3618540443281825740506070547242891798567321600

    Which is many more than your random seed will allow... so I guess we're limited to 2^32 games? Which invites another question - which games are unreachable given your shuffling algorithm?

    What makes the database problem so difficult anyway? Or is it a matter of hardware?
  • I would think the distinct hands would consider permutations of the columns as non-distinct as well as the permutation of the suits you already consider.

    52! / ( 4! * 2! * 8!)

    I think you first question depends on your definition of a distinct move.

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Attach file
Attach image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file
Home Bug ReportsComment As ...