How to Solve the Tough Diophantine Equation?

  • Context: Undergrad 
  • Thread starter Thread starter Izzhov
  • Start date Start date
Click For Summary

Discussion Overview

The discussion revolves around solving a specific Diophantine equation related to a problem inspired by XKCD, focusing on finding all possible solutions rather than just one. Participants explore various methods, including trial and error, and consider the implications of different combinations of values.

Discussion Character

  • Exploratory
  • Mathematical reasoning
  • Debate/contested

Main Points Raised

  • One participant mentions finding a solution through trial and error, specifically noting that 7 orders of mixed fruit is one solution.
  • Another participant suggests that the problem resembles a knapsack problem, indicating a programming approach could be efficient.
  • A participant questions the existence of a semi-efficient method to solve the equation by hand.
  • One participant provides a detailed breakdown of combinations that lead to a specific solution of 15.05, emphasizing the need for an odd number of certain values to meet the equation's requirements.
  • The same participant discusses various combinations and their feasibility, analyzing the limitations of certain values in achieving the target sum.
  • Another participant expresses gratitude for the detailed solution provided.

Areas of Agreement / Disagreement

Participants do not reach a consensus on the most efficient method to solve the equation, and multiple approaches are discussed without resolution. The exploration of combinations and their implications remains open-ended.

Contextual Notes

The discussion includes assumptions about the nature of the values involved and the constraints of the problem, which are not fully resolved. The specific combinations and their limitations are explored but not definitively concluded.

Izzhov
Messages
120
Reaction score
0
I was reading XKCD and I found this:
np_complete.png

I have no idea how to solve it. I know 7 orders of mixed fruit is one solution, but I only got that through trial and error. Does anyone know how to find every solution?
 
Physics news on Phys.org
It's a knapsack problem, programming the most efficient way to solve it is a nice challenge :smile:
 
So... there isn't really any semi-efficient way to solve it by hand?
 
That's the million dollar question.
 
Ah, I see...
 
For those who don't want to waste their time, the only other solution for this problem is 5.8+2.15+2*3.55=15.05

2.15
2.75
3.35
3.55

4.2
5.8

Needs 15.05

I scrutinized the combinations. It only applies to this problem.

1st, notice that, because 15.05 has a .05 in the end, we need an odd number of the orders ending in .x5 (the “odds”). So we need 1, 3, or 5 of them (7 is too much for any # but 2.15).

2nd, we investigate the 4.20 and the 5.80.

-Obviously, 3*5.8 exceeds the sum, 2*5.8=11.6 leaves us 3.45 to fill, which can’t be done.

-Then with 5.8, we have 9.25 to fill. Suppose we satisfy this with the “odds” (combination 5.8 and 4.2 will be considered later).
+ We must have an odd combination of the .x5 to make 9.25. Obviously, the 1 and 5 combinations can’t satisfy, so we need 3.
+ As 3*3.35=10.05 > 9.25 and 3*2.75=8.25<9.25, and 2*2.75 +3.55=9.05<9.25
hence we need two orders from the >3 orders , and 1 from the ones smaller than 3.
+ Try all these combinations (not that many of them), we see that only 2*3.55+2.15=9.25 does the trick!-Now, consider 3*4.2=12.6, we need 2.45 not possible again.
-Then 2*4.2=8.4, we need 6.65, with 1 or 3 or 5 of the odd items. We can quickly drop this possibility.
-Then 4.2, we need 10.85. Observe that 3*3.55=10.65<10.85 hence no possible 3-combinations and 5*2.15=10.75no possible 5-combinations
-Now 4.2+5.8=10. We need 5.05 from 1, 3 or 5 of the odds. 3*2.15 is too big, and 1*3.55 is too small. Not possible.

3rd, we investigate the ones with only the odd prices. We can only have 5 of them.
5*2.75=13.75<15.05
5*3.35=16.75>15.05
We need something of the small side and the big side.

Suppose we have 3.55 in the combinations. As 5*3.55=17.75 which is 2.70 bigger than 15.05. We want to change some of the 3.55 to other elements to make a -2.70. Because the other elements are -.20, -.80,-1.40 less than 3.55, which can’t form a -2.70 . So no 3.55 in the combination.

4*3.35=13.4 is also too big for a 5-combination.
3*3.35=10.05 need 5 for 2 of the 2.15 and 2.75 can’t be done
2*3.35 + 3*2.75=14.95<15.05 No
Any other combination is too small
 
Last edited:
Thanks for the solution. :)
 

Similar threads

  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 7 ·
Replies
7
Views
4K
  • · Replies 14 ·
Replies
14
Views
5K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 3 ·
Replies
3
Views
4K