Top Banner
Using geometric information in Euclidean graph algorithms Paul Bouman Seminar Graph Drawing 17-10-2007
34

Using geometric information in Euclidean graph algorithms Paul Bouman Seminar Graph Drawing 17-10-2007.

Dec 20, 2015

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Using geometric information in Euclidean graph algorithms Paul Bouman Seminar Graph Drawing 17-10-2007.

Using geometric information in Euclidean

graph algorithms

Paul Bouman

Seminar Graph Drawing

17-10-2007

Page 2: Using geometric information in Euclidean graph algorithms Paul Bouman Seminar Graph Drawing 17-10-2007.

Overview

Euclidean graphs Shortest Paths Traveling Salesman

A geometric approach Special cases of TSPs

Conclusion Bibliography

Page 3: Using geometric information in Euclidean graph algorithms Paul Bouman Seminar Graph Drawing 17-10-2007.

Euclidean Graphs

Vertices are point in a plane Edges have weight defined by distances in

the plane

Triangle Inequality Lower bound on path length

Page 4: Using geometric information in Euclidean graph algorithms Paul Bouman Seminar Graph Drawing 17-10-2007.

Shortest Paths

Most important algorithms were discussed by Jesper

Euclidean Distance can be used as an heuristic

In case of A*: average time can became O(n) Important question: is function h admissable Interesting case: travel time instead of distance

Page 5: Using geometric information in Euclidean graph algorithms Paul Bouman Seminar Graph Drawing 17-10-2007.

Shortest Paths – A*

Admissibility – The heuristic function may never overestimate the true distance to the destination

When it does, A* will find an optimal solution

With travel time, the average speed V is the important parameter

Page 6: Using geometric information in Euclidean graph algorithms Paul Bouman Seminar Graph Drawing 17-10-2007.

Shortest Paths

Combining A* and bidirectional search may work nice

Average computational time can become O(n) in Euclidean Graphs

Layering approach can reduce shortest path queries below linear time

Page 7: Using geometric information in Euclidean graph algorithms Paul Bouman Seminar Graph Drawing 17-10-2007.

Traveling Salesman

In eclidean space, the quandrangle inequality holds

Because of this, a minimal TSP tour can’t cross itself

Page 8: Using geometric information in Euclidean graph algorithms Paul Bouman Seminar Graph Drawing 17-10-2007.

Traveling Salesman

Lemma: If all cities lie on the boundary of a convex polygon, the optimal tour is a cyclic walk along the boundary of the polygon (in clockwise or counterclockwise direction) [4]

Page 9: Using geometric information in Euclidean graph algorithms Paul Bouman Seminar Graph Drawing 17-10-2007.

TSP: A geometric approach

Work with partial tours

1. Start with the convex hull

2. Sequence a unsequenced city between two consecutive cities on the partial tour

3. While unsequenced cities: Repeat 2

4. Done

Page 10: Using geometric information in Euclidean graph algorithms Paul Bouman Seminar Graph Drawing 17-10-2007.

TSP: Determining a Convex Hull

1. Start with vertex h1 with lowest x coordinate

2. Choose the largest angle in x

3. Choose an angle vertex as h2

4. Look for vertex hi with biggest angle < hi-2,hi-1,hi

5. Repeat until the new hi = h1

Page 11: Using geometric information in Euclidean graph algorithms Paul Bouman Seminar Graph Drawing 17-10-2007.

TSP: Determining a Convex Hull

Page 12: Using geometric information in Euclidean graph algorithms Paul Bouman Seminar Graph Drawing 17-10-2007.

TSP: Determining a Convex Hull

Page 13: Using geometric information in Euclidean graph algorithms Paul Bouman Seminar Graph Drawing 17-10-2007.

TSP: Determining a Convex Hull

Page 14: Using geometric information in Euclidean graph algorithms Paul Bouman Seminar Graph Drawing 17-10-2007.

TSP: Determining a Convex Hull

Page 15: Using geometric information in Euclidean graph algorithms Paul Bouman Seminar Graph Drawing 17-10-2007.

Expanding the Partial Tour

There are two possible techniques Largest Angle method Most eccentric ellipse method

Methods don’t guarantee optimal solutions

Improvements possible

Page 16: Using geometric information in Euclidean graph algorithms Paul Bouman Seminar Graph Drawing 17-10-2007.

Largest Angle Method

For each internal vertex v, look at the angle α = <(u v w) with u and w consequent vertices on the partial tour

When we have u,v,w such that α is maximized, insert v between u and w on the partial tour.

Repeat until there are no internal vertices left

Page 17: Using geometric information in Euclidean graph algorithms Paul Bouman Seminar Graph Drawing 17-10-2007.

Largest Angle Method

Page 18: Using geometric information in Euclidean graph algorithms Paul Bouman Seminar Graph Drawing 17-10-2007.

