For your reference, here’s my own solution to assignment #1 (click on the figure to enlarge):
stephen
CPSC 350
stephendavies.org