facility location
play

Facility location Given a set P of n sites in the plane, find the - PowerPoint PPT Presentation

Facility location Given a set P of n sites in the plane, find the point c that minimises the distance r to the furthest point(s) of P Facility location Given a set P of n sites in the plane, find the point c that minimises the distance r to the


  1. Facility location Given a set P of n sites in the plane, find the point c that minimises the distance r to the furthest point(s) of P

  2. Facility location Given a set P of n sites in the plane, find the point c that minimises the distance r to the furthest point(s) of P r c r r

  3. Facility location Given a set P of n sites in the plane, find the point c that minimises the distance r to the furthest point(s) of P r c r r

  4. Smallest enclosing circles Given a set P of n points in the plane, find the smallest circle C ( P ) that contains all points of P

  5. Smallest enclosing circles Given a set P of n points in the plane, find the smallest circle C ( P ) that contains all points of P C ( P ) is either a circle defined by a set S ⊆ P of three points on the boundary, or a circle defined by a set S ⊆ P of two diametrically opposite points

  6. Smallest enclosing circles Given a set P of n points in the plane, find the smallest circle C ( P ) that contains all points of P C ( P ) is either a circle defined by a set S ⊆ P of three points on the boundary, or a circle defined by a set S ⊆ P of two diametrically opposite points Why not more than three points? Why not less than two points? Why not two points that are not diametrically opposite?

  7. Smallest enclosing circles Given a set P of n points in the plane, find the smallest circle C ( P ) that contains all points of P C ( P ) is either a circle defined by a set S ⊆ P of three points on the boundary, or a circle defined by a set S ⊆ P of two diametrically opposite points Why not more than three points? Three points define a unique circle Why not less than two points? Why not two points that are not diametrically opposite?

  8. Smallest enclosing circles Given a set P of n points in the plane, find the smallest circle C ( P ) that contains all points of P C ( P ) is either a circle defined by a set S ⊆ P of three points on the boundary, or a circle defined by a set S ⊆ P of two diametrically opposite points Why not more than three points? Three points define a unique circle Why not less than two points? Could make circle smaller until there are two Why not two points that are not diametrically opposite?

  9. Smallest enclosing circles Given a set P of n points in the plane, find the smallest circle C ( P ) that contains all points of P C ( P ) is either a circle defined by a set S ⊆ P of three points on the boundary, or a circle defined by a set S ⊆ P of two diametrically opposite points Why not more than three points? Three points define a unique circle Why not less than two points? Could make circle smaller until there are two Why not two points that are not diametrically opposite?

  10. Smallest enclosing circles Given a set P of n points in the plane, find the smallest circle C ( P ) that contains all points of P C ( P ) is either a circle defined by a set S ⊆ P of three points on the boundary, or a circle defined by a set S ⊆ P of two diametrically opposite points Why not more than three points? Three points define a unique circle Why not less than two points? Could make circle smaller until there are two Why not two points that are not diametrically opposite?

  11. Smallest enclosing circles Given a set P of n points in the plane, find the smallest circle C ( P ) that contains all points of P C ( P ) is either a circle defined by a set S ⊆ P of three points on the boundary, or a circle defined by a set S ⊆ P of two diametrically opposite points Why not more than three points? Three points define a unique circle Why not less than two points? Could make circle smaller until there are two Why not two points that are not diametrically opposite? Smaller again

  12. Smallest enclosing circles Given a set P of n points in the plane, find the smallest circle C ( P ) that contains all points of P C ( P ) is either a circle defined by a set S ⊆ P of three points on the boundary, or a circle defined by a set S ⊆ P of two diametrically opposite points Trivial algorithm: for all Θ( n 3 ) pairs and triples of points that define a circle, test if all other Θ( n ) points lie inside; choose the smallest circle that passes the test → Θ( n 4 ) time

  13. Smallest enclosing circles: an incremental algorithm Algorithm SEC ( P, n ) Input: an array P with points in the plane; a number n ≥ 2 Output: the smallest circle that contains all points of P [1 ..n ] C ← circle defined by P [1] and P [2] for i ← 3 to n do if P [ i ] lies in C then be happy and continue else C ← the smallest enclosing circle of P [1 ..i ] return C 3 7 6 2 4 5 1 8

  14. Smallest enclosing circles: an incremental algorithm Algorithm SEC ( P, n ) Input: an array P with points in the plane; a number n ≥ 2 Output: the smallest circle that contains all points of P [1 ..n ] C ← circle defined by P [1] and P [2] for i ← 3 to n do if P [ i ] lies in C then be happy and continue else C ← the smallest enclosing circle of P [1 ..i ] return C 3 7 6 2 4 5 1 8

  15. Smallest enclosing circles: an incremental algorithm Algorithm SEC ( P, n ) Input: an array P with points in the plane; a number n ≥ 2 Output: the smallest circle that contains all points of P [1 ..n ] C ← circle defined by P [1] and P [2] for i ← 3 to n do if P [ i ] lies in C then be happy and continue else C ← the smallest enclosing circle of P [1 ..i ] return C 3 7 6 2 4 5 1 8

  16. Smallest enclosing circles: an incremental algorithm Algorithm SEC ( P, n ) Input: an array P with points in the plane; a number n ≥ 2 Output: the smallest circle that contains all points of P [1 ..n ] C ← circle defined by P [1] and P [2] for i ← 3 to n do if P [ i ] lies in C then be happy and continue else C ← the smallest enclosing circle of P [1 ..i ] return C 3 7 6 2 4 5 1 8

  17. Smallest enclosing circles: an incremental algorithm Algorithm SEC ( P, n ) Input: an array P with points in the plane; a number n ≥ 2 Output: the smallest circle that contains all points of P [1 ..n ] C ← circle defined by P [1] and P [2] for i ← 3 to n do if P [ i ] lies in C then be happy and continue else C ← the smallest enclosing circle of P [1 ..i ] return C 3 7 6 2 4 5 1 8

  18. Smallest enclosing circles: an incremental algorithm Algorithm SEC ( P, n ) Input: an array P with points in the plane; a number n ≥ 2 Output: the smallest circle that contains all points of P [1 ..n ] C ← circle defined by P [1] and P [2] for i ← 3 to n do if P [ i ] lies in C then be happy and continue else C ← the smallest enclosing circle of P [1 ..i ] return C 3 7 6 2 4 5 1 8

  19. Smallest enclosing circles: an incremental algorithm Algorithm SEC ( P, n ) Input: an array P with points in the plane; a number n ≥ 2 Output: the smallest circle that contains all points of P [1 ..n ] C ← circle defined by P [1] and P [2] for i ← 3 to n do if P [ i ] lies in C then be happy and continue else C ← the smallest enclosing circle of P [1 ..i ] return C 3 7 6 2 4 5 1 8

  20. Smallest enclosing circles: an incremental algorithm Algorithm SEC ( P, n ) Input: an array P with points in the plane; a number n ≥ 2 Output: the smallest circle that contains all points of P [1 ..n ] C ← circle defined by P [1] and P [2] for i ← 3 to n do if P [ i ] lies in C then be happy and continue else C ← the smallest enclosing circle of P [1 ..i ] return C 3 7 6 2 4 5 1 8

  21. Smallest enclosing circles: an incremental algorithm Algorithm SEC ( P, n ) Input: an array P with points in the plane; a number n ≥ 2 Output: the smallest circle that contains all points of P [1 ..n ] C ← circle defined by P [1] and P [2] for i ← 3 to n do if P [ i ] lies in C then be happy and continue else C ← the smallest enclosing circle of P [1 ..i ] return C 3 7 6 2 4 5 1 8

  22. Smallest enclosing circles: an incremental algorithm Algorithm SEC ( P, n ) Input: an array P with points in the plane; a number n ≥ 2 Output: the smallest circle that contains all points of P [1 ..n ] C ← circle defined by P [1] and P [2] for i ← 3 to n do if P [ i ] lies in C then be happy and continue else C ← the smallest enclosing circle of P [1 ..i ] return C 3 7 6 2 4 5 1 8

  23. Smallest enclosing circles: an incremental algorithm Algorithm SEC ( P, n ) Input: an array P with points in the plane; a number n ≥ 2 Output: the smallest circle that contains all points of P [1 ..n ] C ← circle defined by P [1] and P [2] for i ← 3 to n do if P [ i ] lies in C then be happy and continue else C ← the smallest enclosing circle of P [1 ..i ] return C 3 7 6 2 4 5 1 8

  24. Smallest enclosing circles: an incremental algorithm Algorithm SEC ( P, n ) Input: an array P with points in the plane; a number n ≥ 2 Output: the smallest circle that contains all points of P [1 ..n ] C ← circle defined by P [1] and P [2] for i ← 3 to n do if P [ i ] lies in C then be happy and continue else C ← the smallest enclosing circle of P [1 ..i ] with P [ i ] on boundary return C 3 7 6 2 4 5 1 8

  25. Smallest enclosing circles: an incremental algorithm Algorithm SEC ( P, n ) Input: an array P with points in the plane; a number n ≥ 2 Output: the smallest circle that contains all points of P [1 ..n ] C ← circle defined by P [1] and P [2] for i ← 3 to n do if P [ i ] lies in C then be happy and continue else C ← the smallest enclosing circle of P [1 ..i ] with P [ i ] on boundary return C Why does this work? (sketch) 3 7 SEC ( P, i ) is defined by some set S ⊆ P [1 ..i ] 6 on the boundary of SEC ( P, i ) ; | S | ≤ 3 . 2 4 P [ i ] / ∈ S → SEC ( P, i ) = SEC ( P, i − 1) 5 1 8

Recommend


More recommend