No subject
Thu Sep 1 22:29:11 EDT 2011
"All rungs from 0..n-1 are represented at least once"<br>
<br>
This is fuzzy.<br>
<br>
To clear it up, let'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> There are n leaf nodes.<br>
<br>
Each question appears exactly once.<br>
=C2=A0 =C2=A0 =C2=A0=3D> There are n-1 question nodes.<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(=3D> n>0)<br>
<br>
I would also be careful about stating solution=3D>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: < 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>
----- "Matthew Strax-Haber" <<a href=3D"mailto:straxhaber at gmai=
l.com">straxhaber at gmail.com</a>> wrote:<br>
<br>
> Hey Everyone,<br>
><br>
> So that the students in the undergrad class can start adapting, I'=
m<br>
> attaching a modified HSRInstance.valid with counter-examples,<br>
> documentation, and tests.<br>
><br>
> Please keep in mind that these have not been approved by the Professor=
<br>
> yet, so they are subject to change or refutation.<br>
><br>
> There are two versions of the new HSRInstance, with tests:<br>
> - Unoptimized: easier to read and debug<br>
> - Optimized: runs faster, same functionality<br>
><br>
> I have also included a rough specification for what the valid function=
<br>
> checks, and a simple counter-example for the old valid function.<br>
><br>
> Again, this is all subject to change. I've written some JUnit test=
s to<br>
> test it (included), but please do send me a private e-mail if you find=
<br>
> any bugs.<br>
><br>
> Best of luck in the next tournament<br>
><br>
><br>
> Best regards,<br>
> --<br>
> ~ Matthew Strax-Haber<br>
> Northeastern University<br>
><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