nathancarter / group-explorer

Group theory visualization software in the browser
http://nathancarter.github.io/group-explorer/index.html
218 stars 26 forks source link

Visualizing conjugacy classes #19

Open balopat opened 3 months ago

balopat commented 3 months ago

I'm a big fan of visualizing mathematics, and just ran into the group explorer which I find very cool.

Roughly two and a half years ago I created a prototype for visualizing conjugacy classes in groups using Mathematica after my first graduate abstract algebra class: https://refactorium.com/blog/2021/10/20/visualizing-commutatitivity/

It's close to a multiplication table, but instead of the result of the multiplication of the two group elements, cells can have one of two colors depending on the commutativity between the two elements. Elements are also grouped by their conjugacy classes, represented by groups of rows (columns) between yellow highlighted lines. This way single row (column) conjugacy classes can be easily seen to be the center of the group (maybe we could organize the conjugacy classes by their size? then the center would be together).

Here's an example for the Pauli group:

image

If there is interest, I could put aside some time in the coming months and contribute it to the project.

nathancarter commented 3 months ago

Thanks for the email and welcome to the conversation about GE! Your blog post is super well-explained, nice work! And like all good stories, it draws me in and makes me ask questions…although being in the middle of the semester right now, I might not be able to reply as often/frequently I’d like to, until summer comes around.

First, the order of the elements in the row/col headings of a commutativity plot raises several questions:

  1. You say the elements are sorted “by their conjugacy class and then their natural sorting order (defined by Mathematica)” but do you mean sorted within each conjugacy class by Mathematica, or the conjugacy classes themselves are sorted by Mathematica? The “and then” phrasing makes me think it’s the former, but that wouldn’t fully stipulate the ordering, so maybe you mean the other way around? (It seems that the sorting order within a conjugacy class, for the purposes of this plot, is irrelevant.)
  2. I think how much structure the plot exhibits depends a lot on the order of the conjugacy classes. For example, I’d like to see all the classes with identical row contents grouped together. I think for large groups especially, like the Pauli group you show near the end, that would help the blue “dust” collect together into blue regions that are much more easily visible.

To give an example of how important question 2 is, let me show some comparisons of what it looks like if I reorder the rows and columns of the plots in your blog post.

Screen Shot 2024-04-04 at 10 14 54 AM

Interestingly enough, we see that the overall structure of these two groups is actually very similar! That's revealed only if we have some method for trying to reorder the rows to group rows with similar contents together. I just did this by experimentation; I don't have a general reordering principle to share, because it's not so simple as saying something like, "Just treat each row as a binary representation of an integer and sort by the integers," because sorting rows simultaneously sorts columns, which changes the row contents. So I'm not sure what the best principle is.

Second, a small correction to the proof at the end of the post: You have the fact that |Z(G)| / |G| <= 1/4 and have successfully used that fact once, but then when you attempt to use it again, it is to say that (|G| - |Z(G)|) / |G| <= 1 - 1/4, but that doesn't work. The quantity -|Z(G)| / |G| will be greater than or equal to 1/4, because it has been negated. I don't know off the top of my head what the correct step at that point in the proof is, but I don't think that's it.

Finally, I'd love to hear any proposals for how to bring this new type of plot into Group Explorer. It seems like your commutativity plot is a multiplication table with two new features: first, a specific way to color the elements (based on whether a commutes with b) and second, a specific way to order the rows and columns. So that actually sounds like two new features for the multiplication table visualizer. Let's take them one at a time.

First your new way to highlight multiplication tables: Right now a user can highlight MTs only by one of two means: highlight one chosen subset, or highlight a partition of the group. The commutativity plot is neither of those two things, but rather highlighting the group by a binary relation that is not an equivalence relation (the "commutes with" relation, which is reflexive and symmetric but not transitive). Not sure what the most elegant way to introduce this new idea would be.

Second, your new way to order the rows and columns, which we haven't yet decided on, but we know at least that it groups conjugacy classes together: Right now a user can group elements only by subgroup, unless they want to manually reorder them by shift+dragging on the MT itself. Perhaps, once a new way to order the elements is decided upon, it would be implemented by a new button on the MT's "Table" tab, under the "Order by subgroup:" menu, saying something like "Order by conjugacy classes" or something.

Thoughts?

Thanks again for engaging!

balopat commented 3 months ago

I'm very excited that my prototype visualization piqued your interest. Your finding on the similarity between the structure of the two groups is really interesting indeed. I started to mull over your questions and will come up in the coming weeks with a couple of design options for how we might be able to incorporate these features. Also, thank you for the super detailed review of my blog post. I'll fix the proof as soon as I can!

rayellis4 commented 3 months ago

Sorry for joining late, this sounds really neat!

Might I suggest that to start with you can just pull a copy of the repo from Nathan and modify the 'multiplication table' to display what you want. Don't worry about integration with the other pages (the library browser, info page, sheets), just make that one page work. The pages are really pretty independent and I can help with the integration when we reach that stage. Also, much of the programming complexity in Multtable stems from trying to improve page rendering by not drawing unseen parts, so feel free to avoid that issue too. (It turns out that drawing all the labels in a large-ish table would be the most time-consuming part of the whole page load -- who'd a thunk? -- so if the labels are too small or off the edge of the display they're ignored.) Most of the math-y stuff you might need can probably be found in files like BasicGroup (defined by a multiplication table from which other quantities are derived) and XMLGroup (a superclass of BasicGroup with things like names and such, read from an XML file). Feel free to contact me about any of this, I'm retired and have a pretty open schedule.

And as Nathan said, thanks for dropping us a line!

-- Ray

On Sun, Apr 7, 2024 at 3:34 PM Balint Pato @.***> wrote:

I'm very excited that my prototype visualization piqued your interest. Your finding on the similarity between the structure of the two groups is really interesting indeed. I started to mull over your questions and will come up in the coming weeks with a couple of design options for how we might be able to incorporate these features. Also, thank you for the super detailed review of my blog post. I'll fix the proof as soon as I can!

— Reply to this email directly, view it on GitHub https://github.com/nathancarter/group-explorer/issues/19#issuecomment-2041601520, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKE4RFKMB4XGETALTPNKLTLY4GUTXAVCNFSM6AAAAABFVJUONSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGYYDCNJSGA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

balopat commented 3 months ago

Thanks @rayellis4, sounds good, I'll experiment with the multtable directly.
I fixed the proof - it was simple, I just used the bound too early.

Regarding ordering, some intermediate thoughts:

  1. Cosets of a conjugacy classes translated by the elements of the center look the same. So the quotient group G/Z(G) will have conjugacy classes with unique binary signature. Thus within the cosets of conjugacy classes, we can choose the ordering to be the same, according to an arbitrary/preferred ordering of Z(G) elements.
  2. No matter what ordering we choose for the elements, we'll always see block diagonal "blue" squares of size |Z(G)| x |Z(G)| because every element and its multiples by the center will mutually commute