Automatic Invention of Integer Sequences

Automatic Invention of Integer Sequences

From: AAAI-00 Proceedings. Copyright © 2000, AAAI (www.aaai.org). All rights reserved. Automatic Invention of Integer Sequences Simon Colton, Alan Bundy Toby Walsh Mathematical Reasoning Group Department of Computer Science Division of Informatics University of York University of Edinburgh Heslington 80 South Bridge York Y010 5DD Edinburgh EH1 1HN United Kingdom United Kingdom [email protected] simonco,[email protected] Abstract is worthy of the Encyclopedia by relating it to sequences already in the Encyclopedia. Sometimes the relationships We report on the application of the HR program (Colton, found are surprising and non-trivial to prove which adds to Bundy, & Walsh 1999) to the problem of automatically in- the interestingness of the new sequence. HR therefore em- venting integer sequences. Seventeen sequences invented by HR are interesting enough to have been accepted into the En- ploys a two step process to find new sequences: cyclopedia of Integer Sequences (Sloane 2000) and all were A sequence is invented by generating a definition and de- supplied with interesting conjectures about their nature, also termining the first terms of the sequence. discovered by HR. By extending HR, we have enabled it to perform a two stage process of invention and investigation. The sequence is investigated by relating it to ones already This involves generating both the definition and terms of a appearing in the Encyclopedia. new sequence, relating it to sequences already in the Encyc- lopedia and pruning the output to help identify the most sur- prising and interesting results. Invention of Sequences The HR Program Introduction HR is named after mathematicians Hardy (1877-1947) and Ramanujan (1887-1920). It is designed to model how math- An integer sequence is an ordered set of integers such as the ematical theories can be formed from only the most funda- ; 4; 9; 16;::: square numbers: 1 Integer sequences arise in mental concepts of a domain, such as addition and multiplic- many area of mathematics, and comprise an important sub- ation in number theory. HR is supplied with (a) some ob- ject area. The Encyclopedia of Integer Sequences (Sloane jects of interest such as groups, graphs or integers (b) some 2000) is an on-line repository of around 54,000 sequences ways to decompose these into sub-objects, such as graphs collected over 35 years by Neil Sloane, with contributions into nodes, and (c) some relations between the sub-objects, from many mathematicians. To allow a sequence into the such as nodes being adjacent. Encyclopedia, Sloane stipulates that it must be an infinite sequence of positive integers which is well defined and in- Each initial concept is supplied with a data table of rows teresting. This rules out any randomly generated sequences which satisfy a predicate, and a definition for the predic- which have no formula and many dull sequences which ate. The first column of every data table contains objects of have no interesting features. Each sequence is given an ‘A’- interest, the other columns contain sub-objects or integers number which uniquely identifies it within the Encyclope- calculated using the objects of interest and their sub-objects. dia, for instance the square numbers have number A000290. For example, the concept of divisors of integers is supplied We have used the HR program (Colton, Bundy, & Walsh with the first data table in figure 1, where each row is an in- n; a]: ajn 1999) to invent new integer sequences worthy of the Encyc- teger and a divisor. The definition supplied is: [ , lopedia. HR performs theory formation in domains such as read “a divides n”, which is used when generating a defini- number theory, graph theory and group theory by inventing tion for any concept based on divisors. concepts and making and settling conjectures. We present Given the initial concepts, HR uses general production here extensions to HR’s abilities in number theory. Firstly, rules to turn one (or two) old concepts into a new one. For number theory concepts are presented as integer sequences, instance, the ‘forall’ production rule finds objects where a eg. the concept of an integer being prime is converted into particular relation between its sub-objects is true in every the sequence of prime numbers. Next, taking advantage case, eg. if the relation is adjacency of nodes in graphs, the of the natural ordering of integers, we have given HR new concept of complete graphs is produced: every node is ad- ways to produce number theory concepts. Finally, we have jacent to every other node. Each production rule generates enabled HR to provide justification why a new sequence both a data table and a definition for the new concept, based on the data tables and definitions of the old concepts. HR Copyright c 2000, American Association for Artificial Intelli- uses seven production rules, each given in table 1 with a gence (www.aaai.org). All rights reserved. brief description of the types of concepts they produce. na na nx Name Type of Concept Produced 11 41 1 1 n Compose identifying objects or sub-objects 21 42 size 2 2 split 2 with properties from 2 concepts 22 4 4 3 2 3 Exists identifying objects which have at least <2> <2=2> one sub-object with a particular property 31 51 4 3 5 Forall identifying objects for which all 33 55 5 2 sub-objects have a particular property [n,a] : a | n x=|{a:a | n}| 2=|{a:a | n}| Match identifying objects with equal sub-objects satisfying a relation. Figure 1: re-invention of prime numbers Negate identifying objects or sub-objects which do not have a particular property. Figure 1 shows how the production rules can generate new Size counts the number of sub-objects which concepts: prime numbers are constructed using just two pro- have a particular property. duction rules. Each production rule step is accompanied by Split identifying objects with a given number of a parameterisation detailing exactly how the step is to oc- sub-objects with a particular property. 2i cur. For example, parameters h for the size production rule stipulate that for every object of interest, the number Table 1: the seven production rules used by HR of sub-objects in column 2 is to be counted. The paramet- 2=2i ers h for the split production rule tell it to keep rows where column 2 contains value 2. Each production rule gen- There is also a choice of which integers to supply as the ob- erates the set of all possible parameters for a given concept. jects of interest - using too many will slow down the theory HR forms a theory using a heuristic search which builds formation, but if we choose too few, many sequences which new concepts from the best old ones. To decide which con- are different will appear the same. For instance, if we use cepts are most worthy of development, HR has eight meas- the integers 1 to 5, the prime numbers, 2, 3, 5 will appear ures which calculate values based on the data table and con- the same as the non-squares, which are also 2, 3 and 5. In struction history of the concepts. A weighted sum of the practice, we use the numbers between 1 and around 15, de- measures for each concept is used to order the concepts. pending on the initial concepts chosen. One measure is the complexity of the concept, which de- We have enabled HR to present concepts in number the- termines how many concepts in total have been built upon ory as integer sequences. If the concept is a type of number, to produce the new concept. Concepts with high complexity for example square numbers, HR just outputs the integers of are often difficult to understand, so low complexity is usu- that type in order. We call such sequences number type se- ally favoured in the weighted sum. Often we impose a com- quences. For concepts produced by the size production rule, plexity limit of around 10 to improve the comprehensibility eg. the -function, which counts the number of divisors of of the theory. The novelty measure of a concept calculates an integer, the sequence is formed from the values calculated how many times the categorisation produced by the concept by the function for the integers 1, 2, 3, etc. in order. We call has been seen. For example, square numbers categorise in- these coefficient sequences. Other concepts may be special ; 4; 9;:::] [2; 3; 5;:::;] tegers into two sets: [1 and .Ifthis types of sub-objects, for instance prime divisors. To present categorisation had been seen often, square numbers would these as sequences, HR takes each integer in turn and writes score poorly for novelty, and vice-versa. down the sub-objects in numerical order. We call such se- To complete a cycle of mathematical activity, while quences sub-object sequences. searching for concepts, HR also checks for empirically true We have also added 3 production rules which take advant- conjectures. For example, if a newly formed concept had age of the natural ordering of integers, but which can work in exactly the same data table as a previous one, HR would any domain with a well defined ordering, eg. polynomials. make the conjecture that the definition for the old and new These were inspired by the transformations used to identify concepts were equivalent. Furthermore, when working in sequences in the Encyclopedia (Bernstein & Sloane 1995) finite algebras, HR employs the Otter theorem prover (Mc- and we hope to implement more such rules. The first new Cune 1990) to attempt to prove the conjectures it makes.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    6 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us