Graphs Flashcards

1
Q

Graph

A

A graph consists of end points (vertices/nodes) that are joined by lines(edges/arcs)

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

degree of a vertex

A

the number of edges(lines) going away from a vertex

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

Isolated Vertex

A

has no neighboring vertices connected to it

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

Cycle

A

edges creating returns to connected vertices

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

examples of use of graphs

A

-modelling gas pipelines
-managing air transport systems
-representing computer networks

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

types of graph

A

-labeled/unlabeled
-weighted/unweighted
-directional/unidirectional

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

Adjacent Matrix

A

representing vertex connections to other vertices (grid)

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

adjacency list

A

collection of lists which represents the neighbors of each vertex(node) in a graph

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

adjacency (list vs matrix)

A

+more space efficient (not storing 0s/ repeats for undirected graphs)
-longer programming time if you want to make object based list for weighted graphs

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

Tree Graph

A

graph that is…undirected…has no cycles

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

Binary tree

A

undirected graph with no cycles where…each vertex has two children at most and there is a clear root node

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

Creating binary trees from list of strings

A
  1. Put them in via the order they are given (i.e. first is root)
  2. compare the weight for subsequent letters (heavier nodes go right) (lighter nodes go left) and go below a node that takes a side
  3. move onto second letter if they have the same first letter
How well did you know this?
1
Not at all
2
3
4
5
Perfectly