# [SOLVED]Basic Algebra Question: A Diophantine Problem

#### first21st

##### New member
Jun 19, 2013
9
The Price of each shirt is 70 dollars and the price of each tie is 30 dollars. He spent a total amount of exactly 810 dollars and bought the maximum number of shirts. What is the ratio of the number of Shirt to Ties?

Thanks,

James

#### MarkFL

Staff member
Feb 24, 2012
13,775
Re: Basic Algebra Question: Need to be solved!

If we let $S$ be the number of shirts, and $T$ be the number of ties, can you now state the amount spent on shirts and on ties, and what the sum of these two quantities must be?

#### first21st

##### New member
Jun 19, 2013
9
Re: Basic Algebra Question: Need to be solved!

Yes, it's 70*S + 30*T = 810. But the amounts spent on shirt and ties separately are unknown. The other parameter which might be helpful here is that, with this amount of 810, a maximum number of shirts have been purchased and rest have been spent for purchasing ties.

#### MarkFL

Staff member
Feb 24, 2012
13,775
Re: Basic Algebra Question: Need to be solved!

Yes! That's right, we may state:

$$\displaystyle 70S+30T=810$$

Now, we normally need two equations when we have two unknowns to get a solution, but in this case we are restricting the two variables to non-negative integers. This is what is called a Diophantine equation.

While there are more sophisticated approaches, I would simply observe that 810 is divisible by 30, and so one possible solution is 0 shirts and 27 ties. However, we are told the number of shirts is the maximum allowed, so we can look at adding a certain number of shirts while subtracting a certain number of ties. The cost of the number of shirts added must be equal to the cost of the ties subtracted. I would look for the LCM of 30 and 70 to find this cost...

#### first21st

##### New member
Jun 19, 2013
9
Re: Basic Algebra Question: Need to be solved!

Thanks for your reply. Yes, the problem is we have just one equation for two unknowns. But another point here is that,

if X is amount spent for shirts, and Y is the amount spent for ties, Y=810-X.

Now, we need to find out the maximum value of X for which Y is divisible by 30. So, how can we approach this problem.

And, the LCM of these two numbers is 210. So is it possible to solve this problem with this LCM value?

James

#### MarkFL

Staff member
Feb 24, 2012
13,775
Re: Basic Algebra Question: Need to be solved!

Hey James,

Good, yes 210 is the LCM of 30 and 70. So how many shirts can we add at a time, and how many ties does this mean we need to subtract?

#### first21st

##### New member
Jun 19, 2013
9
Re: Basic Algebra Question: Need to be solved!

That means, 210*3=630 will be spent on shirts, and rest of the 180 will be spent on ties. Am I right?

Thanks,

James

#### MarkFL

Staff member
Feb 24, 2012
13,775
Re: Basic Algebra Question: Need to be solved!

Yes, that is correct, but here is what I had in mind:

We know $(S,T)=(0,27)$ is one possible solution. As $\text{lcm}(30,70)=210$, we know then that we may add 3 shirts and subtract 7 ties. Let $n$ be the number of times we do this, and so we may state:

$(S,T)=(3n,27-7n)$

Now, minimizing $T$, we see that $n=3$ is the largest value of $n$ that allows $T$ to be non-negative, and so the desired solution is:

$(S,T)=(3\cdot3,27-7\cdot3)=(9,6)$

#### first21st

##### New member
Jun 19, 2013
9
Re: Basic Algebra Question: Need to be solved!

Thanks a lot. That was a quite complicated one!
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.8435392379760742, "perplexity": 671.2670073575263}, "config": {"markdown_headings": true, "markdown_code": false, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2022-21/segments/1652662517245.1/warc/CC-MAIN-20220517095022-20220517125022-00402.warc.gz"}