Hi, I am having my mid-semester exams this week. I have a programming lab exam whose problem statement needed to be solved and coded in 3 hours.
I am giving the question here.
I have finished it in 21/2 hrs in C language (We can chose any language of our choice because it's an programming lab but not some specific XYZ programming lab)
As i thought the problem is good, i wanted to post it here.
Sorry if i took much time to solve it, I am just an 1 yr old newbie to programming.
Let xRx be a binary relation on a finite set A.
Write a program that takes as input a set A and binary relation from the user and
represents it in an appropriate internal data structure and supports the
following:
(a) Write a function to determine if the binary relation is a partial order
i.e., reflexive, anti-symmetric and transitive.
(b) Write a function to determine if the binary relation is a Lattice (i.e., its
a partial order and every two elements have a lub and a glb)