Jump to content
Science Forums

Recommended Posts

Posted

OK, here's the scoop. A math tutor friend called me tonight with a problem brought in by a student. Without going too far into the details, we got off on a procedural discussion for using matrices to solve the problem and left off with no solution and each of us to work it over more.

 

So, I have worked it to death and by means other than matrices I have what I think is an answer, if not a solution. So, without further ado, here's the deal:

 

5 bales of hay are weighed two at a time, in each possible pairing, producing the following table. The question then posed is, "what is the weight, in pounds, of each of the 5 bales of hay?"

 

a+b=110 lbs.

a+c=112

a+d=113

a+e=114

b+c=115

b+d=116

b+e=117

c+d=118

c+e=120

d+e=121

 

:) ;) ;)

 

i have concluded that the table is in error.

Posted

The first useful thing to realize is that the weight of all 5 bales must be the sum of those 10 weights divided by 4. Let's call this total T. The weight of a single bale can be gotten by subtracting the weight of the other 4 from T, which can be done by subtracting the sum of the right two pairs. If we subtract a+b=110 and c+d=118 for instance, we are left with the weight of e.

Posted

Hmmmmm... I tried a bit of checking, it seems as if the values given are not consistent (not just any set of 10 values will be). Can't check much better now though.

Posted

Using simple substitution you can obtain:

a+b+c+2d+e=110+118+121

a+b+c+2d+e=349

a+b+c+2d+e-(a+B)=349-110

c+2d+e=239

c+2d+e-(c+e)=239-120

2d=119

d=59.5

 

a+d=113

a+59.5=113

a=113-59.5

a=53.5

 

b+d=116

b+59.5=116

b=56.5

 

c+d=118

c+59.5=118

c=58.5

 

d+e=121

59.5+e=121

e=61.5

But then substituting them back you get the following two inconsistencies:

a+e=115 (not 114)

b+e=118 (not 117)

So as Q suspected, this set of equations is inconsistent.

 

Will cause lots of puzzling I'm sure! :thumbs_up

 

Warning: my arithmetic is totally sucky (that's why I went into computers!), so YMMV....

 

And so you have thirteen tens, And you take away seven, And that leaves five...Well, six actually, but the idea is the important thing, :phones:

Buffy

Posted

Roger Q & B. If you highlight my first post you will find my concurrance at bottom right justified.

 

So, among our conclusions now we have that the table is purposefully in error and the student is expected to reply with our answer, or somewhere along the chain from instructor to student to tutor to me to you, the table was copied wrong.

 

Assuming a correct table, do you also agree with me that the Gaussian method of matrices is workable as well as back-substitution? :phones: :thumbs_up

Posted

Using matrix notation and simple Gauss–Jordan elimination,

[math]\left[ \begin{array}{ r r r r r r }

1 & 1 & 0 & 0 & 0 & -110 \\

1 & 0 & 1 & 0 & 0 & -112 \\

1 & 0 & 0 & 1 & 0 & -113 \\

0 & 1 & 1 & 0 & 0 & -115 \\

0 & 1 & 0 & 1 & 0 & -116 \\

0 & 1 & 0 & 0 & 1 & -117 \\

0 & 0 & 1 & 1 & 0 & -118 \\

0 & 0 & 1 & 0 & 1 & -120 \\

0 & 0 & 0 & 1 & 1 & -121

\end{array} \right] [/math] transforms to [math]\left[ \begin{array}{ r r r r r r }

1 & 0 & 0 & 0 & 0 & -53.5 \\

0 & -1 & 0 & 0 & 0 & 56.5 \\

0 & 0 & -1 & 0 & 0 & 58.5 \\

0 & 0 & 0 & 0 & -1 & 60.5 \\

0 & 0 & 0 & 0 & 0 & 0 \\

0 & 0 & 0 & 1 & 0 & -59.5 \\

0 & 0 & 0 & 0 & 0 & 0 \\

0 & 0 & 0 & 0 & 0 & -1 \\

0 & 0 & 0 & 0 & 0 & -1

\end{array} \right] [/math]

 

The 8th and 9th rows show the original system of equations to be inconsistent – that is, to have no real solution.

 

I suspect a misprint has occurred, and the last lines should be

c+e=119

d+e=120

 

The system is then consistent, with solutions: a=53.5, b=56.5, c=58.5, d=59.5, e=60.5

 

This problem is in the “too much information” family – you only need 5 independent equations to solve it, but are given 4 additional dependent ones. This can confuse many humans and computer programs, but can still be solved via the usual G-J reduction by simply ignoring rows consisting of all zeros, and concluding that the system of equations is inconsistent if any rows have zeros in all columns but the rightmost.

Posted
Using matrix notation and simple Gauss–Jordan elimination,

1 1 0 0 0 -110

1 0 1 0 0 -112

1 0 0 1 0 -113

0 1 1 0 0 -115

0 1 0 1 0 -116

0 1 0 0 1 -117

0 0 1 1 0 -118

0 0 1 0 1 -120

0 0 0 1 1 -121

transforms to

1 0 0 0 0 -53.5

0 -1 0 0 0 56.5

0 0 -1 0 0 58.5

0 0 0 0 -1 60.5

0 0 0 0 0 0

0 0 0 1 0 -59.5

0 0 0 0 0 0

0 0 0 0 0 -1

0 0 0 0 0 -1

 

(Apologies for the ugly matrixes – I can’t seem to get them to render in LaTeX B))

 

