Implement the following Racket functions: Symmetric-Closure Input: a list of pairs, L. Interpreting L as a binary relation, Symmetric-Closure should return the symmetric closure of L. Examples: (Symmetric-Closure '((a a) (a b) (b a) (b c) (c b))) ---> '((a a) (a b) (b a) (b c) (c b)) (Symmetric-Closure '((a a) (a b) (a c))) ---> '((a a) (a b) (a c) (b a) (c a)) (Symmetric-Closure '((a a) (b b))) ---> '((a a) (b b)) (Symmetric-Closure '()) ---> '()
Concepts in Designing Database
A database design is the process of data organization based on a database model. The process deals with identifying what data should be stored in a database and how data elements relate to each other.
Entity Relationship Diagram
Complex real-world applications call for large volumes of data. Therefore, it is necessary to build a great database to store data safely and coherently. The ER data model aids in the process of database design. It helps outline the structure of an organization’s database by understanding the real-world interactions of objects related to the data. For example, if a school is tasked to store student information, then analyzing the correlation between the students, subjects, and teachers would help identify how the data needs to be stored.
Implement the following Racket functions:
Symmetric-Closure
Input: a list of pairs, L. Interpreting L as a binary relation, Symmetric-Closure should return the symmetric closure of L.
Examples:
(Symmetric-Closure '((a a) (a b) (b a) (b c) (c b)))
---> '((a a) (a b) (b a) (b c) (c b))
(Symmetric-Closure '((a a) (a b) (a c)))
---> '((a a) (a b) (a c) (b a) (c a))
(Symmetric-Closure '((a a) (b b)))
---> '((a a) (b b))
(Symmetric-Closure '())
---> '()
You must use recursion, and not iteration. You may not use side-effects (e.g. set!).
Trending now
This is a popular solution!
Step by step
Solved in 2 steps