Problem 061

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.
mdean
Posts: 143
Joined: Tue Aug 02, 2011 1:05 am

Re: Problem 061

Post by mdean » Fri Sep 09, 2011 6:27 am

Finally decided to bite the bullet and try this one. My jaw dropped when I found the answer in 16ms. I'm thinking that was just luck, but I know one way to find out.

Update: Nope. Still in the blink of an eye, though I'm not sure how that's even possible...
Image

gnanasenthil654321
Posts: 5
Joined: Sat Nov 05, 2011 6:36 pm

Problem 61 -reg

Post by gnanasenthil654321 » Thu Feb 14, 2013 12:59 pm

Hello
what is An ordered set?
does it mean that , the first number of the set is triangular , the second is square,the third pentagonal , the forth hexgonal, the fifth heptagonal , the sixth octagonal ...

kindly explain

User avatar
TheEvil
Posts: 84
Joined: Sun Nov 13, 2011 10:38 am
Location: Szeged, Hungary

Re: Problem 61 -reg

Post by TheEvil » Thu Feb 14, 2013 2:13 pm

Hello.
There is an existing topic for that problem: viewtopic.php?f=50&t=841&hilit=problem+061
Problems under 100 have a leading zero.
Ordered set means that there is exactly one triangular, square, etc. number in some order. That particular order is part of the question.
Image

Flood
Posts: 7
Joined: Wed May 15, 2013 3:53 pm

Re: Problem 061

Post by Flood » Mon Jun 03, 2013 6:54 pm

Nevermind, stupid me...

User avatar
RishadanPort
Posts: 34
Joined: Mon Jun 10, 2013 6:31 am

Re: Problem 061

Post by RishadanPort » Tue Jun 11, 2013 11:44 pm

I did this problem a while ago.

-- The first number, needs to point to the second number.... The second number needs to point to the third.... The Last number needs to point to the first.


-- One of the numbers in the list must be a triangle number
-- One of the numbers in the list must be a square..
etc.

Does not need to be that the First is a square, the Second is a triangle, etc.


