- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- 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

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 −

- Related Questions & Answers
- Types of Relations
- Weighted Graph Representation in Data Structure
- Relations of a Set
- Discrete Mathematics Relations
- Find the Number of Reflexive Relations on a Set using C++
- Representation of fractions
- Representation of Graphs
- Practice Set for Recurrence Relations
- Matrix Representation of Graphs
- Explain the unary operations of algebra relations in DBMS?
- Array Representation Of Binary Heap
- Complement of Graph
- Connectivity of Graph
- Types of Graph
- Sorting according to number of 1s in binary representation using JavaScript

Advertisements