:tocdepth: 2 .. _frobenius_number: The Frobenius number – Starting to Program ============================================================================ .. contents:: :local: .. highlight:: python Exploration Question: ---------------------- :: Suppose you have coins of value a cents and b cents. What amounts of money can you get by combining these? Q: Can you think of how to formulate our question mathematically? A: Given positive integers a and b, for which positive integers n does there exist non-negative integers x and y such that n=ax+by? We will solve this problem by first trying some easy cases such as :math:`a=2`, :math:`b=3`, or :math:`a=3`, :math:`b=4`, or :math:`a=3`, :math:`b=5` to begin. We will explore the first two cases :math:`a=2`, :math:`b=3`, and :math:`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. As we shall discover in our exploration, when there is such an :math:`n`, there is also an :math:`N` such that for all :math:`n` greater than or equal to :math:`N` will also work, but :math:`N-1` does not. We will call :math:`N` the **conductor** of the set :math:`\{a, b\}` and :math:`N-1` as the **Frobenius number**. (The problem is known as the Frobenius problem or the coin problem as well.) The **conductor** of two positive integers :math:`a, b` is the smallest integer :math:`N` such that all :math:`n` greater than or equal to :math:`N` can be written as :math:`n = ax + by`. The **Frobenius** number of two positive integers :math:`a, b` is the largest integer :math:`C` such that there do not exist positive integers :math:`x` and :math:`y` with :math:`C = ax + by`. Your goal is to experiment with this. Experiment! For a given pair of positive integers a and b can you think of some questions we can ask? For example we can ask things like the following: - Is there a conductor? - What is the conductor? - How many numbers n can be written ax+by? :: Can you think of more questions to ask? We will group ourselves into groups and try to explore our questions on simple cases as we did before. Now, soon we’ll be using the computer to help explore more complex examples like :math:`a=19, b=17`. However, experimental mathematics needs only curiosity and persistence. And you don’t need a computer to do that. Finally we will go to the computer laboratory and introduce *SageMath* - you can use the Sage notebook below and upload it to try it yourself! You should do this for tomorrow : 1. Is there a conductor for the sets :math:`\{2, 5\}`, :math:`\{3, 5\}`, and :math:`\{3, 6\}` ? If so, what is it? Explore! 2. Is there a Frobenius number for the sets :math:`\{2, 5\}`, :math:`\{3, 5\}`, and :math:`\{3, 6\}`? If so, what is it? Explore! 3. Can you list all the set of numbers that can not be written as :math:`2 x + 5 y`, :math:`3 x + 5 y` and :math:`3 x + 6 y`? When is this set finite? 4. Write down a step-by-step explanation of the conductor of :math:`\{3, 4\}`. You should both compute it and explain how you know that all N greater than the conductor really can be written as :math:`3x+4y` for some :math:`x,y`. 5. Try leaning how to load a sage jupyter notebook and how to start your own sage notebook. We’ve already been trying out some experimental mathematics; now it’s time to see how one might start doing this with the computer.  Again, **please feel free to try things**.  Don’t just try to follow the lecture. By the way, the acronym “SAGE” stands for “Software for Algebra and Geometry Experimentation”. We saw some proof earlier.  Let’s start our exploration of programming by recalling a theorem some of you may not have known needs to be a theorem. -------------- **Theorem (Division Algorithm)**: .. math:: \text{If }a\text{ and }b\text{ are integers, }b>0\text{, then we can always write }a=qb+r\text{ with }0\leq r < `2. Review of Python programming `__\ \|\ `Table of contents `__ \| `4. Starting To Program `__ > --------------