Idea: 
We compute Tmin(a,b)=the minimum time duration such that the procedure a+1 of app. 1 and the procedure b+1 of app. 2 are scheduled "head-to-head".

Tmin(0,0)=0

From Tmin(a,b) we advance as long as no conflicts occur: when we find a conflict between a' and b', we either make a' or b' wait => we update Tmin(a'-1, b') and Tmin(a', b'-1)

Time complexity: O(N^3) = O(N^2) states x O(N) per state

Problem type: Dynamic Programming
