It’s counting time

What is the number of idempotent functions f:\{1,\dots,n\}\to\{1,\dots,n\}?

Advertisements
It’s counting time

2 thoughts on “It’s counting time

  1. It is relatively straightforward to prove that if X_n is the number of such functions, then X_{n+2} = X_{n+1} +  (n+1)X_n for n\geqslant 0, with X_1=X_0=1. If f is the EGF of such sequence of numbers, one obtains after some algebra that f'(z) = (1+z)f(z) with initial condition f(0)=1, which gives f(z) = \exp(z+z^2/2), and hence a closed formula for the X_n.

    Liked by 2 people

  2. A low brow solution: an idempotent function f is uniquely determined by its set of fixed points X together with its restriction f:[n]\setminus X \to X. Conversely, this set of data uniquely determines an idempotent function.

    Therefore, X_n = \sum_{k=0}^n \binom{n}{k} k^{n-k}.

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s