Problem 086
Forum rules
As your posts will be visible to the general public you are requested to be thoughtful in not posting anything that might explicitly give away how to solve a particular problem.
This forum is NOT meant to discuss solution methods for a problem.
See also the topics:
Don't post any spoilers
Comments, questions and clarifications about PE problems.
As your posts will be visible to the general public you are requested to be thoughtful in not posting anything that might explicitly give away how to solve a particular problem.
This forum is NOT meant to discuss solution methods for a problem.
In particular don't post any code fragments or results.
Don't start begging others to give partial answers to problems
Don't ask for hints how to solve a problem
Don't start a new topic for a problem if there already exists one
Don't start begging others to give partial answers to problems
Don't ask for hints how to solve a problem
Don't start a new topic for a problem if there already exists one
See also the topics:
Don't post any spoilers
Comments, questions and clarifications about PE problems.
- Francky
- Posts: 90
- Joined: Sat May 07, 2011 3:49 pm
- Location: South of France
Re: Problem 086
EDIT : removed
No problem.
No problem.
Last edited by Francky on Thu Jun 16, 2011 12:21 pm, edited 1 time in total.
Entia non sunt multiplicanda praeter necessitatem- hk
- Administrator
- Posts: 12831
- Joined: Sun Mar 26, 2006 10:34 am
- Location: Haren, Netherlands
Re: Problem 086
This forum is:Francky wrote:I got a very simple proof to find the minimum between
...
I'll remove this if it's a spoiler. I don't know. Tell me, thanks.
A place to air possible concerns or difficulties in understanding ProjectEuler problems. This forum is not meant to publish solutions.
Posted without any reference to a PE problem I wouldn't see a problem.Posted with reference to this problem I think it is a hint.
Edit:
ThanksFrancky wrote:EDIT : removed
No problem.

War ruins the life and health of untold numbers of innocent children.
-
ScoopyPuppy2
- Posts: 8
- Joined: Wed Dec 07, 2011 7:07 am
Re: Problem 086
There are two things that trouble me in the problem statement:

- "integer" is a noun, so I would say (I am not a native) that "shortest route is not always integer" should read "shortest route is not always an integer" or "shortest route is not always integral"
- why does it state that "there are up to three "shortest" path candidates for any given cuboid"? I would say there are six. Granted, they go by pairs, as the formula for the distance shows, still, I count six of them: the spider can choose any of the three faces that "touches" it, but for each of these faces, there are two edges on the other side that the spider can choose. In the case of a cube, those six paths are all "smallest".
-
thundre
- Posts: 356
- Joined: Sun Mar 27, 2011 10:01 am
Re: Problem 086
I think that's right, from a grammatical standpoint. If the authors were English professors, I'd bother them until they changed it. But this very minor grammatical error doesn't seem to stop people from solving the problem.ScoopyPuppy2 wrote:There are two things that trouble me in the problem statement:
- "integer" is a noun, so I would say (I am not a native) that "shortest route is not always integer" should read "shortest route is not always an integer" or "shortest route is not always integral"
I think anybody who has a chance of solving this problem understands that cuboids are symmetric. Mathematically, there are at most 3 values to check. If you changed it to 6, you'd probably want to draw the other shortest path on the diagram, which would make it harder to visualize. I don't think it would help.ScoopyPuppy2 wrote:
- why does it state that "there are up to three "shortest" path candidates for any given cuboid"? I would say there are six. Granted, they go by pairs, as the formula for the distance shows, still, I count six of them: the spider can choose any of the three faces that "touches" it, but for each of these faces, there are two edges on the other side that the spider can choose. In the case of a cube, those six paths are all "smallest".
Good luck with your solution!

-
ScoopyPuppy2
- Posts: 8
- Joined: Wed Dec 07, 2011 7:07 am
Re: Problem 086
Thanks for the reply!
I agree. Yet the wording puzzled me. There are definitely up to six shortest path candidates! But since they go by pair, only three need to be checked.thundre wrote:I think anybody who has a chance of solving this problem understands that cuboids are symmetric. Mathematically, there are at most 3 values to check. If you changed it to 6, you'd probably want to draw the other shortest path on the diagram, which would make it harder to visualize. I don't think it would help.ScoopyPuppy2 wrote:
- why does it state that "there are up to three "shortest" path candidates for any given cuboid"? I would say there are six. Granted, they go by pairs, as the formula for the distance shows, still, I count six of them: the spider can choose any of the three faces that "touches" it, but for each of these faces, there are two edges on the other side that the spider can choose. In the case of a cube, those six paths are all "smallest".
I had solved it, thanks!thundre wrote:Good luck with your solution!
- hk
- Administrator
- Posts: 12831
- Joined: Sun Mar 26, 2006 10:34 am
- Location: Haren, Netherlands
Re: Problem 086
Always happy to learn something.thundre wrote:I think that's right, from a grammatical standpoint. If the authors were English professors, I'd bother them until they changed it. But this very minor grammatical error doesn't seem to stop people from solving the problem.ScoopyPuppy2 wrote:There are two things that trouble me in the problem statement:
- "integer" is a noun, so I would say (I am not a native) that "shortest route is not always integer" should read "shortest route is not always an integer" or "shortest route is not always integral"
However, nitpickingwise, shouldn't we talk about the length of the shortest route then?
"A route that is integer" or "an integral route" seem rather pointless to me too.