The 8th and 9th rows show the original system of equations to be inconsistent – that is, to have no real solution.

 

I suspect a misprint has occurred, and the last lines should be

c+e=119

d+e=120

 

The system is then consistent, with solutions: a=53.5, b=56.5, c=58.5, d=59.5, e=60.5

 

This problem is in the “too much information” family – you only need 5 independent equations to solve it, but are given 4 additional dependent ones. This can confuse many humans and computer programs, but can still be solved via the usual G-J reduction by simply ignoring rows consisting of all zeros, and concluding that the system of equations is inconsistent if any rows have zeros in all columns but the rightmost.

 

Roger. What we did with the matrices is to simply choose 5 of the 10 equations and then constructed a 5x6 augmented matrix to use in row operations. My tutor friend is out sick today so the student is on their own if today is the deadline. :phones: :thumbs_up

Posted
(Apologies for the ugly matrixes – I can’t seem to get them to render in LaTeX :thumbs_up)

You might try wrapping it in code tags like this

matrix in here

, which allows you to preserve the spaces you've typed when submitting the post.

 

 

Using matrix notation and simple Gauss–Jordan elimination,

 

1 1 0 0 0 -110
1 0 1 0 0 -112
1 0 0 1 0 -113
0 1 1 0 0 -115
0 1 0 1 0 -116
0 1 0 0 1 -117
0 0 1 1 0 -118
0 0 1 0 1 -120
0 0 0 1 1 -121
transforms to
1  0  0  0  0  -53.5
0 -1  0  0  0   56.5
0  0 -1  0  0   58.5
0  0  0  0 -1   60.5
0  0  0  0  0    0
0  0  0  1  0  -59.5
0  0  0  0  0    0
0  0  0  0  0   -1
0  0  0  0  0   -1

Posted
You might try wrapping it in code tags like this
matrix in here

, which allows you to preserve the spaces you've typed when submitting the post.

 

While arguably your post gives the appearence of aid, it reflects a lack of understanding of the problem and procedure inasmuch as those little 'dashes' (-) are not minus signs in the upper list right column. Written as you have it in the code tags, all 10 equations are wrong before any operations. Thanks for nothin'. :turtle:

Posted
While arguably your post gives the appearence of aid, it reflects a lack of understanding of the problem and procedure inasmuch as those little 'dashes' (-) are not minus signs in the upper list right column. Written as you have it in the code tags, all 10 equations are wrong before any operations. Thanks for nothin'. :turtle:

 

