An introductin to Programm ing in Python and Discrete Mathematics

Maria Litvin, Gary Litvin



An introduction to Programing in Python and Discrete Mathematics

An introduction to Programing in Python and
Discrete Mathematics

Maria Litvin - Gary Litvin

ISBN-10: 0-9885572-5-8
ISBN-13: 978-0-9885572-5-3
# Pages

Digital PDF | $19.95
Print BW | $29.95


This new textbook, intended for the college market, is filling a hidden educational gap. Not to sound cliché, but computers are the future. And the present! The majority of people have a very limited knowledge of how they work. In the past 50 or 60 years, our world has changed dramatically: it has become digital. However, the change has been somewhat ignored in education. In the Center of Math’s newest textbook, the Litvins have arranged a collection of mathematical topics that are relevant to the digital world, plus an introductory programming guide. This is both a computer science book for math students and a math book for computer science students.



Chapter 1. Sets and Functions
1.1 Prologue
1.2 Sets
1.3 Ways to Define a Function
1.4 Algorithms
1.5 Exploring Functions in Python
1.6 Review

Chapter 2. An Introduction to Programming
2.1 Prologue
2.2 CPU and Memory
2.3 Python Interpreter
2.4 Python Code Structure
2.5 Review

Chapter 3. Variables
3.1 Prologue
3.2 Variables in Python
3.3 Scope of Variables
3.4 More About Python Functions
3.5 Function Arguments
3.6 Review

Chapter 4. Sequences, Sums, Iterations
4.1 Prologue
4.2 Arithmetic and Geometric Sequences
4.3 Sums
4.4 Infinite Sums
4.5 Iterations in Python
4.6 Review

Chapter 5. Number Systems
5.1 Prologue
5.2 Positional Number Systems
5.3 The Binary, Octal, and Hexadecimal Systems
5.4 Representation of Numbers in Computers
5.5 Irrational Numbers
5.6 Review
Chapter 6. Boolean Algebra
6.1 Prologue
6.2 Operations on Propositions
6.3 Predicates and Sets
6.4 if-else Statements in Python
6.5 Review

Chapter 7. Digital Circuits and Bitwise Operators
7.1 Prologue
7.2 Gates
7.3 Bitwise Logical Operators
7.4 Review

Chapter 8. Counting
8.1 Prologue
8.2 The Multiplication Rule
8.3 Permutations
8.4 Using Division
8.5 Combinations
8.6 Using Addition and Subtraction
8.7 Review

Chapter 9. Strings, Lists, and Files
9.1 Prologue
9.2 Strings
9.3 Lists and Tuples
9.4 Files
9.5 Review

Chapter 10. Parity, Invariants, and Finite Strategy Games
10.1 Prologue
10.2 Parity and Checksums
10.3 Invariants
10.4 Finite Strategy Games
10.5 Review

Chapter 11. Recurrence Relations and Recursion
11.1 Prologue
11.2 Recurrence Relations
11.3 Recursion in Programs
11.4 Mathematical Induction
11.5 Review

Chapter 12. Polynomials
12.1 Prologue
12.2 Addition and Subtraction
12.3 Multiplication, Division, and Roots
12.4 Binomial Coefficients
12.5 Review

Chapter 13. Probabilities
13.1 Prologue
13.2 Calculating Probabilities by Counting
13.3 More Probabilities by Counting
13.4 Multiplication, Addition, and Subtraction
13.5 Pseudorandom Numbers
13.6 Review

Chapter 14. Matrices, Sets, and Dictionaries
14.1 Prologue
14.2 Tables and Matrices
14.3 Sets
14.4 Dictionaries
14.5 Review

Chapter 15. Graphs
15.1 Prologue
15.2 Types of Graphs
15.3 Isomorphism of Graphs
15.4 Degree of Vertex
15.5 Directed and Weighted Graphs
15.6 Review

Chapter 16. More Graphs
16.1 Prologue
16.2 Adjacency Matrices
16.3 Coloring Maps
16.4 The Four Color Theorem
16.5 Review

Chapter 17. Number Theory and Cryptology
17.1 Prologue
17.2 Euclid’s Algorithm
17.3 The Fundamental Theorem of Arithmetic
17.4 Arithmetic of Remainders
17.5 Number Theory in Cryptology
17.6 Review

Appendix A. Getting Started with Python
Appendix B. Selected Functions: Built-In, Math, and Random
Appendix C. String Operations and Methods
Appendix D. List, Set, and Dictionary Operations and Methods



- Text interweaves introduction to Python syntax and terminology, and description of concepts in discrete mathematics useful to programmers

- Exercises contain both Python programming exercises and pencil-and-paper mathematical exercises, dealing with topics which may be realistically encountered when programming, including cryptography and error correction

- Correspondences between abstract mathematical objects and Python structures are highlighted, and new Python and mathematics definitions are listed for reference at the end of each chapter

- Text is comprehensible for beginners to Python, discrete mathematics, or both

- Hyperlinked table of contents

- PDF format, compatible with all computers, tablets, and mobile devices

- Low cost in electronic or print form



Gary Litvin

Gary has worked in many areas of software development including artificial intelligence, pattern recognition, computer graphics, and neural networks. As founder of Skylight Software, Inc., he developed SKYLIGHTS/GX, one of the first GUI prototyping and development tools for C and C++ programmers. Gary led in the development of several state-of-the-art software products including interactive touch screen development tools, OCR and handwritten character recognition systems, and credit card fraud detection software.

Maria Litvin

Maria has taught computer science and mathematics at Phillips Academy in Andover, Massachusetts, since 1987. She is an AP Computer Science exam reader since 1996 and provides AP training for high school computer science teachers. Maria is a recipient of the 1999 Siemens Award for Advanced Placement for Mathematics, Science, and Technology for New England and of the 2003 RadioShack National Teacher Award. Prior to joining Phillips Academy, Maria taught computer science at Boston University.