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 water company lays pipes as a tree: every junction is joined to the network, and there are no…
HardMathematicsHigh School (11–12)Pigeonhole Principle, Recursion and Graph TheoryNumericalOlympiad

A water company lays pipes as a tree: every junction is joined to the network, and there are no…

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 water company lays pipes as a tree: every junction is joined to the network, and there are no loops. Four junctions have 333 pipes each, two junctions have 222 pipes each, and every other junction is an end point with 111 pipe.

Find the number of end points (leaves) and the total number of junctions. Use the fact that a tree with nnn vertices has n−1n - 1n−1 edges, and check your answer by the degree sum.

Check your answer

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

Need a reminder? The key ideaShowHide

A tree on nnn vertices has n−1n - 1n−1 edges; a forest with ccc components has n−cn - cn−c. Bipartite means no odd cycle; with no triangle, E≤n24E \le \dfrac{n^2}{4}E≤4n2​. A connected graph has an Euler circuit when all degrees are even, and an Euler trail when exactly two are odd.

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.

Step 1. Vertices. n=4+2+L=6+Ln = 4 + 2 + L = 6 + Ln=4+2+L=6+L.

Step 2. Degree sum. 4×3+2×2+L=2(n−1)=2(5+L)4 \times 3 + 2 \times 2 + L = 2(n - 1) = 2(5 + L)4×3+2×2+L=2(n−1)=2(5+L).

Step 3. Solve. 16+L=10+2L16 + L = 10 + 2L16+L=10+2L, so L=6L = 6L=6 and n=12n = 12n=12.

Check. 121212 junctions, 111111 pipes, degree sum 12+4+6=22=2×1112 + 4 + 6 = 22 = 2 \times 1112+4+6=22=2×11.

Answer: 666 end points and 121212 junctions.

Log in to save this for later
← All Problems
← A computer network has 10 machines, and some pairs are joined by cables, at most one cable per pair…In a group of 6 students, some pairs are friends… →
More onPigeonhole Principle, Recursion and Graph Theory

Discussion (0)

Log in to join the discussion.

Loading…

Learn it in

  1. Trees, bipartite graphs and Euler trailsGraph Theory

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 →