TITLE: Asymptotic number of certain functions without fixed points
QUESTION [16 upvotes]: Terry Tao's question Non-enumerative proof that there are many derangements? suggests
the following. What classes $C_n$ of functions $f\colon \lbrace
1,2,\dots,n\rbrace \to \lbrace 1,2,\dots,n\rbrace$
have the property that if $a(n)$ is the number of functions in $C_n$
and $b(n)$ is the number without fixed points, then
$\lim_{n\to\infty} a(n)/b(n) = e$? Examples include all functions,
permutations, and alternating permutations. (I don't know a simple
proof for alternating permutations.) Rather than lots of examples, a
general theorem that includes all (or most) of these examples would be
more interesting.

REPLY [4 votes]: Here is a generalization of the derangements case.
Take a Latin rectangle with $n$ columns and $k\le n^{1-\epsilon}$ rows, such that, for each $i$, the value $i$ does not appear in the $i$-th column.  Now consider the set of all permutations that extend this rectangle to $k+1$ rows; i.e., the permutations which are derangements of each of the given $k$ rows.  Then this set of permutations has the fraction $e^{-1}(1+o(1))$ of derangements in it.
This follows from Theorem 6.2 of my paper on Latin rectangles with Chris Godsil.