Problem 940

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
User avatar
KING-OLE
Posts: 28
Joined: Mon Dec 22, 2014 9:33 pm

Problem 940

Post by KING-OLE »

I am not sure I understand the SUM from i=2 to k.

In the example S(3), how is 3 used to only look at (1,1) (1,2) (2,1) (2,2) ?
Image
oivortex2
Posts: 3
Joined: Wed Oct 16, 2024 5:58 pm

Re: Problem 940

Post by oivortex2 »

The sum is evaluated over pairs (f_i, f_j) of Fibonacci numbers. The example S(3) is like that because f_2 = 1 and f_3 = 2.
User avatar
KING-OLE
Posts: 28
Joined: Mon Dec 22, 2014 9:33 pm

Re: Problem 940

Post by KING-OLE »

Thanks. I missed that.

Now I just have to figure out why my S(5) gives me 10,407 instead of 10,396. :lol:
Image
User avatar
KING-OLE
Posts: 28
Joined: Mon Dec 22, 2014 9:33 pm

Re: Problem 940

Post by KING-OLE »

I presume A(0,j) where j>1 = 0 as there's no way of finding those values.

Yes?
Image
DJohn
Posts: 90
Joined: Sat Oct 11, 2008 12:24 pm

Re: Problem 940

Post by DJohn »

KING-OLE wrote: Mon Apr 14, 2025 7:49 pm I presume A(0,j) where j>1 = 0 as there's no way of finding those values.
That is not correct. A(0, n) is undefined if n is not 0 or 1. You can't assume any value for it. If you need it to be zero, you've probably gone wrong somewhere.
User avatar
KING-OLE
Posts: 28
Joined: Mon Dec 22, 2014 9:33 pm

Re: Problem 940

Post by KING-OLE »

So, how would you find A(1,3)?

Using first formula: A(1,3) = A(0,4) + A(0,3). Both A(0,4) and A(0,3) are unspecified.

Using second one: A(1,3) = 2A(1,2) + A(0,2). A(0,2) is unspecified.

What am I missing?
Image
pjt33
Posts: 140
Joined: Mon Oct 06, 2008 6:14 pm

Re: Problem 940

Post by pjt33 »

DJohn wrote: Mon Apr 14, 2025 8:41 pm
KING-OLE wrote: Mon Apr 14, 2025 7:49 pm I presume A(0,j) where j>1 = 0 as there's no way of finding those values.
That is not correct. A(0, n) is undefined if n is not 0 or 1.
"Undefined" is not the correct word to use. It's perfectly well defined, but to determine the value it's necessary to make suitable application of the recurrence relations.
KING-OLE wrote: Mon Apr 14, 2025 10:24 pm So, how would you find A(1,3)?
Build it up bit by bit. Try expanding the recurrence relations for small values of m and n, and then see which ones relate one unknown and two knowns. Then check again to see what you can do with the new known.
Post Reply