
<HTML><HEAD><TITLE>CosmicOS message</TITLE></HEAD>
<BODY BGCOLOR='#ffffff'>
<HR>
<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT><TT><A NAME='28'><FONT COLOR=red>#&nbsp;MATH introduce graph structures</FONT></A></TT><BR>
<TT>[<A HREF='sound.cgi?s=211013211101103023211010322111011132111100033221101003221110111332211110003332233'>hear</A>] </TT><TT>(define make-graph /</TT><BR>
<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT><TT>&nbsp;&nbsp;lambda <font style='background-color: #cdffff'>(nodes links)</font> <font style='background-color: #ffcdff'>(pair </font><font style='background-color: #ff9bff'>(nodes)</font><font style='background-color: #ffcdff'> </font><font style='background-color: #ffcdcd'>(links)</font><font style='background-color: #ffcdff'>)</font>);</TT><BR>
<BR>
<TT>[<A HREF='sound.cgi?s=2110132111100130232111011032210000321321032113210033221000032210000321321033221000032103211332210000321321003332233'>hear</A>] </TT><TT>(define test-graph /</TT><BR>
<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT><TT>&nbsp;&nbsp;make-graph</TT><BR>
<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT><TT>&nbsp;&nbsp;&nbsp;<font style='background-color: #cdffff'>(vector 1 2 3 4)</font></TT><BR>
<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT><TT>&nbsp;&nbsp;&nbsp;<font style='background-color: #ffcdff'>(vector </font><font style='background-color: #ff9bff'>(vector 1 2)</font><font style='background-color: #ffcdff'> </font><font style='background-color: #ffcdcd'>(vector 2 3)</font><font style='background-color: #ffcdff'> </font><font style='background-color: #cdcdff'>(vector 1 4)</font><font style='background-color: #ffcdff'>)</font>);</TT><BR>
<BR>
<TT>[<A HREF='sound.cgi?s=211013211110103023211010322111101132111110032111110133221010030232110032100011030232111132210132211000132210001103320332213221000110332211110130232111110322111101133213333221000000322111110322111110322111101133213322100011033322100003221111100332211111013333221011003332233'>hear</A>] </TT><TT>(define graph-linked /</TT><BR>
<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT><TT>&nbsp;&nbsp;lambda <font style='background-color: #cdffff'>(g n1 n2)</font></TT><BR>
<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT><TT>&nbsp;&nbsp;&nbsp;<font style='background-color: #ffcdff'>(exists /</font></TT><BR>
<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT><TT>&nbsp;&nbsp;&nbsp;&nbsp;<font style='background-color: #ffcdff'>? idx /</font></TT><BR>
<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT><TT>&nbsp;&nbsp;&nbsp;&nbsp;<font style='background-color: #ffcdff'>if </font><font style='background-color: #ff9bff'>(and </font><font style='background-color: #ff69ff'>(&gt;= </font><font style='background-color: #ff37ff'>(idx)</font><font style='background-color: #ff69ff'> 0)</font></TT><BR>
<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT><TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font style='background-color: #ff9bcd'>(&lt; </font><font style='background-color: #ff9b9b'>(idx)</font><font style='background-color: #ff9bcd'> </font><font style='background-color: #cd9bcd'>(list-length / list-ref </font><font style='background-color: #9b9bcd'>(g)</font><font style='background-color: #cd9bcd'> 1)</font><font style='background-color: #ff9bcd'>)</font><font style='background-color: #ff9bff'>)</font></TT><BR>
<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT><TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font style='background-color: #ffcdcd'>(list= </font><font style='background-color: #ffcd9b'>(list-ref </font><font style='background-color: #ffcd69'>(list-ref </font><font style='background-color: #ffcd37'>(g)</font><font style='background-color: #ffcd69'> 1)</font><font style='background-color: #ffcd9b'> </font><font style='background-color: #cdcd9b'>(idx)</font><font style='background-color: #ffcd9b'>)</font></TT><BR>
<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT><TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font style='background-color: #cdcdcd'>(vector </font><font style='background-color: #9bcdcd'>(n1)</font><font style='background-color: #cdcdcd'> </font><font style='background-color: #cd9bcd'>(n2)</font><font style='background-color: #cdcdcd'>)</font><font style='background-color: #ffcdcd'>)</font></TT><BR>
<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT><TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font style='background-color: #cdcdff'>(false)</font><font style='background-color: #ffcdff'>)</font>);</TT><BR>
<BR>
<TT>[<A HREF='sound.cgi?s=21032211110103221111001332132103322101011332233'>hear</A>] </TT><TT>(= <font style='background-color: #cdffff'>(graph-linked </font><font style='background-color: #9bffff'>(test-graph)</font><font style='background-color: #cdffff'> 1 2)</font> <font style='background-color: #ffcdff'>(true)</font>);</TT><BR>
<BR>
<TT>[<A HREF='sound.cgi?s=21032211110103221111001332132113322101100332233'>hear</A>] </TT><TT>(= <font style='background-color: #cdffff'>(graph-linked </font><font style='background-color: #9bffff'>(test-graph)</font><font style='background-color: #cdffff'> 1 3)</font> <font style='background-color: #ffcdff'>(false)</font>);</TT><BR>
<BR>
<TT>[<A HREF='sound.cgi?s=2103221111010322111100133210321003322101100332233'>hear</A>] </TT><TT>(= <font style='background-color: #cdffff'>(graph-linked </font><font style='background-color: #9bffff'>(test-graph)</font><font style='background-color: #cdffff'> 2 4)</font> <font style='background-color: #ffcdff'>(false)</font>);</TT><BR>
<BR>
<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT><TT>#&nbsp;'if' is used a lot in the next definition in place of and / or</TT><BR>
<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT><TT>#&nbsp;this is because I haven't established lazy evaluation forms for and / or</TT><BR>
<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT><TT>#&nbsp;so this very inefficient algorithm completely bogs down when combined</TT><BR>
<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT><TT>#&nbsp;... during testing with a dumb implementation for 'exists'.</TT><BR>
<TT>[<A HREF='sound.cgi?s=21101321111110302321101032211110113211111003211111013322111132210322111110033221111101333221010113322111132211110103221111011332211111003322111110133322101011332210100322110032111111130232111132211110103221111011332211111003322111111133322111111032211110113322111111133221111101333221011003333332233'>hear</A>] </TT><TT>(define graph-linked* /</TT><BR>
<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT><TT>&nbsp;&nbsp;lambda <font style='background-color: #cdffff'>(g n1 n2)</font></TT><BR>
<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT><TT>&nbsp;&nbsp;&nbsp;<font style='background-color: #ffcdff'>(if </font><font style='background-color: #ff9bff'>(= </font><font style='background-color: #ff69ff'>(n1)</font><font style='background-color: #ff9bff'> </font><font style='background-color: #ff9bcd'>(n2)</font><font style='background-color: #ff9bff'>)</font></TT><BR>
<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT><TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font style='background-color: #ffcdcd'>(true)</font></TT><BR>
<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT><TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font style='background-color: #cdcdff'>(if </font><font style='background-color: #9bcdff'>(graph-linked </font><font style='background-color: #69cdff'>(g)</font><font style='background-color: #9bcdff'> </font><font style='background-color: #9b9bff'>(n1)</font><font style='background-color: #9bcdff'> </font><font style='background-color: #9bcdcd'>(n2)</font><font style='background-color: #9bcdff'>)</font></TT><BR>
<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT><TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font style='background-color: #cd9bff'>(true)</font></TT><BR>
<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT><TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font style='background-color: #cdcdcd'>(exists</font></TT><BR>
<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT><TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font style='background-color: #cdcd9b'>(? n3 /</font></TT><BR>
<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT><TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font style='background-color: #cdcd9b'>if </font><font style='background-color: #cdcd69'>(graph-linked </font><font style='background-color: #cdcd37'>(g)</font><font style='background-color: #cdcd69'> </font><font style='background-color: #9bcd69'>(n1)</font><font style='background-color: #cdcd69'> </font><font style='background-color: #cd9b69'>(n3)</font><font style='background-color: #cdcd69'>)</font></TT><BR>
<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT><TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font style='background-color: #9bcd9b'>(graph-linked* </font><font style='background-color: #69cd9b'>(g)</font><font style='background-color: #9bcd9b'> </font><font style='background-color: #9b9b9b'>(n3)</font><font style='background-color: #9bcd9b'> </font><font style='background-color: #9bcd69'>(n2)</font><font style='background-color: #9bcd9b'>)</font></TT><BR>
<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT><TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font style='background-color: #cd9b9b'>(false)</font><font style='background-color: #cdcd9b'>)</font><font style='background-color: #cdcdcd'>)</font><font style='background-color: #cdcdff'>)</font><font style='background-color: #ffcdff'>)</font>);</TT><BR>
<BR>
<TT>[<A HREF='sound.cgi?s=21032211111103221111001332132103322101011332233'>hear</A>] </TT><TT>(= <font style='background-color: #cdffff'>(graph-linked* </font><font style='background-color: #9bffff'>(test-graph)</font><font style='background-color: #cdffff'> 1 2)</font> <font style='background-color: #ffcdff'>(true)</font>);</TT><BR>
<BR>
<TT>[<A HREF='sound.cgi?s=21032211111103221111001332132113322101011332233'>hear</A>] </TT><TT>(= <font style='background-color: #cdffff'>(graph-linked* </font><font style='background-color: #9bffff'>(test-graph)</font><font style='background-color: #cdffff'> 1 3)</font> <font style='background-color: #ffcdff'>(true)</font>);</TT><BR>
<BR>
<TT>[<A HREF='sound.cgi?s=2103221111110322111100133210321003322101100332233'>hear</A>] </TT><TT>(= <font style='background-color: #cdffff'>(graph-linked* </font><font style='background-color: #9bffff'>(test-graph)</font><font style='background-color: #cdffff'> 2 4)</font> <font style='background-color: #ffcdff'>(false)</font>);</TT><BR>
<BR>

</BODY>
</HTML>
