31
Graph theory at work

Graph theory at work. Examine the procedure utilized by snow plows in Iowa City Systemize and minimize routes Review mathematical concepts involved

Embed Size (px)

Citation preview

Graph theory at work

Examine the procedure utilized by snow plows in Iowa City

Systemize and minimize routes Review mathematical concepts involved Look into how math concepts apply to

this problem Model Apply to example section Conclusions/Recommendations

Winter of 2007-2008 Unplowed areas Results

Uneven roadsUnable to plowCracks and potholes

Environmental Reduce Gas Consumption

Greenhouse gas emissions Save money

Public Complaints

City website Safety

System Current process

Downtown/Bus routes Steep slopes Flat secondary roads

Easy to teach Little confusion

Seven Bridges of Könisburg Euler

Traverse each edge exactly once Circuits exist if all vertices of even

degree Digraph: indegree equals outdegree for all

vertices

Use here If one exists, will be optimal route More than one truck

Multigraph Vertices - intersections of roads Edges – bidirectional streets Directed arcs – one-way streets For snow plows

Must traverse each lane of each road at least once

Digraph Vertices – intersections of roads Arcs – directed lanes

Kwan Mei-Ko 1960’s Goal: traverse every street in least

distance More general than bridge problem

If contains eulerian circuit, this is the shortest route

If not, solution can be found

If not using city’s current priorities Weights represent distance Want Mininimum Find degrees of all vertices in graph

Must be even number of vertices of odd degree Handshake lemma

Find shortest weighted paths between these vertices Draw duplicate edges along path

Will then have all even degrees Create Eulerian Circuit

If I choose to comply with current process

Assign weights to streets Weights represent grade of street

Find maximal weighted paths first Represent steep slopes

Follow by lower weighted paths Flatter streets

Square matrix Each row and column represents a vertex ‘1’ in Xij if arc (edge) exists from i to j ‘0’ otherwise Will be used to find degree of vertex in

multigraph Sum of ones in vertex row/column (digraph)

Traverse bus routes Simple because already circuits

Divide city into sections (10) Within each section, split roads into phases Maintain city’s current priorities Each phase

Create adjacency matrix For vertices of odd degree, create connected graph with

weights of shortest distance between Find perfect matching New edges along path Find Eulerian circuit Repeat for steep roads, flat roads

1 2

4

3

5

6

7

8Vertices 2,3,4,5,6,7 have odd degree

2

4

3

5

6

7

Assign weights (shortest distance) Find minimal matching

1

1

1

1

4

3

2

4

3

5

6

7

1

1

1

1

4

3

Duplicate red edges

2

4

3

5

6

7

1

8

2

4

3

5

6

7

1

8

2

4

3

5

6

7

1

8

2

4

3

5

6

7

1

8

2

4

3

5

6

7

1

8

2

4

3

5

6

7

1

8

2

4

3

5

6

7

1

8

2

4

3

5

6

7

1

8

2

4

3

5

6

7

1

8

2

4

3

5

6

7

1

8

2

4

3

5

6

7

1

8

2

4

3

5

6

7

1

8

2

4

3

5

6

7

1

8

Divide the city into sections Determine which streets fall into which

phase Determine distances between vertices Create computer program

Takes in vertices/edges Forms adjacency matrices Finds degrees Forms weighted matrix for vertices of odd degree Minimizes matching Duplicates these edges Results in minimal distance path for each phase