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. Mathematics
  2. /Pigeonhole Principle, Recursion and Graph Theory

Pigeonhole Principle, Recursion and Graph Theory

Mathematics · High School (11–12) · 3 courses, 30 worked problems

This topic gathers three counting ideas used in problem solving. The pigeonhole principle says that if more than nnn objects go into nnn boxes, at least one box holds two or more. It sounds simple, but it proves surprising facts. A recursion defines each term from earlier ones, as in an=an−1+an−2a_n = a_{n-1} + a_{n-2}an​=an−1​+an−2​, and helps us count step by step. A graph is a set of points joined by lines. Graph theory studies paths, degrees and colourings. Networks of roads, friendships and computer links are all graphs.

With practice you will be able to

  • Prove a result with the pigeonhole principle
  • Set up and solve a recurrence relation for a counting problem
  • Use degrees and paths to answer questions about a graph

On the syllabus of

  • Olympiads

Lessons

  • The Pigeonhole PrincipleIn the dark, how many gloves must you take to be sure of a pair?High School (11–12)
  • Recurrences and Counting by RecursionHow many ways can tiles cover a 2 by n strip? How often does nobody get their own gift back?High School (11–12)
  • Graph TheoryCan you cross each of ten bridges exactly once? Can three houses reach three wells with no paths crossing?High School (11–12)

Worked problems

Each one has a hint, the key idea and a full worked solution.

  • A cupboard holds 6 pairs of black gloves and 4 pairs of brown gloves, 20 gloves in all…Hard
  • A teacher writes some whole numbers on the board…Hard
  • Every point of a grid with 3 rows and 7 columns is painted red or blue…Advanced
  • A class of 50 students takes a quiz marked out of 10…Hard
  • Ten students of different heights stand in a line in some order…

Python labs

  • Boxes for remainders
  • Blocks and odd parts
  • Counting by recursion
  • Derangements and Catalan numbers
  • Degrees and components
  • Euler and two colours
Advanced
  • The numbers 1, 2, …, 12 are written round a circle in any order, like a clock face that has been…Advanced
  • A metal plate is an equilateral triangle with sides of 4 cm…Hard
  • A set of whole numbers is chosen from 1 to 100…Advanced
  • Ravi notices that 3⁴ = 81 ends in 1 and 3²⁰ = 3486784401 ends in 01…Advanced
  • Ten different two-digit numbers are written on cards, for example 13, 27, 31, 44, 52, 68, 70, 85…Advanced
  • A garden path is a row of 14 paving slabs…Hard
  • Some circles are drawn in a plane. Every two of them cross in exactly two points, and no three of…Hard
  • All 30 worked problems on Pigeonhole Principle, Recursion and Graph Theory →