A jug holds 5 liters and a mug holds 3 liters. A bottle holds 29 liters. How many ways can the bottle be filled exactly using jugs and mugs?
Answer
2 ways
The correct answer is 2 ways — These are the only integer solutions, so there are 2 ways.
Step-by-step solution
- Let be the number of jugs and the number of mugs.
- Set up the equation for the total volume: .
- Express in terms of : .
- For to be an integer, must be divisible by 5.
- Solve the congruence , i.e. .
- Multiply both sides by the inverse of 3 modulo 5, which is 2: .
- Thus for some non‑negative integer .
- The condition (since ) restricts to or .
- For , .
- For , .
- These are the only integer solutions, so there are 2 ways.
Common mistake: Ignoring modulus conditions or negative solutions
Concept tested: Linear Diophantine equations
Published · How this solution was prepared and checked
← All Jugs and Mugs questions