Every move a frog jumps from one vertex of a tetrahedron to another vertex. Suppose he starts at a certain vertex... Call it A. How many different ways are there for it to wind up on A, the same vertex as he started, given that he makes 17 jumps in all?
Image credit: commons.wikimedia.org
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Can you explain how you immediately got your last line from your second last line?
Log in to reply
@Geoff Pilling The recurrence relations can be combined to obtain N A A ( n + 2 ) − 2 N A A ( n + 1 ) − 3 N A A ( n ) = 0 This sort of recurrence relation is a discrete version of a second order ODE with constant coefficients, and is solved similarly. If we try N A A ( n ) = λ n , then this recurrence relation is satisfied for all n provided that λ 2 − 2 λ − 3 = 0 , namely provided that λ = 3 or − 1 . Thus the general solution of the recurrence relation is N A A ( n ) = α 3 n + β ( − 1 ) n and we choose constants α , β to ensure that N A A ( 1 ) = 0 and N A A ( 2 ) = 3 N A B ( 1 ) = 3 . Thus N A A ( n ) = 4 1 [ 3 n + 3 ( − 1 ) n ] This method improves on induction, since you don't have to know the answer first!
The method can be generalised to cope with the case where the quadratic in λ has repeated roots, and also for recurrence relations of higher order.
Alternatively you can regard this as an order one recurrence relation in the vector quantity x n = ( N A A ( n ) N A B ( n ) ) obtaining a recurrence relation of the form x n + 1 = A x n for a suitable 2 × 2 matrix A . By considering eigenvalues and eigenvectors of A , you can solve this recurrence relation for x n .
Log in to reply
Okay, I'm weak in matrix theory, but is the full explanation for your sentence (below) longer than Samrat Mukhopadhyay's solution (below)? I'm not sure if there are a lot of prerequisites to learn or not...
Alternatively you can regard this as an order one recurrence relation...
... you can solve this recurrence relation for x n
Log in to reply
@Pi Han Goh – Mine is a bit shorter, since the matrix is only 2 × 2 . We have x n + 1 = ( 0 1 3 2 ) x n and the 2 × 2 matrix has eigenvalues 3 , − 1 and corresponding eigenvectors ( 1 1 ) , ( − 1 3 ) . With a bit more work we can find α , β such that x n = α 3 n ( 1 1 ) + β ( − 1 ) n ( − 1 3 )
I plugged into the recurrence relation:
N A A ( 1 7 ) = 3 ∗ N A B ( 1 6 ) = 3 ∗ ( N A B ( 1 5 ) + 2 ∗ N A A ( 1 5 ) ) = 3 ∗ ( N A B ( 1 4 ) + 2 ∗ N A B ( 1 4 ) + 2 ∗ ( 3 ∗ N A B ( 1 4 ) ) ) = . . .
Is this what you meant, or did you want me to explain how I derived the second to last line (the recurrence relation)?
Log in to reply
That is very tedious. Did you use a computer to do it? Or is there a non-CAS approach?
Log in to reply
@Pi Han Goh – Well, I noticed (without proving it) that for odd n , N A A ( n ) = ( 3 n − 3 ) / 4 , and for even n , N A A ( n ) = ( 3 n + 3 ) / 4
I've added this to the solution! ;)
At first I hesitated, since I didn't have a proof for it. (But I verified that its correct - at least up through 20 - using a spreadsheet ;^) )
Log in to reply
@Geoff Pilling – Well, it's simplest to prove it via induction , right? ;)
Here is how I went about it. And, I get a different answer. Would like to know where I am going wrong.
Interesting thing about the tetrahedron is every vertex is connected to every other vertex. So, at each jump-point, the frog has the option to go to all the three available vertices (when he is standing on the fourth).
So, if he is going on a 17-step adventure, and we are looking for number of ways to return where he started, it basically means, we can plot the path as (assuming the tetrahedron is labelled ABCD) : A x x x x x x x x x x x x x x x x A. where A is the starting vertex, x is any of the available vertices, A is the ending vertex. So, the number of possibilities for each x is 3, and so the final answer should be 3^16 = 43046721
Where am I going wrong?
Log in to reply
Of the 3 n possible n -step journeys, N A A ( n ) of them end up at A.
There are 3 ways in which an n -step journey ending at A can be extended into an ( n + 2 ) -step journey ending at A
There are 2 ways in which an n -step journey not ending at A can be extended into an ( n + 2 ) -step journey ending at A (the ( n + 1 ) st step cannot visit A).
Thus N A A ( n + 2 ) = 3 N A A ( n ) + 2 [ 3 n − N A A ( n ) ] = N A A ( n ) + 2 × 3 n With N A A ( 1 ) = 0 and N A A ( 2 ) = 3 , we can solve the above recurrence relation (once for odd n and then once for even n ) to get N A A ( n ) = 4 1 [ 3 n + 3 ( − 1 ) n ]
Well, some of those won't work since his sixteenth jump will sometimes wind up on A, which means there is no way the 17th jump will wind him up on A.
Actually, the recurrence relation is N A B ( n ) = 2 N A B ( n − 1 ) + N A A ( n − 1 ) Note the different place for the coefficient 2 . Remember that N A B ( n ) is the number of ways of getting from A to any specific one of the other three vertices (it is the same for all three vertices). Thus there are 2 ways of getting to an "other" vertex in n moves if the penultimate vertex was also an "other" vertex, and only 1 way of getting to a (specific) "other" vertex if the penultimate vertex was A.
A general procedure:
Note that we can construct an adjacency matrix A corresponding to the graph represented by the tetrahedron, where A i j = 1 if i = j and there is an edge between them; A i j = 0 , else. So the adjacency matrix for the tetrahedron is the following A = ⎝ ⎜ ⎜ ⎛ 0 1 1 1 1 0 1 1 1 1 0 1 1 1 1 0 ⎠ ⎟ ⎟ ⎞ Claim:The ( i , j ) th entry of A n , gives the number of n length paths from i to j in the graph corresponding to A .
Proof Clearly the claim is true for n = 1 . Let it be true for n = k , k ≥ 1 . Now, note that A i j k + 1 = ∑ l A k i l A l j . Now, note that by induction hypothesis, A i l k A l j denotes the total number of k + 1 length paths from i to j , by first going from i to l in k steps and then going from l to j in one step. Thus, A i j k + 1 gives all possible k + 1 length paths from i to j . Thus the claim is proved. ■
It is now clear that in our case, we need to find a diagonal element of A 1 7 . To do that, first observe that one can write, A = 1 1 T − I , where 1 = [ 1 1 1 1 ] is the all 1 vector, and I is the 4 × 4 identity matrix. Since, A is symmetric, A admits a unique diagonalization, i.e. A can be written uniquely as A = V Λ V T , where Λ is a diagonal matrix with the diagonal consisting of eigenvalues of A , and V is an orthonormal matrix with a set of eigenvectors of A as its columns.
For our case, it is easy to check that 1 1 T has one eigenvalue 4 , and others 0 , so the eigenvalue matrix of A is Λ − I , where Λ = ⎝ ⎜ ⎜ ⎛ 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ⎠ ⎟ ⎟ ⎞ The orthonormal eigenvector corresponding to eigenvalue 3 of 1 1 T is also easy to see to be 1 / 2 times the vector 1 . Now, because of orthonormality of V , we see that A 2 = ( V ( Λ − I ) V T ) 2 = V ( Λ − I ) V T V ( Λ − I ) V T = V ( Λ − I ) 2 V T , ⋯ A n = V ( Λ − I ) n V T Thus, writing the columns of V as e 1 , e 2 , e 3 , e 4 , corresponding to the eigenvalues of 4 , 0 , 0 , 0 , we get A n = 3 n e 1 e 1 T + ( − 1 ) n ( k = 2 ∑ 4 e k e k T ) = 3 n e 1 e 1 T + ( − 1 ) n ( k = 1 ∑ 4 e k e k T − e 1 e 1 T ) = 3 n e 1 e 1 T + ( − 1 ) n ( V V T − e 1 e 1 T ) = ( 3 n − ( − 1 ) n ) e 1 e 1 T + ( − 1 ) n I = 4 ( 3 n − ( − 1 ) n ) 1 1 T + ( − 1 ) n I Thus, for n = 1 7 , any diagonal element is ( 3 1 7 + 1 ) / 4 − 1 = 3 2 2 8 5 0 4 0 .
Nice write up @Samrat Mukhopadhyay !
Problem Loading...
Note Loading...
Set Loading...
Let N A B ( n ) be the number of ways to go from one vertex to a different one in n moves.
Let N A A ( n ) be the number of ways to go from one vertex to the same one in n moves.
Then, clearly N A B ( 1 ) = 1 and N A A ( 1 ) = 0
Also, for n > 1 , N A B ( n ) = N A B ( n − 1 ) + 2 ∗ N A A ( n − 1 ) and N A A ( n ) = 3 ∗ N A B ( n − 1 )
From this, it follows (proof left as an exercise to the reader! ;) ) that for odd n , N A A ( n ) = ( 3 n − 3 ) / 4 , and for even n , N A A ( n ) = ( 3 n + 3 ) / 4
Using these relations, we find that, N A A ( 1 7 ) = 3 2 2 8 5 0 4 0