Introduction to Geomtric Computing - PowerPoint PPT Presentation

1 / 63
About This Presentation
Title:

Introduction to Geomtric Computing

Description:

xk yk 1. where (xi yi ) are the x- and y-coordinates of vi ... Coloring of a Graph ... Theorem: In a 3-coloring of a triangulation of a simple polygon with N vertices, ... – PowerPoint PPT presentation

Number of Views:28
Avg rating:3.0/5.0
Slides: 64
Provided by: prit49
Category:

less

Transcript and Presenter's Notes

Title: Introduction to Geomtric Computing


1
Introduction to Geomtric Computing
  • D. T. Lee
  • Institute of Information Science
  • Academia Sinica
  • October 14, 2002

2
What is Computer Science about?
  • Not about programming
  • But about problem solving
  • Basic disciplinary areas include
  • Software Programming-related
  • Hardware-related
  • Computer systems
  • Theory
  • Mathematics of computer science
  • Applications
  • etc.

3
MinMax Problem 4
  • MinMax Problem
  • Input A set S of N numbers on the real line
  • Output The Minimum and Maximum of S
  • Simple method Finding the min. or max. of N
    numbers requires N-1 comparisons.
  • Reduce MinMax to 2 Min or Max problems!

4
MinMax Problem 3
5
MinMax Problem 2
  • But finding both Maximun and Minimum can be done
    with ? 3N/2 ? ? 2 comparisons

6
MinMax Problem 1
7
Sorting Problem
  • Sorting N numbers
  • Simple method find Min repeatedly
  • (N-1) (N-2) 2 1 (N-1)N/2
  • Selection method
  • Smallest can be found in (N-1) comparisons
  • 2nd smallest found in log2 N additional comp.
  • 3rd smallest found in log2 N additional comp.

8
Knockout Tournament
min
Total number of matches for 8 competitors is
7 N/2 N/4 4 2 1 N-1
Total number of rounds is log2 N
9
Geometric Computing
  • Design and Analysis of Algorithms for geometric
    problems
  • Theory Computational Complexities
  • Time, Space, Degree
  • Lower and Upper Bounds of Computation
  • Applications
  • VLSI CAD, Computer-Aided Geometric Design,
    Computer Graphics, Operations Research, Pattern
    Recognition, Robotics, Geographical Information
    Systems, Statistics, Cartography, Metrology, etc.

10
Theory of Computation
  • Models of Computation
  • Real arithmetic, RAM
  • Computation Tree Model - Unit Cost
  • Off-line, On-line, Real-time
  • Parallel Computation vs Serial Computation
  • Problem Complexity vs Algorithm Complexity
  • Decision vs Computation Problems
  • Output Sensitive Algorithms

11
Checking if a Polygon is Convex 4
  • A polygon P is represented by a sequence of
    points v0,v1,v2, ,vn-1 where (vi, vi1) is an
    edge, i0,1,..,n-1, vn v0.
  • Theorem A polygon P is convex if segments
    connecting any two points inside the polygon
    always lie inside P.

12
Checking if a Polygon is Convex 3
Problem There are infinitely many
possible Segments to check!
13
Checking if a Polygon is Convex 2
  • Theorem A polygon is convex if every diagonal
    lies inside the polygon.
  • It takes O(N3) time to check O(N2) diagonals
    against every edge of P.
  • Very inefficient!
  • Theorem A polygon is convex if every interior
    angle of each vertex is less than 180o.
  • This result would imply an O(N) time algorithm!

14
Checking if a Polygon is Convex1
Consider three vertices vi,vj,vk and determinant
where (xi yi ) are the x- and y-coordinates
of vi
det(vi,vj,vk ) gt 0 when vi,vj,vk form a left turn
det(vi,vj,vk ) 0 when vi,vj,vk are collinear
det(vi,vj,vk ) lt 0 when vi,vj,vk form a right turn
15
Checking if a Polygon is Simple
v0
v3
v1
v5
v4
v2
How do you check if the input polygon is simple??
16
Art Gallery Problem
  • Consider an art gallery room whose floor plan is
    modeled by a simple polygon with N sides.
  • How many stationary guards are needed to guard
    the room?
  • Assumption Each guard is considered to have 360o
    unlimited visibility.
  • Two points p and q are said to be visible to each
    other, if the line segment (p,q) does not
    intersect any edge of the polygon.