(It may also be the case that a number is both a triangle and a square number... -- But as long as ONE of each Triangle, Square, ... Octogonal.. is represented... that is fine.
Image

Rishada is the gateway to free trade—but the key will cost you.

Himanshu-Mishra
Posts: 2
Joined: Sat Jun 08, 2013 8:59 am

Re: Problem 061

Post by Himanshu-Mishra » Wed Oct 16, 2013 9:01 am

I am getting total no of possibilities to be cyclic. Here each number are from different number(tri,sqr,...) no same list repeated. But I cannot understand "only ordered set " here. Pls explain me.

Code: Select all

 2145  --->  4510  --->  1089  --->  8911  --->  1128  --->  2821 
2145  --->  4510  --->  1024  --->  2465  --->  6533  --->  3321 
2145  --->  4510  --->  1089  --->  8965  --->  6533  --->  3321 
6786  --->  8646  --->  4624  --->  2465  --->  6533  --->  3367   
6441  --->  4186  --->  8626  --->  2640  --->  4033  --->  3364   
4095  --->  9517  --->  1764  --->  6441  --->  4186  --->  8640   
6441  --->  4141  --->  4186  --->  8640  --->  4033  --->  3364   
1540  --->  4033  --->  3364  --->  6426  --->  2673  --->  7315   
1596  --->  9633  --->  3364  --->  6426  --->  2673  --->  7315   
2415  --->  1541  --->  4141  --->  4186  --->  8646  --->  4624   
8281  --->  8128  --->  2850  --->  5017  --->  1717  --->  1782   
8281  --->  8128  --->  2850  --->  5017  --->  1717  --->  1782   
5625  --->  2512  --->  1275  --->  7526  --->  2625  --->  2556   
9216  --->  1651  --->  5151  --->  5151  --->  5151  --->  5192   
2116  --->  1651  --->  5192  --->  9296  --->  9633  --->  3321   
2116  --->  1651  --->  5192  --->  9296  --->  9633  --->  3321   
9216  --->  1651  --->  5151  --->  5151  --->  5151  --->  5192   
5192  --->  9216  --->  1651  --->  5151  --->  5151  --->  5151   
5192  --->  9216  --->  1651  --->  5151  --->  5151  --->  5151   
2147  --->  4753  --->  5329  --->  2926  --->  2628  --->  2821   
4030  --->  3010  --->  1024  --->  2485  --->  8515  --->  1540   
5017  --->  1782  --->  8281  --->  8128  --->  2850  --->  5050   
6441  --->  4186  --->  8626  --->  2640  --->  4033  --->  3364   
3321  --->  2116  --->  1617  --->  1770  --->  7021  --->  2133   
2145  --->  4510  --->  1089  --->  8911  --->  1128  --->  2821   
2145  --->  4510  --->  1024  --->  2465  --->  6533  --->  3321   
2145  --->  4510  --->  1089  --->  8965  --->  6533  --->  3321   
6441  --->  4141  --->  4186  --->  8640  --->  4033  --->  3364  
4186  --->  8614  --->  1426  --->  2628  --->  2850  --->  5041   
1128  --->  2821  --->  2116  --->  1617  --->  1717  --->  1711   
1540  --->  4033  --->  3364  --->  6426  --->  2673  --->  7315   
2415  --->  1541  --->  4141  --->  4186  --->  8646  --->  4624   
6426  --->  2628  --->  2850  --->  5017  --->  1717  --->  1764   
1071  --->  7140  --->  4033  --->  3321  --->  2145  --->  4510   
1782  --->  8281  --->  8128  --->  2850  --->  5050  --->  5017   
4141  --->  4186  --->  8626  --->  2628  --->  2850  --->  5041   
1071  --->  7140  --->  4033  --->  3321  --->  2145  --->  4510   
2640  --->  4095  --->  9560  --->  6084  --->  8464  --->  6426   
4033  --->  3367  --->  6724  --->  2485  --->  8515  --->  1540  

User avatar
nicolas.patrois
Posts: 117
Joined: Fri Jul 26, 2013 3:54 pm
Contact:

Re: Problem 061

Post by nicolas.patrois » Wed Oct 16, 2013 12:18 pm

I think that an ordered set is a list.
The first one is triangular, the second square and so on.
Image

Himanshu-Mishra
Posts: 2
Joined: Sat Jun 08, 2013 8:59 am

Re: Problem 061

Post by Himanshu-Mishra » Wed Oct 16, 2013 12:31 pm

oppss .. I did a typing mistake in my own script. Thank you for response nicolas.patrois :)

satyres
Posts: 31
Joined: Thu Feb 20, 2014 2:48 pm

Re: Problem 061

Post by satyres » Tue Feb 25, 2014 4:47 pm

I have a question please it may be it has already been discussed but it's not clear for me !
the number should be triangle, square, pentagonal, hexagonal, heptagonal, and octagonal.
this mean that first we check if the 4 digits number is triangle and than square, and so on.
Thanks so much

User avatar
nicolas.patrois
Posts: 117
Joined: Fri Jul 26, 2013 3:54 pm
Contact:

Re: Problem 061

Post by nicolas.patrois » Tue Feb 25, 2014 6:03 pm

The first number is triangular, the second is a square, the third is pentagonal and so on.
Image

mdean
Posts: 143
Joined: Tue Aug 02, 2011 1:05 am

Re: Problem 061

Post by mdean » Tue Feb 25, 2014 6:27 pm

Just as in the shown example, except with 6 numbers instead of 3. Order doesn't matter, just one must be triangular, a different number square, etc. If a number is both square and triangular say, you may count it as triangular, but another number must be square, and vice-versa.
Image

User avatar
dawghaus4
Posts: 53
Joined: Fri Nov 29, 2013 2:22 am

Re: Problem 061

Post by dawghaus4 » Tue Feb 25, 2014 7:59 pm

mdean has the correct interpretation of the problem.

You must come up with 6 numbers. One must be triangular, one square, one pentagonal, one hexagonal, one heptagonal, and one octagonal. But not necessarily in that order. If one number happens to fall into two categories, then you may considered to be whichever one you need; but it can be counted in only one category.

The order referred to in the problem is that one number "points" to a second (its last two digits are the first two digits of the second) - the second number "points" to the third (it last two digits are the first two digits of the third) - and so forth until the last number points to the first. Since it is cyclic, it doesn't matter which one is first.

