Graphs Flashcards

(11 cards)

1
Q

Types of “graphs”

A

Undirected graphs
The edges between any two vertices in an “undirected graph” do not have a direction, indicating a two-way relationship.

Directed graphs
The edges between any two vertices in a “directed graph” graph are directional.

Weighted graphs
Each edge in a “weighted graph” has an associated weight. The weight can be of any metric, such as time, distance, size, etc.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

The Definition of “graph”

A

“Graph” is a non-linear data structure consisting of vertices and edges.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Vertex

A

nodes such as A, B, and C are called vertices of the graph.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Edge

A

The connection between two vertices are the edges of the graph.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Path

A

the sequence of vertices to go through from one vertex to another.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Path Length

A

the number of edges in a path

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Cycle

A

a path where the starting point and endpoint are the same vertex

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Negative Weight Cycle

A

In a “weighted graph”, if the sum of the weights of all edges of a cycle is a negative value, it is a negative weight cycle

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Connectivity

A

if there exists at least one path between two vertices, these two vertices are connected

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Degree of a Vertex

A

the term “degree” applies to unweighted graphs. The degree of a vertex is the number of edges connecting the vertex

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

In-Degree

A

“in-degree” is a concept in directed graphs. If the in-degree of a vertex is d, there are d directional edges incident to the vertex.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly