Next: About this document ...
Algorithms
A sequence of positive integers
is called a non-decreasing sequence if
.
For two positive integer sequences
and
we say
that
dominates
if
.
For a positive integer sequence
we define
count(
)
as the number of different integers in
,
i.e.,
count(

)
=

.
For a positive integer sequence
we define
weight(
)
as the sum of all the elements of the sequence
i.e.,
weight(

)
=

.
The goal of this problem is to design an efficient algorithm that
given a positive non-decreasing integer sequence
and
an integer k finds a minimum weight integer sequence
that satisfies:
This problem has four parts:
- (i)
- Let
be a positive
non-decreasing integer sequence.
- (a)
- Find a minimum weight integer sequence
such
that
dominates
and count(
)
.
What is
weight(
)?
7 pts
- (b)
- Find a minimum weight integer sequence
such
that
dominates
and count(
)
.
What is
weight(
)?
8 pts
- (ii)
- Let
.
Find a
minimum weight integer sequence
such
that count(
)
and
dominates
.
What is weight(
)? No
justification is needed as to why your answer is indeed correct.
20 pts
- (iii)
- For a positive non-decreasing integer sequence
,
let C(i,j) denote the weight of a minimum
weight sequence that dominates the sub-sequence
and
has count at most j. Derive a recurrence relation for
C(i,j).
30 pts
- (iv)
- Give an efficient (polynomial-time) algorithm that
given a non-decreasing integer sequence
and an
integer k finds a minimum weight integer sequence
that dominates
and satisfies count(
)
.
Analyse the worst-case running time of your algorithm.
35 pts
Next: About this document ...
Kathleen Marie Crumpton
2000-07-19