REQUEST FOR HELP

Discussion of Common Lisp
Post Reply
murali
Posts: 15
Joined: Fri Jul 01, 2011 10:11 am

REQUEST FOR HELP

Post by murali » Fri Jul 01, 2011 10:19 am

CAN ANY ONE HELP
Write the function partialpaths, of two arguments. The
first argument is a list of lists, representing a graph(adjacency list
representation of a graph). The second argument is a partial path in the
reverse order, for example the path "from a to b to c" is represented by
the list (c b a). The function should return a list of sublists containing
all possible expansions of this partial path by one node.

For example:
(partialpaths '( (a b c) (b c d) (c d a) (d)) '(b a))
should return:
( (c b a) (d b a))

Post Reply