Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

README.md

Graph

definition:

It's a collection of obj called Vertices & together with relationship between them called Edges.

graph

Ex: Flight map, road map

terminogloy:

  • Edges:

    Directed: It has orientartion.

    directed graph

    Undirected: It's bidirectional.

    undirected graph

    Weighted: Weight/cost is assigned to each edge.

    weighted graph

    • Weighted directed
    • Weighted undirected

    Incoming edges

    incoming edges

    Outgoing edges

    outgoing edges

  • Source/Destination:

    • Source: 1st end-point (from)
    • Destination: 2nd end-point (to)
  • Degree of vertex: Number of incident edges of the vertex.

    no of incoming edges + no of outgoing edges

    • Indegree: no of incomig edges
    • Outdegree: no of outgoing edges
  • Path: Seq of edges starting at one vertex & ending at another vertex.

  • Cycle: It's a path that start & end at the same vertex.

    cycle