HelpContactFor teachers and institutes
>_StemPy Lab
Mock TestsClasses

>_StemPy Lab

Learn. Solve. Code the solutions. Test yourself.

Live examsFree mock exams, timed and rankedEveryone starts together, and your score and rank come the moment it ends.See the exams →
Live examsInternational live exams are comingTell us which exam you want first. Timed practice papers are open now.See what is coming →

Learn

  • Physics
  • Chemistry
  • Mathematics
  • Biology
  • Python Programming
  • Statistics & Data Science
  • Computer Science
  • Space Science and Astronomy
  • Earth and Environmental Science
  • Classes
  • Groups

Practice

  • Problems
  • Quizzes
  • Mock Tests
  • Prepare for an Exam
  • Question Sets
  • Exams
  • Certificates
  • Python Labs
  • AI Practice Generator
  • Student-Created Tests

Community

  • Discussions
  • Resources
  • Notes
  • Glossary
  • Blog

Account

  • Log in
© 2026 senLearn. All rights reserved.HelpFor SchoolsAboutContactPrivacy PolicyTerms of UseRefund Policy
  1. Problems
  2. /A garden path is a row of 14 paving slabs…
HardMathematicsHigh School (11–12)Pigeonhole Principle, Recursion and Graph TheoryNumericalOlympiad

A garden path is a row of 14 paving slabs…

StemPy LabContributed by StemPy Lab

Try it on paper first. A hint, the key idea and the worked solution are here when you need them.

A garden path is a row of 141414 paving slabs. Lin starts just before the first slab and moves forward, each time onto the next slab or by jumping one slab to land on the slab after it. She must finish on the last slab. Different orders of short and long moves count as different ways.

Find the number of ways she can reach the last slab. Set up a recurrence by looking at her last move, and work forward from the starting values. Then find how many of those ways use exactly 444 long jumps, by a second method: count the moves and choose which are long.

Check your answer

Work it out on paper, then type your number. The answer itself stays hidden.

Need a reminder? The key ideaShowHide

Name the count ana_nan​. Split on the first or the last step so that each case is a smaller copy of the same question. Check that the cases do not overlap and cover everything, then find the starting values by hand.

The worked solution

Check an answer or open a hint to unlock the worked solution.

Have you tried it?

Work it out on paper first. It is fine to get stuck or make a mistake: that is how we learn. When you are ready, go through the solution one step at a time, and check each step against your own.

Plan. A Fibonacci recurrence for the total; a binomial coefficient for the second part.

Step 1. The recurrence. Let wnw_nwn​ be the number of ways to reach slab nnn. The last move comes from slab n−1n - 1n−1 or from slab n−2n - 2n−2, and these cases do not overlap. So wn=wn−1+wn−2w_n = w_{n-1} + w_{n-2}wn​=wn−1​+wn−2​.

Step 2. Starting values. w1=1w_1 = 1w1​=1 (one short move) and w2=2w_2 = 2w2​=2 (two short moves, or one long jump).

Step 3. Work forward. 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610. So w14=610w_{14} = 610w14​=610.

Step 4. Exactly four long jumps. Four long jumps cover 888 slabs, so 666 slabs are left for 666 short moves. That is 101010 moves, and we choose which 444 are long: (104)=210\dbinom{10}{4} = 210(410​)=210.

Check. Adding (14−kk)\dbinom{14 - k}{k}(k14−k​) over k=0k = 0k=0 to 777 long jumps gives 1+13+66+165+210+126+28+1=6101 + 13 + 66 + 165 + 210 + 126 + 28 + 1 = 6101+13+66+165+210+126+28+1=610, the same total.

Answer: 610610610 ways, of which 210210210 use exactly 444 long jumps.

Log in to save this for later
← All Problems
← Ten different two-digit numbers are written on cards, for example 13, 27, 31, 44, 52, 68, 70, 85…Some circles are drawn in a plane. Every two of them cross in exactly two points, and no three of… →
More onPigeonhole Principle, Recursion and Graph Theory

Discussion (0)

Log in to join the discussion.

Loading…

Learn it in

  1. Setting up a recurrenceRecurrences and Counting by Recursion

More on this topic

  1. The 15 edges of K₆ are coloured red or blue…Advanced
  2. Three houses each need a path to each of three wells, nine paths in all, drawn on flat ground…Advanced
  3. A connected planar graph with 10 vertices is drawn without crossings, and every face of the…Hard
  4. The complete bipartite graph K_(m,n) joins each of m left vertices to each of n right vertices…
Advanced
  • A river town has five land areas, A, B, C, D and E, joined by ten bridges…Hard
  • All problems on this topic →