Always a pleasure Turtle. I do what I can. Your continued kindness and humility are appreciated.

 

Also, where is it wrong? As you can see, Craig has updated his post with latex and it looks like what I posted, except left to right instead of up to down. While being condescending is one thing, being able to teach others is quite another.

Posted
You might try wrapping it in code tags like this
matrix in here

, which allows you to preserve the spaces you've typed when submitting the post.

Thanks for the suggestion. What I’ve edited post #6 to is the prettiness I had in mind. My LaTeX documentation led me astray, but I found an example that worked in Alexander’s wonderful 12086 :)

 

Strange that, in the over a year that I’ve been using LaTeX in my hypo posts, and doing matrix math on a computer for some reason or another pretty much every day, this is the first time in memory I’ve tried to render one the LaTeXy way. Esthetics count ;)

 

But we digress (and, pardon the observation, bicker a bit :naughty:). The pedagogic point of this thread is how to solve a system of equations. Gausian matrix elimination is an easy way. For readers that have never been introduced to (that is, not had more than the briefest introduction to linear algebra), or forgotten this technique, it goes like this:

  1. Put the system of equations into matrix form by assigning a column to each variable, with one more column for the constant. Assign a row to each equation. For each equation, put the coefficient of each variable in its column (variable that don’t appear in an equation have coefficients of zero). For this thread’s “fixed” system of equations, this gives:
    [math]\left[ \begin{array}{ r r r r r r }
    1 & 1 & 0 & 0 & 0 & -110 \\
    1 & 0 & 1 & 0 & 0 & -112 \\
    1 & 0 & 0 & 1 & 0 & -113 \\
    0 & 1 & 1 & 0 & 0 & -115 \\
    0 & 1 & 0 & 1 & 0 & -116 \\
    0 & 1 & 0 & 0 & 1 & -117 \\
    0 & 0 & 1 & 1 & 0 & -118 \\
    0 & 0 & 1 & 0 & 1 & -119 \\
    0 & 0 & 0 & 1 & 1 & -120
    \end{array} \right] [/math]
  2. Pick a row I with a non-zero value A in its first element
  3. For every other row J with a non-zero value B in its first element, find [math]C=\frac{B}{A}[/math]
  4. For every column of J, add subtract the corresponding element of I multiplied by C from it. After completing this for all rows with non-zero values in their first element, the matrix could look like this:
    [math]\left[ \begin{array}{ r r r r r r }
    1&1&0&0&0&-110\\
    0&-1&1&0&0&-2\\
    0&-1&0&1&0&-3\\
    0&1&1&0&0&-115\\
    0&1&0&1&0&-116\\
    0&1&0&0&1&-117\\
    0&0&1&1&0&-118\\
    0&0&1&0&1&-119\\
    0&0&0&1&1&-120
    \end{array} \right] [/math]
  5. Repeat steps 2-4 for the second, third, etc. columns. When done, you may have a matrix looking like this:
    [math]\left[ \begin{array}{ r r r r r r }
    1 & 0 & 0 & 0 & 0 & -53.5\\
    0 & -1 & 0 & 0 & 0 & 56.5\\
    0 & 0 & 0 & 0 & 2 & -121\\
    0 & 0 & 0 & 0 & 0 & 0\\
    0 & 0 & 1 & 0 & 0 & -58.5\\
    0 & 0 & 0 & -1 & 0 & 59.5\\
    0 & 0 & 0 & 0 & 0 & 0\\
    0 & 0 & 0 & 0 & 0 & 0\\
    0 & 0 & 0 & 0 & 0 & 0\\
    \end{array} \right] [/math]
  6. Divide each element of each row to make the coefficient of each variable 1, giving this:
    [math]\left[ \begin{array}{ r r r r r r }
    1 & 0 & 0 & 0 & 0 & -53.5\\
    0 & 1 & 0 & 0 & 0 & -56.5\\
    0 & 0 & 0 & 0 & 1 & -60.5\\
    0 & 0 & 0 & 0 & 0 & 0\\
    0 & 0 & 1 & 0 & 0 & -58.5\\
    0 & 0 & 0 & 1 & 0 & -59.5\\
    0 & 0 & 0 & 0 & 0 & 0\\
    0 & 0 & 0 & 0 & 0 & 0\\
    0 & 0 & 0 & 0 & 0 & 0\\
    \end{array} \right] [/math]
  7. The solution for each variable can be read from the matrix, eg: [math]a -53.5 =0[/math] or [math]a = 53.5[/math]

