For the purposes of a lecture on computational applied mathematics, I wanted to illustrate the solution of nonlinear simultaneous equations by first employing contour plots or grid search techniques to find approximate solutions before using these approximate solutions as starting values for more accurate quasi-newton root finding methods. I decided to illustrate these techniques usingContinue reading “Contour plots for Newtonian and relativistic elastic collision equations”
Author Archives: Dr Christian P. H. Salas
Python simulation of a threshold phenomenon in a general epidemic
For a lecture on deterministic and stochastic general epidemic models, I ran a Python simulation illustrating a threshold phenomenon which determines how an epidemic evolves. I want to record the results of this here. In a general epidemic model, we assume a closed community of individuals and classify those individuals into three groups, those whoContinue reading “Python simulation of a threshold phenomenon in a general epidemic”
On the equilibration of M/M/1 queues
The M/M/1 queue is the simplest Markov queueing model, and yet it is already sufficiently complicated to make it impractical in an introductory queueing theory lecture to derive time-dependent probability distributions for random variables of interest such as queue size and queueing time. A simpler approach is to assume the queue eventually reaches a steadyContinue reading “On the equilibration of M/M/1 queues”
Why we can omit the modulus symbol in ln(|x|) in the integrating factor method
During a lecture on the solution of standard ODEs, a student asked why we use as the solution of the integral in the exponent of an integrating factor rather than the formally correct antiderivative . In particular, the student was concerned about the omission of the modulus symbol around the . The explanation is notContinue reading “Why we can omit the modulus symbol in ln(|x|) in the integrating factor method”
Using Prüfer sequences to count and classify irreducible labelled 10-node trees
In the cult classic movie Good Will Hunting (Miramax, 1997), a maths-genius janitor played by a young Matt Damon secretly solves challenge problems in graph theory written on a blackboard by an MIT maths professor for his students. One of these problems, which Will can be seen solving in the above screenshot from the movie,Continue reading “Using Prüfer sequences to count and classify irreducible labelled 10-node trees”
A max-flow/min-cut network problem solved both manually and with Python
For a lecture on digraphs and network flows, I prepared the following capacitated directed network problem in order to explore its solution both manually via a maximum-flow/minimum-cut algorithm and computationally using the NetworkX library in Python: The number on each arc represents the flow capacity of that arc and the vertices and are the sourceContinue reading “A max-flow/min-cut network problem solved both manually and with Python”
Using the Python library NetworkX to find all Hamiltonian cycles in a graph
For the purposes of a lecture in graph theory, I created the following example of a Hamiltonian graph consisting of the complete graphs , and joined pairwise by an edge: The Python library NetworkX can be used to perform many of the calculations that arise in graph theory and networks and I used it inContinue reading “Using the Python library NetworkX to find all Hamiltonian cycles in a graph”
Boltzmann distribution, Gibbs-Shannon entropy and Helmholtz free energy
Consider a so-called canonical ensemble consisting of a system , a heat bath , and the total closed system containing and , with corresponding energies , and respectively so that with fixed. For example, could represent a single 1-D lattice of spins in the Ising Model, could consist of a heat bath with which isContinue reading “Boltzmann distribution, Gibbs-Shannon entropy and Helmholtz free energy”
Zero-field singularity of magnetic susceptibility in a 4-D Ising model
For the purposes of a lecture on simulating the Ising model of ferromagnetism using the Metropolis-Hastings algorithm, I explored the behaviour of magnetic susceptibility on a four-dimensional hypercube lattice. In particular, I wanted to test a well-known prediction of theoretical physics that a zero-field singularity should appear at a certain critical temperature. The idea isContinue reading “Zero-field singularity of magnetic susceptibility in a 4-D Ising model”
Fourier transform of a function that is scaled and translated in either order
Consider a function with Fourier transform where Then it is straightforward to show that the Fourier transform of the scaled function is and the Fourier transform of the -translated function is What is a little less straightforward is to deduce from these what the Fourier transform must be of a function that has been bothContinue reading “Fourier transform of a function that is scaled and translated in either order”
