# Job assignment where each worker handles two non-consecutive jobs

There are $$N$$ workers and $$2N$$ jobs, named from $$J_1$$ to $$J_{2N}$$. There's a matrix $$M$$ denoting the subset of jobs can be handled by each worker: If $$M_{i, j}$$ is true, then worker $$i$$ can do job $$j$$.

Our task is to assign exact 2 jobs for each worker, s.t., each job is handled by exact one worker with respect to $$M$$. (So far the problem can be solved with max flow.) Moreover, If a worker $$i$$ handles job $$j$$, it can't handle job $$j+1$$.

2. If there is, find out a solution to $$\max_{Assignment}{\min_{i} {\left| J1_i - J2_i \right|}}$$, where $$J1_i$$ is the first job assigned to worker $$i$$, and $$J2_i$$ is the second job assigned to worker $$i$$. In other words, to maximize the minimum interval between two jobs for all workers.