Properties of Relations
Properties of Relations
“Title of MP”
Submitted By,
Group Number:
Group Members:
1 Introduction
1.2. Objective
2 Requirement Specification
3.1. Input
3.2. Output
4 Flowchart or Algorithm
5 Modules
References
INTRODUCTION :
In programming, a relation is a connection between two or more variables or data elements. A relation can
have different properties that describe its behavior and characteristics. These properties are important to
understand when working with relations in programs.
Here are some of the properties of relations that you may want to consider for your mini project in C:
Reflexivity: A relation is reflexive if every element is related to itself. For example, the relation "is equal
to" is reflexive because any element is always equal to itself.
Symmetry: A relation is symmetric if whenever one element is related to another, the second element is
also related to the first. For example, the relation "is the sibling of" is symmetric because if A is the sibling of
B, then B is also the sibling of A.
Transitivity: A relation is transitive if whenever one element is related to another and the second element
is related to a third, then the first element is also related to the third. For example, the relation "is older than"
is transitive because if A is older than B and B is older than C, then A is also older than C.
Antisymmetry: A relation is antisymmetric if whenever one element reis related to another, the second
element is not related to the first. For example, the relation "is less than" is antisymmetric because if A is less
than B, then B is not less than A.
Irreflexivity: A relation is irreflexive if no element is related to itself. For example, the relation "is not
equal to" is irreflexive because no element is equal to itself.
Asymmetry: A relation is asymmetric if whenever one element is related to another, the second element is
not related to the first, and the relation is also irreflexive. For example, the relation "is a parent of" is
asymmetric because if A is a parent of B, then B is not a parent of A, and no element is a parent of itself.
1.1 Problem Statement :
1.2 Objective :
The main aim of this project is to implement a variety of relations algorithms as
generic algorithms, including relations like Relfexivity , Symmetry , Antisymmetry ,
Irreflexivity , Asymmetry, re-using code as much as possible from the course library,
different relations has different properties. The user has to give the data and get the
output with the properties which is satisfies by the given data and display it in the
form of matrix.
REQUIREMENT SPECIFICATION :
3.1 Input :
User has to give the data. The elements to be sorted are taken into an array. The user
has to input the size of array. The array of entered size is declared. The elements are entered
by user.
3.2 Output :
On the output screen the sorted elements are displayed. The elements are arranged in
matrix form with the name of property which is it satisfies.
FLOWCHART OR ALGORITHM :
MODULES :
There are different modules and areas of mathematics that deal with properties of
relations, such as:
Set Theory: Relations are sets of ordered pairs, so properties of relations can be studied
within the context of set theory. For example, reflexive, symmetric, and transitive relations
can be defined using set operations.
Category Theory: Relations can be seen as morphisms between objects in a category, and
properties of relations can be studied within the context of category theory.
Logic: Properties of relations can be expressed and studied using first-order logic, where
predicates and quantifiers are used to describe the properties of the relation.