CmpSc 360, Spring 2013: Relations on a Set

For this assignment, you will write a C++ program to input relations on a set, S, and then determine whether each relation is reflexive, symmetric, antisymmetric, transitive, a partial order, or an equivalence relation.

Your program must read from a file via cin using input redirection. The structure of the data file will be as follows.

EXAMPLE INPUT
2
4 5
1 2
0 2
2 1
0 0
2 0
3 3
1 1
2 2
0 0

EXAMPLE OUTPUT
#1:
REFLEXIVE - no
SYMMETRIC - yes
ANTISYMMETRIC - no
TRANSITIVE - no
PARTIAL ORDER - no
EQUIVALENCE RELATION - no

#2:
REFLEXIVE - yes
SYMMETRIC - yes
ANTISYMMETRIC - yes
TRANSITIVE - yes
PARTIAL ORDER - yes
EQUIVALENCE RELATION - yes

TEST DATA: relationsData.txt

DUE: Wed, April 03, at the beginning of class. You must include a signed and dated integrity statement at the beginning of your code. Append to your source code a run of your program that uses relationsData.txt as input. Also, place your C++ code (NOT your Visual Studio project) in your Drop Folder at P:\Public\CmpSc 360 Spring 2013\DROP FOLDERS. (P: is your instructor's (clb8) shored public drive.)