Services
Discover
Homeschooling
Ask a Question
Log in
Sign up
Filters
Done
Question type:
Essay
Multiple Choice
Short Answer
True False
Matching
Topic
Computing
Study Set
Objects Abstraction Data Structures
Quiz 13: Graphs
Path 4
Access For Free
Share
All types
Filters
Study Flashcards
Question 1
Short Answer
A(n) __________ is a data structure that consists of a set of vertices (or nodes) and a set of edges (relations) between the pairs of vertices.
Question 2
Short Answer
A vertex is __________ to another vertex if there is an edge to it from that other vertex.
Question 3
Multiple Choice
Suppose an undirected graph G consists of the following sets: 1) V = {New York, Islip, Philadelphia, Chicago, Seattle} 2) E = {{Islip, New York},{New York, Philadelphia},{Philadelphia, Chicago}, {Chicago, Islip},{Chicago, Seattle},{Chicago, New York},{Seattle, New York}} Which of the following paths consisting of vertices in V represents a cycle?
Question 4
True/False
A graph that is unconnected has no connected components.
Question 5
Short Answer
Any graph that is connected and contains no cycles can be viewed as a(n) __________ by picking one of its vertices (nodes) as the root.
Question 6
Multiple Choice
The term __________ refers to visiting all the vertices in a graph.
Question 7
Multiple Choice
We can represent all the vertices of a graph (elements of the set V) by integers from 0 up to, but not including, __________.
Question 8
Short Answer
Complete the definition of an operator== member function for the Edge class. The function compares the source and dest fields only to determine equivalence between two Edge objects. bool Edge::operator==(const Edge& other) { __________ }