We have $p$ different families with $1 \leq i \leq p$ members for the $i$-th family. We also have $q$ tables where table $t_j$ has a capacity of $1 \leq j \leq q$. We want no two members of a family sitting on the same table.
We have a source node which is connected to every family. The flow between the source and a family is the number of members the family has. On the right side we have the destination source which is connected to every table and has a flow of the table capacity.
How should we properly connect the families and tables? My idea is that every family has a connection to every table, but I am unsure what the flow capacity would be there.