A Study on Uniform Insertion of Pointsrnshah/btpthesis.pdfCERTIFICATE This is to certify that the...

55
A Study on Uniform Insertion of Points Shah Rushin Navneet

Transcript of A Study on Uniform Insertion of Pointsrnshah/btpthesis.pdfCERTIFICATE This is to certify that the...

Page 1: A Study on Uniform Insertion of Pointsrnshah/btpthesis.pdfCERTIFICATE This is to certify that the thesis entitled A Study on Uniform Insertion of Points, submitted by Shah Rushin Navneet,

A Study onUniform Insertion of Points

Shah Rushin Navneet

Page 2: A Study on Uniform Insertion of Pointsrnshah/btpthesis.pdfCERTIFICATE This is to certify that the thesis entitled A Study on Uniform Insertion of Points, submitted by Shah Rushin Navneet,
Page 3: A Study on Uniform Insertion of Pointsrnshah/btpthesis.pdfCERTIFICATE This is to certify that the thesis entitled A Study on Uniform Insertion of Points, submitted by Shah Rushin Navneet,

A Study onUniform Insertion of Points

A Thesis Submitted in Partial Fulfillment of the Requirements

for the Degree of

Bachelor of Technologyin

Computer Science and Engineering

by

Shah Rushin Navneet

03CS3012

under the guidance of

Dr. Arijit Bishnu

Department of Computer Science and EngineeringIndian Institute of Technology

KharagpurNovember, 2007

Page 4: A Study on Uniform Insertion of Pointsrnshah/btpthesis.pdfCERTIFICATE This is to certify that the thesis entitled A Study on Uniform Insertion of Points, submitted by Shah Rushin Navneet,
Page 5: A Study on Uniform Insertion of Pointsrnshah/btpthesis.pdfCERTIFICATE This is to certify that the thesis entitled A Study on Uniform Insertion of Points, submitted by Shah Rushin Navneet,

CERTIFICATE

This is to certify that the thesis entitled A Study on Uniform Insertion of

Points, submitted by Shah Rushin Navneet, to the department of Computer Sci-

ence and Engineering in partial fulfillment for the award of the degree of Bachelor of

Technology, is a bonafide record of work carried out by him under my supervision

and guidance. The thesis has fulfilled all the requirements as per the regulations of

this institute and, in my opinion, has reached the standard needed for submission.

Dr. Arijit Bishnu

Dept. of Computer Science & Engg.

Indian Institute of Technology,

Kharagpur — 721302, INDIA.

November, 2007.

i

Page 6: A Study on Uniform Insertion of Pointsrnshah/btpthesis.pdfCERTIFICATE This is to certify that the thesis entitled A Study on Uniform Insertion of Points, submitted by Shah Rushin Navneet,
Page 7: A Study on Uniform Insertion of Pointsrnshah/btpthesis.pdfCERTIFICATE This is to certify that the thesis entitled A Study on Uniform Insertion of Points, submitted by Shah Rushin Navneet,

Acknowledgments

I would like to thank my advisor Dr. Arijit Bishnu for his guidance and support. I alsowish to thank Dr. Abhijit Das and Dr. Indranil Sengupta. Finally, my sincere thanksto all the faculty members of the Department of Computer Science & Engineering atIIT Kharagpur.

Shah Rushin NavneetDepartment of Computer Science and Engineering

Indian Institute of TechnologyKharagpur 721302, India

November, 2007

Page 8: A Study on Uniform Insertion of Pointsrnshah/btpthesis.pdfCERTIFICATE This is to certify that the thesis entitled A Study on Uniform Insertion of Points, submitted by Shah Rushin Navneet,
Page 9: A Study on Uniform Insertion of Pointsrnshah/btpthesis.pdfCERTIFICATE This is to certify that the thesis entitled A Study on Uniform Insertion of Points, submitted by Shah Rushin Navneet,

Abstract

A frequently used measure of uniformity of point sets is the minimum pairwisedistance, i.e. the minimum gap of these points. However, the problem with thismetric is that it does not take into account the effects of large empty areas. Weconsider a measure called gap ratio, which is defined as the ratio of the maximumgap between the given points to their minimum gap, where maximum gap is definedas the radius of the largest empty circle that can be drawn in the region containingthe given points. Since gap ratio takes into account maximum as well as minimumgap, it is a more accurate measure of uniformity. The off-line version of the Gap RatioProblem involves finding a set of points in a unit square such that their gap ratiois minimized, while the on-line version of the problem involves finding a sequenceof points such that at every step of this sequence, the gap ratio is minimized. Wefirst prove a lower bound on the gap ratio. Next, we present a simulated annealingalgorithm that can produce solutions of either the on-line or the off-line version ofthis problem. For cases from n = 2 to n = 10 points, we present better solutionsof the on-line version of the problem than those obtained by existing approaches.We also present solutions of the off-line version which approach the theoretical lowerbound of the Gap Ratio. Finally, we present a proof of the NP-Completeness of theoptimization version of this problem.

v

Page 10: A Study on Uniform Insertion of Pointsrnshah/btpthesis.pdfCERTIFICATE This is to certify that the thesis entitled A Study on Uniform Insertion of Points, submitted by Shah Rushin Navneet,
Page 11: A Study on Uniform Insertion of Pointsrnshah/btpthesis.pdfCERTIFICATE This is to certify that the thesis entitled A Study on Uniform Insertion of Points, submitted by Shah Rushin Navneet,