User avatar
Oliver1978
Posts: 165
Joined: Sat Nov 22, 2014 9:13 pm
Location: Erfurt, Germany

Re: Problem 061

Post by Oliver1978 » Thu Feb 05, 2015 2:02 pm

[edit on]
*deleted my previous crap
[edit off]



I've reworked my approach. It's not much yet, but maybe somebody could say yes or no about the number of 255 potential candidates from which to build that cycle.
49.157.5694.1125

User avatar
dawghaus4
Posts: 53
Joined: Fri Nov 29, 2013 2:22 am

Re: Problem 061

Post by dawghaus4 » Thu Feb 05, 2015 6:23 pm

If by "225" you mean the number of distinct figurates in the problem, you are probably correct. I found it more useful to deal with all 302 figurates, distinct or not. For example, all hexagonal numbers are also triangle numbers, but I needed to look at them as separate numbers, with the exception that if a triangle number is used in the cycle, the duplicate hexagonal can not be used.

Tom

User avatar
Oliver1978
Posts: 165
Joined: Sat Nov 22, 2014 9:13 pm
Location: Erfurt, Germany

Re: Problem 061

Post by Oliver1978 » Fri Feb 27, 2015 1:09 am

Finally I did it. But I still don't see the ordered-ness...
49.157.5694.1125

User avatar
Georg
Posts: 157
Joined: Mon Jan 21, 2008 7:00 am
Location: Mannheim, Germany
Contact:

Re: Problem 061

Post by Georg » Fri Feb 27, 2015 8:57 am

Required Property 1: The set has to be cyclic.
Only the elements of an ordered set have a "next" element to be cyclic.

These ordered sets are distinct:
(8128, 2882, 8281) ≠ (8281, 8128, 2882) ≠ (2882, 8281, 8128) ≠ (8128, 2882, 8281)
Each of them has the three interesting properties from the problem description.

(2882, 8128, 8281) has not, because it is not cyclic.

These sets are not ordered:
{8128, 2882, 8281} = {8281, 8128, 2882} = {2882, 8281, 8128} = {2882, 8128, 8281}
There is no "next number" for an element.

"Find the sum of the only ordered set of six cyclic 4-digit numbers ..."
should be understood as
"Find the sum of any set of the six ordered sets of six cyclic 4-digit numbers ..."
as long as it is not required to start or end a set with a distinguished element.

LaughingSkull
Posts: 8
Joined: Fri Mar 09, 2007 9:21 pm

Re: Problem 061

Post by LaughingSkull » Wed Feb 17, 2016 7:21 am

RishadanPort wrote: Does not need to be that the First is a square, the Second is a triangle, etc.
oooooooh, so that's what it was that prevented me from solving this problem for 12 hours! Way to go, Mr. Euler, your insufficient explanations stump me again!

Vitaminol
Posts: 1
Joined: Sun Dec 09, 2018 10:03 am

Re: Problem 061

Post by Vitaminol » Sun Dec 09, 2018 10:27 am

The 'ordered set' phrase is ambiguous. I came up with at least these possibilities:

1. The set should be ordered by polygonal type: triangle, square, pentagonal, hexagonal, heptagonal, and octagonal - in that order.
2. Each number having index 'n' in its own type sequence, the resulting set should have descending order by 'n'. Say, first number is 56th heptagonal, second - 48th square, third - 35th octagonal, etc.

I could infer the correct meaning only after perusing in detail the forum posts. It's a waste of time! Judging by some posts, not only me confronted the problem.

I suggest to include the post of dawghaus4, published Tue Feb 25, 2014 10:59 pm, in the text of the problem:

Quote:
You must come up with 6 numbers. One must be triangular, one square, one pentagonal, one hexagonal, one heptagonal, and one octagonal. But not necessarily in that order. If one number happens to fall into two categories, then you may considered to be whichever one you need; but it can be counted in only one category.

The order referred to in the problem is that one number "points" to a second (its last two digits are the first two digits of the second) - the second number "points" to the third (it last two digits are the first two digits of the third) - and so forth until the last number points to the first. Since it is cyclic, it doesn't matter which one is first.
End quote.

It gives a very clear idea and prevents any misunderstanding

Post Reply