1
(a) simple graph:
graph G {
layout=circo
Detroit--Newark
Boston,Washington--Newark
Miami--Newark,Detroit,Washington
}(b) multigraph:
graph G {
layout=circo
Boston--Newark,Newark,Newark,Newark
Newark--Boston,Boston
Newark--Miami,Miami,Miami
Miami--Newark,Newark
Miami--Detroit
Detroit--Newark,Newark
Newark--Washington,Washington,Washington
Washington--Newark,Newark
Washington--Miami
}(c) digraph:
digraph G {
layout=circo
Boston->Newark
Newark->Boston
Newark->Miami
Miami->Newark
Miami->Detroit
Detroit->Newark
Newark->Washington
Washington->Newark
Washington->Miami
}title: Partially correct.
The last digraph shouldn't have multiple edges, just one directed arrow per direction.2
(a)
- Degrees of each vertex.
- Identify isolated and pendant vertices. There are no isolated vertices. There is one pendant vertex:
- Connected components: a-b, a-e, a-d, a-g, d-g, d-e, d-e f-c, f-h, c-h
- There is not a Hamiltonian cycle.
title: Correct answer.(b)
- Degrees of each vertex.
- Identify isolated and pendant vertices. There are neither isolated nor pendant vertices.
- Connected components: 1-4, 1-5, 2-3, 2-4, 2-5, 3-4, 3-5
- There is a Hamiltonian cycle which takes the path .
title: Correct answer.3
Draw graph represented by:
graph G {
node[shape=point]
a--a,b,b,d
b--b,b,c,c,c
c--b,b,b,c,d
d--a,c
}This is not a simple graph as there are multiple edges between nodes and certain nodes loop on themselves.
title: Correct answer.4
These graphs are isomorphic, we can map one to the other using the function:
title: Correct answer.
$f$ is a bijection and takes edges to edges and non-edges to non-edges.5
Used final solutions: They are not isomorphic as they fail to satisfy the invariant “contain two disjoint subgraphs of ”.
The first graph has this property but the second doesn’t.
title: From final answers.6
graph G {
node[shape=point]
subgraph cluster0 {
a,b,c
}
subgraph cluster1 {
d--e
f
}
subgraph cluster2 {
j--k--l
}
subgraph cluster3 {
1--2
2--3
1--3
}
}title: Partially correct.
Had all of the graphs except for the final one where the first and last node connect.