# Assigning 2 Tasks to each Agent w/ Hungarian Algorithm?

Suppose I have 4 agents and 8 tasks and I would like to assign each agent 2 tasks each. Is there a way to use the Hungarian Algorithm to solve this problem?

I worked it out with 2 agents and 4 tasks by hand by creating 2 additional dummy rows. I think I arrived at an optimal solution but I'm not entirely sure. Is it simply as easy as just adding dummy rows and then running the algorithm normally?

If the Hungarian Algorithm does not work, what's another algorithm that can guarantee me an optimal solution where there are n agents and k*n tasks and each agent gets assigned k tasks?

\begin{align} \min & \sum_{i,j} c_{i,j} x_{i,j}\\ & \sum_j x_{i,j} = 2 \> \> \forall i \\ & \sum_i x_{i,j} = 1 \> \> \forall j \\ & 0 \le x_{i,j} \le 1 \end{align}