problem 452

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.
Post Reply
gelatine1
Posts: 4
Joined: Sun Sep 16, 2012 4:12 pm

problem 452

Post by gelatine1 »

Hi, I read the statement of Problem 452 (View Problem) and it states that F(10,10)=571. The way I interpreted the question I believe it is incorrect so I don't really know how I should interpret the question.

To calculate F(10,10) I would take all 10^10 combinations of a 10-tuple with numbers 1 to 10 and try if their product is less than or equal to 10. I made a bruteforce program for that and it gave me 391.
I also calculated it by hand and I got 391 too.

Can anyone clarify the problem statement since I probably didn't understand it in the correct way ?
Image
User avatar
mpiotte
Administrator
Posts: 1961
Joined: Tue May 08, 2012 5:40 pm
Location: Montréal, Canada

Re: problem 452

Post by mpiotte »

gelatine1 wrote:...
To calculate F(10,10) I would take all 10^10 combinations of a 10-tuple with numbers 1 to 10 and try if their product is less than or equal to 10. I made a bruteforce program for that and it gave me 391. I also calculated it by hand and I got 391 too.
Can anyone clarify the problem statement since I probably didn't understand it in the correct way ?
Your interpretation seems correct, but you may have a counting mistake. Let's try smaller numbers:
F(1, 1) = 1
F(2, 2) = 3
F(3, 3) = 7
F(4, 4) = 19
F(5, 5) = 31
F(6, 6) = 76
F(7, 7) = 106
F(8, 8) = 253
F(9, 9) = 373
Can you get these?
Image
gelatine1
Posts: 4
Joined: Sun Sep 16, 2012 4:12 pm

Re: problem 452

Post by gelatine1 »

oops I got a mistake for F(4,4) and I found the problem. I had made some wrong assumptions to simplify my program(since 10^10 cases would be too much) and I found my mistakes in my counting too.

thanks for the help :)
Image
hamsterofdeath
Posts: 20
Joined: Fri Apr 27, 2018 7:17 pm

Re: problem 452

Post by hamsterofdeath »

does order matter?
are (10,1,..) and (..1,10,1...) different solutions?
User avatar
hk
Administrator
Posts: 12832
Joined: Sun Mar 26, 2006 10:34 am
Location: Haren, Netherlands

Re: problem 452

Post by hk »

You can find out by trying both options for F(10,10).
Somewhat higher in this thread you can even find smaller cases to verify which of the two options holds.
Image
War ruins the life and health of untold numbers of innocent children.
Post Reply