Question
A communication network, such as the Internet, can be modeled as an undirected graph G = ( V , E ). Here the vertices V
A communication network, such as the Internet, can be modeled as an undirected graph G = (V, E). Here the vertices V are the machines on the network, and the edge set consists of one edge for each pair of machines that are directly connected. We assume that the edges of G are undirected, that is, if there is a direct connection from machine u to machine v, then there is also a direct connection from machine v to machine u.
It is highly desirable for a communication network graph to be connected, so that every machine on the network can communicate, possibly through a series of relays, with any other machine. But networks can change, with some machines failing and other machines being added to the network. It is useful to have a monitoring algorithm that collects information about the current network graph (vertices and edges) at designated times, and determines properties related to connectivity.
(a) Describe (in words and pseudocode) a monitoring algorithm, which does the following. As input, it is given an undirected graph G = (V, E) representing the current network, in adjacency list format. It should output a Boolean saying whether or not G is connected. Your algorithm should run in time O(V + E).
(b) It is very nice if the network is connected, but even if it is, we might worry that it might become disconnected soon. This is likely if the network graph has critical vertices, whose removal would disconnect the graph. That is, u is a critical vertex exactly if there are two other vertices, v and w, for which every connecting path in the graph runs through u (this is equivalent to saying that removing u disconnects the graph, because removing u leaves no path from v to w.)
Describe (in words and pseudocode) a new monitoring algorithm, which does the following. As input, it is given a connected undirected graph G = (V, E) representing the current network, in adjacency list format. It should output a list of all the critical vertices of the graph. Your algorithm should run in time O(V + E).
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started