Vous êtes sur la page 1sur 11

Summer Project

Arkaprava Paul

Ramakrishna Mission Vivekananda Education


and Research Institute

October 19, 2019


Problem

• Input : Given n horizontal segments of unit length, for each


segment , we have one horizontal line along this segment, and
a vertical line which is a ⊥ bisector of this segment. ∴ We
have 2n lines in total.
Problem

• Input : Given n horizontal segments of unit length, for each


segment , we have one horizontal line along this segment, and
a vertical line which is a ⊥ bisector of this segment. ∴ We
have 2n lines in total.
• Output: We select k lines such that the maximum distance of
a segment from a line is minimized.
Problem

• Input : Given n horizontal segments of unit length, for each


segment , we have one horizontal line along this segment, and
a vertical line which is a ⊥ bisector of this segment. ∴ We
have 2n lines in total.
• Output: We select k lines such that the maximum distance of
a segment from a line is minimized.
Distance : The distance of a horizontal segment from a vertical
line is the difference in the x co-ordinates. The distance of a
horizontal segment from a horizontal line is the difference in the y
co-ordinates.
Problem

• Input : Given n horizontal segments of unit length, for each


segment , we have one horizontal line along this segment, and
a vertical line which is a ⊥ bisector of this segment. ∴ We
have 2n lines in total.
• Output: We select k lines such that the maximum distance of
a segment from a line is minimized.
Distance : The distance of a horizontal segment from a vertical
line is the difference in the x co-ordinates. The distance of a
horizontal segment from a horizontal line is the difference in the y
co-ordinates.
Example Input
A Possible assignment for n=8 and k=5
All 2n lines
Observations
• , There are O(n2 ) possibilities for r
Observations
• , There are O(n2 ) possibilities for r
Observations

n

There are 2n lines , for the n horizontal lines there are 2  possible
n
distances and similarly for the n vertical lines there are 2 possible
distances.
Therefore total possibilities are (n × (n − 1)) ≈ O(n2 ).

Vous aimerez peut-être aussi