Discrete Mathematics Animations Etc.

Susanna S. Epp

Note: This webpage was created as a resource for students of discrete mathematics, either those using one of my textbooks, Discrete Mathematics with Applications, 4th edition, or Discrete Mathematics: An Introduction to Mathematical Reasoning, or those using any other textbook. The links were live when last checked. If one appears to be dead, it may be possible to find the item by using a keyword search to discover its new location. Please send comments, corrections, and suggestions for new items to susanna.s.epp@gmail.com.

January 2016 update
: Because of the wealth of Java applets created for mathematical topics, this website was originally called “Discrete Mathematics Applets Etc.”. However in 2015 browsers stopped supporting Java because of security problems, so the Java applets on the original list no longer work. Most of those websites were deleted in preparing the current list, but websites with collections containing both Java applets and other animations have been retained. To the extent possible websites with animations that use JavaScript or other animation software have been added to replace ones that had to be deleted.

ANIMATIONS AND/OR GENERAL INTEREST ARTICLES FOR A VARIETY OF MATHEMATICAL TOPICS

Interactive Mathematics Activities: www.cut-the-knot.org/Curriculum/index.shtml
This website has links to a very large number of interactive mathematics activities arranged by mathematical topic. The activities listed under combinatorics, algebra, logic, fractals, combinatorial games, probability, social science, and puzzles & games are almost entirely discrete mathematical, and many of those listed under arithmetic, miscellaneous demonstrations, fallacies, math magic, and mathematical droodles also involve discrete mathematics. Unfortunately most of the activities use Java, but some use either JavaScript or Flash. The following pages contain indications about which of these is used: http://www.cut-the-knot.org/algebra.shtml, http://www.cut-the-knot.org/geometry.shtml, and http://www.cut-the-knot.org/gamesList.shtml,

The Mathematics Millennium Project: http://mmp.maths.org/
The Mathematics Millennium Project is based at the University of Cambridge, UK. Its website contains links to
the NRICH website, containing thousands of free resources designed to develop problem solving skills and subject knowledge, and to the Plus website, which is an online magazine with general interest articles about mathematics, including a careers library. The following NRICH websites contain scrambled steps for theorems and ask a user to put them in correct order; http://nrich.maths.org/6333, https://nrich.maths.org/1404. This website has links to activities designed to lead students to success with more advanced mathematical thinking: http://nrich.maths.org/9091.

 

Wolfram Demonstration Project: http://demonstrations.wolfram.com/
“Conceived by Mathematica creator and scientist Stephen Wolfram as a way to bring computational exploration to the widest possible audience, the Wolfram Demonstrations Project is an open-code resource that uses dynamic computation to illuminate concepts in science, technology, mathematics, art, finance, and a remarkable range of other fields.” Among its thousands of demonstrations are a very large number for mathematics. To interact with them, a user must download a free Wolfram CDF player. Mathematica is not needed to use the demonstrations, but users who have Mathematica can experiment and modify code themselves.

Doug Ensley Interactive Flash Exercises: http://webspace.ship.edu/deensley/discretemath/flash/
This website contains 75 exercises, which were written to accompany Introduction to Discrete Mathematics: Mathematical Reasoning with Puzzles, Patterns and Games, by Doug Ensley and Winston Crawley. Topics include puzzles, patterns, and mathematical thinking (including sentential and predicate logic); number puzzles and sequences; a primer of mathematical writing (proof and disproof); sets and Bool
ean algebra; functions and relations; combinatorics; probability; and graphs and trees.

State University of California Reference Notes: www.math.csusb.edu/notes/
This website contains links to notes on the following topics: set theory, symbolic logic, methods of proof, basic set theory proofs, functions, relations, binary operations, and groups. The Math Tools pages contain interactive activities.

The Shodor Education Foundation Mathematical Activities: www.shodor.org/interactivate/lessons/index.html
This website contains interactive activities on Number and Operation, Geometry and Measurement, Function and Algebra, and Probability and Data Analysis.

Derive Labs: www.brookscole.com/cgi-wadsworth/course_products_wp.pl?fid=M20b&product_isbn_issn=0534359450&discipline_number=1
These labs were developed by Nancy Hagelgans at Ursinus College to accompany parts of Discrete Mathematics with Applications.

