Codepiko · Computer science: Networks: muddy town
Stone streets
Goal: Connect every house to every other house with as few stones as you can.
Time: 30 min · You need: Pencil, coloured pencil; for class play, buttons or scraps of paper
1. Save the town from the mud
After the rain the streets turned to mud. The number on a street is the stones it takes to pave it. Every house must reach every other house along paved streets. Colour the streets you pave and add up the stones: the fewer, the better.
Total stones:
2. Start with the cheapest
This time there is a rule. Try the streets one by one, starting with the cheapest. If a street joins two houses that can already reach each other, skip it; otherwise colour it and write it in the table.
| # | Street | Stones |
|---|---|---|
| 1 | ||
| 2 | ||
| 3 | ||
| 4 | ||
| 5 | ||
| 6 | ||
| 7 | ||
| Total | ||
3. Think
Write short answers.
How many houses did each town have, and how many streets did you pave? What if you paved one more?
codepiko.com