Contents

1 Introduction 1

2 Existing Approaches 32.1 Voronoi Insertion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32.2 Hill Climbing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

3 Lower Bound on Gap Ratio 7

4 A Simulated Annealing Based Approach 94.1 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94.2 Theory of Simulated Annealing . . . . . . . . . . . . . . . . . . . . . 94.3 Results for Off-line Version . . . . . . . . . . . . . . . . . . . . . . . . 124.4 Results for On-line Version . . . . . . . . . . . . . . . . . . . . . . . . 22

5 NP-Completeness of The Optimization Version 335.1 Construction: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345.2 Theorems: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

6 Conclusion 37

vii

Page 12: A Study on Uniform Insertion of Pointsrnshah/btpthesis.pdfCERTIFICATE This is to certify that the thesis entitled A Study on Uniform Insertion of Points, submitted by Shah Rushin Navneet,
Page 13: A Study on Uniform Insertion of Pointsrnshah/btpthesis.pdfCERTIFICATE This is to certify that the thesis entitled A Study on Uniform Insertion of Points, submitted by Shah Rushin Navneet,

List of Figures

2.1 Triangulation for Voronoi Insertion . . . . . . . . . . . . . . . . . . . 3

3.1 Packing and Covering for Hexagon . . . . . . . . . . . . . . . . . . . 8

4.1 n = 2, rP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134.2 n = 3, rP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144.3 n = 4, rP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154.4 n = 5, rP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164.5 n = 6, rP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174.6 n = 7, rP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184.7 n = 8, rP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194.8 n = 9, rP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204.9 n = 10, rP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214.10 n = 2, RP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234.11 n = 3, RP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244.12 n = 4, RP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254.13 n = 5, RP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264.14 n = 6, RP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274.15 n = 7, RP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284.16 n = 8, RP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294.17 n = 9, RP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304.18 n = 10, RP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

ix

Page 14: A Study on Uniform Insertion of Pointsrnshah/btpthesis.pdfCERTIFICATE This is to certify that the thesis entitled A Study on Uniform Insertion of Points, submitted by Shah Rushin Navneet,
Page 15: A Study on Uniform Insertion of Pointsrnshah/btpthesis.pdfCERTIFICATE This is to certify that the thesis entitled A Study on Uniform Insertion of Points, submitted by Shah Rushin Navneet,

List of Tables

2.1 Results of Hill Climbing . . . . . . . . . . . . . . . . . . . . . . . . . 4

4.1 Off-line Results of Simulated Annealing . . . . . . . . . . . . . . . . . 124.2 On-line Results of Simulated Annealing . . . . . . . . . . . . . . . . . 22

xi

Page 16: A Study on Uniform Insertion of Pointsrnshah/btpthesis.pdfCERTIFICATE This is to certify that the thesis entitled A Study on Uniform Insertion of Points, submitted by Shah Rushin Navneet,
Page 17: A Study on Uniform Insertion of Pointsrnshah/btpthesis.pdfCERTIFICATE This is to certify that the thesis entitled A Study on Uniform Insertion of Points, submitted by Shah Rushin Navneet,

Chapter 1

Introduction

A frequently used measure of uniformity of distribution of points in a unit square isthe minimum pairwise distance of these points. Arranging n points in a square insuch a way that this distance is maximized is equivalent to the circle packing prob-lem, i.e. placing n equal and non-overlapping circles of maximum radius possible ina unit square. However, the minimum pairwise distance is not ideal as a measure ofthe uniformity of points, since it does not take into account large empty areas. Weconsider a measure called gap ratio, which is based on maximum gap (diameter oflargest empty circle that can fit in the square) as well as minimum gap (minimumpairwise distance). We will now define gap ratio formally.

Let Sd = [0, 1]d be a unit cube in d-dimensional space Rd. Consider an n pointsequence P = (p1, p2, . . . pn) in Sd. Also, let S0 denote the 2d corner points of Sd, anddefine Si = (p1, p2, . . . pi) ∪ S0. Now, the minimum gap gi is defined as the minimumpairwise distance in Si, where i ≤ n

gi =min d(p, q) where p, q ∈ Si, p �= q

The maximum gap Gi is defined as the diameter of the largest empty circle of thepoints in set Si. The maximum empty circle is centered at a Voronoi vertex [?], andis simply one of the O(n) maximum empty circles of the Voronoi diagram. It canbe obtained by calculating the Delaunay triangulation of Si and taking the diame-ter of the largest circle that can be circumscribed around any face of the triangulation.

The gap ratio ri for Pi is defined as ri = Gi/gi. We will refer to the gap ratiorn = Gn/gn for P = Pn as the off-line gap ratio rP of the point sequence P. LetRP =max(r1, r2, . . . rn). We will refer to RP as the on-line gap ratio of the pointsequence P.

1

Page 18: A Study on Uniform Insertion of Pointsrnshah/btpthesis.pdfCERTIFICATE This is to certify that the thesis entitled A Study on Uniform Insertion of Points, submitted by Shah Rushin Navneet,

2 1. Introduction

Thus there are two versions of the Gap Ratio Problem. Let us state both of these:

Off-line VersionGiven dimension d and integer n, we want to find an n-point sequence P whichachieves the optimal Offline Gap Ratio rP .

