Practice: Strongly connected components
0 of 4 solved
About these problems
Apply, Connect, Reason and Stretch describe difficulty within this topic, not an official contest rating. Open any problem in any order; reading the chapter first is optional.
- 1Strong group countA directed graph has n vertices, numbered 1 to n, and m edges. Count its strongly connected components. Two vertices share a component exactly when each is reachable from the other; every vertex reaches itself.ApplyNot started
- 2Mutual reachability deskA directed graph has n vertices, numbered 1 to n, and m edges. Decide, for each of q queries a b, whether there is a directed route from a to b and also a directed route from b to a. Routes of length zero are allowed, so a vertex always reaches itself.ConnectNot started
- 3Broadcast startersA directed graph has n vertices, numbered 1 to n, and m edges. Find the smallest number of starting vertices to choose so that every vertex is reachable from at least one chosen vertex. A chosen vertex counts as reaching itself.ReasonNot started
- 4Collect once on a walkA directed graph has n vertices, numbered 1 to n, and m edges, and vertex i has a nonnegative reward ai. A walk follows edges in their direction; it may start and end at any vertex, may revisit vertices and edges, and may be a single vertex. Each vertex reward is collected only on its first visit. Find the largest total reward one walk can collect.StretchNot started