Zakład produkujący gwoździe otrzymuje drut do produkcji w kawałkach po 30cm. Kawałki te cięte są na krótsze: 11cm, 8cm, 5cm. Pociąć je trzeba tak, aby otrzymać:
12tys. gwoździ po 11cm
24tys. gwoździ po 8cm
27tys. gwoździ po 5cm
I zminimalizować odpad.
X1 | X2 | X3 | X4 | X5 | X6 | X7 | X8 | X9 | Sposoby cięcia | |
---|---|---|---|---|---|---|---|---|---|---|
I | II | III | IV | V | VI | VII | VIII | IX | ||
11 | 2 | 2 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 12tys |
8 | 1 | 0 | 2 | 1 | 0 | 3 | 2 | 1 | 0 | 24tys |
5 | 0 | 1 | 0 | 2 | 3 | 1 | 2 | 4 | 6 | 27tys |
Odpad | 0 | 3 | 3 | 1 | 4 | 1 | 4 | 2 | 0 |
C | 0 | 3 | 3 | 1 | 4 | 1 | 4 | 2 | 0 | 0 | 0 | 0 | M | M | M | |||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Zb | X1 | X2 | X3 | X4 | X5 | X6 | X7 | X8 | X9 | X10 | X11 | X12 | S1 | S2 | S3 | R | Kwy | |
M | S1 | 2 | 2 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | -1 | 0 | 0 | 1 | 0 | 0 | 12 | |
M | S2 | 1 | 0 | 2 | 1 | 0 | 3 | 2 | 1 | 0 | 0 | -1 | 0 | 0 | 1 | 0 | 24 | |
M | S3 | 0 | 1 | 0 | 2 | 3 | 1 | 2 | 4 | 6 | 0 | 0 | -1 | 0 | 0 | 1 | 27 | 27/6 |
Zj | 3M | 3M | 3M | 4M | 4M | 4M | 4M | 5M | 6M | -M | -M | -M | M | M | M | |||
C-Zj | -3M | 3-3M | 3-3M | 1-4M | 4-4M | 1-4M | 4-4M | 2-5M | -6M | M | M | M | 0 | 0 | 0 |
Zj=M razy S1 + M razy S2 + M razy S3
Kwy=R:X9
C | 0 | 3 | 3 | 1 | 4 | 1 | 4 | 2 | 0 | 0 | 0 | 0 | M | M | M | |||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Zb | X1 | X2 | X3 | X4 | X5 | X6 | X7 | X8 | X9 | X10 | X11 | X12 | S1 | S2 | S3 | R | Kwy | |
M | S1 | 2 | 2 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | -1 | 0 | 0 | 1 | 0 | 0 | 12 | 6 |
M | S2 | 1 | 0 | 2 | 1 | 0 | 3 | 2 | 1 | 0 | 0 | -1 | 0 | 0 | 1 | 0 | 24 | 24 |
0 | X9 | 0 | 1/6 | 0 | 1/3 | 1/2 | 1/6 | 1/3 | 2/3 | 1 | 0 | 0 | -1/6 | 0 | 0 | 1/6 | 27/6 | |
Zj | 3M | 2M | 3M | 2M | M | 3M | 2M | M | 0 | -M | -M | 0 | M | M | 0 | |||
C-Zj | -3M | 3-2M | 3-3M | 1-2M | 4-M | 1-3M | 4-2M | 2-M | 0 | M | M | 0 | 0 | 0 | M |
Wiersz x9= stare S3:6
C | 0 | 3 | 3 | 1 | 4 | 1 | 4 | 2 | 0 | 0 | 0 | 0 | M | M | M | |||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Zb | X1 | X2 | X3 | X4 | X5 | X6 | X7 | X8 | X9 | X10 | X11 | X12 | S1 | S2 | S3 | R | Kwy | |
0 | X1 | 1 | 1 | 1/2 | 1/2 | 1/2 | 0 | 0 | 0 | 0 | -1/2 | 0 | 0 | 1/2 | 0 | 0 | 6 | |
M | S2 | 0 | -1 | 3/2 | 1/2 | -1/2 | 3 | 2 | 1 | 0 | 1/2 | -1 | 0 | -1/2 | 1 | 0 | 18 | 6 |
0 | X9 | 0 | 1/6 | 0 | 1/3 | 1/2 | 1/6 | 1/3 | 2/3 | 1 | 0 | 0 | -1/6 | 0 | 0 | 1/6 | 27/6 | 27 |
Zj | 0 | -M | 3/2M | 1/2M | -1/2M | 3M | 2M | M | 0 | 1/2M | -M | 0 | -1/2M | M | 0 | |||
C-Zj | 0 | 3+M | 3-3/2M | 1-1/2M | 4+1/2M | 1-3M | 4-2M | 2-M | 0 | -1/2M | M | 0 | 3/2M | 0 | M |
Wiersz x1=stare s1:2
Wiersz s2=stare s2-nowe x1
S2x1=1 - 1=0
S2x2=0 - 1=-1
S2x3=2 - 1/2=3/2
S2x4=1 – 1/2=1/2
S2x5=0 - 1/2=-1/2
S2x6=3 - 0=3
S2x7=2 - 0=2
S2x8=1 - 0=1
S2x9=0 - 0=0
S2x10=0 – (-1/2)=1/2
S2x11=-1 - 0=-1
S2x12=0 - =0
S2S1=0 – 1/2 =-1/2
S2S2=1 - 0=1
S2S3=0 - 0=0
S2R=24-6=18
C | 0 | 3 | 3 | 1 | 4 | 1 | 4 | 2 | 0 | 0 | 0 | 0 | M | M | M | |||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Zb | X1 | X2 | X3 | X4 | X5 | X6 | X7 | X8 | X9 | X10 | X11 | X12 | S1 | S2 | S3 | R | Kwy | |
0 | X1 | 1 | 1 | 1/2 | 1/2 | 1/2 | 0 | 0 | 0 | 0 | -1/2 | 0 | 0 | 1/2 | 0 | 0 | 6 | -12 |
1 | X6 | 0 | -1/3 | 1/2 | 1/6 | -1/6 | 1 | 2/3 | 1/3 | 0 | 1/6 | -1/3 | 0 | -1/6 | 1/3 | 0 | 6 | 36 |
0 | X9 | 0 | 2/9 | -1/12 | 11/36 | 19/36 | 0 | 2/9 | 11/18 | 1 | -1/36 | -1/18 | -1/6 | 1/36 | -1/18 | 1/6 | 21/6 | -126 |
Zj | 0 | -1/3 | 1/2 | 1/6 | -1/6 | 1 | 2/3 | 1/3 | 0 | 1/6 | -1/3 | 0 | -1/6 | 1/3 | 0 | 6 | ||
C-Zj | 0 | 10/3 | 5/2 | 5/6 | 25/6 | 0 | 10/3 | 5/3 | 0 | -1/6 | 1/3 | 0 | M+1/6 | M-1/3 | M |
Nowy wiersz x6=stare s2:3
Nowy wiersz x9=stare x9 – 1/6* nowe x6
X9x1=0 - 1/6*0=0
X9x2=1/6 - 1/6*(-1/3)=3/18+1/18=4/18=2/9
X9x3=0 - 1/6*1/2=-1/12
X9x4=1/3 - 1/6*1/6=12/36-1/36=11/36
X9x5=1/2 - 1/6*(-1/6)=18/36+1/36=19/36
X9x6=1/6 - 1/6*1=0
X9x7=1/3 - 1/6*2/3=6/18-2/18=4/18=2/9
X9x8=2/3 - 1/6*1/3=12/18-1/18=11/18
X9x9=1 - 1/6*0=1
X9x10=0 - 1/6*1/6=-1/36
X9x11=0 - 1/6*(-1/3)=-1/18
X9x12=-1/6 - 1/6*0=-1/6
X9s1=0 - 1/6*(-1/6)=1/36
X9S2=0 - 1/6*1/3=-1/18
X9S3=1/6 - 1/6*0=1/6
X9R=27/6-1/6*6=27/6-1=21/6
Kwy=R:X10 bo występuje tam wartość najmniejsza
Koniec zadania, bo w wierszu „C-Zj” nie ma już żadnej ujemnej liczby z „M”
Rozwiązanie: X1=-12
X2=0
X3=0
X4=0
X5=0
X6=36
X7=0
X8=0
X9=-126
X10=0
X11=0
X12=0
Spółdzielnia produkująca przybory szkolne otrzymuje bele papieru o szerokości 2,1cm i 4,2cm. W produkcji wykorzystuje się bele o szerokości 0,5m i 1,4m.
Zużycie:
12tys. po 0,5m
18tys. po 1,4m
Jak pociąć bele by zminimalizować odpad? Jaka będzie ilość odpadów
2,1 | 4,2 | ||
---|---|---|---|
X1 | X2 | X3 | |
I | II | III | |
0,5 | 4 | 1 | 8 |
1,4 | 0 | 1 | 0 |
Odpad | 0,1 | 0,2 | 0,2 |
C | 0,1 | 0,2 | 0,2 | 0,4 | 0 | 0,3 | 0 | 2 | M | M | |||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Zb | X1 | X2 | X3 | X4 | X5 | X6 | X7 | X8 | S1 | S2 | R | Kwy | |
M | S1 | 4 | 1 | 8 | 2 | 0 | 5 | -1 | 0 | 1 | 0 | 12 | 12/8 |
M | S2 | 0 | 1 | 0 | 2 | 3 | 1 | 0 | -1 | 0 | 1 | 18 | |
Zj | 4M | 2M | 8M | 4M | 3M | 6M | -M | -M | M | M | 30M | ||
C-Zj | 0,1-4M | 0,2-2M | 0,2-8M | 0,4-4M | -3M | 0,3-6M | M | 2+M | 0 | 0 |
Zj=M razy S1 + M razy S2
Kwy=R:X3
C | 1/10 | 1/5 | 1/5 | 2/5 | 0 | 3/10 | 0 | 2 | M | M | |||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Zb | X1 | X2 | X3 | X4 | X5 | X6 | X7 | X8 | S1 | S2 | R | Kwy | |
1/5 | X3 | 1/2 | 1/8 | 1 | 1/4 | 0 | 5/8 | -1/8 | 0 | 1/8 | 0 | 12/8 | C |
M | S2 | 0 | 1 | 0 | 2 | 3 | 1 | 0 | -1 | 0 | 1 | 18 | 6 |
Zj | 1/10 | 1/40+M | 1/5 | 1/20+2M | 3M | 1/8+M | -1/40 | -M | 1/40 | M | |||
C-Zj | 0 | 7/40-M | 0 | 7/20-2M | -3M | 14/80-M | 1/40 | 2+M | M-1/40 | 0 |
Wiersz X3 = stare S1:8
C | 1/10 | 1/5 | 1/5 | 2/5 | 0 | 3/10 | 0 | 2 | M | M | |||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Zb | X1 | X2 | X3 | X4 | X5 | X6 | X7 | X8 | S1 | S2 | R | Kwy | |
1/5 | X3 | 1 | 1/4 | 2 | 1/4 | 0 | 5/4 | -1/4 | 0 | 1/4 | 0 | 3 | 3/2 |
0 | X5 | 0 | 1/3 | 0 | 2/3 | 1 | 1/3 | 0 | -1/3 | 0 | 1/3 | 6 | |
Zj | 1/5 | 1/20 | 2/5 | 1/20 | 0 | 1/4 | -1/20 | 0 | 1/20 | 0 | |||
C-Zj | -0,1 | 0,15 | -0,2 | 0,35 | 0 | 0,05 | 0,05 | 2 | M-1/2 | M |
C | 1/10 | 1/5 | 1/5 | 2/5 | 0 | 3/10 | 0 | 2 | M | M | |||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Zb | X1 | X2 | X3 | X4 | X5 | X6 | X7 | X8 | S1 | S2 | R | Kwy | |
1/10 | X3 | 1/2 | 1/8 | 1 | 1/8 | 0 | 5/8 | -1/8 | 0 | 1/8 | 0 | 3/2 | |
0 | X5 | 0 | 1/3 | 0 | 2/3 | 1 | 1/3 | 0 | -1/3 | 0 | 1/3 | 6 | |
Zj | 1/20 | 1/80 | 1/10 | 1/80 | 0 | 5/80 | -1/80 | 0 | 1/80 | 0 | |||
C-Zj | 0,05 | 0,1875 | 0,1 | 0,3875 | 0 | 0,2375 | 1/80 | 2 | M-1/80 | M |
Wiersz X3 = stare X3:2
Koniec zadania, bo w wierszu „C-Zj” nie ma już żadnej ujemnej liczby.
Rozwiązanie: X1=0
X2=0
X3=3/2*1000=1500
X4=0
X5=6000
X6=0