欢迎光临散文网 会员登陆 & 注册

[Linear Algebra] Farm Animals Buy and Sell

2021-10-05 09:36 作者:AoiSTZ23  | 我要投稿

By: Tao Steven Zheng (郑涛)

【Problem】

Jiuzhang Suanshu (Fangcheng 8)

Suppose 2 cows and 5 sheep are sold to buy 13 pigs, there is an excess of 1000 coins; when 3 cows and 3 pigs are sold, there is just enough coins to buy 9 sheep; when 6 sheep and 8 pigs are sold to buy 5 cows, there is a deficiency of 600 coins. Question: What is the price of one cow, one sheep, and one pig?



【Solution】

Let x%2Cy%2Cz represent cows, sheep and pigs respectively. In modern mathematical notation, this problem is a system of linear equations in three unknowns.

%20%5Cbegin%7Bcases%7D%0A%202x%20%2B%205y%20%26%3D%2013z%20%2B%201000%20%5C%5C%0A%203x%20%2B%203z%20%26%3D%209y%20%5C%5C%0A%206y%20%2B%208z%20%26%3D%205x%20-600%5C%5C%0A%20%5Cend%7Bcases%7D%20

Construct the matrix 

%20%5Cbegin%7Bbmatrix%7D%0A%202%20%26%205%20%26%20-13%20%26%201000%20%5C%5C%0A%203%20%26%20-9%20%26%203%20%26%200%20%5C%5C%0A%20-5%20%26%206%20%26%208%20%26%20-600%5C%5C%0A%20%5Cend%7Bbmatrix%7D%20


Step 1: Divide row 2 by three %5Cfrac%7B1%7D%7B3%7D%20R_2%20

%5Cbegin%7Bbmatrix%7D%0A2%20%26%205%20%26%20-13%20%26%201000%20%5C%5C%0A1%20%26%20-3%20%26%201%20%26%200%20%5C%5C%0A-5%20%26%206%20%26%208%20%26%20-600%0A%5Cend%7Bbmatrix%7D


Step 2: Subtract row 1 by two times row 2 R_1%20-%202R_2%20

%5Cbegin%7Bbmatrix%7D%0A0%20%26%2011%20%26%20-15%20%26%201000%20%5C%5C%0A1%20%26%20-3%20%26%201%20%26%200%20%5C%5C%0A-5%20%26%206%20%26%208%20%26%20-600%0A%5Cend%7Bbmatrix%7D


Step 3: Add row 3 by five times row 2 %20R_3%20%2B%205R_2

%5Cbegin%7Bbmatrix%7D%0A0%20%26%2011%20%26%20-15%20%26%201000%20%5C%5C%0A1%20%26%20-3%20%26%201%20%26%200%20%5C%5C%0A0%20%26%20-9%20%26%2013%20%26%20-600%0A%5Cend%7Bbmatrix%7D


Step 4: Add row 1 by row 3 R_1%20%2B%20R_3

%5Cbegin%7Bbmatrix%7D%0A0%20%26%202%20%26%20-2%20%26%20400%20%5C%5C%0A1%20%26%20-3%20%26%201%20%26%200%20%5C%5C%0A0%20%26%20-9%20%26%2013%20%26%20-600%0A%5Cend%7Bbmatrix%7D%20


Step 5: Divide row 1 by two %5Cfrac%7B1%7D%7B2%7DR_1%20

%5Cbegin%7Bbmatrix%7D%0A0%20%26%201%20%26%20-1%20%26%20200%20%5C%5C%0A1%20%26%20-3%20%26%201%20%26%200%20%5C%5C%0A0%20%26%20-9%20%26%2013%20%26%20-600%0A%5Cend%7Bbmatrix%7D


Step 6: Add nine times row 1 to row 3 %20R_3%20%2B%209R_1

%5Cbegin%7Bbmatrix%7D%0A0%20%26%201%20%26%20-1%20%26%20200%20%5C%5C%0A1%20%26%20-3%20%26%201%20%26%200%20%5C%5C%0A0%20%26%200%20%26%204%20%26%201200%0A%5Cend%7Bbmatrix%7D%20


Step 7: Divide row 3 by four %5Cfrac%7B1%7D%7B4%7DR_3

%5Cbegin%7Bbmatrix%7D%0A0%20%26%201%20%26%20-1%20%26%20200%20%5C%5C%0A1%20%26%20-3%20%26%201%20%26%200%20%5C%5C%0A0%20%26%200%20%26%201%20%26%20300%0A%5Cend%7Bbmatrix%7D%20


Step 8: Add row 3 to row 1 R_1%20%2B%20R_3

%5Cbegin%7Bbmatrix%7D%0A0%20%26%201%20%26%200%20%26%20500%20%5C%5C%0A1%20%26%20-3%20%26%201%20%26%200%20%5C%5C%0A0%20%26%200%20%26%201%20%26%20300%0A%5Cend%7Bbmatrix%7D


Step 9: Subtract row 2 by row 3 R_2%20-%20R_3

%5Cbegin%7Bbmatrix%7D%0A0%20%26%201%20%26%200%20%26%20500%20%5C%5C%0A1%20%26%20-3%20%26%200%20%26%20-300%20%5C%5C%0A0%20%26%200%20%26%201%20%26%20300%0A%5Cend%7Bbmatrix%7D%20


Step 10: Add three times row 1 to row 2 %20R_2%20%2B%203R_1%20

%5Cbegin%7Bbmatrix%7D%0A0%20%26%201%20%26%200%20%26%20500%20%5C%5C%0A1%20%26%200%20%26%200%20%26%201200%20%5C%5C%0A0%20%26%200%20%26%201%20%26%20300%0A%5Cend%7Bbmatrix%7D


Step 11: Swap row 1 with row 2 R_2%20%5Cleftrightarrow%203R_1

%5Cbegin%7Bbmatrix%7D%0A1%20%26%200%20%26%200%20%26%201200%20%5C%5C%0A0%20%26%201%20%26%200%20%26%20500%20%5C%5C%0A0%20%26%200%20%26%201%20%26%20300%0A%5Cend%7Bbmatrix%7D%20


A cow costs 1200 coins, a sheep costs 500 coins, a pig costs 300 coins.


[Linear Algebra] Farm Animals Buy and Sell的评论 (共 条)

分享到微博请遵守国家法律