Assume we have two sequences of tasks P and Q. Let these are assigned to agent A1 and agent A2, respectively. After the task assignments, these agents can cooperate the tasks which is assigned both of them without any additional cost. The solution must maintain the maxiumum size of outsourcable task sequence in their given order.
For example, let our defined tasks set is {M,N,T,U,V,X,Y,Z}, and P=<X,Y,M,M,U,T,Z,X,M,Y>, Q=<V,T,Z,U,M,N,Y,M,Y> then maxiumum size of outsourcable task sequence in the given order is <T,Z,M,Y>
The solution is implemented using dynamic programming approach.