{ "cells": [ { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "def print_commutator_series(n, full=False):\n", " G = SymmetricGroup(n)\n", " G_series = [set(G)]\n", " for i in range(20):\n", " Gi = G_series[i]\n", " if(full):\n", " print(\"%s:\\n%s\\n\" % (i, Gi))\n", " else:\n", " print(\"%s :\\t %s\" % (i, len(Gi)))\n", " \n", " if len(Gi) == 1:\n", " break\n", "\n", " H = set()\n", " for g in Gi:\n", " for h in Gi:\n", " H.add(g * h * g.inverse() * h.inverse())\n", " G_series.append(H)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "print_commutator_series(4, full=True)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "print_commutator_series(3, full=True)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "print_commutator_series(4)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "print_commutator_series(5)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "print_commutator_series(5)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "g = Permutation([(1,2,3,4,5)])\n", "g.cycle_type() != [5]" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "def find_Barrington_cycles(n):\n", " G = SymmetricGroup(n)\n", " for g in G:\n", " if g.cycle_type() != [n]: continue\n", " for h in G: \n", " if h.cycle_type() != [n]: continue\n", "\n", " commutator = g * h * g.inverse() * h.inverse()\n", " if commutator.cycle_type() == [n]:\n", " return (g, h, commutator)\n", "\n", "print(find_Barrington_cycles(5))" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "g = PermutationGroupElement([(1,2,3,4,5)])\n", "h = PermutationGroupElement([(1,3,5,4,2)])\n", "g * h * g.inverse() * h.inverse()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "SageMath 8.4", "language": "", "name": "sagemath" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 2 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython2", "version": "2.7.15" } }, "nbformat": 4, "nbformat_minor": 2 }