Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

Summer Project

Arkaprava Paul

October 15,2019
Problem Statement

Given n horizontal segments of unit length, find k horizontal or


vertical lines such that the maximum distance r of any segment
from its closest line is minimized where the distance of a
horizontal segment from a vertical line is the absolute difference
of the x co-ordinate of the midpoint of the segment and the
distance of a horizontal segment from a horizontal line is the
difference between the y co-ordinates.We have one horizontal
line with each horizontal segment and each such line is along
each such segment.

1
Example

2
A possible assignment for k=4 and n=6

3
Observations
2n

• The possible values for r is finite, to be precise it is exactly, k
which is O(nk )

All 2n possible lines, here n = 6

4
• It is noticed that the values that r can take is actually
polynomial, as r is essentially the distance between the segments
, either horizontal or vertical. The number of possible values
2n

that r can take is 2 ≈ O(n2 )

• Given a set of vertical lines such that the leftmost line and the
right- most line having a distance 2r, then there exists a vertical
line such that no line is farther from it by a distance r if ∀ lines
there exists an adjacent line(to the left or right) which is at a
distance not farther than r .

5
A Reformulation of this problem in graph
terminology

Definitions
Vertex Cover : A set of vertices such that each edge of
the graph is incident to at least one vertex of the set.

Dark Vertices Comprise the Vertex Cover

Clique : A graph where each vertex is connected to


all the vertices.

K5

6
Graphical representation of the original problem

Assume we initially know r ,


the vertices of the graph are the horizontal segments
in the original problem. There exists an edge
between the vertices if the distance between the
corresponding segments in the original is atmost r.

• If there exists a vertex cover of size k in the graph,


then there is a valid solution of our original problem.
The converse isn’t true, Counter Example : If the
graph is a clique, the vertex cover is of size n − 1 and
k=1 , then the vertex cover is of size 0 which yields
no solution.

7
For k=1, we can find r, in time O(nlogn), we need to
sort the segments in ascending order along the
vertical axis first, and then the horizontal axis , and
select the n2 th segment.

You might also like