REQUEST FOR HELP

Discussion of Common Lisp

REQUEST FOR HELP

Postby 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))
murali
 
Posts: 15
Joined: Fri Jul 01, 2011 10:11 am

Return to Common Lisp

Who is online

Users browsing this forum: Google [Bot] and 2 guests