Discussion:
Writing Java like it's C...(or, Equivalence class??)
(too old to reply)
Trevor Fountain
2005-10-02 18:47:25 UTC
Permalink
Aight. Can anybody explain what an...equivalence class is? All nodes of
the same depth, perhaps? The clarifications page isn't all that useful...

"Exchange with leader takes a node and moves it to the head (highest
address) in it's equivelance class. The reason for doing this is that it
makes this nodes parent also the highest in it's equivelance class and
so forth, think about it to know it's true."

...As it relies on proof by assertion. And still doesn't explain what it
means by equivalence class. Argh.
Susannah Federowicz
2005-10-02 19:00:35 UTC
Permalink
According to the Vitter paper, each equivalence class contains all nodes
of the same weight and same type (either leaf or internal).

So if you're moving a leaf (or internal node) to the head of the
equivalence class, swap it with the rightmost (i.e. highest implicitly
numbered) leaf (or internal) node of the same weight.

That's how I understood it, anyway. Hope that helps.
Post by Trevor Fountain
Aight. Can anybody explain what an...equivalence class is? All nodes of
the same depth, perhaps? The clarifications page isn't all that useful...
"Exchange with leader takes a node and moves it to the head (highest
address) in it's equivelance class. The reason for doing this is that it
makes this nodes parent also the highest in it's equivelance class and
so forth, think about it to know it's true."
...As it relies on proof by assertion. And still doesn't explain what it
means by equivalence class. Argh.
Drake Dowsett
2005-10-02 19:06:05 UTC
Permalink
Think back to logic last year, wasn't there something about equivelence
classes being 3 of the following: reflexive, transitive, symmetric,
anti-symmetric. I don't remember exactly, or if that's even right at all...

Excelent, I could be spouting garbage!
Drake
Post by Trevor Fountain
Aight. Can anybody explain what an...equivalence class is? All nodes of
the same depth, perhaps? The clarifications page isn't all that useful...
"Exchange with leader takes a node and moves it to the head (highest
address) in it's equivelance class. The reason for doing this is that it
makes this nodes parent also the highest in it's equivelance class and
so forth, think about it to know it's true."
...As it relies on proof by assertion. And still doesn't explain what it
means by equivalence class. Argh.
t3h j1mb0
2005-10-02 19:37:24 UTC
Permalink
Post by Drake Dowsett
Think back to logic last year, wasn't there something about equivelence
classes being 3 of the following: reflexive, transitive, symmetric,
anti-symmetric. I don't remember exactly, or if that's even right at all...
Excelent, I could be spouting garbage!
Drake
Post by Trevor Fountain
Aight. Can anybody explain what an...equivalence class is? All nodes of
the same depth, perhaps? The clarifications page isn't all that useful...
"Exchange with leader takes a node and moves it to the head (highest
address) in it's equivelance class. The reason for doing this is that it
makes this nodes parent also the highest in it's equivelance class and
so forth, think about it to know it's true."
...As it relies on proof by assertion. And still doesn't explain what it
means by equivalence class. Argh.
An equivalence relation is a relation that is reflexive, symmetric, and
transitive. An equivalence class is just a subset of the relation where
all the members are related. For example, the "==" operator is an
equivalence relation. All expressions that evaluate to 2 are in an
equivalence class (or 3, or true, or "apple", whatever... you get it).
Does that help?
-Jimbo
Trevor Fountain
2005-10-02 20:39:33 UTC
Permalink
Post by t3h j1mb0
Post by Drake Dowsett
Think back to logic last year, wasn't there something about equivelence
classes being 3 of the following: reflexive, transitive, symmetric,
anti-symmetric. I don't remember exactly, or if that's even right at all...
Excelent, I could be spouting garbage!
Drake
Post by Trevor Fountain
Aight. Can anybody explain what an...equivalence class is? All nodes of
the same depth, perhaps? The clarifications page isn't all that useful...
"Exchange with leader takes a node and moves it to the head (highest
address) in it's equivelance class. The reason for doing this is that it
makes this nodes parent also the highest in it's equivelance class and
so forth, think about it to know it's true."
...As it relies on proof by assertion. And still doesn't explain what it
means by equivalence class. Argh.
An equivalence relation is a relation that is reflexive, symmetric, and
transitive. An equivalence class is just a subset of the relation where
all the members are related. For example, the "==" operator is an
equivalence relation. All expressions that evaluate to 2 are in an
equivalence class (or 3, or true, or "apple", whatever... you get it).
Does that help?
-Jimbo
No, you pompous ass. I mean, thanks for the formal definition of
something I already know (or could look up) -- but I was wondering
whether nodes of the same weight were equivalent, or nodes of the same
depth. Happily, it's weight.

Argh. I word my posts with increasingly unclear diction. And forgive the
bitchy-snappy-sarcasm -- I'm trying to decipher what looks like Java
pointer-arithmetic, and hexadecimal array indexing, in Whunt's code.
Damn, I miss Walter.

<grin>

Carry on.

Loading...