Intereting Posts

Basis of a $2 \times 2$ matrix with trace $0$
Rewriting sequence from $X_{n+1}$ to $X_n$
The Laplace transform of $\exp(t^2)$
Proof of Convergence: Babylonian Method $x_{n+1}=\frac{1}{2}(x_n + \frac{a}{x_n})$
Prove that $\int_0^1{\left\lfloor{1\over x}\right\rfloor}^{-1}\!dx={1\over2^2}+{1\over3^2}+{1\over4^2}+\cdots.$
Extended Euclidean Algorithm problem
$\tau$ and grouping of prime numbers
Generate solutions of Quadratic Diophantine Equation
Find a positive integer such that half of it is a square,a third of it is a cube,and a fifth of it is a fifth power
Conjectured compositeness tests for $N=k\cdot 2^n \pm 1$ and $N=k\cdot 2^n \pm 3$
How to estimate the size of the neighborhoods in the Inverse Function Theorem
Closed form of a partial sum of the power series of $\exp(x)$
Why does the median minimize $E(|X-c|)$?
How to prove that $z\gcd(a,b)=\gcd(za,zb)$
Isomorphism between $V$ and $V^{**}$

I’m working on a card game, which uses a non-standard deck of cards. Since I’m still tweaking the layout of the deck, I’ve been using variables as follows:

Hand size: $H$

Number of suits: $S$

Number of ranks: $R$

Number of copies of each card: $C$

Thus, the total number of unique cards in the deck is $S*R$, and the absolute total number of cards in the deck is $S*R*C$.

- Convergence of a sequence with assumption that exponential subsequences converge?
- Total number of solutions of an equation
- Is there a way to prove $\int {x^n e^x dx} = e^x \sum_{k = 0}^n {( - 1)^k \frac{{n!}}{{(n-k)!}}x^{n-k} } + C$ combinatorially?
- An extrasensory perception strategy ðŸ™‚
- Proof sought for a sum involving binomials that simplifies to 1/2
- Stirling numbers of the second kind on Multiset

Since there are duplicates for each card, I’m trying to find the number of unique hands of size $H$ that are possible for given $S$, $R$, $C$, and $H$. If I’m remembering correctly, ${S*R*C\choose H}$ would over count the number of unique hands in this case.

How would I handle this calculation with duplicate cards?

EDIT: As an aside, how would calculations of unique number of winning hands be different with duplicate cards? I’m thinking of having general types of winning hands, such as $N$-flushes, $N$-straights, $N$-of-a-kinds, etc (restricted to $1 \le N \le H$, naturally).

- Count the number of n-bit strings with an even number of zeros.
- Travelling salesman problem as an integer linear program
- Combinatorics riddle: keys and a safe
- Number of solutions of $x_1+x_2+\dots+x_k=n$ with $x_i\le r$
- Taking Seats on a Plane
- Simplying linear recurrence sum with binomials
- Is there a clever solution to this elementary probability/combinatorics problem?
- A question on calculating probabilities for the random walk
- Find Total number of ways out of N Number taking K numbers every M interval
- Is there a memorable solution to Kirkman's School Girl Problem?

Number the unique cards $1$ through $RS$. Then youâ€™re asking for the number of solutions of $$x_1+x_2+\ldots+x_{RS}=H\tag{1}$$ in non-negative integers, subject to the restriction that each $x_k\le C$. (In other words, for a given solution to $(1)$, $x_k$ is the number of copies of card $k$ the hand.) Without the restriction this would be a straightforward stars and bars problem, and the answer would be $$\binom{H+RS-1}{RS-1}=\binom{H+RS-1}H\;.$$ Unfortunately, the restriction eliminates many of these naÃ¯ve solutions, and an inclusion-exclusion calculation is needed to take it into account. The result is that the number of distinct hands is

$$\sum_i(-1)^i\binom{RS}i\binom{H+RS-1-i(C+1)}{RS-1}\;.\tag{2}$$

To the best of my knowledge there is no nice closed form for this.

(See also this essentially identical question. The answer by true blue anil gives an indication of how $(2)$ is arrived at.)

For the question about winning hands, you probably want to take into account the number of ways in which a given winning hand may be made. For an $H$-card flush, for instance, you can have any $H$ cards from any of the $S$ suits, and each suit effectively has $CR$ cards, so there are $S\binom{CR}H$ $H$-card flushes, all equally likely. The fact that some of the cards may be identical doesnâ€™t affect this. Similarly, in counting straights you effectively have $CS$ cards of each rank.

- Compact but not sequentially compact question
- Find the equation of the polar
- Showing equality of sequence of holomorphic functions to limit function if converges uniformly locally
- Geometric basis for the real numbers
- If $\frac {\sin A + \tan A}{\cos A}=9$, find the value of $\sin A$.
- invariant space and eigenvector
- Question about proof of Fourier transform of derivative
- Which of the (non-)Euclidean planes can we embed into non-Euclidean 3-space?
- An example of a sequence of Riemann integrable functions $(f_n)$ that converges pointwise to a function $f$ that is not Riemann integrable.
- $e^{i\theta}$ $=$ $\cos \theta + i \sin \theta$, a definition or theorem?
- Why does reflecting a point (x,y) about y=x result in point (y,x)?
- good book to study Differential Equations throgh geometric ideas.
- How to prove this is a field?
- How does (21) factor into prime ideals in the ring $\mathbb{Z}$?
- Tensors as matrices vs. Tensors as multi-linear maps