How to Solve Word Problems Programmatically

Chapter

15

---

 

 

Chapter 15.  Simultaneous Equations

 

 

 

 

15.1

Variables in Meaning Table

15.2

Extracting Equations From Meaning Table

15.3

Equal Number of Equations and Variables

15.4

Gather More Relationships If Needed

15.5

Using Software

15.6

Select a Variable to Isolate

15.7

Substitute Result of Isolation

15.8

Repeat This Process

15.9

Remove Redundant Equations

15.10

Activities and Explorations

 

 

 

15.1

Variables in Meaning Table

 

 

A Broadway theater has 500 seats, divided into orchestra, main, and balcony seating. Orchestra seats sell for $50, main seats for $35, and balcony sets for $25. If all the seats are sold, the gross revenue to the theater is $17,100. If all the main and balcony seats are sold but only half the orchestra seats are sold, the gross revenue is 14, 600. How many are there of each kind of seat.

Total Seats

Source: College Algebra, Sullivan, p 532, p.21

 

Qty

Value

Meaning

Relationship

q1

a

orchestra seats

 

q2

b

main seats

 

q3

c

balcony seats

 

q4

500

total seats

q1 + q2 + q3

q5

50

[dol~Orch] / orchestra seats

q10 / q1

q6

35

[dol~Main] / main seats

q11 / q2

q7

25

[dol~Balc] / balcony seats

q12 / q3

q8

17,100

[dol~All]

 

q9

14,600

[dol~Half]

 

q10

 

[dol~Orch]

 

q11

 

[dol~Main]

 

q12

 

[dol~Balc]

 

 

The variables in a meaning table consists of the quantity symbols q1, q2, q3, etc. and any symbol introduced in the Value column. When entering this meaning table, we gave our own variable names to quantities q1, q2, and q3 rather than just use the symbols q1, q2, and q3 to emphasize what we are looking for. This is not necessary, but often done for reference convenience. Notice that we did not give the last 3 quantities an alternative variable symbol.

 

(We have purposely left out relationships associated with quantities q8 and q9 to illustrate what happens when we do not have enough equations.)

 

This problem was selected to illustrate the type of problems that occur at the college level and demonstrate your ability to solve complex problems by breaking up the problem into simple steps using the concepts discussed in this book.

 

 

15.2

Extracting Equations From Meaning Table

 

 

Qty

Value

Meaning

Relationship

q1

a

orchestra seats

 

q2

b

main seats

 

q3

c

balcony seats

 

q4

500

total seats

q1 + q2 + q3

q5

50

[dol~Orch] / orchestra seats

q10 / q1

q6

35

[dol~Main] / main seats

q11 / q2

q7

25

[dol~Balc] / balcony seats

q12 / q3

q8

17,100

[dol~All]

 

q9

14,600

[dol~Half]

 

q10

 

[dol~Orch]

 

q11

 

[dol~Main]

 

q12

 

[dol~Balc]

 

 

The first entry in the Relationship column (associated with q4) comes from the definition of total. The next three come from the division operator in the meaning columns assuming a price proportional to the number of seats purchased (no discounts for volume purchases). Since each entry in the Value, Quantity, or Relationship columns in a row equal each other, we can have an equation between each entry and the corresponding quantity q1, q2, etc. Listed in the order of appearance down each column we have:

 

a=q1, b=q2, c=q3,

500=q4, 50=q5, 35=q6, 25=q7

17100=q8, 14600=q9

q4 = q1 + q2 + q3

q5 = q10 / q1

q6 = q11 / q2

q7 = q12 / q3

 

The first nine equations (listed across the first three rows above) give us simple equations that assign values (either constants or assigned variable expression) in the Value column to the generic quantity variables (q1, q2, etc.). So when we formulate the equations, we often immediately substitute such quantities into the other equations to get a formulation like:

 

17100=q8

14600=q9

500 = a + b + c

50 = q10 / a

35 = q11 / b

25 = q12 / c

 

We did not substitute q8 or q9 into any other equation, since no equations (in the current table) related them to the other quantities.

 

 

 

15.3

Equal Number of Equations and Variables

 

 

17100=q8

14600=q9

500 = a + b + c

50 = q10 / a

35 = q11 / b

25 = q12 / c

First Formulation Attempt

 

This system of equations contains 8 variables (a, b, c, q8, q9, q10, q11, q12) each of which we desire a value so that they satisfy all equations simultaneously. Usually, it takes the same number of equations as variables for us to find a solution. Since we have only 6 equations we need 2 more equations.

 

 

15.4

Gather More Relationships If Needed

 

 

A Broadway theater has 500 seats, divided into orchestra, main, and balcony seating. Orchestra seats sell for $50, main seats for $35, and balcony sets for $25. If all the seats are sold, the gross revenue to the theater is $17,100. If all the main and balcony seats are sold but only half the orchestra seats are sold, the gross revenue is 14, 600. How many are there of each kind of seat.

Total Seats

Source: College Algebra, Sullivan, p 532, p.21

 

Qty

Value

Meaning

Relationship

q1

a

orchestra seats

 

q2

