6.7
Assignment 18
Programming Language ISL+
Due Date Mon 3/27 at 11:59pm
Possible Points 18
Purpose To begin designing functions that process graphs.
Graded Exercises
(define-struct graph [nodes neighbors]) ; A Graph is a (make-graph [List-of Symbol] [Symbol -> [List-of Symbol]]) ; and represents the nodes and edges in a graph
Exercise 1 Design the function neighbors? that determines if two symbols are both neighbors of each other in a graph. You may assume the symbols are in the graph.
Exercise 2 Design the function mutual-neighbors that takes two symbols and a graph and returns a list of neighbors they both have. You may assume the symbols are in the graph.