Sunteți pe pagina 1din 26

15.

Să se rezolve următoarea problemă de programare liniară folosind


algoritmul simplex:
min  f  5x1  2 x2  x3
6 x1  2 x2  3x3  6
 x  3x  2 x  12
 1 2 3

2 x1  x2  4 x3  4

 xi  0, i  1,3

Rezolvare:
min  f  5x1  2 x2  x3
6 x1  2 x2  3x3  x4  6
 x  3x  2 x  12
 1 2 3

2 x1  x2  4 x3  x5  4

 xi  0, i  1,5

min  f  5x1  2 x2  x3  M x6  M x7
6 x1  2 x2  3x3  x4  6
 x  3x  2 x  x  12
 1 2 3 6

2 x1  x2  4 x3  x5  x7  4

 xi  0, i  1,7

 6 2  3 1 0 0 0
 
A  1 3 2 0 0 1 0
 2 1 4 0 1 0 1
 
54
5 -2 -1 0 0 M M
CB B XB a1 a2 a3 a4 a5 a6 a7 
0 a4 6 6 2 -3 1 0 0 0 -
M a6 12 1 3 2 0 0 1 0 6
M a7 4 2 -1  0 -1 0 1 1
fi-ci 16M 3M-5 2M2 6M1 0 -M 0 0
0 a4 9 15/2 5/4 0 1 -3/4 0 36/5
M a6 10 0 7/2 0 0 ½ 1 20/7
-1 a3 1 1/2 -1/4 1 0 -1/4 0 -
fi-ci 10M-1 -11/2 14 M 9 0 0 2 M 1
0
4 4

0 a4 38/7 15/2 0 0 1 -
13/14
-2 a2 20/7 0 1 0 0 1/7
-1 a3 12/7 1/2 0 1 0 -3/14
fi-ci -52/7 -11/2 0 0 0 -1/14

16. Să se rezolve următoarea problemă de programare liniară și să se


explice rezultatul:
max f  3x1  4 x2  x3
5 x1  x2  2 x3  7
x  2x  x  4
 1 2 3

3x1  2 x2  4 x3  2

 xi  0, i  1,3
Rezolvare: Aducem problema la forma standard, prin
transformarea inegalităților în egalități:

55
5 x1  x2  2 x3  x4  7
x  2x  x  x  4
 1 2 3 5

3
 1x  2 x 2  4 x 3  2

 xi  0, i  1,5

Prin adăugarea variabilelor artificiale x6 și x7, problema devine:

max f  3x1  4 x2  x3  M x6  M x7
5 x1  x2  2 x3  x4  7
x  2x  x  x  x  4
 1 2 3 5 6

3x1  2 x2  4 x3  x7  2

 xi  0, i  1,7
Aplicăm acum algoritmul simplex:

3 4 1 0 0 -M -M
CB B XB a1 a2 a3 a4 a5 a6 a7 
0 a4 7 5 -1 2 1 0 0 0 -
-M a6 4 1 2 -1 0 -1 1 0 4/2
-M a7 2 3  4 0 0 0 1 2/2
ci-fi -6M 4M3 4M4 3M1 0 -M 0 0
0 a4 8 13/2 0 4 1 0 0 1/2
-M a6 2 -2 0 -5 0 -1 1 -1
4 a2 1 3/2 1 2 0 0 0 1/2
ci-fi 1-2M -2M-3 0 -5M-7 0 -M 0 -2M-2

Criteriul de optim este satisfăcut, însă soluția din acesată ultimă


iterație conține o variabilă artificială, deci această problemă nu poate
avea soluții.

17. Să se rezolve problema de programare lineară:


56
min  f  4x1  3x2  6x3
2x1  x2  2x3  4


2x1  2x2  x3  2
(1) 
 x1  x3  3


 xi  0, i  1,3

Rezolvare: Construim problema duală:

maxg  4y1  2y2  3y3

2 y1  2 y2  y3  4


 y1  2 y2  3
(2) 
2 y1  y2  y3  6


 yi  0, i  1,3

Aducem problema (2) la forma standard introducând variabilele de


