2 min read

Can you help a frogger out?

Table of Contents

Riddler Classic

A frog needs to jump across 20 lily pads. He starts on the shore (Number 0) and ends precisely on the last lily pad (Number 20). He can jump one or two lily pads at a time. How many different ways can he reach his destination?

What if he can jump one, two or three at a time? Or four? Five? Six? Etc.

Solution

Let JnJ_n be the number of jumps required by the frog to reach the nthn^{th} lily pad. It is easy to see that Jn=Jn−1+Jn−2J_n = J_{n-1} + J_{n-2} and J1=1J_1 = 1 and J2=2J_2 = 2.