4.2.4 Graphs Flashcards

(13 cards)

1
Q

Define Graphs.

A

An abstract data structure consisting of a set of values/nodes connected by a set of edges.

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

Define Abstraction.

A

The removal of unnecessary detail, reducing the problem to essential features.

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

What is the vertex/node in graph?

A

The representation of an object on a graph that is capable of being related to other such objects.

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

What is the edge in graph?

A

A connection that represents a relationship between two nodes.

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

What are the 4 types of graphs?

A
  • weighted
  • unweighted
  • directed
  • undirected
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is a weighted graph?

A

A graph where each edge/arc has an associated value (weight).

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

What is an unweighted graph?

A

A graph where edges have no values.

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

What is a directed graph?

A

A graph where the order of the vertices paired in an edge matter. The edges are one way.

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 where the order of the vertices paired in an edge does not matter. The edges are bidirectional.

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

What are some examples of graphs in real life?

A
  • human networks
  • transport networks
  • internet and the web
  • computer science
  • medical research
  • project management
  • game theory
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is an Adjacency List?

A

A representation of a graph by storing a list of connected nodes to each node.

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

What is an Adjacency Matrix?

A

A matrix representation of a graph that stores the edges connecting all possible nodes.
Where 1 is connected, and 0 is not connected.

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

Adjacency List VS Adjacency Matrix

A

List:
- suitable for sparse graphs (little edges)
- less memory required (as only stores data when there is an edge)
- increases processing time (has to be analyzed before adjacencies can be identified)

Matrix:
- suitable for dense graphs (lots of edges)
- more memory required (as stores value for every combination)
- faster processing time (adjacencies can be identified more quickly, matrix is used as a lookup)

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