17
Art Gallery Problem
p and q are visible
r and q are not visible
18
Art Gallery Problem
Visibility polygon of q r
19
Art Gallery Theorem
  • Theorem Given a simple polygon with N sides,
    stationary guards are sufficient, and
    sometimes necessary to cover the entire polygon.

Theorem Given a simple polygon with N sides, the
problem of finding a minimum number of stationary
guards to cover the entire polygon is
intractable.
20
Lower Bound of Art Gallery Problem
A comb with 8 prongs (N24) requires ?N/3? 8
guards
21
Upper Bound of Art Gallery Problem
Triangulation of a Simple Polygon
22
Coloring of a Graph
  • Coloring of a graph an assignment of colors to
    nodes of the graph such that no two adjacent
    nodes are assigned the same color.
  • Chromatic number The minimum number of colors
    required to color a graph.
  • Theorem Every triangulation of a simple polygon
    is 3-colorable.

23
Art Gallery Problem Example
Select red color to place guards 3 ?
?N/3? 4
24
Art Gallery Theorem
  • Theorem In a 3-coloring of a triangulation of a
    simple polygon with N vertices, there exists a
    color that is used no more than ?N/3? times.
  • Proof Pigeon-hole principle
  • If n pigeons are placed into k pigeon-holes, at
    least one of the holes must have no more than n/k
    pigeons.
  • Since N is an integer, there exists at least one
    color that is used in no more than ?N/3? times.

25
Variations of Art Gallery Problem
  • Shapes of Art Gallery
  • Rectilinear polygon
  • Polygon with holes
  • Capabilities of Guard
  • Mobile guards moving along a track
  • Guards with limited visibility (angle and
    distance)

26
Rectilinear Polygon
27
Polygons with Holes
28
Guard Capabilities
29
Map Coloring 2
  • Given a planar graph (planar map), find a
    coloring of the regions so that no two adjacent
    regions are assigned the same color.
  • How many colors are sufficient?
  • 4-color theorem!
  • Find an algorithm that colors the map.

30
Map Coloring 1
31
Proximity
  • Closest Pair Problem Consider N points in the
    plane, find the pair of points whose Euclidean
    distance is the smallest.
  • Brute force Enumerate all N2 pairwise distances
    and find the minimum.
  • Can one do better?

32
Closet Pair on the Real Line
  • Consider N numbers x0, x1, x2, , xn-1 on the
    real line, find the two numbers xi and xj such
    that xi xj is the smallest.
  • Lemma The two numbers xi and xj such that xi
    xj is the smallest must be adjacent to each
    other, when these numbers are sorted.

33
Closest Pair in the Plane
34
Voronoi Diagram
35
Closest Pair Problem
  • Theorem Given N points in k-dimensional space,
    the closest pair of points can be determined in
    O(N log N) time, which is asymptotically optimal.

36
Geometric Optimization
  • Shortest Path Problem
  • Given a polygonal domain (obstacles), and two
    points s and t, find a shortest path between s
    and t avoiding these obstacles.
  • Homotopic Routing
  • Given a layout and the homotopy of k 2-terminal
    nets, find a detailed routing of minimum wire
    length.

37
Homotopic Routing
  • Input A sketch S(F, M, W), a planar drawing of
    a physical layout of modules M in the grid and a
    finite set W of nets connecting point features F,
    each represented by a vertex-disjoint simple
    path.
  • Output A detailed routing on the grid without
    overlapping of these nets of minimum total length
    among those that are homotopic to the given
    sketch.
  • Net p is homotopic to net q, if they have the
    same terminals, and one can be transformed
    continuously into the other without crossing
    features.

