Posted by: **tagrawal** | September 30, 2010

## Lecture-13 Graphs

*(Guest post by Tushar Agrawal*)

In today’s lecture we learned some basic definitions of graphs.

*Graph**:- *

- G = (V, E), Where V (set of vertices) and E (set of edges).
- Two vertices, u and v are connected by an edge ((u,v) Є E).

*Undirected Graphs (Symmetric)*

- if (u,v) Є E. then (v,u) Є E ( V goes to U and U goes to V)

* *

*But we can make an undirected graph to it’s equivalent directed graph.*

* *

*Directed Graphs (Asymmetric)*

- (u,v) Є E but there is no edge where (v,u). which basically means
**U** goes to **V **but **V **does not go to **U**

Couple of Examples from class:

1) TV host graph

2) Airplane Route

3) Internet graph (Depends on conditions given)

*Path*:

- A path is a sequence of vertices
** (V**_{1},V_{2},………V_{k})

Such that (V_{i},V_{i+1}) Є E 1≤ i ≤ k-1

V_{1————– }V_{2—————– }V_{3}

*Cycle*:

- A cycle is a sequence
**(V**_{1},V_{2},………V_{k-1}) where V_{k = }V_{1}
- Distance between
**V** & **U** = shortest path length between **V** & **U**
- A
*simple* path is a path with no repeated vertices.
- Length of path = number of edges in it

### Like this:

Like Loading...

*Related*

## Leave a Reply