##### Question 1: Cumulative

Consider the following activities and a resource capacity of 5:

Select all the true statements:

The mandatory profile is composed of two rectangles: [3..3] x h=5 and [4..4] x h=3.

The start time of activity B will be tightened by the time-table filtering.

Activity A has a mandatory part.

The mandatory profile is composed of two rectangles: [3..4] x h=3 and [3..3] x h=2.

Activity C has a mandatory part.

The mandatory profile is flat.

The start time of activity C will be tightened by the time-table filtering.

Activity B has a mandatory part.

The start time of activity A will be tightened by the time-table filtering.

##### Question 2: Pruning

Consider the following activities and a resource capacity of 5:

The earliest start time of activity B is pruned to:

##### Question 3: Rectangle Packing

Select all the possible sets of constraints that can be used to implement correctly the rectangle-packing problem where \(x_i, y_i, w_i, h_i\) are respectively the positions in the x & y dimensions and the width & height of rectangle \(i\):

Cumulative on one dimension.

\(\forall i,j, i < j : \ x_i + w_i \leq x_j \vee x_j + w_j \leq x_i \vee y_i + h_i \leq y_j \vee y_j + h_j \leq y_i\)

\(\forall i,j, i < j : \ x_i + w_i \leq x_j \vee x_j + w_j \leq x_i\) and Cumulative on the x dimension and Cumulative on the y dimension.

Cumulative on the x dimension and Cumulative on the y dimension.

\(\forall i,j, i < j : \ x_i + w_i \leq x_j \vee x_j + w_j \leq x_i\) and Cumulative on the y dimension.

\(\forall i,j, i < j : \ x_i + w_i \leq x_j \vee x_j + w_j \leq x_i \vee y_i + h_i \leq y_j \vee y_j + h_j \leq y_i\) and Cumulative on the x dimension and Cumulative on the y dimension.

\(\forall i,j, i < j : \ x_i + w_i \leq x_j \vee x_j + w_j \leq x_i \vee y_i + h_i \leq y_j \vee y_j + h_j \leq y_i\) and Cumulative on the x dimension.

##### Question 4: Sweep Line

The time complexity for checking the feasibility of a Cumulative constraint with \(n\) tasks using the sweep-line algorithm is:

\(O(n^2)\)

\(O(n \log n)\)

\(O(n)\)