{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "\"drawing\"\n", "

Experimental Mathematics Using SageMath — AIMS-ZA-2024-25

\n", " \n", "\n", "## Instructor: \n", "\n", "* **Evans Ocansey**" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "****\n", "\n", "\n", "< [2. Review of Python programming](ems_2020_day_02_short_review_on_python_programming.ipynb)|[Table of contents](ems_2020_table_of_contents.ipynb) | [4. Rethinking Problems](ems_2020_day_04__rethinking_problems.ipynb) >\n", "\n", "\n", "****" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Day 02 — The Frobenius number — Starting to Program \n", "\n", "[comment]: <> (

Day 02 — Introduction to SageMath: A Mathematics Software for All

)\n", "\n", "\n", "\n", "\n", "The outline of the this notebook is as follows:" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Table of Contents: \n", "* [ ] [Exploration Question ](#exploration-question)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Exploration Question: \n", "\n", "\n", "Suppose you have coins of value $a$ cents and $b$ cents. What amounts of money can you get by combining these?\n", "\n", "Q: Can you think of how to formulate our question mathematically? \n", "\n", "A: Given positive integers $a$ and $b$, for which positive integers $m$ does there exist non-negative integers $x$ and $y$ such that $m=a\\,x+b\\,y$?\n", " \n", " \n", "We will solve this problem by first trying some easy cases such as $a=2$, $b=3$, or $a=3$, $b=4$, or $a=3$, $b=6$ to begin. We will explore the first two cases $a=2$, $b=3$, and $a=3, b=4$, together so everyone get an idea of what we are doing. We will then group ourselves in small groups to explore more cases. " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "As we shall discover in our exploration, when there is such an $c$, there is also an $M$ such that for all $m$ greater than or equal to $c$ will also work, but $c-1$ does not. We will call $c$ the **conductor** of the set $\\{a, b\\}$ and $c-1$ as the **Frobenius number**. (The problem is known as the Frobenius problem or the coin problem as well.) " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The **conductor** of two positive integers $a, b$ is the smallest integer $c$ such that all $m$ greater than or equal to $c$ can be written as $m = a\\,x + b\\,y$. \n", "\n", "The **Frobenius** number of two positive integers $a,\\,b$ is the largest integer $f$ such that there do not exist positive integers $x$ and $y$ with $f = a\\,x + b\\,y$. \n", "\n", "Given the set $\\{a,\\,b\\}$ where $a,\\,b \\in \\mathbb{Z}_{>0}$, we donote $c_{\\{a,\\,b\\}}$ and $f_{\\{a,\\,b\\}}$ to be the conductor and the frobenius number for the set $\\{a,\\,b\\}$ respectively." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Yesterday, you we tried these cases together \n", " - $a = 2$, $b = 3$;\n", " - $a = 3$, $b = 6$;\n", " - $a = 3$, $b = 4$;\n", "\n", "and you were supposed to try the other cases and report on them. How did it go? Can someone share his or her result with us? \n", "\n", "\n", "If some of you had a difficult time doing this we will try these cases \n", "\n", " - $a=2$, $b=3$; and \n", " - $a=3$, $b=4$ \n", " \n", "together. Then you will explore the cases \n", "\n", " - $a = 3$, $b = 6$ and \n", " - $a = 2$ and $b = 4$.\n", "\n", "Note that, what I will be illustrating below, is **NOT** the only method to explore this problem. With that said, let us try the first case.\n", "\n", "Suppose we are given $2$ cents and $3$ cents. How can I encode this in *SageMath* or *Python*? Any suggestions?" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "# Hint: Variables and the assignment operator\n", "\n", "a = 2; b = 3" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Our goal in this exploration, is to find the **conductor** $c$, and the **Frobenius number** $f$. From the introductory section of this notebook, the **Frobenius number** $f_{\\{a,\\,b\\}}$ and the conductor $c_{\\{a,\\,b\\}}$ of the set $\\{a, b\\}$ of positive integers is given by the relation: \n", "\n", "$$f_{\\{a,\\,b\\}} = c_{\\{a,\\,b\\}} - 1.$$" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "If we are given $2$ cents and $3$ cents, then the possible cents we can get it given by $2\\,x + 3\\,y$, where $x$ and $y$ are non-negative integers. How can we encode this in *SageMath* or *Python*?" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "# Hint: Functions\n", "\n", "def possible_cents(a = 2, b = 3, bound = 2):\n", " r\"\"\"\n", " Returns a finite number of positive integers $m = a\\,x + b\\,y$ with $x, \\, y \\in\\mathbb{Z}_{\\ge0}$. \n", " \"\"\"\n", " # Initialise all_possible_cents to be the empty list\n", " all_possible_cents = list() # all_possible_cents = []\n", " for x in [0..bound]:\n", " for y in [0..bound]:\n", " all_possible_cents.append(a * x + b * y)\n", " return sorted(all_possible_cents) # all_possible_cents.sort() this will return None." ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "[1, 3, 7, 2]" ] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "l = [1, 3, 7, 2]; l" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "s = l.sort(); type(s)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Let us test some cases with our *SageMath* or *Python* function. We only need to change the value of the parameter `bound`. Recall that our goal is to find either the conductor, $c_{\\{a,\\,b\\}}$ or the frobenius number $f_{\\{a,\\,b\\}}$ and by the relation above, it is enough to know only one of them." ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "[0, 2, 3, 4, 5, 6, 7, 8, 10]" ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "possible_cents() # The default case" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Given the output of the cell above, can you guess the Frobenius number $f_{\\{2,\\,3\\}}$ or the conductor $c_{\\{2,\\,3\\}}$?" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "9" ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "guess_frobenius_number = 9; guess_frobenius_number" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "10" ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "guess_conductor = guess_frobenius_number + 1; guess_conductor" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Let us try another case, by setting the parameter `bound` to be $4$." ] }, { "cell_type": "code", "execution_count": 8, "metadata": { "scrolled": true }, "outputs": [ { "data": { "text/plain": [ "[0,\n", " 2,\n", " 3,\n", " 4,\n", " 5,\n", " 6,\n", " 6,\n", " 7,\n", " 8,\n", " 8,\n", " 9,\n", " 9,\n", " 10,\n", " 11,\n", " 11,\n", " 12,\n", " 12,\n", " 13,\n", " 14,\n", " 14,\n", " 15,\n", " 16,\n", " 17,\n", " 18,\n", " 20]" ] }, "execution_count": 8, "metadata": {}, "output_type": "execute_result" } ], "source": [ "possible_cents(bound = 4) " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Hmmm, it seems the output is covers much of my screen. I can use the `table` function in *SageMath*." ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "
\\(0\\)\\(2\\)\\(3\\)\\(4\\)\\(5\\)\\(6\\)\\(6\\)\\(7\\)\\(8\\)\\(8\\)\\(9\\)\\(9\\)\\(10\\)\\(11\\)\\(11\\)\\(12\\)\\(12\\)\\(13\\)\\(14\\)\\(14\\)\\(15\\)\\(16\\)\\(17\\)\\(18\\)\\(20\\)
\n", "
" ], "text/plain": [ " 0 2 3 4 5 6 6 7 8 8 9 9 10 11 11 12 12 13 14 14 15 16 17 18 20" ] }, "execution_count": 9, "metadata": {}, "output_type": "execute_result" } ], "source": [ "table(_)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "From the output of the table, does our the values of `guess_frobenius_number` and `guess_conductor` change? Did you observe anything?" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "If the frobenius number is $19$, then you are saying $19$ can not be written as $19 = 2\\,x + 3\\,y$. Is this true? If not why?" ] }, { "cell_type": "code", "execution_count": 10, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "1" ] }, "execution_count": 10, "metadata": {}, "output_type": "execute_result" } ], "source": [ "guess_frobenius_number = 1; guess_frobenius_number" ] }, { "cell_type": "code", "execution_count": 11, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "2" ] }, "execution_count": 11, "metadata": {}, "output_type": "execute_result" } ], "source": [ "guess_conductor = guess_frobenius_number + 1; guess_conductor" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Let us try another case. " ] }, { "cell_type": "code", "execution_count": 12, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "
\\(0\\)\\(2\\)\\(3\\)\\(4\\)\\(5\\)\\(6\\)\\(6\\)\\(7\\)\\(8\\)\\(8\\)\\(9\\)\\(9\\)\\(10\\)\\(10\\)\\(11\\)\\(11\\)\\(12\\)\\(12\\)\\(12\\)\\(13\\)\\(13\\)\\(14\\)\\(14\\)\\(14\\)\\(15\\)\\(15\\)\\(15\\)\\(16\\)\\(16\\)\\(16\\)\\(17\\)\\(17\\)\\(17\\)\\(18\\)\\(18\\)\\(18\\)\\(18\\)\\(19\\)\\(19\\)\\(19\\)\\(20\\)\\(20\\)\\(20\\)\\(20\\)\\(21\\)\\(21\\)\\(21\\)\\(21\\)\\(22\\)\\(22\\)\\(22\\)\\(22\\)\\(23\\)\\(23\\)\\(23\\)\\(23\\)\\(24\\)\\(24\\)\\(24\\)\\(24\\)\\(24\\)\\(25\\)\\(25\\)\\(25\\)\\(25\\)\\(26\\)\\(26\\)\\(26\\)\\(26\\)\\(26\\)\\(27\\)\\(27\\)\\(27\\)\\(27\\)\\(27\\)\\(28\\)\\(28\\)\\(28\\)\\(28\\)\\(28\\)\\(29\\)\\(29\\)\\(29\\)\\(29\\)\\(29\\)\\(30\\)\\(30\\)\\(30\\)\\(30\\)\\(30\\)\\(30\\)\\(31\\)\\(31\\)\\(31\\)\\(31\\)\\(31\\)\\(32\\)\\(32\\)\\(32\\)\\(32\\)\\(32\\)\\(32\\)\\(33\\)\\(33\\)\\(33\\)\\(33\\)\\(33\\)\\(33\\)\\(34\\)\\(34\\)\\(34\\)\\(34\\)\\(34\\)\\(34\\)\\(35\\)\\(35\\)\\(35\\)\\(35\\)\\(35\\)\\(35\\)\\(36\\)\\(36\\)\\(36\\)\\(36\\)\\(36\\)\\(36\\)\\(36\\)\\(37\\)\\(37\\)\\(37\\)\\(37\\)\\(37\\)\\(37\\)\\(38\\)\\(38\\)\\(38\\)\\(38\\)\\(38\\)\\(38\\)\\(38\\)\\(39\\)\\(39\\)\\(39\\)\\(39\\)\\(39\\)\\(39\\)\\(39\\)\\(40\\)\\(40\\)\\(40\\)\\(40\\)\\(40\\)\\(40\\)\\(40\\)\\(41\\)\\(41\\)\\(41\\)\\(41\\)\\(41\\)\\(41\\)\\(41\\)\\(42\\)\\(42\\)\\(42\\)\\(42\\)\\(42\\)\\(42\\)\\(42\\)\\(43\\)\\(43\\)\\(43\\)\\(43\\)\\(43\\)\\(43\\)\\(43\\)\\(44\\)\\(44\\)\\(44\\)\\(44\\)\\(44\\)\\(44\\)\\(44\\)\\(45\\)\\(45\\)\\(45\\)\\(45\\)\\(45\\)\\(45\\)\\(45\\)\\(46\\)\\(46\\)\\(46\\)\\(46\\)\\(46\\)\\(46\\)\\(46\\)\\(47\\)\\(47\\)\\(47\\)\\(47\\)\\(47\\)\\(47\\)\\(47\\)\\(48\\)\\(48\\)\\(48\\)\\(48\\)\\(48\\)\\(48\\)\\(48\\)\\(49\\)\\(49\\)\\(49\\)\\(49\\)\\(49\\)\\(49\\)\\(49\\)\\(50\\)\\(50\\)\\(50\\)\\(50\\)\\(50\\)\\(50\\)\\(50\\)\\(51\\)\\(51\\)\\(51\\)\\(51\\)\\(51\\)\\(51\\)\\(51\\)\\(52\\)\\(52\\)\\(52\\)\\(52\\)\\(52\\)\\(52\\)\\(52\\)\\(53\\)\\(53\\)\\(53\\)\\(53\\)\\(53\\)\\(53\\)\\(53\\)\\(54\\)\\(54\\)\\(54\\)\\(54\\)\\(54\\)\\(54\\)\\(54\\)\\(55\\)\\(55\\)\\(55\\)\\(55\\)\\(55\\)\\(55\\)\\(55\\)\\(56\\)\\(56\\)\\(56\\)\\(56\\)\\(56\\)\\(56\\)\\(56\\)\\(57\\)\\(57\\)\\(57\\)\\(57\\)\\(57\\)\\(57\\)\\(57\\)\\(58\\)\\(58\\)\\(58\\)\\(58\\)\\(58\\)\\(58\\)\\(58\\)\\(59\\)\\(59\\)\\(59\\)\\(59\\)\\(59\\)\\(59\\)\\(59\\)\\(60\\)\\(60\\)\\(60\\)\\(60\\)\\(60\\)\\(60\\)\\(60\\)\\(61\\)\\(61\\)\\(61\\)\\(61\\)\\(61\\)\\(61\\)\\(61\\)\\(62\\)\\(62\\)\\(62\\)\\(62\\)\\(62\\)\\(62\\)\\(62\\)\\(63\\)\\(63\\)\\(63\\)\\(63\\)\\(63\\)\\(63\\)\\(64\\)\\(64\\)\\(64\\)\\(64\\)\\(64\\)\\(64\\)\\(64\\)\\(65\\)\\(65\\)\\(65\\)\\(65\\)\\(65\\)\\(65\\)\\(66\\)\\(66\\)\\(66\\)\\(66\\)\\(66\\)\\(66\\)\\(67\\)\\(67\\)\\(67\\)\\(67\\)\\(67\\)\\(67\\)\\(68\\)\\(68\\)\\(68\\)\\(68\\)\\(68\\)\\(68\\)\\(69\\)\\(69\\)\\(69\\)\\(69\\)\\(69\\)\\(70\\)\\(70\\)\\(70\\)\\(70\\)\\(70\\)\\(70\\)\\(71\\)\\(71\\)\\(71\\)\\(71\\)\\(71\\)\\(72\\)\\(72\\)\\(72\\)\\(72\\)\\(72\\)\\(73\\)\\(73\\)\\(73\\)\\(73\\)\\(73\\)\\(74\\)\\(74\\)\\(74\\)\\(74\\)\\(74\\)\\(75\\)\\(75\\)\\(75\\)\\(75\\)\\(76\\)\\(76\\)\\(76\\)\\(76\\)\\(76\\)\\(77\\)\\(77\\)\\(77\\)\\(77\\)\\(78\\)\\(78\\)\\(78\\)\\(78\\)\\(79\\)\\(79\\)\\(79\\)\\(79\\)\\(80\\)\\(80\\)\\(80\\)\\(80\\)\\(81\\)\\(81\\)\\(81\\)\\(82\\)\\(82\\)\\(82\\)\\(82\\)\\(83\\)\\(83\\)\\(83\\)\\(84\\)\\(84\\)\\(84\\)\\(85\\)\\(85\\)\\(85\\)\\(86\\)\\(86\\)\\(86\\)\\(87\\)\\(87\\)\\(88\\)\\(88\\)\\(88\\)\\(89\\)\\(89\\)\\(90\\)\\(90\\)\\(91\\)\\(91\\)\\(92\\)\\(92\\)\\(93\\)\\(94\\)\\(94\\)\\(95\\)\\(96\\)\\(97\\)\\(98\\)\\(100\\)
\n", "
" ], "text/plain": [ " 0 2 3 4 5 6 6 7 8 8 9 9 10 10 11 11 12 12 12 13 13 14 14 14 15 15 15 16 16 16 17 17 17 18 18 18 18 19 19 19 20 20 20 20 21 21 21 21 22 22 22 22 23 23 23 23 24 24 24 24 24 25 25 25 25 26 26 26 26 26 27 27 27 27 27 28 28 28 28 28 29 29 29 29 29 30 30 30 30 30 30 31 31 31 31 31 32 32 32 32 32 32 33 33 33 33 33 33 34 34 34 34 34 34 35 35 35 35 35 35 36 36 36 36 36 36 36 37 37 37 37 37 37 38 38 38 38 38 38 38 39 39 39 39 39 39 39 40 40 40 40 40 40 40 41 41 41 41 41 41 41 42 42 42 42 42 42 42 43 43 43 43 43 43 43 44 44 44 44 44 44 44 45 45 45 45 45 45 45 46 46 46 46 46 46 46 47 47 47 47 47 47 47 48 48 48 48 48 48 48 49 49 49 49 49 49 49 50 50 50 50 50 50 50 51 51 51 51 51 51 51 52 52 52 52 52 52 52 53 53 53 53 53 53 53 54 54 54 54 54 54 54 55 55 55 55 55 55 55 56 56 56 56 56 56 56 57 57 57 57 57 57 57 58 58 58 58 58 58 58 59 59 59 59 59 59 59 60 60 60 60 60 60 60 61 61 61 61 61 61 61 62 62 62 62 62 62 62 63 63 63 63 63 63 64 64 64 64 64 64 64 65 65 65 65 65 65 66 66 66 66 66 66 67 67 67 67 67 67 68 68 68 68 68 68 69 69 69 69 69 70 70 70 70 70 70 71 71 71 71 71 72 72 72 72 72 73 73 73 73 73 74 74 74 74 74 75 75 75 75 76 76 76 76 76 77 77 77 77 78 78 78 78 79 79 79 79 80 80 80 80 81 81 81 82 82 82 82 83 83 83 84 84 84 85 85 85 86 86 86 87 87 88 88 88 89 89 90 90 91 91 92 92 93 94 94 95 96 97 98 100" ] }, "execution_count": 12, "metadata": {}, "output_type": "execute_result" } ], "source": [ "table(possible_cents(bound = 20))" ] }, { "cell_type": "code", "execution_count": 13, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "
\\(0\\)\\(2\\)\\(3\\)\\(4\\)\\(5\\)\\(6\\)\\(7\\)\\(8\\)\\(9\\)\\(10\\)\\(11\\)\\(12\\)\\(13\\)\\(14\\)\\(15\\)\\(16\\)\\(17\\)\\(18\\)\\(19\\)\\(20\\)\\(21\\)\\(22\\)\\(23\\)\\(24\\)\\(25\\)\\(26\\)\\(27\\)\\(28\\)\\(29\\)\\(30\\)\\(31\\)\\(32\\)\\(33\\)\\(34\\)\\(35\\)\\(36\\)\\(37\\)\\(38\\)\\(39\\)\\(40\\)\\(41\\)\\(42\\)\\(43\\)\\(44\\)\\(45\\)\\(46\\)\\(47\\)\\(48\\)\\(49\\)\\(50\\)\\(51\\)\\(52\\)\\(53\\)\\(54\\)\\(55\\)\\(56\\)\\(57\\)\\(58\\)\\(59\\)\\(60\\)\\(61\\)\\(62\\)\\(63\\)\\(64\\)\\(65\\)\\(66\\)\\(67\\)\\(68\\)\\(69\\)\\(70\\)\\(71\\)\\(72\\)\\(73\\)\\(74\\)\\(75\\)\\(76\\)\\(77\\)\\(78\\)\\(79\\)\\(80\\)\\(81\\)\\(82\\)\\(83\\)\\(84\\)\\(85\\)\\(86\\)\\(87\\)\\(88\\)\\(89\\)\\(90\\)\\(91\\)\\(92\\)\\(93\\)\\(94\\)\\(95\\)\\(96\\)\\(97\\)\\(98\\)\\(100\\)
\n", "
" ], "text/plain": [ " 0 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 100" ] }, "execution_count": 13, "metadata": {}, "output_type": "execute_result" } ], "source": [ "table(list(set(possible_cents(bound = 20))))" ] }, { "cell_type": "code", "execution_count": 14, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "1" ] }, "execution_count": 14, "metadata": {}, "output_type": "execute_result" } ], "source": [ "guess_frobenius_number = 1; guess_frobenius_number" ] }, { "cell_type": "code", "execution_count": 15, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "2" ] }, "execution_count": 15, "metadata": {}, "output_type": "execute_result" } ], "source": [ "guess_conductor = guess_frobenius_number + 1; guess_conductor" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Observing the data from our exploration, it is very likely that the frobenius number $f_{\\{2,\\,3\\}}$ and the conductor $c_{\\{2,\\,3\\}}$ of the set $\\{2,\\,3\\}$ are $1$ and $2$ respectively." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "###### Conjecture\n", "\n", "If $a = 2$, and $b = 3$, then the frobenius number $f_{\\{a,\\,b\\}}$ and the conductor $c_{\\{a,\\,b\\}}$ of the set $\\{a,\\,b\\}$ is given by $1$ and $2$ respectively.\n", "\n", "Note that this is just a *conjecture* and **NOT** a *theorem* because we have not proved it." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Let us keep a record of our results and put them in a table form." ] }, { "cell_type": "code", "execution_count": 16, "metadata": {}, "outputs": [], "source": [ "coin_problem_known_answers = [[(2, 3), 1, 2, 1]]" ] }, { "cell_type": "code", "execution_count": 17, "metadata": {}, "outputs": [], "source": [ "my_table_header = [r\"$\\{a,\\,b\\}$\", r\"$f_{\\{a,\\,b\\}}$\", r\"$c_{\\{a,\\,b\\}}$\", \"number not possible\"]" ] }, { "cell_type": "code", "execution_count": 18, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "
\\(\\{a,\\,b\\}\\)\\(f_{\\{a,\\,b\\}}\\)\\(c_{\\{a,\\,b\\}}\\)number not possible
\\(\\left(2, 3\\right)\\)\\(1\\)\\(2\\)\\(1\\)
\n", "
" ], "text/plain": [ " $\\{a,\\,b\\}$ $f_{\\{a,\\,b\\}}$ $c_{\\{a,\\,b\\}}$ number not possible\n", "├─────────────┼─────────────────┼─────────────────┼─────────────────────┤\n", " (2, 3) 1 2 1" ] }, "execution_count": 18, "metadata": {}, "output_type": "execute_result" } ], "source": [ "table(coin_problem_known_answers, header_row = my_table_header)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Hopefully what we have done so far should be clear to you now. If you get the understanding now and you wish to explore the case $a = 3$ and $b = 6$ or $ a = 3$ and $b = 4$ all by yourself, that will be good. Otherwise, we can try the case $a = 3$ and $b = 4$ together. " ] }, { "cell_type": "code", "execution_count": 19, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "[0, 3, 4, 6, 7, 8, 10, 11, 14]" ] }, "execution_count": 19, "metadata": {}, "output_type": "execute_result" } ], "source": [ "possible_cents(a = 3, b = 4)" ] }, { "cell_type": "code", "execution_count": 20, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "
\\(0\\)\\(3\\)\\(4\\)\\(6\\)\\(7\\)\\(8\\)\\(9\\)\\(10\\)\\(11\\)\\(12\\)\\(12\\)\\(13\\)\\(14\\)\\(15\\)\\(16\\)\\(16\\)\\(17\\)\\(18\\)\\(19\\)\\(20\\)\\(21\\)\\(22\\)\\(24\\)\\(25\\)\\(28\\)
\n", "
" ], "text/plain": [ " 0 3 4 6 7 8 9 10 11 12 12 13 14 15 16 16 17 18 19 20 21 22 24 25 28" ] }, "execution_count": 20, "metadata": {}, "output_type": "execute_result" } ], "source": [ "table(possible_cents(a = 3, b = 4, bound = 4))" ] }, { "cell_type": "code", "execution_count": 21, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "
\\(0\\)\\(3\\)\\(4\\)\\(6\\)\\(7\\)\\(8\\)\\(9\\)\\(10\\)\\(11\\)\\(12\\)\\(12\\)\\(13\\)\\(14\\)\\(15\\)\\(15\\)\\(16\\)\\(16\\)\\(17\\)\\(18\\)\\(18\\)\\(19\\)\\(19\\)\\(20\\)\\(20\\)\\(21\\)\\(21\\)\\(22\\)\\(22\\)\\(23\\)\\(23\\)\\(24\\)\\(24\\)\\(24\\)\\(25\\)\\(25\\)\\(26\\)\\(26\\)\\(27\\)\\(27\\)\\(27\\)\\(28\\)\\(28\\)\\(28\\)\\(29\\)\\(29\\)\\(30\\)\\(30\\)\\(30\\)\\(31\\)\\(31\\)\\(31\\)\\(32\\)\\(32\\)\\(32\\)\\(33\\)\\(33\\)\\(33\\)\\(34\\)\\(34\\)\\(34\\)\\(35\\)\\(35\\)\\(35\\)\\(36\\)\\(36\\)\\(36\\)\\(36\\)\\(37\\)\\(37\\)\\(37\\)\\(38\\)\\(38\\)\\(38\\)\\(39\\)\\(39\\)\\(39\\)\\(39\\)\\(40\\)\\(40\\)\\(40\\)\\(40\\)\\(41\\)\\(41\\)\\(41\\)\\(42\\)\\(42\\)\\(42\\)\\(42\\)\\(43\\)\\(43\\)\\(43\\)\\(43\\)\\(44\\)\\(44\\)\\(44\\)\\(44\\)\\(45\\)\\(45\\)\\(45\\)\\(45\\)\\(46\\)\\(46\\)\\(46\\)\\(46\\)\\(47\\)\\(47\\)\\(47\\)\\(47\\)\\(48\\)\\(48\\)\\(48\\)\\(48\\)\\(48\\)\\(49\\)\\(49\\)\\(49\\)\\(49\\)\\(50\\)\\(50\\)\\(50\\)\\(50\\)\\(51\\)\\(51\\)\\(51\\)\\(51\\)\\(51\\)\\(52\\)\\(52\\)\\(52\\)\\(52\\)\\(52\\)\\(53\\)\\(53\\)\\(53\\)\\(53\\)\\(54\\)\\(54\\)\\(54\\)\\(54\\)\\(54\\)\\(55\\)\\(55\\)\\(55\\)\\(55\\)\\(55\\)\\(56\\)\\(56\\)\\(56\\)\\(56\\)\\(56\\)\\(57\\)\\(57\\)\\(57\\)\\(57\\)\\(57\\)\\(58\\)\\(58\\)\\(58\\)\\(58\\)\\(58\\)\\(59\\)\\(59\\)\\(59\\)\\(59\\)\\(59\\)\\(60\\)\\(60\\)\\(60\\)\\(60\\)\\(60\\)\\(60\\)\\(61\\)\\(61\\)\\(61\\)\\(61\\)\\(61\\)\\(62\\)\\(62\\)\\(62\\)\\(62\\)\\(62\\)\\(63\\)\\(63\\)\\(63\\)\\(63\\)\\(63\\)\\(64\\)\\(64\\)\\(64\\)\\(64\\)\\(64\\)\\(64\\)\\(65\\)\\(65\\)\\(65\\)\\(65\\)\\(65\\)\\(66\\)\\(66\\)\\(66\\)\\(66\\)\\(66\\)\\(67\\)\\(67\\)\\(67\\)\\(67\\)\\(67\\)\\(68\\)\\(68\\)\\(68\\)\\(68\\)\\(68\\)\\(68\\)\\(69\\)\\(69\\)\\(69\\)\\(69\\)\\(69\\)\\(70\\)\\(70\\)\\(70\\)\\(70\\)\\(70\\)\\(71\\)\\(71\\)\\(71\\)\\(71\\)\\(71\\)\\(72\\)\\(72\\)\\(72\\)\\(72\\)\\(72\\)\\(72\\)\\(73\\)\\(73\\)\\(73\\)\\(73\\)\\(73\\)\\(74\\)\\(74\\)\\(74\\)\\(74\\)\\(74\\)\\(75\\)\\(75\\)\\(75\\)\\(75\\)\\(75\\)\\(76\\)\\(76\\)\\(76\\)\\(76\\)\\(76\\)\\(76\\)\\(77\\)\\(77\\)\\(77\\)\\(77\\)\\(77\\)\\(78\\)\\(78\\)\\(78\\)\\(78\\)\\(78\\)\\(79\\)\\(79\\)\\(79\\)\\(79\\)\\(79\\)\\(80\\)\\(80\\)\\(80\\)\\(80\\)\\(80\\)\\(80\\)\\(81\\)\\(81\\)\\(81\\)\\(81\\)\\(81\\)\\(82\\)\\(82\\)\\(82\\)\\(82\\)\\(82\\)\\(83\\)\\(83\\)\\(83\\)\\(83\\)\\(83\\)\\(84\\)\\(84\\)\\(84\\)\\(84\\)\\(84\\)\\(85\\)\\(85\\)\\(85\\)\\(85\\)\\(85\\)\\(86\\)\\(86\\)\\(86\\)\\(86\\)\\(86\\)\\(87\\)\\(87\\)\\(87\\)\\(87\\)\\(88\\)\\(88\\)\\(88\\)\\(88\\)\\(88\\)\\(89\\)\\(89\\)\\(89\\)\\(89\\)\\(89\\)\\(90\\)\\(90\\)\\(90\\)\\(90\\)\\(91\\)\\(91\\)\\(91\\)\\(91\\)\\(92\\)\\(92\\)\\(92\\)\\(92\\)\\(92\\)\\(93\\)\\(93\\)\\(93\\)\\(93\\)\\(94\\)\\(94\\)\\(94\\)\\(94\\)\\(95\\)\\(95\\)\\(95\\)\\(95\\)\\(96\\)\\(96\\)\\(96\\)\\(96\\)\\(97\\)\\(97\\)\\(97\\)\\(97\\)\\(98\\)\\(98\\)\\(98\\)\\(98\\)\\(99\\)\\(99\\)\\(99\\)\\(100\\)\\(100\\)\\(100\\)\\(100\\)\\(101\\)\\(101\\)\\(101\\)\\(101\\)\\(102\\)\\(102\\)\\(102\\)\\(103\\)\\(103\\)\\(103\\)\\(104\\)\\(104\\)\\(104\\)\\(104\\)\\(105\\)\\(105\\)\\(105\\)\\(106\\)\\(106\\)\\(106\\)\\(107\\)\\(107\\)\\(107\\)\\(108\\)\\(108\\)\\(108\\)\\(109\\)\\(109\\)\\(109\\)\\(110\\)\\(110\\)\\(110\\)\\(111\\)\\(111\\)\\(112\\)\\(112\\)\\(112\\)\\(113\\)\\(113\\)\\(113\\)\\(114\\)\\(114\\)\\(115\\)\\(115\\)\\(116\\)\\(116\\)\\(116\\)\\(117\\)\\(117\\)\\(118\\)\\(118\\)\\(119\\)\\(119\\)\\(120\\)\\(120\\)\\(121\\)\\(121\\)\\(122\\)\\(122\\)\\(123\\)\\(124\\)\\(124\\)\\(125\\)\\(125\\)\\(126\\)\\(127\\)\\(128\\)\\(128\\)\\(129\\)\\(130\\)\\(131\\)\\(132\\)\\(133\\)\\(134\\)\\(136\\)\\(137\\)\\(140\\)
\n", "
" ], "text/plain": [ " 0 3 4 6 7 8 9 10 11 12 12 13 14 15 15 16 16 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 24 25 25 26 26 27 27 27 28 28 28 29 29 30 30 30 31 31 31 32 32 32 33 33 33 34 34 34 35 35 35 36 36 36 36 37 37 37 38 38 38 39 39 39 39 40 40 40 40 41 41 41 42 42 42 42 43 43 43 43 44 44 44 44 45 45 45 45 46 46 46 46 47 47 47 47 48 48 48 48 48 49 49 49 49 50 50 50 50 51 51 51 51 51 52 52 52 52 52 53 53 53 53 54 54 54 54 54 55 55 55 55 55 56 56 56 56 56 57 57 57 57 57 58 58 58 58 58 59 59 59 59 59 60 60 60 60 60 60 61 61 61 61 61 62 62 62 62 62 63 63 63 63 63 64 64 64 64 64 64 65 65 65 65 65 66 66 66 66 66 67 67 67 67 67 68 68 68 68 68 68 69 69 69 69 69 70 70 70 70 70 71 71 71 71 71 72 72 72 72 72 72 73 73 73 73 73 74 74 74 74 74 75 75 75 75 75 76 76 76 76 76 76 77 77 77 77 77 78 78 78 78 78 79 79 79 79 79 80 80 80 80 80 80 81 81 81 81 81 82 82 82 82 82 83 83 83 83 83 84 84 84 84 84 85 85 85 85 85 86 86 86 86 86 87 87 87 87 88 88 88 88 88 89 89 89 89 89 90 90 90 90 91 91 91 91 92 92 92 92 92 93 93 93 93 94 94 94 94 95 95 95 95 96 96 96 96 97 97 97 97 98 98 98 98 99 99 99 100 100 100 100 101 101 101 101 102 102 102 103 103 103 104 104 104 104 105 105 105 106 106 106 107 107 107 108 108 108 109 109 109 110 110 110 111 111 112 112 112 113 113 113 114 114 115 115 116 116 116 117 117 118 118 119 119 120 120 121 121 122 122 123 124 124 125 125 126 127 128 128 129 130 131 132 133 134 136 137 140" ] }, "execution_count": 21, "metadata": {}, "output_type": "execute_result" } ], "source": [ "table(possible_cents(a = 3, b = 4, bound = 20))" ] }, { "cell_type": "code", "execution_count": 22, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "5" ] }, "execution_count": 22, "metadata": {}, "output_type": "execute_result" } ], "source": [ "guess_frobenius_number = 5; guess_frobenius_number" ] }, { "cell_type": "code", "execution_count": 23, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "6" ] }, "execution_count": 23, "metadata": {}, "output_type": "execute_result" } ], "source": [ "guess_conductor = guess_frobenius_number + 1; guess_conductor" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "###### Conjecture\n", "\n", "If $a = 3$, and $b = 4$, then the frobenius number $f_{\\{a,\\,b\\}}$ and the conductor $c_{\\{a,\\,b\\}}$ of the set $\\{a,\\,b\\}$ is given by $5$ and $6$ respectively." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Let us update the list variable `coin_problem_known_answers` with our new result." ] }, { "cell_type": "code", "execution_count": 24, "metadata": {}, "outputs": [], "source": [ "coin_problem_known_answers = [[(2, 3), 1, 2, 1], [(3,4), 5, 6, 3]]" ] }, { "cell_type": "code", "execution_count": 25, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "
\\(\\{a,\\,b\\}\\)\\(f_{\\{a,\\,b\\}}\\)\\(c_{\\{a,\\,b\\}}\\)number not possible
\\(\\left(2, 3\\right)\\)\\(1\\)\\(2\\)\\(1\\)
\\(\\left(3, 4\\right)\\)\\(5\\)\\(6\\)\\(3\\)
\n", "
" ], "text/plain": [ " $\\{a,\\,b\\}$ $f_{\\{a,\\,b\\}}$ $c_{\\{a,\\,b\\}}$ number not possible\n", "├─────────────┼─────────────────┼─────────────────┼─────────────────────┤\n", " (2, 3) 1 2 1\n", " (3, 4) 5 6 3" ] }, "execution_count": 25, "metadata": {}, "output_type": "execute_result" } ], "source": [ "table(coin_problem_known_answers, header_row = my_table_header)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Now try the following cases: \n", " - $a = 3$, $b = 6$;\n", " - $a = 13$, $b = 7$;\n", " \n", "and write what you observe." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Can you think of a more general question that will cover a lot of cases instead of just a single case like what we did together? Any ideas? \n", " - Given two positive integers $a$ and $b$, how many numbers can not be written as $a\\,x + b\\,y$ where $x$ and $y$ are non-negative integers?\n", " - Can the Frobenius number be expressed in terms of $a$ and $b$?\n", " - If $a$ is even and $b$ is odd, what is the Frobenius number? \n", " - If $a$ is even and $b$ is even, what is the Frobenius number? \n", " - If $a$ is odd and $b$ is odd, what is the Frobenius number? \n", " - If $a$ and $b$ are prime numbers, what is the Frobenius number? \n", " - Does the Frobenius number exist, if $\\gcd(a, b) \\neq 1$?" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Let us have divide ourselves into groups of three or four and try to explore our questions on simple cases as we did before. Let write out your findings because you will submit it as your report. " ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "markdown", "metadata": {}, "source": [ "You will not be submitting as a group and whiles groups members can have the same results, each person in the group is encouraged to write his or her own report." ] } ], "metadata": { "kernelspec": { "display_name": "SageMath 10.4", "language": "sage", "name": "sagemath" }, "language": "python", "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.11.2" }, "varInspector": { "cols": { "lenName": 16, "lenType": 16, "lenVar": 40 }, "kernels_config": { "python": { "delete_cmd_postfix": "", "delete_cmd_prefix": "del ", "library": "var_list.py", "varRefreshCmd": "print(var_dic_list())" }, "r": { "delete_cmd_postfix": ") ", "delete_cmd_prefix": "rm(", "library": "var_list.r", "varRefreshCmd": "cat(var_dic_list()) " } }, "types_to_exclude": [ "module", "function", "builtin_function_or_method", "instance", "_Feature" ], "window_display": false } }, "nbformat": 4, "nbformat_minor": 4 }