RE: RE: Re: corrected RE: Re: Computing sets of equivalences
- To: mathgroup at smc.vnet.net
- Subject: [mg46617] RE: [mg46590] RE: [mg46574] Re: corrected RE: Re: Computing sets of equivalences
- From: "Wolf, Hartmut" <Hartmut.Wolf at t-systems.com>
- Date: Wed, 25 Feb 2004 13:07:09 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
This was all nonsense,
>-----Original Message-----
>From: Wolf, Hartmut
To: mathgroup at smc.vnet.net
>Sent: Wednesday, February 25, 2004 3:05 AM
>To: mathgroup at smc.vnet.net
>Subject: [mg46617] [mg46590] RE: [mg46574] Re: corrected RE: Re:
>Computing sets of
>equivalences
>
>
>
>Bobby,
>
>it took me a while to discern what you added to Carl's
>algorithm. It's the
>line where you map addequiv over the rest of the argument sequence.
>
>But it is not at all obvious to do so, since in effect you do
>not built on
>the work done, but, in a way restore equivalences, which would
>give rise to
>the same result.
>
>But this can be done more effectively just by
>
> Join @@ (Partition[#, 2, 1] & /@ <the-connected-components>)
>
>and then using Carl's original program.
>
>
>
>I thought about a way to further use the already built
>connected components
>and came up with this (I use my own terminology):
>
>addc[c_] := (newext = {c, (ext /@ (oldcls = Union[nex /@ c]))};
> Scan[Unset[ext[#]] &, oldcls];
> Scan[Set[nex[#], class[First[newext]]] &, c];
> ext[class[First[newext]]] = newext)
>
>classesFrom12[classes_] := Block[{nex, class, ext, newext, oldcls},
> nex[i_] = Sequence[];
> ext[_] := {};
> addc /@ classes;
> ext[_] =.;
> Union[Flatten[#]] & /@ DownValues[ext][[All, 2]]
> ]
>
When I had "tuned" this code, I destroyed it, and didn't notice. Yet now see
it (again!) when re-reading. Although it passed a test of 10000 "random
samples" it fails at this simple example: classesFrom12[{{1, 2}, {3, 1}, {5,
2}}]. (For obvious reasons: the set must run over the newext.) But newext
here becomes greatly redundant for large sets (therefore I had to Union the
result, so either this fact, or in intermediate Union at newext breaks the
neck. At the moment I see no way out, and abandon the idea.
However it appears that the new proposal from Fred Simons has the potential
to do it:
mapping Set over the total class (in extension to pairs), and similar when
linking the classes of first order. However, right now, I cannot pursue this
idea further (and thus don't know whether it pays).
--
Hartmut Wolf