On-line VersionGiven dimension d and integer n, we want to find an n-point sequence P whichachieves the optimal Online Gap Ratio RP .

We now have an adequate formal definition of the Gap Ratio Problem. We willonly consider the case d = 2, i.e. minimizing Gap Ratio while inserting points into aunit square, in this thesis.

In addition, there is also an optimization version of this problem, which can bedefined as follows:

Optimization VersionGiven a set SN ={p1, p2, . . . pN} of N points and a positive real m, choose a setSn ⊆ SN where Sn has n points and rSn ≤ m.

The remainder of this thesis is organized as follows. In Chapter 2, we reviewexisting approaches to solve the on-line version of the problem and the quality of thesolutions obtained by these approaches. In Chapter 3, we prove a lower bound forthe gap ratio of points in a unit square. Chapters 4 and 5 form the heart of thisthesis; in Chapter 4, we present our simulated annealing algorithm, which includessome changes as compared to basic simulated annealing. We also present the resultsof our algorithm, and we show that it achieves better solutions than those obtainedby existing approaches for the cases n = 2 to n = 10. In Chapter 5, we present aproof of the NP-Completeness of the optimization version of this problem. Finally, inChapter 6, we conclude our thesis and discuss related problems and possible futuredirections of research in this area.

Page 19: A Study on Uniform Insertion of Pointsrnshah/btpthesis.pdfCERTIFICATE This is to certify that the thesis entitled A Study on Uniform Insertion of Points, submitted by Shah Rushin Navneet,

Chapter 2

Existing Approaches

Existing literature [?, ?] considers two approaches to insertion of points in a unitsquare that try to minimize the on-line gap ratio.

2.1 Voronoi Insertion

Figure 2.1: Triangulation for Voronoi Insertion

This is a greedy algorithm that provides an incremental insertion of points. Westart with the four corners of the unit square making up our initial set of points. Atevery iteration, we maintain a Voronoi diagram of the points inserted thus far. Atevery iteration, the candidates for the next insertion are the Voronoi vertices of theprevious iteration and the points where the Voronoi edges intersect the unit squarein the Voronoi diagram of the previous iteration. We insert the point at one of these

3

Page 20: A Study on Uniform Insertion of Pointsrnshah/btpthesis.pdfCERTIFICATE This is to certify that the thesis entitled A Study on Uniform Insertion of Points, submitted by Shah Rushin Navneet,

4 2. Existing Approaches

candidate points which is farthest from its neighbouring site point.

In other words, this algorithm inserts a point in the center of the maximum emptycircle, with the aim of reducing at every iteration i, the maximum gap Gi.

When points are inserted into a unit square accoring to this algorithm, the off-linegap ratios at each step of insertion form the following sequence:

√2, 2, 2, 2,

√2, 2, 2, 2,

√2, 2, 2, 2 . . .

Thus this algorithm achieves an on-line gap ratio no worse than 2, i.e. RP ≤ 2.

2.2 Hill Climbing

This is a heuristic algorithm presented in a paper by S. Teramoto et al. [?]. Theytreat every point sequence P = (p1, p2, . . . pn) as a point (x1, y1, x2, y2, . . . xn, yn) inthe 2n-dimensional space R2n. They start with a randomly generated point sequence,and try to converge by local search, i.e. hill climbing, to a point sequence that givesa local minima of on-line gap ratio. Their best case results for the cases n = 2 ton = 8 points are displayed in Table 2.1:

n RP

2 1.878043 1.927164 1.9271645 1.927166 1.9272037 1.992138 2.009731

Table 2.1: Results of Hill Climbing

Thus for point sequence sizes up to n = 7, this method manages to achieve on-line gap ratios ≤ 2. However, it doesn’t achieve that for n = 8, and for cases beyondn = 8, this method takes too much time and becomes computationally infeasible [?].

Page 21: A Study on Uniform Insertion of Pointsrnshah/btpthesis.pdfCERTIFICATE This is to certify that the thesis entitled A Study on Uniform Insertion of Points, submitted by Shah Rushin Navneet,

2.2. Hill Climbing 5

In the next section, we describe our approach to solve this problem, based on sim-ulated annealing. Our method manages to achieve better gap ratios for all these casesexcept n = 6, where we obtain a gap ratio of 1.93786, which is only marginally worsethan that obtained by hill climbing. Our method also computes gap ratios ≤ 2 for thecases n = 8, 9, 10. In addition, our method has the advantage of being quite fast andscalable, and it manages to achieve decent point sequences even for cases up to n = 50.

Page 22: A Study on Uniform Insertion of Pointsrnshah/btpthesis.pdfCERTIFICATE This is to certify that the thesis entitled A Study on Uniform Insertion of Points, submitted by Shah Rushin Navneet,
Page 23: A Study on Uniform Insertion of Pointsrnshah/btpthesis.pdfCERTIFICATE This is to certify that the thesis entitled A Study on Uniform Insertion of Points, submitted by Shah Rushin Navneet,

Chapter 3

Lower Bound on Gap Ratio

We present a proof that the off-line gap ratio for any point sequence P = (p1, p2, . . . pn)has a lower bound of 2/

√3. This proof was first described in [?]. Let us make the

following construction:Centered at every point pi, draw a circle with radius equal to the minimum gap

