Finite Math > Linear Programming - Dual Problem

Brooks/Cole TI-89 Tools Guide Screen | Installing the HP Program | Using the HP Program | Getting Additional Information

Linear Programming consist of this page, Graphical Maximums, Graphical Minimum, Simplex Maximums, and Simplex Minimums pages. Click on Graphical Maximums, Graphical Minimums, Simplex Maximums, or Simplex Minimums to go to that page.

Brooks/Cole TI-89 Tools Guide Screen

Here is Brooks/Cole Math Tools Guide TI-89 screen from Chapter 6 Linear Programming

bc_simplexFigure 1 Chapter 6 Linear Programming - (Interactive Video Skillbuilder CD-ROM)

Next, we look at using the HP Prime for this page. Since the HP Prime Lite / Free has no program editor or HP connectivity kit, we used CAS Var programs to add pivmat. An alternate version using CAS qualifiers is shown. CAS qualifiers allow CAS commands to work in the HOME and CAS views. The pivot in the first version of the functions works without the qualifer in the HOME view. The HOME function SCALE works in CAS view as well. Tthe alternate version is what we use for this sections  Simplex Maximums and Simplex Minimums flyout pages Youtube videos.

The program pivmat performs the calculations by transforming the matrix by means of row operations using the specified row and column to produce an equivalent matrix having a 1 for the pivot row and column value and 0's for the remaining pivot column's values.

Installing the HP Program

Open the Lite / Free / Pro or virtual HP Prime in CAS view. Copy the function pivmat code and paste it to the CAS command line. Press Enter.

pivmat(m,r,c):=
BEGIN
return pivot(SCALE(m,(1/m(r,c)),r),r,c);
END;

For the physical calculator we can alternately use the program editor. Create a shell #cas - #end program using the program editor with the function name, Run the HP Connectivity Kit. Open the shell program, cut and paste above function code leaving the #cas and #end lines. Use disk icon to save the revised program. Click on this link for video demonstrating the procedure.

The Pro or virtual HP Prime can also alternately use the program editor. Create a shell #cas - #end program using the program editor with the function name, In the shell program, cut and paste above function code leaving the #cas and #end lines

Alternate - using CAS qualifiers

pivmat(m,r,c):=CAS(pivot(CAS(mRow(1/m(r,c),m,r)),r,c))   or

pivmat(m,r,c):=
BEGIN
return CAS(pivot(CAS(mRow(1/m(r,c),m,r)),r,c));
END;

Note: pivmat needed Begin return End - HP Connectivity Kit crashed when Kit tried to display Pro/Virtual CAS Vars without Begin return End included.  2019/04/02 - No longer crashes - We no longer use BEGIN return END.

Using the HP Program

We will use four screen collage approach to explain our HP Prime solutions. The four screen collage allows us to have multiple problems shown in a small area using Textbook display. Press the CAS key to change to CAS view. Use the Clear key to erase any previous work.

The upper left screen, figure 2, shows the results of us pasting in pivmat functions to the command line and pressing Enter. When we use the HP Connectivity Kit to to display the value of the Pro/Virtual CAS Vars pivmat we see that the BEGIN, RETURN, and END are still there. The history does not always show what is input in the command line. The next two calculation are used to determine the pivot element, see above TI discussion.

In the upper right screen, figure 2, we assign the matrix to a. Key in a:=[[ ]], this is bracket key pressed and then pressed again. Each element is followed by a comma in a row until the last element. Move down and to far left with the arrow pad. Key in the next row using row technique just described. Move down and to far left with the arrow pad to enter the last row, again using the row technique. Press Enter. Key in b:=, press the Vars key followed by the 2 Program menu or number 2, to bring up the program sub menu. Highlight the pivmat function or press its number. Press the ( ) key. Fill in a, 1,1 as the parameters. Press Enter.

By scrolling down, the lower left screen, figure 2, shows the complete results for b. The next two calculation are used to determine the next pivot element, see above TI discussion. The lower right screen, figure 2 completes the simplex tableau process. In the history select b:=pivmat(a,1,1) and use soft key Copy to move to the command line. Edit it so that it reads c:=pivmat(b,2,2). Press Enter to see the results.

simplex_dualFigure 2 HP Prime dual problem

Getting Additional Information

At the present time only the HP Prime Guide Algebra Fundamentals is available in eBook and Print. As demonstrated by this example, the Trigonometry, and Calculus examples, the HP Prime Free / Lite, Pro, virtual and handheld are able to perform anything the TI-89 could perform. With programming and Apps added, the HP Prime options are unlimited.

I am working on material for additional volumes. For now you can Google HP Prime and a topic for additional information. You can also see threads such as my thread on Xcas Youtube videos that has 52 screens shots of math examples with multiple commands per screen shot, that can provide you with some assistance with all sorts of math topics.

 
cls

Prime Academy | Learning Center

giving every student every chance to learn and understand

© 2018 -2022 Computer Learning Service. All Rights Reserved.