Is there any online service that can provide possible graphs (the simplest one) when I give a sequence of integers (node degrees) as input (or reject the input) -based on Erdős-Gallai formula?
Thanks in advance for your help.
Is there any online service that can provide possible graphs (the simplest one) when I give a sequence of integers (node degrees) as input (or reject the input) -based on Erdős-Gallai formula?
Thanks in advance for your help.
Presumably you'r after a graph that realizes a degree sequence (if possible), since this is what the Erdős–Gallai Theorem is about. These graphs can be constructed by the Havel-Hakimi algorithm (a description is on the Wikipedia page for degree).
It's straightforward: Each vertex is labeled by its remaining degree (starting off with the specified degree sequence). In each iteration, we take a vertex $v$ of maximum degree $d$, and connect it to $d$ vertices that have the maximum remaining degree. This drops the remaining degree of $v$ to $0$ and each of its new neighbors' remaining degrees by $1$.
Moreover, the algorithm fails if and only if the degree sequence is not realizable.