|
| quote: | Originally posted by butterfly
i can give you the answer buit then you wouldnt be doing your homework.
they gave you enough information to solve a 2 variable system of algebraic equations.
you know that however many you buy, this will be true:
(.17)R + (.13)B < 4.95
you also know that the difference wont be more than 5 AND you will have more blue than red, so:
B-R < 5
so solve this system of equations.
edit: i fucked up the first time cause i cant read but i fixed it. |
that is too easy a solution u've got there. give the man something he can show off with
dude, if u want to get an A++ in ur class, show them sometingh like this. this is how to solve the problem using 3(!) variables.
let x be the number of red pens you can buy and y the number of blue pens. then, given that u can only spend $4.95=495 cents, we have
17x+13y≤495
x≥0, y≥0
since the difference of the number of both kinds of pens cannot exceed 5, we have
|x-y|≤5
we need to find the biggest value that x+y=z can take
so what we have here is a nice mixed system with 3 variables
17x + 13y≤495
|x-y|≤5
x+y=z
0≤x≤z
0≤y≤z
applying a few substitutions for y (y=z-x), we get
4x+13z≤495
|2x-z|≤5
which is the same as
x≤(495-13z)/4
(z-5)/2≤x≤(z+5)/2
considering that 0≤x≤z, we can rewrite the above system as
z≥0
(z+5)/2≥0
0≤(495-13z)/4 <=> 495-13z≥0 <=> z≤495/13
(z-5)/2≤(495-13z)/4 <=> 2(z-5)≤(495-13z) <=> 15z≤505 <=> z≤505/15
or as
0≤z
-5≤z
z≤495/13
z≤505/15
or as 0≤z≤505/15=101/3=33+2/3
which means the greatest integer z can be is 33
so we need to find the smallest x possible when z=33. using 33 for z, we get another system with only one variable
x≤16.5
14≤x≤19
0≤x≤33
the smallest solution of which is 14.
same answer
___________________
Last edited by Noisician on Sep-15-2003 at 19:32
|