gn. Hence, at least two such circles will touch. We now have a circle packing whichmay not be a good one, in a square of size greater than the unit square. Finding themaximum separation configuration of P , i.e. increasing gn is equivalent to finding thedensest circle packing in this larger square. So, let gmax be the radius of the circlesin the densest packing. Then,

gn ≤ gmax ,i.e., gmax = l × gn, l ≥ 1

Now, centered at every point pi, draw another circle, with radius equal to themaximum gap Gn. These circles will naturally completely cover the unit square.However, this covering may not be thin. Let Gmin be the radius of the circles in thethinnest covering. Then,

Gn ≥ Gmin ,i.e., Gn = m×Gmin, m ≥ 1

Thus rn = Gn

gn= mGmin

gmax/l= lmGmin

gmax

Since lm ≥ 1, Gn

gn≥ Gmin

gmax. So, if we can obtain a constant c such that Gmin

gmax≥ c,

then we will have found a lower bound, namely, c.

It is known that the densest circle packing in a plane is obtained by tiling theplane with congruent regular hexagons, and then inscribing a circle in each of thesehexagons [?]. Moreover, the thinnest circle covering is obtained by circumscribingthese same hexagons [?]. Thus in this case, Gn/gn = 2/

√3. Hence, we have found a

7

Page 24: A Study on Uniform Insertion of Pointsrnshah/btpthesis.pdfCERTIFICATE This is to certify that the thesis entitled A Study on Uniform Insertion of Points, submitted by Shah Rushin Navneet,

8 3. Lower Bound on Gap Ratio

Figure 3.1: Packing and Covering for Hexagon

constant c = 2/√

3 = 1.1547, such that rn ≥ c.

Thus 2/√

3 = 1.1547 is a lower bound of the off-line gap ratio for any 2-dimensionalpoint sequence P .

Page 25: A Study on Uniform Insertion of Pointsrnshah/btpthesis.pdfCERTIFICATE This is to certify that the thesis entitled A Study on Uniform Insertion of Points, submitted by Shah Rushin Navneet,

Chapter 4

A Simulated Annealing BasedApproach

4.1 Motivation

We use a simulated annealing approach to obtain solutions to the Gap Ratio Problem.One of the advantages of our approach is that the same algorithm can be used toachieve near optimal solutions for both the on-line and off-line versions of the problem.

A hill-climbing algorithm as described in the previous section is reasonably quick,but it is guaranteed to be incomplete because it can get stuck at a local minimum.At the other extreme, a purely random walk is complete but extremely inefficient.Simulated annealing tries to combine these two approaches in a way that gives bothefficiency and completeness.

Simulated annealing generates a random successor to its current state at everyiteration. If this successor is better than the current state, it is always accepted, andset to the new current state. If the successor is not better than the current state, thealgorithm accepts it with some probability less than 1. This probability decreasesexponentially with the badness of the successor compared to the current state. Theprobability also decreases with the temperature: At higher temperatures, bad statesare more likely to be accepted, and this likelihood decreases as T decreases.

The ability of simulated annealing to accept bad successors allows it to preventgetting stuck at local minima, and often produces better results than simple hill-climbing.

4.2 Theory of Simulated Annealing

The basic simulated annealing algorithm that we use can be described in pseudocodeas:

9

Page 26: A Study on Uniform Insertion of Pointsrnshah/btpthesis.pdfCERTIFICATE This is to certify that the thesis entitled A Study on Uniform Insertion of Points, submitted by Shah Rushin Navneet,

10 4. A Simulated Annealing Based Approach

input data:problem, the specified problem

static:current, the current nodenext, the successor node of the current nodeT , temperature controlling the probability of downward stepsnumber-of-iterations, the number of iterations that the inner loop must complete

current←initial-state[problem]for t← 1 to ∞ do

T ←schedule[t]if T = 0 then return currentfor l ← 1 to number-of-iterations do

next←− random-successor[current]Δ←value[next, problem] - value[current, problem]if ΔE > 0 then current← nextelse current← next only with probability eΔE/T

We define problem as < n, offline/online >, where n is the number of points wewant in our required point sequence, and offline/online refers to whether we wantto minimize the offline gap ratio rP or online gap ratio RP . We define a node as ann point sequence in the unit square. Moreover, we implement the functions initial-state, schedule, value, random-successor (as well as a sub-function perturbused by random-successor) used in the above algorithm in the following manner:

initial-state:This function takes as an argument the parameter n of our problem and returns arandom n point sequence.

schedule:This function takes as an argument the time index t and returns the temperature atthis time. The temperature must not reduce too quickly, else the algorithm loses thecapacity to experiment, which is the unique feature of simulated annealing. Nor mustit reduce too slowly, else too many bad nodes might be considered, and it will con-verge slowly. We have used a geometric cooling schedule function. The temperatureis calculated according to the equation:

T = b× rt

where b is the base temperature and r is the cooling rate. In our algorithm, we have

Page 27: A Study on Uniform Insertion of Pointsrnshah/btpthesis.pdfCERTIFICATE This is to certify that the thesis entitled A Study on Uniform Insertion of Points, submitted by Shah Rushin Navneet,

4.2. Theory of Simulated Annealing 11

set b = 100 and r = 0.98, these values of these parameters provide an effective coolingfunction. When T goes below 1, we set it to 0 and the algorithm terminates.

value:This is the only function that performs different computations for the on-line andoff-line versions of the problem.

