Money question about percentage — Algebra 1

Click For Summary
SUMMARY

The discussion centers around solving a Diophantine equation related to a problem involving the purchase of records at two different prices: $0.35 and $0.45. The equation derived from the problem is 0.35x + 0.45y = 4.25, where x is the number of records bought at $0.35 and y is the number bought at $0.45. The correct integer solution found is x = 7 and y = 4, indicating Ollie bought a total of 11 records. Participants emphasized the importance of integer solutions in such equations and suggested using methods like the Euclidean Algorithm for finding solutions.

PREREQUISITES
  • Understanding of Diophantine equations
  • Familiarity with linear equations in two variables
  • Basic knowledge of the Euclidean Algorithm
  • Ability to manipulate equations to find integer solutions
NEXT STEPS
  • Research methods for solving Diophantine equations
  • Learn about the Euclidean Algorithm and its applications
  • Explore integer programming techniques for optimization problems
  • Practice solving linear equations with integer constraints
USEFUL FOR

Students studying algebra, particularly those focusing on equations in two variables, educators teaching algebra concepts, and anyone interested in problem-solving techniques involving integer solutions.

hackedagainanda
Messages
52
Reaction score
11
Homework Statement
If Ollie bought some records at .35 cents each and .45 cents each. If he spent a total of 4.25 how many records did he buy altogether? Explain.
Relevant Equations
No relevant equations.
I've tried to answer but I've been coming up with nonsense answers, but I'll show my method and see if its right or wrong so I can get pointed in the right direction.

.35x + .45(35 - x) = 4.25, I think this is where my error is but I'm unsure.

Multiply by 100 to clear the decimals and I get 35x + 1575 -45x = 425 then I get -10x + 1575 = 425, then -10x = -1150, so x = 115
which gives me $ 40 . 25 so the answer seems close to the desired one but I'm still confused.
 
Physics news on Phys.org
hackedagainanda said:
.35x + .45(35 - x) = 4.25, I think this is where my error is but I'm unsure.
Yep, sure is. Where did you get the "35-x" ? What does that expression assume?
 
  • Like
Likes   Reactions: WWGD
I thought if x is the amount invested at .35 then I see I forgot a decimal. Please ignore my previous attempt it was misguided. I brute forced it trying numbers and ended up with the answer. I see that if you phrase it in terms of two variables with .35x + .45y= 4.25 you end up with x= 7 = 2.45, y = 4 = 1.80 add those together and you get 4.25.

The book offered me no hints or methods so is there a better way to solve this? This current chapter is on equations in two variables.
 
Homework Statement:
If Ollie bought some records at .35 cents each and .45 cents each. If he spent a total of 4.25 how many records did he buy altogether? Explain.Relevant Equations:
No relevant equations.
Some information seems to be missing, but you can make an educated guess to begin like this:

If all the records were at price 0.35 whatever the money unit per record, then 12.14 records bought.
If all the records were at price of 0.45 of these moneys then 9.44 records bought.
The total number of records, being a WHOLE number, would be something from 10, or 11, or 12. Try each of these and see what you can find.
 
  • Like
Likes   Reactions: Vanadium 50, Delta2 and Lnewqban
symbolipoint said:
Some information seems to be missing, but you can make an educated guess to begin like this:

If all the records were at price 0.35 whatever the money unit per record, then 12.14 records bought.
If all the records were at price of 0.45 of these moneys then 9.44 records bought.
The total number of records, being a WHOLE number, would be something from 10, or 11, or 12. Try each of these and see what you can find.
What information seems to be missing? That's exactly what the problem says.

I seem to get he bought 11 records total with 7 being at 35 cents per record and 4 at 45 cents per record. Is there a method besides just plugging in numbers until you get the answer?
 
hackedagainanda said:
What information seems to be missing? That's exactly what the problem says.
I thought you could understand without my having to tell you. OBVIOUSLY, the total number of records. If that were given in the example, then you'd have a very typical two-variable linear system example problem. One could choose to solve with two variables or convert to a one-variable solution.

I seem to get he bought 11 records total with 7 being at 35 cents per record and 4 at 45 cents per record. Is there a method besides just plugging in numbers until you get the answer?
So you worked through what I told you and found a result. What you ask here may come from some study in Linear Algebra. I did not use it when analyzing the example problem.
 
