From this, all the names needed can be formed. For example, quantity demanded of commodity "C" in region 2 is "XDC2"; quantity traded of com- modity C from region 1 to region 2 is XTC12. The expanded LCP tableau for the problem has the form shown in Figure 1. The rows here are expressed as ">" greater than or equal to constraints. The first three rows express the requirement that the total amount supplied to each region (including domestic supply and net inflows from trade) is greater than or equal to the quantity demanded in that region. The second set of 3 rows express the relationship that the quantity produced in each region is at least as great as the amount supplied to all regions. These rows comprise the "A matrix". The next six rows are the demand and supply functions. Each of these rows will normally hold with strict equality as the complementarity conditions assure this as long as positive quantities are produced and demanded. The final nine rows, along with their complementarity conditions, assure that for each trade flow the associated demand and supply prices will differ by no more than the transport cost for that particular flow* In summary, the whole matrix describes an economic equilibrium or market clearing condition for the commodity sector with which we are concerned. The input for this particular problem is shown in Figure 2. The reader should note the difference between the matrix tableau and the original economic data with regard to the signs (- or +) attached to Q- matrix and C-vector (OBJ) values. There are two reasons for this difference. First of all, the LCRAND and RANDQP work in a tableau expressed in terms of less than or equal to constraints. The second reason lies in that a QP problem may be defined with c'x 1/2x'Qx as the objec- tive function or as c'x + 1/2x'Qx. LCRAND and RANDQP use the latter. Confusion can be avoided by closely abiding by the following rules: 1) For demand functions, insert both slope and intercept coefficients with the opposite signs from what they actually have. 2) Supply function coefficients are inserted with the same signs which they actually have. 3) All cost data is inserted with a positive sign. 4) All profit data is inserted with a negative sign. Inspection of our sample input problem should reveal that these rules have been followed.