Implement a Scheme function that takes as input a relation given as an adjacency list representation (the Tail of each s
Posted: Sat Nov 27, 2021 2:23 pm
Implement a Scheme function that takes as input a relation given
as an adjacency list representation (the Tail of each sublist is
the list of neighbors for the Head element) and returns True if the
relation is reflexive and False otherwise. Use member as an
auxiliary function and map. Example: (reflexive '((a b c) (b b) (c
a c))) evaluates to #f (reflexive '((a a b c) (b b) (c a c)))
evaluates to #t
as an adjacency list representation (the Tail of each sublist is
the list of neighbors for the Head element) and returns True if the
relation is reflexive and False otherwise. Use member as an
auxiliary function and map. Example: (reflexive '((a b c) (b b) (c
a c))) evaluates to #f (reflexive '((a a b c) (b b) (c a c)))
evaluates to #t