For two sets $O$ and $A$, we will call a *category structure* a collection of functions ${\sf dom}:A\to O,\ {\sf cod}:A\to O,\ {\sf 1}:O\to A,\ \circ:A\times_OA\to A$ satisfying the usual axioms for a category.

Can we parametrize the number of category structures (up to iso or equivalence) on two sets $O$ and $A$ in terms of their cardinalities? If a closed-form solution is too much to ask, can we get asymptotics for finite sets?

Denote by ${\sf Cat}^\cong(n,m)$ the number of isomorphism classes of category structures on two sets $O$ and $A$ as above with $|O|=n$ and $|A|=m$. We trivially have that $n\leq m$. For $n=m=0$ we have exactly one category, and for $n=m=1$ we have a unique up to iso category. In general for $n=m$ we have ${\sf Cat}^\cong(n,m)=1$, but all these observations are trivial.

For $n=1$ and $1\leq m$ we are counting the number of monoids on a set with $m$ elements, which I tried to search but was unable to find -- I did find this related question, and the comments by Qiaochu Yuan give a lower bound of $B^\leq_m\leq{\sf Cat}(1,m)$ where $B^\leq_m$ is the $m^{th}$ ordered Bell number. As the comment by Douglas Zare suggests, this indicates that asymptotics are the best we should hope for since the ordered Bell numbers grow faster than exponential in $m$.

The case for semigroups is cutting edge for a set with $12$ elements by a paper linked in the answer to the linked question, so any asymptotics will have to use the existence of units to hopefully shave things down. The second linked paper gives a closed-form solution for the number of nilpotent semigroups of degree $3$, so adding mild restrictions seems to potentially allow for more tractable counting.

Denote by ${\sf Cat}^\simeq(n,m)$ the number of equivalence classes of category structures on two sets $O$ and $A$ as above. We trivially have ${\sf Cat}^\simeq(n,m)\leq{\sf Cat}^\cong(n,m)$ with equality holding for $n=m$, but beyond this I don't see much concrete to say.

It may be useful to use the cardinalities of the hom-sets between objects in the category structures instead of the cardinality of the overall set of arrows, but beyond more obvious observations nothing jumps out at me using this approach either. For $1<n$ and $n<m$ it is trivial (and kind of fun) to count some small cases, but I don't know how to search the OEIS to see if the sequence is already catalogued. Any assistance is appreciated.

First linked paper: Distler A., Jefferson C., Kelsey T., Kotthoff L. (2012) The Semigroups of Order 10. In: Milano M. (eds) Principles and Practice of Constraint Programming. CP 2012. Lecture Notes in Computer Science, vol 7514. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-33558-7_63

Second linked paper: Distler A., Mitchell J. D., (2012) The Number of Nilpotent Semigroups of Degree 3. In: The Electronic Journal of Combinatorics, Volume 19, Issue 2 (2012). https://doi.org/10.37236/2441

17more comments