Jump to content

Explain this Formula

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
4 replies to this topic

#1
gammaman

gammaman

    Learning Programmer

  • Members
  • PipPipPip
  • 71 posts
What does this formula mean and how do I use it?

S(n+1,m) = S(n,m-1)+m*S(n,m)

#2
Turk4n

Turk4n

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 3,847 posts

gammaman said:

What does this formula mean and how do I use it?

S(n+1,m) = S(n,m-1)+m*S(n,m)

What's
S=?
n=?
m=?
For care to explain that for me please :)
Posted Image

#3
gammaman

gammaman

    Learning Programmer

  • Members
  • PipPipPip
  • 71 posts
The only other part I figured out is that S(n,m) = the total number of partitions on n elements with m blocks.

#4
PythonPower

PythonPower

    Programming Professional

  • Members
  • PipPipPipPipPip
  • 230 posts
It appears to be a recurrence relation of some kind. The most important inference from this particular one would probably be:

S(n,m) = S(n-1,m-1)+m*S(n-1,m)
(I should note, you should watch what (n, m) this is correct for!)

You can probably work out some special cases (like maybe S(0, m) = ...) which allow you to use it in a kind of dynamic programming method.

#5
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
Adding to what PythonPower said,
It is an incomplete recurrence relation. You have to have the initial conditions. It is the mathematical equivalent of recursion in programming.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog