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 computer network has 10 machines, and some pairs are joined by cables, at most one cable per pair…
AdvancedMathematicsHigh School (11–12)Pigeonhole Principle, Recursion and Graph TheoryproofNumericalOlympiad

A computer network has 10 machines, and some pairs are joined by cables, at most one cable per pair…

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 computer network has 101010 machines, and some pairs are joined by cables, at most one cable per pair. The engineer wants to be sure the network is connected, so that every machine can reach every other one through cables, without checking the layout.

Find the largest number of cables a network of 101010 machines can have while still not being connected. Prove that every network with one more cable is connected. Describe a network that reaches the largest number.

Check your answer

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

Need a reminder? The key ideaShowHide

The degrees add up to twice the number of edges, so the number of odd vertices is even. KnK_nKn​ has (n2)\dbinom{n}{2}(2n​) edges. A simple graph on nnn vertices with more than (n−12)\dbinom{n - 1}{2}(2n−1​) edges is connected.

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. The split. If the network is not connected, take one component with kkk machines, 1≤k≤91 \le k \le 91≤k≤9. No cable joins it to the other 10−k10 - k10−k machines.

Step 2. The most cables. At most (k2)+(10−k2)\dbinom{k}{2} + \dbinom{10 - k}{2}(2k​)+(210−k​) cables. This is largest at the ends, k=1k = 1k=1 or k=9k = 9k=9, where it equals (92)=36\dbinom{9}{2} = 36(29​)=36. For k=2k = 2k=2 it is 1+28=291 + 28 = 291+28=29, and it keeps falling towards k=5k = 5k=5, where it is 202020.

Step 3. The example. Join every two of 999 machines and leave the tenth alone: 363636 cables and not connected.

Step 4. One more cable. A network with 373737 cables cannot be split, because every split allows at most 363636. So it is connected.

Answer: at most 363636 cables without being connected, so 373737 cables always make it connected. Proof complete.

Log in to save this for later
← All Problems
← A simple graph has exactly 12 edges. Three of its vertices have degree 4, and every other vertex…A water company lays pipes as a tree: every junction is joined to the network, and there are no… →
More onPigeonhole Principle, Recursion and Graph Theory

Discussion (0)

Log in to join the discussion.

Loading…

Learn it in

  1. Graphs, degrees and the handshake lemmaGraph 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 →