Question: In the first part of the assignment, write a program ( in java ) that will determine whether a given ( do , n '
In the first part of the assignment, write a program in java that will determine whether a given dont use chat,gpt
relation is reflexive, symmetric, anti symmetric, transitive, equivalence, and partial order.
The input to the program is a file containing the relation. The input file contains the
binary matrix representing the relation. The s and s of the matrix are separated by
white spaces. The file also contains the size of the matrix at the top. The output of the
program is a file containing the six decisions about the relation. The program asks the
user for file names.
Run your program with the given relations. Submit the results.
ask input and output file names
open input and output files
n read size of matrix
x create array of size nxn
read nxn values into x
decide whether x is reflexive check ii is
decide whether x is symmetric check ij equals ji
decide whether x is antisymmtric check ij and ji are not
decide whether x is transitive find x check x is subset of x
decide whether x is equivalence check x is reflexive, symmetric, transitive
decide whether x is partial order check x is reflexive, antisymmetric, transitive
print yesno for six questions
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
