Engineering Homework Help

Several Subgraphs Connected Components Exam Practice

 

For each of the following subproblems, briefly explain how you would solve each. You do not need to write pseudocode. Give a big-O estimate on your solution with a very brief justification.

Given a graph G=(V,E) with n nodes and m edges, determine the number of connected components in G.

Given a connected graph G=(V,E) with n nodes and m edges, determine whether it is possible to color all of the nodes in V either blue or gold such that if (v,w)∈E, then v and w do not have the same color.