Largest Angle Method

Page 19: Using geometric information in Euclidean graph algorithms Paul Bouman Seminar Graph Drawing 17-10-2007.

Largest Angle Method

Page 20: Using geometric information in Euclidean graph algorithms Paul Bouman Seminar Graph Drawing 17-10-2007.

Largest Angle Method

Page 21: Using geometric information in Euclidean graph algorithms Paul Bouman Seminar Graph Drawing 17-10-2007.

Largest Angle Method

Page 22: Using geometric information in Euclidean graph algorithms Paul Bouman Seminar Graph Drawing 17-10-2007.

Most Eccentric Ellipse

Look at ellipse with focal points u and w, with a point v on the ellipse, where u and w are consecutive points on a partial path and v an internal vertex

Look for the most eccentric ellipse defined by points u,v,w and add v between u and w on the partial tour.

Page 23: Using geometric information in Euclidean graph algorithms Paul Bouman Seminar Graph Drawing 17-10-2007.

Most Eccentric Ellipse

Page 24: Using geometric information in Euclidean graph algorithms Paul Bouman Seminar Graph Drawing 17-10-2007.

Most Eccentric Ellipse

Page 25: Using geometric information in Euclidean graph algorithms Paul Bouman Seminar Graph Drawing 17-10-2007.

Single Point Insertion

Test each point in the tour between each consecutive pair and see if the solution improves

Start again when an improved tour is found Methods aren’t optimal: tours with crossings

can be generated

Page 26: Using geometric information in Euclidean graph algorithms Paul Bouman Seminar Graph Drawing 17-10-2007.

Performance

Page 27: Using geometric information in Euclidean graph algorithms Paul Bouman Seminar Graph Drawing 17-10-2007.

Performance

Page 28: Using geometric information in Euclidean graph algorithms Paul Bouman Seminar Graph Drawing 17-10-2007.

Special Cases of TSPs

Pyramidally solvable TSP cases A tour φ = (1, i1, i2, …, ir, n, j1, j2, … jn-r-2) is

pyramidal if i1<i2<…<ir and j1>j2>…> jn-r-2

The number of pyramidal tours is exponential in n The minimum cost pyramidal tour can be found in

O(n2) time

Page 29: Using geometric information in Euclidean graph algorithms Paul Bouman Seminar Graph Drawing 17-10-2007.

Special Cases of TSPs

Symmetric Demidenko Matrices ci,j + cj+1,l ≤ ci,j+1 + cj,l for all 1≤i<j< j+1<l ≤ n

Symetric Kalmanson Matrices ci,j + ck,l ≤ ci,k + cj,l for all 1≤i<j<k<l≤n

ci,l + cj,k ≤ ci,k + cj,l for all 1≤i<j<k<l ≤n

Page 30: Using geometric information in Euclidean graph algorithms Paul Bouman Seminar Graph Drawing 17-10-2007.

Special Cases of TSPs

Page 31: Using geometric information in Euclidean graph algorithms Paul Bouman Seminar Graph Drawing 17-10-2007.

Special Cases of TSPs

The k-line TSP has cities on k (almost) parallel lines.

Cutler created an O(n3) time and O(n2) space algorithm for the k=3 case

Rote generalized this to O(nk) time Convex Hull and Line: O(n2) time and O(n)

space Open problem: x-and-y axes TSP

Page 32: Using geometric information in Euclidean graph algorithms Paul Bouman Seminar Graph Drawing 17-10-2007.

Special Cases of TSPs

Page 33: Using geometric information in Euclidean graph algorithms Paul Bouman Seminar Graph Drawing 17-10-2007.

Conclusion

In euclidean space, some graph problems can be solved more easily

Shortest Path problems can be solved most efficiently by layering techniques

TSP problems in the plane can be solved to a rather good extend using geometric notions

Some special cases of TSP problems can be solved in polynomial time

Page 34: Using geometric information in Euclidean graph algorithms Paul Bouman Seminar Graph Drawing 17-10-2007.

Bibliography [1] Heuristic shortest path algorithms for transportation

applications: State of the art, L. Fu, D. Sun, L.R. Rilett (1995) [2] Hoorcollegeslides Zoekalgoritmen, Linda van der Gaag

http://www.cs.uu.nl/docs/vakken/za/college3.pdf [3] Heuristic for the Hamiltonian Path Problem in Euclidian

Two Space, J. P. Norback; R. F. Love (1979) [4] Well-solvable special cases of the traveling salesman

problem: a survey, Rainer E. Burkard, Vladimir G. Deineko, René van Dal, Jack A. A. van der Veen, Gerhard J. Woeginger (1998)

[5] Geometric approaches to solving the traveling salesman problem, John P. Norback, Robert F. Love (1977)