Problem 015

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.
andy7788
Posts: 1
Joined: Mon Feb 08, 2016 9:24 am

Problem 015

Post by andy7788 »

The question shows a 2x2=4 square grid. Am I right to assume that the solution to the 2x2 is based on 3x3=9 sides. If so then can you confirm that the solution to the 20x20 question is based on 21x21 sides.
User avatar
hk
Administrator
Posts: 12832
Joined: Sun Mar 26, 2006 10:34 am
Location: Haren, Netherlands

Re: Problem 015

Post by hk »

Please don't start a new topic for a problem if there already exists one.
Image
War ruins the life and health of untold numbers of innocent children.
User avatar
dawghaus4
Posts: 56
Joined: Fri Nov 29, 2013 2:22 am

Re: Problem 015

Post by dawghaus4 »

andy7788 wrote:The question shows a 2x2=4 square grid. Am I right to assume that the solution to the 2x2 is based on 3x3=9 sides. If so then can you confirm that the solution to the 20x20 question is based on 21x21 sides.
No, that assumption is not needed. There is no need to look at a 21X21 grid to get the number of paths in a 20X20 grid.
DJohn
Posts: 90
Joined: Sat Oct 11, 2008 12:24 pm

Re: Problem 015

Post by DJohn »

andy7788 wrote:The question shows a 2x2=4 square grid. Am I right to assume that the solution to the 2x2 is based on 3x3=9 sides. If so then can you confirm that the solution to the 20x20 question is based on 21x21 sides.
It depends what you mean by "sides". If you mean the edges of the squares, then there aren't 9 in the 2x2 grid. There are 12. It is true that the 2x2 grid has 3 vertical lines and 3 horizontal lines, but multiplying those doesn't give the number of anything that I'd call "sides".

The only thing I can see 9 of in the 2x2 grid are the vertices, where those vertical and horizontal lines meet. The 20x20 grid will have 21 vertical lines, 21 horizontal lines, and 21x21 = 441 vertices. And 20x20 = 400 squares, of course.
Liquid25677
Posts: 9
Joined: Thu May 26, 2022 4:07 pm

Re: Problem 015

Post by Liquid25677 »

I have a feeling that this problem could be solved easily without checking all the routes, so I've been trying to come up with a formula for a n*n grid, with no success up to now.
Post Reply