Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'HELP!!How to do tree search in Mathematica' topicStudent Support Forum > General > Archives > "HELP!!How to do tree search in Mathematica"

Next Comment >Help | Reply To Topic
Author Comment/Response
Jasica
05/26/09 4:31pm

Dear all,
I have a problem which I want to solve by implementing something like Depth First Search algorithm. Please help me.
The problem is like as following:
Some lists like this :
x1={{a},{b},{c}};x2={{d},{e},{f},{g}}; x3={{h},{i},..}..;
if x1[[1]]==x2[[1]], then M=Union[x1[[1]],x2[[1]], and try to Union[M,x3[[1]]. If this fail, then try to check next element in x3, and so on. If all elements in x3 could not match M, then go one step back and try to check x1[[1]] with x2[[2]], and so on. As long as the match go through a tree path and reach the bottom then return the solution, otherwise, return false.
Thank you.


URL: ,

Subject (listing for 'HELP!!How to do tree search in Mathematica')
Author Date Posted
HELP!!How to do tree search in Mathematica Jasica 05/26/09 4:31pm
Re: HELP!!How to do tree search in Mathematica yehuda ben-s... 05/31/09 01:41am
Re: HELP!!How to do tree search in Mathematica jyoti 06/07/11 06:35am
Next Comment >Help | Reply To Topic