C++

1. Write a C++ function for each of the following. (a) Given the matrix representing a relation on a finite set, determine whether the relation is reflexive and/or irreflexive. (b) Given the matrix representing a relation on a finite set, determine whether the relation is symmetric and/or antisymmetric. (c) Given the matrix representing a relation on a finite set, determine whether the relation is transitive. 2. Use the above functions to write a C++ program for solving each of the following computational problems. (a) Display all the different reflexive and symmetric relations on a set of five elements. (b) Display all the equivalence relations on a set of seven elements