Mathematical Thinking in Computer Science
Mathematical Thinking in Computer Science
This course is part of Introduction to Discrete Mathematics for Computer Science Specialization
150,718 already enrolled
Included with
Ask Coursera
2,287 reviews
2,287 reviews
Skills you'll gain
Tools you'll learn
Details to know
See how employees at top companies are mastering in-demand skills
Build your subject-matter expertise
- Learn new concepts from industry experts
- Gain a foundational understanding of a subject or tool
- Develop job-relevant skills with hands-on projects
- Earn a shareable career certificate
There are 6 modules in this course
Mathematical thinking is crucial in all areas of computer science: algorithms, bioinformatics, computer graphics, data science, machine learning, etc. In this course, we will learn the most important tools used in discrete mathematics: induction, recursion, logic, invariants, examples, optimality. We will use these tools to answer typical programming questions like: How can we be certain a solution exists? Am I sure my program computes the optimal answer? Do each of these objects meet the given requirements?
In the online course, we use a try-this-before-we-explain-everything approach: you will be solving many interactive (and mobile friendly) puzzles that were carefully designed to allow you to invent many of the important ideas and concepts yourself. Prerequisites: 1. We assume only basic math (e.g., we expect you to know what is a square or how to add fractions), common sense and curiosity. 2. Basic programming knowledge is necessary as some quizzes require programming in Python.
Why are some arguments convincing and some others are not? What makes an argument convincing? How can you establish your argument in such a way that there is no room for doubt left? How can mathematical thinking help with this? In this section, we start digging into these questions. Our goal is to learn by examples how to understand proofs, how to discover them on your own, how to explain them, and — last but not least — how to enjoy them: we will see how a small remark or a simple observation can turn a seemingly non-trivial question into an obvious one.
What's included
10 videos6 readings4 assignments
10 videos•Total 43 minutes
- Promo Video•1 minute
- Proofs?•4 minutes
- Proof by Example•2 minutes
- Impossibility Proof•3 minutes
- Impossibility Proof, II and Conclusion•4 minutes
- One Example is Enough•3 minutes
- Splitting an Octagon•1 minute
- Making Fun in Real Life: Tensegrities (Optional)•10 minutes
- Know Your Rights•6 minutes
- Nobody Can Win All The Time: Nonexisting Examples•8 minutes
6 readings•Total 22 minutes
- Companion e-book•3 minutes
- Active Learning•2 minutes
- Python Programming Language•5 minutes
- Slides•10 minutes
- Slides•1 minute
- Acknowledgements•1 minute
4 assignments•Total 120 minutes
- Puzzle: Tile a Chessboard•30 minutes
- Tiles, dominos, black and white, even and odd•30 minutes
- Puzzle: Two Congruent Parts•30 minutes
- Puzzle: Splitting•30 minutes
How can we be certain that an object with certain requirements exist? One way to show this, is to go through all objects and check whether at least one of them meets the requirements. However, in many cases, the search space is enormous. A computer may help, but some reasoning that narrows the search space is important both for computer search and for "bare hands" work. In this module, we will learn various techniques for showing that an object exists and that an object is optimal among all other objects. As usual, we'll practice solving many interactive puzzles. We'll show also some computer programs that help us to construct an example.
What's included
16 videos6 readings13 assignments
16 videos•Total 90 minutes
- Magic Squares•3 minutes
- Narrowing the Search•7 minutes
- Multiplicative Magic Squares•5 minutes
- More Puzzles•9 minutes
- Integer Linear Combinations•5 minutes
- Paths In a Graph•5 minutes
- Warm-up•5 minutes
- Subset without x and 100-x•4 minutes
- Rooks on a Chessboard•3 minutes
- Knights on a Chessboard•5 minutes
- Bishops on a Chessboard•3 minutes
- Subset without x and 2x•6 minutes
- N Queens: Brute Force Search•11 minutes
- N Queens: Backtracking: Example•7 minutes
- N Queens: Backtracking: Code•8 minutes
- 16 Diagonals•4 minutes
6 readings•Total 33 minutes
- Slides•1 minute
- Slides•1 minute
- N Queens: Brute Force Solution Code•10 minutes
- N Queens: Backtracking Solution Code•10 minutes
- 16 Diagonals: Code•10 minutes
- Slides•1 minute
13 assignments•Total 370 minutes
- Puzzle: Magic Square 3 times 3•30 minutes
- Puzzle: Different People Have Different Coins•30 minutes
- Puzzle: Free Accomodation•30 minutes
- Is there...•20 minutes
- Maximum Number of Two-digit Integers•30 minutes
- Maximum Number of Rooks on a Chessboard•30 minutes
- Maximum Number of Knights on a Chessboard•30 minutes
- Maximum Number of Bishops on a Chessboard•30 minutes
- Subset without x and 2x•30 minutes
- Puzzle: N Queens•30 minutes
- Puzzle: 16 Diagonals•30 minutes
- Puzzle: Maximum Number of Two Digit Integers•30 minutes
- Number of Solutions for the 8 Queens Puzzle•20 minutes
We'll discover two powerful methods of defining objects, proving concepts, and implementing programs — recursion and induction. These two methods are heavily used in discrete mathematics and computer science. In particular, you will see them frequently in algorithms — for analysing correctness and running time of algorithms as well as for implementing efficient solutions. For some computational problems (e.g., exploring networks), recursive solutions are the most natural ones. The main idea of recursion and induction is to decompose a given problem into smaller problems of the same type. Being able to see such decompositions is an important skill both in mathematics and in programming. We'll hone this skill by solving various problems together.
What's included
3 videos13 readings9 assignments1 ungraded lab
3 videos•Total 22 minutes
- Recursion•10 minutes
- Coin Problem•5 minutes
- Hanoi Towers•7 minutes
13 readings•Total 121 minutes
- Two Cells of Opposite Colors: Hints•10 minutes
- Slides•1 minute
- Why Induction?•10 minutes
- What is Induction?•10 minutes
- Arithmetic Series•10 minutes
- Plane Coloring•10 minutes
- Compound Interest•10 minutes
- Inequality Between Arithmetic and Geometric Mean•10 minutes
- More Induction Examples•10 minutes
- Where to Start Induction?•10 minutes
- Triangular Piece•10 minutes
- Proving Stronger Statements May Be Easier!•10 minutes
- What Can Go Wrong with Induction?•10 minutes
9 assignments•Total 210 minutes
- Largest Amount that Cannot Be Paid with 5- and 7-Coins•10 minutes
- Puzzle: Hanoi Towers•30 minutes
- Puzzle: Two Cells of Opposite Colors•30 minutes
- Puzzle: Guess a Number•30 minutes
- Puzzle: Connect Points•30 minutes
- Induction•30 minutes
- Pay Any Large Amount with 5- and 7-Coins (Optional)•20 minutes
- Two Cells of Opposite Colors: Feedback•0 minutes
- Puzzle: Local Maximum (Optional)•30 minutes
1 ungraded lab•Total 15 minutes
- Bernoulli's Inequality•15 minutes
Mathematical logic plays a crucial and indispensable role in creating convincing arguments. We use the rules and language of mathematical logic while writing code, while reasoning and making decisions, and while using computer programs. This week we’ll learn the basics of mathematical logic, and we'll practice tricky and seemingly counterintuitive, but yet logical aspects of mathematical logic. This will help us to write readable and precise code, and to formulate our thoughts rigorously and concisely.
What's included
10 readings10 assignments
10 readings•Total 100 minutes
- Intro•10 minutes
- Examples and Counterexamples•10 minutes
- Logic•10 minutes
- Summary•10 minutes
- Reductio ad Absurdum•10 minutes
- Balls in Boxes•10 minutes
- Numbers in Tables•10 minutes
- Pigeonhole Principle•10 minutes
- An (-1,0,1) Antimagic Square•10 minutes
- Handshakes•10 minutes
10 assignments•Total 203 minutes
- Puzzle: Always Prime?•30 minutes
- Examples, Counterexamples and Logic•30 minutes
- Puzzle: Balls in Boxes•30 minutes
- Puzzle: Numbers in Boxes•30 minutes
- Puzzle: Numbers on the Chessboard•30 minutes
- Numbers in Boxes•5 minutes
- How to Pick Socks•5 minutes
- Pigeonhole Principle•10 minutes
- Puzzle: An (-1,0,1) Antimagic Square•30 minutes
- Girls, Boys, and Two Languages•3 minutes
"There are things that never change". Apart from being just a philosophical statement, this phrase turns out to be an important idea in discrete mathematics and computer science. A property that is preserved during a process is called an invariant. Invariants are used heavily in analyzing the behavior of algorithms, programs, and other processes. Being able to find the right invariant is an important skill that we will develop together in this module.
What's included
11 readings16 assignments
11 readings•Total 115 minutes
- Double Counting•10 minutes
- `Homework Assignment' Problem•10 minutes
- Coffee with Milk•10 minutes
- More Coffee•10 minutes
- Debugging Problem•10 minutes
- Termination•10 minutes
- Arthur’s Books•15 minutes
- Even and Odd Numbers•10 minutes
- Summing up Digits•10 minutes
- Switching Signs•10 minutes
- Advanced Signs Switching•10 minutes
16 assignments•Total 266 minutes
- Puzzle: Sums of Rows and Columns•30 minutes
- 'Homework Assignment' Problem•8 minutes
- 'Homework Assignment' Problem 2•8 minutes
- Chess Tournaments•5 minutes
- Debugging Problem•10 minutes
- Merging Bank Accounts•30 minutes
- Puzzle: Arthur's Books•30 minutes
- Puzzle: Piece on a Chessboard•30 minutes
- Operations on Even and Odd Numbers•30 minutes
- Puzzle: Summing Up Digits•30 minutes
- Puzzle: Switching Signs•30 minutes
- Recolouring Chessboard•5 minutes
- Girls and Boys•5 minutes
- Coffee with Milk•5 minutes
- More Coffee•5 minutes
- Football Fans•5 minutes
In this module, we consider a well-known 15-puzzle where one needs to restore order among 15 square pieces in a square box. It turns out that the behavior of this puzzle is determined by mathematics: it is solvable if and only if the corresponding permutation is even. To understand what it means and why it is true, we will learn the basic properties of even and odd permutations — an important notion in algebra and discrete mathematics. Together, we will implement a number of simple methods for working with permutations. You will then use them as building blocks to implement a program that solves any configuration of this game in the blink of an eye!
What's included
8 videos4 readings5 assignments
8 videos•Total 45 minutes
- The Rules of 15-Puzzle•3 minutes
- Permutations•9 minutes
- Proof: The Difficult Part•9 minutes
- Mission Impossible•2 minutes
- Classify a Permutation as Even/Odd•5 minutes
- Bonus Track: Fast Classification•2 minutes
- Project: The Task•2 minutes
- Quiz Hint: Why Every Even Permutation Is Solvable•13 minutes
4 readings•Total 40 minutes
- Reading•10 minutes
- Slides•10 minutes
- Even permutations•10 minutes
- Bonus Track: Finding The Sequence of Moves•10 minutes
5 assignments•Total 690 minutes
- Puzzle: 15•30 minutes
- Transpositions and Permutations•30 minutes
- Neighbor transpositions•30 minutes
- Is a permutation even?•120 minutes
- Bonus Track: Algorithm for 15-Puzzle•480 minutes
Earn a career certificate
Add this credential to your LinkedIn profile, resume, or CV. Share it on social media and in your performance review.
Instructors
Explore more from Algorithms
- Status: Free TrialU
University of London
Specialization
- Status: Free TrialB
Birla Institute of Technology & Science, Pilani
Course
- Status: Free TrialU
University of California San Diego
Specialization
- Status: Free TrialU
University of London
Course
Why people choose Coursera for their career
Learner reviews
- 5 stars
64.24%
- 4 stars
23.33%
- 3 stars
7.03%
- 2 stars
2.09%
- 1 star
3.27%
Showing 3 of 2287
Reviewed on Oct 15, 2017
I really liked this course, it's a good introduction to mathematical thinking, with plenty of examples and exercises, I also liked the use of other external graphical tools as exercises.
Reviewed on Sep 15, 2020
Positive: Great material, full of concepts, the teaching is simple and interactive, quizzes are amazing.Negative: Too much python programming (need to be aware of python basics)
Reviewed on Jun 29, 2018
Love the quality of thought that goes into each lesson. The professors speak with acute clarity and really demonstrate and empathy for the student to truly understand the topics!
Advance your career with an online degree
Earn a degree from world-class universities - 100% online
Frequently asked questions
To access the course materials, assignments and to earn a Certificate, you will need to purchase the Certificate experience when you enroll in a course. You can try a Free Trial instead, or apply for Financial Aid. The course may offer 'Full Course, No Certificate' instead. This option lets you see all course materials, submit required assessments, and get a final grade. This also means that you will not be able to purchase a Certificate experience.
When you enroll in the course, you get access to all of the courses in the Specialization, and you earn a certificate when you complete the work. Your electronic Certificate will be added to your Accomplishments page - from there, you can print your Certificate or add it to your LinkedIn profile.
Yes. In select learning programs, you can apply for financial aid or a scholarship if you can’t afford the enrollment fee. If fin aid or scholarship is available for your learning program selection, you’ll find a link to apply on the description page.
More questions
Financial aid available,
