Assignment Problem - MATLAB Cody - MATLAB Central

Problem 42875. Assignment Problem

Difficulty:Rate

Given a matrix where row i corresponds to person i, and column j corresponds to task j and cell (i,j) corresponds to the time taken for person i to complete task j. Output an assignment array for the minimal time taken for all tasks.

For example, if presented with the following matrix:

 x = [1,3,4,7;  
      2,3,1,3;
      4,2,3,7;
      6,4,2,2;]

Your output array would be:

 a = [1,3,2,4].

Where person one is assigned to task one, person three is assigned to task two , person two is assigned to task three and person four is assigned to task four.

This gives us a total time of 1+1+2+2=6 which is minimal.

Solution Stats

30.21% Correct | 69.79% Incorrect
Last Solution submitted on Apr 20, 2025

Problem Comments

Solution Comments

Show comments
PIVlab surpasses 100K all-time File Exchange downloads
During the past twelve months, PIVlab, a MATLAB Community Toolbox for particle...
4
8
LLMs with MATLAB updated to support the latest OpenAI Models
Large Languge model with MATLAB, a free add-on that lets you access...
2
4

Problem Recent Solvers46

Suggested Problems

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!