Discrete Struc 2 Flashcards
What is the general meaning of a graph?
A plot or chart of numerical data using a coordinate system.
What is the technical meaning of a graph?
A discrete structure used to represent relations with a web-like graphical representation.
What are some applications of graphs?
Networking scheduling
What is a simple graph?
A graph that corresponds to symmetric irreflexive binary relations.
What is a multigraph?
A graph that allows multiple edges between two nodes.
What is a pseudograph?
A graph that allows self-loops (edges connecting a node to itself).
What is a directed graph?
A graph where edges have a direction (e.g. one-way streets).
What is a directed multigraph?
A graph that allows multiple directed edges between two nodes.
Give an example of a simple graph.
Vertices: States in the southeastern U.S.; Edges: Pairs of states that are adjacent.
What do simple graphs represent?
Relationships between people such as acquaintanceship and friendship.
What is a multigraph?
A graph that represents networks with multiple lines such as computer networks.
What distinguishes a pseudograph from other graphs?
A graph that represents networks with multiple lines
What do directed graphs represent?
Relationships with direction such as one-way streets.
What is a directed multigraph?
A graph that represents networks with multiple one-way connections like telephone networks.
What is the Handshaking Theorem?
The sum of the degrees of all vertices in a graph is twice the number of edges.
What is the degree of a vertex?
The number of incident edges connected to that vertex.
What is the difference between in-degree and out-degree?
In-degree is the number of edges going to a vertex while out-degree is the number of edges coming from a vertex.
What are adjacent vertices?
Vertices that are connected by an edge.
What is a simple graph?
A graph that has no loops or multiple edges.
What is the degree of a vertex in a graph?
The sum of in-degree and out-degree.
What does the Directed Handshaking Theorem state?
The sum of the in-degrees of all vertices equals the sum of the out-degrees which is equal to the number of edges.
What are some examples of social network graphs?
Acquaintanceship, friendship
What types of graphs are used in communication networks?
Call graphs and message graphs.
What are web graphs and citation graphs examples of?
Information networks.
What do module dependency graphs represent?
Software design applications.
What types of graphs are used in transportation networks?
Airline routes and road networks.
What are round-robin and single-elimination examples of?
Tournaments.
What is an edge list in graph representation?
A list of all edges in the graph.
What does an adjacency matrix represent?
The presence or absence of edges between vertices.
What is an adjacency list?
A list of adjacent vertices for each vertex.
What is the time complexity for edge queries using an edge list?
O(E).
What is the time complexity for neighbor queries using an adjacency matrix?
O(V).
What is the time complexity for edge queries using an adjacency list?
O(degree(v)).
What are pointers in C++?
Variables that store memory addresses of other variables.
What is dynamic memory allocation?
Requesting memory at runtime using the new operator.
How do you deallocate memory in C++?
By using the delete operator.
How do you declare a pointer to an integer in C++?
Using the syntax: typename pointername; e.g. int ptr;
What does the address-of operator (&) do?
Extracts the address of a variable.