80
Krystal Guo Universit´ e libre de Bruxelles CMS mini-course 2019, Regina Using SageMath in Research

Using SageMath in Research - Krystal Guo

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Using SageMath in Research - Krystal Guo

Krystal Guo

Universite libre de Bruxelles

CMS mini-course 2019, Regina

Using SageMath in Research

Page 2: Using SageMath in Research - Krystal Guo

What is sage?

SageMath is a free open-source mathematicssoftware system.

Page 3: Using SageMath in Research - Krystal Guo

What is sage?

SageMath is a free open-source mathematicssoftware system.

It’s an alternative to:

Magma

Maple

Mathematica

MATLAB

Page 4: Using SageMath in Research - Krystal Guo

What is sage?

SageMath is a free open-source mathematicssoftware system.

It’s an alternative to:

Magma

Maple

Mathematica

MATLAB

algebracombinatoricsgraph theorynumericalanalysisnumber theorycalculusstatistics

Page 5: Using SageMath in Research - Krystal Guo

What is sage?

SageMath is a free open-source mathematicssoftware system.

It’s an alternative to:

Magma

Maple

Mathematica

MATLAB

SageMath was started by William Stein.

algebracombinatoricsgraph theorynumericalanalysisnumber theorycalculusstatistics

Page 6: Using SageMath in Research - Krystal Guo

Guess this graph

Page 7: Using SageMath in Research - Krystal Guo

Goals for this mini-course

give you an idea of how ”casual” uses of sage inresearch

Page 8: Using SageMath in Research - Krystal Guo

Goals for this mini-course

give you an idea of how ”casual” uses of sage inresearch

For those who don’t program much: a window intowhat it can do, so you can use it, if you want to.

Page 9: Using SageMath in Research - Krystal Guo

Goals for this mini-course

give you an idea of how ”casual” uses of sage inresearch

For those who don’t program much: a window intowhat it can do, so you can use it, if you want to.

For those with programming background:suggest new contexts for using sage

Page 10: Using SageMath in Research - Krystal Guo

Goals for this mini-course

give you an idea of how ”casual” uses of sage inresearch

For those who don’t program much: a window intowhat it can do, so you can use it, if you want to.

For those with programming background:suggest new contexts for using sage

To introduce everyone to my favourite graph

Page 11: Using SageMath in Research - Krystal Guo

The When/Where/Why

Page 12: Using SageMath in Research - Krystal Guo

Checking conjectures and counterexamples

Theorem (Mohar 2013)

Every connected subcubic bipartite graph thatis not isomorphic to the Heawood graph has atleast one (in fact a positive proportion) of itseigenvalues in the interval [−1, 1].

Page 13: Using SageMath in Research - Krystal Guo

Checking conjectures and counterexamples

Theorem (Mohar 2013)

Every connected subcubic bipartite graph thatis not isomorphic to the Heawood graph has atleast one (in fact a positive proportion) of itseigenvalues in the interval [−1, 1].

Question: what about (−1, 1)?

Page 14: Using SageMath in Research - Krystal Guo

Checking conjectures and counterexamples

Theorem (Mohar 2013)

Every connected subcubic bipartite graph thatis not isomorphic to the Heawood graph has atleast one (in fact a positive proportion) of itseigenvalues in the interval [−1, 1].

Question: what about (−1, 1)?We construct an infinite family of connected cubicbipartite graphs which have no eigenvalues in theopen interval (−1, 1).

Page 15: Using SageMath in Research - Krystal Guo

Checking conjectures and counterexamples

Theorem (Mohar 2013)

Every connected subcubic bipartite graph thatis not isomorphic to the Heawood graph has atleast one (in fact a positive proportion) of itseigenvalues in the interval [−1, 1].

Question: what about (−1, 1)?We construct an infinite family of connected cubicbipartite graphs which have no eigenvalues in theopen interval (−1, 1).

Found by searching the census of cubicvertex-transitive graphs.

Page 16: Using SageMath in Research - Krystal Guo

Visualizing new mathematical objects

Continous quantum walk

Transition matrix of the quantum walk

U(t) = eitA

where A is the adjacency matrix of agraph.

Page 17: Using SageMath in Research - Krystal Guo

Visualizing new mathematical objects

Continous quantum walk

Transition matrix of the quantum walk

U(t) = eitA

where A is the adjacency matrix of agraph.

U(t) =

Page 18: Using SageMath in Research - Krystal Guo

Visualizing new mathematical objects

Continous quantum walk

Transition matrix of the quantum walk

U(t) = eitA

where A is the adjacency matrix of agraph.

