(* gsearch *) (* Assume you are given a set of edges *) val E = [("a","b"),("a","c"),("a","d"), ("b","e"), ("c","f"), ("d","e"), ("e","f"), ("e","g")]; (* Therefore E represents the set of edges in a digraph. (1) Write a predicate fun pathp s g E = ... that takes as arguments a starting node s, and a goal node g, and a set of edges E and delivers a result true if there is a path from s to g in E (deliver false otherwise) (2) Write a function fun path s g E = ... that delivers the list of edges, in order, that if traversed take us from s to g in E (3) assume we then update E, such that *) val E2 = E @ [("e","d")]; (* Do your functions till operate when we use E2 in place of E? (4) Enhance E such that it is a list of triples of the form (v1,v2,c12) where v1 is a vertex, v2 is a vertex, and c12 is the cost of going from v1 to v2. Enhance function path such that it delivers the minimum cost path from s to g in E. *) (* Hint: do not assume that the lecturer knows how to do any of the above *)