Prison Math Project


The PMP is developing a system that allows people to learn computer programming via (restricted) e-mail — specifically the kind of restricted e-mail systems that are commonly available to inmates at North American prisons. Almost all computer programming courses assume that the learner has access to a computer that can execute computer programs written by the learner. This is for good reason! The joy of seeing one’s own creation actually working is of the foundations of computer science pedagogy. Indeed, attempts have been tried around the world to teach computer programming to individuals without access to such computers, and the results have been mixed at best. The truth is, it just isn’t the same. There is a reason why modern computers have evolved to allow programmers to quickly see what their programs do. Thus, the PMP wants to avoid giving our participants the “second class” experience of trying to learn computer programming without actually being able to see how their programs behave.
To solve this, our idea is two-fold: First, we are in the process of building and beta-testing a software system that will automatically (1) take computer programs written by our participants in e-mail, (2) execute the program, and finally (3) e-mail back any errors that were found in the program and the output produced by the program. Our development test system currently supports Python and Javascript, and we intend to add support for additional programming languages in the future. The second part of our idea is to take open-source computer programming textbooks, like Eloquent Javascript, and gently modify these to explicitly add examples of how to use our system to write the programs discussed in the books. These modified textbooks can then be distributed to participants. 
Because our system will need to use pay-per-use email systems found within prisons, this system will require significant financial support to sustain our operations. Furthermore, the PMP will need to work with prison email systems to ensure that our emails are getting through their filters. This process is highly bureaucratic and often non-responsive, but we are committed to finding ways to make this work!
-Amit Sahai
Symantec Chair Professor of Computer Science, UCLA
Advisor – Prison Mathematics Project

The no-tech programming solution is an innovative approach to allow incarcerated persons the ability to execute code without access to standard programming tools. The participant, using their standard email app, is empowered to send text-based code to our system for execution (see example below):

Afterwards, our tool is able to use the same email client to send the participant the results of their coding. With this, an incarcerated person is able to write code in their desired programming language and have it executed as if they were sitting at a full-fledged computer kitted out for software development!

Our no-tech programming solution sits on top of the incarcerated persons’ standard email client. By sending an email to a specific address, the participant is able to specify the name, language, and actual code to be executed. A Prison-Math-Project server program gets notified that an email has been received, and then goes to work! It captures the email made by the participant, and then executes their code in a secure and isolated manner. The output is then captured and emailed back to the participant; the entire round-trip can occur within minutes! This system allows the incarcerated person to execute text-based code outside the confines of the classroom, and empowers them to begin their learning and development journey independently.


In early 2012, a prisoner by the name Christopher Havens began studying mathematics for the very first time within the prison inside of prison. We know this form of isolation by the name solitary confinement… prisoners know it as “the hole”. Having no other form of stimulation, mathematics occupied every hour of Christopher‘s days, lasting the better part of a year until he was released back into the general population. In so many cases, the negative effects of prolonged isolation manifests itself through the behaviors in both the short and the long term. However, this case is one where a mix of isolation and the transformative powers of mathematics caused Christopher to undergo a steady chain of personal growth while igniting within him a passion for mathematics.

As his studies continued and they began to have deep meaning, he started branching out from the standard curriculum and took an interest in algebraic systems and number theory. In January 2013, these beautiful areas of mathematics inspired him to write a letter to the Annals of Mathematics. Several months later, a single letter was sent from across the ocean to Christopher Havens from Professor Luisella Caire of the Politecnico di Torino, in Italy.
As his long awaited questions began being answered, Luisella supplemented Christopher‘s self-studies by giving him feedback and introducing him to intriguing problems. She provided him with material that would inspire him to explore different areas of mathematics. As Luisella watched Christopher grow, she sent him books and journals, as well as “Math News” letters. Some were personal textbooks used by both her and her husband, Umberto Cerruti, which were sent with personal inscriptions. Unfortunately many of the texts were rejected by Christopher‘s prison for various reasons.

The guidelines for prisoners receiving books are becoming more and more restrictive, and so after a more than a year of so many priceless rejected books, Christopher had the idea of a math program for which he sent across the ocean. Luisella and Christopher sent their ideas back and forth with the rough idea being to establish a math program with a classroom and a library containing every last one of the previously rejected books. In 2015, Christopher was transferred to a minimum security unit as a result of his exceptional behaviors, and he began working to start the program.

In early 2016, after pleading, proposals, and pitches, Christopher sat in a room with one of the Prison’s staff members and watched as the moment of approval came. As the staff member sent emails to the scheduling personnel, the program was missing one thing before it could be finalized.. a name. The staff member turned his head from the screen and said “What are you going to call it?” Christopher responded with “Do I have to give you the name right now?” “Yep… right now.” Having somehow missed this important detail in the planning, Christopher responds with “The Prison Mathematics Project!”. And with a grunt of approval, the PMP was born.

The Prison Mathematics Project holds meetings twice weekly where they discuss mathematics, collaborate on large projects and work together on their very own “PMP Solving Team”. In the Solving Team, prisoners search math magazines (such as MAA Horizons) and solve the problems in the back sections. Unconventional teaching took place to accommodate a group of math enthusiasts whose mathematical maturity varied greatly from one to the other, thus resulting in a truly unique experience for each participant.

In 2016, PMP had its first annual Pi Day celebration inside of a small classroom and by 2017 mathematicians flew from across the globe to see our newly established annual events. PMP events have become an avenue for mathematicians to share their passions for mathematics in the form of lectures in front of an assembly room with upwards of 100 prisoners, all with one commonality – they were hungry to learn. In turn, prisoners give speeches and have contests with both staff and mathematicians. In addition to the limericks being shouted, the interactive experiences, and a level of mathematical hunger never before experienced in prisons, the PMP became a small piece of the mathematical community behind prison walls.