Work Note 12, DM819, fall 2015
Lecture November 17
Exercises November 19
-
Exercises 12.3, 12.4, 12.5.
-
Given a set of n line segments, I1, ..., In,
a one-dimensional matryoshka is a subset
Ij1, ..., Ijk
such that Ij1 ⊂ Ij2, ...,
Ijk-1 ⊂ Ijk
and k is the size of the matryoshka.
-
Design and analyze an algorithm for finding the size of the
largest matryoshka.
-
Define two-dimensional matryoshkas as a generalization of the above.
Can you think of restrictions on input, similar to restrictions from
the course, that would enable you to design an effective algorithm
for this case?
-
A polygon path is the same as a polygon, except that the curve
can start and end at different vertices, i.e., it does not have to be closed.
As for polygons, we only consider paths that do not self-intersect.
Angles of 180° at vertices is allowed.
-
Design and analyze an algorithm for computing a polygon path connecting
n input points.
-
Can any polygon path over n point be obtained from a polygon
by removing an edge?
-
Design and analyze an algorithm for computing a polygon connecting
n input points.
-
A point q in the plane is dominated by a point p
if p.x ≥ q.x and p.y ≥ q.y.
A point from an input set of n points
is called dominating if it is not dominated by any other point.
The dominating set of a set of points S is the
set of all dominating points in S.
-
Design a divide-and-conquer algorithm for computing the dominating set.
-
Assume that somebody will provide a lexicographically sorted
input set. Design a linear time algorithm for computing the
dominating set.
-
Assume that we have n mice located under the x-axis
and n cheeses located above. You may assume that the mice
and cheeses are in general position.
We would like to assign one cheese to each mouse so that when
the mouse runs straight to its cheese, it will not bump into
another mouse, independent of their relative speeds.
-
Does it work to sort both mice and cheeses on their x-coordinates
and assign them pair-wise in that order?
-
Design and analyze and algorithm that solves the problem.
-
Make reasonable assumptions and show that this problem cannot
be solved in time faster than Θ(n log n).
Last modified: Thu Nov 26 13:32:29 CET 2015
Kim Skak Larsen
(kslarsen@imada.sdu.dk)