[Tutor] Depth First Search Listing all possible combinations

Danny Yoo dyoo at hashcollision.org
Mon Nov 25 05:28:23 CET 2013


You have at least one error in your graph.  Specifically, if you are using:

###########################################################
graph = {'q9': ['q10', 'q33'],  'q10': ['q11',  'q 28',  'q29',  'q30'],
'q11':  ['q15'] , 'q16': ['q17', 'q19', 'q24'],' q18': ['q20'],  'q23':
['q34'], 'q24': ['q25', 'q26'], 'q27': ['q34'], 'q28': ['q30', 'q29'],
'q30': ['q34', 'q31', 'q12'], 'q32': ['q34'], 'q33': ['q15' , 'q30'],
'q35': ['q36',  'q37'], 'q37': ['q38', 'q39'], 'q39': ['q41', 'q40',
'q42'],'q42': ['end']}
###########################################################

to represent the graph structure you've presented, then 'q15' is missing.
 Other nodes in your network may also be missing, so check your data again.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20131124/2ab34ade/attachment.html>


More information about the Tutor mailing list