Since there are multiple possible choices in this algorithm, and some people and programs handle the sign of the constant part of each equation differently, uses of it may look a little different from person to person and program to program, but it’s fundamentally the same.

Posted

Giddyup. :eek_big: In any regard, the updates have only made the errors worse as I see it. To whit, the apparent indication that the weight values are negative by virtue of the dashes (-); e.g. 1 1 0 0 0 -110. Either the dashes are meant to separate the coefficient matrix and the constant matrix, or they are minus signs. To use them as both is wrong no matter who does it.

Here's a keyboard method that is far less ambiguous.

1 1 0 0 0 | 110

1 0 1 0 0 | 112

.

.

.

etcetera.

 

Since by the rules of row operations you must multiply all elements in a row by the same value, if you mean to have -110 (minus 110) in the constant matrix column of the initial matrix then its row must look like this:

-1 -1 0 0 0 | -110

 

Fortunately for the tutor I only have to give one explanation. :eek_big: :turtle:

Posted

Puts on straw hat, bibs, boots, grabs piece of straw to chew on.

 

Why I dunno why you city folk are fretting about what each bale weighs. Their all 'bout the same size.

 

Whacha all need to know is how many animals your gonna be feeding and how long you gotta toss them hay 'fore you can put them out to pasture again.

Posted
Giddyup. :shrug: In any regard, the updates have only made the errors worse as I see it.
I wouldn’t describe the preceding as errors, so much as confusions of nomenclature and convention.

 

How, or even if (you can perform the same calculation via ordinary algebraic substitutions, at the cost of more and messier-looking symbols), one writes a system of equations as a matrix is a matter of convention – as long as you understand the convention, you’ll get correct results. Largely because it was the convention used in the first software I used for various linear algebra, I use the convention of writing a system of equations in this form

[math]1a+1b+1c-10=0[/math]

[math]1a-1b+0c+1=0[/math]

[math]2a+0b-1c-1=0[/math]

and a matrix in this form

[math]\left[ \begin{array}{ r r r r }

1 & 1 & 1 & -10 \\

1 & -1 & 0 & 1 \\

2 & 0 & -1& -1

\end{array} \right] [/math]

 

It would work just as well writing the equations as

[math]1a+1b+1c=10[/math]

[math]1a-1b+0c=-1[/math]

[math]2a+0b-1c=1[/math]

and the extended matrix

[math]\left[ \begin{array}{ r r r | r }

1 & 1 & 1 & 10 \\

1 & -1 & 0 & -1 \\

2 & 0 & -1& 1

\end{array} \right] [/math]

 

Though a mere matter of nomenclature and convention, the communication difficulties we’ve had in this thread suggests to me a deep philosophical feature of algebra: the equal sign in an equation is essentially replaceable by the minus sign. [math]a+b+c=d[/math] is algebraically equivalent to [math]a+b+c-d=0[/math]. If “=0” is assumed to be the truth condition of all expressions, once can omit it, writing just [math]a+b+c-d[/math]. I find even such a small simplification as eliminating one symbol/operator attractive, especially for matrixes, where the equal sign can be awkward and confusing.

Posted
I wouldn’t describe the preceding as errors, so much as confusions of nomenclature and convention.
Your clarification is welcome, if not necessary, and I won't quibble over the predicate. ;)

 

 