hackedagainanda said:
The book offered me no hints or methods so is there a better way to solve this? This current chapter is on equations in two variables.
You did the right thing and you did not leave anything out of the problem statement. Such equations where only integer solutions are valid are called "Diophantine" equations. I don't remember anything about techniques for solutions but there probably are some. Google Diophantine equations. Brute force, such as what you did, works well if there aren't too many possibilities.
 
  • Like
Likes   Reactions: Lnewqban
symbolipoint said:
I thought you could understand without my having to tell you. OBVIOUSLY, the total number of records.
No, THAT'S what is being solved for, that plus how many of each cost.
 
I think this could work: After multiplying through, you get 7x+9y=85.

Find a pair x',y' of x,y so that:
7x'+9y'=1. ( Possible since gcd(7,9)=1). Try it out or use the Euclidean Algorithm if you're familiar with it.

Now Notice 7x'+9y'=7(x'-9k)+9(y'+7k) , k any Integer. (**)
This gives you all ( infinitely many) solutions to the system.

Now multiply through by 85:

595x'+765y'=85

By adjusting the values of x',y' using (**) above, you get all solutions to above equation , which is what you're looking for. Of course, select non-negative values for x',y'.
Hope I was clear; let me know of any question.
Edit: I need to make some changes to this. Will do them Asap.
 
Last edited:
  • #10
WWGD said:
I think this could work: After multiplying through, you get 7x+9y=85.

Starting with this and looking modulo ##7## we get:
$$2y = 1 \ (mod \ 7) \ \ \text{hence} \ \ y = 4 \ (mod \ 7)$$
That gives us ##y = 4, 11, \dots##. But, as ##9y \le 85##, we have ##y < 10##; so ##y = 4## is the only possibility.
 
  • #11
hackedagainanda said:
If Ollie bought some records at .35 cents each and .45 cents each. If he spent a total of 4.25 how many records did he buy altogether? Explain.
Minor point:
.35 cents and .45 cents are just fractions of a penny. If Ollie bought just the cheaper records, he could get 1,214 of them. If he bought only the more expensive records, he could get 944 of them.

What you undoubtedly mean, but didn't write, was that the records were 35 cents and 45 cents, respectively, or $.35 and $.45, respectively.
 
  • Like
Likes   Reactions: SammyS and phinds
  • #12
phinds said:
No, THAT'S what is being solved for, that plus how many of each cost.
I had to reread the actual question part.
 
  • #13
hackedagainanda said:
Homework Statement:: If Ollie bought some records at .35 cents each and .45 cents each. If he spent a total of 4.25 how many records did he buy altogether? Explain.
Relevant Equations:: No relevant equations.

I've tried to answer but I've been coming up with nonsense answers, but I'll show my method and see if its right or wrong so I can get pointed in the right direction.

.35x + .45(35 - x) y = 4.25, I think this is where my error is but I'm unsure.

Multiply by 100 to clear the decimals and I get 35x + 1575 -45x = 425 then I get -10x + 1575 = 425, then -10x = -1150, so x = 115
which gives me $ 40 . 25 so the answer seems close to the desired one but I'm still confused.

As mentioned in post #7 it's a Diophantine equation. So just plot your corrected equation above and look for integer solutions.

(you could use https://www.desmos.com/calculator or other online graphing utility)
 
  • #14
We have ##7x+9y=85##, but let's consider ##7x+9y=1## for the moment. Since ##\text{gcd}(7,9)=1##, Bezout's identity tells us that the last equations has a solution. We can find such a solution like this:
1) Apply the euclidian algorithm on ##7## and ##9## until you get ##1## as rest (we know that we will get it because ##\text{gcd}(7,9)=1##). Basically you divide the greatest out of ##9## and ##7## by the smallest, then you always divide the divisor by the rest.
$$\begin{align*}
&9=1\times7+\mathbf2\\
&7=3\times\mathbf2+\mathbf1
\end{align*}$$
I have bolded the rests on purpose. Now, what you need to do is put the last equation in the form ##1=...##, then replace the rest from the before last equation in that one without performing calculations on the rests or ##9## or ##7##.
We have:
$$\begin{align*}
\mathbf1&=7-3\times\mathbf2\\
&=7-3\times(9-1\times7)\\
&=7\times(4)+9\times(-3)
\end{align*}$$
This yields us a particular solution ##(4,-3)##.
At this point, you might be tempted by multiplying the whole equation by ##85## to have the solutions ##(4\times85,-3\times85)##, but you can't really have a negative number of records.

