Graph Theory - Discrete Math - Lecture Slides, Slides of Discrete Mathematics

Some concept of Discrete Math are Unique Path, Addition Rule, Clay Mathematics, Complexity Theory, Correspondence Principle, Discrete Mathematics, Group Theory, Random Variable, Major Concepts. Main points of this lecture are: Graph Theory, Discrete Maths, Graph Theory, Introduce, Hamiltonian, Implementing Graphs, Similarity Graphs, Algorithms, Hamiltonian Cycles, Finding Cycles

Typology: Slides

2012/2013

Uploaded on 04/27/2013

emee
emee 🇮🇳

4.3

(30)

134 documents

1 / 138

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Discrete Maths
Objective
introduce graph theory (e.g. Euler and
Hamiltonian cycles), and discuss some
graph algorithms (e.g. Dijkstra’s shortest
path).
5. Graph Theory
Docsity.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c
pf4d
pf4e
pf4f
pf50
pf51
pf52
pf53
pf54
pf55
pf56
pf57
pf58
pf59
pf5a
pf5b
pf5c
pf5d
pf5e
pf5f
pf60
pf61
pf62
pf63
pf64

Partial preview of the text

Download Graph Theory - Discrete Math - Lecture Slides and more Slides Discrete Mathematics in PDF only on Docsity!

Discrete Maths

  • Objective
    • introduce graph theory (e.g. Euler and

Hamiltonian cycles), and discuss some

graph algorithms (e.g. Dijkstra’s shortest

path).

5. Graph Theory

Overview

1. Introduction

2. Cycles

3. Hamiltonian Cycles

4. Algorithms for Finding Cycles

5. Similarity Graphs

6. Implementing Graphs

continued

1. Introduction

Muddy Gap

Casper

Douglas

Gillettte Buffalo

Sheridan

Greybull

Worland

Shoshoni

Lander

Part of Wyoming’s (a USA State)

Road System

Problem

• The Wyoming Road Inspector lives in Greybull,

and must check every road.

• He must check the roads as quickly as possible

  • by travelling each road only once
  • starting from Greybull and returning there

• Is this travel plan possible?

  • Dots = vertices/nodes (singular: vertex)
  • Lines = edges/arcs
  • An undirected graph is one where the edges

have no direction (no arrows) on them.

Equivalent Graph

Cas

Sho

Lan

Mud

Wor

Gre

She

Buf

Gil

Dou

e

e

e12 e4 e

e

e

e

e e

e

e

e

Answer: No

• Consider Worland (Wor): the inspector

must use every edge connected to Wor

only once.

Sho

Wor

Gre

Buf

e

e

e

continued

  • But to travel through Wor requires 2 edges

(one in, one out).

  • So there is no way to use the third edge to

visit Wor without using one of the other edges

again.

1 .2. A Directed Graph

  • A directed graph = vertices/nodes and arcs.

    • v • An arc = a directed edge (one with an arrow).
      • v - v - v - v - v
  • e - e - e - e - e4 e - e

A Calling Graph

• A Calling Graph for a small program:

main

printList

mergeSort

split merge

makeList

4 examples of

direct recursion

  • Parallel Edges e1, e2 = (v1, v2)

A loop e3 = (v2, v2)

Isolated (or unconnected) vertex: v

  • A graph with no loops and no parallel edges is

a simple graph.

  • A graph with no isolated verticies is a

connected graph.

1 .4. Path Length

• The length of a path = the number of edges

that it uses.

• If edges/arcs are labeled with numbers then

we can sum the values along a path to get a

“distance”.

A Weighted Graph Version

• Add edge numbers (weights) to indicate the

movement time between any two holes.

12

9

4

4

3

5

6

8

6

a

d

e

c

b

2

Simplified Problem

• Assume that the drilling must start at vertex

‘a’ and end at vertex ‘e’.

• What is the path with the shortest length

between ‘a’ and ‘e’?

  • length = sum of weights on the path’s edges