No subject


Thu Sep 1 22:29:11 EDT 2011


&quot;All rungs from 0..n-1 are represented at least once&quot;<br>
<br>
This is fuzzy.<br>
<br>
To clear it up, let&#39;s make a discrete shift from HSR terminology<br>
to tree terminology.<br>
<br>
Valid hsr solutions are bounded by [0,n-1] for leaves and [1,n-1 ]<br>
for questions.<br>
<br>
Each leaf appears exactly once.<br>
 =C2=A0 =C2=A0 =C2=A0=3D&gt; There are n leaf nodes.<br>
<br>
Each question appears exactly once.<br>
 =C2=A0 =C2=A0 =C2=A0=3D&gt; There are n-1 question nodes.<br>
 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(=3D&gt; n&gt;0)<br>
<br>
I would also be careful about stating solution=3D&gt;BST without<br>
mentioning the specifics of ordering.<br>
<br>
----<br>
<br>
How about this?<br>
<br>
Requirements for a valid solution:<br>
- Strictly binary tree (2-tree)<br>
- Tree is ordered: &lt; to the left, =E2=89=A5 to the right<br>
- Exactly n leaf nodes in [0,n-1] with no repeats<br>
- Exactly n-1 question nodes in [1,n-1] with no repeats<br>
- No more than k subsequent left branches<br>
<div class=3D"im HOEnZb"><br>
<br>
<br>
<br>
<br>
----- &quot;Matthew Strax-Haber&quot; &lt;<a href=3D"mailto:straxhaber at gmai=
l.com">straxhaber at gmail.com</a>&gt; wrote:<br>
<br>
&gt; Hey Everyone,<br>
&gt;<br>
&gt; So that the students in the undergrad class can start adapting, I&#39;=
m<br>
&gt; attaching a modified HSRInstance.valid with counter-examples,<br>
&gt; documentation, and tests.<br>
&gt;<br>
&gt; Please keep in mind that these have not been approved by the Professor=
<br>
&gt; yet, so they are subject to change or refutation.<br>
&gt;<br>
&gt; There are two versions of the new HSRInstance, with tests:<br>
&gt; - Unoptimized: easier to read and debug<br>
&gt; - Optimized: runs faster, same functionality<br>
&gt;<br>
&gt; I have also included a rough specification for what the valid function=
<br>
&gt; checks, and a simple counter-example for the old valid function.<br>
&gt;<br>
&gt; Again, this is all subject to change. I&#39;ve written some JUnit test=
s to<br>
&gt; test it (included), but please do send me a private e-mail if you find=
<br>
&gt; any bugs.<br>
&gt;<br>
&gt; Best of luck in the next tournament<br>
&gt;<br>
&gt;<br>
&gt; Best regards,<br>
&gt; --<br>
&gt; ~ Matthew Strax-Haber<br>
&gt; Northeastern University<br>
&gt;<br>
<br>
</div><div class=3D"HOEnZb"><div class=3D"h5">_____________________________=
__________________<br>
Cs4800 mailing list<br>
<a href=3D"mailto:Cs4800 at lists.ccs.neu.edu">Cs4800 at lists.ccs.neu.edu</a><br=
>
<a href=3D"https://lists.ccs.neu.edu/bin/listinfo/cs4800" target=3D"_blank"=
>https://lists.ccs.neu.edu/bin/listinfo/cs4800</a><br>
</div></div></blockquote></div><br>

--f46d04478855eddcd104b22d7518--



More information about the Cs4800 mailing list