No subject


Thu Sep 1 22:29:11 EDT 2011


"All rungs from 0..n-1 are represented at least once"

This is fuzzy.=20

To clear it up, let's make a discrete shift from HSR terminology=20
to tree terminology.

Valid hsr solutions are bounded by [0,n-1] for leaves and [1,n-1=10]=20
for questions.

Each leaf appears exactly once. =20
      =3D> There are n leaf nodes.

Each question appears exactly once.
      =3D> There are n-1 question nodes.
            (=3D> n>0)

I would also be careful about stating solution=3D>BST without=20
mentioning the specifics of ordering. =20

----

How about this?

Requirements for a valid solution:
- Strictly binary tree (2-tree)
- Tree is ordered: < to the left, =E2=89=A5 to the right
- Exactly n leaf nodes in [0,n-1] with no repeats
- Exactly n-1 question nodes in [1,n-1] with no repeats
- No more than k subsequent left branches





----- "Matthew Strax-Haber" <straxhaber at gmail.com> wrote:

> Hey Everyone,
>=20
> So that the students in the undergrad class can start adapting, I'm
> attaching a modified HSRInstance.valid with counter-examples,
> documentation, and tests.
>=20
> Please keep in mind that these have not been approved by the Professor
> yet, so they are subject to change or refutation.
>=20
> There are two versions of the new HSRInstance, with tests:
> - Unoptimized: easier to read and debug
> - Optimized: runs faster, same functionality
>=20
> I have also included a rough specification for what the valid function
> checks, and a simple counter-example for the old valid function.
>=20
> Again, this is all subject to change. I've written some JUnit tests to
> test it (included), but please do send me a private e-mail if you find
> any bugs.
>=20
> Best of luck in the next tournament
>=20
>=20
> Best regards,
> --
> ~ Matthew Strax-Haber
> Northeastern University
>



More information about the Cs5500 mailing list