1
$\begingroup$

Consider the following generalization of the interval scheduling problem: We have a set of groups, each group is specified by a set of disjoint time intervals. Unlike the group interval scheduling decision problem, all the time intervals within the set (for a group) are needed to schedule the group.

My question is, what is the complexity of computing the maximum number of groups that can be scheduled together without any conflicts. I do not think the greedy-algorithm for the single interval per group case holds for this generalization.

A further generalization is the complexity for the weighted version i.e. each group has a non-negative weight associated. The problem is to schedule groups without conflicts such that the weighted sum of the scheduled groups is maximized.

$\endgroup$
0

1 Answer 1

1
$\begingroup$

Assume there are n groups and each group has at most k intervals. We can sort the all the groups by the finish time of it's last interval, call the sorted order $g_1, g_2, \dots , g_n$. For each group, we also compute the list of incompatible groups (e.g. $g_1$ and $g_2$ are incompatible if there is a non-zero overlap across their intervals). We then compute the array $v$, where $v[k]$ represents the maximum number of groups that can be scheduled in $\lbrace{g_1, g_2, \dots, g_{k} \rbrace}$ with $g_k$ included. This computation is easy. For example, if $g_k$ is only compatible with the groups $g_1, g_2, g_5$ in the set $\lbrace{g_1, g_2, \dots, g_{k-1} \rbrace}$, then $v[k] = (1 + max(v[1], v[2], v[5]))$. This is correct since, either none of the compatible groups can be scheduled with $g_k$, or at least one of the compatible groups is present when scheduling along with $g_k$.

The overall complexity is $ O\left( {{n}\choose{2}} k + n \, k \, log (k) \right)$ time and O(n + k) space.

$\endgroup$

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.