compensare y4, y5, y6 și aplicăm apoi algoritmul simplex:

maxg  4y1  2y2  3y3

2 y1  2 y2  y3  y4  4


 y1  2 y2  y5  3

2 y1  y2  y3  y6  6


 yi  0, i  1,6
57
Matricea sistemului este:

 2 2 1 1 0 0
 
A  1 2 0 0 1 0

 
 2 1 1 0 0 1
 

Rezolvăm problema duală, în final găsim și soluțiile pentru problema


inițială

4 2 3 0 0 0
CB B YB 
a1 a2 a3 a4 a5 a6
0 a4 4  2 1 1 0 0 2
0 a5 3 1 2 0 0 1 0 3
0 a6 6 2 1 1 0 0 1 3
ci-fi 0 4 2 3 0 0 0
4 a1 2 1 1 1/2 1/2 0 0 4
0 a5 1 0 1 -1/2 1/2 1 0 -
0 a6 2 0 -1 0 1 0 1 -
ci-fi 8 0 -2 1 -2 0 0
3 a3 4 2 2 1 1 0 0
0 a5 3 1 2 0 1 1 0
0 a6 2 0 -1 0 1 0 1
ci-fi 12 -2 -4 0 -3 0 0
-x4 -x5 -x6 -x1 -x2 -x3

Soluția problemei (2) este


maxg  12 ; y1  0 ; y2  0 ; y3  4 ; y4  0 ; y5  3 ;
y6  2 .
Avem deci pentru problema (1)

58
min  f  12 , cu soluția x1  3 ; x2  0 ; x3  0 ; x4  2 ; x5  4 ;
x6  0 ;

Notă: Soluțiile pentru pentru problema primară se găsesc pe ultima


linie de diferențe ci-fi , cu semne schimbate, începând cu diferențele
aferente variabilelor de compensare.

18. La o fermă, hrana pentru o categorie de animale puse la îngrășat


