{ "cells": [ { "cell_type": "code", "execution_count": 1, "id": "990b557e", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Counter({1: 1}) 2022-07-03 16:35:46.073167\n", "Counter({1: 1, 2: 1}) 2022-07-03 16:35:46.074204\n", "Counter({2: 2, 1: 1}) 2022-07-03 16:35:46.074492\n", "Counter({2: 3, 1: 1}) 2022-07-03 16:35:46.075820\n", "Counter({2: 4, 1: 1}) 2022-07-03 16:35:46.076006\n", "Counter({2: 5, 1: 1}) 2022-07-03 16:35:46.076364\n", "Counter({2: 6, 1: 1}) 2022-07-03 16:35:46.076594\n", "Counter({2: 7, 1: 1}) 2022-07-03 16:35:46.076997\n", "Counter({2: 8, 1: 1}) 2022-07-03 16:35:46.077152\n", "Counter({2: 9, 1: 1}) 2022-07-03 16:35:46.077500\n", "Counter({2: 10, 1: 1}) 2022-07-03 16:35:46.077878\n", "Counter({2: 11, 1: 1}) 2022-07-03 16:35:46.078152\n", "Counter({2: 12, 1: 1}) 2022-07-03 16:35:46.078256\n", "Counter({2: 13, 1: 1}) 2022-07-03 16:35:46.078873\n", "Counter({2: 14, 1: 1}) 2022-07-03 16:35:46.079554\n", "Counter({2: 15, 1: 1}) 2022-07-03 16:35:46.079711\n", "Counter({2: 15, 1: 1, 3: 1}) 2022-07-03 16:35:46.081704\n", "Counter({2: 15, 3: 2, 1: 1}) 2022-07-03 16:35:46.087913\n", "Counter({2: 15, 3: 3, 1: 1}) 2022-07-03 16:35:46.096793\n", "Counter({2: 15, 3: 4, 1: 1}) 2022-07-03 16:35:46.102225\n", "Counter({2: 15, 3: 5, 1: 1}) 2022-07-03 16:35:46.104801\n", "Counter({2: 15, 3: 6, 1: 1}) 2022-07-03 16:35:46.108452\n", "Counter({2: 15, 3: 7, 1: 1}) 2022-07-03 16:35:46.112055\n", "Counter({2: 15, 3: 8, 1: 1}) 2022-07-03 16:35:46.113674\n", "Counter({2: 15, 3: 9, 1: 1}) 2022-07-03 16:35:46.133846\n", "Counter({2: 15, 3: 10, 1: 1}) 2022-07-03 16:35:46.143671\n", "Counter({2: 15, 3: 11, 1: 1}) 2022-07-03 16:35:46.146778\n", "Counter({2: 15, 3: 12, 1: 1}) 2022-07-03 16:35:46.149205\n", "Counter({2: 15, 3: 13, 1: 1}) 2022-07-03 16:35:46.153244\n", "Counter({2: 15, 3: 14, 1: 1}) 2022-07-03 16:35:46.158444\n", "Counter({2: 15, 3: 15, 1: 1}) 2022-07-03 16:35:46.159864\n", "Counter({3: 16, 2: 15, 1: 1}) 2022-07-03 16:35:46.171979\n", "Counter({3: 17, 2: 15, 1: 1}) 2022-07-03 16:35:46.172808\n", "Counter({3: 18, 2: 15, 1: 1}) 2022-07-03 16:35:46.175848\n", "Counter({3: 19, 2: 15, 1: 1}) 2022-07-03 16:35:46.178232\n", "Counter({3: 20, 2: 15, 1: 1}) 2022-07-03 16:35:46.179633\n", "Counter({3: 21, 2: 15, 1: 1}) 2022-07-03 16:35:46.180899\n", "Counter({3: 22, 2: 15, 1: 1}) 2022-07-03 16:35:46.183725\n", "Counter({3: 22, 2: 15, 1: 1, 4: 1}) 2022-07-03 16:35:46.364962\n", "Counter({3: 22, 2: 15, 4: 2, 1: 1}) 2022-07-03 16:35:46.466212\n", "Counter({3: 22, 2: 15, 4: 3, 1: 1}) 2022-07-03 16:35:46.990316\n", "Counter({3: 22, 2: 15, 4: 4, 1: 1}) 2022-07-03 16:35:47.128759\n", "Counter({3: 22, 2: 15, 4: 5, 1: 1}) 2022-07-03 16:35:47.289694\n", "Counter({3: 22, 2: 15, 4: 5, 1: 1, 5: 1}) 2022-07-03 16:35:48.222477\n", "Counter({3: 22, 2: 15, 4: 5, 5: 2, 1: 1}) 2022-07-03 16:35:56.761324\n", "Counter({3: 22, 2: 15, 4: 5, 5: 3, 1: 1}) 2022-07-03 16:36:01.861596\n", "Counter({3: 22, 2: 15, 4: 5, 5: 4, 1: 1}) 2022-07-03 16:36:09.815425\n", "Counter({3: 22, 2: 15, 4: 5, 5: 5, 1: 1}) 2022-07-03 16:36:14.062410\n", "Counter({3: 22, 2: 15, 5: 6, 4: 5, 1: 1}) 2022-07-03 16:36:17.147524\n", "Counter({3: 22, 2: 15, 5: 6, 4: 5, 1: 1, 6: 1}) 2022-07-03 16:36:58.340025\n", "Counter({3: 22, 2: 15, 5: 6, 4: 5, 6: 2, 1: 1}) 2022-07-03 16:37:08.069747\n", "Counter({3: 22, 2: 15, 5: 6, 4: 5, 6: 3, 1: 1}) 2022-07-03 16:37:21.574640\n", "Counter({3: 22, 2: 15, 5: 6, 4: 5, 6: 4, 1: 1}) 2022-07-03 16:37:36.785467\n", "Counter({3: 22, 2: 15, 5: 6, 4: 5, 6: 5, 1: 1}) 2022-07-03 16:37:48.806371\n", "Counter({3: 22, 2: 15, 5: 6, 6: 6, 4: 5, 1: 1}) 2022-07-03 16:39:00.477394\n", "Counter({3: 22, 2: 15, 6: 7, 5: 6, 4: 5, 1: 1}) 2022-07-03 16:39:24.277178\n", "Counter({3: 22, 2: 15, 6: 8, 5: 6, 4: 5, 1: 1}) 2022-07-03 16:40:07.323876\n", "Counter({3: 22, 2: 15, 6: 9, 5: 6, 4: 5, 1: 1}) 2022-07-03 16:40:11.881194\n", "Counter({3: 22, 2: 15, 6: 10, 5: 6, 4: 5, 1: 1}) 2022-07-03 16:40:47.823420\n" ] }, { "ename": "KeyboardInterrupt", "evalue": "", "output_type": "error", "traceback": [ "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", "\u001b[0;31mKeyboardInterrupt\u001b[0m Traceback (most recent call last)", "Input \u001b[0;32mIn [1]\u001b[0m, in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[1;32m 5\u001b[0m A5 \u001b[38;5;241m=\u001b[39m create_alternating_group_of_order(\u001b[38;5;241m5\u001b[39m) \u001b[38;5;66;03m# order 60\u001b[39;00m\n\u001b[1;32m 7\u001b[0m sizes \u001b[38;5;241m=\u001b[39m Counter()\n\u001b[0;32m----> 8\u001b[0m \u001b[38;5;28;01mfor\u001b[39;00m g \u001b[38;5;129;01min\u001b[39;00m all_subgroups_of_group(A5):\n\u001b[1;32m 9\u001b[0m sizes\u001b[38;5;241m.\u001b[39mupdate([\u001b[38;5;28mlen\u001b[39m(g)])\n\u001b[1;32m 10\u001b[0m \u001b[38;5;28mprint\u001b[39m(sizes, datetime\u001b[38;5;241m.\u001b[39mnow())\n", "File \u001b[0;32m~/code/permutations/groups.py:55\u001b[0m, in \u001b[0;36mall_subgroups_of_group\u001b[0;34m(known_group)\u001b[0m\n\u001b[1;32m 53\u001b[0m \u001b[38;5;28;01mfor\u001b[39;00m naked_collection_ \u001b[38;5;129;01min\u001b[39;00m combinations(known_group, i\u001b[38;5;241m-\u001b[39m\u001b[38;5;241m1\u001b[39m):\n\u001b[1;32m 54\u001b[0m collection_ \u001b[38;5;241m=\u001b[39m PermutationCollection(naked_collection_ \u001b[38;5;241m+\u001b[39m (E,))\n\u001b[0;32m---> 55\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[43mis_group\u001b[49m(collection_):\n\u001b[1;32m 56\u001b[0m \u001b[38;5;28;01myield\u001b[39;00m collection_\n", "\u001b[0;31mKeyboardInterrupt\u001b[0m: " ] } ], "source": [ "from groups import *\n", "from datetime import datetime\n", "from collections import Counter\n", "\n", "A5 = create_alternating_group_of_order(5) # order 60\n", "\n", "sizes = Counter()\n", "for g in all_subgroups_of_group(A5):\n", " sizes.update([len(g)])\n", " print(sizes, datetime.now())\n" ] }, { "cell_type": "code", "execution_count": 2, "id": "64efe303", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Counter({1: 1}) 2022-07-03 17:10:02.415670\n", "Counter({1: 1, 2: 1}) 2022-07-03 17:10:02.416235\n", "Counter({2: 2, 1: 1}) 2022-07-03 17:10:02.416542\n", "Counter({2: 3, 1: 1}) 2022-07-03 17:10:02.416876\n", "Counter({2: 3, 1: 1, 3: 1}) 2022-07-03 17:10:02.417196\n", "Counter({2: 3, 3: 2, 1: 1}) 2022-07-03 17:10:02.418998\n", "Counter({2: 3, 3: 3, 1: 1}) 2022-07-03 17:10:02.419510\n", "Counter({3: 4, 2: 3, 1: 1}) 2022-07-03 17:10:02.420378\n", "Counter({3: 4, 2: 3, 1: 1, 4: 1}) 2022-07-03 17:10:02.425559\n" ] } ], "source": [ "sizes = Counter()\n", "A4 = create_alternating_group_of_order(4) # order 12\n", "\n", "for g in all_subgroups_of_group(A4):\n", " sizes.update([len(g)])\n", " print(sizes, datetime.now())" ] }, { "cell_type": "code", "execution_count": null, "id": "04761b79", "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.9.6" } }, "nbformat": 4, "nbformat_minor": 5 }