Skip to main content

Section B.2 Technology and Algorithms

All of the introductions to Python technology and all algorithms.

1 Welcome!

Algorithm 1.1.5 Mathematical Kruskal’s Algorithm
Algorithm 1.2.2 Kid RSA Key Generation
Technology 1.2.4 Python divmod built-in function
Algorithm 1.2.12 Euclid’s Algorithm
Algorithm 1.2.14 Euclid’s Algorithm Extended

2 Permutations

Algorithm 2.1.11 Left-multiplication of permutations
Technology 2.2.2 The class command
Technology 2.2.6 Python object instantiation
Technology 2.2.8 Function argument lists
Technology 2.2.10 The self argument of a method
Technology 2.2.11 dict.keys(), dict.values(), and dict.items() methods
Technology 2.2.14 Python min and max built-in functions
Technology 2.2.16 Python sorted built-in function
Algorithm 2.2.18 Verifying that a sequence is one-line notation
Technology 2.2.19 __call__ method

3 Simple Cryptography

Technology 3.1.5 A Python program to count the frequencies of each character in a string
Algorithm 3.2.1 Playfair’s cipher
Algorithm 3.2.5 Playfair’s cipher: pre-processing the key phrase
Algorithm 3.2.6 Playfair’s cipher: creating digraphs from an original message
Algorithm 3.2.7 Playfair’s cipher: encrypting digraphs

5 Matrix Applications

Algorithm 5.2.1 Gauss-Jordan elimination
Algorithm 5.2.5 Gauss-Jordan elimination with Partial Pivoting
Algorithm 5.3.6 \(PA=LU\) decomposition

6 Graph Theory Algorithms

Algorithm 6.2.7 Kruskal’s Spanning Tree algorithm
Algorithm 6.3.1 Dijkstra’s Shortest Path Algorithm
Algorithm 6.4.4 Modified Dikstra: All Shortest Paths from \(s\)
Algorithm 6.4.7 Pathfinding
Algorithm 6.4.11 Maintenance of layered graph
Algorithm 6.4.12 Dinitz’ Max Flow Algorithm

A Python crash course

Technology A.1.5 Quitting Python
Technology A.2.1 The help command
Technology A.2.2 Assignment vs. equality
Technology A.2.6 Loading additional packages
Technology A.2.10 Type conversion
Technology A.2.12 Valid strings
Technology A.2.14 Formatted strings
Technology A.3.1 Defining a list
Technology A.3.6 Defining a dict
Technology A.3.8 Defining a set
Technology A.4.1 for loops
Technology A.4.3 Comments
Technology A.4.7 The range function
Technology A.4.10 while loops
Technology A.5.2 Defining functions with def
Technology A.5.4 Conditional statements
Technology A.6.1 Syntax Error
Technology A.6.3 Index errors
Technology A.6.5 Key errors
Technology A.6.7 Type errors
Technology A.6.9 Python exception handling
Technology A.6.14 Python continue statements
Technology A.6.15 Python break statements