b

main seats

 

q3

c

balcony seats

 

q4

500

total seats

q1 + q2 + q3

q5

50

[dol~Orch] / orchestra seats

q10 / q1

q6

35

[dol~Main] / main seats

q11 / q2

q7

25

[dol~Balc] / balcony seats

q12 / q3

q8

17,100

[dol~All]

q10 + q11 + q12

q9

14,600

[dol~Half]

q10 + q11 + .5 * q12

q10

 

[dol~Orch]

 

q11

 

[dol~Main]

 

q12

 

[dol~Balc]

 

 

When looking for additional equations, we ask ourselves how do the remaining quantities relate to each other. After reviewing the problem again, we discover other relationships; we see that the words associated with 17,100 and 14,600 provide us with two more equations that relate the q8 and q9 quantities to the other three generic quantities:

 

17,100 = q10+q11+q12

14,600 = q10+q11+.5*q12

 

 

 

15.5

Using Software

 

 

500 = a + b + c

50 = q10 / a

35 = q11 / b

25 = q12 / c

17,100 = q10+q11+q12

14,600 = q10+q11+.5*q12

A set of 6 equations with 6 variables

 

To solve this system of equations using the menu option "Equation / Solve (Advanced)" at the website http://www.quickmath.com/ we would enter the equations in the following input screen and get the subsequent results. (Do not enter the commas)

 

Input

 

Output

 

This indicates that an approximate solution to our problem is a=106, b=193, and c=200, where we round down to obtain an integer number of seats.

 

How would we solve this without a computer?

 

 

15.6

Select a Variable to Isolate

 

 

500 = a + b + c

50 = q10 / a

35 = q11 / b

25 = q12 / c

17,100 = q10+q11+q12

14,600 = q10+q11+.5*q12

A set of 6 equations with 6 variables

 

We can solve some systems of equations (having same number of variables as equations) by repeatedly isolating a variable in a selected equation and substituting it into the other equations. On dropping that equation, we have one less variable and one less equation. You can select any equation and variable to isolate, but it often helps to begin by selecting a generic variable that is easy to isolate to simplify the amount of work that we have to do. In this case quantity q10 (like q11 and q12) isolate easily.

 

 

15.7

Substitute Result of Isolation

 

 

500 = a + b + c

17,100 = 50*a+35*b+25*c

14,600 = 50*a+35*b +.5*25*c

On Substituting:

q10=50*a

q11=35*b

q12=25*c

 

On isolating q10 we get, q10=50*a. Likewise, we can also do this for quantities q11=35*b and q12=25*c. The next step involves substituting these solved expressions for each appearance of these quantities in the other equations. This results in a system of equations with 3 equations and three unknowns.

 

 

15.8

Repeat This Process

 

 

17,100 = 50*(500-b-c)+35*b+25*c

14,600 = 50*(500-b-c)+35*b +.5*25*c

Isolate and Substitute

a=500-b-c

 

We repeat this process for each of the other variables. Let us continue by isolating the variable "a" in the first equation, primarily because it appears less complicated than in the other equations. We now remove the equation that we solved, and simplify the resulting second and third equations.

 

17100=25000-50*b-50*c+35*b+25*c

15*b+25*c=7900

 

Go ahead and verify the other simplification:

 

15*b+25*c=7900

15*b+37.5*c=10400

Simplified Expressions

 

Now solve for c in the first equation (because it isolates easier since 25 divides 7900 evenly) and substitute the results into the second equation:

 

15*b+37.5*(316-.6*b) =10400

Isolate and substitute:

c=(7900-15*b)/25=316-.6*b

 

Now we isolate the variable b:

15*b+11850-22.5*b=10400

7.5*b=1450

b=193.33

We substitute this value back into the other isolation equations to determine other values:

 

b= 193.33

c= =316-.6*193.33 =200

a=500-a-b=500-200-193.33=106.67

 

 

Now you can see why computers are so useful. This process was tedious, but not "difficult" in the sense of being creative. Indeed, the creative part of solving word problems is the stage in which we determine meaning; a computer can do the rest using programmable steps.

 

 

15.9

Remove Redundant Equations

 

 

2*s+1=t

s=(t-1)/2

t-1=2*s

Beware of Redundant Statements

 

In some cases, it may appears as if we have the same number of equations as the number of variables; but two or more equations may actually represent the same relationship, just rearranged like illustrated above. We call such equations "redundant ". When we discover redundant equations (even in the process of solving the equations), we can remove them from consideration. So, in this case, only one of these would count toward the number of statements in our system of equations.

 

 

15.10

Activities and Explorations

 

 

 Activities:

 

Solve Problems

Solve simultaneous equations in textbook by hand and check it using software at:

http://www.quickmath.com/ (using the menu option "Equation / Solve (Advanced)

 

 

Explorations:

 

Simultaneous Equations (Enter in Search Engines)

http://www.mathsrevision.net/gcse/simultaneous_equations.php

 

 

Exercises:

 

Do Related Problems In Your Textbook

 

 

Home  |  Top

 

Copyright 2004  Dr. Ranel E. Erickson