Reading about GCD and LCM I came around this problem (apparently dated from around 16th century):

> 
> A group of 20 person which are men, women and children drink in a
> tavern. Together they spend 18 Thaler. The men drin for 3 Thaler a
> person, the women for 2 Thaler, and the children for half a Thaler.
> How many men, women and children were in the drinking party?
> 
> 
> 

My approach:  

If $x=men$, $y = women$ and $z = children$ then we have the following equations:

$x + y + z = 20$  

$3x + 2y + \frac{1}{2}z = 18 \equiv 6x + 4y + z = 36$

So we have $2$ Diophantine equations that I guess an approach to solve the problem is to do some trial and error on a table of values till we reach a combination that satisfies both constraints. But I didn't want to do that approach so I did the following:

$x + y + z = 20 \equiv z = 20 -x - y$  

So:  

$6x + 4y + z = 6x + 4z + 20 -x - y = 36 \equiv 5x + 3y = 16$

We ended up with the Diophantine equation $5x + 3y = 16$
The solutions to this equations are of the form:  

$x = -16 + 3\cdot n$ and $y = 32 - 5\cdot n$

Since the values can only be positive the only acceptable solution is when $n = 6$ where we end up with $(x,y) = (2,2)$

Plugging back to the equation for $z$ we have:
$z = 20 - x - y = 20 - 2 - 2 = 16$

So the solution is: $(x, y, z) = (2, 2, 16)$ for $2$ men, $2$ women and $16$ children.  

This satisfies both equations since:  

$2 + 2 + 16 = 20$ and $12 + 8 + 16 = 36$

Now when I was looking online for solutions I found an [article](https://www.sciencedirect.com/science/article/pii/S0315086008000670) mentioning the triple $(1, 5, 14)$

This problem is of the following form, the specific example given here being derived from Adam Riese (1544):

> 
> A group of 20 persons, men, women and virgins, drink in a tavern,
> together they spend 18 Thaler. The men drink for 3 Thaler a person,
> the women for 2 Thaler and the virgins for half a Thaler. How many
> men, women and virgins were in the drinking party?
> 
> 
> In modern terms, this type of problem leads to two linear equations to
> be solved in integers, but involving three unknowns.8 The problem, if
> fractional and negative solutions are excluded, can have a finite
> number of solutions, an infinite number of solutions, or no solutions.
> After deriving equations in one parameter (say t) from the problem
> (either in words or in symbolic form), most books describe a
> trial-and-error process. Setting t to 1, 2, 3, etc. and checking
> whether the sum of the unknowns becomes equal to a number n (in the
> example 20) leads in a limited number of steps to a solution. In the
> example given above, the triple $(1, 5, 14)$ satisfying the problem is found.
> 
> 
> 

Now I am confused. Did I misunderstand something? The triple mentioned in the article does not satisfy both constraints and actually my approach to find the Diophantine solutions can not find it.

Can someone help me understand this?

Also is my approach efficient? Is there a "smarter" way to tackle with problems such as this?