0%

Problem 662


Problem 662


Fibonacci paths

Alice walks on a lattice grid. She can step from one lattice point A(a,b) to another B(a+x,b+y) providing distance AB=x2+y2 is a Fibonacci number 1,2,3,5,8,13, and x0, y0.

In the lattice grid below Alice can step from the blue point to any of the red points.

p662_fibonacciwalks.png

Let F(W,H) be the number of paths Alice can take from (0,0) to (W,H).
You are given F(3,4)=278 and F(10,10)=215846462.

Find F(10,000,10,000)mod1,000,000,007.


斐波那契路径

爱丽丝正在格阵上行走,每次她都可以从一个格点A(a,b)走到另一个格点B(a+x,b+y),只要两点间距离AB=x2+y2是一个斐波那契数1,2,3,5,8,13,,且x0y0

如下图的格阵,从蓝点出发,爱丽丝可以前往任意一个红点。

p662_fibonacciwalks.png

F(W,H)为爱丽丝从(0,0)出发到达(W,H)的可行路径数目。
已知,F(3,4)=278F(10,10)=215846462

F(10,000,10,000)mod1,000,000,007.


Gitalking ...