Mathematics Integrated with Computers and Applications II
MATH 2F40

Summer 2014
Quiz 2
YOUR NAME:
Calculators are not allowed on this exam.
You may use one 8.5 11 sheet with notes in your own handwriting on both sides,
but no other sources of information.
You may assume all results from lecture, the notes, problem sets, and rec
Mathematics Integrated with Computers and Applications II
MATH 2F40

Summer 2014
2
Random Walks
Initially, the professor has the candy bowl. He withdraws a piece of candy and then
passes the bowl either left or right, with equal probability. Each person who receives the
bowl thereafter does the same thing: he or she takes a piece of c
Mathematics Integrated with Computers and Applications II
MATH 2F40

Summer 2014
Sums and Approximations
When you analyze the running time of an algorithm, the probability some procedure
succeeds, or the behavior of a loadbalancing or communications scheme, youll rarely get
a simple answer. The world is not so kind. More likely, youll
Mathematics Integrated with Computers and Applications II
MATH 2F40

Summer 2014
Final Exam
YOUR NAME:
This is an opennotes exam. However, calculators are not allowed.
You may assume all results from lecture, the notes, problem sets, and recitation.
Write your solutions in the space provided. If you need more space, write on the
Mathematics Integrated with Computers and Applications II
MATH 2F40

Summer 2014
Sums, Approximations, and Asymptotics II
1 Block Stacking
How far can a stack of identical blocks overhang the end of a table without toppling over?
Can a block be suspended entirely beyond the tables edge?
Table
Physics imposes some constraints on the ar
Mathematics Integrated with Computers and Applications II
MATH 2F40

Summer 2014
Special Topics
1 Streaks
Was the table of Hs and T s below generated by ipping a fair coin 100 times, or by
someone tapping the H and T keys in a what felt like a random way?
HT T T HT HT T HT T HT HT HT HT
T T T HHT HHT HT HT T HHHT HT
HHT HHT T T HHHT H
Mathematics Integrated with Computers and Applications II
MATH 2F40

Summer 2014
Quiz 1
YOUR NAME:
Circle the name of your recitation instructor:
Ishan
Christos
Grant
You may use one 8.5 11 sheet with notes in you own handwriting on both sides,
but no other sources of information.
Calculators are not allowed.
You may assume all res
Mathematics Integrated with Computers and Applications II
MATH 2F40

Summer 2014
Proofs
Why do you believe that 3 + 3 = 6?
Is it because your secondgrade teacher, Miss Dalrymple, told you so? She might have
been lying, you know. Or are you trusting life experience? If you have three coconuts and
someone gives you three more coconuts,
Mathematics Integrated with Computers and Applications II
MATH 2F40

Summer 2014
Random Variables
Weve used probablity to model a variety of experiments, games, and tests. Through
out, we have tried to compute probabilities of events. We asked, for example, what is the
probability of the event that you win the Monty Hall game? What is
Mathematics Integrated with Computers and Applications II
MATH 2F40

Summer 2014
Recurrences
Recursion breaking an object down into smaller objects of the same type is a ma
jor theme in mathematics and computer science. For example, in an induction proof we
establish the truth of a statement P (n) from the truth of the statement P (n
Mathematics Integrated with Computers and Applications II
MATH 2F40

Summer 2014
2
Conditional Probability
How do we compute Pr (A  B)? Since we are given that the person lives in Cambridge,
we can forget about everyone in the world who does not. Thus, all outcomes outside
event B are irrelevant. So, intuitively, Pr (A  B) should be
Mathematics Integrated with Computers and Applications II
MATH 2F40

Summer 2014
Generating Functions
Generating functions are one of the most surprising, useful, and clever inventions in
discrete math. Roughly speaking, generating functions transform problems about se
quences into problems about functions. This is great because weve
Mathematics Integrated with Computers and Applications II
MATH 2F40

Summer 2014
2
Graph Theory
no vertices is the single, stupid counterexample to many wouldbe theorems so were
banning it!) This is typical; everyone agrees moreorless what each term means, but dis
agrees about weird special cases. So do not be alarmed if denitions her
Mathematics Integrated with Computers and Applications II
MATH 2F40

