Problem 086

A place to air possible concerns or difficulties in understanding ProjectEuler problems. This forum is not meant to publish solutions. This forum is NOT meant to discuss solution methods or giving hints how a problem can be solved.
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.

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


See also the topics:
Don't post any spoilers
Comments, questions and clarifications about PE problems.
thundre
Posts: 356
Joined: Sun Mar 27, 2011 10:01 am

Re: Problem 086

Post by thundre »

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.
Should be: "there are exactly 2060 cuboids for which the shortest distance is an integer when M=100"

Most people probably inserted the article subconsiously, without realizing it was missing.

IMHO "shortest distance is an integer" is less clumsy than "shortest route has integer length".
Image
User avatar
Marcus_Andrews
Administrator
Posts: 1637
Joined: Wed Nov 09, 2011 5:23 pm

Re: Problem 086

Post by Marcus_Andrews »

thundre wrote: Should be: "there are exactly 2060 cuboids for which the shortest distance is an integer when M=100"

Most people probably inserted the article subconsiously, without realizing it was missing.

IMHO "shortest distance is an integer" is less clumsy than "shortest route has integer length".
I agree with you, but I don't think hk likes using "an" here (although I'm not sure why) -- same reason why he didn't change the earlier case to "an integer."
User avatar
hk
Administrator
Posts: 12832
Joined: Sun Mar 26, 2006 10:34 am
Location: Haren, Netherlands

Re: Problem 086

Post by hk »

Look good into the proposed sentence for the first case:
"The shortest route is not always an integer"
A route cannot be an integer, at least not in my opinion.
A route is a path you follow. One of the properties it can have is its length.
I think my criticism about that proposed sentence has a deeper meaning than peculiarities of some language or other.
Image
War ruins the life and health of untold numbers of innocent children.
frogjg2003
Posts: 11
Joined: Thu Jul 14, 2011 2:37 pm

Re: Problem 086

Post by frogjg2003 »

thundre wrote:Do your results up to M=9 match what DDgeva and Jaap posted above?
I'm getting 14.
Image
All with Phython.
thundre
Posts: 356
Joined: Sun Mar 27, 2011 10:01 am

Re: Problem 086

Post by thundre »

frogjg2003 wrote:
thundre wrote:Do your results up to M=9 match what DDgeva and Jaap posted above?
I'm getting 14.
I'm copying the list from an earlier post. Check which one you're missing. Maybe you can fix your solution if you know exactly where it fails.

Code: Select all

    3 2 2
    3 3 1
    4 2 1
    6 4 4
    6 5 3
    6 6 2
    6 6 5
    7 5 5
    7 6 1
    8 3 3
    8 4 2
    8 5 1
    8 5 4
    8 8 7
Image
frogjg2003
Posts: 11
Joined: Thu Jul 14, 2011 2:37 pm

Re: Problem 086

Post by frogjg2003 »

I'm missing 665, 755, 761, and 854.
I checked 665, and the three "shortest paths" are 12.53, 12.53, and 13. So the shortest path is not 13. As I understand the problem, this should not be included.
Image
All with Phython.
User avatar
rayfil
Administrator
Posts: 1412
Joined: Sun Mar 26, 2006 5:30 am
Location: Quebec, Canada
Contact:

Re: Problem 086

Post by rayfil »

I'm missing 665, 755, 761, and 854.
I would strongly suggest you read this thread from the start.
When you assume something, you risk being wrong half the time.
frogjg2003
Posts: 11
Joined: Thu Jul 14, 2011 2:37 pm

Re: Problem 086

Post by frogjg2003 »

rayfil wrote:
I'm missing 665, 755, 761, and 854.
I would strongly suggest you read this thread from the start.
I have and I'm still not sure what's wrong.
Is 665 a solution or not? I'm getting that it's not because there are shorter paths than 13, but it was included in thundre's list, so I'm not sure.
Image
All with Phython.
User avatar
rayfil
Administrator
Posts: 1412
Joined: Sun Mar 26, 2006 5:30 am
Location: Quebec, Canada
Contact:

Re: Problem 086

Post by rayfil »

but it was included in thundre's list
Did you check where he took that list??? And the subsequent posts?????
When you assume something, you risk being wrong half the time.
thundre
Posts: 356
Joined: Sun Mar 27, 2011 10:01 am

