Skip to main content
Discrete Math with SageMath:
Learn math with open-source software
Zunaid Ahmed, Hellen Colman, Samuel Lubliner
Contents
Index
Search Book
close
Search Results:
No results.
Prev
Up
Next
\(\newcommand{\N}{\mathbb N} \newcommand{\Z}{\mathbb Z} \newcommand{\Q}{\mathbb Q} \newcommand{\R}{\mathbb R} \newcommand{\lt}{<} \newcommand{\gt}{>} \newcommand{\amp}{&} \definecolor{fillinmathshade}{gray}{0.9} \newcommand{\fillinmath}[1]{\mathchoice{\colorbox{fillinmathshade}{$\displaystyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\textstyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\scriptstyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\scriptscriptstyle\phantom{\,#1\,}$}}} \)
Front Matter
Preface
Acknowledgements
From the Student Authors
Authors and Contributors
Colophon
1
Getting Started
1.1
Intro to Sage
1.1.1
Sage as a Calculator
1.1.2
Variables and Names
1.2
Display Values
1.3
Object-Oriented Programming
1.4
Data Types
1.5
Iteration
1.6
Debugging
1.7
Defining Functions
1.8
Documentation
1.9
Run Sage in the browser
2
Set Theory
2.1
Creating Sets
2.1.1
Set Definitions
2.1.2
Set Builder Notation
2.1.3
Subsets
2.1.4
Set Membership Check
2.2
Cardinality
2.3
Operations on Sets
2.3.1
Union of Sets
2.3.2
Intersection of Sets
2.3.3
Difference of Sets
2.3.4
Multiple Sets
2.3.5
Complement of Sets
2.3.6
Cartesian Product of Sets
2.3.7
Power Sets
2.3.8
Viewing Power Sets
3
Combinatorics
3.1
Combinatorics
3.1.1
Factorial Function
3.1.2
Combinations
3.1.3
Permutations
4
Logic
4.1
Logical Operators
4.1.1
Boolean Formula
4.2
Truth Tables
4.3
Analyzing Logical Equivalences
4.3.1
Equivalent Statements
4.3.2
Tautologies
4.3.3
Contradictions
5
Relations
5.1
Introduction to Relations
5.2
Relations on a set
5.3
Digraphs
5.4
Properties
5.4.1
Reflexive
5.4.2
Symmetric
5.4.3
Antisymmetric
5.4.4
Transitive
5.5
Equivalence
5.6
Partial Order
6
Functions
6.1
Functions
6.1.1
Graphical Representations
6.2
Recursion
6.2.1
Recursion in Sequences
6.2.2
Recursion with Binomial Coefficients
7
Graph Theory
7.1
Basics
7.1.1
Graph Definition
7.1.2
Weighted Graphs
7.1.3
Graph Characteristics
7.1.4
Graphs and Matrices
7.1.5
Manipulating Graphs in Sage
7.2
Plot Options
7.3
Paths
7.4
Isomorphism
7.5
Euler and Hamilton
7.5.1
Euler
7.5.2
Hamilton
8
Trees
8.1
Definitions and Theorems
8.2
Search Algorithms
9
Lattices
9.1
Lattices
9.1.1
Definition
9.1.2
Join
9.1.3
Meet
9.2
Tables of Operations
9.2.1
Meet Operation Table
9.2.2
Join Operation Table
10
Boolean Algebra
10.1
Boolean Algebra
10.2
Boolean functions
11
Finite State Machines
11.1
Finite-State Machines
11.1.1
Definition
11.2
State Machine in SageMath
11.2.1
Define States, Transitions and Outputs
11.2.2
Create Graph Model of State Machine
11.2.3
Display the State Machine
11.2.4
Run the State Machine
11.2.5
Using Sage built-in ’FiniteStateMachine’
11.3
FSM in Action
11.3.1
Problem Overview (System model and States)
11.3.2
Solution
Back Matter
References
Colophon
Index
Chapter
6
Functions
This chapter will briefly discuss the implementation of functions in Sage and will delve deeper into the sequences defined by recursion, including Fibonacci’s. We will show how to solve a recurrence relation using Sage.
6.1
Functions
6.2
Recursion