38
(No Transcript)
39
(No Transcript)
40
(No Transcript)
41
After Compaction
42
Topological Via Minimization 4
  • Given a set of n 2-terminal nets in a two-layer
    bounded routing region, find a layer assignment
    of wire segments so as to minimize the number of
    vias used.

layer1
layer2
via
43
Topological Via Minimization 3
of Vias 4
of Vias 1
44
Topological Via Minimization 2
of Vias 1
45
Topological Via Minimization 1
  • Lemma There exists an optimal solution to the
    two-layer bounded region TVM problem such that
    each net uses at most one via.

46
Circle Graph 2
  • Definition A set of chords is said to be
    2-independent if it can be partitioned into two
    subsets of independent chords

47
Circle Graph 1
  • Theorem Given n chords in a circle and an
    integer k, the problem of deciding if there
    exists a 2-independent set of chords of size k or
    more (2-independent set in circle graphs) is
    NP-complete.
  • Proof (Sketch)
  • The 2-independent set problem is in NP.
  • Planar 3SAT is polynomially reducible to the
    2-independent set problem.

48
2-Independent Set Problem
  • Circle graphs
  • Given n chords in a circle, find a 2-
    independent set of chords of maximum cardinality.

NP-hard
O(n log n) time
  • Permutation graphs
  • Given n chords in a two-sided channel in
    which each chord connects one point in each side,
    find a 2-independent set of chords of maximum
    cardinality.

49
Permutation Graph
50
Geometric Optimization
  • Minimum Covering
  • Given a set of N points, find the smallest disk
    covering the entire set.
  • Smallest enclosing circle, rectangle, square,
    annulus, parallel strip, etc.
  • P-center problem
  • minimum covering with fixed-size disk,
    square,etc.
  • weighted version

51
Minimum Covering 3
  • 1-center problem (smallest circle)

52
Minimum Covering 2
  • 1-center problem (smallest rectangle)

53
Minimum Covering 1
  • p-center problem (fixed-size disk covering)

54
Matching 2
  • Pattern matching Given a target pattern P, and A
    test pattern Q, find if Q is a sub-pattern in P.

55
Matching 1
56
Inexact Matching
57
Bipartite Matching
  • Bi-chromatic matching Given two sets, P and Q of
    points, find a one-to-one mapping such that the
    sum of distances of matched pairs of points is
    minimized.

58
Searching
  • Searching Problems
  • Given a set S of objects (points, line segments,
    etc.), determine if there exists any object with
    certain properties.
  • Given a set S of objects, report objects that
    satisfy certain properties.
  • With preprocessing allowed, how fast can we find
    objects in S satisfying certain properties?
  • What if S is subject to updates?
  • Memory requirement, query time, update time

59
Searching and Retrieval
  • Exact Match (membership problem)
  • Given a set S of objects pi(x1,x2,,, xn), is
    (q1,q2,,, qn) in S?
  • Range Search
  • Given a set S of objects pi(x1,x2,,, xn),
    find those whose xk lies within a range interval
    qk1,qk2 for each k1,2,..,n.
  • In 2D, the problem is solvable in O(log2 N K)
    optimal time
  • In higher dimensions, it is solvable in O((log2
    N)d-1 K) time, where K is the output size.

60
Example of Range Search
61
Conclusion
  • Computer Science is a discipline addressing
    areas ranging from theory to applications.
  • Mathematics is a fundamental to theoretical
    computer science.
  • Geometric computing is a very rich area with many
    applications
  • Cryptography (one-way function, security)
  • Number theory, combinatorics
  • Packing Problem, Trapezoid Problem, etc.

62
Trapezoid Construction Problem
c
Given d, b, e, f construct a trapezoid as shown
Given a,c, e, f construct a trapezoid as
shown Solved.
63
The End
  • Thank you for your attention!
Write a Comment
User Comments (0)
About PowerShow.com