Re: Problem 086

Post by thundre »

rayfil wrote:
but it was included in thundre's list
Did you check where he took that list??? And the subsequent posts?????
Sorry. I thought it was a correct list, because I didn't check those posts either.
Image
frogjg2003
Posts: 11
Joined: Thu Jul 14, 2011 2:37 pm

Re: Problem 086

Post by frogjg2003 »

Since I can't get a straight answer, I'm posting my results to M=15

Code: Select all

3 2 2
3 3 1
4 2 1
6 4 4
6 5 3
6 6 2
8 3 3
8 4 2
8 5 1
8 8 7
9 6 6
9 7 5
9 8 4
9 9 3
12 3 2
12 4 1
12 5 4
12 6 3
12 7 2
12 8 8
12 9 7
12 10 6
12 11 5
12 12 4
15 4 4
15 5 3
15 6 2
15 7 1
15 10 10
15 11 9
15 12 8
15 13 7
15 14 6
15 15 5
From this I get:

Code: Select all

5 3
10 14
15 34
Are these right or not?
Image
All with Phython.
frogjg2003
Posts: 11
Joined: Thu Jul 14, 2011 2:37 pm

Re: Problem 086

Post by frogjg2003 »

bump for an answer
Image
All with Phython.
thundre
Posts: 356
Joined: Sun Mar 27, 2011 10:01 am

Re: Problem 086

Post by thundre »

You're missing "12 8 1".
Image
Loers
Posts: 10
Joined: Sun Aug 19, 2012 3:03 am

list for M=19

Post by Loers »

this is the list that i got for M=19
http://pastebin.com/ENb7czzM

is there sth wrong with it ?
I tried to look throught the comments to see the complete list but couldn't find that,,

thanks in advanced ^_^
User avatar
rayfil
Administrator
Posts: 1412
Joined: Sun Mar 26, 2006 5:30 am
Location: Quebec, Canada
Contact:

Re: Problem 086

Post by rayfil »

As stated in the problem description:
up to a maximum size of M by M by M
Which means you could have a cuboid as large as 19x19x19 when M=19 (such as a 10x14x18).
When you assume something, you risk being wrong half the time.
Loers
Posts: 10
Joined: Sun Aug 19, 2012 3:03 am

Re: Problem 086

Post by Loers »

oh sorry I mean M=9
User avatar
TheEvil
Posts: 84
Joined: Sun Nov 13, 2011 10:38 am
Location: Szeged, Hungary

Re: Problem 086

Post by TheEvil »

Loers wrote:oh sorry I mean M=9

Actually row (1 6 7 sol1 : 10.000000 |) is not a good answer, since the shortest paht is sqrt(98). And that's not the only bad row.
Image
garyp
Posts: 1
Joined: Thu Aug 23, 2012 10:40 pm

Problem 086

Post by garyp »

The other thread is a mess of semantics and word disputes so I'm starting a new one. The accepted answer does not match mine so here I am. I have used my algorithm to compute correctly:
99, 1975
100, 2060
in accordance with the example provided. My number that results in 1,000,000 is nowhere near the official answer. Using some predictive analysis, you can guess where my answer falls based on this chart. Do you have any pointers for someone that correctly arrives at the example but whose following results look like this: http://i.imgur.com/eFHHM.png
Thanks
TripleM
Posts: 384
Joined: Fri Sep 12, 2008 3:31 am

Re: Problem 086

Post by TripleM »

If your answer lies close to where that graph suggests, then your answer is too low. That means your value has less than a million solutions, so if you write some additional code that ensures each of your million solutions is valid and unique then you'll find your problem.
User avatar
hk
Administrator
Posts: 12832
Joined: Sun Mar 26, 2006 10:34 am
Location: Haren, Netherlands

Re: Problem 086

Post by hk »

@garyp.
It's not up to you to decide a new topic must be created.
So I merged the two topics.
The reason for that is that it isn't helpful to have more than one thread for a problem.
Everybody after you would have to scan both threads which makes this forum yet more messy.
(And thanks for having forced me to do some moderating)
Image
War ruins the life and health of untold numbers of innocent children.
Post Reply