The calls to UNION would have respective arguments (assuming that its arguments are d and s-1) 4 and 3, 2 and 1, 4 and 2, 3 and 0, 7 and 6, 6 and 5, and 5 and 4.
Here no path compression is assumed. If path compression is assumed, then it would only take place for the very last successful task assignment, with deadline 5, after which the node 4 and its parent 3 would point directly to 0.
0 8
/ \
1 5
/ \ / \
2 3 7 6
|
4