Exercise 2: Two Genuinely Different Real Graph Problems — Possible Solution ==================================================================== SYSTEM 1: A PACKAGE MANAGER DETERMINING INSTALL ORDER ------------------------------ Per this chapter's own dependency-resolution connection, a package manager (npm, pip, apt) models every package as a vertex and every "depends on" relationship as an edge. Before installing anything, it needs to determine a valid order - every package installed only after everything it depends on - and needs to detect if the dependencies form an impossible circular loop. This is precisely a graph traversal and cycle-detection problem, not something most engineers would immediately think of as "graph theory" despite using it every time they run an install command. SYSTEM 2: A MAPPING APP FINDING A ROUTE ------------------------------ Per this chapter's own shortest-paths connection, a mapping or navigation app models intersections as vertices and road segments (with their travel time or distance) as weighted edges. Finding "the fastest route from here to there" is a shortest-path problem on this graph - the exact algorithmic territory this course's own Chapters 6-7 cover directly. WHY THESE ARE GENUINELY DIFFERENT PROBLEMS ------------------------------ A package manager's dependency graph is typically unweighted and directed, and the core question is about ORDERING and CYCLES, not distance. A mapping app's road network is weighted and (often) undirected, and the core question is about MINIMUM-COST PATHS, not ordering at all. Despite both being graphs, the actual questions being asked - and the specific algorithms needed to answer them - are substantially different, demonstrating that "graph theory" isn't one narrow technique but a shared modeling language applied to genuinely distinct real problems. WHY THIS WORKS AS AN ANSWER ------------------------------ Two systems are chosen specifically because they rely on different graph properties (cycles/ordering vs. weighted shortest paths) rather than being superficial variations of the same underlying problem, and each is connected explicitly back to this chapter's own five- connections table entries.