Level 2 sounds like it could be represented by 26 copies of the original graph, with a subset of the nodes (those containing the letter you chose to use first) removed from each copy. You essentially must choose which of the 26 variant subgraphs you want to play in, and then throw the others away.

Level 3 could be four copies of the graph, but for each link, you alter it to point to the corresponding node in Copy #N if that link changes letter #N. Then clean up by deleting any links that go from Copy N to Copy M where N==M.
The graph will have to become directed, since you can go from moon(1) to mood(4) or mood(1) to moon(4) but not mood(4) to moon(1)


In reply to Re: Not Quite Longest Path Problem by SuicideJunkie
in thread Not Quite Longest Path Problem 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.