
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 454 Articles for Computer Engineering

2K+ Views
A relation can be represented using a directed graph.The number of vertices in the graph is equal to the number of elements in the set from which the relation has been defined. For each ordered pair (x, y) in the relation R, there will be a directed edge from the vertex ‘x’ to vertex ‘y’. If there is an ordered pair (x, x), there will be a self- loop on vertex ‘x’.Suppose, there is a relation R = { (1, 1), (1,2), (3, 2) } on set S = { 1, 2, 3 }, it can be represented by the following graph −

1K+ Views
There are mainly two ways to represent a graph −Adjacency MatrixAdjacency ListAdjacency MatrixAn Adjacency Matrix A[V][V] is a 2D array of size V × V where $V$ is the number of vertices in a undirected graph. If there is an edge between Vx to Vy then the value of A[Vx][Vy]=1 and A[Vy][Vx]=1, otherwise the value will be zero. And for a directed graph, if there is an edge between Vx to Vy, then the value of A[Vx][Vy]=1, otherwise the value will be zero.Adjacency Matrix of an Undirected GraphLet us consider the following undirected graph and construct the adjacency matrix −The ... Read More

792 Views
Relations may exist between objects of the same set or between objects of two or more sets.Definition and PropertiesA binary relation R from set x to y (written as xRy or R(x, y)) is a subset of the Cartesian product x × y. If the ordered pair of G is reversed, the relation also changes.Generally an n-ary relation R between sets A1, ... ,\ and\ An is a subset of the n-ary product A1 × ... × An. The minimum cardinality of a relation R is Zero and the maximum is n2 in this case.A binary relation R on a ... Read More

17K+ Views
Predicate Calculus deals with predicates, which are propositions containing variables.PredicateA predicate is an expression of one or more variables defined on some specific domain. A predicate with variables can be made a proposition by either assigning a value to the variable or by quantifying the variable.Consider the following statement.Ram is a student.Now consider the above statement in terms of Predicate calculus.Here "is a student" is a predicate and Ram is subject.Let's denote "Ram" as x and "is a student" as a predicate P then we can write the above statement as P(x).Generally a statement expressed by Predicate must have at ... Read More

739 Views
Power set of a set S is the set of all subsets of S including the empty set. The cardinality of a power set of a set S of cardinality n is 2n. Power set is denoted as P(S).Example −For a set S = { a, b, c, d } let us calculate the subsets −Subsets with 0 elements − { ∅ } (the empty set)Subsets with 1 element − { a }, { b }, { c }, { d }Subsets with 2 elements − { a, b }, { a, c }, { a, d }, { b, ... Read More

5K+ Views
Planar graph − A graph G is called a planar graph if it can be drawn in a plane without any edges crossed. If we draw graph in the plane without edge crossing, it is called embedding the graph in the plane.Non-planar graph − A graph is non-planar if it cannot be drawn in a plane without graph edges crossing.

6K+ Views
A graph 'G' is said to be planar if it can be drawn on a plane or a sphere so that no two edges cross each other at a non-vertex point.ExampleRegionsEvery planar graph divides the plane into connected areas called regions.ExampleDegree of a bounded region r = deg(r) = Number of edges enclosing the regions r.deg(1) = 3 deg(2) = 4 deg(3) = 4 deg(4) = 3 deg(5) = 8Degree of an unbounded region r = deg(r) = Number of edges enclosing the regions r.deg(R1) = 4 deg(R2) = 6In planar graphs, the following properties hold good −1. In a ... Read More

10K+ Views
Pendent VertexBy using degree of a vertex, we have a two special types of vertices. A vertex with degree one is called a pendent vertex.ExampleHere, in this example, vertex 'a' and vertex 'b' have a connected edge 'ab'. So with respect to the vertex 'a', there is only one edge towards vertex 'b' and similarly with respect to the vertex 'b', there is only one edge towards vertex 'a'. Finally, vertex 'a' and vertex 'b' has degree as one which are also called as the pendent vertex.Isolated VertexA vertex with degree zero is called an isolated vertex.ExampleHere, the vertex 'a' ... Read More

10K+ Views
Partition of a set, say S, is a collection of n disjoint subsets, say P1, P1, ... Pn that satisfies the following three conditions −Pi does not contain the empty set. [ Pi ≠ { ∅ } for all 0 < i ≤ n ]The union of the subsets must equal the entire original set. [ P1 ∪ P2 ∪ ... ∪ Pn = S ]The intersection of any two distinct sets is empty. ... Read More

5K+ Views
A spanning tree with assigned weight less than or equal to the weight of every possible spanning tree of a weighted, connected and undirected graph $G$, it is called minimum spanning tree (MST). The weight of a spanning tree is the sum of all the weights assigned to each edge of the spanning tree. Following are two most popular algorithms to find a minimum spanning tree (MST).Kruskal's AlgorithmKruskal's algorithm is a greedy algorithm that finds a minimum spanning tree for a connected weighted graph. It finds a tree of that graph which includes every vertex and the total weight of ... Read More