Diophantine Equation

bghalmeida

New member
Joined
Oct 13, 2020
Messages
14
The following Diophantine equation has exactly one solution where [MATH]x [/MATH] and [MATH]y[/MATH] are integers, and [MATH]4 \leq y≤6[/MATH]. What is the value of [MATH]x[/MATH] in that solution?
[MATH]6x+9y=27[/MATH]
Hey guys, I tried to solve this equation but I didn't undertand why [MATH]x=-6[/MATH] or [MATH]x=-9[/MATH] are wrong, could someone help me?
 
6x is even. 27 is odd. What must 9y be, even or odd, for the sum to be odd? Depending
on what 9y is, what must y be, even or odd? You have three choices among the y-values
given in the problem, and notice that exactly one of them is odd.
 
6x is even. 27 is odd. What must 9y be, even or odd, for the sum to be odd? Depending
on what 9y is, what must y be, even or odd? You have three choices among the y-values
given in the problem, and notice that exactly one of them is odd.

I realized which was the correct answer during my time thinking about it, but I still have some doubts.

Using the Extended Euclidean Algorith I got:
[MATH]6(-9)+9(9)=27[/MATH]And continuing the math:
[MATH]6(6k)+9(-4k)=0[/MATH]So:
[MATH]6(6k-9)+9(-4k+9)=27[/MATH]
With that in mind and using what the exercise gave me, I know that [MATH]4\leq-4k+9\leq 6[/MATH], because [MATH]y=-4k+9[/MATH].

So I calculated the inequation and it gave me [MATH]x\in{\left[\frac{3}{4},\frac{5}{4}\right]}[/MATH]
But it doesn't give me my answer. I understand what is the correct answer, but I don't want to do the "math", I want to really understand what I'm doing wrong here, could you show me?
 
[MATH]6x + 9y = 27 \implies \dfrac{2}{3} * x + y = 3.[/MATH]
But both y and 3 are integers so (2/3) * x must be an integer such that

[MATH]\dfrac{2}{3} * x = 3 - y \implies 2x = 9 - 3y \implies x = 4.5 - 1.5y.[/MATH]
If y is even, then X is not an integer. Thus, y must be odd. But y is limited to three succesive integers, namely 4, 5, or 6. Only one is odd, namely 5.

[MATH]\therefore x = 4.5 - 1.5(5) = 4.5 - 7.5 = -3.[/MATH]
Lookagain explained this in post #2.
 
The following Diophantine equation has exactly one solution where [MATH]x [/MATH] and [MATH]y[/MATH] are integers, and [MATH]4 \leq y≤6[/MATH]. What is the value of [MATH]x[/MATH] in that solution?
[MATH]6x+9y=27[/MATH]
Hey guys, I tried to solve this equation but I didn't undertand why [MATH]x=-6[/MATH] or [MATH]x=-9[/MATH] are wrong, could someone help me?
If x = -6 then we get:

6*(-6) + 9y = 27 \(\displaystyle \ \ \to \ \ \) y = 7 \(\displaystyle \ \ \to \ \ \) beyond the allowed domain of y \(\displaystyle \ \ \to \ \ \) [MATH]4 \leq y≤6[/MATH]
If x = -9 then we get:

6*(-9) + 9y = 27 \(\displaystyle \ \ \to \ \ \) y = 9 \(\displaystyle \ \ \to \ \ \) beyond the allowed domain of y \(\displaystyle \ \ \to \ \ \) [MATH]4 \leq y≤6[/MATH]
 
I am confused about the difficulty here. If y is an integer and 4≤y≤6, then can only be 4, 5 or 6
Lookagain clearly explained why y must be odd. That is y = 5.
So you solve 6x+9y=27, where y = 6. This is trivial.

6x + 9*5 = 27 so 6x = -18. Then x = -3

If you did not realize what Lookagain pointed out then you try to find a solution for x for y=4, 5 and 6.
 
I am confused about the difficulty here. If y is an integer and 4≤y≤6, then can only be 4, 5 or 6
Lookagain clearly explained why y must be odd. That is y = 5.
So you solve 6x+9y=27, where y = 6. This is trivial.

6x + 9*5 = 27 so 6x = -18. Then x = -3

If you did not realize what Lookagain pointed out then you try to find a solution for x for y=4, 5 and 6.
I wasn't looking for an answer, I was looking for the real math of the problem. I know the correct answer, but what if I had to find a number that satisfies the equation and the set of numbers was bigger? But I already solved it, thanks.
 
@Jomo

I suspect that the OP has learned the technique for dealing with a class of Diophantine equations using the extended Euclidean algorithm. Thus, he was thinking about division being involved and so did not see the relevance of Lookagain's post. (This is not a criticism of Lookagain's post, which was right on point.) So I started my post with division to accord with the OP's initial mindset. I acknowledge that is a roundabout way of making Lookagain's argument.
 
Last edited:
What the OP was thinking involves this:

[MATH]6x + 9y = 27[/MATH]
has a solution in integers if and only if the greatest common divisor of 6 and 9 is a divisor of 27.

3 is the magic number in this case. There is a non-empty solution set.

I am not sure how the OP concluded

[MATH]\dfrac{3}{4} \le x \le \dfrac{5}{4} \implies x = 1[/MATH]
because that is an error. Possibly what was meant was that (3, 1) is a valid solution. Therefore,

[MATH]k \in \mathbb Z \text { and } x = 3 + 3k \text { and } y = 1 - 2k.[/MATH]
Given the extra condition that

[MATH]4 \le y \le 6 \implies 4 \le 1 - 2k \le 6 \implies - \dfrac{6 - 1}{2} \le k \le - \dfrac{4 - 1}{2} \implies \\ k = - 2 \implies x = 3 + 3(-2) = -3 \text { and } y = 1 - 2(-2) = 5.[/MATH]And obviously that works [MATH]6(-3) + 9(5) = 45 - 18 = 27.[/MATH]
To answer the OP's most recent question, if there is a magic number and one variable has the further restriction that it must be one of a magic number of successive integers, then there is a unique solution. My guess is that a binary search will find that solution relatively quickly, but I have not demonstrated that.
 
What the OP was thinking involves this:

[MATH]6x + 9y = 27[/MATH]
has a solution in integers if and only if the greatest common divisor of 6 and 9 is a divisor of 27.

3 is the magic number in this case. There is a non-empty solution set.

I am not sure how the OP concluded

[MATH]\dfrac{3}{4} \le x \le \dfrac{5}{4} \implies x = 1[/MATH]
because that is an error. Possibly what was meant was that (3, 1) is a valid solution. Therefore,

[MATH]k \in \mathbb Z \text { and } x = 3 + 3k \text { and } y = 1 - 2k.[/MATH]
Given the extra condition that

[MATH]4 \le y \le 6 \implies 4 \le 1 - 2k \le 6 \implies - \dfrac{6 - 1}{2} \le k \le - \dfrac{4 - 1}{2} \implies \\ k = - 2 \implies x = 3 + 3(-2) = -3 \text { and } y = 1 - 2(-2) = 5.[/MATH]And obviously that works [MATH]6(-3) + 9(5) = 45 - 18 = 27.[/MATH]
To answer the OP's most recent question, if there is a magic number and one variable has the further restriction that it must be one of a magic number of successive integers, then there is a unique solution. My guess is that a binary search will find that solution relatively quickly, but I have not demonstrated that.
You explained it very well, I understood everything. Thank you.
 
Top