My Math Forum  

Go Back   My Math Forum > High School Math Forum > Algebra

Algebra Pre-Algebra and Basic Algebra Math Forum


Thanks Tree1Thanks
  • 1 Post By soroban
Reply
 
LinkBack Thread Tools Display Modes
January 3rd, 2015, 11:23 AM   #1
Newbie
 
Joined: Jan 2015
From: portland

Posts: 1
Thanks: 0

optimal number of shares

here is a problem:
I have \$2000
I want to buy 2 different shares YYY (share price 109) and ZZZ (share price 14)
what is the optimal number of YYY and ZZZ shares to buy to spend the most of \$2000 and have the remainder of that as close to zero as possible?

109y+14z=2000

what would be another equation in my Systems of equations? I cannot think of it.

Please help.

Last edited by greg1313; January 3rd, 2015 at 11:31 AM.
get42n8 is offline  
 
January 3rd, 2015, 12:10 PM   #2
Senior Member
 
Joined: Jan 2014
From: The backwoods of Northern Ontario

Posts: 371
Thanks: 68

I am not sure that there is another equation.
My thinking is that one should maximize the 14 dollar shares. To do that, I would buy just one 109 dollar share. This would leave 1891 to spend on the 14 dollar shares.

1891÷14=135.0717...

If you buy 135 of these shares you will spend 1890 dollars.
This amount when added to the 109 dollars sums to 1999 dollars.

That's pretty darn close. But is there's an algebraic way to do it, I would like to become aware of it.

And if there is another combination that comes closer to 2000 dollars, I would be surprised.

Last edited by Timios; January 3rd, 2015 at 12:24 PM.
Timios is offline  
January 3rd, 2015, 12:11 PM   #3
Global Moderator
 
Joined: May 2007

Posts: 6,342
Thanks: 534

The only constraint you have is that x and y be non-negative integers and the left side cannot exceed the right side. By brute force try y between 0 and 18 to see what gets you the closest.
mathman is offline  
January 3rd, 2015, 05:08 PM   #4
Math Team
 
Joined: Dec 2006
From: Lexington, MA

Posts: 3,267
Thanks: 407

Hello, get42n8!

Quote:
I have \$2000.
I want to buy 2 different shares YYY (\$109 each) and ZZZ (\$14 each).
What is the optimal number of YYY and ZZZ shares to buy to spend the most
of \$2000 and have the remainder of that as close to zero as possible?

$109y+14z\:=\:2000$

There is no second equation.
This is a Diophantine equation, requiring integer solutions.

This can be solved by Modular Arithmetic,
but here is an algebraic solution.

Solve for $z\!:\;\; z \;=\;\dfrac{2000-109y}{14} \quad\Rightarrow\quad z\;=\;142 - 8y + \dfrac{12+3y}{14}$

Since $z$ is an integer, $3(4+y)$ must be a multiple of 14.
The first time this happens is: $\:y = 10$

Hence: $\:z \:= \: \dfrac{2000-109(10)}{14} \:=\:\dfrac{910}{14} \:=\:65$

Therefore: $\:\boxed{y \,=\,10,\;z\,=\,65}$

Check: $\:109(10) + 14(65) \:=\:2000$
Thanks from Timios
soroban is offline  
January 3rd, 2015, 08:35 PM   #5
Senior Member
 
Joined: Jan 2014
From: The backwoods of Northern Ontario

Posts: 371
Thanks: 68

Good job, soroban!

Please help me to understand why

$z \;=\;\dfrac{2000-109y}{14} \quad\Rightarrow\quad z\;=\;142 - 8y + \dfrac{12+3y}{14}$
Timios is offline  
January 3rd, 2015, 11:50 PM   #6
Newbie
 
Joined: Jul 2012
From: Houston, Texas

Posts: 18
Thanks: 2

Math Focus: Geometry , Modern Algebra
Quote:
Good job, soroban!

Please help me to understand why

$$z=\frac{2000−109y}{14}⇒z=142−8y+\frac{12+3 y}{14}$$
Because $$ z = \frac{2000-109y}{14} = \frac{2000}{14} - \frac{109y}{14} \\ =142 + \frac{12}{14} - (8y - \frac{3y}{14}) \\
= 142 - 8y + \frac{12+3y}{14} $$
buiduchuy is offline  
January 5th, 2015, 11:21 AM   #7
Newbie
 
Joined: Jan 2015
From: Turkie

Posts: 9
Thanks: 2

This problem can be modeled as integer programming model as follows:
Min x
Subject to
109y+14z+x=2000
x,y,z >=0 and integer
In operations research area, there are some methods which can be ussed to solve these models. Also some softwares like Lindo solver can also be used.
talip is offline  
Reply

  My Math Forum > High School Math Forum > Algebra

Tags
equation, number, optimal, shares, sum, system



Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
About the optimal number of kilometers of highways a country should have simpex Algebra 10 December 29th, 2014 03:53 PM
Optimal capital structure need help poko Economics 0 December 7th, 2012 07:23 AM
optimal control ODE existance problem niyazets Applied Math 3 June 18th, 2011 10:02 AM
Selling shares tintin00 Algebra 1 April 15th, 2011 11:04 PM
Finding Optimal Points Mr Sprouts Calculus 9 May 8th, 2007 06:23 AM





Copyright © 2017 My Math Forum. All rights reserved.