7

I'm wondering how to avoid over counting and recognize when I'm over counting. Here are some examples in which I over-count.

Example one:

How many hands of $5$ cards are there were no two have the same number.

Here is my approach:


Let the #: no two have the same number $=N$.

Work with the complement "Two have the same number".

$N={52 \choose 5}$-Two have same number

To get the same number twice. First choose a number $2-10$ for a total of $9$ choices (I don't count an ace as a number). Then choose $2$ cards out of $4$ with that number. Then choose $3$ cards from the remaining $50$.

$${52 \choose 5}-9{4 \choose 2}{50 \choose 3}$$


I realize this over-counts as it counts 2 heart, 2 spades, 2 diamonds, 3 hearts, 4 spades different from 2 diamond, 2 spades, 2 spades, 3 hearts, 4 spades.

This is quite troubling for me because I don't know how to recognize when I over count nor do I know how to fix this.

Example two:

How many hands of $13$ contain at least $3$ cards from every suit.


Pick $3$ cards from each suit: ${13 \choose 3}$. Then pick a card from the reaming $52-12=40$: ${40 \choose 1}$. That gives ${13 \choose 3}^4(40)$.

  • 52 choices for the first card, 48 for the second... – krirkrirk Jul 05 '17 at 21:40
  • 2
    I think the most direct way to do this is $\frac {52\cdot 48\cdot 44\cdot 40\cdot 36}{5!} = 4^5 {13\choose 5}$ – Doug M Jul 05 '17 at 21:43
  • 1
    You can always check a enumerative formula by writing an algorithm to explicitly list all the instances and count them (at least if there are not too many.) The effort required to do this may help in your understanding of the problem as well. Of course, your algorithm may be wrong, so sometimes it's wise to list them in as "stupidly" as possible - using brute force, without any cleverness, so that you're not using any assumptions that might have lead you astray. – Jair Taylor Jul 05 '17 at 22:03
  • 1
    "Then choose 2 cards out of 4 with that number. Then choose 3 cards from the remaining 50." At this point you should immediate ask yourself if the 3 cards are the same or different from the two you picked. As they can be the same as the two you picked then you should realize you will overcount. – fleablood Jul 05 '17 at 22:24
  • BTW, i'd really be surprised if they don't mean number to be any rank including aces and face cards. But that's not really relevant to your question. – fleablood Jul 05 '17 at 22:26
  • 1
  • 1
    Have the same number of what?? – DanielWainfleet Jul 05 '17 at 23:05
  • @DanielWainfleet Not a number of anything. Each card is either a face card or an ace or a number. The question is question is how many hands have no two cards being the same number. – fleablood Jul 05 '17 at 23:20

1 Answers1

4

1*. (Treating the whole deck as "numbers" as pointed out in a comment below). We choose $5$ types of numbers out of $13$ distinct numbers in a deck and then we multiply by $4$ five times as every number we selected can be represented by $4$ suits and all combinations are possible, all in all $4^5 {13 \choose 5}$ as @DougM suggested.

1.($9$ numbers from $2$ to $10$, $4$ face cards). Among the drawn cards there can be between $0$ and $5$ numbers, for $i \in \{0,\dots,5\}$ we first determine the distinct numbers that were drawn: $9 \choose i$, every number could be one of $4$ suits, so we multiply by $4^i$ and then we multiply by the possibilites for the remaining $5-i$ cards to be drawn from the $16$ not-numbers, which is ${16 \choose {5-i}}$, for all $i$'s we get $\sum_{i=0}^5 4^i {9 \choose i}{16 \choose {5-i}}$.

What prevents you from overcounting here is introducing the $i$ parameter which helps you consider the cases.

2. Multiplying by $40$ is not the best idea as these $40$ cards are of different suits and everything could get mixed. We should restrict ourselves to choosing the appropriate number of cards only within every separate suit, and how to determine these numbers? There need to be at least $3$ from every suit, so that makes $4*3=12$ out of $13$, the remaining $1$ card makes one $3$ a $4$ ($4$ cards are drawn from one of the suits). Altogether: $$4{13 \choose 4}{13 \choose 3}{13 \choose 3}{13 \choose 3}.$$ We multiply by $4$ as there are $4$ possibilities to choose the suit from which $4$ numbers are drawn.

What makes this problem not that complex is that there is only one distribution $(4, 3, 3, 3)$ of cards drawn from suits. Should the exercise say "at least two", there would be more possibilities, e.g. $(7,2,2,2)$; $(6,3,2,2)$; $(5,3,3,2)$ and so on, we'd have to count the possibilites in every case and add them up to get the final result.

Theta
  • 887
  • 1
    In the question he specifies that he wants to count the number of hands that don't have a duplicate number, this solution looks like it's counting hands that don't have a duplicate rank. For example, a hand like AAKK5 should be counted, but isn't in this solution. – Arthur Skirvin Jul 05 '17 at 22:02
  • @ArthurSkirvin You're right, I missed that. – Theta Jul 05 '17 at 22:05