Question: I will upvote as soon as possible! Instructions: This will be coded in Python. Write a function whose input is a relation. Relations will be
I will upvote as soon as possible!
Instructions: This will be coded in Python. Write a function whose input is a relation. Relations will be represented as dictionaries in the following way. Suppose you have a relation R from the set A to the set B. The keys of the dictionary are the elements of A. For each key a A, the value of a will be a list of elements b B such that aRb (which also can be written (a, b) R). For instance, if R = {1 : [2, 3], 2 : [5, 10], 3 : [47]}, then the ordered pairs of R are {(1, 2),(1, 3),(2, 5),(2, 10),(3, 47)}. We can also write 1R2, 1R3, 2R5, 2R10, 3R47.

Your first function is called "reflexive". Its input is a relation (dictionary) R. Its output is a Boolean value. If R is a reflexive relation, then the output is "True". The output is "False" otherwise
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
