COMMENT- THIS PORTION OF THE PROGRAM READS IN 

 THE PROBLEM DATA AND PRINTS IT OUT IN TABLE FORM, 



DIMENSION A(14,14), KR ( 1 4 ) , KG ( 1 4 .'i 

 30 FORMAT (1615) 



40 FORMAT (IH ,39H NO SOLUTION, CONTRADICTING CONSTRAINTS///) 

 50 FORMAT (IH , 32H NO SOLUTION, INFINITE OBJECTIVE///) 

 60 FORMAT (IH , I 5 , 7F 1 . 4 ) 

 70 FORMAT (IH , 1 OX , 2 I 1 , 5X , F 1 . 4 ) 

 80 FORMAT ( 1 HO » 5X , 7 I 1 ) 

 90 FORMAT ( 8F 1 • 4 ) 



READ 30* M, N 



DO 1 I = 1,M 

 1 READ 90,(A(I,J), J = 1,N) 



READ 30, (KR( I ) , I = 1 ,M) 



READ 30,(KC(J), J = 1,N) 



PRINT 80, (KC(J), J = 1,N) 



DO 2 I = 1 ,M 



2 PRINT 60, KR ( I ) , ( A ( I , J) , J = 1,N, 

 MI = M-1 



NI = N-1 



COMMENT- THE FOLLOWirJG STEPS ASK THE QUESTION, 

 IS THERE A NEGATIVE VALUE IN THE LAST COLUMN. 



3 DC 4 I = 1 , M I 



IF ( A( I ,N) ) 5, 4, 4 



4 CONTINUE 

 GO TO 11 



COMMENT- IF THE ANSWER IS YES, THE FOLLOWING STEPS 

 DETERMINE THE APPROPRIATE PIVOT ROW AND COLUMN, 



5 = 0. 



DO 1 J = 1 ,NI 



DO 9 I = 1 ,MI 



IF (A(I,J)) 9, 9, 6 



6 IF (A(I,N)) 7, 9, 9 



7 IF (Q - A ( I ,N )/A( I , J) ) 9, 9, 8 



8 = A(I,N)/A(I,J) 

 KROW = I 



KCOL = J 



9 CONTINUE 



IF (Q) 20, 10, 20 

 10 CONTINUE 

 PRINT 40 

 GO TO 95 



COMMENT- IF THE ANSWER IS NO, THE FOLLOWING STEPS 

 ASK THE QUESTION, IS THERE A POSITIVE VALUE IN 

 THE BOTTOM ROW, 

 = 0. 



14 J =1 ,NI 

 (A(M,J)) 14, 14, 12 

 (QT - ACM, J)) 13, 14, 14 

 = A (M, J ) 

 KCOL = J 



14 CONTINUE 



IF (QT) 95, 95, 15 



COMMENT- IF THE ANSWER IS NO, THE PROBLEM IS SOLVED 

 AND THE SOLUTION IS PRINTED OUT, 



IF THE ANSWER IS YES, THE FOLLOWING STEPS DETERMINE 

 THE APPROPRIATE PIVOT ROW AND COLUMN, 



15 0= -99999999, 

 DO 18 I = 1 .MI 



IF ( A( I ,KCOL) ) 16, 18, 18 



