Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
Articles on Trending Technologies
Technical articles with clear explanations and examples
Centers of a tree
The center of a tree is a vertex with minimal eccentricity. The eccentricity of a vertex X in a tree G is the maximum distance between vertex X and any other vertex of the tree. The maximum eccentricity across all vertices is the diameter of the tree. If a tree has exactly one center, it is called a central tree. If a tree has exactly two centers (connected by an edge), it is called a bi-central tree. Every tree is either central or bi-central. Algorithm to Find Centers of a Tree The algorithm works ...
Read MoreCircuit Rank
The circuit rank (also called the cycle rank or cyclomatic number) of a connected graph tells you how many edges must be removed to eliminate all cycles and produce a spanning tree. Let G be a connected graph with n vertices and m edges. A spanning tree of G contains exactly (n − 1) edges. Therefore, the number of edges you need to delete from G to get a spanning tree is − Circuit Rank = m − (n − 1) This formula works because a spanning tree must have exactly n − 1 edges. ...
Read MoreComplement of Graph
The article is already well-structured. I'll replace the JPG image with an SVG diagram showing the graph and its complement side by side. The complement of a graph G, denoted as G̅, is a simple graph with the same set of vertices as G. An edge {U, V} exists in G̅ if and only if that edge is not present in G. In other words, two vertices are adjacent in G̅ if and only if they are not adjacent in G. If the edges that exist in graph I are absent in graph II, and combining both graphs ...
Read MoreInverse of function of Set
The inverse of a one-to-one (bijective) function f: A → B is the function g: B → A that reverses the mapping of f. It holds the following property − f(x) = y ⇔ g(y) = x The function f is called invertible if its inverse function g exists. For a function to be invertible, it must be one-to-one (injective) − meaning no two different inputs map to the same output − and onto (surjective) − meaning every element in the codomain is mapped to by some element in the domain. The inverse of f is commonly denoted as f−1. ...
Read MoreConnected vs Disconnected Graphs
The article is already well-structured. I'll replace the two JPG images with SVG diagrams and keep everything else intact. In graph theory, graphs are classified as connected or disconnected based on whether there exists a path between every pair of vertices. Understanding this distinction is fundamental to analyzing graph structure and its applications. Connected Graph A graph is connected if there exists a path between any two vertices in the graph. In other words, starting from any vertex, you can reach every other vertex by traversing edges. Connected Graph ...
Read MoreConnectivity of Graph
Whether it is possible to traverse a graph from one vertex to another is determined by how a graph is connected. Connectivity is a basic concept in graph theory that defines whether a graph is connected or disconnected. It has subtopics based on edge and vertex, known as edge connectivity and vertex connectivity. Connectivity A graph is said to be connected if there is a path between every pair of vertices. A graph with vertices that cannot reach each other is said to be disconnected. Example 1: Connected Graph In the following graph, it is possible ...
Read MoreCut Set and Cut Vertex of Graph
Whether it is possible to traverse a graph from one vertex to another is determined by how a graph is connected. Connectivity is a basic concept in graph theory that defines whether a graph is connected or disconnected. Connectivity A graph is said to be connected if there is a path between every pair of vertices. A graph with multiple disconnected vertices and edges is said to be disconnected. Cut Vertex Let G be a connected graph. A vertex V ∈ G is called a cut vertex (or articulation point) of G if removing V (and ...
Read MoreDegree of Vertex of a Graph
The degree of a vertex V is the number of edges incident with (connected to) that vertex. Notation − deg(V) In a simple graph with n vertices, the maximum degree of any vertex is − deg(v) ≤ n - 1, for all v in G A vertex can form an edge with all other vertices except itself. So the degree of a vertex will be at most the number of vertices minus 1. If there is a loop at any vertex, then it is not a simple graph. Degree of a vertex ...
Read MoreDistance between Vertices and Eccentricity
The article is already well-structured. I'll replace the JPG image with an SVG diagram and keep everything else intact. In graph theory, the distance between two vertices and the eccentricity of a vertex are fundamental concepts used to measure how far apart vertices are within a graph. These concepts lead to the definitions of the radius and diameter of a graph. Distance between Two Vertices The distance between two vertices U and V is the number of edges in the shortest path between them. If there are multiple paths connecting two vertices, the shortest one is considered ...
Read MoreEdges and Vertices of Graph
A graph is a set of points, called nodes or vertices, which are interconnected by a set of lines called edges. The study of graphs, or graph theory, is an important part of a number of disciplines in the fields of mathematics, engineering, and computer science. Graph Definition A graph (denoted as G = (V, E)) consists of a non-empty set of vertices (or nodes) V and a set of edges E. A vertex represents an endpoint of an edge. An edge joins two vertices and is represented by the set of vertices it connects. Example ...
Read More