Initially, we have an empty generating string, in each turn, we can append any character of Latin alphabets i.e from 'a' to 'z' with equal probability, What is the expected number of moves required to obtain string "abcd" as a suffix.
2026-04-03 01:06:08.1775178368
Expected value to generate given String?
93 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
1
There are 1 best solutions below
Related Questions in PROBABILITY
- How to prove $\lim_{n \rightarrow\infty} e^{-n}\sum_{k=0}^{n}\frac{n^k}{k!} = \frac{1}{2}$?
- Is this a commonly known paradox?
- What's $P(A_1\cap A_2\cap A_3\cap A_4) $?
- Prove or disprove the following inequality
- Another application of the Central Limit Theorem
- Given is $2$ dimensional random variable $(X,Y)$ with table. Determine the correlation between $X$ and $Y$
- A random point $(a,b)$ is uniformly distributed in a unit square $K=[(u,v):0<u<1,0<v<1]$
- proving Kochen-Stone lemma...
- Solution Check. (Probability)
- Interpreting stationary distribution $P_{\infty}(X,V)$ of a random process
Related Questions in EXPECTED-VALUE
- Show that $\operatorname{Cov}(X,X^2)=0$ if X is a continuous random variable with symmetric distribution around the origin
- prove that $E(Y) = 0$ if $X$ is a random variable and $Y = x- E(x)$
- Limit of the expectation in Galton-Watson-process using a Martingale
- Determine if an Estimator is Biased (Unusual Expectation Expression)
- Why are negative constants removed from variance?
- How to find $\mathbb{E}(X\mid\mathbf{1}_{X<Y})$ where $X,Y$ are i.i.d exponential variables?
- $X_1,X_2,X_3 \sim^{\text{i.i.d}} R(0,1)$. Find $E(\frac{X_1+X_2}{X_1+X_2+X_3})$
- How to calculate the conditional mean of $E(X\mid X<Y)$?
- Let X be a geometric random variable, show that $E[X(X-1)...(X-r+1)] = \frac{r!(1-p)^r}{p^r}$
- Taylor expansion of expectation in financial modelling problem
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?
The question is so easily stated, but I cannot find an easy solution. Here is one method.
Let $b$ be the number of characters (26 in this example) and $n$ be the number of specific characters to appear in order for the process to stop (4 in this example).
With $n$ characters in the string, the stopping probability $p_n=b^{-n}=a$. For fewer than $n$ characters, the probability is zero. For $n\le i\lt 2n$ the stopping probability $p_i=a$. For $i\ge 2n$ the stopping probability at $i$ diminishes because it becomes increasing unlikely to continue to add characters.
One way is to evaluate the probability that the process stops after $i$ characters are drawn, $p_i$ and then evaluate the expectation value E[I]. For $i\ge 2n$ the process stops provided there was no match for $i-n$ characters and the next $n$ characters are the ones that match the required pattern ("abcd" in this example).
Let $Y_j$ be the indicator function that the string of $n$ characters $[c_{j-n+1},c_{j-n+2},...,c_{j}]$ match the required pattern. Note that for this problem, the pattern consists of $n$ unique characters, so the joint probabilities $$P(Y_j Y_{j+1}) = P(Y_j Y_{j+2}) =...= P(Y_j Y_{j+n-1}) =0$$ and therefore the indicator functions are not independent for nearby indices.
Furthermore for $n\ge2$, $$\eqalign{ P(Y_j)&=a\\ P(\bar{Y}_j)&=1-a\\ P(Y_j \bar{Y}_{j+1})&=P(Y_j)-P(Y_j Y_{j+1})=a\\ P(\bar{Y}_j \bar{Y}_{j+1})&=P(\bar{Y}_j)-P(\bar{Y}_j Y_{j+1})=1-2a\\ }$$
Furthermore for $n\ge3$,
$$\eqalign{ P(\bar{Y}_j \bar{Y}_{j+1})&=P(\bar{Y}_j \bar{Y}_{j+1} \bar{Y}_{j+2})+P(\bar{Y}_j \bar{Y}_{j+1} {Y}_{j+2})\\ &=P(\bar{Y}_j \bar{Y}_{j+1} \bar{Y}_{j+2})+P({Y}_{j+2})\\ &=P(\bar{Y}_j \bar{Y}_{j+1} \bar{Y}_{j+2})+a\\ }$$
so, $$ P(\bar{Y}_j \bar{Y}_{j+1} \bar{Y}_{j+2}) = P(\bar{Y}_j \bar{Y}_{j+1}) -a = 1-3a $$
Now consider a long sequence, $i\ge2n$: $$\eqalign{ p_i &= a P(\bar{Y}_1 \bar{Y}_2 ... \bar{Y}_{i-n})\\ p_{i+1} &= a P(\bar{Y}_1 \bar{Y}_2 ... \bar{Y}_{i-n} \bar{Y}_{i-n+1})\\ \frac{p_{i+1}}{p_i}&=\frac{P(\bar{Y}_{i-2n+2} \bar{Y}_{i-2n+3} ... \bar{Y}_{i-n} \bar{Y}_{i-n+1})}{P(\bar{Y}_{i-2n+2} \bar{Y}_{i-2n+3} ... \bar{Y}_i )}\\ &=\frac{1-na}{1-(n-1)a} }$$ So, in summary,
$$ \eqalign{ p_i &= 0 &i<n \\ p_i &= a &n\le i<2n \\ p_{i+1}/p_i &= (1-na)/(1-(n-1)a) \ \ \ &i\ge 2n \\ } $$
The expectation turns out to be:
$$ E[I] = \sum_{i=0}^{\infty} i p_i = a \sum_{i=n}^{2n-1} i + a \sum_{i=2n}^{\infty} i\left[\frac{1-na}{1-(n-1)a}\right]^{i-2n+1} = 1/a + an(n-1)/2 $$
So for the problem posed, the expectations is about $26^4$.