U(t) =u

v

Page 19: Using SageMath in Research - Krystal Guo

Visualizing new mathematical objects

Continous quantum walk

Transition matrix of the quantum walk

U(t) = eitA

where A is the adjacency matrix of agraph.

U(t) =u

v

Page 20: Using SageMath in Research - Krystal Guo

Visualizing new mathematical objects

Continous quantum walk

Transition matrix of the quantum walk

U(t) = eitA

where A is the adjacency matrix of agraph.

U(t) =u

v

t 7→ (xt, yt)U(t)u,v = xt + iyt

Page 21: Using SageMath in Research - Krystal Guo

Plotting

U(t)a,b for t ∈ [0, 100].

Page 22: Using SageMath in Research - Krystal Guo

Plotting

U(t)a,b for t ∈ [0, 100].

Page 23: Using SageMath in Research - Krystal Guo

Plotting

U(t)a,b for t ∈ [0, 100].500].

Page 24: Using SageMath in Research - Krystal Guo

Plotting

U(t)a,b for t ∈ [0, 100].500].

Page 25: Using SageMath in Research - Krystal Guo

Other reasons to use SageMath

Build intuition by looking at small examples.

Page 26: Using SageMath in Research - Krystal Guo

Other reasons to use SageMath

Build intuition by looking at small examples.

Dry run for serious programming.

Page 27: Using SageMath in Research - Krystal Guo

Other reasons to use SageMath

Build intuition by looking at small examples.

Dry run for serious programming.

Resource: cython

Page 28: Using SageMath in Research - Krystal Guo

Other reasons to use SageMath

Build intuition by looking at small examples.

Dry run for serious programming.

Resource: cython

Calculator

Page 29: Using SageMath in Research - Krystal Guo

Other reasons to use SageMath

Build intuition by looking at small examples.

Dry run for serious programming.

Resource: cython

Calculator

.... many other uses!

Page 30: Using SageMath in Research - Krystal Guo

Get to know SageMath!

sage: runfile cms-guessthisgraph.sage

g1, g2, g3 have been defined

sage: g1.

clique_number()

degree()

diameter()

girth()

complement()

is_regular()

is_bipartite()

is_clique()

is_chordal()

is_planar()

is_connected()

Page 31: Using SageMath in Research - Krystal Guo

Constructing an awesome graph

We will demonstrate SageMath by constructing aspecific graph. We will use the following ingredients:

Projective geometry, hyperovals, finite fields.

Page 32: Using SageMath in Research - Krystal Guo

Strongly regular graphs

A strongly regular graph with parameters (n, k, a, c) is

Page 33: Using SageMath in Research - Krystal Guo

Strongly regular graphs

A strongly regular graph with parameters (n, k, a, c) is

a graph on n vertices such that

Page 34: Using SageMath in Research - Krystal Guo

Strongly regular graphs

A strongly regular graph with parameters (n, k, a, c) is

a graph on n vertices such that

k

Page 35: Using SageMath in Research - Krystal Guo

Strongly regular graphs

A strongly regular graph with parameters (n, k, a, c) is

a graph on n vertices such that

k a

Page 36: Using SageMath in Research - Krystal Guo

Strongly regular graphs

A strongly regular graph with parameters (n, k, a, c) is

a graph on n vertices such that

k a c

Page 37: Using SageMath in Research - Krystal Guo

Strongly regular graphs

Example: (25, 8, 3, 2).

A strongly regular graph with parameters (n, k, a, c) is

a graph on n vertices such that

k a c

Page 38: Using SageMath in Research - Krystal Guo

How do we construct strongly regular graphs?

One way is as the point (or line) graphs of anincidence structure.

Page 39: Using SageMath in Research - Krystal Guo

How do we construct strongly regular graphs?

One way is as the point (or line) graphs of anincidence structure.

Page 40: Using SageMath in Research - Krystal Guo

How do we construct strongly regular graphs?

One way is as the point (or line) graphs of anincidence structure.

Page 41: Using SageMath in Research - Krystal Guo

How do we construct strongly regular graphs?

One way is as the point (or line) graphs of anincidence structure.

Page 42: Using SageMath in Research - Krystal Guo

How do we construct strongly regular graphs?

One way is as the point (or line) graphs of anincidence structure.

Point graphvertices:adjacent if on thesame block

Page 43: Using SageMath in Research - Krystal Guo

How do we construct strongly regular graphs?

One way is as the point (or line) graphs of anincidence structure.

Point graphvertices:adjacent if on thesame block

Page 44: Using SageMath in Research - Krystal Guo

