graphs and trees Flashcards

1
Q

graphs consist of…

A

nodes connected ny edges

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

path

A

a route from a starting node to a destination node

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

graph theory

A

a field of math that studies graphs, their properties, and their application

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

connected graphs

A

for any pair of nodes u and v, there is a path from u to v

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

connected graphs <->

A

disconnected

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

directed graphs

A

directed edges

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

weakly connected

A

there is a path between every pair of vertices in the undirected version of the graph

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

strongly connected

A

for every pair of vertices u and v, there is a directed path from u to v and a directed path from v to u.

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

cyclic

A

contains one or more cycles

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

acyclic

A

contains no cycles

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

weighted

A

edges have numerical values, called weight

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

DAG

A

directed acyclic graph

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

edges in non-weighted graphs carry binary information:

A

they do exist or they don’t

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

tree

A

and undirected graph in which any two nodes are connected by exactly one path, or equivalently a connected acyclic undirected graph

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

directed tree

A

DAG whose underlying undirected graph is a tree

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

binary trees

A

a tree data structure in which each node has at most 2 children

17
Q

root

A

node that has no parent nodes

18
Q

leaf

A

node that has no children

19
Q

perfect binary tree

A

all nodes have either 0 or 2 children and all leaf nodes are at the same distance from the root

20
Q

degenerate tree

A

opposite of balanced, each parent node has only one associated child node

21
Q

worst case complexity for searching a tree

A

O(N)

22
Q

binary search tree

A

a binary tree whose internal nodes each store a key greater than all the keys in the node’s left subtree and less than those in its right subtree

23
Q

quadtrees

A

each node can have up to four child nodes, allowing both dimensions to be split in half