How many base-k sequences are there of length n which contain all k possible symbols? I am trying to solve it using inclusion-exclusion. However, I am actually struggling with the part of counting the number of sequences while at least a symbol is used. i.e. I am counting this: $$|S_0\bigcup S_1\bigcup S_2...\bigcup S_{k-1}|= \sum_0^{k-1}|S_i|-\sum_0^{k-1}|S_i\bigcap S_j|$$+......+... where $S_i$denote the set of sequences which do not contain the symbol i. ($0 \le i\le k-1$)
2026-03-26 23:03:36.1774566216
inclusion-exclusion problem
336 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
1
There are 1 best solutions below
Related Questions in INCLUSION-EXCLUSION
- Determine how many positive integers are $\leq 500$ and divisible by at least one between $6$, $10$ and $25$
- how many solutions in natural numbers are there to the inequality $x_1 + x_2 +....+ x_{10} \leq 70$?
- Proving Möbius inversion formula for inclusion exlusion
- how many ways are there to order the word LYCANTHROPIES when C isn't next to A, A isn't next to N and N isn't next to T
- How many ways are there to arrange 4 Americans, 3 Russians, and 5 Chinese into a queue, using inclusion-exclusion principle?
- Positive natural numbers $≤ 200$ divisible by one and only one between $12$ and $15$
- Counting problem involving inclusion-exclusion principle
- combinatorics problem - permutations and e/i
- Suppose that events $A$, $B$ and $C$ satisfy $P(A\cap B\cap C) = 0$
- $2n$ students want to sit in $n$ fixed school desks such that no one sits with their previous partner
Trending Questions
- Induction on the number of equations
- How to convince a math teacher of this simple and obvious fact?
- Find $E[XY|Y+Z=1 ]$
- Refuting the Anti-Cantor Cranks
- What are imaginary numbers?
- Determine the adjoint of $\tilde Q(x)$ for $\tilde Q(x)u:=(Qu)(x)$ where $Q:U→L^2(Ω,ℝ^d$ is a Hilbert-Schmidt operator and $U$ is a Hilbert space
- Why does this innovative method of subtraction from a third grader always work?
- How do we know that the number $1$ is not equal to the number $-1$?
- What are the Implications of having VΩ as a model for a theory?
- Defining a Galois Field based on primitive element versus polynomial?
- Can't find the relationship between two columns of numbers. Please Help
- Is computer science a branch of mathematics?
- Is there a bijection of $\mathbb{R}^n$ with itself such that the forward map is connected but the inverse is not?
- Identification of a quadrilateral as a trapezoid, rectangle, or square
- Generator of inertia group in function field extension
Popular # Hahtags
second-order-logic
numerical-methods
puzzle
logic
probability
number-theory
winding-number
real-analysis
integration
calculus
complex-analysis
sequences-and-series
proof-writing
set-theory
functions
homotopy-theory
elementary-number-theory
ordinary-differential-equations
circles
derivatives
game-theory
definite-integrals
elementary-set-theory
limits
multivariable-calculus
geometry
algebraic-number-theory
proof-verification
partial-derivative
algebra-precalculus
Popular Questions
- What is the integral of 1/x?
- How many squares actually ARE in this picture? Is this a trick question with no right answer?
- Is a matrix multiplied with its transpose something special?
- What is the difference between independent and mutually exclusive events?
- Visually stunning math concepts which are easy to explain
- taylor series of $\ln(1+x)$?
- How to tell if a set of vectors spans a space?
- Calculus question taking derivative to find horizontal tangent line
- How to determine if a function is one-to-one?
- Determine if vectors are linearly independent
- What does it mean to have a determinant equal to zero?
- Is this Batman equation for real?
- How to find perpendicular vector to another vector?
- How to find mean and median from histogram
- How many sides does a circle have?
Check out the sum notations they use on wikipedia to see how they avoid two sets in the intersection being the same or having multiple times the same intersection in their sum.
Say S is the set of all base k sequences of length n and say the set of all base k sequences of length n that miss symbol i is called $S_i$. What you want to compute is $$|S\setminus \bigcup_{i=0}^{k-1}S_i|=k^n-\sum_{\emptyset\neq J\subset\{0,1,...,k-1\}}(-1)^{|J|-1}|\bigcap_{j\in J}S_j|=\\k^n-(|S_0|+|S_1|+...+|S_{k-1}|\\-|S_0\bigcap S_1|-...-|S_{k-2}\bigcap S_{k-1}|\\+|S_0\bigcap S_1\bigcap S_2|+...+|S_{k-3}\bigcap S_{k-2}\bigcap S_{k-1}|\\-...-...\\...\\+(-1)^{k-1}|S_0\bigcap S_1\bigcap ...\bigcap S_{k-1}|)$$
In the first row of the expanded sum every entry is $(k-1)^n$. In the second row every entry is $(k-2)^n$ and so on. The first row has $\binom{k}{1}$ entries, the second row has $\binom{k}{2}$ entries and so on. So $$|S\setminus \bigcup_{i=0}^{k-1}S_i|=k^n-((k-1)^n\binom{k}{1}-(k-2)^n\binom{k}{2}+...+(-1)^{k-1}(k-k)^n\binom{k}{k})=\sum_{i=0}^k (-1)^i(k-i)^n\binom{k}{i}$$ Not sure about further simplifications.
By the way this is also the number of surjective functions from the n element set [n] to the k element set [k] (your sequence has n elements and you want to map them to k characters in a surjective way).