description: "Graph theory is one of the most important topics at the Silver level and above, although some basic problems occasionally appear in Bronze."
new Problem("Silver", "Grass Planting", "894", "Easy", false, ["tree"]),
new Problem("Bronze", "The Great Revegetation", "916", "Hard", false, []),
new Problem("Bronze", "Milk Factory", "940", "Hard", false, ["tree"]),
new Problem("Bronze", "Swapity Swap", "1013", "Hard", false, ["permutation"], "Hint: One option is to keep swapping until the permutation returns to its original state (but can you do better?)."),
new Problem("Bronze", "Family Tree", "833", "Hard", false, ["tree"]),
Graphs can be used to represent many things, from images to wireless signals, but one of the simplest analogies is to a map. Consider a map with several cities and highways connecting the cities. Some problems relating to graphsare:
- If we have a map with some cities and roads, what's the shortest distance I have to travel to get from point A to point B?
- Consider a map of cities and roads. Is city A connected to city B? Consider a region to be a group of cities such that each city in the group can reach any other city in said group, but no other cities. How many regions are in this map, and which cities are in which region?