# It’s counting time

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

# Points on the unit circle

This problem is from Stanley’s “Enumerative Combinatorics Vol. I”, more precisely problem 12 from Chapter 1 (sadly, no solution is provided there.)

Consider $n$ points arranged in the unit circumference and draw all $\binom n2$ chords connecting two of the points. Assume that the points are laid out in such a way no three chords intersect in a single point (that is, there are no triple intersections). Into how many regions will the interior of the circle by divided? Stanley says: “Try to give an elegant proof avoiding induction, finite differences, generating functions, summations, and the like.” One can do such a thing.

There’s another problem that involves placing points in the circle. Place $2n$ points in the circle, and label $n$ of them with a $1$, and the remaining $n$ with a $-1$. Prove we can trace the circle, starting from on of this points, in such a way that the partial sums of the values of the points is always positive, and this can be done both clockwise and anticlockwise. Can you generalize this to a continuous (as opposed to discrete) setting?

# q-Powerseries and binary strings

Consider the infinite product $(1+qz)(1+qz^2)(1+qz^4)(1+qz^8)\cdots$, and write this as $\sum\limits_{\nu \geqslant 0} q^{B_\nu}z^\nu$. Relate $B_\nu$ to the binary expression of $\nu$. The sequence starts off as: $1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,\ldots$.