For the sake of making the rest a bit general such that you can see the point, I'm going to refer to ##(4,-3)##, i.e the particular solution we have found, as ##(a,b)##.
Since ##7x+9y=1## and ##7\times(4)+9\times(-3)=1##, then ##7x+9y=7\times(4)+9\times(-3)##, or ##9(y+3)=7(4-x)##.

If you look at the last equation, you can see that it is in the form ##9(y+3)=7k##, where ##k\in\mathbb{Z}##. This tells us that ##7## divides ##9(y+3)##.
However, we know that ##\text{gcd}(7,9)=1##, thus ##7## divides ##(y+3)##, hence ##y+3=7k##, or ##y=7k-3##.
If you do the same thing with ##x##, then you'll find that ##4-x=9k##, or ##x=4-9k##.

We now have our general solution for ##7x+9y=1##, which is the couples ##(4-9k,7k-3)##, where ##k\in\mathbb{Z}##.
Multiply the while equation by ##85## and you get ##7(85x)+9(85y)=85##, whose solutions (some, there are actually integer solutions for some non integer ##k##) are ##(340-765k,595k-255)##.

And it seems that there is no solution where both ##x## and ##y## are positive and non zero integers for ##k\in\mathbb{Z}##. So, not sure how you are supposed to find a solution.
I can't delete this, seriously.
 
Last edited:
  • Skeptical
Likes   Reactions: PeroK
  • #15
archaic said:
And it seems that there is no solution where both ##x## and ##y## are positive and non zero integers.

That's except for ##x = 7, y =4##, of course!
 
  • Haha
Likes   Reactions: phinds
  • #16
PeroK said:
That's except for ##x = 7, y =4##, of course!
Oh no.. :H
It gets generated for ##k=\frac{37}{85}##.
Well, I'm tilted.
 
  • #17
archaic said:
Oh no.. :H
It gets generated for ##k=\frac{37}{85}##.
Well, I'm tilted.
Also, you clearly didn't read the thread. It had already been solved.
 
  • #18
phinds said:
Also, you clearly didn't read the thread. It had already been solved.
:nb)
 
  • Haha
Likes   Reactions: etotheipi
  • #19
I saw Diophantine equations in high school algebra and I remember being taught to solve for one of the unknowns in terms of the other and then use trial and error. Here we have $$x=\frac{85-9y}{7}.$$Note the constraints that ##y## be an integer and ##9y<85##. This limits the search to 8 candidates for ##y## so the calculation is not at all tedious or long. With spreadsheets, it's even easier to solve Diophantine equations today than back in my high school, slide rule, days.
 
  • Like
Likes   Reactions: SammyS
  • #20
PeroK said:
Starting with this and looking modulo ##7## we get:
$$2y = 1 \ (mod \ 7) \ \ \text{hence} \ \ y = 4 \ (mod \ 7)$$
That gives us ##y = 4, 11, \dots##. But, as ##9y \le 85##, we have ##y < 10##; so ##y = 4## is the only possibility.
But for a more general result , just set the terms of the solution set to be greater than 0:
From ##7\cdot 4+ 9\cdot (-3)=1## , multiply through by 85:

##7\cdot 340+ 9\cdot (-255) =85##

We get the general solution set:

## 7\cdot (340-9k)+9\cdot ( -255+7k) ##

Now, require the solution to have positive coefficients:##340-9k>0 ; -255+7k>0 ##

Which forces k to be an integer in ##\{36, 37, 38\}## since first requires ##k<37 ##, second requires ## k >36 ##.By trial, 37 works and :

##340-9\cdot 37= 7 ; -255+ 7\cdot 37 =4 ##.

What confuses me is why using/adding both equations together we get just that

## 85 > 2k ## , which entails a great loss of information.
 
  • #21
Let the number of records bought be N, with n costing 35 cents. Then we need to find integers N and n such that 7n+9(N−n)=85 or 9N=85+2n. Working modulo 9 we have 85 \equiv 4 so we must have 2n \equiv 5. Fortunately 2 is invertible modulo 9 (since 2 \times 5=10) so multiplying by 5 yields <br /> n \equiv 25 \equiv 7 \Rightarrow n = 7 + 9k for some integer k \geq 0. Substituting this into the second equation above yields 9N=99+18k or N=11+2k. Then <br /> N - n = 4 - 7k and as this must be positive we must have k = 0.
 
Last edited:

Similar threads

  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 11 ·
Replies
11
Views
4K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 13 ·
Replies
13
Views
4K
  • · Replies 5 ·
Replies
5
Views
2K
Replies
4
Views
2K
Replies
5
Views
3K
Replies
10
Views
4K