Martindate's 'The Reference Desk': www.martindalecenter.com
This is a huge reference website. The following are some of the subsections that contain interactive activities for discrete mathematics. Many, but not all, of the activities are Java applets:  (www.martindalecenter.com/Calculators2_6_AD.html#COMP-DISCRETE), encryption/cryptography (www.martindalecenter.com/Calculators2_6_EH.html#COMP-ENC), Fibonacci numbers (www.martindalecenter.com/Calculators2_6_EH.html#COMP-FIBON), graph theory (www.martindalecenter.com/Calculators2_6_EH.html#COMP-GR-TH), logic), and number theory (www.martindalecenter.com/Calculators2_6_NZ.html#COMP-NT).

The Math Page: http://www.themathpage.com/index.html
This website, by Lawrence Spector, Borough of Manhattan Community College, The City University of New York, contains complete interactive courses in arithmetic, plane geometry, algebra, topics in trigonometry, topics in precalculus, an approach to calculus, and the evolution of the real numbers.

Earliest Known Uses of Symbols and Terms: These two websites are the work of Jeff Miller, Gulf High School, New Port Richey, Florida. They do not contain applets, but they do contain the earliest uses Miller has discovered of a very large number of mathematical symbols and mathematical terms.

 

Online Encyclopedia of Integer Sequences: This is another important webpage that does not contain applets. ”Since the mid-1960's Neil Sloane has been collecting integer sequences from every possible source. His goal is to have all interesting number sequences in the table. At the present time the table contains over 100000 sequences…. The main table is a collection of number sequences arranged in lexicographic order. The entry for each sequence gives: the beginning of the sequence; its name or description; any references or links; any formulae; cross-references to other sequences; the name of the person who submitted it, etc.”

 

 

TIPS FOR WRITING MATHEMATICS

 

A Guide to Writing Mathematics by Dr. Kevin Lee, Purdue University Calumet: This is an attractively written article with good advice. 

A Guide to Writing in Mathematics Classes by Dr. Annalisa Crannell, Franklin & Marshall College: This guide has been widely used in classes throughout the country. Among other things, it contains a checklist for students to use as they write answers to problems. 

How To Write a Solution
 by Richard Rusczyk & Mathew Crawford: This article (actually written for advanced high school students preparing for mathematical competitions) gives examples of bad and good ways to write solutions to challenging mathematical problems. Reading through the two versions gives a vivid sense for why the good solution is better than the bad one. The authors have tried to make the presentation amusing as well as helpful. (Table of Contents: Have a Plan; Readers Are Not Interpreters; U s e S p a c e; sdrawkcaB knihT, Write Forwards; Name Your Characters; A Picture Is Worth a Thousand Words; Solution Readers, not Mindreaders; Follow the Lemmas; Clear Casework; Proofreed; Bookends) 

A Short Guide to Writing Mathematics (a guide for undergraduates) by Stephen B Maurer, Professor of Mathematics, Swarthmore College: This link describes a book about mathematical writing that can be downloaded from Professor Maurer. It also contains links to a few freely available sections of the book: Advice on Note Taking, Common Work Errors in Writing Mathematics, and a complete table of contents for the book.

 

LOGIC

ASL Committee on Logic Education: http://www.ucalgary.ca/aslcle/logic-courseware
This is a list of sites with resources and/or courses that use logic software. This list is no longer actively maintained, but many of the links are still current.

Multiple-choice quiz on basic concepts for logic: http://scherk.pbworks.com/w/page/14864234/Quiz%3A%20Logic
Most of these questions were written by Terence Tao. This applet may not work when advertisement-blockers are enabled (because the applet needs to read from other web pages). Additional quizzes on other mathematical topics are at http://scherk.pbworks.com/w/page/14864181/FrontPage.

Complete, Interactive, Free, Online Textbooks for Introductory Symbolic Logic:

§  Logic Café: http://thelogiccafe.net/PLI/
The Logic Café was developed by John F. Halpin, Oakland University.  Its chapters and tutorials include Basic Concepts, Sentence Logic, Truth Tables, SL Symbolizations, SL Derivations, Predicate Logic, PL Semantics and Symbolizations, PL Derivations, Predicate Logic with Identity.  The Logic Café contains tutorials, reference material, and many exercises with immediate feedback about the correctness of students’ answers.

Truth Tables

·        Truth Table Practice: www.math.csusb.edu/notes/quizzes/tablequiz/tablepractice.html
This animation, from
California State University, San Bernardino, presents a user with a blank truth table for parts of a logical expression in P and Q, asks the user to fill in truth values for the various columns, and indicates whether or not the user’s answer is correct. The user may then click a button to obtain a new problem.

Tarski's World Animations: The use of Tarski's World for teaching logic was developed by Jon Barwise and John Etchemendy. (See www-csli.stanford.edu/hp/CVandNR.pdf and www-csli.stanford.edu/hp/#LOFOL.) The following are Wolfram demonstration animations implementing two-dimensional versions of Tarski's World. To use them, as with the other Wolfram demonstrations, one must download a free Wolfram CDF player.

 

Logic Circuits

http://www.neuroproductions.be/logic-lab/
“The LOGIC LAB is a program for simulating simple circuits of logic gates on the screen.” It is “an experimental project of freelance Flash Platform developer Kris Temmerman,” who lives in Antwerp, Belgium.

 

Knights and Knaves Logic Puzzles: http://philosophy.hku.hk/think/logic/knights.php
These 382 puzzles, which get progressively more difficult, are presented without solutions. They were generated by a computer program written by Zachary Ernst, formerly a philosophy professor and currently a software engineer.

 

Prolog: http://www.calvin.edu/~rpruim/courses/m156/F99/prolog/
These materials, developed by Randall Pruim, Calvin College, “were used in conjunction with the predicate logic part of a discrete math course.” They include “a prolog interpreter that can be run over the WWW, an example from Monty Python, examples, exercises,” etc.

 

Logic Proof Developer/Checkers

 

SETS

Multiple-choice quiz on basic concepts for sets: http://scherk.pbworks.com/w/page/14864241/Quiz%3A%20Sets
Most of these questions were written by Terence Tao. This applet may not work when advertisement-blockers are enabled (because the applet needs to read from other web pages). Additional quizzes on other mathematical topics are at http://scherk.pbworks.com/w/page/14864181/FrontPage.

Venn Diagrams

·        Venn Diagram Definition: http://www.shodor.org/interactivate/activities/vdiagram/indexflash.html
This interactive animation, from the Shodor Educational Foundation, asks a user to place an item in the correct region of a Venn diagram. For instance, if the three regions represent even integers, palindromic integers, and perfect squares, respectively, the number 121 should be placed in the intersection of the regions representing palindromic integers and perfect squares but not in the intersection of all three regions. Feedback is provided about the correctness of the user’s answer.

·        Venn Diagram Regions: http://www.math.csusb.edu/notes/quizzes/venn1/venn1.html
This
interactive animation, from Dan Rinne, California State University, San Bernardino, displays Venn diagram for sets A, B, and C and contains exercises testing a user’s ability to identify various regions in the diagram, such as A Ç (Bc Č C).

·        Survey of Venn Diagrams: http://www.combinatorics.org/Surveys/ds5/VennEJC.html
This webpage does not contain
animations, but it provides excellent information, pictures, and information about Venn diagrams involving four or more sets.

PROOF

Proof Designer: www.cs.amherst.edu/~djv/pd/pd.html
This is a java applet, which was written by Dan Velleman of Amherst College "to write outlines of proofs in elementary set theory, under the guidance of the user." Proof Designer's approach to proof-writing is similar to the approach used in Velleman's book How to Prove it.

DC Proof: http://www.dcproof.com
This free PC-based software “enables students to write formal proofs using pull-down menus of the simplified rules of logic and set theory. A built-in, self-study tutorial takes the student from proof of the commutativity of the AND-operator to resolutions of Bertrand Russell's Barber Paradox and the paradox of the universal set.”

Flash Applications: http://webspace.ship.edu/deensley/discretemath/flash/
Several of the Flash applications on Doug Ensley’s website (see above) give assistance for development of proofs and counterexamples.

Find the Flaw: www.math.toronto.edu/mathnet/falseProofs/
This page, from the University of Toronto Mathematics Network, contains examples of false proofs whose flaw can be discovered through interactive activity.

Proof That the Square Root of 2 Is Irrational: http://nrich.maths.org/public/viewer.php?obj_id=1404

This interactive animation challenges the user to unscramble a proof of the irrationality of the square root of 2 that is based on the fact that every integer greater than 1 has a unique factorization as a product of primes. It is part of the Mathematics Millennium Project (see above).

 

NUMBER THEORY AND CRYPTOGRAPHY

Prime Numbers

 

Extended Euclidean Algorithm: http://www.math.sc.edu/~sumner/numbertheory/euclidean/euclidean.html
This interactive demonstration, by David Sumner at the University of South Carolina, calculates the greatest common divisor of two positive integers, derives it as a linear combination of the two numbers, and displays the intermediate steps.

 

Modular Inverse:
https://www.youtube.com/watch?v=mgvA3z-vOzc
This youtube video, titled “Modular Inverse Made Easy” shows, step-by-step, how to calculate the inverse of 197 modulo 3000, or, equivalently, how to find the solution to 197d 1 (mod 3000). It is part of a set created by Randell Heyman, a businessman, researcher, and lecturer at the University of New South Wales in Australia. 

 

Linear Diophantine Equation: https://www.alpertron.com.ar/QUAD.HTM
This interactive demonstration finds the general solution for a Diophantine equation of the form ax2 + bxy + cy2 + dx + ey + f = 0, where a-f are integers and any can be chosen to be zero. It was written by Dario Alpern, an electrical engineer in Buenos Aires, Argentina.

 

Fast Modular Exponentiation : https://www.khanacademy.org/computing/computer-science/cryptography/modarithmetic/p/fast-modular-exponentiation
This website is part of a collaboration about algorithms between the Khan Academy and Dartmouth college professors Tom Cormen and Devin Balkcom. It contains a JavaScript animation to compute xy mod z. A user can change the code to input x, y, and z and then click on a smiling green face to see the result and all the intermediate steps.

 

Chinese Remainder Theorem: https://www.youtube.com/watch?v=ru7mWZJlRQg
This youtube video, titled “The Chinese Remainder Theorem Made Easy,” is part of a set created by Randell Heyman, a businessman, researcher, and lecturer at the University of New South Wales in Australia. It explains how to use the Chinese remainder theorem to solve for x given that x ≡ 2 (mod 3), x ≡ 2 (mod 4), and x ≡ 1 (mod 5). 

Caesar Cipher: http://www.shodor.org/interactivate/activities/caesar/index.html
In this
interactive demonstration letters of the alphabet are coded as: A ® 0, B ® 1, . . . , Z ® 25, “and then the numbers are changed via an affine (linear) transformation to new, coded numbers. The coding function has the form: Y = A * X + B, where X is the uncoded number, A and B are constants (known to allies, but unknown to enemies) and Y is the calculated, coded number. The arithmetic is done mod 26 to ensure that we get numbers back that can be translated back to letters before sending the coded message.” The animation allows a user to enter text and specify the values of A and B. It then displays the converted text. The applet contains a link to Caesar Cipher II, in which the user enters a text, which is converted automatically using a Caesar cipher. The user is then asked to determine A and B. Finally, there is a link to Caesar Cipher III, in which only a converted text is given and the user is challenged to decode it.

The Crypto Tutorial: http://www.ti89.com/cryptotut/home.htm
This website contains a complete tutorial that combines interactive web pages and instructional text and is aimed at “anybody interested in learning cryptography.” The tutorial was developed by Nils Hahnfeld with the assistance of Dr. Michael Hortmann and Salvatore Angiletta, both from the University of Bremen, Germany. It covers topics from the Caesar cipher through multiplication, linear, polyalphabetic, and RSA ciphers.

JavaScript RSA Cryptography Demo: http://www-cs-students.stanford.edu/~tjw/jsbn/rsa2.html
This website, developed by Tom Wu at Stanford University, contains a “pure JavaScript implementation of large-integer math, capable of performing useful-sized (512-bit, 1024-bit) RSA encryption in almost any Web browser.” It allows a user-entered plaintext string to be automatically encrypted and a user-entered ciphertext to be automatically decrypted. Additional information about the program is at http://www-cs-students.stanford.edu/~tjw/jsbn/.

 

MATHEMATICAL INDUCTION AND RECURSION

Tromino Puzzle Information and Animation: www.amherst.edu/~nstarr/puzzle.html
Norton Starr of Amherst College developed an animation to make it convenient for people to experiment with the problem of covering a deficient  8 x 8 checkerboard with L-trominoes (L-shaped dominoes). The website contains historical information about the puzzle, variations on it, and a list of references. The website also contains a Java applet, developed by Chris Eliot, which was designed to explore how to cover deficient m x n checkerboards for a variety of values of m and n.

Tower of Hanoi and Reeve’s Puzzles 

COUNTING AND PROBABILITY

Probability Calculator: http://statistics.berkeley.edu/~stark/Java/Html/Venn3.htm
This interactive demonstration is from Professor P.B. Stark in the Statistics department at the University of California Berkeley. It allows a user to move Venn diagram representations for sets A, B, and C inside a universe S, and it calculates the probabilities of sets, such as A
Č B and
(A
Ç B)c, given various user-generated probabilities for A, B, and C .

The Monty Hall Problem: http://www.grand-illusions.com/simulator/montysim.htm
This interactive demonstration, which seems only to work on Internet Explorer, is from the website Grand Illusions. It lets a user play multiple times, keeping track of the number of times the user won by switching and the number of times the user won by not switching. To get a good sense for the probabilities, one must play the game quite a few times.

The Pigeonhole Principle:
https://www.youtube.com/watch?v=ROnetLvbl6M
This youtube video, titled “The Pigeonhole Principle Made Easy,” is another created by Randell Heyman, a businessman, researcher, and lecturer at the University of New South Wales in Australia. It shows how to use the pigeonhole principle to obtain answers to three very different questions. 

Pascal's Triangle: http://ptri1.tripod.com
This page contains many illustrations and some interactive activities for Pascal's triangle.

Catalan Numbers: http://mathforum.org/advanced/robertd/catalan.html
This page, by Robert M. Dickau, is not animated, but it contains a set of very nice pictures illustrating the many ways Catalan numbers occur in various situations. Other mathematical figures by the same author are at http://mathforum.org/advanced/robertd/index.html.

 

GRAPH THEORY AND APPLICATIONS

Missionaries and Cannibals: www.plastelina.net/games/game2.html and http://www.aiai.ed.ac.uk/~gwickler/missionaries.html
The first website contains an
interactive animation for trying to solve the missionaries and cannibals puzzle. The second website, from Gerhard Wickler’s at the University of Edinburgh, contains a graph that shows the solution.

The Wolf, the Goat, and the Cabbage: http://perso.wanadoo.fr/jeux.lulu/html/anglais/loupChe/loupChe1.htm
This is an
interactive animation for trying to help a farmer get a wolf, a goat, and a cabbage from one side of a river to the other. It is from the French website “Lulu’s games.”  The Leaping sheep puzzle interactive animation from this website is also good (http://perso.wanadoo.fr/jeux.lulu/html/anglais/lomouton/mouton.htm#).  While trial-and-error can be used to solve the puzzles, a systematic strategy involves drawing a graph and finding a path from the initial state to the desired final state.

Transitive Closure and Minimum Spanning Tree: http://www3.cs.stonybrook.edu/~skiena/combinatorica/animations/graphpower.html and https://www3.cs.stonybrook.edu/~skiena/combinatorica/animations/mst.html
These animations are among the demos illustrating Combinatorica, which is software developed by Steven Skiena, a professor at the State University of New York at Stony Brook, for teaching and doing research in discrete mathematics.

Constructing an Euler Circuit: https://www.geogebra.org/m/pVa6Yktj
This animation illustrates the steps involved in constructing an Euler circuit for a graph. It is on the GeoGebra website and was developed by George Sturr.

Traveling Salesman Problem: https://archive.geogebra.org/en/upload/files/english/jwelker/Discrete_TSP_5_cities2.html
This interactive animation gives users a choice of weights for the edges in a five-vertex graph and a choice of edges for reaching all the vertices in the graph. The total weight is computed for each combination of choices. The animation was created using GeoGebra by Jerel L. Welker.

ALGORITHMS AND ALGORITHM EFFICIENCY

Algorithm Collections

·        https://www.khanacademy.org/computing/computer-science/algorithms
Khan Academy “partnered with Dartmouth college professors Tom Cormen and Devin Balkcom to teach introductory computer science algorithms, including searching, sorting, recursion, and graph theory.” The pages contain “a combination of articles, visualizations, quizzes, and coding challenges.”

·        https://www.cs.usfca.edu/~galles/visualization/Algorithms.html
David Galles, at the University of San Francisco, has a collection of JavaScript interactive animations for over fifty computer algorithms. They are grouped into Basics, Recursion, Indexing, Sorting, Heap-like Data Structures, Graph Algorithms, Dynamic Programming, Geometric  Algorithms, and Other.  A user has a choice of input values and can control animation speed, pauses, and backward/forward movement. The animations “can run in just about any modern browser -- including iOS devices like the iPhone and iPad, and even the web browser in the Kindle.”

·        http://visualgo.net/
VisuAlgo was created in 2011 by Dr Steven Halim, National University of Singapore, “as a tool to help his students better understand data structures and algorithms, by allowing them to learn the basics on their own and at their own pace.” Users of its twenty interactive animations can control animation speed, pauses, and backward/forward movement, as well as being able to see annotated code that is synced with the steps of the animation. The sorting algorithm page includes Bubble, Select, Insert, Merge, Quick, R-Quick, Count, and Radix. The shortest path algorithm page includes BFS, Bellman Ford’s, and Dijkstra’s algorithms. A number of the visualizations are accompanied by text that explains the underlying algorithm. Those who click on “Training” obtain access to quizzes with answers.

·        http://optlab-server.sce.carleton.ca/POAnimations2007/Default.html
This collection of over twenty JavaScript animations was developed to accompany the online textbook Practical Optimization: a Gentle Introduction by John W. Chinneck, Systems and Computer Engineering, Carleton University. They were created by Kelly Kinahan and Jennifer Pryor and are open source.  The animations are grouped under the following headings: Linear Programming, Networks, Integer Programming, Heuristics for Discrete Optimization, Dynamic Programming, and Nonlinear Programming.  Many, such as the one for Dijkstra’s algorithm, have an explanation for each step.

·        www.faust.fr.bw.schule.de/mhb/backtrack/backtren.htm
This interactive animation, from Dr. Hans-Bernhard Meyer, Faust-Gymnasium, Germany, illustrates backtracking algorithms by showing users a puzzle for which the solution requires backtracking. Users may either try to solve the puzzle on their own or click on “automatically” to see a visual representation of the solution. The page contains links to similar animations for the eight-queens puzzle and for 5x5 magic squares.

·        http://math.hws.edu/eck/jsdemo/sortlab.html
David Eck developed JavaScript animations as an accompaniment for his textbook, The Most Complex Machine, to illustrate the actions for five sorting algorithms:
BubbleSort, SelectionSort, InsertionSort, MergeSort, and QuickSort. A user can pause, change to a step mode, experiment with several different initial states, and choose one of two execution speeds.

 

FINITE-STATE AUTOMATA AND TURING MACHINES

Finite-State Automata:  http://ivanzuzak.info/noam/webapps/fsm_simulator/
This
interactive animation was created by Ivan Zuzak and Vedrana Jankovic, software engineers for Google and GitHub who currently live in Zurich.  A user can explore deterministic and non-deterministic finite-state machines and non-deterministic finite automata with epsilon transitions. The software can produce simple random examples, or users can generate their own by inputting a regular expression or defining a machine directly. The software will simulate the automaton and display the transition graph.

 

Turing Machine Simulators

·        http://ideonexus.com/2009/02/05/JavaScript-turing-machine/
This website, by
Ryan Somma, a professional software developer, illustrates the operation of a very simple Turing machine along with an explanation for how the machine works.

 

·        http://morphett.info/turing/turing.html
This interactive animation simulates the action of a Turing Machine. It was developed by Anthony Morphett, a mathematics tutor and lecturer at the Australian University of Melbourne, School of Mathematics and Statistics. A user can open an example program, such as a palindrome detector using various inputs, and run the program at various speeds to watch how the Turing machine operates on it.

 

 

Webpage last revised: 14 March 2020
Susanna S. Epp
susanna.s.epp@gmail.com