este compusă din două feluri A și B și se dă sub forma a două
amestecuri. Primul conține 1/3 din A și restul din B, iar al doilea este
format din părți egale. Ele trebuie distribuite astfel încât un animal să
primească din A cel puțin 30 kg., iar din B cel puțin 40 kg.
{tiind că 1 kg. din primul amestec costă 500 lei iar 1 kg din al doilea
costă 750 lei, să se determine cantitățile din fiecare amestec care să
asigure o cheltuială minimă.
Rezolvare: Notăm cu x1 cantitatea din amestec și cu x2 cantitatea
din al doilea amestec.
Avem, conform enunțului:
min  f  500x1  750x2
 x1 x2
 3  2  30

 2x1 x2
   40
 3 2
 x1, x2  0


Modelul dual va fi:
maxg  30y1  40y2

59
 y1 2 y 2
 3  3  500

 y1 y 2
   750
 2 2
 y1 , y 2  0


Rezolvăm problema duală:
Se aduce problema la forma standard introducând variabilele de
compensare y3, y4 și vom avea:
maxg  30y1  40y2  0y3  0y4
 y1 2 y 2
 3  3  y3  500

 y1 y 2
   y 4  750
2 2
 yi  0, i  1,4

1 2 1 0 
A 2 3
1 1 0 1
 3 2 

Soluția se determină cu ajutorul algoritmului simplex:

30 40 0 0
Baza CB Yb
a1 a2 a3 a4
a3 0 500 1/3 2/3 1 0
a4 0 750 1/2 1/2 0 1
ci-gi 0 30 40 0 0
a2 40 750 1/2 1 3/2 0
a4 0 375 1/4 0 -3/2 1

60
ci-gi 30000 10 0 -60 0
a2 40 0 0 1 3 -2
a1 30 1500 1 0 -3 4
ci-gi 45000 0 0 -30 -40

Soluțiile vor fi:

pentru problema duală: maxg  45000 ; y1  1500, y2  0


pentru primară: min  f  45000; x1  30 ; x2  40

19. Să se rezolve problema următoare cu ajutorul dualei:

min  f  2x1  3x2  x3


 x1  x2  3x3  6


2x1  x2  x3  8


 xi  0, i  1,3

Rezolvare: Construim duala acestei probleme:

maxg  6y1  8y2

 y1  2 y2  2

 y1  y2  3

3y1  y2  1

 y1, y2  0

61
Pentru rezolvare aducem problema la forma standard, adăugând
variabilele de compensare y3, y4, y5

maxg  6y1  8y2

 y1  2 y2  y3  2


 y1  y2  y4  3

3y1  y2  y5  1


 yi  0, i  1,5

Matricea atașată sistemului este:

 1 2 1 0 0
 
A   1 1 0 1 0

 
 3 1 0 0 1
 

Se poate trece la aplicarea algoritmului simplex:

6 8 0 0 0
CB B YB a1 a2 a3 a4 a5  1
0 a3 2 1  1 0 0 1 1/2
0 a4 3 -1 1 0 1 0 3 -
0 a5 1 3 1 0 0 1 1 3
ci-fi 0 6 8* 0 0 0
8 a2 1 1/2 1 1/2 0 0 2
0 a4 2 -3/2 0 -1/2 1 0 -

62
0 a5 0 5/2 0 -1/2 0 1 0

ci-fi 8 2* 0 -4 0 0
8 a2 1 0 1 3/5 0 1/5
0 a4 2 0 0 -4/5 1 3/5
6 a1 0 1 0 -1/5 0 2/5
ci-fi 8 0 0 -18/5 0 -4/5

Deci soluția problemei duale este:


18 4
maxg  6 ;  min  f  6 cu x1  ; x2  0 ; x3  .
5 5

20. Să se găsească soluția următoarei probleme de programare lineară,


rezolvând duala ei prin algoritmul simplex:

min  f  30x1  60x2  40x3  20x4

3x1  x2  x3  2x4  9


 x1  2x2  2x3  x4  10
(1) 
2x1  3x2  2x3  x4  8

 xi  0, i  1,4

Rezolvare: Problema duală este sub forma :

maxg  9y1  10y2  8y3

63
3y1  y2  2 y3  30

 y1  2 y2  3y3  60


 y  2 y2  2 y3  40
(2)  1

2 y1  y2  y3  20


 yi  0, i  1,3

Aducem problema (2) la forma standard introducând variabilele de


compensare y4, y5, y6, y7:
maxg  9y1  10y2  8y3
3y1  y2  2 y3  y4  30

 y1  2 y2  3y3  y5  60


 y1  2 y2  2 y3  y6  40

2 y1  y2  y3  y7  20


 yi  0, i  1,7
Matricea asociată este:
 3 1 2 1 0 0 0
 
 1 2 3 0 1 0 0
A  
1 2  2 0 0 1 0
 
 
 2 1 1 0 0 0 1

Putem aplica acum algoritmul simplex:

64
9 10 8 0 0 0 0
CB B YB a1 a2 a3 a4 a5 a6 a7 
0 a4 30 3 -1 2 1 0 0 0 -
0 a5 60 1 2 3 0 1 0 0 30
0 a6 40 -1 2 -2 0 0 1 0 20 -
0 a7 20 2  1 0 0 0 1 20 2
ci-fi 0 9 10* 8 0 0 0 0
0 a4 50 5 0 3 1 0 0 1
0 a5 20 -3 0 1 0 1 0 -2
0 a6 0 -5 0 -4 0 0 1 -2
10 a2 20 2 1 1 0 0 0 1
ci-fi 200 -11 0 -2 0 0 0 -10

Deci min  f  200 , cu soluția

x1  0 ; x2  0 ; x3  0 ; x4  10

21. Să se rezolve următoarea problemă, prin intermediul dualei:

min  f  4x1  3x2

4x1  x2  4


 x1  x2  1

 6x1  5x2  3


 xi  0, i  1,2

Rezolvare: Duala acestei probleme este:

65
maxg  4~x1  ~x2  3~x3
4 ~
x1  ~
x2  6~ x3  4

~ ~
 x1  x2  5~ x3  3

 ~
 x1  0, i  1,3
Aducem această problemă la forma standard:
maxg  4~x1  ~x2  3~x3
4 ~
x1  ~
x2  6 ~x3  ~
x4  4
~ ~ ~ ~
 x1  x2  5 x3  x5  3
~
 xi  0, i  1,5

Matricea asociată este:


~  4 1  6 1 0
A
 1 1 5 0 1
 

Putem trece la aplicarea algoritmului simplex:

4 -1 3 0 0
CB B ~ a1 a2 a3 a4 a5 
XB
0 a4 4  1 -6 1 0 1
0 a5 3 1 1 5 0 1 3
ci-fi 0 4* -1 3 0 0
4 a1 1 1 1/4 -3/2 1/4 0 -
0 a5 2 0 3/4 13/2 -1/4 1 4/13
ci-fi 4 0 -2 9* -1 0
4 a1 19/3 1 11/26 0 5/26 3/13
3 a3 4/13 0 3/26 1 -1/26 2/13
ci-fi 88/13 0 -79/3 0 -17/26 -18/13

66
Soluțiile problemei inițiale sunt:

min  f 
88
; x1 
17
; x2 
18
.
13 26 13

22. Să se rezolve problema de programare liniară prin duala ei:


min  f  5x1  6x2
2x1  x2  6

 x1  x2  6
(1) 
 x2  1

 x1, x2  0
Rezolvare: Construim duala acestei probleme:
maxg  6y1  6y2  y3
2 y1  y 2  5

(2)  y1  y 2  y3  6
y , y , y  0
 1 2 3
Forma standard a problemei duale se obține prin adăugarea
variabilelor de compensare y4, y5 :
maxg  6y1  6y2  y3
2 y1  y2  y4  5


(2')  y1  y2  y3  y5  6


 yi  0, i  1,5
Matricea asociată problemei (2') este:
~  2 1 0 1 0
A
 1 1 1 0 1
 
~
Deoarece în matricea A avem vectorii unitari (1,0) și (0,1) putem
67
trece la aplicarea algoritmului simplex:

6 6 1 0 0
CB B YB 
a1 a2 a3 a4 a5
0 a4 5  1 0 1 0 5/2
0 a5 6 1 1 1 0 1 6
ci-fi 0 6* 6 1 0 0
6 a1 5/2 1 1/2 0 ½ 0 5
0 a5 7/2 0 1/2* 1 -1/2 1 7
ci-fi 15 0 3 0 -3 0
6 a2 5 2 1 0 1 0 -
0 a5 1 -1 0  -1 1 1
ci-fi 30 -6 0 1* -6 0
6 a2 5 2 1 0 1 0
1 a3 1 -1 0 1 -1 1
ci-fi 31 -5 0 0 -5 -1

Deoarece toate diferențele ci-fi  0, algoritmul simplex se încheie, deci


soluția optimă este:
maxg  31; min  f  31; x1  5 ; x2  1.
Alte metode de rezolvare a unor probleme de optimizare:
Metoda directă

1. min  f  3x1  2x2  4x3


 x1  3x2  2x3  3


3x1  3x2  x3  4


 xi  0, i  1,3
Soluție: Exprimăm două variabile în funcție de a treia:

68
3x  2x  3  x  x3  2x1  1
 2 3 1 
  5
3x2  x3  4  3x1  x2  1 x1
  3
2x1  1  0
 1
Deoarece: xi  0, i  1,3    x1  ; x1  1

1 x1  0 2
1 
x1   ,1
2 
Exprimăm funcția f prin x1 și avem:
43x1  22 1 1 
f  ;  f min  43  22  0,16
3 3 2 

2. Să se determine valorile extreme pentru funcția:


f  2 x1  3x2  x3 , cu condițiile:
 x1  x2  3x3  6


2x1  x2  x3  8


 xi  0, i  1,3
Soluție:
 x1  x2  3x3  6
 14  4x3
  3x1  4x3  14  x1 

2x1  x2  x3  8 3
2  (14  4x3 ) 5x  4
 x2  8   x3  3
3 3
14  4x3  0
 4 7
x
Din: i  0     x3 

5x3  4  0 5 2

f 
2  (14  4x3 ) 5x  4  x  16  10x3
 3 3 3
3 3 3
69
 4
 x3  5
 f 8 f min  8
 pentru 
7 f max  17
 x3   f  17
 2

3. Să se rezolve:

min  f  9x1  6x2  12x3 , cu condițiile:

 x1  2x2  3x3  6


2x1  x2  x3  4


 xi  0
Soluție:

 x1  2x2  3x3  6 
 x1  2x2  3x3  6
 
2x1  x2  x3  4
 
4x1  2x2  2x3  8

2  x3 8  5 x3
 3x1  x3  2 ; x1   x2 
3 3

9(2  x3 ) 6(8  5x3 )


f    12x3  6  3x3  16  10x3  12x3
3 3

f  5x3  22

Din:

70
 x3  2  x3  0
2  x3  0
 
xi  0    8
    x 
8 5x3 0

3
5

8
 f min  22 ; f max  5   22  30; f min  22
5

Probleme propuse

Să se rezolve următoarele probleme de programare liniară:

1. min  f  3x1  x2
 2 x1  x2  12

 x1  x2  8

2  x1  5

 x2  1
Soluție: min  f  7 ; x1  2 ; x2  1

2. max f  2x1  3x2


 x1  x2  6

 x1  2x2  8

0  x1  4

0  x2  3
Soluție: max f  14; x1  4 ; x2  2

71
3. min  f  x1  2x2  3
3x1  2x2  6


6x1  x2  6


 x1  0, x2  1

Soluție: min  f 
35 5
; x1  ; x2  1
6 6

4. max f  x1
 x1  x2  1


2x1  x2  2


 x1  0,x2 0
Soluție: problema nu are soluții

5. min  f  x1  2x2  x3  x4  2x5


2x1  4x2  x3  4x5  100


 x1  5x3  x4  6x5  200

 x2  4x3  2x4  200


 xi  0, i  1,5
Soluție: min  f  88 ; x1  0 ; x2  16 ; x3  36 ;
x4  20; x5  0 ;

6. min  f  x1  x2  x3  x4  x5  x6

72
 x1  3x4  x5  x6  2
x  2x  x  2x  1
 2 4 5 6

 x3  x 4  x5  3 x 6  1

 xi  0, i  1,6
Soluție: min  f  2 ; x1  0 ; x2  1 ; x3  0 ;
1 1
x4  ; x5  0 ; x6  ;
2 2

7. min  f  3x1  x2  3x3  x4


 x1  2 x4  x3  x 4  1
2 x  2 x  3 x  3 x  9
 1 2 3 4

 x1  x 2  2 x3  x4  5

 xi  0, i  1,4
 37
Soluție: min  f 
30 18 1
; x1  ; x2  0 ; x3  ; x4  ;
13 13 3 13

8. max f  x1  x2
 x1  x2  1


6x1  2x2  1


 x1  0,x2 0
1
Soluție: max f 
1
; x  0; x2 
2 1 2

9. max f  3x1  4x2


73
 x1  4x2  24

3x1  x2  21

 x1  x2  9

 x1, x2  0
Soluție: max f  32 ; x1  4 ; x2 5

10. min  f  3x1  2x2

2x1  x2  5

3x1  2x2  6

 x1  x2  4

 x1, x2  0

Soluție: min  f 
54 16 3
; x1  ; x2 
7 7 7

11. max f  x1  x2
 x1  2x2  1


2x1  x2  1

 x1  x2  1


 x1, x2  0
Soluție: max f  2 ; x1  1; x2  1

74
12. min  f  x1  x2  x3  x4  x5  x6

 x1  2x2  x3  3x4  4x5  4x6  5



2x1  x2  x3  4x4  x5  x6  4


 x1  x2  x3  2x4  2x5  2x6  1

 2x1  x2  3x3  x4  6


 xi  0, i  1,6

Soluție: min  f  
13 11 1
; x1  0 ; x2  ; x3  ;
6 6 6
1
x4  ; x5  x6  0 ;
2

13. max f  x1  x2  x3  x4

 x1  x2  2x3  3x4  x5  6


 x3  2x4  x5  x6  2

 x1  3x4  1


 xi  0, i  1,6

Soluție: max f  1; x1  1; x2  0 ;
x3  0 ; x4  x5  0 ; x6  2

14. max f  2x1  x2

75
 x1  x2  x3  5
 x  x  x  0
 1 2 4

6 x1  2 x2  x5  21

 xi  0, i  1,5

11 9 1
Soluție: x1  ; x2  ; x3  x5  0 ; x4  ;
4 4 2

 
15. max f  4 x1  3x2  2 x3
23x1  27x2  5x3  1

 x1  4x2  2x3  3


4x1  5x2  x3  0

 22x1  21x2  7x3  2

 xi  0, i  1,3

1 5
Soluție: x1  0 ; x2  ; x3  ;
2 2

16. max f  10x1  7x2  2x3  x4


3x1  2x2  x3  1


 x1  2x3  x4  12

2x1  x3  3x4  16


 xi  0, i  1,4

76
17 77 19
Soluție: ; x1  ; x2  ; x3  ; x4  0 ;
3 12 6

17. min  f  5x1  x2  2x3


 x1  2x2  3x3  12

2x1  x2  x3  8


3x1  x2  2x3  6 Soluție: Optim infinit

 x1  x2  6 x3  6


 xi  0, i  1,3
Prin intermediul problemei duale, rezolvați următoarele probleme de
programare liniară:

1. min  f  3x1  5x2  4x3


2x1  x2  12


 x1  2x2  2x3  20

 x2  2x3  15


 xi  0, i  1,3
15
Soluție: min  f  48 ; x1  6 ; x2  0 ; x3  ;
2

2. min  f  12x1  10x2

77
2x1  5x2  20


3x1  x2  12

 x2  2

 xi  0, i  1,2

Soluție: min  f 
840 40 36
; x1  ; x2  ;
13 13 13

3. min  f  5x1  2x2  x3  3x4  3x5


2x1  x3  x5  700


 x1  x2  2x4  x5  400


 xi  0, i  1,5
Soluție: min  f  1300; x1  0 ; x2  0 ;
x3  700 ; x4  200; x5  0

4. Pentru realizarea a două produse P1 și P2 se găsesc la dispoziție


patru feluri de materie primă M j , j  1,4 în cantitățile 12, 8, 20
respectiv 12 unități. O unitate din P1 consumă din M1, M2 și M3 câte 2,
1, 4 unități și aduce un beneficiu de 2000 u.m., iar o unitate din P2
consumă din M1, M2 și M4 câte 2, 2, 4 unități și aduce un beneficiu de
3000 u.m. Să se determine numărul de unități ce trebuie realizate din
P1 și P2 astfel încât beneficiul să fie maxim.

Soluție: max f  14000 u.m. M1  12; M2  8; M3  16; M4  8

5. Determinați o rație alimentară de cost minim, știind că sunt

78
necesare 3000 calorii, 100g proteine și se folosesc două feluri de
alimente A1 și A2. Primul aliment A1 de 500g, conține 1000 de calorii și
25 g proteine, iar al doilea aliment A2 tot de 500g conține 2000 de
calorii și 100g de proteine. Prețul pe unitate (500g) este de 1,80 u.m.
pentru A1 și 8 u.m. pentru A2.
1
Soluție: min  f  7,60 u.m. x  2; y   1000g; 250 g.
2

6. La o fabrică de stofe se produc două sortimente A și B. Primul


sortiment conține 200g bumbac și 800g lână, iar al doilea conține 400g
bumbac și 600g lână pe unitatea de produs (m2). Fabrica are repartizat
prin plan 20 tone bumbac și 60 tone lână. Beneficiul este de 80
u.m./m2 pentru A și 60 u.m./m2 pentru B. Să se determine cantitatea
de stofă din cele două sortimente, exprimată în m2, care trebuie
fabricată astfel încât beneficiul să fie maxim.

Soluție: 60 000 m2; 20 000 m2; 6 000 000 u.m.

79

S-ar putea să vă placă și