Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 669119
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T00:06:59+00:00 2026-05-14T00:06:59+00:00

As there are 52 cards in a deck we know there are 52 choose

  • 0

As there are 52 cards in a deck we know there are 52 choose 2 = 1326 distinct matchups, however in preflop poker this can be bucketed into 169 different hands such as AK offsuit and AK suited as whether it is A hearts K hearts or A spade K spades it makes no difference preflop. My question is, is there a nice mathematical property in which I can uniquely index each of these 169 hands (from 0 to 168 preferably). I am trying to create a look up table as a double[][] = new double [169][169] but have no way of changing a hand representation such as AKs (an Ace and a King of the same suit) to a unique index in this array.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T00:06:59+00:00Added an answer on May 14, 2026 at 12:06 am
    1. If the cards are of the same suit, sort the two cards, so that the lower card comes first. If they are of different suits, sort the two cards so that the lower card comes last. A special case will be reserved for when the cards are of the same rank and suit.
    2. Assign each rank a value from 0 to 12 and use a base-13 counting system. The highest value in this system is 12*13 + 12 = 168.
    3. Finally, for cases where both cards are of the same rank and suit, take the value of the rank and add 169 to it. These cases will be in the range 169-181.

    Maybe my math is wrong, but I come up with 182 distinct pairs of cards. I’m no expert in the game, so maybe I’m missing something.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i know that there are many ways to program a deck of poker cards
I know there is this question that is very similar, but I wanted to
I need to split a deck of cards into two packets: the top half
Are there any reference cards or cheats sheets available for UML?
For a machine with multiple NIC cards, is there a convenient method in Java
I make lot of dealing with RFID cards. As much as there are different
I'm implementing a card game in C. There are lots of types of cards
Classes confuse me! For this particular assignment, we are to do the classic 'Cards
I'm trying to make a deck of cards, with arrays for each suit in
I'm working with smart cards in C# using the Subsembly SmartCard API. Are there

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.