The Frobenius Problem in a Free Monoid

Total Page:16

File Type:pdf, Size:1020Kb

The Frobenius Problem in a Free Monoid The Frobenius Problem in a Free Monoid by Zhi Xu A thesis presented to the University of Waterloo in ful¯llment of the thesis requirement for the degree of Doctor of Philosophy in Computer Science Waterloo, Ontario, Canada, 2009 °c Zhi Xu 2009 I hereby declare that I am the sole author of this thesis. This is a true copy of the thesis, including any required ¯nal revisions, as accepted by my examiners. I understand that my thesis may be made electronically available to the public. ii Abstract Given positive integers c1; c2; : : : ; ck with gcd(c1; c2; : : : ; ck) = 1, the Frobenius prob- lem (FP) is to compute the largest integer g(c1; c2; : : : ; ck) that cannot be written as a non-negative integer linear combination of c1; c2; : : : ; ck. The Frobenius prob- lem in a free monoid (FPFM) is a non-commutative generalization of the Frobe- nius problem. Given words x1; x2; : : : ; xk such that there are only ¯nitely many words that cannot be written as concatenations of words in f x1; x2; : : : ; xk g, the FPFM is to ¯nd the longest such words. Unlike the FP, where the upper bound 2 g(c1; c2; : : : ; ck) · max1·i·k ci is quadratic, the upper bound on the length of the longest words in the FPFM can be exponential in certain measures and some of the exponential upper bounds are tight. For the 2FPFM, where the given words over § are of only two distinct lengths m and n with 1 < m < n, the length of the longest omitted words is · g(m; m j§jn¡m + n ¡ m). In Chapter 1, I give the de¯nition of the FP in integers and summarize some of the interesting properties of the FP. In Chapter 2, I give the de¯nition of the FPFM and discuss some general properties of the FPFM. Then I mainly focus on the 2FPFM. I discuss the 2FPFM from di®erent points of view and present two equivalent problems, one of which is about combinatorics on words and the other is about the word graph. In Chapter 3, I discuss some variations on the FPFM and related problems, including input in other forms, bases with constant size, the case of in¯nite words, the case of concatenation with overlap, and the generalization of the local postage-stamp problem in a free monoid. In Chapter 4, I present the construction of some essential examples to complement the theory of the 2FPFM discussed in Chapter 2. The theory and examples of the 2FPFM are the main contribution of the thesis. In Chapter 5, I discuss the algorithms for and computational complexity of the FPFM and related problems. In the last chapter, I summarize the main results and list some open problems. Part of my work in the thesis has appeared in the papers [83, 84, 157]. iii Acknowledgements First, I wish to thank my supervisor Je®rey O. Shallit, who is a great scholar, a nice friend of mine, and a good teacher who introduced to me the non-commutative Frobenius problem that ¯nally became the topic of this thesis. I owe him a great deal for his valuable suggestions in our regular discussions and for his patience in reading my poorly-written manuscripts and in improving my presentation skills. I cannot ¯nd enough words to express my gratitude for his help in all aspects in my PhD life. I also wish to thank my temporary supervisor professor Richard Trefler and all my friends in the WatForm group for their kindness that made my ¯rst year in Waterloo an enjoyable memory. I wish to thank professor Janusz Brzozowski, professor Jonathan Buss, professor Ond·rejLhot¶ak,professor Ming Li, all my friends in the Algorithm and Complexity group, and all the people who have ever helped me during my stay at University of Waterloo. Without their favors, my progress in the PhD program could not have proceeded so smoothly. I wish to thank Dr. Narad Rampersad for reading my thesis thoroughly and providing helpful comments. I wish to thank the members of my examining committee, professor Richard Cleve, professor Ming Li, professor Kai Salomaa, and professor Edlyn Teske for their precious time in reviewing my thesis, providing comments, and attending my defense. I particularly want to thank my parents and my sister for their endless love and selfless support. Without that, I could not have gone so far in my career. The research in the thesis was partly supported by David R. Cheriton Graduate Scholarships, the International Doctoral Student Award from University of Water- loo, and ¯nancial support from the David R. Cheriton School of Computer Science at the University of Waterloo. iv Dedication 献给我的父亲母亲 (To my parents) v Contents List of Tables ix List of Figures x 1 Introduction 1 1.1 Introduction to the Frobenius problem . 1 1.1.1 Number theory preliminaries . 1 1.1.2 Integer Frobenius problem . 2 1.2 Research on the FP . 5 1.2.1 Formulae for the Frobenius number . 5 1.2.2 Bounds on the Frobenius number . 9 1.2.3 Variations on the FP . 11 1.2.4 The FP in special sequential bases . 16 1.2.5 Algorithm for and computational complexity of the FP . 18 1.3 Applications and related problems of the FP . 19 1.3.1 Sylver coinage . 19 1.3.2 Quadratic residues . 20 1.3.3 Local postage-stamp problem . 20 1.3.4 (g0; g1; : : : ; gk)-tree . 21 1.3.5 Shellsort algorithm . 21 1.3.6 Tiling problem . 22 1.4 Shallit's non-commutative generalization . 24 1.4.1 Generalizations of the FP . 24 1.4.2 Free monoids and the FP . 25 1.5 Organization of the thesis . 28 vi 2 General theory of the FPFM 29 2.1 The Frobenius problem in a free monoid . 29 2.1.1 De¯nition of the FPFM . 29 2.1.2 Relations of the FPFM and the Frobenius number . 32 2.1.3 Twins proposition in the FPFM . 35 2.2 Various measures for the FPFM . 35 2.2.1 Measures of the input . 36 2.2.2 Measures of the output . 37 2.2.3 Constraints on the problem . 37 2.3 Bounds on the longest omitted words . 38 2.4 The FPFM for two lengths | the 2FPFM . 41 2.4.1 De¯nition of the 2FPFM . 42 2.4.2 The First and Second Lemmas of the 2FPFM . 42 2.4.3 Bounds on the longest omitted words for the 2FPFM . 48 2.5 Combinatorics on words in the 2FPFM . 49 2.5.1 Boosting the length of omitted words . 49 2.5.2 The structure of omitted words . 51 2.5.3 An equivalent condition on co-¯niteness . 53 2.6 The de Bruijn graph in the 2FPFM . 57 2.6.1 Word graphs of the 2FPFM . 57 2.6.2 Another equivalent condition on co-¯niteness . 60 2.6.3 The de Bruijn graph and a generalization . 62 2.6.4 Spectrum theorem for the 2FPFM . 67 2.6.5 Bounds on the size of the basis in the 2FPFM . 70 2.7 The FPFM with basis of special sequential lengths . 72 3 Variations on the FPFM and related problems 77 3.1 Concatenation of words with ¯xed order . 78 3.2 Variations with di®erent measures . 78 3.2.1 State complexity of the generated language . 78 3.2.2 Input in other forms . 85 3.2.3 Output in other forms . 89 3.3 Variations with di®erent aspects . 90 vii 3.3.1 Number of words and number of symbols . 90 3.3.2 Coverage of words as solutions . 93 3.3.3 The number of di®erent factorizations . 95 3.4 General form of the Frobenius problem of words . 97 3.4.1 In¯nite words . 97 3.4.2 Concatenation with overlap . 104 3.4.3 Other variations . 113 3.5 Generalized local postage-stamp problem . 115 4 Examples of the FPFM 121 4.1 Exponential length of the longest words 62 S¤ . 121 4.1.1 Examples of the 2FPFM with 0 < m < n < 2m . 121 4.1.2 Examples of the 2FPFM with 0 < 2m < n . 130 4.2 Doubly-exponential number of words 62 S¤ . 133 4.3 Experiment statistics . 136 5 Computational Complexity of the FPFM 139 5.1 Algorithm for the FPFM . 139 5.2 Algorithm for the 2FPFM . 140 5.3 Algorithm for the case of in¯nite words . 142 5.4 Algorithm for the case of concatenation with overlap . 143 5.5 Computational Complexity . 144 6 Conclusion 149 6.1 Summary of results on the FPFM and variations . 149 6.2 Open problems . 151 References 154 Index 165 viii List of Tables 1.1 An integer Frobenius problem example | g(3; 5) = 7 . 4 1.2 Relation between quadratic residues of 3; 5 and x 2 N n h3; 5i . 20 1.3 Comparison of the original FP and the FPFM . 27 2.1 Characteristics of the FPFM with bases S1, S2, and S3 . 34 2.2 Measures of a list of words x1; x2; : : : ; xk as the input . 36 2.3 Measures of the longest omitted words and other characteristics . 37 2.4 Conditions to be satis¯ed and additional constraints . 38 2.5 The length of longest words and the size of computing models . 39 2.6 All the words in f 0; 1 g¤ n (f 0; 1 g3 [ f 0; 1 g5 n f 00001 g)¤ . 43 2.7 Di®erent types of walks in a digraph .
Recommended publications
  • Trees of Irreducible Numerical Semigroups
    Rose-Hulman Undergraduate Mathematics Journal Volume 14 Issue 1 Article 5 Trees of Irreducible Numerical Semigroups Taryn M. Laird Northern Arizona University, [email protected] Jose E. Martinez Northern Arizona University Follow this and additional works at: https://scholar.rose-hulman.edu/rhumj Recommended Citation Laird, Taryn M. and Martinez, Jose E. (2013) "Trees of Irreducible Numerical Semigroups," Rose-Hulman Undergraduate Mathematics Journal: Vol. 14 : Iss. 1 , Article 5. Available at: https://scholar.rose-hulman.edu/rhumj/vol14/iss1/5 Rose- Hulman Undergraduate Mathematics Journal Trees of Irreducible Numerical Semigroups Taryn M. Laird and Jos´eE. Martinez a Volume 14, No. 1, Spring 2013 Sponsored by Rose-Hulman Institute of Technology Department of Mathematics Terre Haute, IN 47803 Email: [email protected] a http://www.rose-hulman.edu/mathjournal Northern Arizona University Rose-Hulman Undergraduate Mathematics Journal Volume 14, No. 1, Spring 2013 Trees of Irreducible Numerical Semigroups Taryn M. Laird and Jos´eE. Martinez Abstract.A 2011 paper by Blanco and Rosales describes an algorithm for construct- ing a directed tree graph of irreducible numerical semigroups of fixed Frobenius numbers. This paper will provide an overview of irreducible numerical semigroups and the directed tree graphs. We will also present new findings and conjectures concerning the structure of these trees. Acknowledgements: We would like to give a special thanks to our mentor, Jeff Rushall, for his help and guidance, and to Ian Douglas for sharing his expertise in programming. Page 58 RHIT Undergrad. Math. J., Vol. 14, No. 1 1 Introduction There are many problems in which we unknowingly encounter numerical semigroups in mathematics.
    [Show full text]
  • Factoring in the Chicken Mcnugget Monoid
    Mathematics Magazine ISSN: 0025-570X (Print) 1930-0980 (Online) Journal homepage: http://maa.tandfonline.com/loi/umma20 Factoring in the Chicken McNugget Monoid Scott T. Chapman & Chris O’Neill To cite this article: Scott T. Chapman & Chris O’Neill (2018) Factoring in the Chicken McNugget Monoid, Mathematics Magazine, 91:5, 323-336, DOI: 10.1080/0025570X.2018.1515559 To link to this article: https://doi.org/10.1080/0025570X.2018.1515559 Published online: 07 Dec 2018. Submit your article to this journal Article views: 128 View Crossmark data Full Terms & Conditions of access and use can be found at http://maa.tandfonline.com/action/journalInformation?journalCode=umma20 ARTICLES Factoring in the Chicken McNugget Monoid SCOTT T. CHAPMAN Sam Houston State University Huntsville, TX 77341-2206 [email protected] CHRIS O’NEILL University of California Davis Davis, CA 95616 [email protected] People just want more of it.—Ray Kroc [9] Every day, 34 million Chicken McNuggets are sold worldwide [4]. At most McDonalds locations in the United States today, Chicken McNuggets are sold in packs of 4, 6, 10, 20, 40, and 50 pieces. However, shortly after their introduction in 1979, they were sold in packs of 6, 9, and 20. The following problem spawned from the use of these latter three numbers. The Chicken McNugget Problem. What numbers of Chicken McNuggets can be ordered using only packs with 6, 9, or 20 pieces? Early references to this problem can be found in [28] and [32]. Positive integers satisfying the Chicken McNugget Problem are now known as McNugget numbers [23].
    [Show full text]
  • The Frobenius Problem in a Free Monoid
    The Frobenius Problem in a Free Monoid by Zhi Xu A thesis presented to the University of Waterloo in ful¯llment of the thesis requirement for the degree of Doctor of Philosophy in Computer Science Waterloo, Ontario, Canada, 2009 °c Zhi Xu 2009 I hereby declare that I am the sole author of this thesis. This is a true copy of the thesis, including any required ¯nal revisions, as accepted by my examiners. I understand that my thesis may be made electronically available to the public. ii Abstract Given positive integers c1; c2; : : : ; ck with gcd(c1; c2; : : : ; ck) = 1, the Frobenius prob- lem (FP) is to compute the largest integer g(c1; c2; : : : ; ck) that cannot be written as a non-negative integer linear combination of c1; c2; : : : ; ck. The Frobenius prob- lem in a free monoid (FPFM) is a non-commutative generalization of the Frobe- nius problem. Given words x1; x2; : : : ; xk such that there are only ¯nitely many words that cannot be written as concatenations of words in f x1; x2; : : : ; xk g, the FPFM is to ¯nd the longest such words. Unlike the FP, where the upper bound 2 g(c1; c2; : : : ; ck) · max1·i·k ci is quadratic, the upper bound on the length of the longest words in the FPFM can be exponential in certain measures and some of the exponential upper bounds are tight. For the 2FPFM, where the given words over § are of only two distinct lengths m and n with 1 < m < n, the length of the longest omitted words is · g(m; m j§jn¡m + n ¡ m).
    [Show full text]
  • Download The
    Visit : https://hemanthrajhemu.github.io Join Telegram to get Instant Updates: https://bit.ly/VTU_TELEGRAM Contact: MAIL: [email protected] INSTAGRAM: www.instagram.com/hemanthraj_hemu/ INSTAGRAM: www.instagram.com/futurevisionbie/ WHATSAPP SHARE: https://bit.ly/FVBIESHARE Introduction to The Design & ~ ~ Analysis of Algorithms IND EDITION " ~ Anany Levitin Villanova University Boston San Francisco New York London Toronto Sydney Tokyo Singapore Madrid Mexico City Munich Paris Cape Town Hong Kong Montreal https://hemanthrajhemu.github.io Contents ix 2.6 Empirical Analysis of Algorithms 84 Exercises 2.6 90 2.7 Algorithm Visualization 91 Summary 95 3 Brute Force 97 3.1 Selection Sort and Bubble Sort 98 Selection Sort 98 Bubble Sort 100 Exercises 3.1 102 3.2 Sequential Search and Brute-Force String Matching 103 Sequential Search 103 Brute-Force String Matching 104 Exercises 3.2 105 3.3 Closest-Pair and Convex-Hull Problems by Brute Force 107 Closest-Pair Problem 107 Convex-Hull Problem 108 Exercises 3.3 112 3.4 Exhaustive Search 114 Traveling Salesman Problem 114 Knapsack Problem 115 Assignment Problem 116 Exercises 3.4 119 Summary 120 4 Divide-and-Conquer 123 4.1 Mergesort 125 Exercises 4.1 128 4.2 Quicksort 129 Exercises 4.2 134 4.3 Binary Search 135 Exercises 4.3 138 https://hemanthrajhemu.github.io r 111 )( Contents I ' i::! 4.4 Binary Tree Traversals and Related Properties 139 Exercises 4.4 142 I:],, 4.5 Multiplication of Large Integers and Strassen's Matrix Multiplication 144 Multiplication of Large Integers 144 Strassen's Matrix
    [Show full text]
  • On the Change-Making Problem
    On the Change-Making Problem Timothy M. Chan∗ Qizheng He∗ Abstract (There are a number of other interesting problems Given a set of n non-negative integers representing a coin related to coin systems, such as the Frobenius problem, system, the change-making problem seeks the fewest number but these are not relevant to the present paper.) of coins that sum up to a given value t, where each Partially spurred by a renewed interest in fine- type of coin can be used an unlimited number of times. grained complexity, there have been a flurry of re- This problem is a popular homework exercise in dynamic cent works that improve upon the standard O(nt) so- programming, where the textbook solution runs in O(nt) lution for the subset sum problem,p starting with Koil- time. iaris and Xu's deterministic O( nt polylog t)-time al- It is not hard to solve this problem in O(t polylog t) time gorithm [8, 9], followed by Bringmann's randomized by using convolution. In this paper, we present a simple O(t polylog t)-time algorithm [3] and Jin and Wu's deterministic O(t log t log log t) time algorithm, and later randomized O(t log t)-time algorithm from SOSA last improve the running time to O(t log t) by randomization. year [7]. All these improved algorithms use convolu- tions (i.e., FFT) or other algebraic techniques. There 1 Introduction are also conditional lower bounds [1] to suggest that get- ting better than t1−" running time might not be possible In the change-making (or coin changing) problem, a for subset sum (ignoring nO(1) factors).
    [Show full text]