Successfully reported this slideshow.
Upcoming SlideShare
×

of

Upcoming SlideShare
Next

0 Likes

Share

# Graph theory

Introduction to Graph Theory

See all

### Related Audiobooks

#### Free with a 30 day trial from Scribd

See all
• Be the first to like this

### Graph theory

1. 1. Graph Theory Gaurav Yadav IIIT Sonepat
2. 2. Contents ● Introduction to Graphs ● Representation of Graphs ● Weighted Graphs ● Non-weighted Graphs ● Directed Graphs ● Undirected Graphs ● Self-loops ● Multigraphs ● Real World Examples
3. 3. Introduction to Graphs ● A graph G, consists of Vertices(V) and Edges(E). ● G = (V,E). ● V is the set of Vertices. ● E is the set of Edges.
4. 4. Representation of Graphs ● Let V = {a, b, c}, and E = { { a, b }, { a, c } }. a b c Set describing all the vertices(or nodes) a, b, and c. Set describing an edge between node a and c. |V| = 3 |E| = 2
5. 5. Weighted Graphs ● Weight or cost is a numerical value associated to every edge of a graph. We encounter with it in real world, when we need to calculate shortest path between two points, for example – when we see maps to find the shortest driving distance. The path is chosen which has the minimum cost. A E C D B 3 1 1 2 4 2 Shortest path between A & E : A -> D -> C -> E 8 4
6. 6. Non-weighted Graphs ● In non weighted graphs, when we doesn’t have weights, all edges are considered equal. The path which has less number of nodes is considered effective. A E C D B Shortest path between A & E : A -> B -> E
7. 7. Undirected Graphs ● Undirected graphs have edges that do not have a direction. The edges indicate a two- way relationship, in that each edge can be traversed in both directions. A B D C
8. 8. Directed Graphs ● Directed graphs have edges with direction. The edges indicate a one-way relationship, in that each edge can only be traversed in a single direction. A B D C
9. 9. Self-loops ● Graphs created can have one or more self-loops, which are edges connecting a node to itself. A B D C
10. 10. Multigraphs ● Graphs can have multiple edges with the same source and target nodes, and the graph is then known as a multigraph. A multigraph may or may not contain self-loops. A B D C
11. 11. Real World Examples ● Social Graphs – Connections on LinkedIn. ● Path Optimization Algorithms – Google Maps. ● Routing Algorithms in Computer Networks – Routing IP Table in Router. ● Scientific Computations - Edge Chasing in Operating Systems.
12. 12. Thank You!

Introduction to Graph Theory

Total views

85

On Slideshare

0

From embeds

0

Number of embeds

1

0

Shares

0