Last Update: Feb. 18, 2025
Experimental Mathematics used to be considered an oxymoron, but the future of mathematics is in that direction. In addition to learning the philosophy and methodology of this budding field, students will become computer-algebra wizards, and that should be very helpful in whatever mathematical specialty they are doing (or will do) research in.
We will first learn Maple, and how to program with it. This semester we will learn, from an experimental mathematics point of view, Quantum computing and algorithmic graph theory. People who already took previous editions of this class are welcome to take it again, since except for the basics, there is very little overlap with previous years.
This class is suitable for graduate students in other departments, and the software development skills learned will be useful for doing any quantitative research. Very smart advanced undergraduates are also welcome. In particular, the methods learned should be applicable almost everywhere.
For more details, see this 2002 masterpiece.
It should be sent to the email address
ShaloshBEkhad at gmail dot com
Subject: HomeWork#X
and then attach a .txt file(s) called
hwXYourFirstNameYourLastName.txt
where X is the number of the assignment
Except for the first assignment, you should have two attached .txt files.
For example, when David Hilbert submits homework assignments 2 and 3, he should email ShaloshBEkhad at gmail dot com, with
Subject: HomeWork#2#3
and attach the text files (the source code plus human comments (such lines must start with #)
hw2DavidHilbert.txt and hw3DavidHilbert.txt
#Please do not post homework
or
#OK to post homework
Followed by
#Your Name, Date, Assignment X
Subject: HomeWork#1
and an attachment
hw1FirstNameLastName.txt
and indicate whether it is OK to post. If you do not say "Please do not post", it will be posted.
Write a procedure AM(G) that inputs a graph [n,E] and outputs the adjacency matrix, represented as a list of lengthn of lists of length n, such that M[i][j]=1 if {i,j} belongs to E and 0 otherwise. For example
AM([2,{{1,2}});
should output [[0,1],[1,0]] .
Image(pi,G)
that inputs a permutation pi of {1,...,n} and a graph G=[n,E] and outputs the image under pi.
ULgraphs(n)
that outputs a set of graphs with ONE member of each equivalence class.
What is
[seq(nops(ULgraphs(i)),i=1..6)]
Is is in the OEIS? What is its A-number.
Added Jan. 26, 2025: Students' homework (that they kindly agreed to be posted) are in this directory
RG(n,p)
Cliques(G,k): inputs a graph G and a pos. integer k outputs the set of k-cliques
Subject: HomeWork#2
and an attachment
hw2FirstNameLastName.txt
and indicate whether it is OK to post. If you do not say "Please do not post", it will be posted.
[Optional for novices] Write a procedure
TotClique(G,k)
that inputs a graph G=[n,E] and a positive integer k, and outputs the total number of k-cliques and k-anti-cliques.
CheckRamsey(k,K), that inputs a positive intgeger k and a large integer K that picks K random graphs (using RG(18,1/2)) and finds the minimum of ToClique(G,4);
EstimateAverageClique(n,p,k,K)
that estimates the average number of cliques of size k in a random graph given by RG(n,p) by picking K of them and averaging.
What did you get for
EstimateAverageClique(10,1/2,4,10000)?
[Optional challenge, 5 dollars] Find a closed-form expression for the average number of k-cliques in a graph with p vertices where the prob. of every edge showing up is p.
Added Feb. 2, 2025: Students' homework (that they kindly agreed to be posted) are in this directory
C3.txt , Contains procedures (in addition to those of C1.txt and C2.txt listed in Help1(); and Help2(); respectively)
NuCG(n): the first n terms of the sequence enumerating CONNECTED labeled graphs on n vertices, in other words sequence OEIS A001187 , done by brute force
NuCGc(n): the first n terms of the sequence enumerating CONNECTED labeled graphs on n vertices, in other words sequence OEIS A001187 , done cleverly, using Exponential Generting Function, the fact that
Sum(CC[i]/i!*z^i,i=0..infinity)= log(Sum(2^binomial(i,2)/i!*z^i,i=0..infinity)
Subject: HomeWork#3
and an attachment
hw3FirstNameLastName.txt
and indicate whether it is OK to post. If you do not say "Please do not post", it will be posted.
PC:=proc(n,p,K) local i:evalf(coeff(add(IsCo(RG(n,p)),i=1..K),true,1)/K):end:
is an estimate, with large enough K (say at least 200), for the probability of coonectivity of a random graph with n edges where every edge is picked with prob. p (the Edros-Renyi model)
With n=10,20,30, and p=1/10, 2/10, ... and K=200 experiment and try to estimate the threshhold for connectivity, i.e. when it changes being very unlikely to very likely.
Procedure NuCCc(n) outputs the first n terms (starting at n=1) of OEIS sequence A1187 that counts the sequence let's call it C[n], of the number of connected labeled graphs with n vertices. It is based on the formula
Sum(C[n]*z^n/n!,n=0..infinity)=log(Sum(2^(n*(n-1)/2)*z^n/n!,n=0..infinity)
Let P[n](x) be the polynomial in x whose coefficient of x^r is the number of labeled connected graphs on n vertices and EXACTLY r edges. Convince yourself (or believe) that using generating functions one has the formula
Sum(P[n](x)*z^n/n!,n=0..infinity)=log(Sum((1+x)^(n*(n-1)/2)*z^n/n!,n=0..infinity)
Write a procedure
NuCGx(n,x)
that inputs a pos. integer n and a variable x, and outputs a list of length n whose i-th entry is P[i](x)
Convince yourself that the lowest power (lowdegree in Maple) of P[n](x) is n-1. Using NuCGx(n,x) (make sure to put "option remember" there), Write a procedure
NuCGk(n,k)
that inputs a positive integer n and a non-negative integer k and outputs the sequence of cofficients of x^(n-1+k) of P[n](x)
What OEIS number is NuCGk(n,0)?
What OEIS number is NuCGk(n,1)? (if it exists)
Keep upping k and see the largest k for which NuCGk(n,k) is in the OEIS
C4.txt , Contains procedures (in addition to those of C1.txt and C2.txt and C3.txt listed in Help1(); and Help2(); Help3(); respectively)
Subject: HomeWork#4
and an attachment
hw4FirstNameLastName.txt
and indicate whether it is OK to post. If you do not say "Please do not post", it will be posted.
UM(alpha,beta,gamma,delta)
that implements box 1.1. on p. 20 of the The Nielsen-Chuang book [Note the superflous comma]
For random alpha, beta, gamma, delta apply it to IsUM(A). Also, a litle bit of challenge, prove it for geneal (symbolic) alpha,beta,gamma, delta
Added Feb. 9, 2025: Students' homework (that they kindly agreed to be posted) are in this directory
C5.txt , Contains procedures
Subject: HomeWork#5
and an attachment
hw5FirstNameLastName.txt
and indicate whether it is OK to post. If you do not say "Please do not post", it will be posted.
RandomState(n,K)
that inputs a pos. integer n and a pos. integer K and outputs a random state vector with n complex components whose real and imaginary parts are from -K to K, then normalize it.
GeneralPauli(n)
that inputs a NORMALIZED vector n=[nx,ny,nz]
that constructs the 2 by 2 matrix. at the bottm of p. 349 of the Susskind-Frieman Quantum Mechanics book book.
Find its eigenvalues and eigenvectors.
Added Feb. 9, 2025: Students' homework (that they kindly agreed to be posted) are in this directory
C6.txt ,
ProbDist(L,A): Given an obervalble represented by the Hermitian matrix L and a state vector A (i) the list if eigenvalues (possible outcomes of observing L regardless of the state A (ii) the respective probabilities of the outcome being that eigenvalue, if the system is at state A (iii) the expected value of the outcome
Subject: HomeWork#6
and an attachment
hw6FirstNameLastName.txt
and indicate whether it is OK to post. If you do not say "Please do not post", it will be posted.
AllHM2(K)
that inputs a positive integer K and outputs ALL 2 by 2 matrices of the form
[[a,b+I*c],[b-I*c,d]]
where a,b,c,d, are integers such that 1 ≤ a,b,c,d ≤ K (there are K4 of them
Write a procedure
RealSV2(K)
that inputs a positive integer K and outputs all normalizations of the vectors (i.e. make them unit vectors)
[a,b]
with
where a and b are integers 1 ≤ a,b ≤ K (there are K2 of them
UncertaintyContest(K)
that inputs a positive integer K and goes all throgh the pairs A, B of matrices in AllMH2(K), and RealSV2(K) (quite a few of them) and outpts the triplet [A,B,V] that make CheckUP(A,B,V) as small as possible and as big as possible [Make sure that you exclude the case when A and B commute, since then the ratio is infinity]
What are
UncertaintyContest(2)?, UncertaintyContest(3)?
Added Feb. 16, 2025: Students' homework (that they kindly agreed to be posted) are in this directory
Design a Valentine that says
I love Algorithmic Graph Theory
OR
I love Quantum Computing
email two attachments
ValentineFirstLast.jpg
and ValentineFirstLast.txt (with the source code)
and fill the form
and email ShaloshBEkhad@gmail.com with
Subject: Valentine Ballot
and an attachment
ValentineBallotFirstLast.txt
with your ratings (from 1 to 10, please reserve 0 for your own valentine and for those that have no submissions)
[The winner will get a chocolate box.]
Added Feb. 17: Congratulations to Lucy Martinez for winning first prize.
C7.txt ,
AntiPC(P): inputs a list of length n-2 with entries from {1, ...,n} outputs the tree T such that PC(T)=P
Subject: HomeWork#7
and an attachment
hw7FirstNameLastName.txt
and indicate whether it is OK to post. If you do not say "Please do not post", it will be posted.
NumberOfLeaves(T)
that inputs a labeled tree, T, and outputs the number of leaves (vertices of degree 1). For example
NumberOfLeaves({{1,2},{1,3},{1,4}}); should output 3
RandomTree(n)
that inputs a positive integer n, and outputs a random labeled tree on {1, ...,n}
[Hint: using rand(1..n), generate a random list of length n-2, P, and then let T:=AntiPC(P)]
EstimateAverageNumberOfLeavs(n,K)
that uses simulation to esimates the average number of leaves in a random labeled tree with n vertices
[Hint: run RandomTree(n) K times, for each time find out the number of leaves, add them all up and divide by K.]
What did you get for
EstimateAverageNumberOfLeavs(100,1000)?
EstimateAverageNumberOfLeavs(100,10000)?
Are they close?
limit(an/n, n goes to infinity)
exists, and find its value.
Added Feb. 16, 2025: Students' homework (that they kindly agreed to be posted) are in this directory
C8.txt ,
Read Turing and Abel prizes winner Avi Wigderson's essay (section III.24, pp. 196-199) in the Princeton Companion of Mathematics edited by Sir W. Timothy Gowers.
Subject: HomeWork#8
and an attachment
hw8FirstNameLastName.txt
and indicate whether it is OK to post. If you do not "OK to post", it will not be posted.
By taking V:=RSV(2,100); verify that
add(ExpMV(PM()[i],V)^2,i=1..3)=1
Do it three times. In other words the sum of the squares of the expectation of the three Pauli matrices adds up to 1 for every state vector.
TP(PM()[i],PM()[4])
Let's call them Ax,Ay,Az. For a random state vector, obtained by RSV(4,10), say, write a procedure
EntangelmentAlice(V)
that outputs the sum of the squares of the expected values of Alice's measurement in that state.
RandomProductState4(K)
that outputs a random product state vector of length 4 obtained by taking the tensor product of two RSV(2,K)
What is it for a random product state?
By using RSV(4,10) twenty times, find the vector with maximal entanglemt (i.e. the smallest value of EntanglemtAlice(V)) and the least (closest to 1)