Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
2 dimensional recurrence equation

Subject: 2 dimensional recurrence equation

From: g.n.mueller@gmail.com

Date: 4 Mar, 2009 16:29:22

Message: 1 of 6


> However, it is more difficult in the 2-d realm. Even
> for as simple a problem as the linear one you
> describe,
>
> =A0f(m+1,n+1) =3D a*f(m,n+1) + b*f(m+1,n)
>
> you must supply more than merely f(0,0). If that
> is the only piece of information supplied, there
> will be infinitely many potential solutions. As said
> by Roger, you must supply the value for all f(0,n)
> and all f(m,0) for a unique solution to exist.

I have derived a formula for both f(0,n) and f(m,0).
I just couldn't find out how to typed it into matlab...
and i still can't..


> An
> alternative is to define the values of
>
> f(-1,n) =3D f(m,-1) =3D 0
>
> for all m and n. If you do this, then the recurrence
> becomes a separable one, reducing to a pair of
> linear 1-d recurrences along each axis. Thus
>
> f(m+1,0) =3D a*f(m,0)
>
> and
>
> f(0,n+1) =3D a*f(0,m)
>
> with f(0,0) given as some fixed constant. Now
> the solution is indeed trivial, as we have
>
> f(m,n) =3D f(0,0)*a^n*b^n

I think I don't understand this.. or it doesn't work in my
example. Would you give me a simple example where
it does work?
I feel a bit thick now but I'm just an undergrad and this
is not related to any of my courses...


I really appreciate your patience and help, thanks!

Gloria

Subject: 2 dimensional recurrence equation

From: g.n.mueller@gmail.com

Date: 4 Mar, 2009 16:37:09

Message: 2 of 6


Can someone post code for matlab in 1-d case, I can figure out the
rest myself.
Thanks!

Subject: 2 dimensional recurrence equation

From: g.n.mueller@gmail.com

Date: 4 Mar, 2009 16:40:39

Message: 3 of 6


Is Matlab capable of returning a symbolic result at all??

Subject: 2 dimensional recurrence equation

From: John D'Errico

Date: 4 Mar, 2009 17:25:05

Message: 4 of 6

g.n.mueller@gmail.com wrote in message <2efff27d-724e-476f-ac03-3223781a2106@l38g2000vba.googlegroups.com>...
>
> > However, it is more difficult in the 2-d realm. Even
> > for as simple a problem as the linear one you
> > describe,
> >
> > =A0f(m+1,n+1) =3D a*f(m,n+1) + b*f(m+1,n)
> >
> > you must supply more than merely f(0,0). If that
> > is the only piece of information supplied, there
> > will be infinitely many potential solutions. As said
> > by Roger, you must supply the value for all f(0,n)
> > and all f(m,0) for a unique solution to exist.
>
> I have derived a formula for both f(0,n) and f(m,0).
> I just couldn't find out how to typed it into matlab...
> and i still can't..

I don't know what you are trying to do, nor
do I have the symbolic tools, so I cannot
help you there. Perhaps someone else can do
so.

Even so, simple algebra will solve this, by hand.


> > An
> > alternative is to define the values of
> >
> > f(-1,n) =3D f(m,-1) =3D 0
> >
> > for all m and n. If you do this, then the recurrence
> > becomes a separable one, reducing to a pair of
> > linear 1-d recurrences along each axis. Thus
> >
> > f(m+1,0) =3D a*f(m,0)
> >
> > and
> >
> > f(0,n+1) =3D a*f(0,m)
> >
> > with f(0,0) given as some fixed constant. Now
> > the solution is indeed trivial, as we have
> >
> > f(m,n) =3D f(0,0)*a^n*b^n
>
> I think I don't understand this.. or it doesn't work in my
> example. Would you give me a simple example where
> it does work?

Let me see. (I may have made a mistake too.
The fingers often type faster than the mind.)

Along one axis, at n == 0 if we reduce this to
a pure problem in m, we have

f(m,0) = f(0,0)*a^m

Likewise, with m == 0, we have

f(0,n) = f(0,0)*b^n

Now, look at f(1,1). Can we move out into
the plane from the edges?

f(1,1) = 2*a*b*f(0,0)

How about f(2,1)? Often the simplest thing is
just to look for a pattern before we know how
to proceed.

f(2,1) =a*f(1,1) + b*f(2,0)
       = 2*a^2*b*f(0,0) + b*a^2*f(0,0)
       = 3*a^2*b*f(0,0)

f(3,1) is no more difficult. It will be as simple
as f(2,1).

f(3,1) = a*f(2,1) + b*f(3,0) = 4*a^3*b*f(0,0)

Inductively, you will see the solution for f(m,1).

f(m,1) = (m+1)*a^m*b*f(0,0)

Now, look at f(1,n). Symmetry will convince you
of the solution here.

f(1,n) = (n+1)*a*b^n*f(0,0)

One more step should be adequate to see the
general pattern here. What is f(2,2)? Can you
find this? (Write as f(2,2)/f(0,0) if you want to
save some mental energy.) It looks like this (I
think it does. Remember my fast fingers.)

f(2,2) = 2*3*a^2*b^2*f(0,0)

So it looks very much like the general solution
is of the general form:

f(m,n) = K(n,m)*f(0,0)*a^m*b^n

I'll let you figure out what the general
coefficient out front is. A little more careful
work should suffice. try it out, then test out
your conclusions.

John

Subject: 2 dimensional recurrence equation

From: g.n.mueller@gmail.com

Date: 4 Mar, 2009 19:47:41

Message: 5 of 6


Thanks John!
I had made a mistake. Anyway:
I have found a solution to my problem
on the web. It takes quite some effort to
solve the thing by hand.

Subject: 2 dimensional recurrence equation

From: g.n.mueller@gmail.com

Date: 4 Mar, 2009 19:48:09

Message: 6 of 6


Thanks John!
I had made a mistake. Anyway:
I have found a solution to my problem
on the web. It takes quite some effort to
solve the thing by hand.

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us