Question: In C++ please Create a function to initialize the matrix (sample matrix data is listed below) b. Allow the user to pick which of the

In C++ pleaseIn C++ please Create a function to initialize the matrix (sample matrixdata is listed below) b. Allow the user to pick which ofthe 3 dimensions they prefer and use that matrix to see if

Create a function to initialize the matrix (sample matrix data is listed below) b. Allow the user to pick which of the 3 dimensions they prefer and use that matrix to see if it is reflexive, symmetric, transitive, and to find the transitive closure. To do this, create the functions: - Create a function to print the matrix given - Create a function to add two matrices together (you will be using the same matrix 2 times) - Create a function to square the matrix given - Create a function to check if the matrix is reflexive (if all values on the diagonal are 1) - Create a function to check if the matrix is symmetric (values are equal across the diagonal) - Create a function to check if the matrix is transitive (not transitive if there is a non-zero ir the squared matrix that is zero in the original matrix) - Create a function to find the transitive closure of the matrix (continue to multiply the matrix by itself up to the number of dimensions and keep a running total of the sum of all of these matrices) Enter the type of input to use: 0 - File 1 - Use set values: Enter your choice: 1 Which vector dimension (24) do you prefer? 4 The current matrix is: The matrix is not reflexive The matrix is symetric The matrix is not transtive The result of the matrix to the power of 2 is: 3211231211101202 The result of the matrix to the power of 3 is: 6633672532113514 The result of the matrix to the power of 4 is: 1515691518612663391239

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!