It takes as arguments a node denoting an n point sequence and the parameteroffline/online of the problem and returns either the off-line or on-line gap ratioof this sequence, depending on whether problem =< n, offline > or problem =<n, online >. This function maintains a Delaunay triangulation of the subset of thepoint sequence at every iteration i. It obtains the maximum gap Gi by calculatingthe radius of the largest empty circle that can be circumscribe around any of thefaces of the triangulation. Moreover, we know that the minimum gap of the givenpoints must be the shortest edge of this triangulation [?]. Hence, in this function, wecalculate Gi and gi efficiently, in linear time.

The difference in the computation of this function for the off-line and on-line ver-sions of the problem is as follows:For the off-line version, this function considers only one iteration, i.e. the case i = n.For the on-line version, all the iterations of i are considered.

random-successor:This function takes as an argument a node denoting an n point sequence and calcu-lates a successor node by using any one of the following methods:

• Pick a random point from the given point sequence and perturb it using thesub-function perturb, which we shall define after completing the definition ofthis sub-function. This method has the highest probability.

• Pick some subset of points from the given point sequence, and perturb all ofthem independently using the sub-function perturb. This method is less prob-able than the first one.

• Pick a random point from the point sequence and reflect it across the line joiningtwo other points picked randomly from the point sequence. This method canhence be applied only when n ≥ 3. This is the least probable mehtod. However,it is sometimes useful in dislodging the algorithm from local minima.

Thus the a random successor node is calculated. This strategy for calculating thesuccessor node is described in [?]

Page 28: A Study on Uniform Insertion of Pointsrnshah/btpthesis.pdfCERTIFICATE This is to certify that the thesis entitled A Study on Uniform Insertion of Points, submitted by Shah Rushin Navneet,

12 4. A Simulated Annealing Based Approach

4.3 Results for Off-line Version

Table 4.1 summarizes the best off-line gap ratios rP that we obtained using simulatedannealing for point sequences of size n:

n rP

2 1.680293 1.300474 1.220815 1.257296 1.272247 1.242838 1.338189 1.4301110 1.30141

Table 4.1: Off-line Results of Simulated Annealing

The point sequences that generate the above mentioned off-line gap ratios aregiven in Figures 4.1 - 4.9. We have proved in an earlier section that rP has a lowerbound of 2/

√3 = 1.1547 and for cases n = 4, 5, 6, 7 we see that our obtained values of

rP approach quite close to this theoretical lower bound. This gives us an indicationof the tightness of this lower bound.

Page 29: A Study on Uniform Insertion of Pointsrnshah/btpthesis.pdfCERTIFICATE This is to certify that the thesis entitled A Study on Uniform Insertion of Points, submitted by Shah Rushin Navneet,

4.3. Results for Off-line Version 13

0

0.2

0.4

0.6

0.8

1

0 0.2 0.4 0.6 0.8 1

Gap Ratio: 1.68029 Maxgap: 0.399142 Mingap 0.237543

Figure 4.1: n = 2, rP

Page 30: A Study on Uniform Insertion of Pointsrnshah/btpthesis.pdfCERTIFICATE This is to certify that the thesis entitled A Study on Uniform Insertion of Points, submitted by Shah Rushin Navneet,

14 4. A Simulated Annealing Based Approach

0

0.2

0.4

0.6

0.8

1

0 0.2 0.4 0.6 0.8 1

Gap Ratio: 1.30047 Maxgap: 0.322285 Mingap 0.247823

Figure 4.2: n = 3, rP

Page 31: A Study on Uniform Insertion of Pointsrnshah/btpthesis.pdfCERTIFICATE This is to certify that the thesis entitled A Study on Uniform Insertion of Points, submitted by Shah Rushin Navneet,

4.3. Results for Off-line Version 15

0

0.2

0.4

0.6

0.8

1

0 0.2 0.4 0.6 0.8 1

Gap Ratio: 1.22081 Maxgap: 0.305085 Mingap 0.249905

Figure 4.3: n = 4, rP

Page 32: A Study on Uniform Insertion of Pointsrnshah/btpthesis.pdfCERTIFICATE This is to certify that the thesis entitled A Study on Uniform Insertion of Points, submitted by Shah Rushin Navneet,

16 4. A Simulated Annealing Based Approach

0

0.2

0.4

0.6

0.8

1

0 0.2 0.4 0.6 0.8 1

Gap Ratio: 1.25729 Maxgap: 0.216828 Mingap 0.172457

Figure 4.4: n = 5, rP

Page 33: A Study on Uniform Insertion of Pointsrnshah/btpthesis.pdfCERTIFICATE This is to certify that the thesis entitled A Study on Uniform Insertion of Points, submitted by Shah Rushin Navneet,

4.3. Results for Off-line Version 17

0

0.2

0.4

0.6

0.8

1

0 0.2 0.4 0.6 0.8 1

Gap Ratio: 1.27224 Maxgap: 0.206063 Mingap 0.161969

Figure 4.5: n = 6, rP

Page 34: A Study on Uniform Insertion of Pointsrnshah/btpthesis.pdfCERTIFICATE This is to certify that the thesis entitled A Study on Uniform Insertion of Points, submitted by Shah Rushin Navneet,

18 4. A Simulated Annealing Based Approach

0

0.2

0.4

0.6

0.8

1

0 0.2 0.4 0.6 0.8 1

Gap Ratio: 1.24283 Maxgap: 0.197344 Mingap 0.158786

