Skip to main content

Type of Graph

 Depending upon the position of the vertices and edges, the Graphs can be classified into different types:

  1. Null Graph: A Graph with an empty set of edges is termed a Null Graph.
  2. Trivial Graph: A Graph having only one vertex is termed a Trivial Graph.
  3. Simple Graph: A Graph with neither self-loops nor multiple edges is known as a Simple Graph.
  4. Multi Graph: A Graph is said to be Multi if it consists of multiple edges but no self-loops.
  5. Pseudo Graph: A Graph with self-loops and multiple edges is termed a Pseudo Graph.
  6. Non-Directed Graph: A Graph consisting of non-directed edges is known as a Non-Directed Graph.
  7. Directed Graph: A Graph consisting of the directed edges between the vertices is known as a Directed Graph.
  8. Connected Graph: A Graph with at least a single path between every pair of vertices is termed a Connected Graph.
  9. Disconnected Graph: A Graph where there does not exist any path between at least one pair of vertices is termed a Disconnected Graph.
  10. Regular Graph: A Graph where all vertices have the same degree is termed a Regular Graph.
  11. Complete Graph: A Graph in which all vertices have an edge between every pair of vertices is known as a Complete Graph.
  12. Cycle Graph: A Graph is said to be a Cycle if it has at least three vertices and edges that form a cycle.
  13. Cyclic Graph: A Graph is said to be Cyclic if and only if at least one cycle exists.
  14. Acyclic Graph: A Graph having zero cycles is termed an Acyclic Graph.
  15. Finite Graph: A Graph with a finite number of vertices and edges is known as a Finite Graph.
  16. Infinite Graph: A Graph with an infinite number of vertices and edges is known as an Infinite Graph.
  17. Bipartite Graph: A Graph where the vertices can be divided into independent sets A and B, and all the vertices of set A should only be connected to the vertices present in set B with some edges is termed a Bipartite Graph.
  18. Planar Graph: A Graph is said to be a Planar if we can draw it in a single plane with two edges intersecting each other.
  19. Euler Graph: A Graph is said to be Euler if and only if all the vertices are even degrees.
  20. Hamiltonian Graph: A Connected Graph consisting of a Hamiltonian circuit is known as a Hamiltonian Graph.

Comments

Popular posts from this blog

7 features of OOPs

The 7 features of OOPs are as follows: 1. Incapsulation 2. Abstraction 3. Inheritance 4. Polymorphism 5. Object must be used 6. Massage passing : One object can interect with another object 7. Dynamic binding The most initial 4 are the basic OOPs features that is required.

Sieve Erotosthenes program in c++

  #include <bits/stdc++.h> using namespace std ; /* this program is for finding the prime number till the given number */ void primeSieve ( long long n ) {     long long prime [ n + 1 ] = { 0 };     for ( long long i = 2 ; i <= n ; i ++ )     {         if ( prime [ i ] == 0 )         for ( long long j = i * i ; j <= n ; j += i )         {             prime [ j ] = 1 ;         }             }     for ( long long i = 2 ; i <= n ; i ++ )     {         if ( prime [ i ] == 0 )         cout << i << " " ;     }         } int main () {     long long n ;     cin >> n ;     primeSieve ( n );     return 0 ; }

Array Data Structure