{ "cells": [{ "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [{ "name": "stdout", "output_type": "stream", "text": [ "#I Please load package NormalizInterface or 4ti2Interface\n", "#I to have extended functionalities.\n", "#I Please load package SingularInterface or singular (not both)\n", "#I or GradedModules to have extended functionalities.\n" ] }, { "data": { "text/plain": [ "true" ] }, "execution_count": 1, "metadata": { "text/plain": "" }, "output_type": "execute_result" } ], "source": [ "LoadPackage(\"FrancyMonoids\");" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Trees" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [{ "data": { "text/plain": [ "The numerical semigroup N" ] }, "execution_count": 2, "metadata": { "text/plain": "" }, "output_type": "execute_result" }], "source": [ "s:=NumericalSemigroup(1);" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## `DrawTreeOfSonsOfNumericalSemigroup(s,l,gensfunc)`\n", "\n", "This function draws the thre of the sons of `s` up to level `l` with respect to `gensfunc` (a function that gets minimal generators according to a given variety of numerical semigroups, for instance, `MinimalGenerators`)" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "scrolled": false }, "outputs": [{ "data": { "application/vnd.francy+json": "{\"version\" : \"1.0.2\",\"mime\" : \"application\\/vnd.francy+json\",\"canvas\" : {\"width\" : 800,\"id\" : \"F4\",\"height\" : 600,\"title\" : \"Sons of a numerical semigroup\",\"zoomToFit\" : true,\"texTypesetting\" : true,\"menus\" : {},\"graph\" : {\"type\" : \"tree\",\"id\" : \"F1\",\"simulation\" : true,\"collapsed\" : false,\"nodes\" : {\"F2\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F2\",\"size\" : 5,\"title\" : \"S\",\"color\" : \"\",\"layer\" : 0,\"parent\" : \"\",\"menus\" : {},\"messages\" : {\"F3\" : {\"type\" : \"default\",\"id\" : \"F3\",\"text\" : \"[ 1 ]\",\"title\" : \"\"}},\"callbacks\" : {}},\"F5\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F5\",\"size\" : 5,\"title\" : \"{2,3}\",\"color\" : \"\",\"layer\" : 0,\"parent\" : \"F2\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {}},\"F6\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F6\",\"size\" : 5,\"title\" : \"{3,4,5}\",\"color\" : \"\",\"layer\" : 0,\"parent\" : \"F5\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {}},\"F7\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F7\",\"size\" : 5,\"title\" : \"{4,5,6,7}\",\"color\" : \"\",\"layer\" : 0,\"parent\" : \"F6\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {}},\"F8\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F8\",\"size\" : 5,\"title\" : \"{5,6,7,8,9}\",\"color\" : \"\",\"layer\" : 0,\"parent\" : \"F7\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {}},\"F9\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F9\",\"size\" : 5,\"title\" : \"{6,7,8,9,10,11}\",\"color\" : \"\",\"layer\" : 0,\"parent\" : \"F8\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {}},\"F10\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F10\",\"size\" : 5,\"title\" : \"{5,7,8,9,11}\",\"color\" : \"\",\"layer\" : 0,\"parent\" : \"F8\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {}},\"F11\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F11\",\"size\" : 5,\"title\" : \"{5,6,8,9}\",\"color\" : \"\",\"layer\" : 0,\"parent\" : \"F8\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {}},\"F12\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F12\",\"size\" : 5,\"title\" : \"{5,6,7,9}\",\"color\" : \"\",\"layer\" : 0,\"parent\" : \"F8\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {}},\"F13\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F13\",\"size\" : 5,\"title\" : \"{5,6,7,8}\",\"color\" : \"\",\"layer\" : 0,\"parent\" : \"F8\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {}},\"F14\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F14\",\"size\" : 5,\"title\" : \"{4,6,7,9}\",\"color\" : \"\",\"layer\" : 0,\"parent\" : \"F7\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {}},\"F15\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F15\",\"size\" : 5,\"title\" : \"{4,7,9,10}\",\"color\" : \"\",\"layer\" : 0,\"parent\" : \"F14\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {}},\"F16\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F16\",\"size\" : 5,\"title\" : \"{4,6,9,11}\",\"color\" : \"\",\"layer\" : 0,\"parent\" : \"F14\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {}},\"F17\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F17\",\"size\" : 5,\"title\" : \"{4,6,7}\",\"color\" : \"\",\"layer\" : 0,\"parent\" : \"F14\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {}},\"F18\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F18\",\"size\" : 5,\"title\" : \"{4,5,7}\",\"color\" : \"\",\"layer\" : 0,\"parent\" : \"F7\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {}},\"F19\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F19\",\"size\" : 5,\"title\" : \"{4,5,11}\",\"color\" : \"\",\"layer\" : 0,\"parent\" : \"F18\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {}},\"F20\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F20\",\"size\" : 5,\"title\" : \"{4,5,6}\",\"color\" : \"\",\"layer\" : 0,\"parent\" : \"F7\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {}},\"F21\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F21\",\"size\" : 5,\"title\" : \"{3,5,7}\",\"color\" : \"\",\"layer\" : 0,\"parent\" : \"F6\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {}},\"F22\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F22\",\"size\" : 5,\"title\" : \"{3,7,8}\",\"color\" : \"\",\"layer\" : 0,\"parent\" : \"F21\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {}},\"F23\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F23\",\"size\" : 5,\"title\" : \"{3,8,10}\",\"color\" : \"\",\"layer\" : 0,\"parent\" : \"F22\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {}},\"F24\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F24\",\"size\" : 5,\"title\" : \"{3,7,11}\",\"color\" : \"\",\"layer\" : 0,\"parent\" : \"F22\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {}},\"F25\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F25\",\"size\" : 5,\"title\" : \"{3,5}\",\"color\" : \"\",\"layer\" : 0,\"parent\" : \"F21\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {}},\"F26\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F26\",\"size\" : 5,\"title\" : \"{3,4}\",\"color\" : \"\",\"layer\" : 0,\"parent\" : \"F6\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {}},\"F27\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F27\",\"size\" : 5,\"title\" : \"{2,5}\",\"color\" : \"\",\"layer\" : 0,\"parent\" : \"F5\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {}},\"F28\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F28\",\"size\" : 5,\"title\" : \"{2,7}\",\"color\" : \"\",\"layer\" : 0,\"parent\" : \"F27\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {}},\"F29\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F29\",\"size\" : 5,\"title\" : \"{2,9}\",\"color\" : \"\",\"layer\" : 0,\"parent\" : \"F28\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {}},\"F30\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F30\",\"size\" : 5,\"title\" : \"{2,11}\",\"color\" : \"\",\"layer\" : 0,\"parent\" : \"F29\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {}}},\"links\" : {}},\"messages\" : {}}}" }, "execution_count": 3, "metadata": { "application/vnd.francy+json": {} }, "output_type": "execute_result" }], "source": [ "DrawTreeOfSonsOfNumericalSemigroup(s,5,MinimalGenerators);" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [{ "data": { "text/plain": [ "Numerical semigroup with 3 generators" ] }, "execution_count": 4, "metadata": { "text/plain": "" }, "output_type": "execute_result" }], "source": [ "s:=NumericalSemigroup(4,6,9);" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## `DrawTreeOfGluingsOfNumericalSemigroup(s,expand...)`\n", "\n", "Draws the decomposition of `s` as a gluing of numerical semigroups, and then proceeds recursively with each of the factors. Decomposition is not unique, and this is why a tree is drawn. The optional argument `expand` may be true or false, and it makes the tree fully expandable or not." ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [{ "data": { "application/vnd.francy+json": "{\"version\" : \"1.0.2\",\"mime\" : \"application\\/vnd.francy+json\",\"canvas\" : {\"width\" : 800,\"id\" : \"F33\",\"height\" : 600,\"title\" : \"Gluings of a numerical semigroup\",\"zoomToFit\" : true,\"texTypesetting\" : false,\"menus\" : {},\"graph\" : {\"type\" : \"tree\",\"id\" : \"F31\",\"simulation\" : true,\"collapsed\" : false,\"nodes\" : {\"F32\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F32\",\"size\" : 1,\"title\" : \"〈4,6,9〉\",\"color\" : \"\",\"layer\" : 0,\"parent\" : \"\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {}},\"F34\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"square\",\"id\" : \"F34\",\"size\" : 1,\"title\" : \"〈4〉 + 〈6,9〉\",\"color\" : \"\",\"layer\" : 0,\"parent\" : \"F32\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {}},\"F35\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F35\",\"size\" : 1,\"title\" : \"〈1〉\",\"color\" : \"\",\"layer\" : 0,\"parent\" : \"F34\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {}},\"F36\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F36\",\"size\" : 1,\"title\" : \"〈2,3〉\",\"color\" : \"\",\"layer\" : 0,\"parent\" : \"F34\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {}},\"F37\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"square\",\"id\" : \"F37\",\"size\" : 1,\"title\" : \"〈2〉 + 〈3〉\",\"color\" : \"\",\"layer\" : 0,\"parent\" : \"F36\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {}},\"F38\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F38\",\"size\" : 1,\"title\" : \"〈1〉\",\"color\" : \"\",\"layer\" : 0,\"parent\" : \"F37\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {}},\"F39\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F39\",\"size\" : 1,\"title\" : \"〈1〉\",\"color\" : \"\",\"layer\" : 0,\"parent\" : \"F37\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {}},\"F40\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"square\",\"id\" : \"F40\",\"size\" : 1,\"title\" : \"〈4,6〉 + 〈9〉\",\"color\" : \"\",\"layer\" : 0,\"parent\" : \"F32\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {}},\"F41\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F41\",\"size\" : 1,\"title\" : \"〈2,3〉\",\"color\" : \"\",\"layer\" : 0,\"parent\" : \"F40\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {}},\"F42\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F42\",\"size\" : 1,\"title\" : \"〈1〉\",\"color\" : \"\",\"layer\" : 0,\"parent\" : \"F40\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {}},\"F43\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"square\",\"id\" : \"F43\",\"size\" : 1,\"title\" : \"〈2〉 + 〈3〉\",\"color\" : \"\",\"layer\" : 0,\"parent\" : \"F41\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {}},\"F44\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F44\",\"size\" : 1,\"title\" : \"〈1〉\",\"color\" : \"\",\"layer\" : 0,\"parent\" : \"F43\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {}},\"F45\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F45\",\"size\" : 1,\"title\" : \"〈1〉\",\"color\" : \"\",\"layer\" : 0,\"parent\" : \"F43\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {}}},\"links\" : {}},\"messages\" : {}}}" }, "execution_count": 5, "metadata": { "application/vnd.francy+json": {} }, "output_type": "execute_result" }], "source": [ "DrawTreeOfGluingsOfNumericalSemigroup(s,true);" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Hasse Diagrams" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [{ "data": { "text/plain": [ "Numerical semigroup with 3 generators" ] }, "execution_count": 6, "metadata": { "text/plain": "" }, "output_type": "execute_result" }], "source": [ "s:=NumericalSemigroup(3,5,7);" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## `DrawHasseDiagramOfNumericalSemigroup(s, A)`\n", "\n", "Draws the Hasse diagram of `A` (a set of integers) with respect to the ordering induced by `s`: $a\\preceq b$ if $b-a$ is in `s`." ] }, { "cell_type": "code", "execution_count": 7, "metadata": { "scrolled": false }, "outputs": [{ "data": { "application/vnd.francy+json": "{\"version\" : \"1.0.2\",\"mime\" : \"application\\/vnd.francy+json\",\"canvas\" : {\"width\" : 800,\"id\" : \"F132\",\"height\" : 600,\"title\" : \"Hasse diagram of numerical semigroup\",\"zoomToFit\" : true,\"texTypesetting\" : false,\"menus\" : {},\"graph\" : {\"type\" : \"directed\",\"id\" : \"F46\",\"simulation\" : true,\"collapsed\" : true,\"nodes\" : {\"F47\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F47\",\"size\" : 10,\"title\" : \"1\",\"color\" : \"\",\"layer\" : 0,\"parent\" : \"\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {\"F48\" : {\"func\" : \"unknown\",\"id\" : \"F48\",\"trigger\" : \"click\",\"knownArgs\" : [\"1\"],\"requiredArgs\" : {}}}},\"F49\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F49\",\"size\" : 10,\"title\" : \"2\",\"color\" : \"\",\"layer\" : 0,\"parent\" : \"\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {\"F50\" : {\"func\" : \"unknown\",\"id\" : \"F50\",\"trigger\" : \"click\",\"knownArgs\" : [\"2\"],\"requiredArgs\" : {}}}},\"F51\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F51\",\"size\" : 10,\"title\" : \"3\",\"color\" : \"\",\"layer\" : 0,\"parent\" : \"\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {\"F52\" : {\"func\" : \"unknown\",\"id\" : \"F52\",\"trigger\" : \"click\",\"knownArgs\" : [\"3\"],\"requiredArgs\" : {}}}},\"F53\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F53\",\"size\" : 10,\"title\" : \"4\",\"color\" : \"\",\"layer\" : -1,\"parent\" : \"\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {\"F54\" : {\"func\" : \"unknown\",\"id\" : \"F54\",\"trigger\" : \"click\",\"knownArgs\" : [\"4\"],\"requiredArgs\" : {}}}},\"F55\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F55\",\"size\" : 10,\"title\" : \"5\",\"color\" : \"\",\"layer\" : -1,\"parent\" : \"\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {\"F56\" : {\"func\" : \"unknown\",\"id\" : \"F56\",\"trigger\" : \"click\",\"knownArgs\" : [\"5\"],\"requiredArgs\" : {}}}},\"F57\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F57\",\"size\" : 10,\"title\" : \"6\",\"color\" : \"\",\"layer\" : -1,\"parent\" : \"\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {\"F58\" : {\"func\" : \"unknown\",\"id\" : \"F58\",\"trigger\" : \"click\",\"knownArgs\" : [\"6\"],\"requiredArgs\" : {}}}},\"F59\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F59\",\"size\" : 10,\"title\" : \"7\",\"color\" : \"\",\"layer\" : -2,\"parent\" : \"\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {\"F60\" : {\"func\" : \"unknown\",\"id\" : \"F60\",\"trigger\" : \"click\",\"knownArgs\" : [\"7\"],\"requiredArgs\" : {}}}},\"F61\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F61\",\"size\" : 10,\"title\" : \"8\",\"color\" : \"\",\"layer\" : -2,\"parent\" : \"\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {\"F62\" : {\"func\" : \"unknown\",\"id\" : \"F62\",\"trigger\" : \"click\",\"knownArgs\" : [\"8\"],\"requiredArgs\" : {}}}},\"F63\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F63\",\"size\" : 10,\"title\" : \"9\",\"color\" : \"\",\"layer\" : -2,\"parent\" : \"\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {\"F64\" : {\"func\" : \"unknown\",\"id\" : \"F64\",\"trigger\" : \"click\",\"knownArgs\" : [\"9\"],\"requiredArgs\" : {}}}},\"F65\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F65\",\"size\" : 10,\"title\" : \"10\",\"color\" : \"\",\"layer\" : -3,\"parent\" : \"\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {\"F66\" : {\"func\" : \"unknown\",\"id\" : \"F66\",\"trigger\" : \"click\",\"knownArgs\" : [\"10\"],\"requiredArgs\" : {}}}},\"F67\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F67\",\"size\" : 10,\"title\" : \"11\",\"color\" : \"\",\"layer\" : -3,\"parent\" : \"\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {\"F68\" : {\"func\" : \"unknown\",\"id\" : \"F68\",\"trigger\" : \"click\",\"knownArgs\" : [\"11\"],\"requiredArgs\" : {}}}},\"F69\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F69\",\"size\" : 10,\"title\" : \"12\",\"color\" : \"\",\"layer\" : -3,\"parent\" : \"\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {\"F70\" : {\"func\" : \"unknown\",\"id\" : \"F70\",\"trigger\" : \"click\",\"knownArgs\" : [\"12\"],\"requiredArgs\" : {}}}},\"F71\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F71\",\"size\" : 10,\"title\" : \"13\",\"color\" : \"\",\"layer\" : -4,\"parent\" : \"\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {\"F72\" : {\"func\" : \"unknown\",\"id\" : \"F72\",\"trigger\" : \"click\",\"knownArgs\" : [\"13\"],\"requiredArgs\" : {}}}},\"F73\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F73\",\"size\" : 10,\"title\" : \"14\",\"color\" : \"\",\"layer\" : -4,\"parent\" : \"\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {\"F74\" : {\"func\" : \"unknown\",\"id\" : \"F74\",\"trigger\" : \"click\",\"knownArgs\" : [\"14\"],\"requiredArgs\" : {}}}},\"F75\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F75\",\"size\" : 10,\"title\" : \"15\",\"color\" : \"\",\"layer\" : -4,\"parent\" : \"\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {\"F76\" : {\"func\" : \"unknown\",\"id\" : \"F76\",\"trigger\" : \"click\",\"knownArgs\" : [\"15\"],\"requiredArgs\" : {}}}},\"F77\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F77\",\"size\" : 10,\"title\" : \"16\",\"color\" : \"\",\"layer\" : -5,\"parent\" : \"\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {\"F78\" : {\"func\" : \"unknown\",\"id\" : \"F78\",\"trigger\" : \"click\",\"knownArgs\" : [\"16\"],\"requiredArgs\" : {}}}},\"F79\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F79\",\"size\" : 10,\"title\" : \"17\",\"color\" : \"\",\"layer\" : -5,\"parent\" : \"\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {\"F80\" : {\"func\" : \"unknown\",\"id\" : \"F80\",\"trigger\" : \"click\",\"knownArgs\" : [\"17\"],\"requiredArgs\" : {}}}},\"F81\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F81\",\"size\" : 10,\"title\" : \"18\",\"color\" : \"\",\"layer\" : -5,\"parent\" : \"\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {\"F82\" : {\"func\" : \"unknown\",\"id\" : \"F82\",\"trigger\" : \"click\",\"knownArgs\" : [\"18\"],\"requiredArgs\" : {}}}},\"F83\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F83\",\"size\" : 10,\"title\" : \"19\",\"color\" : \"\",\"layer\" : -6,\"parent\" : \"\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {\"F84\" : {\"func\" : \"unknown\",\"id\" : \"F84\",\"trigger\" : \"click\",\"knownArgs\" : [\"19\"],\"requiredArgs\" : {}}}},\"F85\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F85\",\"size\" : 10,\"title\" : \"20\",\"color\" : \"\",\"layer\" : -6,\"parent\" : \"\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {\"F86\" : {\"func\" : \"unknown\",\"id\" : \"F86\",\"trigger\" : \"click\",\"knownArgs\" : [\"20\"],\"requiredArgs\" : {}}}}},\"links\" : {\"F87\" : {\"id\" : \"F87\",\"source\" : \"F47\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F53\"},\"F88\" : {\"id\" : \"F88\",\"source\" : \"F47\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F57\"},\"F89\" : {\"id\" : \"F89\",\"source\" : \"F47\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F61\"},\"F90\" : {\"id\" : \"F90\",\"source\" : \"F49\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F55\"},\"F91\" : {\"id\" : \"F91\",\"source\" : \"F49\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F59\"},\"F92\" : {\"id\" : \"F92\",\"source\" : \"F49\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F63\"},\"F93\" : {\"id\" : \"F93\",\"source\" : \"F51\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F57\"},\"F94\" : {\"id\" : \"F94\",\"source\" : \"F51\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F61\"},\"F95\" : {\"id\" : \"F95\",\"source\" : \"F51\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F65\"},\"F96\" : {\"id\" : \"F96\",\"source\" : \"F53\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F59\"},\"F97\" : {\"id\" : \"F97\",\"source\" : \"F53\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F63\"},\"F98\" : {\"id\" : \"F98\",\"source\" : \"F53\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F67\"},\"F99\" : {\"id\" : \"F99\",\"source\" : \"F55\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F61\"},\"F100\" : {\"id\" : \"F100\",\"source\" : \"F55\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F65\"},\"F101\" : {\"id\" : \"F101\",\"source\" : \"F55\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F69\"},\"F102\" : {\"id\" : \"F102\",\"source\" : \"F57\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F63\"},\"F103\" : {\"id\" : \"F103\",\"source\" : \"F57\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F67\"},\"F104\" : {\"id\" : \"F104\",\"source\" : \"F57\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F71\"},\"F105\" : {\"id\" : \"F105\",\"source\" : \"F59\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F65\"},\"F106\" : {\"id\" : \"F106\",\"source\" : \"F59\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F69\"},\"F107\" : {\"id\" : \"F107\",\"source\" : \"F59\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F73\"},\"F108\" : {\"id\" : \"F108\",\"source\" : \"F61\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F67\"},\"F109\" : {\"id\" : \"F109\",\"source\" : \"F61\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F71\"},\"F110\" : {\"id\" : \"F110\",\"source\" : \"F61\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F75\"},\"F111\" : {\"id\" : \"F111\",\"source\" : \"F63\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F69\"},\"F112\" : {\"id\" : \"F112\",\"source\" : \"F63\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F73\"},\"F113\" : {\"id\" : \"F113\",\"source\" : \"F63\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F77\"},\"F114\" : {\"id\" : \"F114\",\"source\" : \"F65\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F71\"},\"F115\" : {\"id\" : \"F115\",\"source\" : \"F65\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F75\"},\"F116\" : {\"id\" : \"F116\",\"source\" : \"F65\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F79\"},\"F117\" : {\"id\" : \"F117\",\"source\" : \"F67\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F73\"},\"F118\" : {\"id\" : \"F118\",\"source\" : \"F67\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F77\"},\"F119\" : {\"id\" : \"F119\",\"source\" : \"F67\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F81\"},\"F120\" : {\"id\" : \"F120\",\"source\" : \"F69\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F75\"},\"F121\" : {\"id\" : \"F121\",\"source\" : \"F69\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F79\"},\"F122\" : {\"id\" : \"F122\",\"source\" : \"F69\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F83\"},\"F123\" : {\"id\" : \"F123\",\"source\" : \"F71\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F77\"},\"F124\" : {\"id\" : \"F124\",\"source\" : \"F71\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F81\"},\"F125\" : {\"id\" : \"F125\",\"source\" : \"F71\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F85\"},\"F126\" : {\"id\" : \"F126\",\"source\" : \"F73\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F79\"},\"F127\" : {\"id\" : \"F127\",\"source\" : \"F73\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F83\"},\"F128\" : {\"id\" : \"F128\",\"source\" : \"F75\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F81\"},\"F129\" : {\"id\" : \"F129\",\"source\" : \"F75\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F85\"},\"F130\" : {\"id\" : \"F130\",\"source\" : \"F77\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F83\"},\"F131\" : {\"id\" : \"F131\",\"source\" : \"F79\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F85\"}}},\"messages\" : {}}}" }, "execution_count": 7, "metadata": { "application/vnd.francy+json": {} }, "output_type": "execute_result" }], "source": [ "DrawHasseDiagramOfNumericalSemigroup(s,[1..20]);" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Of special interest is the Hasse diagram of an Apéry set or of the Betti elements." ] }, { "cell_type": "code", "execution_count": 9, "metadata": { "scrolled": false }, "outputs": [{ "data": { "text/plain": [ "Numerical semigroup with 4 generators" ] }, "execution_count": 8, "metadata": { "text/plain": "" }, "output_type": "execute_result" }, { "data": { "application/vnd.francy+json": "{\"version\" : \"1.0.2\",\"mime\" : \"application\\/vnd.francy+json\",\"canvas\" : {\"width\" : 800,\"id\" : \"F174\",\"height\" : 600,\"title\" : \"Hasse diagram of numerical semigroup\",\"zoomToFit\" : true,\"texTypesetting\" : false,\"menus\" : {},\"graph\" : {\"type\" : \"directed\",\"id\" : \"F133\",\"simulation\" : true,\"collapsed\" : true,\"nodes\" : {\"F134\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F134\",\"size\" : 10,\"title\" : \"0\",\"color\" : \"\",\"layer\" : 0,\"parent\" : \"\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {\"F135\" : {\"func\" : \"unknown\",\"id\" : \"F135\",\"trigger\" : \"click\",\"knownArgs\" : [\"0\"],\"requiredArgs\" : {}}}},\"F136\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F136\",\"size\" : 10,\"title\" : \"5\",\"color\" : \"\",\"layer\" : -1,\"parent\" : \"\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {\"F137\" : {\"func\" : \"unknown\",\"id\" : \"F137\",\"trigger\" : \"click\",\"knownArgs\" : [\"5\"],\"requiredArgs\" : {}}}},\"F138\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F138\",\"size\" : 10,\"title\" : \"7\",\"color\" : \"\",\"layer\" : -1,\"parent\" : \"\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {\"F139\" : {\"func\" : \"unknown\",\"id\" : \"F139\",\"trigger\" : \"click\",\"knownArgs\" : [\"7\"],\"requiredArgs\" : {}}}},\"F140\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F140\",\"size\" : 10,\"title\" : \"9\",\"color\" : \"\",\"layer\" : -1,\"parent\" : \"\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {\"F141\" : {\"func\" : \"unknown\",\"id\" : \"F141\",\"trigger\" : \"click\",\"knownArgs\" : [\"9\"],\"requiredArgs\" : {}}}},\"F142\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F142\",\"size\" : 10,\"title\" : \"11\",\"color\" : \"\",\"layer\" : -1,\"parent\" : \"\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {\"F143\" : {\"func\" : \"unknown\",\"id\" : \"F143\",\"trigger\" : \"click\",\"knownArgs\" : [\"11\"],\"requiredArgs\" : {}}}},\"F144\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F144\",\"size\" : 10,\"title\" : \"12\",\"color\" : \"\",\"layer\" : -2,\"parent\" : \"\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {\"F145\" : {\"func\" : \"unknown\",\"id\" : \"F145\",\"trigger\" : \"click\",\"knownArgs\" : [\"12\"],\"requiredArgs\" : {}}}},\"F146\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F146\",\"size\" : 10,\"title\" : \"14\",\"color\" : \"\",\"layer\" : -2,\"parent\" : \"\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {\"F147\" : {\"func\" : \"unknown\",\"id\" : \"F147\",\"trigger\" : \"click\",\"knownArgs\" : [\"14\"],\"requiredArgs\" : {}}}},\"F148\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F148\",\"size\" : 10,\"title\" : \"16\",\"color\" : \"\",\"layer\" : -2,\"parent\" : \"\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {\"F149\" : {\"func\" : \"unknown\",\"id\" : \"F149\",\"trigger\" : \"click\",\"knownArgs\" : [\"16\"],\"requiredArgs\" : {}}}},\"F150\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F150\",\"size\" : 10,\"title\" : \"18\",\"color\" : \"\",\"layer\" : -2,\"parent\" : \"\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {\"F151\" : {\"func\" : \"unknown\",\"id\" : \"F151\",\"trigger\" : \"click\",\"knownArgs\" : [\"18\"],\"requiredArgs\" : {}}}},\"F152\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F152\",\"size\" : 10,\"title\" : \"23\",\"color\" : \"\",\"layer\" : -3,\"parent\" : \"\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {\"F153\" : {\"func\" : \"unknown\",\"id\" : \"F153\",\"trigger\" : \"click\",\"knownArgs\" : [\"23\"],\"requiredArgs\" : {}}}}},\"links\" : {\"F154\" : {\"id\" : \"F154\",\"source\" : \"F134\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F136\"},\"F155\" : {\"id\" : \"F155\",\"source\" : \"F134\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F138\"},\"F156\" : {\"id\" : \"F156\",\"source\" : \"F134\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F140\"},\"F157\" : {\"id\" : \"F157\",\"source\" : \"F134\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F142\"},\"F158\" : {\"id\" : \"F158\",\"source\" : \"F136\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F144\"},\"F159\" : {\"id\" : \"F159\",\"source\" : \"F136\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F146\"},\"F160\" : {\"id\" : \"F160\",\"source\" : \"F136\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F148\"},\"F161\" : {\"id\" : \"F161\",\"source\" : \"F138\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F144\"},\"F162\" : {\"id\" : \"F162\",\"source\" : \"F138\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F146\"},\"F163\" : {\"id\" : \"F163\",\"source\" : \"F138\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F148\"},\"F164\" : {\"id\" : \"F164\",\"source\" : \"F138\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F150\"},\"F165\" : {\"id\" : \"F165\",\"source\" : \"F140\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F146\"},\"F166\" : {\"id\" : \"F166\",\"source\" : \"F140\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F148\"},\"F167\" : {\"id\" : \"F167\",\"source\" : \"F140\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F150\"},\"F168\" : {\"id\" : \"F168\",\"source\" : \"F142\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F148\"},\"F169\" : {\"id\" : \"F169\",\"source\" : \"F142\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F150\"},\"F170\" : {\"id\" : \"F170\",\"source\" : \"F144\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F152\"},\"F171\" : {\"id\" : \"F171\",\"source\" : \"F146\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F152\"},\"F172\" : {\"id\" : \"F172\",\"source\" : \"F148\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F152\"},\"F173\" : {\"id\" : \"F173\",\"source\" : \"F150\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F152\"}}},\"messages\" : {}}}" }, "execution_count": 9, "metadata": { "application/vnd.francy+json": {} }, "output_type": "execute_result" } ], "source": [ "s:=NumericalSemigroup(5,7,9,11);\n", "DrawHasseDiagramOfNumericalSemigroup(s,AperyList(s,10));" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## `DrawOverSemigroupsNumericalSemigroup(s)`\n", "\n", "Draws the Hasse diagram of oversemigroups of the numerical semigroup `s`." ] }, { "cell_type": "code", "execution_count": 11, "metadata": {}, "outputs": [{ "data": { "text/plain": [ "Numerical semigroup with 4 generators" ] }, "execution_count": 10, "metadata": { "text/plain": "" }, "output_type": "execute_result" }, { "data": { "application/vnd.francy+json": "{\"version\" : \"1.0.2\",\"mime\" : \"application\\/vnd.francy+json\",\"canvas\" : {\"width\" : 800,\"id\" : \"F213\",\"height\" : 600,\"title\" : \"Oversemigroups\",\"zoomToFit\" : true,\"texTypesetting\" : true,\"menus\" : {},\"graph\" : {\"type\" : \"directed\",\"id\" : \"F175\",\"simulation\" : true,\"collapsed\" : true,\"nodes\" : {\"F176\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"diamond\",\"id\" : \"F176\",\"size\" : 2,\"title\" : \"〈 1 〉\",\"color\" : \"\",\"layer\" : 0,\"parent\" : \"\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {}},\"F177\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"diamond\",\"id\" : \"F177\",\"size\" : 2,\"title\" : \"〈 2,3 〉\",\"color\" : \"\",\"layer\" : 1,\"parent\" : \"\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {}},\"F178\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"diamond\",\"id\" : \"F178\",\"size\" : 2,\"title\" : \"〈 2,5 〉\",\"color\" : \"\",\"layer\" : 2,\"parent\" : \"\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {}},\"F179\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"diamond\",\"id\" : \"F179\",\"size\" : 2,\"title\" : \"〈 3,4,5 〉\",\"color\" : \"\",\"layer\" : 2,\"parent\" : \"\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {}},\"F180\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"diamond\",\"id\" : \"F180\",\"size\" : 2,\"title\" : \"〈 3,5,7 〉\",\"color\" : \"\",\"layer\" : 3,\"parent\" : \"\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {}},\"F181\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F181\",\"size\" : 2,\"title\" : \"〈 4,5,6,7 〉\",\"color\" : \"\",\"layer\" : 3,\"parent\" : \"\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {}},\"F182\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"diamond\",\"id\" : \"F182\",\"size\" : 2,\"title\" : \"〈 4,5,7 〉\",\"color\" : \"\",\"layer\" : 4,\"parent\" : \"\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {}},\"F183\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F183\",\"size\" : 2,\"title\" : \"〈 5,6,7,8,9 〉\",\"color\" : \"\",\"layer\" : 4,\"parent\" : \"\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {}},\"F184\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"diamond\",\"id\" : \"F184\",\"size\" : 2,\"title\" : \"〈 5,6,7,8 〉\",\"color\" : \"\",\"layer\" : 5,\"parent\" : \"\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {}},\"F185\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"diamond\",\"id\" : \"F185\",\"size\" : 2,\"title\" : \"〈 5,6,7,9 〉\",\"color\" : \"\",\"layer\" : 5,\"parent\" : \"\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {}},\"F186\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F186\",\"size\" : 2,\"title\" : \"〈 5,6,7 〉\",\"color\" : \"\",\"layer\" : 6,\"parent\" : \"\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {}},\"F187\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F187\",\"size\" : 2,\"title\" : \"〈 5,7,8,9,11 〉\",\"color\" : \"\",\"layer\" : 5,\"parent\" : \"\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {}},\"F188\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F188\",\"size\" : 2,\"title\" : \"〈 5,7,8,11 〉\",\"color\" : \"\",\"layer\" : 6,\"parent\" : \"\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {}},\"F189\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F189\",\"size\" : 2,\"title\" : \"〈 5,7,9,11,13 〉\",\"color\" : \"\",\"layer\" : 6,\"parent\" : \"\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {}},\"F190\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F190\",\"size\" : 2,\"title\" : \"〈 5,7,11,13 〉\",\"color\" : \"\",\"layer\" : 7,\"parent\" : \"\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {}}},\"links\" : {\"F191\" : {\"id\" : \"F191\",\"source\" : \"F177\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F176\"},\"F192\" : {\"id\" : \"F192\",\"source\" : \"F178\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F177\"},\"F193\" : {\"id\" : \"F193\",\"source\" : \"F179\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F177\"},\"F194\" : {\"id\" : \"F194\",\"source\" : \"F181\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F178\"},\"F195\" : {\"id\" : \"F195\",\"source\" : \"F180\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F179\"},\"F196\" : {\"id\" : \"F196\",\"source\" : \"F181\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F179\"},\"F197\" : {\"id\" : \"F197\",\"source\" : \"F183\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F180\"},\"F198\" : {\"id\" : \"F198\",\"source\" : \"F182\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F181\"},\"F199\" : {\"id\" : \"F199\",\"source\" : \"F183\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F181\"},\"F200\" : {\"id\" : \"F200\",\"source\" : \"F187\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F182\"},\"F201\" : {\"id\" : \"F201\",\"source\" : \"F184\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F183\"},\"F202\" : {\"id\" : \"F202\",\"source\" : \"F185\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F183\"},\"F203\" : {\"id\" : \"F203\",\"source\" : \"F187\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F183\"},\"F204\" : {\"id\" : \"F204\",\"source\" : \"F186\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F184\"},\"F205\" : {\"id\" : \"F205\",\"source\" : \"F188\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F184\"},\"F206\" : {\"id\" : \"F206\",\"source\" : \"F186\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F185\"},\"F207\" : {\"id\" : \"F207\",\"source\" : \"F189\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F185\"},\"F208\" : {\"id\" : \"F208\",\"source\" : \"F190\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F186\"},\"F209\" : {\"id\" : \"F209\",\"source\" : \"F188\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F187\"},\"F210\" : {\"id\" : \"F210\",\"source\" : \"F189\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F187\"},\"F211\" : {\"id\" : \"F211\",\"source\" : \"F190\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F188\"},\"F212\" : {\"id\" : \"F212\",\"source\" : \"F190\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F189\"}}},\"messages\" : {}}}" }, "execution_count": 11, "metadata": { "application/vnd.francy+json": {} }, "output_type": "execute_result" } ], "source": [ "s:=NumericalSemigroup(5,7,11,13);\n", "DrawOverSemigroupsNumericalSemigroup(s);" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Graphs" ] }, { "cell_type": "code", "execution_count": 12, "metadata": {}, "outputs": [{ "data": { "text/plain": [ "Numerical semigroup with 3 generators" ] }, "execution_count": 12, "metadata": { "text/plain": "" }, "output_type": "execute_result" }], "source": [ "s:=NumericalSemigroup(3,5,7);" ] }, { "cell_type": "code", "execution_count": 13, "metadata": {}, "outputs": [{ "data": { "text/plain": [ "[ [ 10, 0, 0 ], [ 5, 3, 0 ], [ 0, 6, 0 ], [ 6, 1, 1 ], [ 1, 4, 1 ], [ 2, 2, 2 ], [ 3, 0, 3 ] ]" ] }, "execution_count": 13, "metadata": { "text/plain": "" }, "output_type": "execute_result" }], "source": [ "f:=FactorizationsElementWRTNumericalSemigroup(30,s);" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## `DrawFactorizationGraph(f)`\n", "\n", "Draws the factorization graph of a set of factorizations `f`, the complete graph with vertices the elements of `f`. Labels are labeled with distances between the nodes they join. It also draws a minimal spanning tree (with minimal distances) and thus one can read the Catenary degree from this tree." ] }, { "cell_type": "code", "execution_count": 14, "metadata": {}, "outputs": [{ "data": { "application/vnd.francy+json": "{\"version\" : \"1.0.2\",\"mime\" : \"application\\/vnd.francy+json\",\"canvas\" : {\"width\" : 800,\"id\" : \"F241\",\"height\" : 600,\"title\" : \"Factorizations graph\",\"zoomToFit\" : true,\"texTypesetting\" : false,\"menus\" : {},\"graph\" : {\"type\" : \"undirected\",\"id\" : \"F214\",\"simulation\" : true,\"collapsed\" : true,\"nodes\" : {\"F215\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F215\",\"size\" : 1,\"title\" : \"(10,0,0)\",\"color\" : \"\",\"layer\" : 10,\"parent\" : \"\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {}},\"F216\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F216\",\"size\" : 1,\"title\" : \"(5,3,0)\",\"color\" : \"\",\"layer\" : 8,\"parent\" : \"\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {}},\"F217\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F217\",\"size\" : 1,\"title\" : \"(0,6,0)\",\"color\" : \"\",\"layer\" : 6,\"parent\" : \"\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {}},\"F218\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F218\",\"size\" : 1,\"title\" : \"(6,1,1)\",\"color\" : \"\",\"layer\" : 8,\"parent\" : \"\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {}},\"F219\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F219\",\"size\" : 1,\"title\" : \"(1,4,1)\",\"color\" : \"\",\"layer\" : 6,\"parent\" : \"\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {}},\"F220\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F220\",\"size\" : 1,\"title\" : \"(2,2,2)\",\"color\" : \"\",\"layer\" : 6,\"parent\" : \"\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {}},\"F221\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F221\",\"size\" : 1,\"title\" : \"(3,0,3)\",\"color\" : \"\",\"layer\" : 6,\"parent\" : \"\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {}}},\"links\" : {\"F222\" : {\"id\" : \"F222\",\"source\" : \"F216\",\"length\" : 0,\"weight\" : 0,\"title\" : \"2\",\"color\" : \"red\",\"invisible\" : false,\"target\" : \"F218\"},\"F223\" : {\"id\" : \"F223\",\"source\" : \"F217\",\"length\" : 0,\"weight\" : 0,\"title\" : \"2\",\"color\" : \"red\",\"invisible\" : false,\"target\" : \"F219\"},\"F224\" : {\"id\" : \"F224\",\"source\" : \"F219\",\"length\" : 0,\"weight\" : 0,\"title\" : \"2\",\"color\" : \"red\",\"invisible\" : false,\"target\" : \"F220\"},\"F225\" : {\"id\" : \"F225\",\"source\" : \"F220\",\"length\" : 0,\"weight\" : 0,\"title\" : \"2\",\"color\" : \"red\",\"invisible\" : false,\"target\" : \"F221\"},\"F226\" : {\"id\" : \"F226\",\"source\" : \"F215\",\"length\" : 0,\"weight\" : 0,\"title\" : \"4\",\"color\" : \"red\",\"invisible\" : false,\"target\" : \"F218\"},\"F227\" : {\"id\" : \"F227\",\"source\" : \"F216\",\"length\" : 0,\"weight\" : 0,\"title\" : \"4\",\"color\" : \"red\",\"invisible\" : false,\"target\" : \"F219\"},\"F228\" : {\"id\" : \"F228\",\"source\" : \"F216\",\"length\" : 0,\"weight\" : 0,\"title\" : \"4\",\"color\" : \"\",\"invisible\" : false,\"target\" : \"F220\"},\"F229\" : {\"id\" : \"F229\",\"source\" : \"F217\",\"length\" : 0,\"weight\" : 0,\"title\" : \"4\",\"color\" : \"\",\"invisible\" : false,\"target\" : \"F220\"},\"F230\" : {\"id\" : \"F230\",\"source\" : \"F218\",\"length\" : 0,\"weight\" : 0,\"title\" : \"4\",\"color\" : \"\",\"invisible\" : false,\"target\" : \"F220\"},\"F231\" : {\"id\" : \"F231\",\"source\" : \"F218\",\"length\" : 0,\"weight\" : 0,\"title\" : \"4\",\"color\" : \"\",\"invisible\" : false,\"target\" : \"F221\"},\"F232\" : {\"id\" : \"F232\",\"source\" : \"F219\",\"length\" : 0,\"weight\" : 0,\"title\" : \"4\",\"color\" : \"\",\"invisible\" : false,\"target\" : \"F221\"},\"F233\" : {\"id\" : \"F233\",\"source\" : \"F215\",\"length\" : 0,\"weight\" : 0,\"title\" : \"5\",\"color\" : \"\",\"invisible\" : false,\"target\" : \"F216\"},\"F234\" : {\"id\" : \"F234\",\"source\" : \"F216\",\"length\" : 0,\"weight\" : 0,\"title\" : \"5\",\"color\" : \"\",\"invisible\" : false,\"target\" : \"F217\"},\"F235\" : {\"id\" : \"F235\",\"source\" : \"F216\",\"length\" : 0,\"weight\" : 0,\"title\" : \"5\",\"color\" : \"\",\"invisible\" : false,\"target\" : \"F221\"},\"F236\" : {\"id\" : \"F236\",\"source\" : \"F218\",\"length\" : 0,\"weight\" : 0,\"title\" : \"5\",\"color\" : \"\",\"invisible\" : false,\"target\" : \"F219\"},\"F237\" : {\"id\" : \"F237\",\"source\" : \"F215\",\"length\" : 0,\"weight\" : 0,\"title\" : \"7\",\"color\" : \"\",\"invisible\" : false,\"target\" : \"F221\"},\"F238\" : {\"id\" : \"F238\",\"source\" : \"F217\",\"length\" : 0,\"weight\" : 0,\"title\" : \"7\",\"color\" : \"\",\"invisible\" : false,\"target\" : \"F218\"},\"F239\" : {\"id\" : \"F239\",\"source\" : \"F215\",\"length\" : 0,\"weight\" : 0,\"title\" : \"8\",\"color\" : \"\",\"invisible\" : false,\"target\" : \"F220\"},\"F240\" : {\"id\" : \"F240\",\"source\" : \"F215\",\"length\" : 0,\"weight\" : 0,\"title\" : \"9\",\"color\" : \"\",\"invisible\" : false,\"target\" : \"F219\"}}},\"messages\" : {}}}" }, "execution_count": 14, "metadata": { "application/vnd.francy+json": {} }, "output_type": "execute_result" }], "source": [ "DrawFactorizationGraph(f);" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## `DrawEliahouGraph(f)`\n", "\n", "Draws the Eliahou's graph associated to the set of factorizations `f`. The vertices of the graph are the elements in `f`, and two vertices are joined with an edge if they have common support. " ] }, { "cell_type": "code", "execution_count": 15, "metadata": {}, "outputs": [{ "data": { "application/vnd.francy+json": "{\"version\" : \"1.0.2\",\"mime\" : \"application\\/vnd.francy+json\",\"canvas\" : {\"width\" : 800,\"id\" : \"F269\",\"height\" : 600,\"title\" : \"Eliahou graph\",\"zoomToFit\" : true,\"texTypesetting\" : false,\"menus\" : {},\"graph\" : {\"type\" : \"undirected\",\"id\" : \"F242\",\"simulation\" : true,\"collapsed\" : true,\"nodes\" : {\"F243\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F243\",\"size\" : 1,\"title\" : \"(10,0,0)\",\"color\" : \"\",\"layer\" : 10,\"parent\" : \"\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {}},\"F244\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F244\",\"size\" : 1,\"title\" : \"(5,3,0)\",\"color\" : \"\",\"layer\" : 8,\"parent\" : \"\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {}},\"F245\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F245\",\"size\" : 1,\"title\" : \"(0,6,0)\",\"color\" : \"\",\"layer\" : 6,\"parent\" : \"\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {}},\"F246\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F246\",\"size\" : 1,\"title\" : \"(6,1,1)\",\"color\" : \"\",\"layer\" : 8,\"parent\" : \"\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {}},\"F247\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F247\",\"size\" : 1,\"title\" : \"(1,4,1)\",\"color\" : \"\",\"layer\" : 6,\"parent\" : \"\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {}},\"F248\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F248\",\"size\" : 1,\"title\" : \"(2,2,2)\",\"color\" : \"\",\"layer\" : 6,\"parent\" : \"\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {}},\"F249\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F249\",\"size\" : 1,\"title\" : \"(3,0,3)\",\"color\" : \"\",\"layer\" : 6,\"parent\" : \"\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {}}},\"links\" : {\"F250\" : {\"id\" : \"F250\",\"source\" : \"F243\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F244\"},\"F251\" : {\"id\" : \"F251\",\"source\" : \"F243\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F246\"},\"F252\" : {\"id\" : \"F252\",\"source\" : \"F243\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F247\"},\"F253\" : {\"id\" : \"F253\",\"source\" : \"F243\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F248\"},\"F254\" : {\"id\" : \"F254\",\"source\" : \"F243\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F249\"},\"F255\" : {\"id\" : \"F255\",\"source\" : \"F244\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F245\"},\"F256\" : {\"id\" : \"F256\",\"source\" : \"F244\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F246\"},\"F257\" : {\"id\" : \"F257\",\"source\" : \"F244\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F247\"},\"F258\" : {\"id\" : \"F258\",\"source\" : \"F244\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F248\"},\"F259\" : {\"id\" : \"F259\",\"source\" : \"F244\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F249\"},\"F260\" : {\"id\" : \"F260\",\"source\" : \"F245\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F246\"},\"F261\" : {\"id\" : \"F261\",\"source\" : \"F245\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F247\"},\"F262\" : {\"id\" : \"F262\",\"source\" : \"F245\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F248\"},\"F263\" : {\"id\" : \"F263\",\"source\" : \"F246\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F247\"},\"F264\" : {\"id\" : \"F264\",\"source\" : \"F246\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F248\"},\"F265\" : {\"id\" : \"F265\",\"source\" : \"F246\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F249\"},\"F266\" : {\"id\" : \"F266\",\"source\" : \"F247\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F248\"},\"F267\" : {\"id\" : \"F267\",\"source\" : \"F247\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F249\"},\"F268\" : {\"id\" : \"F268\",\"source\" : \"F248\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F249\"}}},\"messages\" : {}}}" }, "execution_count": 15, "metadata": { "application/vnd.francy+json": {} }, "output_type": "execute_result" }], "source": [ "DrawEliahouGraph(f);" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## `DrawRosalesGraph(n,s)`\n", "\n", "Draws the Rosales graph associated to `n` in `s`. The semigroup `s` can be either a numerical or an affine semigroup. The vertices of the graph are the minimal generators `a` of `s` such that `n-a` is in `s`, and edges are pairs `ab` such that `n-(a+b)` is in `s`." ] }, { "cell_type": "code", "execution_count": 16, "metadata": {}, "outputs": [{ "data": { "application/vnd.francy+json": "{\"version\" : \"1.0.2\",\"mime\" : \"application\\/vnd.francy+json\",\"canvas\" : {\"width\" : 800,\"id\" : \"F275\",\"height\" : 600,\"title\" : \"Rosales graph\",\"zoomToFit\" : true,\"texTypesetting\" : false,\"menus\" : {},\"graph\" : {\"type\" : \"undirected\",\"id\" : \"F270\",\"simulation\" : true,\"collapsed\" : true,\"nodes\" : {\"F271\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F271\",\"size\" : 1,\"title\" : \"3\",\"color\" : \"\",\"layer\" : 0,\"parent\" : \"\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {}},\"F272\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F272\",\"size\" : 1,\"title\" : \"5\",\"color\" : \"\",\"layer\" : 0,\"parent\" : \"\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {}},\"F273\" : {\"x\" : 0,\"y\" : 0,\"type\" : \"circle\",\"id\" : \"F273\",\"size\" : 1,\"title\" : \"7\",\"color\" : \"\",\"layer\" : 0,\"parent\" : \"\",\"menus\" : {},\"messages\" : {},\"callbacks\" : {}}},\"links\" : {\"F274\" : {\"id\" : \"F274\",\"source\" : \"F271\",\"length\" : 0,\"weight\" : 0,\"color\" : \"\",\"invisible\" : false,\"target\" : \"F273\"}}},\"messages\" : {}}}" }, "execution_count": 16, "metadata": { "application/vnd.francy+json": {} }, "output_type": "execute_result" }], "source": [ "DrawRosalesGraph(10,s);" ] }, { "cell_type": "code", "execution_count": 17, "metadata": {}, "outputs": [{ "data": { "text/plain": [ "[ 10, 12, 14 ]" ] }, "execution_count": 17, "metadata": { "text/plain": "" }, "output_type": "execute_result" }], "source": [ "BettiElements(s);" ] } ], "metadata": { "kernelspec": { "display_name": "GAP 4 (native)", "language": "gap", "name": "gap-native" }, "language_info": { "codemirror_mode": "gap", "file_extension": ".g", "mimetype": "text/x-gap", "name": "GAP (native)", "nbconvert_exporter": "", "pygments_lexer": "gap", "version": "4.dev" } }, "nbformat": 4, "nbformat_minor": 2 }