Though a mere matter of nomenclature and convention, the communication difficulties we’ve had in this thread suggests to me a deep philosophical feature of algebra: the equal sign in an equation is essentially replaceable by the minus sign. [math]a+b+c=d[/math] is algebraically equivalent to [math]a+b+c-d=0[/math]. If “=0” is assumed to be the truth condition of all expressions, once can omit it, writing just [math]a+b+c-d[/math]. I find even such a small simplification as eliminating one symbol/operator attractive, especially for matrixes, where the equal sign can be awkward and confusing.

 

And I'm non-conventional! :hyper: In refreshing my own memory on first getting the problem, I used a text book and so adopted their convention. Without changing any signs, their dashed vertical line separating the constant matrix could be left out. Moreover, they nor I used an equal sign in the matrices, and the efficiency is maintained at the same level as your convention. But....

 

So back to the problem then & looking for efficiencies. :) Assuming the correction to the last two entries in the table as noted, what is the fewest out of the 10 equations you need to solve the whole system? I see you used all ten, and I used 5 in a couple variations. The smaller the matrix the fewer row operations we need to produce the solution in triangle form. ('triangle form' is the term adopted in the text I used to describe a matrix with all zeros below the diagonal running from the upper left cell to the lower right cell of the coeficient part of the augmented matrix; it is in their words, the 'goal' of the operations.)

 

That's all I got. :cup: :turtle:

Posted
So back to the problem then & looking for efficiencies. :) Assuming the correction to the last two entries in the table as noted, what is the fewest out of the 10 equations you need to solve the whole system?
You need only 5 rows, but you can’t just pick them at random. AFAIK, in general, determining a valid combination requires exactly the same computation as solving, so you can’t gain any efficiency by finding 5 independent rows and solving only for them.

 

There are [math]\frac{10!}{5!5!}=252[/math] ways to chose 5 of 10 rows, order not important. There are 162 valid choices of rows. I’ve no deep insight into why, having gotten these numbers through an exercise in blind, dumb computing.

I see you used all ten, and I used 5 in a couple variations.
I actually only used 9 rows, due to accidentally skipping one equation when creating the initial matrix. Fortunately, there is no single row that is essential to the solution, so this didn’t cause me any problems.
The smaller the matrix the fewer row operations we need to produce the solution in triangle form.
It’s a modest reduction in effort, though, which doesn’t seem worth the effort of figuring out what rows to use. Choosing the first 5 seems to work, but I can’t, without much thought or research, prove why.

 

An example of a selection of rows that won’t work are rows 1, 2, 3, 5, and 6. If anyone is inclined to look more deeply (and because I love to post peculiar lists ;)) here’s a (slightly oddly collated) list of all the valid row combinations:

