However, an undirected graph P is connected iff there exists a directed tree that is a subgraph of P when edge directions are ignored.
the resulting formulation is almost identical and is based on flow constraints which ensure that there is a path from a designated root in the graph to all other nodes.