Figure 4.6: n = 7, rP

Page 35: A Study on Uniform Insertion of Pointsrnshah/btpthesis.pdfCERTIFICATE This is to certify that the thesis entitled A Study on Uniform Insertion of Points, submitted by Shah Rushin Navneet,

4.3. Results for Off-line Version 19

0

0.2

0.4

0.6

0.8

1

0 0.2 0.4 0.6 0.8 1

Gap Ratio: 1.33818 Maxgap: 0.198249 Mingap 0.148148

Figure 4.7: n = 8, rP

Page 36: A Study on Uniform Insertion of Pointsrnshah/btpthesis.pdfCERTIFICATE This is to certify that the thesis entitled A Study on Uniform Insertion of Points, submitted by Shah Rushin Navneet,

20 4. A Simulated Annealing Based Approach

0

0.2

0.4

0.6

0.8

1

0 0.2 0.4 0.6 0.8 1

Gap Ratio: 1.43011 Maxgap: 0.219845 Mingap 0.153726

Figure 4.8: n = 9, rP

Page 37: A Study on Uniform Insertion of Pointsrnshah/btpthesis.pdfCERTIFICATE This is to certify that the thesis entitled A Study on Uniform Insertion of Points, submitted by Shah Rushin Navneet,

4.3. Results for Off-line Version 21

0

0.2

0.4

0.6

0.8

1

0 0.2 0.4 0.6 0.8 1

Gap Ratio: 1.30141 Maxgap: 0.184018 Mingap 0.141399

Figure 4.9: n = 10, rP

Page 38: A Study on Uniform Insertion of Pointsrnshah/btpthesis.pdfCERTIFICATE This is to certify that the thesis entitled A Study on Uniform Insertion of Points, submitted by Shah Rushin Navneet,

22 4. A Simulated Annealing Based Approach

4.4 Results for On-line Version

Table 4.2 summarizes the on-line gap ratios RP that we obtained using simulatedannealing for point sequences of size n:

n RP

2 1.838523 1.894934 1.864435 1.856066 1.937867 1.904458 1.984549 1.9840510 1.98271

Table 4.2: On-line Results of Simulated Annealing

The point sequences that generate the above mentioned on-line gap ratios aregiven in Figures 4.10 - 4.18. We can see that we achieve better results compared tohill climbing for all the cases except n = 6. Also, this algorithm is quite efficient andmanages to achieve good results even for cases n = 8, 9, 10 in a reasonable amount oftime, which hill climbing fails to achieve.

Page 39: A Study on Uniform Insertion of Pointsrnshah/btpthesis.pdfCERTIFICATE This is to certify that the thesis entitled A Study on Uniform Insertion of Points, submitted by Shah Rushin Navneet,

4.4. Results for On-line Version 23

0

0.2

0.4

0.6

0.8

1

0 0.2 0.4 0.6 0.8 1

Gap Ratio: 1.83852 Maxgap: 0.389374 Mingap 0.214058

Figure 4.10: n = 2, RP

Page 40: A Study on Uniform Insertion of Pointsrnshah/btpthesis.pdfCERTIFICATE This is to certify that the thesis entitled A Study on Uniform Insertion of Points, submitted by Shah Rushin Navneet,

24 4. A Simulated Annealing Based Approach

0

0.2

0.4

0.6

0.8

1

0 0.2 0.4 0.6 0.8 1

Gap Ratio: 1.89493 Maxgap: 0.378161 Mingap 0.199564

Figure 4.11: n = 3, RP

Page 41: A Study on Uniform Insertion of Pointsrnshah/btpthesis.pdfCERTIFICATE This is to certify that the thesis entitled A Study on Uniform Insertion of Points, submitted by Shah Rushin Navneet,

4.4. Results for On-line Version 25

0

0.2

0.4

0.6

0.8

1

0 0.2 0.4 0.6 0.8 1

Gap Ratio: 1.86443 Maxgap: 0.36061 Mingap 0.217199

Figure 4.12: n = 4, RP

Page 42: A Study on Uniform Insertion of Pointsrnshah/btpthesis.pdfCERTIFICATE This is to certify that the thesis entitled A Study on Uniform Insertion of Points, submitted by Shah Rushin Navneet,

26 4. A Simulated Annealing Based Approach

0

0.2

0.4

0.6

0.8

1

0 0.2 0.4 0.6 0.8 1

Gap Ratio: 1.85606 Maxgap: 0.319812 Mingap 0.177449

Figure 4.13: n = 5, RP

Page 43: A Study on Uniform Insertion of Pointsrnshah/btpthesis.pdfCERTIFICATE This is to certify that the thesis entitled A Study on Uniform Insertion of Points, submitted by Shah Rushin Navneet,

4.4. Results for On-line Version 27

0

0.2

0.4

0.6

0.8

1

0 0.2 0.4 0.6 0.8 1

Gap Ratio: 1.93786 Maxgap: 0.282376 Mingap 0.145715

Figure 4.14: n = 6, RP

Page 44: A Study on Uniform Insertion of Pointsrnshah/btpthesis.pdfCERTIFICATE This is to certify that the thesis entitled A Study on Uniform Insertion of Points, submitted by Shah Rushin Navneet,

28 4. A Simulated Annealing Based Approach

0

0.2

0.4

0.6

0.8

1

0 0.2 0.4 0.6 0.8 1

