Question: PLEASE DO IT IN PYTHON AND ACTUALLY WRITE THE CODE. THANK YOUUU Use the methods or functions inherent in the language and / or using
PLEASE DO IT IN PYTHON AND ACTUALLY WRITE THE CODE. THANK YOUUU
Use the methods or functions inherent in the language andor using methods or
functions you create. Like previous assignments, dont hard code a solution you
did on paper as the output.
Create a program for the following:
Write code that determines if a relation R of ordered pairs is reflexive or not
& then if it is not, finds the reflexive closure of R R The output should be:
a R
b R is or is not reflexive
c R if it is not reflexive
d Show the code works for the relation on the
set
e Show the code works for the relation aacc on the set abcd
Write code that determines if a relation R of ordered pairs is symmetric or
not & then if it is not, finds the symmetric closure of R R The output
should be:
a R
b R is or is not symmetric
c R if it is not symmetric
d Show the code works for the relation on the
set
e Show the code works for the relation on the set
Write code that determines if a relation R of ordered pairs is transitive or not
& then if it is not, finds the transitive closure of R R using Warshalls
Algorithm. The output should be:
a R
b R is or is not transitive
c R if it is not transitive
d Show the code works for the relation abddbcac on the
set abcd
e Show the code works for the relation on
the set
Write code that determines if a relation R of ordered pairs is an equivalence
relation or not and the reason why. The output should be:
a R
b R is or is not an equivalence relation
c The reasons why, if it is not an equivalence relation ie it is not
reflexive, andor it is not symmetric, andor it is not transitive
d Show the code works for the relation on the set
e Show the code works for the relation aabbccbccb on
the set abc
Write code that determines if a relation R of ordered pairs is a poset of the
set S or not and the reason why. The output should be:
a S
b R
cSR is or is not a poset
d The reason why, if it is not poset ie it is not reflexive, andor it is
not antisymmetric, andor it is not transitive.
e Show the code works for the relation
on the set
f Show the code works for the relation
on the set
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