War ruins the life and health of untold numbers of innocent children.
-
ScoopyPuppy2
- Posts: 8
- Joined: Wed Dec 07, 2011 7:07 am
Re: Problem 086
Hi hk,
FWIW, I agree.hk wrote:However, nitpickingwise, shouldn't we talk about the length of the shortest route then?
"A route that is integer" or "an integral route" seem rather pointless to me too.
-
frogjg2003
- Posts: 11
- Joined: Thu Jul 14, 2011 2:37 pm
Re: Problem 086
I'm getting 34 for 15, 66 for 20, and 111 for 25. Can I PM my code to someone so they can take a look at it?DDgeva wrote:Can you please verify that there are 35 solutions for M=15 and 67 solutions for M=20?
If these are correct, are there 113 solutions for M=25?

All with Phython.
- Marcus_Andrews
- Administrator
- Posts: 1637
- Joined: Wed Nov 09, 2011 5:23 pm
Re: Problem 086
Either way, right now it's grammatically incorrect. "...the shortest route is not always integer" should be changed to "...the shortest route is not always an integer" at the very least.
Regarding "integral": One person's pedantic distinction is another person's thorough accuracy. While "integral" is a valid adjective to use here, it's not as widely known as the other obvious definition of "integral," so sometimes it's best to avoid the confusion. While I think a case could be made for either term, I'd rather go with the definition that best renders the problem description as clear as possible for the greatest number of people -- so I think "an integer" is perfectly fine.
Regarding "integral": One person's pedantic distinction is another person's thorough accuracy. While "integral" is a valid adjective to use here, it's not as widely known as the other obvious definition of "integral," so sometimes it's best to avoid the confusion. While I think a case could be made for either term, I'd rather go with the definition that best renders the problem description as clear as possible for the greatest number of people -- so I think "an integer" is perfectly fine.
hk wrote:Always happy to learn something.thundre wrote:I think that's right, from a grammatical standpoint. If the authors were English professors, I'd bother them until they changed it. But this very minor grammatical error doesn't seem to stop people from solving the problem.ScoopyPuppy2 wrote:There are two things that trouble me in the problem statement:
- "integer" is a noun, so I would say (I am not a native) that "shortest route is not always integer" should read "shortest route is not always an integer" or "shortest route is not always integral"
However, nitpickingwise, shouldn't we talk about the length of the shortest route then?
"A route that is integer" or "an integral route" seem rather pointless to me too.
-
thundre
- Posts: 356
- Joined: Sun Mar 27, 2011 10:01 am
Re: Problem 086
Do your results up to M=9 match what DDgeva and Jaap posted above?frogjg2003 wrote:I'm getting 34 for 15, 66 for 20, and 111 for 25. Can I PM my code to someone so they can take a look at it?

- hk
- Administrator
- Posts: 12831
- Joined: Sun Mar 26, 2006 10:34 am
- Location: Haren, Netherlands
Re: Problem 086
That's all very nice but in the next sentence, that is now three lines long already it reads:Either way, right now it's grammatically incorrect. "...the shortest route is not always integer" should be changed to "...the shortest route is not always an integer" at the very least.
Regarding "integral": One person's pedantic distinction is another person's thorough accuracy. While "integral" is a valid adjective to use here, it's not as widely known as the other obvious definition of "integral," so sometimes it's best to avoid the confusion. While I think a case could be made for either term, I'd rather go with the definition that best renders the problem description as clear as possible for the greatest number of people -- so I think "an integer" is perfectly fine.
"By considering all cuboid rooms with integer dimensions, "
So if we abolish "integral" we would have to write something like:
"By considering all cuboid rooms with dimensions that are integers,...."
or
"By considering all cuboid rooms with dimensions being integers,...."
which sounds pretty awkward to me and not very readable.
So why not let a possibly grammatically incorrect but perfectly clear description as it is?

War ruins the life and health of untold numbers of innocent children.
- hk
- Administrator
- Posts: 12831
- Joined: Sun Mar 26, 2006 10:34 am
- Location: Haren, Netherlands
Re: Problem 086
Actually if we insist that "integer" is a noun, I think this whole Wikipedia article should get a major rewrite:
http://en.wikipedia.org/wiki/Integer_triangle
To begin with the title: Integer triangle.
I can't grammatically make any chocolate of this if "integer" is considered a noun.
Even stronger with a sentence like:
"A Heronian triangle, also known as a Heron triangle or a Hero triangle, is a triangle with integer sides and integer area."
and more sentences like that in the same article.
Could it be that common usage has developed in the direction that "integer" can also be used in other ways than as a noun?
http://en.wikipedia.org/wiki/Integer_triangle
To begin with the title: Integer triangle.
I can't grammatically make any chocolate of this if "integer" is considered a noun.
Even stronger with a sentence like:
"A Heronian triangle, also known as a Heron triangle or a Hero triangle, is a triangle with integer sides and integer area."
and more sentences like that in the same article.
Could it be that common usage has developed in the direction that "integer" can also be used in other ways than as a noun?