How do we construct strongly regular graphs?

One way is as the point (or line) graphs of anincidence structure.

Point graphvertices:adjacent if on thesame block

Page 45: Using SageMath in Research - Krystal Guo

How do we construct strongly regular graphs?

One way is as the point (or line) graphs of anincidence structure.

Point graphvertices:adjacent if on thesame block

Block graph

Page 46: Using SageMath in Research - Krystal Guo

How do we construct strongly regular graphs?

One way is as the point (or line) graphs of anincidence structure.

Point graphvertices:adjacent if on thesame block

Block graph

Page 47: Using SageMath in Research - Krystal Guo

How do we construct strongly regular graphs?

One way is as the point (or line) graphs of anincidence structure.

Point graphvertices:adjacent if on thesame block

Block graph

Page 48: Using SageMath in Research - Krystal Guo

How do we construct strongly regular graphs?

One way is as the point (or line) graphs of anincidence structure.

Point graphvertices:adjacent if on thesame block

Block graph

We get a strongly regular graph as a point (orblock) graph if we pick a ”nice” incidence structure.

Page 49: Using SageMath in Research - Krystal Guo

A ”nice” incidence structure

A generalized quadrangle is a pair (P,B)satisfying the following two axioms:

Page 50: Using SageMath in Research - Krystal Guo

A ”nice” incidence structure

A generalized quadrangle is a pair (P,B)satisfying the following two axioms:

any two points of P are on at most one linein B;

Page 51: Using SageMath in Research - Krystal Guo

A ”nice” incidence structure

A generalized quadrangle is a pair (P,B)satisfying the following two axioms:

any two points of P are on at most one linein B;

if point p ∈ P is not on line ` ∈ B, thenthere exists a unique point q ∈ ` such that pand q are collinear.

Page 52: Using SageMath in Research - Krystal Guo

A ”nice” incidence structure

A generalized quadrangle is a pair (P,B)satisfying the following two axioms:

any two points of P are on at most one linein B;

if point p ∈ P is not on line ` ∈ B, thenthere exists a unique point q ∈ ` such that pand q are collinear.

Page 53: Using SageMath in Research - Krystal Guo

A ”nice” incidence structure

A generalized quadrangle is a pair (P,B)satisfying the following two axioms:

any two points of P are on at most one linein B;

if point p ∈ P is not on line ` ∈ B, thenthere exists a unique point q ∈ ` such that pand q are collinear.

Page 54: Using SageMath in Research - Krystal Guo

A ”nice” incidence structure

A generalized quadrangle is a pair (P,B)satisfying the following two axioms:

any two points of P are on at most one linein B;

if point p ∈ P is not on line ` ∈ B, thenthere exists a unique point q ∈ ` such that pand q are collinear.

Page 55: Using SageMath in Research - Krystal Guo

A ”nice” incidence structure

A generalized quadrangle is a pair (P,B)satisfying the following two axioms:

any two points of P are on at most one linein B;

if point p ∈ P is not on line ` ∈ B, thenthere exists a unique point q ∈ ` such that pand q are collinear.

There will be parameters (s, t) such that:

each point is on t+ 1 lines;each line is on s+ 1 points

Page 56: Using SageMath in Research - Krystal Guo

How do we get a generalized quadrangle?

We will construct a particular generalizedquadrangle, denoted in the literature asT ∗2 (O).

Page 57: Using SageMath in Research - Krystal Guo

How do we get a generalized quadrangle?

We will construct a particular generalizedquadrangle, denoted in the literature asT ∗2 (O).

For this, we will need the following:

Page 58: Using SageMath in Research - Krystal Guo

How do we get a generalized quadrangle?

We will construct a particular generalizedquadrangle, denoted in the literature asT ∗2 (O).

For this, we will need the following:

finite field, GF (q), where q iseven;

Page 59: Using SageMath in Research - Krystal Guo

How do we get a generalized quadrangle?

We will construct a particular generalizedquadrangle, denoted in the literature asT ∗2 (O).

For this, we will need the following:

finite field, GF (q), where q iseven;

projective space over GF (q); and

Page 60: Using SageMath in Research - Krystal Guo

How do we get a generalized quadrangle?

We will construct a particular generalizedquadrangle, denoted in the literature asT ∗2 (O).

For this, we will need the following:

finite field, GF (q), where q iseven;

projective space over GF (q); and

a hyperoval in projective plane overGF (2h).

Page 61: Using SageMath in Research - Krystal Guo

Projective space

(Finite) projective space PG(n, q) is anincidence structure in the n+ 1-dimensionalspace over GF (q), where q is a prime power,where:

points: 1-dimensional subspaces

lines: 2-dimensional subspaces

planes: 3-dimensional subspaces

...

Page 62: Using SageMath in Research - Krystal Guo

Hyperovals

In PG(2, q), where q = 2h, we can have q + 2point where no points are collinear.

Page 63: Using SageMath in Research - Krystal Guo

Hyperovals

In PG(2, q), where q = 2h, we can have q + 2point where no points are collinear.

Such a set of q+2 points is called a hyperoval.

Page 64: Using SageMath in Research - Krystal Guo

Hyperovals

In PG(2, q), where q = 2h, we can have q + 2point where no points are collinear.

Such a set of q+2 points is called a hyperoval.

Fact:

Page 65: Using SageMath in Research - Krystal Guo

Hyperovals

In PG(2, q), where q = 2h, we can have q + 2point where no points are collinear.

Such a set of q+2 points is called a hyperoval.

Fact: Every hyperoval has the following form:

Page 66: Using SageMath in Research - Krystal Guo

Hyperovals

In PG(2, q), where q = 2h, we can have q + 2point where no points are collinear.

Such a set of q+2 points is called a hyperoval.

Fact: Every hyperoval has the following form: 1

tf(t)

, t ∈ GF (q)

∪010

,

001

.

Page 67: Using SageMath in Research - Krystal Guo

Hyperovals

In PG(2, q), where q = 2h, we can have q + 2point where no points are collinear.

Such a set of q+2 points is called a hyperoval.

Fact: Every hyperoval has the following form: 1

tf(t)

, t ∈ GF (q)

∪010

,

001

.

Open problem: classify all f(t) which give hyperovals.

Page 68: Using SageMath in Research - Krystal Guo

Hyperovals

In PG(2, q), where q = 2h, we can have q + 2point where no points are collinear.

Such a set of q+2 points is called a hyperoval.

Fact: Every hyperoval has the following form: 1

tf(t)

, t ∈ GF (q)

∪010

,

001

.

Open problem: classify all f(t) which give hyperovals.

Some f(t) which work:

t2, t6, t2k

where k, h are coprime

Page 69: Using SageMath in Research - Krystal Guo

The construction

PG(3, 2h)

Page 70: Using SageMath in Research - Krystal Guo

The construction

PG(3, 2h)

AG(3, 2h)

PG(2, 2h)

Page 71: Using SageMath in Research - Krystal Guo

The construction

PG(3, 2h)

AG(3, 2h)

PG(2, 2h)

hyperoval

Page 72: Using SageMath in Research - Krystal Guo

The construction

PG(3, 2h)

AG(3, 2h)

PG(2, 2h)

hyperoval

points

blocks

This will give a generalized quadrangle of order(q − 1, q + 1), where q = 2h.

Page 73: Using SageMath in Research - Krystal Guo

Give it a go!

sage: gq4 = GQTstar(GF(4),"hyperconic")

sage: h = pointsGraph(gq4)

Page 74: Using SageMath in Research - Krystal Guo

Try some stuff in SageMath!

lsq is a list of graphs, each of which is a Latinsquare graph of order 7, on 49 vertices.

Page 75: Using SageMath in Research - Krystal Guo

Try some stuff in SageMath!

lsq is a list of graphs, each of which is a Latinsquare graph of order 7, on 49 vertices.

If you can colour G with 7 colours, thenadding a complete graph on each colourclass will give another strongly regulargraph.

Page 76: Using SageMath in Research - Krystal Guo

Try some stuff in SageMath!

lsq is a list of graphs, each of which is a Latinsquare graph of order 7, on 49 vertices.

If you can colour G with 7 colours, thenadding a complete graph on each colourclass will give another strongly regulargraph.

G

Page 77: Using SageMath in Research - Krystal Guo

Try some stuff in SageMath!

lsq is a list of graphs, each of which is a Latinsquare graph of order 7, on 49 vertices.

If you can colour G with 7 colours, thenadding a complete graph on each colourclass will give another strongly regulargraph.

G

. . .

Page 78: Using SageMath in Research - Krystal Guo

Try some stuff in SageMath!

lsq is a list of graphs, each of which is a Latinsquare graph of order 7, on 49 vertices.

If you can colour G with 7 colours, thenadding a complete graph on each colourclass will give another strongly regulargraph.

G

. . .

Page 79: Using SageMath in Research - Krystal Guo

Or ...

Construct the following graphs. Are theyisomorphic?

Page 80: Using SageMath in Research - Krystal Guo

Installing sage

https://doc.sagemath.org/html/en/installation/