Skip to content

Commit

Permalink
Including example lexicographical minimum
Browse files Browse the repository at this point in the history
  • Loading branch information
jordyarms committed Dec 28, 2024
1 parent 64fbf7d commit 5671fba
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions notebooks/TicTacToe_Pattern_Generator.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -44,7 +44,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -74,7 +74,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 5,
"metadata": {},
"outputs": [
{
Expand All @@ -99,7 +99,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 6,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -133,7 +133,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 7,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -148,15 +148,16 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 9,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Example Permutation: (0, 0, 1, 1, 1, 0, 1, 0, 1)\n",
"Example Permutation: {(1, 1, 0, 0, 1, 0, 1, 0, 1), (0, 0, 1, 1, 1, 0, 1, 0, 1), (1, 0, 1, 0, 1, 1, 1, 0, 0), (1, 0, 1, 0, 1, 0, 0, 1, 1)}\n"
"Example Rotation: {(1, 1, 0, 0, 1, 0, 1, 0, 1), (0, 0, 1, 1, 1, 0, 1, 0, 1), (1, 0, 1, 0, 1, 1, 1, 0, 0), (1, 0, 1, 0, 1, 0, 0, 1, 1)}\n",
"Example Lexicographic Minimum: (0, 0, 1, 1, 1, 0, 1, 0, 1)\n"
]
}
],
Expand All @@ -166,7 +167,8 @@
"example_rotation = generate_rotations(example_perm, x) # Generate rotations for the example permutation\n",
"\n",
"print(f\"Example Permutation: {example_perm}\")\n",
"print(f\"Example Permutation: {example_rotation}\")"
"print(f\"Example Rotation: {example_rotation}\")\n",
"print(f\"Example Lexicographic Minimum: {min(example_rotation)}\")"
]
},
{
Expand All @@ -187,7 +189,7 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 10,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -201,7 +203,7 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 11,
"metadata": {},
"outputs": [
{
Expand All @@ -221,7 +223,7 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 12,
"metadata": {},
"outputs": [
{
Expand Down

0 comments on commit 5671fba

Please sign in to comment.