We help IT Professionals succeed at work.

# Directed an undirected graphs

on
Hi guys: Can any one please send me a link or pictures which shows the difference between both graphs? Thanks.

-----------------------
In an undirected graph, an edge is an unordered pair of vertices. In a directed graph, an edge is an ordered pair of vertices. The ordering of the vertices implies a direction to the edge, that is that it is traversable in one direction only.
Comment
Watch Question

## View Solution Only

Most Valuable Expert 2011
Top Expert 2012

Commented:
think one-way streets vs normal streets

to visualize,  look at a very simple 2-node graph   a and b

a->b      the ab edge is ordered  a to b,  you can only traverse the edge in one direction,  start a end b

a<->b  the ab edge is not ordered,  you can traverse the edge starting at either node to go to the other node  a to b  or b to a
Most Valuable Expert 2011
Top Expert 2012
Commented:
and last option...

a<-b  the ba edge is ordered (ba vs ab)  meaning you can only traverse the edge in one direction,  starting at b, ending at a

Commented:
Thanks.
Most Valuable Expert 2011
Top Expert 2012

Commented:
Usually  an undirected graph will not have double-ended arrows showing both directions.
Rather, it will simply eliminate the arrows.

So   a<->b isn't wrong, it's just kind of odd,  a-b  would be more common to see

Again, it's rather like street directions.
Most of the time you don't see signs for two-way traffic,  it's only the one-way traffic that is labeled and two-way is assumed