1 1,2,3,4,10
2 1,2,3,4,5
3 1,2,3,4,6
4 1,2,3,4,7
5 1,2,3,4,8
6 1,2,3,4,9
7 1,2,3,5,10
8 1,2,3,5,7
9 1,2,3,5,9
10 1,2,3,6,10
11 1,2,3,6,7
12 1,2,3,6,9
13 1,2,3,7,8
14 1,2,3,8,10
15 1,2,3,8,9
16 1,2,4,5,10
17 1,2,4,5,6
18 1,2,4,5,8
19 1,2,4,6,7
20 1,2,4,6,9
21 1,2,4,7,10
22 1,2,4,7,8
23 1,2,4,8,9
24 1,2,4,9,10
25 1,2,5,6,10
26 1,2,5,6,7
27 1,2,5,6,9
28 1,2,5,7,10
29 1,2,5,7,8
30 1,2,5,8,10
31 1,2,5,8,9
32 1,2,5,9,10
33 1,2,6,7,10
34 1,2,6,9,10
35 1,2,7,8,10
36 1,2,8,9,10
37 1,3,4,5,10
38 1,3,4,5,6
39 1,3,4,5,7
40 1,3,4,6,8
41 1,3,4,6,9
42 1,3,4,7,8
43 1,3,4,7,9
44 1,3,4,8,10
45 1,3,4,9,10
46 1,3,5,6,10
47 1,3,5,6,7
48 1,3,5,6,9
49 1,3,5,7,9
50 1,3,5,9,10
51 1,3,6,7,8
52 1,3,6,7,9
53 1,3,6,8,10
54 1,3,6,8,9
55 1,3,6,9,10
56 1,3,7,8,9
57 1,3,8,9,10
58 1,4,5,6,7
59 1,4,5,6,8
60 1,4,5,7,10
61 1,4,5,7,8
62 1,4,5,8,10
63 1,4,6,7,8
64 1,4,6,7,9
65 1,4,6,8,9
66 1,4,7,8,10
67 1,4,7,8,9
68 1,4,7,9,10
69 1,4,8,9,10
70 1,5,6,7,10
71 1,5,6,7,8
72 1,5,6,7,9
73 1,5,6,8,10
74 1,5,6,8,9
75 1,5,7,8,9
76 1,5,7,9,10
77 1,5,8,9,10
78 1,6,7,8,10
79 1,6,7,9,10
80 1,6,8,9,10
81 1,7,8,9,10
82 2,3,4,5,10
83 2,3,4,5,8
84 2,3,4,5,9
85 2,3,4,6,10
86 2,3,4,6,8
87 2,3,4,6,9
88 2,3,4,7,10
89 2,3,4,7,8
90 2,3,4,7,9
91 2,3,5,7,10
92 2,3,5,7,8
93 2,3,5,7,9
94 2,3,5,8,10
95 2,3,5,8,9
96 2,3,6,7,10
97 2,3,6,7,8
98 2,3,6,7,9
99 2,3,6,8,10
100 2,3,6,8,9
101 2,3,7,8,10
102 2,3,7,8,9
103 2,4,5,6,10
104 2,4,5,6,8
105 2,4,5,6,9
106 2,4,5,8,9
107 2,4,5,9,10
108 2,4,6,7,10
109 2,4,6,7,8
110 2,4,6,7,9
111 2,4,6,8,9
112 2,4,6,9,10
113 2,4,7,8,9
114 2,4,7,9,10
115 2,5,6,7,10
116 2,5,6,7,8
117 2,5,6,7,9
118 2,5,6,8,10
119 2,5,6,8,9
120 2,5,7,8,9
121 2,5,7,9,10
122 2,5,8,9,10
123 2,6,7,8,10
124 2,6,7,9,10
125 2,6,8,9,10
126 2,7,8,9,10
127 3,4,5,6,10
128 3,4,5,6,8
129 3,4,5,6,9
130 3,4,5,7,10
131 3,4,5,7,8
132 3,4,5,7,9
133 3,4,5,8,10
134 3,4,5,9,10
135 3,4,6,8,10
136 3,4,6,9,10
137 3,4,7,8,10
138 3,4,7,9,10
139 3,5,6,7,10
140 3,5,6,7,8
141 3,5,6,7,9
142 3,5,6,8,10
143 3,5,6,8,9
144 3,5,7,8,9
145 3,5,7,9,10
146 3,5,8,9,10
147 3,6,7,8,10
148 3,6,7,9,10
149 3,6,8,9,10
150 3,7,8,9,10
151 4,5,6,7,10
152 4,5,6,7,8
153 4,5,6,7,9
154 4,5,6,8,10
155 4,5,6,8,9
156 4,5,7,8,9
157 4,5,7,9,10
158 4,5,8,9,10
159 4,6,7,8,10
160 4,6,7,9,10
161 4,6,8,9,10
162 4,7,8,9,10

Posted
If you highlight my first post you will find my concurrance at bottom right justified.
:fluffy: I just knew you had something up your sleeve, when you said:
...an answer, if not a solution.
but, even knowing you, it didn't cross my mind that's what you meant! :phones:

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...