Summer 2014
Independence
1 Independent Events
Suppose that we ip two fair coins simultaneously on opposite sides of a room. Intu
itively, the way one coin lands does not affect the way the other coin lands. The mathe
matical concept that captures this intuition is ca
Mathematics Integrated with Computers and Applications II
MATH 2F40

Summer 2014
Logic
Its really sort of amazing that people manage to communicate in the English language.
Here are some typical sentences:
1. You may have cake or you may have ice cream.
2. If pigs can y, then you can understand the Chernoff bound.
3. If you can solve
Mathematics Integrated with Computers and Applications II
MATH 2F40

Summer 2014
Induction II
1 Unstacking
Here is another wildly fun 6.042 game thats surely about to sweep the nation!
You begin with a stack of n boxes. Then you make a sequence of moves. In each move,
you divide one stack of boxes into two nonempty stacks. The game en
Mathematics Integrated with Computers and Applications II
MATH 2F40

Summer 2014
Expected Value I
The expectation or expected value of a random variable is a single number that tells
you a lot about the behavior of the variable. Roughly, the expectation is the average value,
where each value is weighted according to the probability th
Mathematics Integrated with Computers and Applications II
MATH 2F40

Summer 2014
Counting III
Today well briey review some facts you dervied in recitation on Friday and then turn
to some applications of counting.
1 The Bookkeeper Rule
In recitation you learned that the number of ways to rearrange the letters in the word
BOOKKEEPER is:
Mathematics Integrated with Computers and Applications II
MATH 2F40

Summer 2014
Expected Value II
1 The NumberPicking Game
Here is a game that you and I could play that reveals a strange property of expectation.
First, you think of a probability density function on the natural numbers. Your distri
bution can be absolutely anything yo
Mathematics Integrated with Computers and Applications II
MATH 2F40

Summer 2014
Induction I
1 Induction
A professor brings to class a bottomless bag of assorted miniature candy bars. She offers
to share in accordance with two rules. First, she numbers the students 0, 1, 2, 3, and so
forth for convenient reference. Now here are the tw
Mathematics Integrated with Computers and Applications II
MATH 2F40

Summer 2014
Number Theory II
Image of Alan Turing removed for copyright reasons.
The man pictured above is Alan Turing, the most important gure in the history of
computer science. For decades, his fascinating life story was shrouded by government
secrecy, societal ta
Mathematics Integrated with Computers and Applications II
MATH 2F40

Summer 2014
Number Theory I
Number theory is the study of the integers. Number theory is right at the core of math
ematics; even Ug the Caveman surely had some grasp of the integers at least the posi
tive ones. In fact, the integers are so elementary that one might a
Mathematics Integrated with Computers and Applications II
MATH 2F40

Summer 2014
Introduction to Probability
Probability is the last topic in this course and perhaps the most important. Many
algorithms rely on randomization. Investigating their correctness and performance re
quires probability theory. Moreover, many aspects of compute
Mathematics Integrated with Computers and Applications II
MATH 2F40

Summer 2014
Counting II
We realize everyone has been working pretty hard this term1 , and were considering
awarding some prizes for truly exceptional coursework. Here are some possible categories:
Best Administrative Critique We asserted that the quiz was closedbook.
Mathematics Integrated with Computers and Applications II
MATH 2F40

Summer 2014
Induction III
1 Two Puzzles
Here are two challenging puzzles.
1.1 The 9Number Puzzle
The numbers 1, 2, . . . , 9 are arranged in a 3 3 grid as shown below:
1 2 3
4 5 6
7 8 9
You can rearrange the numbers by rotating rows and columns. For example, rotating
Mathematics Integrated with Computers and Applications II
MATH 2F40

Summer 2014
Graph Theory II
1
Coloring Graphs
Each term, the MIT Schedules Ofce must assign a time slot for each nal exam. This is
not easy, because some students are taking several classes with nals, and a student can
take only one test during a particular time slot