Ladybug walking on a hexagon
$begingroup$
A ladybug is walking at random on a hexagon. She starts at vertex A. Every minute, she moves to one of the two vertices (chosen at random) adjacent to the one she's currently on. What is the probability that, after 10 minutes, she is back at A?
I thought that at every even minute the ladybug would be at A, C, or E so there is a 1/3 chance. This was wrong and I got the following message: The probability may be close to 1/3, but since there are 2^10 possible paths for the ladybug and 2^10 is not divisible by 3, the probability cannot be exactly 1/3.
probability
$endgroup$
add a comment |
$begingroup$
A ladybug is walking at random on a hexagon. She starts at vertex A. Every minute, she moves to one of the two vertices (chosen at random) adjacent to the one she's currently on. What is the probability that, after 10 minutes, she is back at A?
I thought that at every even minute the ladybug would be at A, C, or E so there is a 1/3 chance. This was wrong and I got the following message: The probability may be close to 1/3, but since there are 2^10 possible paths for the ladybug and 2^10 is not divisible by 3, the probability cannot be exactly 1/3.
probability
$endgroup$
4
$begingroup$
How about assigning value -1 for clockwise movement and +1 for counterclockwise step. Find number of ways this sums to 0 modulo 6 with 10 terms.
$endgroup$
– T. Fo
Jan 21 at 21:23
$begingroup$
After 2 min the ladybug is at A, F, or B, but the probability of being at each point is different. This is because here are two ways to end up at A but only one way to end up at either F or B. So even though after 10 min the ladybug is at A, C, or E, the probability of being at a given vertex is not equal.
$endgroup$
– tch
Jan 21 at 21:23
1
$begingroup$
@T.Fo should that be mod6? Because 6 steps to the right will get you to +6 and back to A.
$endgroup$
– Fede Poncio
Jan 21 at 21:25
$begingroup$
Try working through your reasoning after just $2$ steps - what's the probability that the ladybug is at $A$? You can do this out explicitly. Look at what goes wrong in your argument that it should be $1/3$ and figure out another way.
$endgroup$
– Milo Brandt
Jan 21 at 21:37
add a comment |
$begingroup$
A ladybug is walking at random on a hexagon. She starts at vertex A. Every minute, she moves to one of the two vertices (chosen at random) adjacent to the one she's currently on. What is the probability that, after 10 minutes, she is back at A?
I thought that at every even minute the ladybug would be at A, C, or E so there is a 1/3 chance. This was wrong and I got the following message: The probability may be close to 1/3, but since there are 2^10 possible paths for the ladybug and 2^10 is not divisible by 3, the probability cannot be exactly 1/3.
probability
$endgroup$
A ladybug is walking at random on a hexagon. She starts at vertex A. Every minute, she moves to one of the two vertices (chosen at random) adjacent to the one she's currently on. What is the probability that, after 10 minutes, she is back at A?
I thought that at every even minute the ladybug would be at A, C, or E so there is a 1/3 chance. This was wrong and I got the following message: The probability may be close to 1/3, but since there are 2^10 possible paths for the ladybug and 2^10 is not divisible by 3, the probability cannot be exactly 1/3.
probability
probability
asked Jan 21 at 21:15
Math_GuyMath_Guy
747
747
4
$begingroup$
How about assigning value -1 for clockwise movement and +1 for counterclockwise step. Find number of ways this sums to 0 modulo 6 with 10 terms.
$endgroup$
– T. Fo
Jan 21 at 21:23
$begingroup$
After 2 min the ladybug is at A, F, or B, but the probability of being at each point is different. This is because here are two ways to end up at A but only one way to end up at either F or B. So even though after 10 min the ladybug is at A, C, or E, the probability of being at a given vertex is not equal.
$endgroup$
– tch
Jan 21 at 21:23
1
$begingroup$
@T.Fo should that be mod6? Because 6 steps to the right will get you to +6 and back to A.
$endgroup$
– Fede Poncio
Jan 21 at 21:25
$begingroup$
Try working through your reasoning after just $2$ steps - what's the probability that the ladybug is at $A$? You can do this out explicitly. Look at what goes wrong in your argument that it should be $1/3$ and figure out another way.
$endgroup$
– Milo Brandt
Jan 21 at 21:37
add a comment |
4
$begingroup$
How about assigning value -1 for clockwise movement and +1 for counterclockwise step. Find number of ways this sums to 0 modulo 6 with 10 terms.
$endgroup$
– T. Fo
Jan 21 at 21:23
$begingroup$
After 2 min the ladybug is at A, F, or B, but the probability of being at each point is different. This is because here are two ways to end up at A but only one way to end up at either F or B. So even though after 10 min the ladybug is at A, C, or E, the probability of being at a given vertex is not equal.
$endgroup$
– tch
Jan 21 at 21:23
1
$begingroup$
@T.Fo should that be mod6? Because 6 steps to the right will get you to +6 and back to A.
$endgroup$
– Fede Poncio
Jan 21 at 21:25
$begingroup$
Try working through your reasoning after just $2$ steps - what's the probability that the ladybug is at $A$? You can do this out explicitly. Look at what goes wrong in your argument that it should be $1/3$ and figure out another way.
$endgroup$
– Milo Brandt
Jan 21 at 21:37
4
4
$begingroup$
How about assigning value -1 for clockwise movement and +1 for counterclockwise step. Find number of ways this sums to 0 modulo 6 with 10 terms.
$endgroup$
– T. Fo
Jan 21 at 21:23
$begingroup$
How about assigning value -1 for clockwise movement and +1 for counterclockwise step. Find number of ways this sums to 0 modulo 6 with 10 terms.
$endgroup$
– T. Fo
Jan 21 at 21:23
$begingroup$
After 2 min the ladybug is at A, F, or B, but the probability of being at each point is different. This is because here are two ways to end up at A but only one way to end up at either F or B. So even though after 10 min the ladybug is at A, C, or E, the probability of being at a given vertex is not equal.
$endgroup$
– tch
Jan 21 at 21:23
$begingroup$
After 2 min the ladybug is at A, F, or B, but the probability of being at each point is different. This is because here are two ways to end up at A but only one way to end up at either F or B. So even though after 10 min the ladybug is at A, C, or E, the probability of being at a given vertex is not equal.
$endgroup$
– tch
Jan 21 at 21:23
1
1
$begingroup$
@T.Fo should that be mod6? Because 6 steps to the right will get you to +6 and back to A.
$endgroup$
– Fede Poncio
Jan 21 at 21:25
$begingroup$
@T.Fo should that be mod6? Because 6 steps to the right will get you to +6 and back to A.
$endgroup$
– Fede Poncio
Jan 21 at 21:25
$begingroup$
Try working through your reasoning after just $2$ steps - what's the probability that the ladybug is at $A$? You can do this out explicitly. Look at what goes wrong in your argument that it should be $1/3$ and figure out another way.
$endgroup$
– Milo Brandt
Jan 21 at 21:37
$begingroup$
Try working through your reasoning after just $2$ steps - what's the probability that the ladybug is at $A$? You can do this out explicitly. Look at what goes wrong in your argument that it should be $1/3$ and figure out another way.
$endgroup$
– Milo Brandt
Jan 21 at 21:37
add a comment |
5 Answers
5
active
oldest
votes
$begingroup$
The connection with random walks and sums modulo $6$ was already mentioned above, in the comments.
Consider a sequence of i.i.d Bernoulli random variables $X_i$, where $mathbb{P}(X_i = pm 1) = 1/2$. Define $S_0= 0 $ and $S_n = X_1 + ... + X_n$. Thus, the point $A$ on the hexagon is associated with $0$, if the bug moves in the clockwise direction we take $+1$ in $S_n$, otherwise we add $-1$. The sum $S_n $ modulo $6$ gives the location of the bug after $n$ moves, where we enumerate vertices of the hexagon by $0,...,5$ starting from $0to A$ and moving clockwise.
Hence, for the bug to be at $0$ after $10$ moves we need $S_{10} mod 6 = 0 $, but the latter is only possible for values $0, 6$ and $-6$ of $S_{10}$, since $-10leq S_n leq 10$ for all $n=0,1,...,10$. We conclude that
$$
mathbb{P}(S_{10} = 0 mod 6) = frac{1}{2^{10}} left( {{10}choose{5}} + {{10}choose{8}} + {{10}choose{2}} right),
$$
which gives the probability that the bug is at $A$ after $10$ moves.
A more tedious, but doable approach is to condition on each move, and use symmetries of the hexagon.
$endgroup$
$begingroup$
does this simplify to 63/512
$endgroup$
– Math_Guy
Jan 21 at 22:09
$begingroup$
@Math_Guy, the expression simplifies to $171/512$, which is something around $0.33$
$endgroup$
– Hayk
Jan 21 at 22:13
$begingroup$
Thank you very much.
$endgroup$
– Math_Guy
Jan 21 at 22:16
add a comment |
$begingroup$
It is a Markov chain with transition matrix
$$P = frac{1}{2} left [ begin{array}*
0 & 1 & 0 & 0 & 0 & 1 \
1 & 0 & 1 & 0 & 0 & 0 \
0 & 1 & 0 & 1 & 0 & 0 \
0 & 0 & 1 & 0 & 1 & 0 \
0 & 0 & 0 & 1 & 0 & 1 \
1 & 0 & 0 & 0 & 1 & 0 \
end{array} right ]$$
The answer is given as the first element of the first row of $P^{10}$. That is
$$frac{171}{512}$$
By the way you can also diagonilize the matrix $P$ to find a formula for its powers. It is a symmetric circulant matrix and the eigenvalues and -vectors are very easy.
$endgroup$
add a comment |
$begingroup$
After $2n$ moves the bug is either at $A$ with probability $p_{2n}$ or in ${C, E}$ with probability $q_{2n}=1-p_{2n}$. After two more moves it is again at $A$ with probability ${1over2}p_{2n}$ in the first case and with probability ${1over4}q_{2n}$ in the second case. It follows that
$$p_{2(n+1)}={1over2}p_{2n}+{1over4}(1-p_{2n})={1over4}p_{2n}+{1over4} .tag{1}$$
The general solution of $(1)$ is easily seen to be $p_{2n}={1over3}+{Cover4^n}$ for a suitable $C$, and as $p_0=1$ we definitely obtain
$$p_{2n}={1over3}bigl(1+2^{1-2n}bigr)qquad(ngeq0) .$$
In particular $p_{10}={1over3}bigl(1+{1over512}bigr)={171over512}$.
$endgroup$
$begingroup$
I woke up this morning with a touch of ennui, knowing how at each step my recursion was doing the best it could to 'binaryily' approximate $1/3$ from above. Now I don't have to think about it anymore! (+1)
$endgroup$
– CopyPasteIt
Jan 23 at 13:43
add a comment |
$begingroup$
The OP made an important observation concerning 'even minutes' with the ladybug on one of the vertices in ${ A, C, E }$.
You can equivalently design the experiment so that you are observing the ladybug walking on an equilateral triangle ('flip two coins' simultaneously to get the next or zero step). With this modelling, and using some elementary probability theory, some algebra, and the figure
you can use recursion to arrive at the answer.
Define
$$tag 1 a_{n+1} = frac{a_n+1}{4} ;text{ with }, a_0 = 1$$
ANSWER = $a_5$
Update: Although I got the answer $a_5$ using recursion, it left me feeling a bit uneasy since at each step you'll discover that the recursion is really the 'best binary approximation' of $frac{1}{3}$ 'from above'.
After seeing Christian Blatter's answer I feel obliged to note that using induction one can also get the closed form solution here:
$$tag 2 a_{n}={1over3}bigl(1+2^{1-2n}bigr)qquad(ngeq0) $$
Certainly works for $n = 0$.
Assume now that $text{(2)}$ is true for some fixed $n$. But then
$$ a_{n+1} = frac{a_n+1}{4} = {1over3} bigl( frac{3a_n+3}{4} bigr) = {1over3} bigl( frac{(1+2^{1-2n})+3}{4} bigr) = {1over3}bigl(1+2^{1-2(n+1)}bigr)$$
So we have the result.
You can also use brute force, setting up a google sheets with only a bit of work, mostly dragging/copying the one formula in the C3 cell,
=0.25*B2+0.5*B3+0.25*B4
all over the 'calculation array'.
Here is the formula view of the sheet:
Here are the numbers:
$endgroup$
$begingroup$
+1 for using and building on an idea of the OP itself!
$endgroup$
– Vincent
Jan 23 at 10:21
add a comment |
$begingroup$
Number of ways to end up at vertex $m$ after $n$ moves ($n-k$ clockwise moves and $k$ counterclockwise moves, arranged in $binom{n}{k}$ ways, placing us $n-2k$ clockwise from the start):
$$
begin{align}
sum_{k=0}^nbinom{n}{k}[6mid n-2k-m]
&=sum_{k=0}^nbinom{n}{k}frac16sum_{j=0}^5e^{2pi i(n-2k-m)j/6}tag1\
&=frac16sum_{j=0}^5left(e^{-2pi ij/6}+e^{2pi ij/6}right)^ne^{-2pi imj/6}tag2\
&=frac{2^n}6sum_{j=0}^5cos^nleft(frac{2pi j}6right)cosleft(frac{2pi mj}6right)tag3
end{align}
$$
Explanation:
$(1)$: $[pmid n]=frac1psumlimits_{j=0}^{p-1}e^{2pi inj/p}$
$(2)$: Binomial Theorem
$(3)$: sine is odd, cosine is even
For $n=10$, either calculation gives
$$
begin{array}{c|c}
m&text{# ways}\hline
0&342\
1&0\
2&341\
3&0\
4&341\
5&0
end{array}
$$
$endgroup$
$begingroup$
Is this an example of nuking mosquitoes? c.f. Awfully sophisticated proof for simple facts . (+1) mathoverflow.net/questions/42512/…
$endgroup$
– CopyPasteIt
Jan 23 at 14:10
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "69"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3082424%2fladybug-walking-on-a-hexagon%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
5 Answers
5
active
oldest
votes
5 Answers
5
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
The connection with random walks and sums modulo $6$ was already mentioned above, in the comments.
Consider a sequence of i.i.d Bernoulli random variables $X_i$, where $mathbb{P}(X_i = pm 1) = 1/2$. Define $S_0= 0 $ and $S_n = X_1 + ... + X_n$. Thus, the point $A$ on the hexagon is associated with $0$, if the bug moves in the clockwise direction we take $+1$ in $S_n$, otherwise we add $-1$. The sum $S_n $ modulo $6$ gives the location of the bug after $n$ moves, where we enumerate vertices of the hexagon by $0,...,5$ starting from $0to A$ and moving clockwise.
Hence, for the bug to be at $0$ after $10$ moves we need $S_{10} mod 6 = 0 $, but the latter is only possible for values $0, 6$ and $-6$ of $S_{10}$, since $-10leq S_n leq 10$ for all $n=0,1,...,10$. We conclude that
$$
mathbb{P}(S_{10} = 0 mod 6) = frac{1}{2^{10}} left( {{10}choose{5}} + {{10}choose{8}} + {{10}choose{2}} right),
$$
which gives the probability that the bug is at $A$ after $10$ moves.
A more tedious, but doable approach is to condition on each move, and use symmetries of the hexagon.
$endgroup$
$begingroup$
does this simplify to 63/512
$endgroup$
– Math_Guy
Jan 21 at 22:09
$begingroup$
@Math_Guy, the expression simplifies to $171/512$, which is something around $0.33$
$endgroup$
– Hayk
Jan 21 at 22:13
$begingroup$
Thank you very much.
$endgroup$
– Math_Guy
Jan 21 at 22:16
add a comment |
$begingroup$
The connection with random walks and sums modulo $6$ was already mentioned above, in the comments.
Consider a sequence of i.i.d Bernoulli random variables $X_i$, where $mathbb{P}(X_i = pm 1) = 1/2$. Define $S_0= 0 $ and $S_n = X_1 + ... + X_n$. Thus, the point $A$ on the hexagon is associated with $0$, if the bug moves in the clockwise direction we take $+1$ in $S_n$, otherwise we add $-1$. The sum $S_n $ modulo $6$ gives the location of the bug after $n$ moves, where we enumerate vertices of the hexagon by $0,...,5$ starting from $0to A$ and moving clockwise.
Hence, for the bug to be at $0$ after $10$ moves we need $S_{10} mod 6 = 0 $, but the latter is only possible for values $0, 6$ and $-6$ of $S_{10}$, since $-10leq S_n leq 10$ for all $n=0,1,...,10$. We conclude that
$$
mathbb{P}(S_{10} = 0 mod 6) = frac{1}{2^{10}} left( {{10}choose{5}} + {{10}choose{8}} + {{10}choose{2}} right),
$$
which gives the probability that the bug is at $A$ after $10$ moves.
A more tedious, but doable approach is to condition on each move, and use symmetries of the hexagon.
$endgroup$
$begingroup$
does this simplify to 63/512
$endgroup$
– Math_Guy
Jan 21 at 22:09
$begingroup$
@Math_Guy, the expression simplifies to $171/512$, which is something around $0.33$
$endgroup$
– Hayk
Jan 21 at 22:13
$begingroup$
Thank you very much.
$endgroup$
– Math_Guy
Jan 21 at 22:16
add a comment |
$begingroup$
The connection with random walks and sums modulo $6$ was already mentioned above, in the comments.
Consider a sequence of i.i.d Bernoulli random variables $X_i$, where $mathbb{P}(X_i = pm 1) = 1/2$. Define $S_0= 0 $ and $S_n = X_1 + ... + X_n$. Thus, the point $A$ on the hexagon is associated with $0$, if the bug moves in the clockwise direction we take $+1$ in $S_n$, otherwise we add $-1$. The sum $S_n $ modulo $6$ gives the location of the bug after $n$ moves, where we enumerate vertices of the hexagon by $0,...,5$ starting from $0to A$ and moving clockwise.
Hence, for the bug to be at $0$ after $10$ moves we need $S_{10} mod 6 = 0 $, but the latter is only possible for values $0, 6$ and $-6$ of $S_{10}$, since $-10leq S_n leq 10$ for all $n=0,1,...,10$. We conclude that
$$
mathbb{P}(S_{10} = 0 mod 6) = frac{1}{2^{10}} left( {{10}choose{5}} + {{10}choose{8}} + {{10}choose{2}} right),
$$
which gives the probability that the bug is at $A$ after $10$ moves.
A more tedious, but doable approach is to condition on each move, and use symmetries of the hexagon.
$endgroup$
The connection with random walks and sums modulo $6$ was already mentioned above, in the comments.
Consider a sequence of i.i.d Bernoulli random variables $X_i$, where $mathbb{P}(X_i = pm 1) = 1/2$. Define $S_0= 0 $ and $S_n = X_1 + ... + X_n$. Thus, the point $A$ on the hexagon is associated with $0$, if the bug moves in the clockwise direction we take $+1$ in $S_n$, otherwise we add $-1$. The sum $S_n $ modulo $6$ gives the location of the bug after $n$ moves, where we enumerate vertices of the hexagon by $0,...,5$ starting from $0to A$ and moving clockwise.
Hence, for the bug to be at $0$ after $10$ moves we need $S_{10} mod 6 = 0 $, but the latter is only possible for values $0, 6$ and $-6$ of $S_{10}$, since $-10leq S_n leq 10$ for all $n=0,1,...,10$. We conclude that
$$
mathbb{P}(S_{10} = 0 mod 6) = frac{1}{2^{10}} left( {{10}choose{5}} + {{10}choose{8}} + {{10}choose{2}} right),
$$
which gives the probability that the bug is at $A$ after $10$ moves.
A more tedious, but doable approach is to condition on each move, and use symmetries of the hexagon.
answered Jan 21 at 22:02
HaykHayk
2,6271214
2,6271214
$begingroup$
does this simplify to 63/512
$endgroup$
– Math_Guy
Jan 21 at 22:09
$begingroup$
@Math_Guy, the expression simplifies to $171/512$, which is something around $0.33$
$endgroup$
– Hayk
Jan 21 at 22:13
$begingroup$
Thank you very much.
$endgroup$
– Math_Guy
Jan 21 at 22:16
add a comment |
$begingroup$
does this simplify to 63/512
$endgroup$
– Math_Guy
Jan 21 at 22:09
$begingroup$
@Math_Guy, the expression simplifies to $171/512$, which is something around $0.33$
$endgroup$
– Hayk
Jan 21 at 22:13
$begingroup$
Thank you very much.
$endgroup$
– Math_Guy
Jan 21 at 22:16
$begingroup$
does this simplify to 63/512
$endgroup$
– Math_Guy
Jan 21 at 22:09
$begingroup$
does this simplify to 63/512
$endgroup$
– Math_Guy
Jan 21 at 22:09
$begingroup$
@Math_Guy, the expression simplifies to $171/512$, which is something around $0.33$
$endgroup$
– Hayk
Jan 21 at 22:13
$begingroup$
@Math_Guy, the expression simplifies to $171/512$, which is something around $0.33$
$endgroup$
– Hayk
Jan 21 at 22:13
$begingroup$
Thank you very much.
$endgroup$
– Math_Guy
Jan 21 at 22:16
$begingroup$
Thank you very much.
$endgroup$
– Math_Guy
Jan 21 at 22:16
add a comment |
$begingroup$
It is a Markov chain with transition matrix
$$P = frac{1}{2} left [ begin{array}*
0 & 1 & 0 & 0 & 0 & 1 \
1 & 0 & 1 & 0 & 0 & 0 \
0 & 1 & 0 & 1 & 0 & 0 \
0 & 0 & 1 & 0 & 1 & 0 \
0 & 0 & 0 & 1 & 0 & 1 \
1 & 0 & 0 & 0 & 1 & 0 \
end{array} right ]$$
The answer is given as the first element of the first row of $P^{10}$. That is
$$frac{171}{512}$$
By the way you can also diagonilize the matrix $P$ to find a formula for its powers. It is a symmetric circulant matrix and the eigenvalues and -vectors are very easy.
$endgroup$
add a comment |
$begingroup$
It is a Markov chain with transition matrix
$$P = frac{1}{2} left [ begin{array}*
0 & 1 & 0 & 0 & 0 & 1 \
1 & 0 & 1 & 0 & 0 & 0 \
0 & 1 & 0 & 1 & 0 & 0 \
0 & 0 & 1 & 0 & 1 & 0 \
0 & 0 & 0 & 1 & 0 & 1 \
1 & 0 & 0 & 0 & 1 & 0 \
end{array} right ]$$
The answer is given as the first element of the first row of $P^{10}$. That is
$$frac{171}{512}$$
By the way you can also diagonilize the matrix $P$ to find a formula for its powers. It is a symmetric circulant matrix and the eigenvalues and -vectors are very easy.
$endgroup$
add a comment |
$begingroup$
It is a Markov chain with transition matrix
$$P = frac{1}{2} left [ begin{array}*
0 & 1 & 0 & 0 & 0 & 1 \
1 & 0 & 1 & 0 & 0 & 0 \
0 & 1 & 0 & 1 & 0 & 0 \
0 & 0 & 1 & 0 & 1 & 0 \
0 & 0 & 0 & 1 & 0 & 1 \
1 & 0 & 0 & 0 & 1 & 0 \
end{array} right ]$$
The answer is given as the first element of the first row of $P^{10}$. That is
$$frac{171}{512}$$
By the way you can also diagonilize the matrix $P$ to find a formula for its powers. It is a symmetric circulant matrix and the eigenvalues and -vectors are very easy.
$endgroup$
It is a Markov chain with transition matrix
$$P = frac{1}{2} left [ begin{array}*
0 & 1 & 0 & 0 & 0 & 1 \
1 & 0 & 1 & 0 & 0 & 0 \
0 & 1 & 0 & 1 & 0 & 0 \
0 & 0 & 1 & 0 & 1 & 0 \
0 & 0 & 0 & 1 & 0 & 1 \
1 & 0 & 0 & 0 & 1 & 0 \
end{array} right ]$$
The answer is given as the first element of the first row of $P^{10}$. That is
$$frac{171}{512}$$
By the way you can also diagonilize the matrix $P$ to find a formula for its powers. It is a symmetric circulant matrix and the eigenvalues and -vectors are very easy.
answered Jan 22 at 13:37
ploosu2ploosu2
4,6431024
4,6431024
add a comment |
add a comment |
$begingroup$
After $2n$ moves the bug is either at $A$ with probability $p_{2n}$ or in ${C, E}$ with probability $q_{2n}=1-p_{2n}$. After two more moves it is again at $A$ with probability ${1over2}p_{2n}$ in the first case and with probability ${1over4}q_{2n}$ in the second case. It follows that
$$p_{2(n+1)}={1over2}p_{2n}+{1over4}(1-p_{2n})={1over4}p_{2n}+{1over4} .tag{1}$$
The general solution of $(1)$ is easily seen to be $p_{2n}={1over3}+{Cover4^n}$ for a suitable $C$, and as $p_0=1$ we definitely obtain
$$p_{2n}={1over3}bigl(1+2^{1-2n}bigr)qquad(ngeq0) .$$
In particular $p_{10}={1over3}bigl(1+{1over512}bigr)={171over512}$.
$endgroup$
$begingroup$
I woke up this morning with a touch of ennui, knowing how at each step my recursion was doing the best it could to 'binaryily' approximate $1/3$ from above. Now I don't have to think about it anymore! (+1)
$endgroup$
– CopyPasteIt
Jan 23 at 13:43
add a comment |
$begingroup$
After $2n$ moves the bug is either at $A$ with probability $p_{2n}$ or in ${C, E}$ with probability $q_{2n}=1-p_{2n}$. After two more moves it is again at $A$ with probability ${1over2}p_{2n}$ in the first case and with probability ${1over4}q_{2n}$ in the second case. It follows that
$$p_{2(n+1)}={1over2}p_{2n}+{1over4}(1-p_{2n})={1over4}p_{2n}+{1over4} .tag{1}$$
The general solution of $(1)$ is easily seen to be $p_{2n}={1over3}+{Cover4^n}$ for a suitable $C$, and as $p_0=1$ we definitely obtain
$$p_{2n}={1over3}bigl(1+2^{1-2n}bigr)qquad(ngeq0) .$$
In particular $p_{10}={1over3}bigl(1+{1over512}bigr)={171over512}$.
$endgroup$
$begingroup$
I woke up this morning with a touch of ennui, knowing how at each step my recursion was doing the best it could to 'binaryily' approximate $1/3$ from above. Now I don't have to think about it anymore! (+1)
$endgroup$
– CopyPasteIt
Jan 23 at 13:43
add a comment |
$begingroup$
After $2n$ moves the bug is either at $A$ with probability $p_{2n}$ or in ${C, E}$ with probability $q_{2n}=1-p_{2n}$. After two more moves it is again at $A$ with probability ${1over2}p_{2n}$ in the first case and with probability ${1over4}q_{2n}$ in the second case. It follows that
$$p_{2(n+1)}={1over2}p_{2n}+{1over4}(1-p_{2n})={1over4}p_{2n}+{1over4} .tag{1}$$
The general solution of $(1)$ is easily seen to be $p_{2n}={1over3}+{Cover4^n}$ for a suitable $C$, and as $p_0=1$ we definitely obtain
$$p_{2n}={1over3}bigl(1+2^{1-2n}bigr)qquad(ngeq0) .$$
In particular $p_{10}={1over3}bigl(1+{1over512}bigr)={171over512}$.
$endgroup$
After $2n$ moves the bug is either at $A$ with probability $p_{2n}$ or in ${C, E}$ with probability $q_{2n}=1-p_{2n}$. After two more moves it is again at $A$ with probability ${1over2}p_{2n}$ in the first case and with probability ${1over4}q_{2n}$ in the second case. It follows that
$$p_{2(n+1)}={1over2}p_{2n}+{1over4}(1-p_{2n})={1over4}p_{2n}+{1over4} .tag{1}$$
The general solution of $(1)$ is easily seen to be $p_{2n}={1over3}+{Cover4^n}$ for a suitable $C$, and as $p_0=1$ we definitely obtain
$$p_{2n}={1over3}bigl(1+2^{1-2n}bigr)qquad(ngeq0) .$$
In particular $p_{10}={1over3}bigl(1+{1over512}bigr)={171over512}$.
edited Jan 23 at 13:19
answered Jan 23 at 9:48
Christian BlatterChristian Blatter
175k8115327
175k8115327
$begingroup$
I woke up this morning with a touch of ennui, knowing how at each step my recursion was doing the best it could to 'binaryily' approximate $1/3$ from above. Now I don't have to think about it anymore! (+1)
$endgroup$
– CopyPasteIt
Jan 23 at 13:43
add a comment |
$begingroup$
I woke up this morning with a touch of ennui, knowing how at each step my recursion was doing the best it could to 'binaryily' approximate $1/3$ from above. Now I don't have to think about it anymore! (+1)
$endgroup$
– CopyPasteIt
Jan 23 at 13:43
$begingroup$
I woke up this morning with a touch of ennui, knowing how at each step my recursion was doing the best it could to 'binaryily' approximate $1/3$ from above. Now I don't have to think about it anymore! (+1)
$endgroup$
– CopyPasteIt
Jan 23 at 13:43
$begingroup$
I woke up this morning with a touch of ennui, knowing how at each step my recursion was doing the best it could to 'binaryily' approximate $1/3$ from above. Now I don't have to think about it anymore! (+1)
$endgroup$
– CopyPasteIt
Jan 23 at 13:43
add a comment |
$begingroup$
The OP made an important observation concerning 'even minutes' with the ladybug on one of the vertices in ${ A, C, E }$.
You can equivalently design the experiment so that you are observing the ladybug walking on an equilateral triangle ('flip two coins' simultaneously to get the next or zero step). With this modelling, and using some elementary probability theory, some algebra, and the figure
you can use recursion to arrive at the answer.
Define
$$tag 1 a_{n+1} = frac{a_n+1}{4} ;text{ with }, a_0 = 1$$
ANSWER = $a_5$
Update: Although I got the answer $a_5$ using recursion, it left me feeling a bit uneasy since at each step you'll discover that the recursion is really the 'best binary approximation' of $frac{1}{3}$ 'from above'.
After seeing Christian Blatter's answer I feel obliged to note that using induction one can also get the closed form solution here:
$$tag 2 a_{n}={1over3}bigl(1+2^{1-2n}bigr)qquad(ngeq0) $$
Certainly works for $n = 0$.
Assume now that $text{(2)}$ is true for some fixed $n$. But then
$$ a_{n+1} = frac{a_n+1}{4} = {1over3} bigl( frac{3a_n+3}{4} bigr) = {1over3} bigl( frac{(1+2^{1-2n})+3}{4} bigr) = {1over3}bigl(1+2^{1-2(n+1)}bigr)$$
So we have the result.
You can also use brute force, setting up a google sheets with only a bit of work, mostly dragging/copying the one formula in the C3 cell,
=0.25*B2+0.5*B3+0.25*B4
all over the 'calculation array'.
Here is the formula view of the sheet:
Here are the numbers:
$endgroup$
$begingroup$
+1 for using and building on an idea of the OP itself!
$endgroup$
– Vincent
Jan 23 at 10:21
add a comment |
$begingroup$
The OP made an important observation concerning 'even minutes' with the ladybug on one of the vertices in ${ A, C, E }$.
You can equivalently design the experiment so that you are observing the ladybug walking on an equilateral triangle ('flip two coins' simultaneously to get the next or zero step). With this modelling, and using some elementary probability theory, some algebra, and the figure
you can use recursion to arrive at the answer.
Define
$$tag 1 a_{n+1} = frac{a_n+1}{4} ;text{ with }, a_0 = 1$$
ANSWER = $a_5$
Update: Although I got the answer $a_5$ using recursion, it left me feeling a bit uneasy since at each step you'll discover that the recursion is really the 'best binary approximation' of $frac{1}{3}$ 'from above'.
After seeing Christian Blatter's answer I feel obliged to note that using induction one can also get the closed form solution here:
$$tag 2 a_{n}={1over3}bigl(1+2^{1-2n}bigr)qquad(ngeq0) $$
Certainly works for $n = 0$.
Assume now that $text{(2)}$ is true for some fixed $n$. But then
$$ a_{n+1} = frac{a_n+1}{4} = {1over3} bigl( frac{3a_n+3}{4} bigr) = {1over3} bigl( frac{(1+2^{1-2n})+3}{4} bigr) = {1over3}bigl(1+2^{1-2(n+1)}bigr)$$
So we have the result.
You can also use brute force, setting up a google sheets with only a bit of work, mostly dragging/copying the one formula in the C3 cell,
=0.25*B2+0.5*B3+0.25*B4
all over the 'calculation array'.
Here is the formula view of the sheet:
Here are the numbers:
$endgroup$
$begingroup$
+1 for using and building on an idea of the OP itself!
$endgroup$
– Vincent
Jan 23 at 10:21
add a comment |
$begingroup$
The OP made an important observation concerning 'even minutes' with the ladybug on one of the vertices in ${ A, C, E }$.
You can equivalently design the experiment so that you are observing the ladybug walking on an equilateral triangle ('flip two coins' simultaneously to get the next or zero step). With this modelling, and using some elementary probability theory, some algebra, and the figure
you can use recursion to arrive at the answer.
Define
$$tag 1 a_{n+1} = frac{a_n+1}{4} ;text{ with }, a_0 = 1$$
ANSWER = $a_5$
Update: Although I got the answer $a_5$ using recursion, it left me feeling a bit uneasy since at each step you'll discover that the recursion is really the 'best binary approximation' of $frac{1}{3}$ 'from above'.
After seeing Christian Blatter's answer I feel obliged to note that using induction one can also get the closed form solution here:
$$tag 2 a_{n}={1over3}bigl(1+2^{1-2n}bigr)qquad(ngeq0) $$
Certainly works for $n = 0$.
Assume now that $text{(2)}$ is true for some fixed $n$. But then
$$ a_{n+1} = frac{a_n+1}{4} = {1over3} bigl( frac{3a_n+3}{4} bigr) = {1over3} bigl( frac{(1+2^{1-2n})+3}{4} bigr) = {1over3}bigl(1+2^{1-2(n+1)}bigr)$$
So we have the result.
You can also use brute force, setting up a google sheets with only a bit of work, mostly dragging/copying the one formula in the C3 cell,
=0.25*B2+0.5*B3+0.25*B4
all over the 'calculation array'.
Here is the formula view of the sheet:
Here are the numbers:
$endgroup$
The OP made an important observation concerning 'even minutes' with the ladybug on one of the vertices in ${ A, C, E }$.
You can equivalently design the experiment so that you are observing the ladybug walking on an equilateral triangle ('flip two coins' simultaneously to get the next or zero step). With this modelling, and using some elementary probability theory, some algebra, and the figure
you can use recursion to arrive at the answer.
Define
$$tag 1 a_{n+1} = frac{a_n+1}{4} ;text{ with }, a_0 = 1$$
ANSWER = $a_5$
Update: Although I got the answer $a_5$ using recursion, it left me feeling a bit uneasy since at each step you'll discover that the recursion is really the 'best binary approximation' of $frac{1}{3}$ 'from above'.
After seeing Christian Blatter's answer I feel obliged to note that using induction one can also get the closed form solution here:
$$tag 2 a_{n}={1over3}bigl(1+2^{1-2n}bigr)qquad(ngeq0) $$
Certainly works for $n = 0$.
Assume now that $text{(2)}$ is true for some fixed $n$. But then
$$ a_{n+1} = frac{a_n+1}{4} = {1over3} bigl( frac{3a_n+3}{4} bigr) = {1over3} bigl( frac{(1+2^{1-2n})+3}{4} bigr) = {1over3}bigl(1+2^{1-2(n+1)}bigr)$$
So we have the result.
You can also use brute force, setting up a google sheets with only a bit of work, mostly dragging/copying the one formula in the C3 cell,
=0.25*B2+0.5*B3+0.25*B4
all over the 'calculation array'.
Here is the formula view of the sheet:
Here are the numbers:
edited Jan 23 at 13:50
answered Jan 22 at 4:21
CopyPasteItCopyPasteIt
4,2031628
4,2031628
$begingroup$
+1 for using and building on an idea of the OP itself!
$endgroup$
– Vincent
Jan 23 at 10:21
add a comment |
$begingroup$
+1 for using and building on an idea of the OP itself!
$endgroup$
– Vincent
Jan 23 at 10:21
$begingroup$
+1 for using and building on an idea of the OP itself!
$endgroup$
– Vincent
Jan 23 at 10:21
$begingroup$
+1 for using and building on an idea of the OP itself!
$endgroup$
– Vincent
Jan 23 at 10:21
add a comment |
$begingroup$
Number of ways to end up at vertex $m$ after $n$ moves ($n-k$ clockwise moves and $k$ counterclockwise moves, arranged in $binom{n}{k}$ ways, placing us $n-2k$ clockwise from the start):
$$
begin{align}
sum_{k=0}^nbinom{n}{k}[6mid n-2k-m]
&=sum_{k=0}^nbinom{n}{k}frac16sum_{j=0}^5e^{2pi i(n-2k-m)j/6}tag1\
&=frac16sum_{j=0}^5left(e^{-2pi ij/6}+e^{2pi ij/6}right)^ne^{-2pi imj/6}tag2\
&=frac{2^n}6sum_{j=0}^5cos^nleft(frac{2pi j}6right)cosleft(frac{2pi mj}6right)tag3
end{align}
$$
Explanation:
$(1)$: $[pmid n]=frac1psumlimits_{j=0}^{p-1}e^{2pi inj/p}$
$(2)$: Binomial Theorem
$(3)$: sine is odd, cosine is even
For $n=10$, either calculation gives
$$
begin{array}{c|c}
m&text{# ways}\hline
0&342\
1&0\
2&341\
3&0\
4&341\
5&0
end{array}
$$
$endgroup$
$begingroup$
Is this an example of nuking mosquitoes? c.f. Awfully sophisticated proof for simple facts . (+1) mathoverflow.net/questions/42512/…
$endgroup$
– CopyPasteIt
Jan 23 at 14:10
add a comment |
$begingroup$
Number of ways to end up at vertex $m$ after $n$ moves ($n-k$ clockwise moves and $k$ counterclockwise moves, arranged in $binom{n}{k}$ ways, placing us $n-2k$ clockwise from the start):
$$
begin{align}
sum_{k=0}^nbinom{n}{k}[6mid n-2k-m]
&=sum_{k=0}^nbinom{n}{k}frac16sum_{j=0}^5e^{2pi i(n-2k-m)j/6}tag1\
&=frac16sum_{j=0}^5left(e^{-2pi ij/6}+e^{2pi ij/6}right)^ne^{-2pi imj/6}tag2\
&=frac{2^n}6sum_{j=0}^5cos^nleft(frac{2pi j}6right)cosleft(frac{2pi mj}6right)tag3
end{align}
$$
Explanation:
$(1)$: $[pmid n]=frac1psumlimits_{j=0}^{p-1}e^{2pi inj/p}$
$(2)$: Binomial Theorem
$(3)$: sine is odd, cosine is even
For $n=10$, either calculation gives
$$
begin{array}{c|c}
m&text{# ways}\hline
0&342\
1&0\
2&341\
3&0\
4&341\
5&0
end{array}
$$
$endgroup$
$begingroup$
Is this an example of nuking mosquitoes? c.f. Awfully sophisticated proof for simple facts . (+1) mathoverflow.net/questions/42512/…
$endgroup$
– CopyPasteIt
Jan 23 at 14:10
add a comment |
$begingroup$
Number of ways to end up at vertex $m$ after $n$ moves ($n-k$ clockwise moves and $k$ counterclockwise moves, arranged in $binom{n}{k}$ ways, placing us $n-2k$ clockwise from the start):
$$
begin{align}
sum_{k=0}^nbinom{n}{k}[6mid n-2k-m]
&=sum_{k=0}^nbinom{n}{k}frac16sum_{j=0}^5e^{2pi i(n-2k-m)j/6}tag1\
&=frac16sum_{j=0}^5left(e^{-2pi ij/6}+e^{2pi ij/6}right)^ne^{-2pi imj/6}tag2\
&=frac{2^n}6sum_{j=0}^5cos^nleft(frac{2pi j}6right)cosleft(frac{2pi mj}6right)tag3
end{align}
$$
Explanation:
$(1)$: $[pmid n]=frac1psumlimits_{j=0}^{p-1}e^{2pi inj/p}$
$(2)$: Binomial Theorem
$(3)$: sine is odd, cosine is even
For $n=10$, either calculation gives
$$
begin{array}{c|c}
m&text{# ways}\hline
0&342\
1&0\
2&341\
3&0\
4&341\
5&0
end{array}
$$
$endgroup$
Number of ways to end up at vertex $m$ after $n$ moves ($n-k$ clockwise moves and $k$ counterclockwise moves, arranged in $binom{n}{k}$ ways, placing us $n-2k$ clockwise from the start):
$$
begin{align}
sum_{k=0}^nbinom{n}{k}[6mid n-2k-m]
&=sum_{k=0}^nbinom{n}{k}frac16sum_{j=0}^5e^{2pi i(n-2k-m)j/6}tag1\
&=frac16sum_{j=0}^5left(e^{-2pi ij/6}+e^{2pi ij/6}right)^ne^{-2pi imj/6}tag2\
&=frac{2^n}6sum_{j=0}^5cos^nleft(frac{2pi j}6right)cosleft(frac{2pi mj}6right)tag3
end{align}
$$
Explanation:
$(1)$: $[pmid n]=frac1psumlimits_{j=0}^{p-1}e^{2pi inj/p}$
$(2)$: Binomial Theorem
$(3)$: sine is odd, cosine is even
For $n=10$, either calculation gives
$$
begin{array}{c|c}
m&text{# ways}\hline
0&342\
1&0\
2&341\
3&0\
4&341\
5&0
end{array}
$$
edited Jan 22 at 3:01
answered Jan 22 at 0:22
robjohn♦robjohn
269k27309635
269k27309635
$begingroup$
Is this an example of nuking mosquitoes? c.f. Awfully sophisticated proof for simple facts . (+1) mathoverflow.net/questions/42512/…
$endgroup$
– CopyPasteIt
Jan 23 at 14:10
add a comment |
$begingroup$
Is this an example of nuking mosquitoes? c.f. Awfully sophisticated proof for simple facts . (+1) mathoverflow.net/questions/42512/…
$endgroup$
– CopyPasteIt
Jan 23 at 14:10
$begingroup$
Is this an example of nuking mosquitoes? c.f. Awfully sophisticated proof for simple facts . (+1) mathoverflow.net/questions/42512/…
$endgroup$
– CopyPasteIt
Jan 23 at 14:10
$begingroup$
Is this an example of nuking mosquitoes? c.f. Awfully sophisticated proof for simple facts . (+1) mathoverflow.net/questions/42512/…
$endgroup$
– CopyPasteIt
Jan 23 at 14:10
add a comment |
Thanks for contributing an answer to Mathematics Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3082424%2fladybug-walking-on-a-hexagon%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
4
$begingroup$
How about assigning value -1 for clockwise movement and +1 for counterclockwise step. Find number of ways this sums to 0 modulo 6 with 10 terms.
$endgroup$
– T. Fo
Jan 21 at 21:23
$begingroup$
After 2 min the ladybug is at A, F, or B, but the probability of being at each point is different. This is because here are two ways to end up at A but only one way to end up at either F or B. So even though after 10 min the ladybug is at A, C, or E, the probability of being at a given vertex is not equal.
$endgroup$
– tch
Jan 21 at 21:23
1
$begingroup$
@T.Fo should that be mod6? Because 6 steps to the right will get you to +6 and back to A.
$endgroup$
– Fede Poncio
Jan 21 at 21:25
$begingroup$
Try working through your reasoning after just $2$ steps - what's the probability that the ladybug is at $A$? You can do this out explicitly. Look at what goes wrong in your argument that it should be $1/3$ and figure out another way.
$endgroup$
– Milo Brandt
Jan 21 at 21:37