Skip to content

Commit 453d99f

Browse files
Add files via upload
Signed-off-by: Fabiana ⚡️ Campanari <[email protected]>
1 parent 07a17cd commit 453d99f

File tree

1 file changed

+125
-0
lines changed

1 file changed

+125
-0
lines changed
Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
2+
# Exercise in Excel to Find Final Solution Using Hungarian Method
3+
4+
5+
### Problem Statement
6+
7+
In a factory there are 4 different cutting machines. 4 tasks must be processed daily.
8+
Tasks can be performed on any of the machines. The table below represents the processing times, in hours, of each task on each of the machines.
9+
Designate a machine for each task in such a way as to minimize the total time spent.
10+
11+
<br>
12+
13+
## Step 1: Input the Cost Matrix in Excel
14+
15+
<br>
16+
17+
18+
Enter the processing times (hours) in a 4x4 grid (cells `B2:E5`):
19+
20+
<br>
21+
22+
| Machine \ Task | Task 1 | Task 2 | Task 3 | Task 4 |
23+
|----------------|--------|--------|--------|--------|
24+
| **Machine 1** | 5 | 24 | 13 | 7 |
25+
| **Machine 2** | 10 | 25 | 3 | 23 |
26+
| **Machine 3** | 28 | 9 | 8 | 5 |
27+
| **Machine 4** | 10 | 17 | 15 | 3 |
28+
29+
30+
<br><br>
31+
32+
33+
## Step 2: Row Reduction
34+
35+
<br>
36+
37+
Subtract the minimum value in each row from all elements in that row.
38+
39+
<br>
40+
41+
1. **Row Minimums**:
42+
- **Machine 1**: `=MIN(B2:E2)`**5**
43+
- **Machine 2**: `=MIN(B3:E3)`**3**
44+
- **Machine 3**: `=MIN(B4:E4)`**5**
45+
- **Machine 4**: `=MIN(B5:E5)`**3**
46+
47+
48+
<br>
49+
50+
2. **Row-Reduced Matrix** (cells `G2:J5`):
51+
- **Machine 1**: `=B2-$F2``0, 19, 8, 2`
52+
- **Machine 2**: `=B3-$F3``7, 22, 0, 20`
53+
- **Machine 3**: `=B4-$F4``23, 4, 3, 0`
54+
- **Machine 4**: `=B5-$F5``7, 14, 12, 0`
55+
56+
57+
58+
<br><br>
59+
60+
61+
## Step 3: Column Reduction
62+
63+
<br>
64+
65+
Subtract the minimum value in each column from all elements in that column.
66+
67+
<br>
68+
69+
1. **Column Minimums** (cells `G6:J6`):
70+
- **Task 1**: `=MIN(G2:G5)`**0**
71+
- **Task 2**: `=MIN(H2:H5)`**4**
72+
- **Task 3**: `=MIN(I2:I5)`**0**
73+
- **Task 4**: `=MIN(J2:J5)`**0**
74+
75+
<br>
76+
77+
2. **Column-Reduced Matrix** (cells `K2:N5`):
78+
- **Task 1**: `=G2-$G$6``0, 7, 23, 7`
79+
- **Task 2**: `=H2-$H$6``15, 18, 0, 10`
80+
- **Task 3**: `=I2-$I$6``8, 0, 3, 12`
81+
- **Task 4**: `=J2-$J$6``2, 20, 0, 0`
82+
83+
84+
<br><br>
85+
86+
87+
88+
## Step 4: Cover Zeros with Minimum Lines
89+
90+
<br>
91+
92+
Use Excel’s **conditional formatting** to highlight zeros. Draw lines to cover all zeros:
93+
94+
<br>
95+
96+
- **Row 1**: Task 1 (0)
97+
- **Row 2**: Task 3 (0)
98+
- **Row 3**: Task 4 (0)
99+
- **Row 4**: Task 4 (0)
100+
101+
**Result**: 4 lines (equal to matrix size), so proceed to assignment.
102+
103+
<br><br>
104+
105+
## Step 5: Optimal Assignment
106+
107+
<br>
108+
109+
Assign tasks to machines where zeros are located:
110+
111+
<br>
112+
113+
| Machine | Task Assigned | Time |
114+
|----------|---------------|------|
115+
| **1** | Task 1 | 5 |
116+
| **2** | Task 3 | 3 |
117+
| **3** | Task 4 | 5 |
118+
| **4** | Task 2 | 17 |
119+
120+
**Total Time**: \(5 + 3 + 5 + 17 = 30\)
121+
122+
123+
<br><br>
124+
125+

0 commit comments

Comments
 (0)