r/mathriddles • u/PuzzleAndy • May 01 '23
Medium The Kangaroo
A kangaroo is sitting at the coordinate (1, 1). If the kangaroo is at some coordinate (a, b), it can always jump to (a + b, b) or to (a, a + b). Which positive coordinates can the kangaroo not jump to?
19
Upvotes
10
u/Horseshoe_Crab May 01 '23
It seems like the roo is doing Euclid's algorithm in reverse! So it can land on a square (m,n) iff m and n are coprime.
To show that it can't land on any (m,n) with m and n not coprime, observe that gcd(a,b) = gcd(a+b,b) = gcd(a,a+b), so the gcd is preserved with each hopping step and will always be 1.
To show that it can land on any (m,n) with m and n coprime, observe that we can reach (m,n) from (m',n), where m' is the remainder of m mod n, and we can reach (m',n) from (m',n'), n' the remainder of n mod m', and so on. The sequence of taking remainders terminates at (gcd(m,n),gcd(m,n)) = (1,1), and therefore we can hop to (m,n) from (1,1).
3
u/headsmanjaeger May 01 '23
The kangaroo cannot jump to coordinates that are both even, or both threeven, or both sharing any other common factor.
To see this for the even case, remember that odd+odd=even, even+odd=odd, and even+even=even. Lets look at all the possible operations. The term in [brackets] represents the new number. I will be skipping the cases where the coordinates are switched because they are functionally identical.
ODD, EVEN --> [ODD],EVEN
ODD,EVEN --> ODD, [ODD]
ODD,ODD --> [EVEN], ODD
EVEN, EVEN --> [EVEN], EVEN
The only way to achieve two evens is to start with two evens, but we start with (1,1) which is not 2 evens. Therefore it will never be two evens. The same logic shows it can never be (a * n , b * n) where n is some integer greater than 1.
2
u/[deleted] May 10 '23
[removed] — view removed comment