# Math

#### Cisco Qid

##### Well-known member
x + xy +y =54

x +y = ?

x and y are integers.

#### Cisco Qid

##### Well-known member
The answer is 14.

#### inertia

##### Super Member

Nice - It works because she restricts x and y to positive integers.

If one was trying to solve for x and y individually (no restrictions), the task cannot be solved by algebraic analysis alone because there are two unknown values and only one equation is provided.

___

#### Cisco Qid

##### Well-known member
Nice - It works because she restricts x and y to positive integers.

If one was trying to solve for x and y individually (no restrictions), the task cannot be solved by algebraic analysis alone because there are two unknown values and only one equation is provided.

___
Yeah, I thought you needed 2 equations for 2 unknowns too.

#### inertia

##### Super Member
Yeah, I thought you needed 2 equations for 2 unknowns too.

Unless one can measure one of the variables, of course.

___

#### LifeIn

##### Well-known member
Even before any detailed analysis is done, the problem is obviously solvable, given enough time, by brute force exhaustive search. There are only 54 possible values for x and 54 possible values for y (less, actually) that have the slightest chance of making

x + xy + y = 54

work if x and y are both positive integers. That's less than 3000 cases to check - easy for a computer. Also, by symmetry, we see that any solution (x,y) is also a solution (y,x), so if there is one solution, there must be two solutions, but both will produce the same (x+y), which is the only thing this problem asks. All that said, this is not the interesting or fun way to tackle this problem. It is much more fun to try to solve it without resorting to a computer search, which the video cited by @Cisco Qid does nicely. I don't need to add anything to that excellent video explainer.

But I will raise the question of generalizations. Was it necessary to use the number 54 to make it a good problem? Would it have been an interesting and uniquely solvable problem if, instead of 54, some other number were used, such as

x + xy + y = 436 (there is only one solution for x+y)

How about x + xy + y = 439 ? (exactly 7 solutions for x+y)

In general, which numbers, n, make the problem

x + xy + y = n

uniquely solvable for (x+y), given that x and y are positive integers?

Finally, there is one value of n for which there are exactly two solutions for (x+y) and they are consecutive. What is n?

#### inertia

##### Super Member
Even before any detailed analysis is done, the problem is obviously solvable, given enough time, by brute force exhaustive search. There are only 54 possible values for x and 54 possible values for y (less, actually) that have the slightest chance of making

x + xy + y = 54

work if x and y are both positive integers. That's less than 3000 cases to check - easy for a computer. Also, by symmetry, we see that any solution (x,y) is also a solution (y,x), so if there is one solution, there must be two solutions, but both will produce the same (x+y), which is the only thing this problem asks. All that said, this is not the interesting or fun way to tackle this problem. It is much more fun to try to solve it without resorting to a computer search, which the video cited by @Cisco Qid does nicely. I don't need to add anything to that excellent video explainer.

But I will raise the question of generalizations. Was it necessary to use the number 54 to make it a good problem? Would it have been an interesting and uniquely solvable problem if, instead of 54, some other number were used, such as

x + xy + y = 436 (there is only one solution for x+y)

How about x + xy + y = 439 ? (exactly 7 solutions for x+y)

In general, which numbers, n, make the problem

x + xy + y = n

uniquely solvable for (x+y), given that x and y are positive integers?

Finally, there is one value of n for which there are exactly two solutions for (x+y) and they are consecutive. What is n?

Let's try the algebraic procedure again except this time...

Code:
``````>> %
>> % The same algebraic procedure using a different integer
>> %
>> % Given information:  x and y are positive integers
>> % and x + xy + y = 53  (not 54 this time)
>> %
>> % Solve for x + y
>> %
>> % Factorization: (x+1)*(y+1)= xy + x + y +1
>> %
>> % Where x + xy + y +1 = 53 + 1 = 54
>> %
>> % Because x and y are positive integers (x+1)is >= 2, and (y+1) is also >=2
>> %
>> % So, x + y = (x+1) + (y+1) - 2.
>> %
>> % The number 54 can also be expressed as: 54*1 and 1*54, or 27*2 and 2*27, or 9*6 or 6*9,
>> % or 18*3 and 3*18
>> %
>> % There are four categories.  The first 54*1 and 1*54 are excluded because (x+1)>=2 as is
>> % (y+1)>=2.
>> %
>> % Using the resulting three categories we have:
>> %
>> % x + 1 = 27
>> % y + 1 = 2
>> %
>> % Therefore x + y = (x+1) + (y+1) - 2 = 27 + 2 - 2 = 27
>> %
>> % In the next category we have:
>> %
>> % x + 1 = 9
>> % y + 1 = 6
>> %
>> % Therefore x + y = (x+1) + (y+1) - 2 = 9 + 6 - 2 = 13
>> %
>> % In the remaining category we have:
>> %
>> % x + 1 = 18
>> % y + 1 = 3
>> %
>> % Therefore x + y = (x +1) + (y+1) - 2 = 18 + 3 - 2 =  19
>> %``````

Here x + y has three potential values depending on how one calculates 54. ( 53 is a prime number. The only choice is 1*53 or 53*1.)

(Note: The author of the video didn't say why she didn't "like" the value 54 simply by visual inspection. )

- I don't trust this method.

___

Last edited: