Upload
others
View
7
Download
0
Embed Size (px)
Citation preview
Using Computer Programming as a Door into
Pure Math Research
ICTCM 2020
Jeremiah Bass and Preston Ward
Tarleton State University
Introduction
• Goal: Provide undergraduate students with a doorway into pure
math research.
• What we need to get there . . .
• A problem easy enough to state and understand.
• A problem on which something can be done without a lot of initial
background theoretical development.
• One possible solution is to use problems from the area of number
theory.
• Many problems in number theory are easy to state and understand.
• For many problems in number theory, students can immediately
begin to find patterns and solutions with the use of computers.
1
Introduction
• Goal: Provide undergraduate students with a doorway into pure
math research.
• What we need to get there . . .
• A problem easy enough to state and understand.
• A problem on which something can be done without a lot of initial
background theoretical development.
• One possible solution is to use problems from the area of number
theory.
• Many problems in number theory are easy to state and understand.
• For many problems in number theory, students can immediately
begin to find patterns and solutions with the use of computers.
1
Introduction
• Goal: Provide undergraduate students with a doorway into pure
math research.
• What we need to get there . . .
• A problem easy enough to state and understand.
• A problem on which something can be done without a lot of initial
background theoretical development.
• One possible solution is to use problems from the area of number
theory.
• Many problems in number theory are easy to state and understand.
• For many problems in number theory, students can immediately
begin to find patterns and solutions with the use of computers.
1
Introduction
• Goal: Provide undergraduate students with a doorway into pure
math research.
• What we need to get there . . .
• A problem easy enough to state and understand.
• A problem on which something can be done without a lot of initial
background theoretical development.
• One possible solution is to use problems from the area of number
theory.
• Many problems in number theory are easy to state and understand.
• For many problems in number theory, students can immediately
begin to find patterns and solutions with the use of computers.
1
Introduction
• Goal: Provide undergraduate students with a doorway into pure
math research.
• What we need to get there . . .
• A problem easy enough to state and understand.
• A problem on which something can be done without a lot of initial
background theoretical development.
• One possible solution is to use problems from the area of number
theory.
• Many problems in number theory are easy to state and understand.
• For many problems in number theory, students can immediately
begin to find patterns and solutions with the use of computers.
1
Introduction
• Goal: Provide undergraduate students with a doorway into pure
math research.
• What we need to get there . . .
• A problem easy enough to state and understand.
• A problem on which something can be done without a lot of initial
background theoretical development.
• One possible solution is to use problems from the area of number
theory.
• Many problems in number theory are easy to state and understand.
• For many problems in number theory, students can immediately
begin to find patterns and solutions with the use of computers.
1
Introduction
• Goal: Provide undergraduate students with a doorway into pure
math research.
• What we need to get there . . .
• A problem easy enough to state and understand.
• A problem on which something can be done without a lot of initial
background theoretical development.
• One possible solution is to use problems from the area of number
theory.
• Many problems in number theory are easy to state and understand.
• For many problems in number theory, students can immediately
begin to find patterns and solutions with the use of computers.
1
Why pure math research?
...I don’t believe you can have a happily functioning applied maths
world without the pure maths to back it up, providing the future
and keeping them on the straight and narrow. So it would be
very foolish not to invest in pure mathematics. It is a bit like only
investing in the energy resources that you can see now. You have
to invest in the future . . . . You don’t just use up what is there
and then start worrying about it when it is gone. It is the same
with mathematics; you can’t just use up the pure mathematics
we have now and then start worrying about it when you need a
pure result to generate your applications.
- Andrew Wiles
2
What’s different about computer programming now?
• Modern computing power.
• GPU vs CPU.
• We are using Nvidia GTX 1080 GPUs with python, numba, and
pycuda.
3
Drawback or Benefit?
One potential drawback is that many of these same problems in number
theory can be very difficult to solve.
Moreover, some of these problems
may not have solutions. . . . But that’s okay!
You enter the first room of the mansion and it’s completely dark.
You stumble around bumping into the furniture but gradually you
learn where each piece of furniture is. Finally, after six months or
so, you find the light switch, you turn it on, and suddenly it’s all
illuminated. . . . Then you move into the next room and spend
another six months in the dark. So each of these breakthroughs,
while sometimes they’re momentary, sometimes over a period of
a day or two, they are the culmination of, and couldn’t exist
without, the many months of stumbling around in the dark that
precede them.
- Andrew Wiles
4
Drawback or Benefit?
One potential drawback is that many of these same problems in number
theory can be very difficult to solve. Moreover, some of these problems
may not have solutions.
. . . But that’s okay!
You enter the first room of the mansion and it’s completely dark.
You stumble around bumping into the furniture but gradually you
learn where each piece of furniture is. Finally, after six months or
so, you find the light switch, you turn it on, and suddenly it’s all
illuminated. . . . Then you move into the next room and spend
another six months in the dark. So each of these breakthroughs,
while sometimes they’re momentary, sometimes over a period of
a day or two, they are the culmination of, and couldn’t exist
without, the many months of stumbling around in the dark that
precede them.
- Andrew Wiles
4
Drawback or Benefit?
One potential drawback is that many of these same problems in number
theory can be very difficult to solve. Moreover, some of these problems
may not have solutions. . . . But that’s okay!
You enter the first room of the mansion and it’s completely dark.
You stumble around bumping into the furniture but gradually you
learn where each piece of furniture is. Finally, after six months or
so, you find the light switch, you turn it on, and suddenly it’s all
illuminated. . . . Then you move into the next room and spend
another six months in the dark. So each of these breakthroughs,
while sometimes they’re momentary, sometimes over a period of
a day or two, they are the culmination of, and couldn’t exist
without, the many months of stumbling around in the dark that
precede them.
- Andrew Wiles
4
Drawback or Benefit?
One potential drawback is that many of these same problems in number
theory can be very difficult to solve. Moreover, some of these problems
may not have solutions. . . . But that’s okay!
You enter the first room of the mansion and it’s completely dark.
You stumble around bumping into the furniture but gradually you
learn where each piece of furniture is. Finally, after six months or
so, you find the light switch, you turn it on, and suddenly it’s all
illuminated. . . . Then you move into the next room and spend
another six months in the dark. So each of these breakthroughs,
while sometimes they’re momentary, sometimes over a period of
a day or two, they are the culmination of, and couldn’t exist
without, the many months of stumbling around in the dark that
precede them.
- Andrew Wiles
4
Example: Using Magic Squares
A magic square is a square array of distinct positive integers such that
each row, column, and diagonal add to the same thing.
For example, the following is a 3X3 magic square:14 1 12
7 9 11
6 17 4
• A more interesting question: does a 3X3 magic square of squares
exist?
• Where this question originated: Euler (1770s) to Lucas (1876)to
LaBar (1984, College Mathematics Journal, Problem 270).
• It is still not know today whether or not a 3X3 magic square of
squares exists.
5
Example: Using Magic Squares
A magic square is a square array of distinct positive integers such that
each row, column, and diagonal add to the same thing.
For example, the following is a 3X3 magic square:14 1 12
7 9 11
6 17 4
• A more interesting question: does a 3X3 magic square of squares
exist?
• Where this question originated: Euler (1770s) to Lucas (1876)to
LaBar (1984, College Mathematics Journal, Problem 270).
• It is still not know today whether or not a 3X3 magic square of
squares exists.
5
Example: Using Magic Squares
A magic square is a square array of distinct positive integers such that
each row, column, and diagonal add to the same thing.
For example, the following is a 3X3 magic square:14 1 12
7 9 11
6 17 4
• A more interesting question: does a 3X3 magic square of squares
exist?
• Where this question originated: Euler (1770s)
to Lucas (1876)to
LaBar (1984, College Mathematics Journal, Problem 270).
• It is still not know today whether or not a 3X3 magic square of
squares exists.
5
Example: Using Magic Squares
A magic square is a square array of distinct positive integers such that
each row, column, and diagonal add to the same thing.
For example, the following is a 3X3 magic square:14 1 12
7 9 11
6 17 4
• A more interesting question: does a 3X3 magic square of squares
exist?
• Where this question originated: Euler (1770s) to Lucas (1876)
to
LaBar (1984, College Mathematics Journal, Problem 270).
• It is still not know today whether or not a 3X3 magic square of
squares exists.
5
Example: Using Magic Squares
A magic square is a square array of distinct positive integers such that
each row, column, and diagonal add to the same thing.
For example, the following is a 3X3 magic square:14 1 12
7 9 11
6 17 4
• A more interesting question: does a 3X3 magic square of squares
exist?
• Where this question originated: Euler (1770s) to Lucas (1876)to
LaBar (1984, College Mathematics Journal, Problem 270).
• It is still not know today whether or not a 3X3 magic square of
squares exists.
5
Example: Using Magic Squares
A magic square is a square array of distinct positive integers such that
each row, column, and diagonal add to the same thing.
For example, the following is a 3X3 magic square:14 1 12
7 9 11
6 17 4
• A more interesting question: does a 3X3 magic square of squares
exist?
• Where this question originated: Euler (1770s) to Lucas (1876)to
LaBar (1984, College Mathematics Journal, Problem 270).
• It is still not know today whether or not a 3X3 magic square of
squares exists.
5
What can we learn?
For problems like this, you can have a student write a program that starts
looking for magic squares of squares.
• Consider the following array:a2 b2 c2
d2 e2 f 2
g2 h2 i2
• If it is a magic square, then a2 + e2 + i2 = 3e2, and so
a2 + i2 = 2e2. Similarly with all the other “center” sums.
6
What can we learn?
For problems like this, you can have a student write a program that starts
looking for magic squares of squares.
• Consider the following array:a2 b2 c2
d2 e2 f 2
g2 h2 i2
• If it is a magic square, then a2 + e2 + i2 = 3e2, and so
a2 + i2 = 2e2. Similarly with all the other “center” sums.
6
What can we learn?
For problems like this, you can have a student write a program that starts
looking for magic squares of squares.
• Consider the following array:a2 b2 c2
d2 e2 f 2
g2 h2 i2
• If it is a magic square, then a2 + e2 + i2 = 3e2, and so
a2 + i2 = 2e2. Similarly with all the other “center” sums.
6
Some algorithms we have tried
• We begin by taking a number (2e2) that can be factored into a sum
of squares in at least four ways in order to generate the squares for
the 3 × 3 matrix. This will at least guarantee that all the center
sums are correct.
• Once the basic algorithm was working, the student was able to
parallelize the code using cuda and high-powered GPUs in order to
process the bigger numbers more quickly. Instead of checking one
matrix at a time, we were able to check thousands. We ran this for
e values into the billions before the computations began to slow
down dramatically.
• One thing we noticed is that this algorithm never produced any
squares with more than four correct sums.
7
Some algorithms we have tried
• We begin by taking a number (2e2) that can be factored into a sum
of squares in at least four ways in order to generate the squares for
the 3 × 3 matrix. This will at least guarantee that all the center
sums are correct.
• Once the basic algorithm was working, the student was able to
parallelize the code using cuda and high-powered GPUs in order to
process the bigger numbers more quickly. Instead of checking one
matrix at a time, we were able to check thousands. We ran this for
e values into the billions before the computations began to slow
down dramatically.
• One thing we noticed is that this algorithm never produced any
squares with more than four correct sums.
7
Some algorithms we have tried
• We begin by taking a number (2e2) that can be factored into a sum
of squares in at least four ways in order to generate the squares for
the 3 × 3 matrix. This will at least guarantee that all the center
sums are correct.
• Once the basic algorithm was working, the student was able to
parallelize the code using cuda and high-powered GPUs in order to
process the bigger numbers more quickly. Instead of checking one
matrix at a time, we were able to check thousands. We ran this for
e values into the billions before the computations began to slow
down dramatically.
• One thing we noticed is that this algorithm never produced any
squares with more than four correct sums.
7
Trading Spaces
Another way we have explored this problem is by taking each row,
column, and diagonal of the matrix and think of them as a node in a
graph. If two nodes share exactly one element in common, connect them
with an edge. This takes the array on the left and transforms it into the
graph on the right:
8
Trading Spaces, cont.
This leads us to the following algorithm:
1. Generate a list of sums of three squares for a given number.
2. Once you have them all, make each set of three squares into a node
3. Iterate over pairs of nodes, and connect them if they have one
element in common and the other are distinct
4. If the final graph has < 8 nodes, throw it out
5. If it has >= 8 nodes, start removing nodes that have <= 4 edges,
and repeat. If the graph is reduced to zero nodes, throw it out. This
is known as core reduction.
6. If the resulting graph has >= 8 nodes, check for magic squares of
squares
With this method we have been able to find many squares with five or six
common sums, and we believe it will return to us ones with seven
common sums. Several squares have been found with seven sums, and it
is possible that this method of core reduction would make them
inaccessible to our algorithm. We intend to look further into this.
9
Trading Spaces, cont.
This leads us to the following algorithm:
1. Generate a list of sums of three squares for a given number.
2. Once you have them all, make each set of three squares into a node
3. Iterate over pairs of nodes, and connect them if they have one
element in common and the other are distinct
4. If the final graph has < 8 nodes, throw it out
5. If it has >= 8 nodes, start removing nodes that have <= 4 edges,
and repeat. If the graph is reduced to zero nodes, throw it out. This
is known as core reduction.
6. If the resulting graph has >= 8 nodes, check for magic squares of
squares
With this method we have been able to find many squares with five or six
common sums, and we believe it will return to us ones with seven
common sums. Several squares have been found with seven sums, and it
is possible that this method of core reduction would make them
inaccessible to our algorithm. We intend to look further into this.
9
Trading Spaces, cont.
This leads us to the following algorithm:
1. Generate a list of sums of three squares for a given number.
2. Once you have them all, make each set of three squares into a node
3. Iterate over pairs of nodes, and connect them if they have one
element in common and the other are distinct
4. If the final graph has < 8 nodes, throw it out
5. If it has >= 8 nodes, start removing nodes that have <= 4 edges,
and repeat. If the graph is reduced to zero nodes, throw it out. This
is known as core reduction.
6. If the resulting graph has >= 8 nodes, check for magic squares of
squares
With this method we have been able to find many squares with five or six
common sums, and we believe it will return to us ones with seven
common sums. Several squares have been found with seven sums, and it
is possible that this method of core reduction would make them
inaccessible to our algorithm. We intend to look further into this.
9
Trading Spaces, cont.
This leads us to the following algorithm:
1. Generate a list of sums of three squares for a given number.
2. Once you have them all, make each set of three squares into a node
3. Iterate over pairs of nodes, and connect them if they have one
element in common and the other are distinct
4. If the final graph has < 8 nodes, throw it out
5. If it has >= 8 nodes, start removing nodes that have <= 4 edges,
and repeat. If the graph is reduced to zero nodes, throw it out. This
is known as core reduction.
6. If the resulting graph has >= 8 nodes, check for magic squares of
squares
With this method we have been able to find many squares with five or six
common sums, and we believe it will return to us ones with seven
common sums. Several squares have been found with seven sums, and it
is possible that this method of core reduction would make them
inaccessible to our algorithm. We intend to look further into this.
9
Trading Spaces, cont.
This leads us to the following algorithm:
1. Generate a list of sums of three squares for a given number.
2. Once you have them all, make each set of three squares into a node
3. Iterate over pairs of nodes, and connect them if they have one
element in common and the other are distinct
4. If the final graph has < 8 nodes, throw it out
5. If it has >= 8 nodes, start removing nodes that have <= 4 edges,
and repeat. If the graph is reduced to zero nodes, throw it out. This
is known as core reduction.
6. If the resulting graph has >= 8 nodes, check for magic squares of
squares
With this method we have been able to find many squares with five or six
common sums, and we believe it will return to us ones with seven
common sums. Several squares have been found with seven sums, and it
is possible that this method of core reduction would make them
inaccessible to our algorithm. We intend to look further into this.
9
Trading Spaces, cont.
This leads us to the following algorithm:
1. Generate a list of sums of three squares for a given number.
2. Once you have them all, make each set of three squares into a node
3. Iterate over pairs of nodes, and connect them if they have one
element in common and the other are distinct
4. If the final graph has < 8 nodes, throw it out
5. If it has >= 8 nodes, start removing nodes that have <= 4 edges,
and repeat. If the graph is reduced to zero nodes, throw it out. This
is known as core reduction.
6. If the resulting graph has >= 8 nodes, check for magic squares of
squares
With this method we have been able to find many squares with five or six
common sums, and we believe it will return to us ones with seven
common sums. Several squares have been found with seven sums, and it
is possible that this method of core reduction would make them
inaccessible to our algorithm. We intend to look further into this.
9
Trading Spaces, cont.
This leads us to the following algorithm:
1. Generate a list of sums of three squares for a given number.
2. Once you have them all, make each set of three squares into a node
3. Iterate over pairs of nodes, and connect them if they have one
element in common and the other are distinct
4. If the final graph has < 8 nodes, throw it out
5. If it has >= 8 nodes, start removing nodes that have <= 4 edges,
and repeat. If the graph is reduced to zero nodes, throw it out. This
is known as core reduction.
6. If the resulting graph has >= 8 nodes, check for magic squares of
squares
With this method we have been able to find many squares with five or six
common sums, and we believe it will return to us ones with seven
common sums. Several squares have been found with seven sums, and it
is possible that this method of core reduction would make them
inaccessible to our algorithm. We intend to look further into this. 9
Some interesting patterns
The first class exhibits two clusters of nodes, connected by either one
node or one edge:
10
In the second class are pairs of disjoint clusters of nodes:
11
In the third class, we find three loosely connected clusters of nodes:
12
The last class is the most promising, bearing the closest resemblance to
our original depiction of a magic square of squares in graph form.
However, these graphs have at least 1 or 2 extra edges, breaking the
property of uniqueness:
13
The rest of the story...
• Kevin Brown has shown that “any square whose elements satisfy the
central sums and whose central number is expressible as a sum of
two squares in no more than four distinct way will not give the
required sums for the outer rows and columns.”
• There is at least one 3X3 semi-magic square of squares with 7
correct sums.
• However, Lee Morgenstern has shown that, if a true 3X3 magic
square exists, then all entries must be above 1014. Moreover,
Duncan Bell has also shown that the central number must be
greater than 25 · 1024.
• Try to prove that a 3X3 magic square doesn’t exist!
14
The rest of the story...
• Kevin Brown has shown that “any square whose elements satisfy the
central sums and whose central number is expressible as a sum of
two squares in no more than four distinct way will not give the
required sums for the outer rows and columns.”
• There is at least one 3X3 semi-magic square of squares with 7
correct sums.
• However, Lee Morgenstern has shown that, if a true 3X3 magic
square exists, then all entries must be above 1014. Moreover,
Duncan Bell has also shown that the central number must be
greater than 25 · 1024.
• Try to prove that a 3X3 magic square doesn’t exist!
14
The rest of the story...
• Kevin Brown has shown that “any square whose elements satisfy the
central sums and whose central number is expressible as a sum of
two squares in no more than four distinct way will not give the
required sums for the outer rows and columns.”
• There is at least one 3X3 semi-magic square of squares with 7
correct sums.
• However, Lee Morgenstern has shown that, if a true 3X3 magic
square exists, then all entries must be above 1014. Moreover,
Duncan Bell has also shown that the central number must be
greater than 25 · 1024.
• Try to prove that a 3X3 magic square doesn’t exist!
14
The rest of the story...
• Kevin Brown has shown that “any square whose elements satisfy the
central sums and whose central number is expressible as a sum of
two squares in no more than four distinct way will not give the
required sums for the outer rows and columns.”
• There is at least one 3X3 semi-magic square of squares with 7
correct sums.
• However, Lee Morgenstern has shown that, if a true 3X3 magic
square exists, then all entries must be above 1014. Moreover,
Duncan Bell has also shown that the central number must be
greater than 25 · 1024.
• Try to prove that a 3X3 magic square doesn’t exist!
14
Some Sources
• A good place to start is with Christian Boyer’s article in the
Mathematical Intelligencer, Vol. 27, Num. 2 (2005): “Some Notes
on the Magic Squares of Squares Problem.”
• This website is devoted to magic squares with updates on current
research and results: http://www.multimagie.com/.
• Some good introductory number theory texts:
1. A Friendly Introduction to Number Theory, by Joseph H. Silverman
2. Introduction to Analytic Number Theory, Tom M. Apostol.
15
Thank you!
16