Intereting Posts

About Rayleigh's formula
Gaussian Integers and Quotient Rings
What is the reason for these jiggles when truncating infinite series?
Partition an integer $n$ into exactly $k$ distinct parts
Proving the Product Rule for exponents with the same base
Calculus book recommendations (for complete beginner)
Difference between root, zero and solution.
Inverse of a Function exists iff Function is bijective
Lie derivative of a vector field equals the lie bracket
The Dual Pairing
A chain ring with Krull dimension greater than one
How do I evaluate this integral?
Breaking up a countable sum
Why does $\left(\int_{-\infty}^{\infty}e^{-t^2} dt \right)^2= \int_{-\infty}^{\infty}\int_{-\infty}^{\infty}e^{-(x^2 + y^2)}dx\,dy$?
Does there exist a connected metric space, with more than one point and without any isolated point, in which at least one open ball is countable?

This is a improvised version of the question here.

Supposing there are four brands of pens, W, X, Y, Z. You want to choose $10$ pens made up of any combination of the brands, but limited to a maximum of $5$ pens from each brand. How many possible combinations are there? Assume it would be acceptable not to choose a pen from any one or more brands, and that pens from any one brand are indistinguishable from each other.

- Fast way to get a position of combination (without repetitions)
- How many sequences of $n$ tosses of a coin that do not contain two consecutive heads have tails as the first toss?
- How many ways are there to arrange the letters in the word “mississippi” such that all “p” precede all “i”?
- Combinatorial Proof for Binomial Identity: $\sum_{k = 0}^n \binom{k}{p} = \binom{n+1}{p+1}$
- Give a Combinatorial proof to show $\sum_{i=1}^{n}{iC(n,i)}=n2^{n-1}$
- Dealing a 5 card hand with exactly 1 pair

- N unlabelled balls in M labeled buckets
- Number of Unique Sequences with Circular Shifts
- Combinatorics problem: $n$ people line up to $m$ clubs
- Closed formula for the sums $\sum\limits_{1 \le i_1 < i_2 < \dots < i_k \le n} i_1 i_2 \cdots i_k $?
- Proving in Discrete Structures Problem that $2^N = \binom{N}{0} + \binom{N}{1} + \binom{N}{2} + \dots + \binom{N}{N}$
- Exercise from Comtet's Advanced Combinatorics: prove $27\sum_{n=1}^{\infty }1/\binom{2n}{n}=9+2\pi \sqrt{3}$
- A simple permutation question - discrete math
- very stupid confusion in probablity or combination?
- An example showing that van der Waerden's theorem is not true for infinite arithmetic progressions
- Minimal number of moves needed to solve a “Lights Out” variant

In the link you gave, it was established that using stars and bars, *unrestricted* ways of selecting the pens is ${13\choose3}$

Now to take care of the restriction, pre-select 6 pens from any one type (which will make the selection inappropriate) and subtract, thus

$${13\choose3} – {4\choose1}{7\choose3}$$

The answer should be the number of cells in the octahedral intersection of the hyperplane $w+x+y+z = 10$ with the hypercube $0 \leq w, x, y, z \leq 5$, which is the $11$th tetrahedral number, less four times the $5$th tetrahedral number, or $286-4\cdot35 = 146$.

ETA: To be a bit less cryptic, let us proceed by analogy. Suppose there are only two brands of pens. The ways that we can buy ten pens with no more than five of any brand is the intersection of the line $x+y = 10$ with the square $0 \leq x, y \leq 5$. This is just the single cell $(5, 5)$, so perhaps this is not a very illuminating example.

Let us thus proceed to three brands. Now our solution is the intersection of the plane $x+y+z = 10$ with the cube $0 \leq x, y, z \leq 5$. In fact, we only need the simplex $x+y+z = 10$ restricted to the non-negative octant; this is a triangle (equilateral). However, this simplex is “clipped” by the constraint imposed by the cube; this clipping removes three subtriangles from each of the corners of the simplex, so the answer is the $11$th triangular number, less three times the $5$th triangular number, or $66-3\cdot15 = 21$.

Observe that we could, by analogy, have solved the two-brand version by subtracting twice the $5$th “linear” number from the $11$th “linear number,” or $11-2\cdot5 = 1$. So this turned out to be a kind of illuminating example, after all (in retrospect).

You’re ahead of me by now, I’m sure; the solution for the four-brand version is the intersection of the simplex $w+x+y+z = 10$ (restricted to non-negative $w, x, y, z$) with the hypercube $0 \leq w, x, y, z \leq 10$. This simplex is a tetrahedron, but it is again clipped by the constraint imposed by the hypercube. This clipping removes four subtetrahedra from the corners of the simplex, so the answer is the $11$th tetrahedral number, less four times the $5$th tetrahedral number, as explained above.

I note, by way of epilogue, that the foregoing is merely a visualization of the analytical solution provided by true blue anil. The answers are fundamentally identical.

- Lebesgue integration calculation problem?
- A new interesting pattern to $i↑↑n$ that looks cool (and $z↑↑x$ for $z\in\mathbb C,x\in\mathbb R$)
- $\lim_{x \to 0^+}\frac{\tan x \cdot \sqrt {\tan x}-\sin x \cdot \sqrt{\sin x}}{x^3 \sqrt{x}}$
- Are all extensions of finite fields cyclic?
- $a\mid b$ if and only if $ac \mid bc$ where $c\neq 0$
- Proving Riemann integral does not change when finite values of a function is changed.
- Evaluating $\sum_{k=1}^{\infty}\frac{\sin\left(k\theta\right)}{k^{2u+1}}$ with multiple integrals
- continuous monotonic function
- List out all the definable set in given model
- Execution time of function
- Let $4$ and $5$ be the only eigenvalues of $T$. Show $T^2-9T + 20I = 0$ , T is self adjoint.
- Solve a matrix equation
- Prove $Y_0$ is $\mathscr{L}$-measurable.
- Applications of additive version of Hilbert's theorem 90
- What topological restrictions are there for a topological space to be a group?