Eigenstate: myrddin-dev mailing list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 2/2] add permutation iterator


On 2018-01-01T23:16:29-0800, Ori Bernstein wrote:
> Sorry for taking a while to review this. Overall, it looks pretty good,
> just a few minor nits. I've already made them on my local branch, so
> as long as they look good to you, I can push.
>
> [...]
>
> --
>     Ori Bernstein

(My apologies, anti-Reply-All instincts sent this to the wrong place
the first time.)

No objections on my part, and I agree with your expanded comments.

Regarding the slice/iterable discrepancy, I think restricting this
iterable to slices is not terrible. The other day I implmented a
naive markov chain as an iterable, which exposes some more potential
problems:

 - iterables do not necessarily return a bounded number of valp#s,

 - iterables do not necessarily return the same sequence when you
   call them multiple times.

In light of that, I'm completely okay with that restriction.

As to what I needed that iterator for: as part of my work I'm trying
to find sequences of graph mutations μ such that μ(G) is graph-isomorphic
to “G but with certain (‘frozen’) vertices relabeled so that the
whole thing is rotated 90 degrees”. When such a μ is found, we can
use it as a ‘map’ through a tetrahedron (G is the top two faces,
μ(G) is the bottom two, μ tells us what happens in the interior).
If we then do this to a bunch of tetrahedra, we can glue the
tetrahedra together to form a triangulated 3-manifold M. Then, the
information given by stapling all of the μs and Gs together allows
us to examine (certain properties of) M by simple examining graphs.
The properties depend on which G we started out with. Some parts
of [0] are pretty readable, though the later sections get pretty
technical.

So anyway, in order to check μ, I needed a way to check whether two
graphs were isomorphic, and the most naive way to do that is to
permute [some of] the vertices in place and then check whether the
sets of edges agree.

[0]: https://arxiv.org/abs/1605.08297

--
S. Gilles

References:
Re: [PATCH 2/2] add permutation iteratorOri Bernstein <ori@xxxxxxxxxxxxxx>