Graph traversal Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What are the 2 components of graphs?

A

Nodes and Edges

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

Define a graph

A

An abstract data type used to represent complex, non linear relationships between objects

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

What is a neighbour?

A

2 nodes connected by an edge

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

What is the degree of a node?

A

The number of other nodes it’s connected too

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

What is a loop?

A

An edge that connects a node to itself

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

What is a path?

A

A sequence of nodes connected by edges

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

What is a cycle?

A

A closed path- starts and ends at the same nodes and no node is visited more than once

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

Examples of what a graph can represent

A

Social network, Transport network. the internet

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

What is an undirected graph?

A

A graph that allows you to move in either direction between nodes

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

How to tell if a graph is undirected?

A

The edges have no arrows

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

What is a directed grah?

A

The edges have directions so you can only move between nodes in specified directions

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

What is a weighted graph?

A

The edges have values used to record information

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