Sage is an open-source mathematics package. It combines a huge amount of mathematics software and makes it all available to python scripts. Because of the large amount of classes and programs and the fact that SAGE has written all the code needed to get them working together, many powerful math computations can be performed with only a few lines of python.
There are several ways of accessing sage:
.py
file, import the sage modules, and make calls to functions and classes in these modules.If you have downloaded and installed sage, you can create and execute sage worksheets. Alternativly, you can use sage worksheets online without installing sage. You can even copy the worksheet files back and forth between the website and your own local install as well.
The Sage Tutorial is the best place to start.
My sage worksheets from today are Poker.sagews Bertrand.sagews You can download them and run them locally or also upload them to the website.
Graph Theory. The mostly unfinished wikibook is a good introduction (the wikibook is unfinished, but the introduction and definitions sections are complete and that is more than what we are doing in this course). For a more detailed reference, Diestal has a free graph theory book you can download but it is much more advanced than what we are doing in this course.
Create a sage worksheet which counts the number of possible straight flushes in poker using commands similar to the commands I show. Next, deduce the probability a hand is a straight flush.
Is it possible to properly color the vertices in the following graph using four colors? If yes, show a coloring. If no, argue why. Is it possible to properly color using three colors? If yes, show a coloring. If no, argue why.