CS 342 Lecture -*- Outline -*- * reachability problem for positive 2-dimensional vector systems advert: slick use of lazy evaluation for modularity distinction between breadth-first and depth first search that is similar to what will be important in Prolog ** the problem add up vectors to get a particular vector: draw picture instead of the following: let B = {b_i} be a set of integer vectors b_i = (k,l) let Span(B) = { path(B) | path(B) = sum_i of a_i*b_i, where a_i is an integer} problem: is p in Span(B)? explain gen-paths, starting with the last line. note that genpaths constructs an infinite tree, which is a list of nested lists note dfs* and dfs are mutually recursive but bsf-queue is just auxilliary function for bfs