How many reflexive relations are possible in set A={a,b,c,d}
Answers
There are 64 reflexive relations on A * A : Explanation : Reflexive Relation : A Relation R on A a set A is said to be Reflexive if xRx for every element of x.
Input : n = 2
Output : 4
The given set A = {1, 2}. The following
are reflexive relations on A * A :
{{1, 1), (2, 2)}
{(1, 1), (2, 2), (1, 2)}
{(1, 1), (2, 2), (1, 2), (2, 1)}
{(1, 1), (2, 2), (2, 1)}
Input : n = 3
Output : 64
The given set is {1, 2, 3}. There are
64 reflexive relations on A * A :
C++ Program to count reflexive relations
// on a set of first n natural numbers.
#include <iostream>
using namespace std;
int countReflexive(int n)
{
// Return 2^(n*n - n)
return (1 << (n*n - n));
}
int main()
{
int n = 3;
cout << countReflexive(n);
return 0;
}
Step-by-step explanation:
In relation and function , reflexive relation in one in which every element maps to itself
Now ,
A = { (a, a) , ( b, b) , ( c, c) , ( d, d) }
Hope it helps you....