GenerateRandomSearch

Task Assignment Optimiser

Each person can do each task, at a different cost or in a different time, and everyone takes exactly one. The obvious approach — let everyone take whatever they are best at — often does not even produce a valid assignment, because two people want the same task. This finds the genuinely cheapest matching by checking every possibility, so the answer is proved rather than argued, and shows what the obvious approach would have cost.

What this generator does

Generates a cost grid and finds the assignment with the lowest total, checking every permutation so the result is provably optimal. It also reports what letting everyone take their own cheapest task would have cost, or that it is not even feasible.

How to use this tool

  1. Choose how many people and tasks there are.
  2. Read the cost grid and try to find the cheapest complete matching.
  3. Compare with the underlined assignment shown.
  4. Look at what everyone picking their own favourite would have cost.

Understanding the controls

How many workers and tasks
Between 3 and 8, always equal. Eight means checking 40,320 assignments, which is still instant and is what makes the answer provable.
Seed
Reproduces exactly the same cost grid, so the same problem can be set twice or compared between methods.

Common use cases

  • Allocating jobs to people where costs or times differ
  • Showing why picking favourites is not a strategy
  • Teaching the assignment problem with a proved answer
  • Test instances for a matching implementation
  • Reproducing the same cost grid from a seed

How this generator works

Every permutation of tasks to workers is enumerated and costed, which is factorial work but affordable to eight. The check re-runs that search independently and requires the stated assignment to be a genuine permutation, to cost what it claims, and for no cheaper assignment to exist.

Randomness and fairness

The costs are random; the optimal assignment is proved by exhaustive search. Seeded grids reproduce and are therefore explicitly not cryptographically secure. Unseeded, the browser's cryptographically secure generator fills the grid.

For how randomness is produced across the whole site, see how Generate Random works.

Limitations and good to know

  • Equal numbers of workers and tasks. Unbalanced problems need padding, which is not done here.
  • Eight is the ceiling, because the exhaustive proof is factorial — the Hungarian algorithm would scale much further without proving optimality by enumeration.
  • Costs are whole numbers with no units attached.
  • Everyone can do everything: forbidden pairings are not modelled.
  • Grids are not stored between visits.

Privacy and your data

Costs and the assignment are computed in your browser. Nothing about the problem or your seed is transmitted.