Gap Ratio: 1.90445 Maxgap: 0.294661 Mingap 0.157199

Figure 4.15: n = 7, RP

Page 45: A Study on Uniform Insertion of Pointsrnshah/btpthesis.pdfCERTIFICATE This is to certify that the thesis entitled A Study on Uniform Insertion of Points, submitted by Shah Rushin Navneet,

4.4. Results for On-line Version 29

0

0.2

0.4

0.6

0.8

1

0 0.2 0.4 0.6 0.8 1

Gap Ratio: 1.98454 Maxgap: 0.261065 Mingap 0.134706

Figure 4.16: n = 8, RP

Page 46: A Study on Uniform Insertion of Pointsrnshah/btpthesis.pdfCERTIFICATE This is to certify that the thesis entitled A Study on Uniform Insertion of Points, submitted by Shah Rushin Navneet,

30 4. A Simulated Annealing Based Approach

0

0.2

0.4

0.6

0.8

1

0 0.2 0.4 0.6 0.8 1

Gap Ratio: 1.98405 Maxgap: 0.257554 Mingap 0.129894

Figure 4.17: n = 9, RP

Page 47: A Study on Uniform Insertion of Pointsrnshah/btpthesis.pdfCERTIFICATE This is to certify that the thesis entitled A Study on Uniform Insertion of Points, submitted by Shah Rushin Navneet,

4.4. Results for On-line Version 31

0

0.2

0.4

0.6

0.8

1

0 0.2 0.4 0.6 0.8 1

Gap Ratio: 1.98271 Maxgap: 0.238121 Mingap 0.120099

Figure 4.18: n = 10, RP

Page 48: A Study on Uniform Insertion of Pointsrnshah/btpthesis.pdfCERTIFICATE This is to certify that the thesis entitled A Study on Uniform Insertion of Points, submitted by Shah Rushin Navneet,
Page 49: A Study on Uniform Insertion of Pointsrnshah/btpthesis.pdfCERTIFICATE This is to certify that the thesis entitled A Study on Uniform Insertion of Points, submitted by Shah Rushin Navneet,

Chapter 5

NP-Completeness of TheOptimization Version

The Optimization Version of the Gap Ratio Problem is as follows:

Given a set SN ={p1, p2, . . . pN} of N points and a positive real m, choose a setSn ⊆ SN where Sn has n points and rSn ≤ m.

Let us state this problem in the form of a formal language:

Let G = {< SN , Sn, m > / SN is a set of N points in a unit square, Sn is an npoint subset of SN such that rSn ≤ m }

We want to prove that G is NP-Complete. To do so, we must prove that G ∈ NPand G is NP-Hard. It is evident that G ∈ NP. Given an n point subset Sn of SN , i.e.an instance < SN , Sn, m >, we can verify in polynomial time whether this subset hasa Gap Ratio ≤ m or not. To prove that G is NP-Hard, we require a polynomial timereduction from some language known to be NP-Complete to G. Let us consider thelanguage 3SAT:

3SAT = {< φ > / φ is a satisfiable 3-Conjunctive Normal Form (CNF) formula}

We will now present a polynomial time construction that takes as input a 3-CNFformula and computes a set of points SN .

33

Page 50: A Study on Uniform Insertion of Pointsrnshah/btpthesis.pdfCERTIFICATE This is to certify that the thesis entitled A Study on Uniform Insertion of Points, submitted by Shah Rushin Navneet,

34 5. NP-Completeness of The Optimization Version

5.1 Construction:

We shall start with a 3SAT formula having k clauses and l variables. For these k andl, set the gap ratio threshold m, to be m = (3k−2

k−1)l. The reason for choosing the value

of m in this manner will be apparent later. With these values of k and l, constructan arbitrary 3SAT formula. For example:

(x1 ∨ x2 ∨ ¬x3)1 ∧ . . . (¬xj ∨ ¬xi ∨ xl)k

where the variables range from x1, x2 . . . xl

Now consider a unit line segment. We will allot space on this segment for eachclause, and gaps between clauses. The ratio of the space allotted to clauses and gapsdoes not affect the validity of the proof, so let us allot equal space for clauses andgaps. Let us allot 1/2k space for each clause, and 1/2(k−1) space for each gap. Thusthe space allotted for clauses is 1/2, as is the space allotted for gaps.

Now, for each clause, allot 1/l part of its space for each of l possible variables.Further, divide the space for each such variable into two equal parts, for its positiveand negative literal. e.g. x1 and ¬x1

Thus, we have allotted 1/4kl space for each of 2l possible literals in the space forany clause. Now, if a literal appears in a clause, set a point on the unit line segmentat the left boundary of the space allotted for that literal. The points set thus are theN initial points SN from which a subset Sn having n points must be searched for toachieve a Gap Ratio rSn which is ≤ m.

The construction is thus complete. Since a unique point on the unit line segmentis associated with each literal in a clause, and can be computed in O(1) time andthere are O(k) literals, the entire construction can be obtained in O(k) time. Thusthe entire construction is completed in polynomial time. In the above construction,we have imposed a constraint that all the points are on a unit line segment, not aunit square. However, if G is shown to be NP-Complete even with this additionalconstraint, then naturally G will be NP-Complete for points that may be situatedanywhere in the unit square.

