A little demonstration why trying to calculate _all_ path is a dangerous thing.

let Nx be the graph of a x dimensional cube where the edges are bidirectionally connections of 2^x nodes representing the corners.

101--111 /: /| 001--011| |100·|110 N3 |· |/ 000--010

When calculating paths between extremal corners you will see:

N2 (the square) has 4 corners and 2 such paths

N3 (the normal cube) has 8 corners and 18 paths (e.g. 000->001->011->010->110->100->101->111 )

N4 has 16 corners and already 6432 paths

N5 has 32 corners and the program to calculate all paths is still running and will likely never finish!

I really doubt that such a general question is a clever approach. (for comparison the number of _shortest_ paths is "only" x! i.e. 5!=120 for N5)

IMHO not only a clear case of an XY question but already XYZ, any underlying question is either far more trivially answered¹ or is simply not solvable.

This approach to precalculate all path will potentially damage the hardware.

Cheers Rolf

¹) e.g. can a node K be part of a path from B to E?


In reply to Re: Short Circuiting DFS Graph Traversal by LanX
in thread Short Circuiting DFS Graph Traversal by Limbic~Region

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.