Skip to content

Commit 49eb250

Browse files
Update README.md
Signed-off-by: Fabiana 🚀 Campanari <113218619+FabianaCampanari@users.noreply.github.com>
1 parent 04cd794 commit 49eb250

File tree

1 file changed

+34
-3
lines changed

1 file changed

+34
-3
lines changed

README.md

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1502,19 +1502,19 @@ The **Assignment Problem** aims to allocate *n* tasks to *n* agents (machines, w
15021502
<br>
15031503

15041504

1505-
## 1. {Hungarian Method]() (Step by Step):
1505+
## 1. [Hungarian Method]() (Step by Step):
15061506

15071507
### [**Step 1](): Subtract Row Minimums**
15081508

1509-
#### Subtract the minimum value in each row from all elements in that row.
1509+
### Subtract the minimum value in each row from all elements in that row.
15101510

15111511
- Row 1 min: 2 → [0, 2, 1]
15121512
- Row 2 min: 1 → [0, 2, 1]
15131513
- Row 3 min: 2 → [3, 0, 2]
15141514

15151515
<br>
15161516

1517-
#### [**Matrix after row subtraction:**]()
1517+
## [**Matrix after row subtraction:**]()
15181518

15191519
| | M1 | M2 | M3 |
15201520
|---------|----|----|----|
@@ -1525,7 +1525,38 @@ The **Assignment Problem** aims to allocate *n* tasks to *n* agents (machines, w
15251525

15261526
<br>
15271527

1528+
### [**Step 2](): Subtract Column Minimums**
15281529

1530+
### Subtract the minimum value in each column from all elements in that column]().
1531+
1532+
- Col 1 min: 0 → [0, 0, 3]
1533+
- Col 2 min: 0 → [2, 2, 0]
1534+
- Col 3 min: 1 → [0, 0, 1]
1535+
1536+
<br>
1537+
1538+
### [**Matrix after column subtraction:**]()
1539+
1540+
| | M1 | M2 | M3 |
1541+
|---------|----|----|----|
1542+
| Task 1 | 0 | 2 | 0 |
1543+
| Task 2 | 0 | 2 | 0 |
1544+
| Task 3 | 3 | 0 | 1 |
1545+
1546+
<br>
1547+
1548+
## [**Step 3](): Assignment (Cover Zeros)**
1549+
1550+
- Cover all zeros using the minimum number of lines (rows or columns).
1551+
- Assign tasks to machines where possible (one zero per row/column).
1552+
1553+
**Optimal Assignment:**
1554+
- Task 1 → Machine 1 (cost 2)
1555+
- Task 2 → Machine 3 (cost 2)
1556+
- Task 3 → Machine 2 (cost 2)
1557+
1558+
1559+
### ***Total Minimum Cost = [2 + 2 + 2 = 6***]()
15291560

15301561

15311562

0 commit comments

Comments
 (0)