Assignment 2
Assignment 2
CS-Department
Assignment 2
Q.1 Find the sum of the degrees of the vertices of each graph in Exercises 1–3 and verify that it equals
twice the number of edges in the graph.
Q.2 Determine whether the graph shown has directed or undirected edges, whether it has multiple
edges, and whether it has one or more loops.
Q.3 Show that the sum, over the set of people at a party, of the number of people a person has
shaken hands with, is even. Assume that no one shakes his or her own hand. In Exercises 7–9
determine the number of vertices and edges and find the in-degree and out-degree of each vertex for
the given directed multigraph.
Q.4 For each of the graphs in Exercises 7–9 determine the sum of the in-degrees of the vertices and
the sum of the out-degrees of the vertices directly. Show that they are both equal to the number of
edges in the graph.
a) K7 b) K1,8 c) K4,4 d) C7
e) W7 f) Q4
Q.6 Exercises 21–25 determine whether the graph is bipartite. You may find it useful to apply
Theorem 4 and answer the question by determining whether it is possible to assign either red or blue
to each vertex so that no two adjacent vertices are assigned the same color.
Q.7 Suppose that there are four employees in the computer support group of the School of
Engineering of a large university. Each employee will be assigned to support one of four different
areas: hardware, software, networking, and wireless. Suppose that Ping is qualified to support
hardware, networking, and wireless; Quiggley is qualified to support software and networking; Ruiz is
qualified to support networking and wireless, and Sitea is qualified to support hardware and software.
a) Use a bipartite graph to model the four employees and their qualifications.
b) Use Hall’s theorem to determine whether there is an assignment of employees to support areas so
that each employee is assigned one area to support.
c) If an assignment of employees to support areas so that each employee is assigned to one support
area exists, find one.
Q.8 In Exercises 1–4 use an adjacency list and adjacency matrix and incidence matrix to represent the
given graph.
Q.9 In Exercises 16–18 draw an undirected graph represented by the given adjacency matrix.
Q.10 Represent each of these graphs with an adjacency matrix.
a) K4 b) K1,4 c) K2,3 d) C4 e) W4 f) Q3
Q.11 In Exercises 19–21 find the adjacency matrix of the given directed
Q.12 In Exercises 38–45 determine whether the given pair of graphs is isomorphic.
Q.13 In Exercises 1–6 determine whether the given graph has an Euler circuit. Construct such a circuit
when one exists. If no Euler circuit exists, determine whether the graph has an Euler path and
construct such a path if one exists.
Q14 Suppose that in addition to the seven bridges of K ¨onigsberg there were two additional bridges,
connecting regions B and C and regions B and D, respectively. Could someone cross all nine of these
bridges exactly once and return to the starting point?
Q15 In Exercises 18–23 determine whether the directed graph shown has an Euler circuit. Construct an
Euler circuit if one exists. If no Euler circuit exists, determine whether the directed graph has an Euler
path. Construct an Euler path if one exists.
Q16 In Exercises 30–33 determine whether the given graph has a Hamilton circuit. If it does, find such
a circuit. If it does not, give an argument to show why no such circuit exists.
Q17 In Exercises 2 and 3 find the length of a shortest path between a and z in the given weighted
graph using Dijkstra’s algorithm.