<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 9.00.8112.16470"></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=029482418-22032013><FONT color=#0000ff 
size=2 face="Courier New">I'll be happy to help. I assume you are dealing with 
an exercise. Is this a self-study or do you have a teacher? If you have a 
teacher he or she is the best person to help you. Can you show me what you have 
so far? (if you like off list)&nbsp;Without some more input from your part, it 
is difficult to provide clues how to proceed without revealing too much. Which 
language are you using? May be one of the student languages of Racket? 
</FONT></SPAN><SPAN class=029482418-22032013><FONT color=#0000ff size=2 
face="Courier New"></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=029482418-22032013><FONT color=#0000ff 
size=2 face="Courier New">Best wishes, Jos</FONT></SPAN></DIV><BR>
<BLOCKQUOTE 
style="BORDER-LEFT: #0000ff 2px solid; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px">
  <DIV dir=ltr lang=en-us class=OutlookMessageHeader align=left>
  <HR tabIndex=-1>
  <FONT size=2 face=Tahoma><B>From:</B> users-bounces@racket-lang.org 
  [mailto:users-bounces@racket-lang.org] <B>On Behalf Of </B>Andrew 
  Regnery<BR><B>Sent:</B> jueves, 21 de marzo de 2013 20:51<BR><B>To:</B> 
  users@racket-lang.org<BR><B>Subject:</B> [racket] Graphing 
  Help<BR></FONT><BR></DIV>
  <DIV></DIV>
  <P 
  style="BACKGROUND-COLOR: rgb(255,255,255); MARGIN: 1em 0px; FONT-FAMILY: serif; FONT-SIZE: medium">Hi 
  All,</P>
  <P 
  style="BACKGROUND-COLOR: rgb(255,255,255); MARGIN: 1em 0px; FONT-FAMILY: serif; FONT-SIZE: medium">I 
  am currently struggling with this function below. Can anyone help me 
  out?&nbsp;</P>
  <P 
  style="BACKGROUND-COLOR: rgb(255,255,255); MARGIN: 1em 0px; FONT-FAMILY: serif; FONT-SIZE: medium"><BR></P>
  <P 
  style="BACKGROUND-COLOR: rgb(255,255,255); MARGIN: 1em 0px; FONT-FAMILY: serif; FONT-SIZE: medium">Write 
  the following two functions.</P>
  <P 
  style="BACKGROUND-COLOR: rgb(255,255,255); MARGIN: 1em 0px; FONT-FAMILY: serif; FONT-SIZE: medium">
  <TABLE class=RktBlk cellSpacing=0>
    <TBODY>
    <TR>
      <TD 
      style="PADDING-LEFT: 0px; PADDING-RIGHT: 0px; VERTICAL-ALIGN: baseline"><SPAN 
        style="FONT-FAMILY: monospace" class=hspace>&nbsp;&nbsp;</SPAN><SPAN 
        style="FONT-FAMILY: monospace; COLOR: rgb(194,116,31)" 
        class=RktCmt>;</SPAN><SPAN 
        style="FONT-FAMILY: monospace; COLOR: rgb(194,116,31)" 
        class=RktCmt>&nbsp;</SPAN><SPAN 
        style="FONT-FAMILY: monospace; COLOR: rgb(194,116,31)" class=RktCmt>a 
        graph is</SPAN></TD></TR>
    <TR>
      <TD 
      style="PADDING-LEFT: 0px; PADDING-RIGHT: 0px; VERTICAL-ALIGN: baseline"><SPAN 
        class=RktPlain><SPAN style="FONT-FAMILY: monospace" 
        class=hspace>&nbsp;&nbsp;</SPAN></SPAN><SPAN 
        style="FONT-FAMILY: monospace; COLOR: rgb(194,116,31)" 
        class=RktCmt>;</SPAN><SPAN 
        style="FONT-FAMILY: monospace; COLOR: rgb(194,116,31)" 
        class=RktCmt>&nbsp;</SPAN><SPAN 
        style="FONT-FAMILY: monospace; COLOR: rgb(194,116,31)" 
        class=RktCmt>(make-graph (listof symbol) (symbol -&gt; (listof 
        symbol)))</SPAN></TD></TR>
    <TR>
      <TD 
      style="PADDING-LEFT: 0px; PADDING-RIGHT: 0px; VERTICAL-ALIGN: baseline"><SPAN 
        class=RktPlain><SPAN style="FONT-FAMILY: monospace" 
        class=hspace>&nbsp;&nbsp;</SPAN></SPAN><SPAN 
        style="FONT-FAMILY: monospace; COLOR: rgb(132,60,36)" 
        class=RktPn>(</SPAN><SPAN 
        style="FONT-FAMILY: monospace; COLOR: rgb(38,38,128)" class=RktSym><A 
        style="COLOR: black; FONT-WEIGHT: bold; TEXT-DECORATION: none" 
        class=RktStxLink 
        href="http://docs.plt-scheme.org/htdp-langs/intermediate-lambda-unchanged.html#(form._((lib._lang%2Fhtdp-intermediate-lambda..rkt)._define-struct))">define-struct</A></SPAN><SPAN 
        style="FONT-FAMILY: monospace" class=hspace>&nbsp;</SPAN><SPAN 
        style="FONT-FAMILY: monospace; COLOR: rgb(38,38,128)" 
        class=RktSym>graph</SPAN><SPAN style="FONT-FAMILY: monospace" 
        class=hspace>&nbsp;</SPAN><SPAN 
        style="FONT-FAMILY: monospace; COLOR: rgb(132,60,36)" 
        class=RktPn>(</SPAN><SPAN 
        style="FONT-FAMILY: monospace; COLOR: rgb(38,38,128)" 
        class=RktSym>nodes</SPAN><SPAN style="FONT-FAMILY: monospace" 
        class=hspace>&nbsp;</SPAN><SPAN 
        style="FONT-FAMILY: monospace; COLOR: rgb(38,38,128)" 
        class=RktSym>neighbor</SPAN><SPAN 
        style="FONT-FAMILY: monospace; COLOR: rgb(132,60,36)" 
        class=RktPn>)</SPAN><SPAN 
        style="FONT-FAMILY: monospace; COLOR: rgb(132,60,36)" 
        class=RktPn>)</SPAN></TD></TR>
    <TR>
      <TD 
      style="PADDING-LEFT: 0px; PADDING-RIGHT: 0px; VERTICAL-ALIGN: baseline"><SPAN 
        class=RktPlain><SPAN style="FONT-FAMILY: monospace" 
        class=hspace>&nbsp;&nbsp;</SPAN></SPAN></TD></TR>
    <TR>
      <TD 
      style="PADDING-LEFT: 0px; PADDING-RIGHT: 0px; VERTICAL-ALIGN: baseline"><SPAN 
        class=RktPlain><SPAN style="FONT-FAMILY: monospace" 
        class=hspace>&nbsp;&nbsp;</SPAN></SPAN><SPAN 
        style="FONT-FAMILY: monospace; COLOR: rgb(194,116,31)" 
        class=RktCmt>;</SPAN><SPAN 
        style="FONT-FAMILY: monospace; COLOR: rgb(194,116,31)" 
        class=RktCmt>&nbsp;</SPAN><SPAN 
        style="FONT-FAMILY: monospace; COLOR: rgb(194,116,31)" 
        class=RktCmt>has-self-loop? : graph -&gt; boolean</SPAN></TD></TR>
    <TR>
      <TD 
      style="PADDING-LEFT: 0px; PADDING-RIGHT: 0px; VERTICAL-ALIGN: baseline"><SPAN 
        class=RktPlain><SPAN style="FONT-FAMILY: monospace" 
        class=hspace>&nbsp;&nbsp;</SPAN></SPAN><SPAN 
        style="FONT-FAMILY: monospace; COLOR: rgb(194,116,31)" 
        class=RktCmt>;</SPAN><SPAN 
        style="FONT-FAMILY: monospace; COLOR: rgb(194,116,31)" 
        class=RktCmt>&nbsp;</SPAN><SPAN 
        style="FONT-FAMILY: monospace; COLOR: rgb(194,116,31)" 
        class=RktCmt>Determines whether any node in the given graph is its own 
        neighbor</SPAN></TD></TR>
    <TR>
      <TD 
      style="PADDING-LEFT: 0px; PADDING-RIGHT: 0px; VERTICAL-ALIGN: baseline"><SPAN 
        class=RktPlain><SPAN style="FONT-FAMILY: monospace" 
        class=hspace>&nbsp;&nbsp;</SPAN></SPAN></TD></TR>
    <TR>
      <TD 
      style="PADDING-LEFT: 0px; PADDING-RIGHT: 0px; VERTICAL-ALIGN: baseline"><SPAN 
        class=RktPlain><SPAN style="FONT-FAMILY: monospace" 
        class=hspace>&nbsp;&nbsp;</SPAN></SPAN><SPAN 
        style="FONT-FAMILY: monospace; COLOR: rgb(194,116,31)" 
        class=RktCmt>;</SPAN><SPAN 
        style="FONT-FAMILY: monospace; COLOR: rgb(194,116,31)" 
        class=RktCmt>&nbsp;</SPAN><SPAN 
        style="FONT-FAMILY: monospace; COLOR: rgb(194,116,31)" 
        class=RktCmt>has-cycle? : graph -&gt; boolean</SPAN></TD></TR>
    <TR>
      <TD 
      style="PADDING-LEFT: 0px; PADDING-RIGHT: 0px; VERTICAL-ALIGN: baseline"><SPAN 
        class=RktPlain><SPAN style="FONT-FAMILY: monospace" 
        class=hspace>&nbsp;&nbsp;</SPAN></SPAN><SPAN 
        style="FONT-FAMILY: monospace; COLOR: rgb(194,116,31)" 
        class=RktCmt>;</SPAN><SPAN 
        style="FONT-FAMILY: monospace; COLOR: rgb(194,116,31)" 
        class=RktCmt>&nbsp;</SPAN><SPAN 
        style="FONT-FAMILY: monospace; COLOR: rgb(194,116,31)" 
        class=RktCmt>Determines whether the given graph has a 
    cycle.</SPAN></TD></TR></TBODY></TABLE></P><SPAN 
  style="BACKGROUND-COLOR: rgb(255,255,255); FONT-FAMILY: serif; FONT-SIZE: medium">A&nbsp;</SPAN><B 
  style="BACKGROUND-COLOR: rgb(255,255,255); FONT-FAMILY: serif; FONT-SIZE: medium">cycle</B><SPAN 
  style="BACKGROUND-COLOR: rgb(255,255,255); FONT-FAMILY: serif; FONT-SIZE: medium">&nbsp;is 
  a path from a node to itself, and a&nbsp;</SPAN><B 
  style="BACKGROUND-COLOR: rgb(255,255,255); FONT-FAMILY: serif; FONT-SIZE: medium">self-loop</B><SPAN 
  style="BACKGROUND-COLOR: rgb(255,255,255); FONT-FAMILY: serif; FONT-SIZE: medium">&nbsp;is 
  a special case of a cycle that consists of only a single edge.</SPAN> 
</BLOCKQUOTE></BODY></HTML>