We will now use this construction to prove that the existence of a satisfying as-signment for the 3SAT formula entails the existence of a subset Sn of set SN whichsatisfies the Gap Ratio constraint, and vice versa.

Page 51: A Study on Uniform Insertion of Pointsrnshah/btpthesis.pdfCERTIFICATE This is to certify that the thesis entitled A Study on Uniform Insertion of Points, submitted by Shah Rushin Navneet,

5.2. Theorems: 35

5.2 Theorems:

Theorem 5.2.1 The existence of a satisfying assignment for the 3SAT formula im-plies the existence of a subset Sn of the set of points SN corresponding to the 3SATformula such that rSn ≤ m

Proof:Suppose there is an assignment of values to variables that satisfies a 3SAT for-

mula. Thus, each clause must have at least one literal which is set to true. Select onesuch literal from each clause, and select its associated point on the unit line segment.The points selected thus form the subset Sn having n points.

Thus, the value of the maximum gap G between the points of this subset is atmost 1

k+ 1

2(k−1)and the value of the minimum gap g between the points of this subset

is at least 12kl

Thus Gap Ratio rSn ≤1k+ 1

2(k−1)1

2kl

The above expression simplifies to (3k−2k−1

)l

Thus rSn ≤ (3k−2k−1

)l= m

Thus our initial selection of m ensures that rSn ≤ m.

Theorem 5.2.2 The existence of a subset Sn of the set of N points SN such thatrSn ≤ m implies the existence of a satisfying assignment for the 3SAT formula thatgenerated SN .

Proof:Suppose we have a subset Sn having n points from the SN that we have set during

the construction, such that Gap Ratio rSn ≤ m

Now, rn ≤ m⇒ rn ≤ (3k−2k−1

)l

Suppose the 3SAT formula that generated SN contains a clause that does not haveany literal true.Then the maximum gap G between the points of this subset is no longer bounded by1k

+ 12(k−1)

, and might be greater than this value.

Considering that the minimum gap g between the points is at least 12kl

, rSn might be

Page 52: A Study on Uniform Insertion of Pointsrnshah/btpthesis.pdfCERTIFICATE This is to certify that the thesis entitled A Study on Uniform Insertion of Points, submitted by Shah Rushin Navneet,

36 5. NP-Completeness of The Optimization Version

> (3k−2k−1

)l, but we know that rSn ≤ (3k−2k−1

)l, and thus we have a contradiction.

Hence our initial supposition was wrong, and in every clause of the 3SAT formula,there is at least one literal true.

Hence there exists a satisfying assignment for our 3SAT formula

Thus, it is proved that our construction provides a polynomial time reduction from3SAT to G. Thus G is NP-Hard. Hence, knowing that G ∈ NP, G is NP-Complete.

Page 53: A Study on Uniform Insertion of Pointsrnshah/btpthesis.pdfCERTIFICATE This is to certify that the thesis entitled A Study on Uniform Insertion of Points, submitted by Shah Rushin Navneet,

Chapter 6

Conclusion

We conclude this thesis by briefly reviewing our work. First, we presented the existingapproaches to solve the Gap Ratio Problem. We then presented a theoretical lowerbound for the gap ratio of point sequences in a unit square. Next, we presented asimulated annealing algorithm that manages to achieve point sequences with lower gapratios as compared to those obtained by Voronoi insertion or hill climbing. Finally,we presented a proof which shows that the Optimization version of this problem isNP-Complete. Related areas of research include finding a deterministic method toachieve comparable results to those obtained by simulated annealing, obtaining moreinformation about the tightness of the lower bound that we proved, and obtaining asimilar lower bound for the on-line version of the problem. We also intend to lookat approximation algorithms for the the problem that we proved to be NP-Complete,i.e. the optimization version of the Gap Ratio Problem.

37

Page 54: A Study on Uniform Insertion of Pointsrnshah/btpthesis.pdfCERTIFICATE This is to certify that the thesis entitled A Study on Uniform Insertion of Points, submitted by Shah Rushin Navneet,
Page 55: A Study on Uniform Insertion of Pointsrnshah/btpthesis.pdfCERTIFICATE This is to certify that the thesis entitled A Study on Uniform Insertion of Points, submitted by Shah Rushin Navneet,

Bibliography

[1] S. Taromoto, T. Asano, B. Doerr and N. Katoh, “Inserting Points UniformlyAt Every Instance”, IEICE Transactions on Info and Systems vol. E89-D:number 8, pp. 2348-2356, 2006

[2] S. Russell & P. Norvig, Artificial Intelligence: A Modern Approach,Prentice-Hall India, 2nd edition, 2003

[3] Balakaushal Damaraju, “Inserting Points Uniformly In A Unit Square At EveryInstance”, M. Tech. Thesis, Indian Institute of Technology, Kharagpur, April2007

[4] H. Melisen, Packing & Covering With Circles

[5] W. Kuperberg, “An Inequality linking Packing and Covering Densities Of PlaneConvex Bodies”, Geometriae Dedicata, vol.23, pp. 59-66, 1987

[6] LEDA: Library of Efficient Data Types and Algorithms,http://www.algorithmic-solutions.com/

[7] Michael Sipser, Introduction to Theory of Computation, Thomson BrooksCole, 2004

[8] M. de Berg, M. van Kreveld, M. Overmars and O. Scwarzkopf, ComputationalGeometry, Algorithms & Applications, Springer-Verlag, 2nd edition, 2000

39