in reply to Re^18: Finding All Paths From a Graph From a Given Source and End Node
in thread Finding All Paths From a Graph From a Given Source and End Node
That dataset is an excellent test sample. Thankyou.
BTW. CSV (Comma Seperated Values) data normally actually has commas separating the values :). Using white space to separate values that themselves contain whitespace gave me pause for thought. (I wonder how the thou-shalt-not-parse-csv-yourself brigade would handle that?)
For my purposes, I just ignored the middle column. I tacked the data on the end of my test script and it found and output all possible paths from all possible starting points in 0.04 seconds. Including remembering which starting point generated the longest path, which turned out to be "2,4,4-Trimethyl-1-pentanol":
c:\test>904729-3 >nul Took 0.04846 2,4,4-Trimethyl-1-pentanol ->2,4,4-Trimethylpentanal ->2,4,4-Trimethylpentanoate ->2,4,4-Trimethylpentanoyl-CoA ->2,4,4-Trimethylpent-2-enoyl-CoA ->2,4,4-Trimethyl-3-hydroxypentanoyl-CoA ->2,4,4-Trimethyl-3-oxopentanoyl-CoA ->2,4,4-Trimethyl-3-oxopentanoate ->2,2-Dimethyl-3-pentanone ->1-Hydroxy-4,4-dimethylpentan-3-one ->4,4-Dimethyl-3-oxopentanal 2,4,4-Trimethyl-1-pentanol ->2,4,4-Trimethylpentanal ->2,4,4-Trimethylpentanoate ->2,4,4-Trimethylpentanoyl-CoA ->2,4,4-Trimethylpent-2-enoyl-CoA ->2,4,4-Trimethyl-3-hydroxypentanoyl-CoA ->2,4,4-Trimethyl-3-oxopentanoyl-CoA ->Pivalyl-CoA 2,4,4-Trimethyl-1-pentanol ->2,4,4-Trimethylpentanal ->2,4,4-Trimethylpentanoate ->2,4,4-Trimethylpentanoyl-CoA ->2,4,4-Trimethylpent-2-enoyl-CoA ->2,4,4-Trimethyl-3-hydroxypentanoyl-CoA ->2,4,4-Trimethyl-3-oxopentanoyl-CoA ->Propanoyl-CoA
The script excluding most of the data:
|
|---|