UG function

Defining an undirected graph (UG)