Apologies if this is a basic question, I'm a bit of a rookie when it comes to maths.
If I have two sets of nodes $U$ and $V$, is there a way to calculate how many bipartite graphs could be formed if:
- All the nodes in $U$ must have a degree $\geq$ 1
- All the nodes in $V$ must have a degree of 0 or 1
Thank you!
Each $v \in V$ is assigned either a vertex in $U$ or is left disconnected. Thus, each bipartite graph where the vertices in $V$ have degree at most one is equivalent to a function $f:V \to U \cup \{*\}$ where we interpret $f(v) = *$ as $v$ having no neighbour. Now, as an extra condition, we need each vertex in $U$ to be connected to one in $V$. Thus, if $V' = V \setminus f^{-1}(\{*\})$, the mapping $f\restriction_{V'}$ should be surjective. This also chacterizes our graphs, since each solution can be written is this form.
Therefore, we can count these in the following manner: first, we select a subset $W$ of vertices of $V$ that will be disconnected so that at least $|U|$ vertices of $V$ are left. Afterwards, each possible option to connect the vertices on $V \setminus W$ corresponds to a surjective function from $V\setminus W$ to $U$. More concretely, it will suffice to count the following set
$$ \coprod_{\quad W \subseteq V \\ |W| \leq |V| - |U|} \{f:V\setminus W \to U : f \text{ is surjective}\} $$
whose cardinal is
$$ \sum_{\quad W \subseteq V \\ |W| \leq |V| - |U|} S(|V \setminus V|,|U|)|U|! $$
where $S(i,j)$ denotes the Stirling number of second kind. A bit more explicitly, if $|V| = m$, $|U| = n$, we have
$$ \sum_{i = 0}^{m-n}{m\choose i}S(m-i,n)n! $$
possible options (here we use that sets of same size give an equal amount of surjective functions since these only depend on the size of the domain and codomain). Making a change of variable as $k = m - i$ and using the symmetry of the binomial coefficients, we get:
$$ \sum_{k = m}^{n}{m\choose k}S(k,n)n! $$