What are examples of discoveries have been made in Mathematics thanks to computer science?
-
5$\begingroup$ I wouldn't say fractals were discovered thanks to computers. Computers merely allow us to visualize pretty pictures of fractals. But you may be interested in the Four Colour Theorem. $\endgroup$– DanMar 11, 2015 at 16:38
-
$\begingroup$ yes thank you I had in mind the four colour theorem,do you have any other ideas ? $\endgroup$– user2505650Mar 11, 2015 at 16:40
-
$\begingroup$ I think the ability to classify computationally-hard problems is nice, the P vs. NP-type classifications (I know very little about these). For example, subset-sum, or traveling salesman, etc. $\endgroup$– pjs36Mar 11, 2015 at 16:41
-
2$\begingroup$ @user4894 That was exactly my point, if you care to read my comment carefully. $\endgroup$– DanMar 11, 2015 at 16:48
-
1$\begingroup$ @Dan Jeez I'm sorry, my eyes are playing tricks. $\endgroup$– user4894Mar 11, 2015 at 17:41
2 Answers
While I'm not sure what you exactly mean by your comment about fractals, there is a few examples that come to mind, where computer technology contributes to mathematics,
The proof of the four color theorem that heavily relies on verification by computer programs.
There are algorithms to automatically discover and prove certain hypergeometric identities, see the book A=B by M. Petkovsek, S. Wilf and D. Zeilberger.
Computations and simulations can often give good inspiration in search of new mathematical relations, especially in fields like numerical analysis. This approach is referred to as Experimental Mathematics.
There are attempts at formalizing the foundations of mathematics using computers. Goals are for example verification of (complicated) existing proofs, but some also dream of automating the process of mathematical discovery and proof altogether. However, as far as I'm informed this is still quite far from reality.
A wood-worker has many tools in their shed
For example, a wood-worker might have:
- Crescent wrenches 🔧
- Files
- Rasps
- Wire-cutters
- Pliers
- A paint-brush 🖌️
- Electric drills
- Awls
- screw-drivers🪛
Computer scientists have discovered many tools which the computer scientists shared with mathematicians and mathematicians have discovered many tools which the mathematicians shared with computer scientists
Mathematicians Discover Symbolic-Notation and Indented-Notation with the Help of Computer Scientists
Computer scientists and mathematicians sometimes use different notation from each other.
Some people write mathematics using a lot of English words. Examples of mathematical statements written with a lot of English are shown below:
EXAMPLE NUMBER | EXAMPLE USING ENGLISH WORDS |
---|---|
1 | Let $\mathcal{X}$ be a countable set. |
2 | We could take $\mathcal{X}$ to be the set of all whole numbers greater than or equal to one. |
3 | Let $\mathcal{F}$ be any invertible function from $\mathcal{X}$ to $\mathcal{X}$ |
4 | Suppose that the whole numbers are integers greater than or equal to one and let $\mathcal{F}$ be a function from the whole numbers to the whole numbers such that for any whole number $x$, the evaluation of $\mathcal{F}$ at $x$ is the square of $x$. |
I would say that computer scientists provide more tools than mathematicians for use of symbolic notation.
EXAMPLE NUMBER | EXAMPLE USING SYMBOLIC NOTATION |
---|---|
1 | Let $\mathcal{X}$ be a countable set. |
2 | We could take $\mathcal{X} = \begin{Bmatrix} n \in \mathbb{N}: n \geq 1 \end{Bmatrix}$. |
3 | Let $\mathcal{F}$ map $\mathcal{X} \xrightarrow{\text{ }} \mathcal{X}$ |
4 | Let $\mathcal{F} \text{ map } \dfrac{\mathbb{N}}{\{1\}} \xrightarrow{\text{ }} \dfrac{\mathbb{N}}{\{1\}} : \forall x \in \dfrac{\mathbb{N}}{\{1\}}, \mathcal{F}(x) = x^{1/2}$ |
I would say that one of the greatest contributions of computer scientists to notation for mathematicians would be the use of indentation to make sentences more readable.
An example of math written using indentation is shown below. Our example of indented notation for mathematics describes a variant on the famous principle of mathematical induction:
For any countable set A,
For any predicate p on set A
p(a) for all a in A
if and only if
exists a function F from Z to A such that all of the following numbered properties are satisfied...
(1) for any y in Z,
exists x in Z such that
p(f(x))
and
x < y
(2) for any y in Z,
exists z in Z such that
p(f(z))
and
y < z
(3) for any x in Z and for any z in Z,
if
p(f(x)) and p(f(z))
then
exists y in Z such that
p(f(y))
and
x <= y <= z
Informally, the stuff shown above says that if you have a chain of infinite length, then every link of the chain is colored black if and only if all of the following:
There always exists a chain link really far to the left which is colored black.
There always exists a chain link really far to the right which is colored black.
After assuming that two chain links are black, it is possible to prove that a link in-between those two chain links is also colored black.
Computer scientists regularly use indented-notation when writing code in Java, C++, C#, D, MatLab, Sage-Math, Bash, Python, Java-Script, and more.
An example of some code written using python-style syntax is shown below. This particular example contains a few mistakes, but it should give you the general idea that computer-scientists sometimes use some indentation to make their writing easier for people to read than writing which does not use any indentation.
class StringTools:
next = next
iter = iter
str = str
type = type
list = list
# itertools = cls.itertools
import itertools
@classmethod
def psani(cls, *_args):
"""
`psani` ... `partially sanitize function inputs`
"""
# `_args` with an underscore is metaphorically private
# `_args` is un-modified
# `_args` can be used for raising exceptions
# `_args` can be used for error messages
# begin sanitizing function inputs
try:
remainder_of_body = cls.iter(_args)
face = cls.next(remainder_of_body)
while not isinstance(face, str):
face = cls.iter(face)
# constructor = cls.type(face).__call__
new_face = cls.next(face)
remainder_of_body = cls.itertools.chain(face, remainder_of_body)
face = new_face
except StopIteration:
# `face` is not iterable
face = str(face)
constructor = tuple.__call__
# TO DO: constructor should be the type
# of the container which contained
# the first string we enounter.
return (constructor, face, remainder_of_body)
# finish sanitizing function inputs
@classmethod
def camel_to_underscore(cls, *_args):
"""
# DOCUMENTATION #
THERE ARE EXAMPLES OF HOW TO USE THIS FUNCTION.
## BEGIN EXAMPLE OF"getUserInput()" ##
INPUT:
STRING "getUserInput()"
OUTPUT:
STRING "get_user_input()"
## BEGIN FRUITY EXAMPLE ##
INPUT:
# var-name `ifruits` stands for `input fruits`
ifruits = [
"RedDeliciousApples",
"GrannySmithApples",
"ConcordGrapes",
"GreenGrapes",
]
Outputs:
# var-name `ofruits` stands for `input fruits`
ofruits = [
"red_delicious_apples",
"granny_smith_apples",
"concord_grapes",
"green_grapes",
]
"""
# `_args` with an underscore is metaphorically private
# `_args` is un-modified
# `_args` can be used for raising exceptions
# `_args` can be used for error messages
# begin partially sanitizing function inputs
constructor, face, remainder_of_body = cls.psani(*_args)
# `face` is a string
# `remainder_of_body` is either...
# * a string
# * an iterable of strings
# finish partially sanitizing function inputs
# begin...
ostring = cls._camel_to_underscore(face)
leftovers = cls.camel_to_underscore(remainder_of_body)
# finish...
# begin...
leftovers_it = cls.iter(leftovers)
# finish
# begin...
if constructor is cls.str.__call__:
ostring_it = cls.iter([ostring])
else:
ostring_it = cls.iter(ostring)
# end
# begin...
oit = cls.itertools.chain(ostring_it, leftovers_it)
# finish
# begin...
othing = constructor(oit)
# finish
# begin outputing the output string
return othing
# finish outputing the output string
@classmethod
def _camel_to_underscore(cls, istring:str):
"""
this method is private
"""
# some variable names begin with `i` for `input`
# some variable names begin with `o` for `output`
it = cls.iter(istring)
# The implementation below is mess of nested-loops,
# buffers, boolean flags, and test-conditions.
buffer = []
oleft_most_letter = cls.next(it).lower()
buffer.append(oleftmost_letter)
# `ich` stand for `input character`
for ich in it:
low_ch = ch.lower()
if low_ch != ch: # if ch is upper-case
# put an underscore (_) to the left of low_ch
# Examples
# "A" --> "_a"
# "B" --> "_b"
# "C" --> "_c"
buffer.append("_")
buffer.append(low_ch)
ostring = "".join(buffer)
return ostring
Computer scientists sometimes...
- write only one sentence per line
- indent statements.
Writing only one statement on each line, and indenting text, can improve readability.
So, computer scientists discovered notation which sometimes helps mathematicians.
Discovery of an Alternative Notation for Number Theory with the Help of Computer Scientists
The statement about the numbers $97$ and $17$ has the same semantics (same meaning), but different syntax (it is spelled differently).
$17 ≡ 97 (\text{mod }10)$.
So far, I showed you how mathematicians would write things.
However, computer scientists are more likely than mathematicians to think about in terms of Computer-English.
The leftovers you get when you divide $17$ by $10$ is equal to the left-overs you get when you divide $97$ by $10$.
If we translate Computer-English into purely symbolic notation, we have:
(17 % 10) == (97 % 10)
- $17 % 10$ is $7$.
- Also, $97 % 10$ is $7$.
- Therefore, we have something like $7 = 7$.
In my opinion, the formulas written by computer scientists for dividing whole numbers and finding remainders is cleaner than notation used by mathematicians before computer were invented.
Discovery of Classes and Class-Attributes in Mathematics as an Alternative to Tuples of Sets Thanks to Computer Scientists
There exist mathematicians who sometimes defined mathematical objects to be tuples of sets.
For example, a mathematician might define something they call a flow network where the item third from the left inside the tuple $(V, E, f)$ is the cost-function. It can be difficult to remember that the thing third from the left is the cost-function, and that the item second from the left inside of the tuple is not the cost-function.
Computer Scientists introduced the notion of classes and class methods, in-part, to make more readable notation for mathematicians.
Some examples which compares and contrasts tuples-of-sets to classes-with-methods are shown below:
Definition of Graph Using Classes and Attributes
We define a simple graph to be a class $G$ such that the attributes of $G$ are:
- $G.vertices$
- $G.edges$
...where...
$G.verticies$ is a finite set.
... and ...
$G.edges = \{P \subseteq \mathscr{P}(G.vertices): |P| = 2\}$
... and ...
$\mathscr{P}(G.vertices)$ is the set of all sub-sets of the attribute named $G.vertices$
Definition of simple graph Using Tuples of Sets
We define a simple graph to be an ordered pair $(V, E)$ such that $V$ is a finite set and $E = \{P \subseteq \mathscr{P}(V): |P| = 2\}$ and $\mathscr{P}(V)$ is the set of all sub-sets of the attribute named $V$
Discovery of Self-Documenting Variable Names in Mathematics made with the Help of Computer Scientists
Mathematicians and other people sometimes have trouble with variable names which are one letter long such as x, y, and z.
Computer Scientists discovered notation to solve this problem.
The Computer Scientists minted and coined the phrase, "self-documenting variable names" to describe variables with easy-to-read labels.
IN THE STYLE OF MATHEMATICIANS | IN THE STYLE OF COMPUTER SCIENTISTS |
---|---|
$a = h * w$ | area = height * width |