Suppose a computer generate a random vector of n positions where each position appears on of the numbers from 1 to n. The generation is performed uniformly on the $n!$ possibilities.
In the problem we must guess each position by following these rules
a) You write you guess vector and then discovers how many correct answers.
b) As you guess, the value is informed in position. So whether or not you know exactly what went wrong and occupies one position.
Let $N_{a}, N_{b}$ the number of hits you get in each of the above rules. How do I calculate the averages of $N_{a}$ and $N_{b}$ and the probability of hitting at least 50% of their guesses for $n = 10$
In the case 1) I suppose that if the Markov - Chain is not necessary. Because I think would only need to calculate the probability of 1 hit, 2 hits ... and so on and take the average, however how can I calculates this probability not sure. I appreciate any help. Thanks
For (a), the average value $N_a$ can be found using linearity of expectation. \begin{align*} \mathbb{E}_a(n) &= n\cdot \frac{1}{n} = 1 \end{align*}
and for $n=10$, the probability of atleast half of them to be correct is: \begin{align*} \mathbb{P}_a\left(\text{at least 5 correct positions}\right) &= \sum_{i=5}^{10}\frac{\binom{10}{i}\cdot !(10-i)}{10!} \\ &= \frac{4421}{1209600} \approx 0.00365492724867725 \end{align*}
where the notation $!i$ indicates the number of derangements.
For (b), I'm going according to Michael's interpretation that we guess numbers one after another, and our guess depends on previous decisions.
Expectation seems to have the recurrence:
\begin{align*} \color{#c00000}{ \mathbb{E}_b(n)} &= \color{#c00000}{\mathbb{E}_b(n-1) + \frac{1}{n}} \\ \color{#c00000}{\mathbb{E}_b(1)} &= \color{#c00000}{1} \end{align*} or \begin{align*} \color{#c00000}{\mathbb{E}_b(n)} &= \color{#c00000}{\sum_{i=1}^n\frac{1}{i}=H_n} \\ \color{#c00000}{\mathbb{E}_b(10)} &= \color{#c00000}{\frac{7381}{2520}\approx 2.93} \end{align*}
Update
My previous attempt solving case (b) is incorrect, the corrected version follows:
My simulation was not agreeing with part (b), and I was thinking for a while about the optimal strategy and finally found a paper.
Exactly the same problem and much more has been discussed in this paper by Persi Diaconis and Ronald Graham.
Hence, on using the optimal strategy discussed in theorem 5, i.e. Keep guessing 1 till it's correct, then guess 2 till it's correct and so on,
\begin{align*} \mathbb{E}_b(n) &= \sum_{k=1}^n \frac{1}{k!} \\ \mathbb{E}_b(10) &= \frac{6235301}{3628800}\approx 1.71828180114638 \end{align*}
and
\begin{align*} \mathbb{P}_b(G\ge k) &= \frac{1}{k!} \\ \mathbb{P}_b(G\ge 5) &= \frac{1}{5!} \approx 0.00833 \end{align*}
and this time everything agrees with the simulation.