War ruins the life and health of untold numbers of innocent children.
- Marcus_Andrews
- Administrator
- Posts: 1637
- Joined: Wed Nov 09, 2011 5:23 pm
Re: Problem 086
Because it's a slightly different usage.hk wrote:That's all very nice but in the next sentence, that is now three lines long already it reads:Either way, right now it's grammatically incorrect. "...the shortest route is not always integer" should be changed to "...the shortest route is not always an integer" at the very least.
Regarding "integral": One person's pedantic distinction is another person's thorough accuracy. While "integral" is a valid adjective to use here, it's not as widely known as the other obvious definition of "integral," so sometimes it's best to avoid the confusion. While I think a case could be made for either term, I'd rather go with the definition that best renders the problem description as clear as possible for the greatest number of people -- so I think "an integer" is perfectly fine.
"By considering all cuboid rooms with integer dimensions, "
So if we abolish "integral" we would have to write something like:
"By considering all cuboid rooms with dimensions that are integers,...."
or
"By considering all cuboid rooms with dimensions being integers,...."
which sounds pretty awkward to me and not very readable.
So why not let a possibly grammatically incorrect but perfectly clear description as it is?
"Integer" in itself is not technically an adjective but a noun. "Integral" is an adjective but usually confuses people, so "integer" tends to be used as a descriptive noun -- an "attributive noun" or "noun adjunct." See more here.
For instance, "School uniform" is fine but you wouldn't say "Consider all uniforms that are school(s)" in the same way I could reference "green apples" with "Consider all apples that are green."
To native English speakers, "By considering all cuboid rooms with integer dimensions" sounds completely fine because "integer" here is an attributive noun. But "...the shortest route is not always integer" sounds incorrect.
- hk
- Administrator
- Posts: 12831
- Joined: Sun Mar 26, 2006 10:34 am
- Location: Haren, Netherlands
Re: Problem 086
Thanks for your explanation.
So I presume that:
"and the shortest route doesn't always have integer length." is correct?
So I presume that:
"and the shortest route doesn't always have integer length." is correct?

War ruins the life and health of untold numbers of innocent children.
- Marcus_Andrews
- Administrator
- Posts: 1637
- Joined: Wed Nov 09, 2011 5:23 pm
Re: Problem 086
I think this is OK to use.hk wrote:Thanks for your explanation.
So I presume that:
"and the shortest route doesn't always have integer length." is correct?
Last edited by Marcus_Andrews on Tue Mar 13, 2012 2:48 pm, edited 2 times in total.
- hk
- Administrator
- Posts: 12831
- Joined: Sun Mar 26, 2006 10:34 am
- Location: Haren, Netherlands
Re: Problem 086
Changed it that way.

War ruins the life and health of untold numbers of innocent children.
- hk
- Administrator
- Posts: 12831
- Joined: Sun Mar 26, 2006 10:34 am
- Location: Haren, Netherlands
Re: Problem 086
Thanks.
I'm still a bit baffled why:
"there are exactly 2060 cuboids for which the shortest distance is integer when M=100," doesn't raise any thorn.
I'm still a bit baffled why:
"there are exactly 2060 cuboids for which the shortest distance is integer when M=100," doesn't raise any thorn.

War ruins the life and health of untold numbers of innocent children.
- Marcus_Andrews
- Administrator
- Posts: 1637
- Joined: Wed Nov 09, 2011 5:23 pm
Re: Problem 086
That one falls victim to the same issue as the previous case, yes. If you wanted to keep the language consistent with the recent edit, you could use "...there are exactly 2060 cuboids for which the shortest distance has an integer length when M=100" or something to that effect.hk wrote:Thanks.
I'm still a bit baffled why:
"there are exactly 2060 cuboids for which the shortest distance is integer when M=100," doesn't raise any thorn.
- hk
- Administrator
- Posts: 12831
- Joined: Sun Mar 26, 2006 10:34 am
- Location: Haren, Netherlands
Re: Problem 086
I made it:
"for which the shortest route has integer length when M=100", because I'm not that happy with a distance that has a length.
"for which the shortest route has integer length when M=100", because I'm not that happy with a distance that has a length.

War ruins the life and health of untold numbers of innocent children.
- Marcus_Andrews
- Administrator
- Posts: 1637
- Joined: Wed Nov 09, 2011 5:23 pm