Graphs Flashcards
Degree of Vertex
Number of Edges sticking out of undirected graph
Self Loop
Edge starting and ending at same vertex
Multigraph
If there are two edges between 2 vertices or there are self loops.
Complete Graph
If there is an edge between every vertex of the graph
Graph
Graph is represent using G=(V,E) where V is set of all vertices, and E is set of all edges
Sum of degree of all vertices in undirected graph
Twice the number of edges 2|E|
Eulerian Cycle
Cover every edge exactly once and come back to starting position
Eulerian Path
Cover every edge exactly once but don’t come back to starting position
Is every EC is EP?
Yes, but not vice-versa
Connected Graph
If you can start from any vertex and reach any other vertex
Connected Component
Is a piece of original graph within which you can start from any vertex and reach any other vertex. But you cannot grow the connected component by adding any more vertex.
For Eulerian Cycle
Every timer we enter a vertex, we can exit it along some other edge. so the degree of vertex should be even. If the degree of any vertex is odd grapg can not have Eulerian cycle
If the graph is connected and degree of every vertex is even does it have Eulerian Cycle
Yes
If graph has 2 vertices with Odd Degree and rest with even degree
It has Eulerian Path
Vertices with Odd dgree 0, EC or EP?
Eulerian Cycle