Search Header Logo
Graph Theory

Graph Theory

Assessment

Presentation

Mathematics

6th - 8th Grade

Practice Problem

Medium

Created by

Atharv (KMS)

Used 6+ times

FREE Resource

6 Slides • 3 Questions

1

Graph Theory

2

What is a Graph?

A graph is a bunch of nodes (the circles) connected by edges (the lines).

Quite similar to the binary search tree terminology

media

3

Paths of a Graph

A path is some nodes connected by edges.


AECF is a path. It is a simple path, because it has no repeated nodes.


ADEA is a path. It is a cycle, because it revisits the node A

media

4

Types of Edges

Directed edges are one-way edges.


A path such as FED is invalid, because the edge between E and F goes from E to F, not F to E.


Edges which do not look like arrows are two way edges.

media

5

Draw

Sometimes, you will be asked to draw a graph, given the vertices of the graph and the edges between vertices. You will be told if the graph is directed or not.

Draw a directed graph with vertices {A, B, C} and edges {AB, CA, AC, CC}

6

Adjacency Matrices

See how there is an edge from A to B? In the adjacency matrix, in the Ath row and Bth column, there is a 1, which represents this.


See how there isn't an edge from C to A? In the adjacency matrix, in the Cth row and Ath column, there is a 0, which represents this.

media
media

7

More Terminology

A graph is connected if every node can reach every other node

A graph is made up of connected components.

A tree is a special kind of graph without cycles. If it has n nodes, it has exactly n - 1 edges.

A complete graph has all possible edges

A dense graph has many edges, while a sparse one has a few

A tree is a graph which has one less edge than nodes. A tree has only one simple path between two nodes and no cycles

A directed graph with no cycles is called a DAG (directed acyclic graph)

8

Multiple Choice

Question image

How many cycles are in the following graph?

1

0

2

1

3

2

4

3

5

4

9

Multiple Choice

Question image

How many paths are there from A to C of length 2 or length 4?

Hint: The paths are not necessarily simple.

1

4

2

3

3

2

4

1

5

0

Graph Theory

Show answer

Auto Play

Slide 1 / 9

SLIDE