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
Distance between Vertices and Eccentricity
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 as the distance. Notation − d(U, V) Example Take a look at the following graph − Here, the distance from vertex ...
Read MoreFinding the chromatic number of complete graph
The chromatic number of a graph is the minimum number of colors needed to color its vertices such that no two adjacent vertices share the same color. For a complete graph Kn, every vertex is connected to every other vertex, which makes it a special and straightforward case for graph coloring. Problem Statement What is the chromatic number of the complete graph Kn? Solution In a complete graph Kn, each vertex is adjacent to all remaining (n − 1) vertices. Since every pair of vertices is connected by an edge, no two vertices can share the same color. Hence, ...
Read MoreFinding the line covering number of a graph
The line covering number (also called the edge cover number) of a graph is the minimum number of edges required to cover all the vertices of the graph. An edge cover is a set of edges such that every vertex in the graph is an endpoint of at least one edge in the set. The line covering number is denoted by α1. Lower Bound Formula For a graph with n vertices, the line covering number has the following lower bound − α1 ≥ ⌈n / 2⌉ This is because each edge can cover at most 2 vertices. So ...
Read MoreComposition of Functions of Set
Two functions f: A → B and g: B → C can be composed to give a composition g o f. This is a function from A to C defined by − (g o f)(x) = g(f(x)) In composition, the output of the first function becomes the input of the second function. The function on the right (f) is applied first, and then the function on the left (g) is applied to the result. A B C ...
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 ...
Read MoreComplement of Graph
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 produces a complete graph, then graph I and graph II are called complements of each other. Example: Finding the Complement Graph In ...
Read MoreIntroduction to Mathematical Logic
The rules of mathematical logic specify methods of reasoning mathematical statements. Greek philosopher, Aristotle, was the pioneer of logical reasoning. Logical reasoning provides the theoretical base for many areas of mathematics and consequently computer science. It has many practical applications in computer science like design of computing machines, artificial intelligence, definition of data structures for programming languages etc.Major CategoriesMathematical logics can be broadly categorized into three categories.Propositional Logic − Propositional Logic is concerned with statements to which the truth values, "true" and "false", can be assigned. The purpose is to analyse these statements either individually or in a composite manner.Predicate ...
Read MoreData Replication from SAP PO to SQL Server
It is important to note that SAP PO (Process Orchestration) is not a data source but a middleware − it does not store or contain business data itself. To replicate data to SQL Server, you extract data from the actual source system (such as SAP ERP) through SAP PO, and load it into SQL Server using a JDBC adapter. What Is SAP PI/PO? SAP Process Integration (PI), also known as SAP Process Orchestration (PO), enables cross-system communication and integration. It allows you to connect SAP and non-SAP systems based on different technologies like Java and SAP ABAP. It ...
Read MoreHow to call a function with argument list in Python?
The purpose of a function is to perform a specific task using code blocks. Functions save time by eliminating unnecessary copying and pasting of code. If you need to make a change, you only update the function in one place rather than searching through your entire program. This follows the DRY (Don't Repeat Yourself) principle in software development. Defining a Function in Python Python functions are created using the following syntax − def function_name(parameters): function body A function is defined using the def keyword followed by the function name and ...
Read MoreHow to expand tabs in string to multiple spaces in Python?
In Python, handling white spaces between strings is easy. Sometimes, we may want to add space in a string, but we are not sure exactly how much. Python provides different ways to manage this, and one useful method is the expandtabs() method. Using the expandtabs() Method The expandtabs() method in Python is used to replace tab characters (\t) in a string with spaces. It returns a new string where each \t is replaced with the number of spaces needed to reach the next tab stop. You can control how many spaces are used by passing a tabsize value ...
Read More