WEBVTT

00:00:00.000 --> 00:00:02.445 align:middle line:90%
[SQUEAKING]

00:00:02.445 --> 00:00:03.912 align:middle line:90%
[RUSTLING]

00:00:03.912 --> 00:00:06.357 align:middle line:90%
[CLICKING]

00:00:06.357 --> 00:00:12.175 align:middle line:90%


00:00:12.175 --> 00:00:13.300 align:middle line:90%
ANKUR MOITRA: Hello, class.

00:00:13.300 --> 00:00:14.780 align:middle line:90%
Welcome to 18.200.

00:00:14.780 --> 00:00:16.800 align:middle line:84%
So if you're in the
right place, this

00:00:16.800 --> 00:00:19.560 align:middle line:84%
is Principles of
Discrete Applied Math.

00:00:19.560 --> 00:00:21.340 align:middle line:84%
I'll be one of
your co-lecturers.

00:00:21.340 --> 00:00:24.540 align:middle line:84%
I'm Ankur Moitra, and the other
co-lecturer is Peter Shor So,

00:00:24.540 --> 00:00:28.440 align:middle line:84%
Peter, do you want to
stand up and take a bow?

00:00:28.440 --> 00:00:30.720 align:middle line:84%
So the basic topics that
we're going to be covering

00:00:30.720 --> 00:00:33.940 align:middle line:84%
is we're going to cover topics
like probability counting.

00:00:33.940 --> 00:00:36.040 align:middle line:84%
This will be the beginning
part of the class.

00:00:36.040 --> 00:00:38.760 align:middle line:84%
Some of you may have
seen these topics before.

00:00:38.760 --> 00:00:40.700 align:middle line:84%
But really in the later
parts of the class,

00:00:40.700 --> 00:00:42.860 align:middle line:84%
we're going to cover
some quite new things.

00:00:42.860 --> 00:00:44.240 align:middle line:84%
We'll talk a lot
about generating

00:00:44.240 --> 00:00:48.620 align:middle line:84%
functions, number theory,
cryptography, coding theory,

00:00:48.620 --> 00:00:52.180 align:middle line:84%
things like noiseless
coding, linear programming,

00:00:52.180 --> 00:00:54.240 align:middle line:90%
and lots of other fun topics.

00:00:54.240 --> 00:00:56.103 align:middle line:90%
I want to mention that--

00:00:56.103 --> 00:00:57.520 align:middle line:84%
I mean, the goal
for this class is

00:00:57.520 --> 00:00:59.810 align:middle line:84%
to try and teach you
how to express proofs

00:00:59.810 --> 00:01:01.730 align:middle line:90%
in an understandable way.

00:01:01.730 --> 00:01:03.610 align:middle line:84%
This is one of
these skills at MIT

00:01:03.610 --> 00:01:07.010 align:middle line:84%
that you can pick
up a little bit

00:01:07.010 --> 00:01:09.410 align:middle line:84%
from various classes
along the way,

00:01:09.410 --> 00:01:11.170 align:middle line:84%
but sitting down
and conscientiously

00:01:11.170 --> 00:01:15.090 align:middle line:84%
thinking about what makes
a proof easy to follow,

00:01:15.090 --> 00:01:18.355 align:middle line:84%
how to make it more modular and
understandable for the audience

00:01:18.355 --> 00:01:19.730 align:middle line:84%
is something that's
going to help

00:01:19.730 --> 00:01:22.930 align:middle line:84%
you a lot with
other parts of math,

00:01:22.930 --> 00:01:25.630 align:middle line:84%
and also other parts of
computer science in general.

00:01:25.630 --> 00:01:29.490 align:middle line:84%
A lot of the things that go into
good coding practices in terms

00:01:29.490 --> 00:01:31.410 align:middle line:84%
of modularity are the
same types of things

00:01:31.410 --> 00:01:35.250 align:middle line:84%
we think about when we're
writing good proofs.

00:01:35.250 --> 00:01:39.210 align:middle line:84%
So that's enough
boilerplate for me.

00:01:39.210 --> 00:01:42.370 align:middle line:84%
I can only go so long
without talking about math.

00:01:42.370 --> 00:01:44.490 align:middle line:84%
So what we're going to
be talking about today

00:01:44.490 --> 00:01:48.593 align:middle line:84%
is we're going to talk about
the pigeonhole principle.

00:01:48.593 --> 00:01:50.010 align:middle line:84%
Actually, first
let me hand it off

00:01:50.010 --> 00:01:52.135 align:middle line:84%
to Susan, who's going to
tell you a little bit more

00:01:52.135 --> 00:01:56.250 align:middle line:84%
about the recitations, and then
I'll take it away after that.

00:01:56.250 --> 00:01:58.100 align:middle line:84%
SUSAN: Thank you
very much, Ankur.

00:01:58.100 --> 00:02:01.820 align:middle line:84%
So as Ankur noted, this
is a CIM, a communication

00:02:01.820 --> 00:02:03.400 align:middle line:90%
intensive class in the major.

00:02:03.400 --> 00:02:08.300 align:middle line:84%
And the purpose of CIMs is
to help you to communicate

00:02:08.300 --> 00:02:11.280 align:middle line:90%
effectively as mathematicians.

00:02:11.280 --> 00:02:14.860 align:middle line:84%
That's for CIMs in
the math department.

00:02:14.860 --> 00:02:18.780 align:middle line:84%
So communicating successfully
in a new discipline

00:02:18.780 --> 00:02:21.800 align:middle line:84%
requires expertise in
several different domains.

00:02:21.800 --> 00:02:26.020 align:middle line:84%
This is based on a
model by Anne Beaufort.

00:02:26.020 --> 00:02:29.220 align:middle line:84%
We will teach you in
these different domains

00:02:29.220 --> 00:02:32.300 align:middle line:84%
over the course of this
semester in the recitations.

00:02:32.300 --> 00:02:35.300 align:middle line:84%
So you need expertise, of
course, with the content.

00:02:35.300 --> 00:02:37.580 align:middle line:84%
And so the recitations
will be designed

00:02:37.580 --> 00:02:39.860 align:middle line:84%
to help you reinforce
your understanding

00:02:39.860 --> 00:02:42.620 align:middle line:84%
of the mathematics,
in addition to

00:02:42.620 --> 00:02:44.540 align:middle line:90%
other aspects of communication.

00:02:44.540 --> 00:02:47.200 align:middle line:84%
To communicate successfully
as a mathematician,

00:02:47.200 --> 00:02:51.640 align:middle line:84%
you need to know the norms of
mathematics, because they vary.

00:02:51.640 --> 00:02:54.820 align:middle line:84%
There are differences
between norms in CORE 6

00:02:54.820 --> 00:02:57.750 align:middle line:84%
and norms in mathematics,
and you'll become familiar

00:02:57.750 --> 00:02:58.650 align:middle line:90%
with some of those.

00:02:58.650 --> 00:03:02.790 align:middle line:84%
For example, what goes into
the introduction of a paper?

00:03:02.790 --> 00:03:06.750 align:middle line:84%
For the term paper, that will
be basically a multi-page proof

00:03:06.750 --> 00:03:09.190 align:middle line:84%
and we'll tell you
the differences what

00:03:09.190 --> 00:03:11.430 align:middle line:90%
goes in the introduction there.

00:03:11.430 --> 00:03:15.070 align:middle line:84%
Also norms of wording, like
how to use the word we.

00:03:15.070 --> 00:03:18.070 align:middle line:84%
Mathematicians use
we in different ways

00:03:18.070 --> 00:03:20.870 align:middle line:90%
than some other disciplines.

00:03:20.870 --> 00:03:24.330 align:middle line:84%
Also, to communicate
successfully as a mathematician,

00:03:24.330 --> 00:03:28.830 align:middle line:84%
you also need expertise with
processes for generating

00:03:28.830 --> 00:03:30.210 align:middle line:90%
effective communication.

00:03:30.210 --> 00:03:31.330 align:middle line:90%
That includes drafting.

00:03:31.330 --> 00:03:34.990 align:middle line:84%
We'll have multiple drafts
built into the term paper,

00:03:34.990 --> 00:03:37.370 align:middle line:84%
as well as things
like how to use LaTeX.

00:03:37.370 --> 00:03:40.450 align:middle line:84%
And you'll start learning that
right off with the first p set.

00:03:40.450 --> 00:03:43.290 align:middle line:84%
If you're unfamiliar with
LaTeX, please reach out.

00:03:43.290 --> 00:03:46.310 align:middle line:90%
We can help you in office hours.

00:03:46.310 --> 00:03:51.030 align:middle line:84%
You also need expertise
with rhetoric.

00:03:51.030 --> 00:03:54.040 align:middle line:90%
And by this I mean.

00:03:54.040 --> 00:03:56.160 align:middle line:84%
rhetorical
strategies, strategies

00:03:56.160 --> 00:04:00.400 align:middle line:84%
for accomplishing your
goals as a communicator.

00:04:00.400 --> 00:04:04.200 align:middle line:84%
For example, mathematicians, if
they have a complicated proof,

00:04:04.200 --> 00:04:09.180 align:middle line:84%
one way to communicate the logic
clearly is to use modularity.

00:04:09.180 --> 00:04:12.560 align:middle line:84%
Break the proof apart,
pull out a lemma.

00:04:12.560 --> 00:04:15.800 align:middle line:84%
Other strategies that
you'll learn in recitation

00:04:15.800 --> 00:04:23.120 align:middle line:84%
are how to structure the
ordering of information

00:04:23.120 --> 00:04:26.680 align:middle line:84%
within sentences, within
sections, within the paper,

00:04:26.680 --> 00:04:29.400 align:middle line:84%
to make the paper
flow well, to reveal

00:04:29.400 --> 00:04:31.840 align:middle line:84%
the flow of the
underlying logic,

00:04:31.840 --> 00:04:34.660 align:middle line:84%
so that readers can
easily follow the logic,

00:04:34.660 --> 00:04:38.240 align:middle line:84%
and also how to use what we call
guiding text to guide readers

00:04:38.240 --> 00:04:40.360 align:middle line:90%
through the logic.

00:04:40.360 --> 00:04:42.910 align:middle line:84%
And we'll give other
strategies in recitation also.

00:04:42.910 --> 00:04:46.000 align:middle line:90%


00:04:46.000 --> 00:04:47.000 align:middle line:90%
ANKUR MOITRA: All right.

00:04:47.000 --> 00:04:48.240 align:middle line:90%
So back to me.

00:04:48.240 --> 00:04:51.450 align:middle line:84%
So I'm going to tell you
about one of the first topics

00:04:51.450 --> 00:04:55.530 align:middle line:84%
we're going to cover in
class, which is a very

00:04:55.530 --> 00:04:58.050 align:middle line:90%
simple but powerful idea.

00:04:58.050 --> 00:05:00.450 align:middle line:84%
We're going to be
discussing something called

00:05:00.450 --> 00:05:03.250 align:middle line:90%
the pigeonhole principle.

00:05:03.250 --> 00:05:05.490 align:middle line:84%
Now the pigeonhole
principle, let

00:05:05.490 --> 00:05:08.290 align:middle line:84%
me tell you the main takeaways
before we get into it.

00:05:08.290 --> 00:05:09.870 align:middle line:90%
It's a very simple idea.

00:05:09.870 --> 00:05:12.650 align:middle line:84%
I'll tell you what exactly
it is, and then we'll

00:05:12.650 --> 00:05:16.570 align:middle line:84%
go through some neat
applications of it.

00:05:16.570 --> 00:05:18.950 align:middle line:84%
It turns out to be
shockingly powerful,

00:05:18.950 --> 00:05:23.130 align:middle line:84%
even though you'll think of it
as a very obvious statement.

00:05:23.130 --> 00:05:26.710 align:middle line:84%
I guess the other thing, which
is important to keep in mind,

00:05:26.710 --> 00:05:29.330 align:middle line:90%
it's also quite oddly named.

00:05:29.330 --> 00:05:31.090 align:middle line:84%
I don't really
know the etymology

00:05:31.090 --> 00:05:33.490 align:middle line:84%
of why it's called the
pigeonhole principle,

00:05:33.490 --> 00:05:35.830 align:middle line:90%
but the basic idea--

00:05:35.830 --> 00:05:37.630 align:middle line:84%
let's explain it
through an example,

00:05:37.630 --> 00:05:40.690 align:middle line:84%
and then I'll tell you about
where the pigeons come in.

00:05:40.690 --> 00:05:44.570 align:middle line:84%
So here's a problem that
many of us face every day.

00:05:44.570 --> 00:05:51.960 align:middle line:84%
So imagine that we have five
colors of socks in your drawer.

00:05:51.960 --> 00:05:56.540 align:middle line:90%


00:05:56.540 --> 00:05:58.660 align:middle line:84%
And it's early in the
morning, so you're

00:05:58.660 --> 00:06:02.420 align:middle line:84%
trying to find a match that you
can get dressed and go to work.

00:06:02.420 --> 00:06:05.580 align:middle line:84%
And one of the basic
problems you could ask

00:06:05.580 --> 00:06:10.140 align:middle line:84%
is, how many socks do you have
to pick out from your drawer

00:06:10.140 --> 00:06:14.620 align:middle line:84%
to guarantee that even if you're
very, very unlucky, no matter

00:06:14.620 --> 00:06:18.220 align:middle line:90%
what, you must have a match?

00:06:18.220 --> 00:06:20.860 align:middle line:84%
So this is really an example
of the pigeonhole principle

00:06:20.860 --> 00:06:22.540 align:middle line:90%
in action.

00:06:22.540 --> 00:06:24.700 align:middle line:84%
We'll see why exactly it's
the pigeonhole principle

00:06:24.700 --> 00:06:25.320 align:middle line:90%
in a minute.

00:06:25.320 --> 00:06:26.920 align:middle line:90%
But any ideas?

00:06:26.920 --> 00:06:28.660 align:middle line:84%
So how many pairs,
how many socks

00:06:28.660 --> 00:06:31.340 align:middle line:84%
do I have to pull out so
that I'm guaranteed a pair?

00:06:31.340 --> 00:06:32.460 align:middle line:90%
Yeah?

00:06:32.460 --> 00:06:33.040 align:middle line:90%
Six.

00:06:33.040 --> 00:06:34.180 align:middle line:90%
Perfect.

00:06:34.180 --> 00:06:35.940 align:middle line:84%
Because you could
get very unlucky

00:06:35.940 --> 00:06:37.580 align:middle line:84%
in the beginning
and your first five

00:06:37.580 --> 00:06:39.860 align:middle line:84%
could be each different
colors, and then

00:06:39.860 --> 00:06:41.780 align:middle line:84%
no matter what the
sixth one is, it's

00:06:41.780 --> 00:06:45.340 align:middle line:84%
going to match with one of the
ones you've selected so far.

00:06:45.340 --> 00:06:50.350 align:middle line:84%
This is really an example of
a much more general principle.

00:06:50.350 --> 00:06:53.210 align:middle line:84%
So let me explain
it with pigeons,

00:06:53.210 --> 00:06:56.350 align:middle line:84%
and then we'll talk about
some more fun applications.

00:06:56.350 --> 00:07:02.830 align:middle line:84%
So more generally,
we can imagine

00:07:02.830 --> 00:07:04.420 align:middle line:90%
that we've got n pigeons.

00:07:04.420 --> 00:07:07.110 align:middle line:90%


00:07:07.110 --> 00:07:10.950 align:middle line:90%
I'll even draw them for you.

00:07:10.950 --> 00:07:16.330 align:middle line:84%
And we're placing
them in m pigeonholes.

00:07:16.330 --> 00:07:21.150 align:middle line:90%


00:07:21.150 --> 00:07:25.390 align:middle line:84%
I don't know why they want to go
in the pigeonholes, but they do.

00:07:25.390 --> 00:07:28.150 align:middle line:84%
And let's imagine that n
are a number of pigeons

00:07:28.150 --> 00:07:30.190 align:middle line:90%
is strictly larger than m.

00:07:30.190 --> 00:07:41.350 align:middle line:84%
Then what I claim is that there
must be at least two pigeons

00:07:41.350 --> 00:07:44.510 align:middle line:90%
in the same pigeonhole.

00:07:44.510 --> 00:07:46.140 align:middle line:90%
That's the pigeonhole principle.

00:07:46.140 --> 00:07:49.040 align:middle line:90%


00:07:49.040 --> 00:07:52.380 align:middle line:84%
Now we're going to talk a lot
about how to write good proofs,

00:07:52.380 --> 00:07:54.520 align:middle line:84%
and honestly, a lot
of us professors

00:07:54.520 --> 00:07:57.600 align:middle line:84%
spend a lot of time thinking
about how to teach in class

00:07:57.600 --> 00:07:59.280 align:middle line:90%
and make it engaging.

00:07:59.280 --> 00:08:02.333 align:middle line:84%
I remember back when
I used to teach 042,

00:08:02.333 --> 00:08:04.500 align:middle line:84%
when I covered things like
the pigeonhole principle,

00:08:04.500 --> 00:08:07.600 align:middle line:84%
there was a bit of an arms race
between faculty to come up with

00:08:07.600 --> 00:08:11.840 align:middle line:84%
the best props for how
to explain simple things,

00:08:11.840 --> 00:08:15.360 align:middle line:84%
and I borrowed from one of my
colleagues a whole box of fake

00:08:15.360 --> 00:08:19.520 align:middle line:84%
dead pigeons, which was very
strange because I was going down

00:08:19.520 --> 00:08:22.520 align:middle line:84%
the elevators in the status
center with my box of dead

00:08:22.520 --> 00:08:25.380 align:middle line:84%
pigeons, and I got a
lot of strange looks.

00:08:25.380 --> 00:08:27.745 align:middle line:84%
People would ask
me, what's going on?

00:08:27.745 --> 00:08:29.120 align:middle line:84%
And then I had to
explain to them

00:08:29.120 --> 00:08:30.780 align:middle line:84%
that I'm teaching the
pigeonhole principle.

00:08:30.780 --> 00:08:33.091 align:middle line:84%
I don't know why it's called
the pigeonhole principle.

00:08:33.091 --> 00:08:35.299 align:middle line:84%
But then someone asked me
when I was on the elevator,

00:08:35.299 --> 00:08:37.000 align:middle line:84%
does that really help
people understand

00:08:37.000 --> 00:08:38.600 align:middle line:90%
the pigeonhole principle?

00:08:38.600 --> 00:08:40.539 align:middle line:84%
And I got to say, I
don't think it does.

00:08:40.539 --> 00:08:42.039 align:middle line:84%
Once you get that
question, you have

00:08:42.039 --> 00:08:46.450 align:middle line:84%
to reevaluate your teaching
preferences and priorities.

00:08:46.450 --> 00:08:48.590 align:middle line:84%
But in any case, this is
the pigeonhole principle.

00:08:48.590 --> 00:08:51.690 align:middle line:84%
I don't know why the pigeons
want to go into the pigeonholes,

00:08:51.690 --> 00:08:55.970 align:middle line:84%
but you can see how the simple
example of socks and finding

00:08:55.970 --> 00:08:59.270 align:middle line:84%
a pair is an example of
the pigeonhole principle.

00:08:59.270 --> 00:09:01.610 align:middle line:84%
You just have to be careful
about what are the pigeons

00:09:01.610 --> 00:09:02.710 align:middle line:90%
and what are the holes.

00:09:02.710 --> 00:09:04.690 align:middle line:84%
In this case, it's
pretty obvious

00:09:04.690 --> 00:09:07.850 align:middle line:84%
that the pigeons
are individual socks

00:09:07.850 --> 00:09:11.098 align:middle line:84%
and the holes are colors
of different socks.

00:09:11.098 --> 00:09:12.890 align:middle line:84%
But there are other
applications that we're

00:09:12.890 --> 00:09:15.570 align:middle line:84%
going to see where it's a little
bit more subtle how exactly

00:09:15.570 --> 00:09:17.410 align:middle line:90%
to get this principle to work.

00:09:17.410 --> 00:09:19.650 align:middle line:84%
Let me tell you one
generalization, which is also

00:09:19.650 --> 00:09:23.930 align:middle line:84%
powerful, which is, in general,
imagine I had way more pigeons

00:09:23.930 --> 00:09:25.450 align:middle line:90%
than pigeonholes.

00:09:25.450 --> 00:09:27.570 align:middle line:84%
It turns out you can
guarantee that there's

00:09:27.570 --> 00:09:33.490 align:middle line:84%
at least the ceiling of n over m
pigeons in the same pigeonhole.

00:09:33.490 --> 00:09:35.748 align:middle line:90%
So this is a very simple idea.

00:09:35.748 --> 00:09:37.290 align:middle line:84%
Let's actually try
and prove it, even

00:09:37.290 --> 00:09:39.690 align:middle line:90%
though it might seem obvious.

00:09:39.690 --> 00:09:43.810 align:middle line:84%
So it turns out there's a
very simple way to prove it.

00:09:43.810 --> 00:09:45.890 align:middle line:84%
This is one example
of a proof technique

00:09:45.890 --> 00:09:48.930 align:middle line:84%
we're going to see all
throughout class, which

00:09:48.930 --> 00:09:51.390 align:middle line:90%
is a proof by contradiction.

00:09:51.390 --> 00:09:54.530 align:middle line:90%


00:09:54.530 --> 00:09:56.210 align:middle line:84%
And I'm going to
try and practice

00:09:56.210 --> 00:09:58.450 align:middle line:84%
what I preach in today's
lecture and show you

00:09:58.450 --> 00:10:01.610 align:middle line:84%
what are the right
ways to write proofs.

00:10:01.610 --> 00:10:04.330 align:middle line:84%
This won't be quite as formal
as you do for your writing

00:10:04.330 --> 00:10:06.490 align:middle line:90%
exercise, but pretty close.

00:10:06.490 --> 00:10:08.170 align:middle line:84%
You can see that
the first thing I'm

00:10:08.170 --> 00:10:10.130 align:middle line:84%
doing when I write a
proof by contradiction

00:10:10.130 --> 00:10:12.810 align:middle line:84%
is I'm putting very
clearly the fact

00:10:12.810 --> 00:10:14.850 align:middle line:84%
that it's a proof
by contradiction.

00:10:14.850 --> 00:10:16.250 align:middle line:84%
You don't want
your readers to be

00:10:16.250 --> 00:10:19.610 align:middle line:84%
confused until the very end
where the pieces come together.

00:10:19.610 --> 00:10:21.370 align:middle line:84%
You want as much as
possible that they

00:10:21.370 --> 00:10:23.210 align:middle line:84%
see the blueprint
of how the proof is

00:10:23.210 --> 00:10:27.010 align:middle line:84%
supposed to go before they
get through all of it, right?

00:10:27.010 --> 00:10:29.510 align:middle line:84%
And so what we're going to do
is we're going to suppose not.

00:10:29.510 --> 00:10:33.596 align:middle line:84%
We'll suppose that the
pigeonhole principle is false.

00:10:33.596 --> 00:10:37.810 align:middle line:84%
Then what I can do is
I can really just count

00:10:37.810 --> 00:10:40.020 align:middle line:84%
the number of pigeons
and the number of holes

00:10:40.020 --> 00:10:41.240 align:middle line:90%
in two different ways.

00:10:41.240 --> 00:10:45.780 align:middle line:84%
So what I can do is n
is my number of pigeons.

00:10:45.780 --> 00:10:48.480 align:middle line:84%
Now each pigeon has to
be assigned to some hole.

00:10:48.480 --> 00:10:52.220 align:middle line:84%
So I can sum over all
of the different holes h

00:10:52.220 --> 00:10:53.940 align:middle line:90%
that I'm interested in.

00:10:53.940 --> 00:10:57.940 align:middle line:84%
And I can look at Nh3,
where Nh3 here is just

00:10:57.940 --> 00:11:02.260 align:middle line:84%
defined to be the
number of pigeons that

00:11:02.260 --> 00:11:05.700 align:middle line:90%
are in some particular hole h.

00:11:05.700 --> 00:11:08.020 align:middle line:84%
So it's just the count of
how many pigeons ended up

00:11:08.020 --> 00:11:09.620 align:middle line:90%
in that hole.

00:11:09.620 --> 00:11:12.460 align:middle line:84%
And all I'm doing is I'm just
counting the different pigeons

00:11:12.460 --> 00:11:13.280 align:middle line:90%
in a different way.

00:11:13.280 --> 00:11:15.500 align:middle line:90%
So that's definitely equal to n.

00:11:15.500 --> 00:11:18.580 align:middle line:84%
But now, by assumption, since
the pigeonhole principle

00:11:18.580 --> 00:11:24.660 align:middle line:84%
is false, I'm assuming
that each one of the holes

00:11:24.660 --> 00:11:28.460 align:middle line:84%
has at most one
pigeon in it, right?

00:11:28.460 --> 00:11:32.260 align:middle line:84%
And then the total number
of holes I get is m.

00:11:32.260 --> 00:11:34.920 align:middle line:84%
So now what I claim is
I have a contradiction.

00:11:34.920 --> 00:11:35.660 align:middle line:90%
Why?

00:11:35.660 --> 00:11:38.550 align:middle line:84%
Because I've just shown for you
that if the pigeonhole principle

00:11:38.550 --> 00:11:42.470 align:middle line:84%
is false, then n is
less than or equal to m.

00:11:42.470 --> 00:11:44.430 align:middle line:84%
But what was my
starting assumption

00:11:44.430 --> 00:11:48.230 align:middle line:84%
was just that n is
strictly larger than m.

00:11:48.230 --> 00:11:49.750 align:middle line:90%
So this is my proof.

00:11:49.750 --> 00:11:53.450 align:middle line:90%
But m is larger than n.

00:11:53.450 --> 00:11:55.110 align:middle line:90%
That's one of the assumptions.

00:11:55.110 --> 00:11:56.770 align:middle line:90%
And so we get a contradiction.

00:11:56.770 --> 00:12:02.550 align:middle line:90%


00:12:02.550 --> 00:12:03.330 align:middle line:90%
That's it.

00:12:03.330 --> 00:12:05.477 align:middle line:84%
That's our first
proof in this class.

00:12:05.477 --> 00:12:07.310 align:middle line:84%
This is an example of
how you might write up

00:12:07.310 --> 00:12:08.570 align:middle line:90%
a proof by contradiction.

00:12:08.570 --> 00:12:11.030 align:middle line:84%
A lot of times in class they'll
be a lot more complicated

00:12:11.030 --> 00:12:13.690 align:middle line:84%
than this, but they all
follow this basic blueprint.

00:12:13.690 --> 00:12:14.900 align:middle line:90%
Yes?

00:12:14.900 --> 00:12:16.150 align:middle line:90%
AUDIENCE: Is n greater than m?

00:12:16.150 --> 00:12:17.510 align:middle line:90%
ANKUR MOITRA: Ah, sorry.

00:12:17.510 --> 00:12:18.610 align:middle line:90%
n is greater than m.

00:12:18.610 --> 00:12:22.830 align:middle line:90%
Thank you n is greater than m.

00:12:22.830 --> 00:12:24.610 align:middle line:84%
Any other questions,
or that was it?

00:12:24.610 --> 00:12:25.530 align:middle line:90%
OK, good.

00:12:25.530 --> 00:12:28.470 align:middle line:84%
Feel free to interject
any time with questions.

00:12:28.470 --> 00:12:28.970 align:middle line:90%
All right.

00:12:28.970 --> 00:12:31.370 align:middle line:84%
Let me show you one other
principle in action.

00:12:31.370 --> 00:12:33.390 align:middle line:84%
So let's talk about
some cooler applications

00:12:33.390 --> 00:12:35.480 align:middle line:84%
of the pigeonhole
principle, now that we

00:12:35.480 --> 00:12:37.860 align:middle line:84%
know what it is and
we know why it's true,

00:12:37.860 --> 00:12:42.000 align:middle line:84%
and we've seen some simple
illustrations of it.

00:12:42.000 --> 00:12:46.200 align:middle line:84%
What I claim is that a lot of
times, writing a good proof

00:12:46.200 --> 00:12:49.360 align:middle line:84%
is also about finding the
right abstraction for how

00:12:49.360 --> 00:12:52.240 align:middle line:84%
to think about something,
how to model it.

00:12:52.240 --> 00:12:56.880 align:middle line:84%
So let me give you a simple
lemma that we're going to prove.

00:12:56.880 --> 00:12:59.160 align:middle line:84%
So first, this lemma
isn't going to sound

00:12:59.160 --> 00:13:01.360 align:middle line:84%
like the pigeonhole
principle, but we'll turn it

00:13:01.360 --> 00:13:03.520 align:middle line:90%
into the pigeonhole principle.

00:13:03.520 --> 00:13:06.100 align:middle line:84%
Let's imagine you're
going to a party.

00:13:06.100 --> 00:13:09.600 align:middle line:84%
Let's say you're going to the
Super Bowl party this weekend.

00:13:09.600 --> 00:13:13.520 align:middle line:90%
And you've got n people.

00:13:13.520 --> 00:13:15.640 align:middle line:84%
There are n total people,
including yourself,

00:13:15.640 --> 00:13:16.880 align:middle line:90%
at the party.

00:13:16.880 --> 00:13:21.620 align:middle line:84%
What I claim is that
no matter who's there,

00:13:21.620 --> 00:13:24.840 align:middle line:84%
there are always
two people, at least

00:13:24.840 --> 00:13:36.600 align:middle line:84%
two people who know the
same number of other people.

00:13:36.600 --> 00:13:39.610 align:middle line:90%


00:13:39.610 --> 00:13:43.410 align:middle line:84%
This is a mathematical
fact about parties.

00:13:43.410 --> 00:13:46.130 align:middle line:84%
This doesn't quite look like
the pigeonhole principle,

00:13:46.130 --> 00:13:47.770 align:middle line:90%
but I claim it is.

00:13:47.770 --> 00:13:49.730 align:middle line:84%
And moreover, what
we really need

00:13:49.730 --> 00:13:52.700 align:middle line:84%
is we need the right
way to think about this.

00:13:52.700 --> 00:13:57.330 align:middle line:84%
And we'll practice this type
of skill a lot in recitations.

00:13:57.330 --> 00:13:59.210 align:middle line:84%
This is an example
of something which

00:13:59.210 --> 00:14:01.490 align:middle line:84%
is a lot easier to prove
when you have the right way

00:14:01.490 --> 00:14:03.250 align:middle line:90%
to visualize it.

00:14:03.250 --> 00:14:07.450 align:middle line:84%
So it turns out that the
right way to visualize it

00:14:07.450 --> 00:14:11.250 align:middle line:90%
is to draw a graph.

00:14:11.250 --> 00:14:13.690 align:middle line:84%
Namely, something
with nodes that

00:14:13.690 --> 00:14:15.430 align:middle line:90%
represent people at the party.

00:14:15.430 --> 00:14:18.130 align:middle line:84%
So there are n different
nodes in my graph.

00:14:18.130 --> 00:14:20.130 align:middle line:84%
And then there are
edges that represent

00:14:20.130 --> 00:14:23.090 align:middle line:84%
different relationships, whether
the two people know each other

00:14:23.090 --> 00:14:24.370 align:middle line:90%
or not.

00:14:24.370 --> 00:14:28.170 align:middle line:84%
So for example, I could have
that the people in my party

00:14:28.170 --> 00:14:30.550 align:middle line:84%
look like they
define this graph.

00:14:30.550 --> 00:14:34.340 align:middle line:84%
I've got four people
in my party n equals 4.

00:14:34.340 --> 00:14:39.140 align:middle line:84%
Again, as I mentioned, each
of these nodes are people.

00:14:39.140 --> 00:14:40.980 align:middle line:90%
They're individual people.

00:14:40.980 --> 00:14:46.640 align:middle line:84%
And these edges represent
people who know each other.

00:14:46.640 --> 00:14:50.300 align:middle line:90%


00:14:50.300 --> 00:14:53.192 align:middle line:84%
And then when I draw
in all my edges,

00:14:53.192 --> 00:14:56.380 align:middle line:84%
maybe I'll end up with
a graph like this.

00:14:56.380 --> 00:14:58.620 align:middle line:84%
And you can see that
there are two people who

00:14:58.620 --> 00:15:02.100 align:middle line:84%
know the same number of people
at the party, like this node

00:15:02.100 --> 00:15:04.140 align:middle line:84%
right here, and this
node right here.

00:15:04.140 --> 00:15:06.260 align:middle line:84%
The number of edges
that are incident

00:15:06.260 --> 00:15:09.040 align:middle line:84%
to that node, which represents
how many other people they know

00:15:09.040 --> 00:15:10.580 align:middle line:90%
is both two.

00:15:10.580 --> 00:15:13.580 align:middle line:84%
So my lemma is true in
this simple example.

00:15:13.580 --> 00:15:16.140 align:middle line:84%
And now I can understand,
through this visual,

00:15:16.140 --> 00:15:19.780 align:middle line:84%
how exactly a graph
relates to this lemma

00:15:19.780 --> 00:15:23.300 align:middle line:90%
that I asserted to begin with.

00:15:23.300 --> 00:15:25.620 align:middle line:84%
So now we can actually
prove it once we

00:15:25.620 --> 00:15:28.380 align:middle line:90%
have this abstraction in hand.

00:15:28.380 --> 00:15:31.710 align:middle line:84%
So let's talk about
how that works.

00:15:31.710 --> 00:15:35.110 align:middle line:84%
Let me define one more quantity
which will be of interest for us

00:15:35.110 --> 00:15:37.750 align:middle line:90%
today just called the degree.

00:15:37.750 --> 00:15:41.370 align:middle line:84%
That's just the number of edges
that are incident to a node.

00:15:41.370 --> 00:15:46.950 align:middle line:90%


00:15:46.950 --> 00:16:00.010 align:middle line:84%
So the degree of a node is the
number of edges incident to it.

00:16:00.010 --> 00:16:04.390 align:middle line:90%


00:16:04.390 --> 00:16:08.350 align:middle line:84%
That share an end point, that
have that node as an point.

00:16:08.350 --> 00:16:13.190 align:middle line:84%
So now let's try and prove this
using the pigeonhole principle.

00:16:13.190 --> 00:16:14.967 align:middle line:84%
In fact, the crucial
thing in applying

00:16:14.967 --> 00:16:17.550 align:middle line:84%
the pigeonhole principle is to
figure out what are the pigeons

00:16:17.550 --> 00:16:19.870 align:middle line:90%
and what are the holes.

00:16:19.870 --> 00:16:22.810 align:middle line:84%
Does anyone have any idea what
we should make the pigeons be,

00:16:22.810 --> 00:16:24.613 align:middle line:84%
and what we should
make the holes be

00:16:24.613 --> 00:16:25.780 align:middle line:90%
to try and prove this lemma?

00:16:25.780 --> 00:16:31.520 align:middle line:90%


00:16:31.520 --> 00:16:32.240 align:middle line:90%
Yeah?

00:16:32.240 --> 00:16:38.080 align:middle line:84%
AUDIENCE: Maybe nodes are the
holes and the connections are--

00:16:38.080 --> 00:16:39.340 align:middle line:90%
ANKUR MOITRA: OK.

00:16:39.340 --> 00:16:41.960 align:middle line:90%
We could try that way.

00:16:41.960 --> 00:16:44.260 align:middle line:84%
I might have a little bit
of difficulty that way.

00:16:44.260 --> 00:16:47.040 align:middle line:90%
Yeah?

00:16:47.040 --> 00:16:48.540 align:middle line:90%
Yeah, exactly.

00:16:48.540 --> 00:16:49.280 align:middle line:90%
OK.

00:16:49.280 --> 00:16:51.820 align:middle line:84%
Because where do I
want the collision?

00:16:51.820 --> 00:16:54.980 align:middle line:84%
So the collision happens
between two pigeons

00:16:54.980 --> 00:16:56.640 align:middle line:90%
who land in the same hole.

00:16:56.640 --> 00:17:00.360 align:middle line:84%
So what I want is I want
two people to collide.

00:17:00.360 --> 00:17:02.020 align:middle line:84%
And what does it
mean to collide?

00:17:02.020 --> 00:17:04.640 align:middle line:84%
I want them to have
the same degree.

00:17:04.640 --> 00:17:06.520 align:middle line:84%
So that tells me what
should be the pigeons

00:17:06.520 --> 00:17:08.480 align:middle line:90%
and what should be the holes.

00:17:08.480 --> 00:17:14.369 align:middle line:84%
So what I claim is that
the degree of each node.

00:17:14.369 --> 00:17:17.560 align:middle line:90%


00:17:17.560 --> 00:17:20.640 align:middle line:84%
Well, first of all,
it's an integer

00:17:20.640 --> 00:17:29.090 align:middle line:84%
that's in this set from 0, 1,
all the way up to n minus 1.

00:17:29.090 --> 00:17:37.556 align:middle line:84%
And each node is going
to be this pigeon.

00:17:37.556 --> 00:17:40.570 align:middle line:84%
And the way that I'm going
to choose which particular

00:17:40.570 --> 00:17:45.610 align:middle line:84%
hole it gets mapped to is
what the associated degree is.

00:17:45.610 --> 00:17:46.930 align:middle line:90%
So I have a hole.

00:17:46.930 --> 00:17:51.570 align:middle line:84%
Each name is an integer
from up to n minus 1.

00:17:51.570 --> 00:17:53.290 align:middle line:84%
And then each
particular node that

00:17:53.290 --> 00:17:56.490 align:middle line:84%
represents a person is going
to get mapped to whatever

00:17:56.490 --> 00:17:59.050 align:middle line:90%
their degree is.

00:17:59.050 --> 00:18:02.650 align:middle line:90%
So sounds like I'm done.

00:18:02.650 --> 00:18:03.710 align:middle line:90%
Am I done here?

00:18:03.710 --> 00:18:05.830 align:middle line:84%
Can I just appeal to
the pigeonhole principle

00:18:05.830 --> 00:18:07.640 align:middle line:84%
and say that two
nodes must collide?

00:18:07.640 --> 00:18:12.410 align:middle line:90%


00:18:12.410 --> 00:18:13.290 align:middle line:90%
Yeah?

00:18:13.290 --> 00:18:18.345 align:middle line:84%
AUDIENCE: [INAUDIBLE] the nodes
and the set of possible degrees.

00:18:18.345 --> 00:18:19.470 align:middle line:90%
ANKUR MOITRA: That's right.

00:18:19.470 --> 00:18:22.410 align:middle line:84%
So I'm definitely
not done right now,

00:18:22.410 --> 00:18:24.260 align:middle line:84%
because the pigeonhole
principle only

00:18:24.260 --> 00:18:27.220 align:middle line:84%
works when n is
strictly larger than m.

00:18:27.220 --> 00:18:29.500 align:middle line:84%
That's when I picked out
six socks from my drawer

00:18:29.500 --> 00:18:31.180 align:middle line:90%
and I had five colors.

00:18:31.180 --> 00:18:34.420 align:middle line:84%
I really needed one more pigeon
than the number of holes.

00:18:34.420 --> 00:18:35.720 align:middle line:90%
And the trouble is here.

00:18:35.720 --> 00:18:37.200 align:middle line:90%
How many pigeons do I have?

00:18:37.200 --> 00:18:39.060 align:middle line:84%
Well, it's each
node in the graph.

00:18:39.060 --> 00:18:41.860 align:middle line:84%
That's the number of the
people at the party that's n.

00:18:41.860 --> 00:18:43.200 align:middle line:90%
How many holes do I have?

00:18:43.200 --> 00:18:45.740 align:middle line:84%
Well, unfortunately,
that's also n

00:18:45.740 --> 00:18:49.980 align:middle line:84%
because it's the integers
from 0 to n minus 1.

00:18:49.980 --> 00:18:52.540 align:middle line:90%
But now we need a clever idea.

00:18:52.540 --> 00:18:57.540 align:middle line:84%
So I wonder, is it possible
to have a node of degree 0

00:18:57.540 --> 00:19:00.670 align:middle line:84%
and a node of degree n
minus 1 at the same time?

00:19:00.670 --> 00:19:04.340 align:middle line:90%


00:19:04.340 --> 00:19:05.420 align:middle line:90%
So who can help me out?

00:19:05.420 --> 00:19:05.920 align:middle line:90%
Yeah?

00:19:05.920 --> 00:19:10.197 align:middle line:84%
AUDIENCE: If you know n
people, that means everybody.

00:19:10.197 --> 00:19:11.780 align:middle line:84%
Then there's a
contradiction because--

00:19:11.780 --> 00:19:12.988 align:middle line:90%
ANKUR MOITRA: That's perfect.

00:19:12.988 --> 00:19:13.800 align:middle line:90%
Exactly right.

00:19:13.800 --> 00:19:16.020 align:middle line:84%
Let me say it again
because I have the mic.

00:19:16.020 --> 00:19:17.820 align:middle line:84%
So if there's someone
at the party who

00:19:17.820 --> 00:19:21.450 align:middle line:84%
knows n minus 1 people,
well, there's n nodes,

00:19:21.450 --> 00:19:24.350 align:middle line:84%
and that means he's connected
to every other node.

00:19:24.350 --> 00:19:26.230 align:middle line:84%
And that means
there isn't anyone

00:19:26.230 --> 00:19:28.430 align:middle line:90%
at the party who knows no one.

00:19:28.430 --> 00:19:33.910 align:middle line:84%
So actually, these two endpoints
are mutually exclusive.

00:19:33.910 --> 00:19:37.270 align:middle line:90%
They can't both happen.

00:19:37.270 --> 00:19:40.090 align:middle line:84%
So if I wanted to write this
out formally as a proof,

00:19:40.090 --> 00:19:43.230 align:middle line:84%
I would actually have to
do a case analysis here.

00:19:43.230 --> 00:19:46.590 align:middle line:84%
In order to create my
contradiction, I would say,

00:19:46.590 --> 00:19:50.710 align:middle line:84%
case number one, there is
a node of degree n minus 1,

00:19:50.710 --> 00:19:54.310 align:middle line:84%
in which case that means
there is no node of degree 0

00:19:54.310 --> 00:19:58.248 align:middle line:84%
and I'm back down to having n
minus 1 holes and n pigeons,

00:19:58.248 --> 00:20:00.290 align:middle line:84%
and then I can appeal to
the pigeonhole principle

00:20:00.290 --> 00:20:01.670 align:middle line:90%
and call it a day.

00:20:01.670 --> 00:20:05.710 align:middle line:84%
And in case two where there's
no node of degree n minus 1,

00:20:05.710 --> 00:20:10.310 align:middle line:84%
again, I only have n minus 1
possibilities for the holes.

00:20:10.310 --> 00:20:13.430 align:middle line:84%
So I'm not going to be able to
write up the full blown proofs

00:20:13.430 --> 00:20:15.230 align:middle line:90%
when we do them in lecture.

00:20:15.230 --> 00:20:16.990 align:middle line:84%
But you can see
that to really make

00:20:16.990 --> 00:20:19.880 align:middle line:84%
this a full bulletproof
proof, there

00:20:19.880 --> 00:20:22.880 align:middle line:84%
are a lot of steps that go into
how exactly you can lay out

00:20:22.880 --> 00:20:25.000 align:middle line:90%
the proof.

00:20:25.000 --> 00:20:29.160 align:middle line:84%
So I'll just stop here
and say that can't

00:20:29.160 --> 00:20:37.080 align:middle line:90%
be both degree n minus 1 and 0.

00:20:37.080 --> 00:20:40.880 align:middle line:84%
And that lets us appeal to
the pigeonhole principle,

00:20:40.880 --> 00:20:41.470 align:middle line:90%
so we're good.

00:20:41.470 --> 00:20:43.720 align:middle line:84%
So this is another example
of the pigeonhole principle

00:20:43.720 --> 00:20:46.498 align:middle line:84%
in action, even though it
doesn't look like it at first

00:20:46.498 --> 00:20:48.040 align:middle line:84%
because you have to
figure out what's

00:20:48.040 --> 00:20:50.880 align:middle line:84%
the right abstraction--
namely a graph for how

00:20:50.880 --> 00:20:54.120 align:middle line:84%
to think about and visualize
what's actually happening

00:20:54.120 --> 00:20:56.400 align:middle line:90%
underneath this lemma.

00:20:56.400 --> 00:20:57.940 align:middle line:90%
Let's do another example.

00:20:57.940 --> 00:21:01.880 align:middle line:84%
We're going to get harder
and harder, unfortunately.

00:21:01.880 --> 00:21:04.320 align:middle line:84%
So let me give you another
of my favorite examples

00:21:04.320 --> 00:21:08.280 align:middle line:84%
of the pigeonhole
principle in action.

00:21:08.280 --> 00:21:10.660 align:middle line:84%
Which is a very easy
to state problem,

00:21:10.660 --> 00:21:14.520 align:middle line:84%
but turns out to be very
difficult from a complexity

00:21:14.520 --> 00:21:15.500 align:middle line:90%
standpoint.

00:21:15.500 --> 00:21:19.250 align:middle line:90%


00:21:19.250 --> 00:21:23.330 align:middle line:84%
So let's imagine, let me tell
you the statement of this lemma

00:21:23.330 --> 00:21:26.130 align:middle line:84%
and then we'll get into
how exactly to prove it.

00:21:26.130 --> 00:21:34.810 align:middle line:84%
Suppose I give you 20
four digit numbers.

00:21:34.810 --> 00:21:35.760 align:middle line:90%
Positive numbers.

00:21:35.760 --> 00:21:41.810 align:middle line:90%


00:21:41.810 --> 00:21:47.130 align:middle line:84%
Let's just call
them x1 up to x20.

00:21:47.130 --> 00:21:56.750 align:middle line:84%
Then what I claim is that there
are two disjoint sets of them.

00:21:56.750 --> 00:21:59.850 align:middle line:90%


00:21:59.850 --> 00:22:06.510 align:middle line:84%
And I'll say specifically
nonempty sets with the same sum.

00:22:06.510 --> 00:22:10.010 align:middle line:90%


00:22:10.010 --> 00:22:12.050 align:middle line:90%
So what am I asking here?

00:22:12.050 --> 00:22:14.910 align:middle line:84%
So I give you any 20
four digit numbers.

00:22:14.910 --> 00:22:17.380 align:middle line:84%
They have to be
strictly positive.

00:22:17.380 --> 00:22:20.100 align:middle line:84%
And what I'm going
to do is I'm going

00:22:20.100 --> 00:22:25.780 align:middle line:84%
to take some subset of them,
maybe x1 plus x3 plus x5,

00:22:25.780 --> 00:22:27.900 align:middle line:84%
and then I'll take some
other subset of them

00:22:27.900 --> 00:22:31.740 align:middle line:84%
that doesn't overlap in
any of those integers, x2

00:22:31.740 --> 00:22:34.020 align:middle line:90%
and x4 and x6.

00:22:34.020 --> 00:22:36.520 align:middle line:84%
And what I claim is that
there's a way of doing this,

00:22:36.520 --> 00:22:39.460 align:middle line:84%
so that the sum of the
integers in one set

00:22:39.460 --> 00:22:43.740 align:middle line:84%
is equal to the sum of the
integers in the other set.

00:22:43.740 --> 00:22:46.740 align:middle line:84%
Now, moreover, this
would be a trivial lemma

00:22:46.740 --> 00:22:49.100 align:middle line:84%
if I let these sets be
empty, because I could just

00:22:49.100 --> 00:22:52.380 align:middle line:84%
take the empty set for one and
the empty set for the other.

00:22:52.380 --> 00:22:53.560 align:middle line:90%
They're definitely disjoint.

00:22:53.560 --> 00:22:55.380 align:middle line:84%
They don't share
anything in common.

00:22:55.380 --> 00:22:59.100 align:middle line:84%
And their sum is zero, so this
would be a really boring way

00:22:59.100 --> 00:23:00.740 align:middle line:90%
for this lemma to be true.

00:23:00.740 --> 00:23:02.580 align:middle line:84%
What I'm saying
by nonempty is I'm

00:23:02.580 --> 00:23:04.280 align:middle line:90%
ruling out that trivial case.

00:23:04.280 --> 00:23:05.780 align:middle line:84%
There's always an
interesting way

00:23:05.780 --> 00:23:08.140 align:middle line:84%
to do this where
you've really created

00:23:08.140 --> 00:23:13.110 align:middle line:84%
a positive sum for these
integers two different ways.

00:23:13.110 --> 00:23:13.880 align:middle line:90%
All right.

00:23:13.880 --> 00:23:15.630 align:middle line:84%
So let's try and prove
this, and then I'll

00:23:15.630 --> 00:23:18.990 align:middle line:84%
tell you some interesting
facts about this very simple

00:23:18.990 --> 00:23:20.710 align:middle line:90%
statement.

00:23:20.710 --> 00:23:23.310 align:middle line:84%
And again, what we
have to do to write up

00:23:23.310 --> 00:23:25.990 align:middle line:84%
a proof here is we have
to do the usual things

00:23:25.990 --> 00:23:28.730 align:middle line:84%
where we have to figure
out what the pigeons are,

00:23:28.730 --> 00:23:30.430 align:middle line:90%
what the holes are.

00:23:30.430 --> 00:23:32.190 align:middle line:84%
But moreover, we
have to figure out

00:23:32.190 --> 00:23:35.750 align:middle line:84%
the right mathematical
notation for expressing what's

00:23:35.750 --> 00:23:39.065 align:middle line:90%
going on in this problem.

00:23:39.065 --> 00:23:43.030 align:middle line:84%
And so, in fact, a lot
of times the first step

00:23:43.030 --> 00:23:46.030 align:middle line:84%
is really to figure out
some mathematical way

00:23:46.030 --> 00:23:48.550 align:middle line:84%
to express the
statement right here

00:23:48.550 --> 00:23:50.830 align:middle line:84%
that I've written
out in English.

00:23:50.830 --> 00:23:53.910 align:middle line:84%
So another way to
think about this

00:23:53.910 --> 00:23:58.510 align:middle line:84%
is that I claim there
are sets I and J,

00:23:58.510 --> 00:24:03.270 align:middle line:84%
which are subsets of the
integers from 1 up to 20.

00:24:03.270 --> 00:24:05.610 align:middle line:84%
What are these subsets
supposed to represent?

00:24:05.610 --> 00:24:09.270 align:middle line:84%
Just which of the numbers
I'm taking in my sum.

00:24:09.270 --> 00:24:14.340 align:middle line:84%
I want that these sets
are both nonempty.

00:24:14.340 --> 00:24:19.160 align:middle line:84%
So I and J had better not
be equal to the empty set.

00:24:19.160 --> 00:24:21.320 align:middle line:84%
I need that they're
disjoint, which

00:24:21.320 --> 00:24:25.400 align:middle line:84%
just says that the
intersection between I and J

00:24:25.400 --> 00:24:27.960 align:middle line:90%
is equal to the empty set.

00:24:27.960 --> 00:24:29.640 align:middle line:84%
So this is just the
mathematical way

00:24:29.640 --> 00:24:32.680 align:middle line:84%
of expressing all of
the things I have here.

00:24:32.680 --> 00:24:35.640 align:middle line:84%
And now for the most
important piece of the puzzle,

00:24:35.640 --> 00:24:41.480 align:middle line:84%
I want that the sum over all of
the x sub I's in this first set

00:24:41.480 --> 00:24:48.560 align:middle line:84%
is equal to the sum of all of
the x sub J's in the second set.

00:24:48.560 --> 00:24:51.720 align:middle line:84%
So a lot of times it's hard
to write a mathematical proof

00:24:51.720 --> 00:24:54.280 align:middle line:84%
unless you have the right
mathematical notation

00:24:54.280 --> 00:24:55.640 align:middle line:90%
to begin with.

00:24:55.640 --> 00:24:58.560 align:middle line:84%
Because even though I could
have expressed this in English

00:24:58.560 --> 00:25:00.780 align:middle line:84%
now to actually
prove this statement,

00:25:00.780 --> 00:25:04.080 align:middle line:84%
I'm going to have to do a bunch
of manipulations on these sets.

00:25:04.080 --> 00:25:07.880 align:middle line:84%
And this will be a lot easier
with this notation in hand.

00:25:07.880 --> 00:25:09.330 align:middle line:84%
So another thing
that we're going

00:25:09.330 --> 00:25:11.730 align:middle line:84%
to teach you a lot in
recitation is how exactly

00:25:11.730 --> 00:25:15.730 align:middle line:84%
to set up convenient notation so
that your proofs will be easier

00:25:15.730 --> 00:25:16.405 align:middle line:90%
to write.

00:25:16.405 --> 00:25:20.210 align:middle line:90%


00:25:20.210 --> 00:25:22.360 align:middle line:84%
So now how exactly are
we going to prove this?

00:25:22.360 --> 00:25:28.570 align:middle line:90%


00:25:28.570 --> 00:25:30.278 align:middle line:84%
Let's see if you guys
have any intuition.

00:25:30.278 --> 00:25:32.820 align:middle line:84%
So obviously we're going to be
using the pigeonhole principle

00:25:32.820 --> 00:25:35.490 align:middle line:84%
because I've only taught you
one thing so far, so we better

00:25:35.490 --> 00:25:36.970 align:middle line:90%
use it.

00:25:36.970 --> 00:25:42.370 align:middle line:84%
But what should we
use as the pigeons?

00:25:42.370 --> 00:25:44.090 align:middle line:90%
Yeah?

00:25:44.090 --> 00:25:51.010 align:middle line:84%
AUDIENCE: The sum is
divided by 200,000.

00:25:51.010 --> 00:25:51.970 align:middle line:90%
ANKUR MOITRA: OK.

00:25:51.970 --> 00:25:52.710 align:middle line:90%
You're right.

00:25:52.710 --> 00:25:54.490 align:middle line:90%
But for the holes, I think.

00:25:54.490 --> 00:25:55.350 align:middle line:90%
So let's be careful.

00:25:55.350 --> 00:25:55.490 align:middle line:90%
Yeah.

00:25:55.490 --> 00:25:57.070 align:middle line:84%
So I'll take your
answer for the holes,

00:25:57.070 --> 00:25:58.445 align:middle line:84%
because the way
to think about it

00:25:58.445 --> 00:26:01.250 align:middle line:84%
is that we want a collision
among the pigeons.

00:26:01.250 --> 00:26:04.177 align:middle line:84%
So we really want the
collision among what objects?

00:26:04.177 --> 00:26:05.510 align:middle line:90%
Was there an answer in the back?

00:26:05.510 --> 00:26:07.980 align:middle line:90%
Yeah?

00:26:07.980 --> 00:26:09.380 align:middle line:90%
Yeah.

00:26:09.380 --> 00:26:10.180 align:middle line:90%
I like that.

00:26:10.180 --> 00:26:12.580 align:middle line:84%
I'm going to strike
number of and let's

00:26:12.580 --> 00:26:14.740 align:middle line:84%
just say subsets,
because really,

00:26:14.740 --> 00:26:17.040 align:middle line:84%
it's the subsets
that I care about.

00:26:17.040 --> 00:26:18.420 align:middle line:90%
Each one of them is a pigeon.

00:26:18.420 --> 00:26:19.540 align:middle line:90%
But perfect.

00:26:19.540 --> 00:26:20.220 align:middle line:90%
All right.

00:26:20.220 --> 00:26:22.900 align:middle line:84%
So that's exactly what
the pigeons will be.

00:26:22.900 --> 00:26:26.580 align:middle line:84%
They'll just be the
appropriate subsets.

00:26:26.580 --> 00:26:31.220 align:middle line:84%
So in particular, I want
them to be nonempty subsets.

00:26:31.220 --> 00:26:33.460 align:middle line:84%
That's definitely one
of the constraints

00:26:33.460 --> 00:26:37.340 align:middle line:84%
I have in this constraint
on I and J here.

00:26:37.340 --> 00:26:40.280 align:middle line:84%
I'll have to worry about this
disjointness constraint later,

00:26:40.280 --> 00:26:42.220 align:middle line:90%
and we'll get to that.

00:26:42.220 --> 00:26:44.680 align:middle line:84%
And then exactly as you
guys already mentioned,

00:26:44.680 --> 00:26:47.500 align:middle line:84%
the holes are going to
be the possible sums.

00:26:47.500 --> 00:26:50.220 align:middle line:90%
That's exactly right.

00:26:50.220 --> 00:26:53.540 align:middle line:84%
So what can we say
about the possible sums?

00:26:53.540 --> 00:26:57.500 align:middle line:84%
So let's say that the
number of possible sums--

00:26:57.500 --> 00:26:59.300 align:middle line:90%
let's just call that m.

00:26:59.300 --> 00:27:02.140 align:middle line:84%
I can just come up with an
upper bound, because I just

00:27:02.140 --> 00:27:03.780 align:middle line:84%
need to show that
the number of holes

00:27:03.780 --> 00:27:06.580 align:middle line:84%
is smaller than the
number of pigeons.

00:27:06.580 --> 00:27:09.540 align:middle line:84%
And definitely an
upper bound on this

00:27:09.540 --> 00:27:13.820 align:middle line:84%
is the largest that the sum
can be, which is the sum from I

00:27:13.820 --> 00:27:17.220 align:middle line:90%
equals 1 to 20 of x sub i.

00:27:17.220 --> 00:27:24.580 align:middle line:84%
And this is comfortably
less than 20 times

00:27:24.580 --> 00:27:29.220 align:middle line:84%
10 to the 4, which is strictly
less than 10 to the 6.

00:27:29.220 --> 00:27:30.400 align:middle line:90%
Was there a question here?

00:27:30.400 --> 00:27:30.900 align:middle line:90%
No?

00:27:30.900 --> 00:27:31.820 align:middle line:90%
OK.

00:27:31.820 --> 00:27:32.660 align:middle line:90%
All right.

00:27:32.660 --> 00:27:34.980 align:middle line:84%
So now we're in business
because we can try and appeal

00:27:34.980 --> 00:27:37.230 align:middle line:84%
to the pigeonhole
principle again.

00:27:37.230 --> 00:27:40.073 align:middle line:84%
But we have to be a
little bit careful here.

00:27:40.073 --> 00:27:46.060 align:middle line:84%
So what this is going to do
is that the number of nonempty

00:27:46.060 --> 00:27:53.580 align:middle line:84%
subsets, well, this is equal
to 2 to the 20 minus 1.

00:27:53.580 --> 00:27:56.380 align:middle line:84%
So the way to think about this--
and we'll talk more about this

00:27:56.380 --> 00:27:58.060 align:middle line:90%
when we get into counting--

00:27:58.060 --> 00:28:00.080 align:middle line:84%
is really through what's
called a bijection.

00:28:00.080 --> 00:28:02.540 align:middle line:84%
We'll do lots of
examples of bijections.

00:28:02.540 --> 00:28:04.310 align:middle line:84%
But the way to
think about that is

00:28:04.310 --> 00:28:08.870 align:middle line:84%
that each subset of the
integers from 1 to 20

00:28:08.870 --> 00:28:11.390 align:middle line:84%
is really associated
with a bit string.

00:28:11.390 --> 00:28:13.650 align:middle line:84%
The first coordinate,
which is 1 or 0,

00:28:13.650 --> 00:28:16.870 align:middle line:84%
tells you whether the first
element is in the set or not.

00:28:16.870 --> 00:28:19.070 align:middle line:84%
The second entry in
that string tells you

00:28:19.070 --> 00:28:22.150 align:middle line:84%
whether the second element
is in it, and so on.

00:28:22.150 --> 00:28:25.210 align:middle line:84%
So a priori, there are 2
to the 20 possibilities,

00:28:25.210 --> 00:28:27.150 align:middle line:84%
because for each
coordinate I have

00:28:27.150 --> 00:28:29.670 align:middle line:84%
the choice of whether I
include it or don't include it

00:28:29.670 --> 00:28:31.110 align:middle line:90%
in my subset.

00:28:31.110 --> 00:28:35.390 align:middle line:84%
This minus 1 is because I want
the subset to be nonempty.

00:28:35.390 --> 00:28:39.630 align:middle line:84%
So I have to rule out the
subset that takes nothing.

00:28:39.630 --> 00:28:44.870 align:middle line:84%
So this is still comfortably
much larger than 10 to the 6.

00:28:44.870 --> 00:28:48.630 align:middle line:84%
So now I'm in good shape because
n is strictly larger than m,

00:28:48.630 --> 00:28:50.510 align:middle line:90%
but there's a catch.

00:28:50.510 --> 00:28:53.350 align:middle line:90%
So what exactly does this imply?

00:28:53.350 --> 00:28:56.390 align:middle line:84%
It implies when I use
the pigeonhole principle

00:28:56.390 --> 00:29:05.200 align:middle line:84%
that there exists nonempty
A which is not equal to B,

00:29:05.200 --> 00:29:07.240 align:middle line:84%
because they are
different pigeons that

00:29:07.240 --> 00:29:09.320 align:middle line:90%
end up in the same pigeonhole.

00:29:09.320 --> 00:29:11.600 align:middle line:90%
And yet, the sum is equal.

00:29:11.600 --> 00:29:16.160 align:middle line:84%
The sum of all of
the xi's in the set A

00:29:16.160 --> 00:29:23.520 align:middle line:84%
is equal to the sum of all
of the xj's in the set B.

00:29:23.520 --> 00:29:25.600 align:middle line:90%
So I'm not done yet.

00:29:25.600 --> 00:29:27.840 align:middle line:90%
Why am I not done?

00:29:27.840 --> 00:29:29.493 align:middle line:90%
Yes?

00:29:29.493 --> 00:29:31.160 align:middle line:84%
AUDIENCE: Because it
says might not be--

00:29:31.160 --> 00:29:33.035 align:middle line:84%
ANKUR MOITRA: The sets
might not be disjoint.

00:29:33.035 --> 00:29:36.160 align:middle line:84%
So I haven't proven what
I promised you because I

00:29:36.160 --> 00:29:38.000 align:middle line:90%
didn't meet this condition.

00:29:38.000 --> 00:29:41.720 align:middle line:84%
Also notice something about
how I wrote this proof.

00:29:41.720 --> 00:29:46.412 align:middle line:90%
So I did not use I and J here.

00:29:46.412 --> 00:29:48.640 align:middle line:84%
Because at the end of the
day, what I want to show

00:29:48.640 --> 00:29:51.480 align:middle line:84%
is that there
exists this I and J,

00:29:51.480 --> 00:29:53.920 align:middle line:84%
and I already know
that I'm not done.

00:29:53.920 --> 00:29:57.080 align:middle line:84%
So I left myself some
slack in the notation

00:29:57.080 --> 00:30:00.690 align:middle line:84%
for me to later choose
what I and J should be.

00:30:00.690 --> 00:30:02.830 align:middle line:84%
If I had made these
things be I and J,

00:30:02.830 --> 00:30:06.725 align:middle line:84%
I would have really
confused my audience.

00:30:06.725 --> 00:30:09.990 align:middle line:84%
So how exactly can we now
make these things disjoint?

00:30:09.990 --> 00:30:12.090 align:middle line:90%
I claim we're almost home.

00:30:12.090 --> 00:30:15.010 align:middle line:84%
We just have to fix
what A and B are.

00:30:15.010 --> 00:30:17.050 align:middle line:84%
So anyone who
hasn't answered yet

00:30:17.050 --> 00:30:21.410 align:middle line:84%
have a fix for how
I can fix A and B?

00:30:21.410 --> 00:30:24.810 align:middle line:84%
So I've gotten most of
it that are nonempty.

00:30:24.810 --> 00:30:25.750 align:middle line:90%
Have you answered yet?

00:30:25.750 --> 00:30:26.250 align:middle line:90%
No?

00:30:26.250 --> 00:30:26.750 align:middle line:90%
OK.

00:30:26.750 --> 00:30:27.890 align:middle line:90%
All right.

00:30:27.890 --> 00:30:29.850 align:middle line:84%
AUDIENCE: Take the
intersection of A and B

00:30:29.850 --> 00:30:32.685 align:middle line:84%
and you remove that common
section from both sets.

00:30:32.685 --> 00:30:33.810 align:middle line:90%
ANKUR MOITRA: That's right.

00:30:33.810 --> 00:30:34.750 align:middle line:90%
That's right.

00:30:34.750 --> 00:30:37.130 align:middle line:84%
So here, let's think about
a baby version of this first

00:30:37.130 --> 00:30:40.690 align:middle line:84%
before we explain it with all
of the full blown mathematical

00:30:40.690 --> 00:30:41.930 align:middle line:90%
notation.

00:30:41.930 --> 00:30:44.850 align:middle line:84%
A and B might not be
disjoint because maybe they

00:30:44.850 --> 00:30:46.930 align:middle line:90%
share one element in common.

00:30:46.930 --> 00:30:49.850 align:middle line:90%
Maybe they both contain x1.

00:30:49.850 --> 00:30:52.770 align:middle line:84%
But then the point is that
these two sums are equal

00:30:52.770 --> 00:30:55.050 align:middle line:84%
and they both have
an x1 in them.

00:30:55.050 --> 00:30:57.340 align:middle line:84%
So I can just remove
that common element,

00:30:57.340 --> 00:31:00.140 align:middle line:84%
and then I'm removing
that x1 from the sum.

00:31:00.140 --> 00:31:02.060 align:middle line:84%
When I take it out,
I've made the sets

00:31:02.060 --> 00:31:04.060 align:middle line:84%
be disjoint because
they no longer share

00:31:04.060 --> 00:31:05.700 align:middle line:90%
that element in common.

00:31:05.700 --> 00:31:07.300 align:middle line:84%
And yet, I haven't
changed the fact

00:31:07.300 --> 00:31:09.340 align:middle line:84%
that the sums are
equal, even though I've

00:31:09.340 --> 00:31:12.500 align:middle line:90%
changed the sums themselves.

00:31:12.500 --> 00:31:14.240 align:middle line:90%
So that's the rest of the proof.

00:31:14.240 --> 00:31:15.440 align:middle line:90%
You're exactly right.

00:31:15.440 --> 00:31:17.470 align:middle line:84%
So let's finish up
with that proof.

00:31:17.470 --> 00:31:22.980 align:middle line:90%


00:31:22.980 --> 00:31:36.700 align:middle line:84%
So the problem is A and
B need not be disjoint.

00:31:36.700 --> 00:31:38.860 align:middle line:84%
Now I'm deliberately
trying to explain

00:31:38.860 --> 00:31:41.660 align:middle line:84%
a bit of how I think about
the pedagogy of explaining

00:31:41.660 --> 00:31:44.500 align:middle line:84%
these proofs, not just
the proofs themselves.

00:31:44.500 --> 00:31:49.220 align:middle line:84%
See, one of the things I could
have done for proving this is I

00:31:49.220 --> 00:31:55.310 align:middle line:84%
could have just told you
what I want I and J to be.

00:31:55.310 --> 00:31:56.910 align:middle line:84%
So in fact, what
I'm going to do is

00:31:56.910 --> 00:32:01.910 align:middle line:84%
I'm going to define I
is equal to A minus B

00:32:01.910 --> 00:32:04.990 align:middle line:90%
and J is equal to B minus A.

00:32:04.990 --> 00:32:08.410 align:middle line:84%
So what this notation
means is I take my set A

00:32:08.410 --> 00:32:13.270 align:middle line:84%
and I remove every element that
shows up in B from that set.

00:32:13.270 --> 00:32:16.550 align:middle line:84%
And whatever I have left
over with is I. Now, notice,

00:32:16.550 --> 00:32:20.310 align:middle line:84%
B does not have to be a subset
of A for this to make sense.

00:32:20.310 --> 00:32:23.610 align:middle line:84%
If B contains an
element that isn't an A,

00:32:23.610 --> 00:32:25.090 align:middle line:90%
I just ignore that element.

00:32:25.090 --> 00:32:26.170 align:middle line:90%
It wasn't there before.

00:32:26.170 --> 00:32:28.110 align:middle line:90%
And I keep it out of my set.

00:32:28.110 --> 00:32:32.870 align:middle line:84%
But if B and A both contain
the element, then I remove it.

00:32:32.870 --> 00:32:35.510 align:middle line:84%
So you can think about
this pictorially.

00:32:35.510 --> 00:32:40.030 align:middle line:84%
Maybe these two sets A and
B, they look like this.

00:32:40.030 --> 00:32:42.810 align:middle line:84%
And so what is my set
I going to look like?

00:32:42.810 --> 00:32:46.190 align:middle line:84%
It's going to be exactly this
shaded region right here.

00:32:46.190 --> 00:32:49.310 align:middle line:84%
Because I'm taking out
everything that belongs to B

00:32:49.310 --> 00:32:52.390 align:middle line:84%
and removing it from my set
so that I create two disjoint

00:32:52.390 --> 00:32:53.360 align:middle line:90%
things.

00:32:53.360 --> 00:32:58.880 align:middle line:84%
So this right here would be I
and this right here would be J.

00:32:58.880 --> 00:33:02.240 align:middle line:84%
So let's think a little
bit about pedagogy again.

00:33:02.240 --> 00:33:06.160 align:middle line:84%
You see how this visual helps
me understand what's going on

00:33:06.160 --> 00:33:08.200 align:middle line:90%
mathematically in the notation.

00:33:08.200 --> 00:33:11.560 align:middle line:84%
If I just defined for
you what A minus B is,

00:33:11.560 --> 00:33:14.180 align:middle line:84%
that's a perfectly
valid definition.

00:33:14.180 --> 00:33:16.280 align:middle line:84%
But a lot of times these
visuals can help people

00:33:16.280 --> 00:33:18.223 align:middle line:90%
understand them more easily.

00:33:18.223 --> 00:33:19.640 align:middle line:84%
And if you notice,
the other thing

00:33:19.640 --> 00:33:22.120 align:middle line:84%
I did in terms of
writing up this proof,

00:33:22.120 --> 00:33:25.480 align:middle line:84%
I could have actually skipped
this entire discussion

00:33:25.480 --> 00:33:28.360 align:middle line:84%
about what happens when
I choose A and B. I could

00:33:28.360 --> 00:33:31.200 align:middle line:90%
have jumped first to I and J.

00:33:31.200 --> 00:33:34.020 align:middle line:84%
I could have said A and B come
from this pigeonhole principle,

00:33:34.020 --> 00:33:38.293 align:middle line:84%
and then I could have defined I
as A minus B and J as B minus A.

00:33:38.293 --> 00:33:39.960 align:middle line:84%
But then you would
have missed the point

00:33:39.960 --> 00:33:42.240 align:middle line:90%
about why I needed to do that.

00:33:42.240 --> 00:33:45.360 align:middle line:84%
So in fact, when you're writing
proofs, not everything you write

00:33:45.360 --> 00:33:48.280 align:middle line:84%
is mathematically necessary,
but a lot of times

00:33:48.280 --> 00:33:51.290 align:middle line:84%
it's pedagogically
very useful because you

00:33:51.290 --> 00:33:55.530 align:middle line:84%
can walk the reader through not
just the formal verification

00:33:55.530 --> 00:33:58.890 align:middle line:84%
that the statement is true,
but how exactly you arrived

00:33:58.890 --> 00:34:03.110 align:middle line:84%
at the proof yourself and the
missteps you made along the way

00:34:03.110 --> 00:34:05.930 align:middle line:84%
but that led you to
the right answer.

00:34:05.930 --> 00:34:10.969 align:middle line:84%
All right, so finishing this up,
the rest of it is just notation.

00:34:10.969 --> 00:34:13.030 align:middle line:84%
So when we look at
this expression,

00:34:13.030 --> 00:34:17.449 align:middle line:84%
the sum over all
xi in the set A,

00:34:17.449 --> 00:34:20.250 align:middle line:84%
we can break this
up into two pieces.

00:34:20.250 --> 00:34:26.489 align:middle line:84%
It's the sum for all I that
are in both A and B of xi.

00:34:26.489 --> 00:34:31.250 align:middle line:84%
And it's the sum of
all xi for I that

00:34:31.250 --> 00:34:35.330 align:middle line:84%
belongs to my set A.
I. Capital I, which

00:34:35.330 --> 00:34:37.130 align:middle line:90%
is the things that belong here.

00:34:37.130 --> 00:34:39.670 align:middle line:84%
So I'm just taking the sum
over this entire set A,

00:34:39.670 --> 00:34:41.370 align:middle line:84%
and I'm breaking it
up into this piece

00:34:41.370 --> 00:34:44.770 align:middle line:84%
right here and this
piece right here.

00:34:44.770 --> 00:34:48.889 align:middle line:84%
But now, by assumption, I know,
using the pigeonhole principle,

00:34:48.889 --> 00:34:55.340 align:middle line:84%
that this is the same thing as
the sum from all I and B of xi,

00:34:55.340 --> 00:34:57.640 align:middle line:84%
and I can break this
sum up the same way.

00:34:57.640 --> 00:35:02.940 align:middle line:84%
It's the sum of all I in
the intersection of xi,

00:35:02.940 --> 00:35:09.260 align:middle line:84%
plus the sum of all of these
things in my set capital J.

00:35:09.260 --> 00:35:12.180 align:middle line:84%
So I'm just breaking up
the sum to different ways.

00:35:12.180 --> 00:35:14.020 align:middle line:84%
And now when I
take this equation

00:35:14.020 --> 00:35:15.740 align:middle line:84%
that the whole thing
is equal, I can just

00:35:15.740 --> 00:35:19.420 align:middle line:84%
cross off these two pieces
because they're the same thing.

00:35:19.420 --> 00:35:21.300 align:middle line:90%
And that gives me what I want.

00:35:21.300 --> 00:35:23.700 align:middle line:84%
These sets I and
J are definitely

00:35:23.700 --> 00:35:26.060 align:middle line:84%
disjoint because I've
made them be disjoint,

00:35:26.060 --> 00:35:28.300 align:middle line:90%
and they have the same sum.

00:35:28.300 --> 00:35:30.460 align:middle line:84%
You should double check
that you never end up

00:35:30.460 --> 00:35:33.220 align:middle line:84%
with these things
being nonempty.

00:35:33.220 --> 00:35:36.860 align:middle line:84%
That's a technicality you
have to check, but it is true.

00:35:36.860 --> 00:35:39.660 align:middle line:84%
And it follows from
the assumptions.

00:35:39.660 --> 00:35:42.800 align:middle line:84%
But that's the end
of our next proof.

00:35:42.800 --> 00:35:43.700 align:middle line:90%
All right?

00:35:43.700 --> 00:35:45.620 align:middle line:90%
So are there any questions?

00:35:45.620 --> 00:35:47.470 align:middle line:90%
Makes sense?

00:35:47.470 --> 00:35:47.970 align:middle line:90%
Yeah?

00:35:47.970 --> 00:35:51.380 align:middle line:90%


00:35:51.380 --> 00:35:52.770 align:middle line:90%
AUDIENCE: The minimum number--

00:35:52.770 --> 00:35:54.593 align:middle line:84%
ANKUR MOITRA: It's
about the minimum.

00:35:54.593 --> 00:35:56.510 align:middle line:84%
But since you asked, let
me tell you something

00:35:56.510 --> 00:35:57.690 align:middle line:90%
interesting about this.

00:35:57.690 --> 00:35:59.970 align:middle line:84%
This lemma is very
easy to state.

00:35:59.970 --> 00:36:01.110 align:middle line:90%
It's not so bad to prove.

00:36:01.110 --> 00:36:02.830 align:middle line:90%
We proved it pretty quickly.

00:36:02.830 --> 00:36:05.430 align:middle line:84%
What's kind of shocking
is I can write down

00:36:05.430 --> 00:36:09.350 align:middle line:84%
20 four digit numbers
for you, and you

00:36:09.350 --> 00:36:12.070 align:middle line:84%
would have no way-- you
could prove to yourself using

00:36:12.070 --> 00:36:15.630 align:middle line:84%
this proof right here that there
are two subsets whose sum is

00:36:15.630 --> 00:36:19.790 align:middle line:84%
the same, but it would be very
hard to actually find them.

00:36:19.790 --> 00:36:22.390 align:middle line:84%
So you can do this, for
example, with populations

00:36:22.390 --> 00:36:25.230 align:middle line:84%
of different countries,
we know that there

00:36:25.230 --> 00:36:28.190 align:middle line:84%
are subsets of countries
that have literally

00:36:28.190 --> 00:36:30.110 align:middle line:90%
the same number of people.

00:36:30.110 --> 00:36:33.630 align:middle line:84%
But it would be exhaustive
to try and search

00:36:33.630 --> 00:36:37.590 align:middle line:84%
all possible subsets to
figure out which pair collide.

00:36:37.590 --> 00:36:41.270 align:middle line:84%
And we don't actually know
any faster algorithms.

00:36:41.270 --> 00:36:43.350 align:middle line:84%
It's related to some
things in cryptography.

00:36:43.350 --> 00:36:43.850 align:middle line:90%
All right.

00:36:43.850 --> 00:36:45.800 align:middle line:90%
Any other questions?

00:36:45.800 --> 00:36:47.640 align:middle line:90%
Makes sense so far?

00:36:47.640 --> 00:36:50.360 align:middle line:90%
All right.

00:36:50.360 --> 00:36:50.980 align:middle line:90%
All right.

00:36:50.980 --> 00:36:54.680 align:middle line:84%
So we got to do our
hardest result today.

00:36:54.680 --> 00:36:59.440 align:middle line:84%
And then I'll do a fun end for
one of my favorite applications

00:36:59.440 --> 00:37:01.720 align:middle line:90%
of the pigeonhole principle.

00:37:01.720 --> 00:37:04.320 align:middle line:90%
So let's do our hardest theorem.

00:37:04.320 --> 00:37:06.880 align:middle line:84%
And I'm going to tell you
it's the hardest result

00:37:06.880 --> 00:37:09.520 align:middle line:84%
because I'm going to
call it a theorem.

00:37:09.520 --> 00:37:11.200 align:middle line:84%
And we'll be talking
about extensions

00:37:11.200 --> 00:37:13.380 align:middle line:90%
of this on your first p sets.

00:37:13.380 --> 00:37:16.480 align:middle line:84%
You'll get more practice
with this proof.

00:37:16.480 --> 00:37:18.480 align:middle line:84%
But let me tell you
about a beautiful result

00:37:18.480 --> 00:37:20.200 align:middle line:90%
in combinatorics.

00:37:20.200 --> 00:37:21.280 align:middle line:90%
All right.

00:37:21.280 --> 00:37:26.663 align:middle line:84%
What I claim is that
in any permutation--

00:37:26.663 --> 00:37:28.580 align:middle line:84%
I'll tell you what I
mean by that in a second.

00:37:28.580 --> 00:37:31.680 align:middle line:84%
We'll be talking much more
about permutations later.

00:37:31.680 --> 00:37:35.440 align:middle line:84%
Any permutation
of the integers 1,

00:37:35.440 --> 00:37:41.360 align:middle line:84%
2, 3, all the way up to
something n times m plus 1.

00:37:41.360 --> 00:37:58.730 align:middle line:84%
What I claim is that there is an
increasing subsequence of length

00:37:58.730 --> 00:38:13.250 align:middle line:84%
m plus 1, or a decreasing
subsequence of length n plus 1.

00:38:13.250 --> 00:38:13.850 align:middle line:90%
OK?

00:38:13.850 --> 00:38:15.810 align:middle line:84%
So I owe you a bunch
of things to explain

00:38:15.810 --> 00:38:17.230 align:middle line:90%
what this theorem means.

00:38:17.230 --> 00:38:17.970 align:middle line:90%
Yes?

00:38:17.970 --> 00:38:20.050 align:middle line:84%
AUDIENCE: Is
subsequence [INAUDIBLE]?

00:38:20.050 --> 00:38:22.230 align:middle line:84%
ANKUR MOITRA: I'll get to
that, but no, it's not.

00:38:22.230 --> 00:38:23.990 align:middle line:84%
So that's one of the
things I owe you.

00:38:23.990 --> 00:38:26.250 align:middle line:84%
But first, let's start
with the simpler thing.

00:38:26.250 --> 00:38:27.770 align:middle line:90%
So I owe you this.

00:38:27.770 --> 00:38:30.130 align:middle line:90%
What do I mean by a permutation?

00:38:30.130 --> 00:38:32.750 align:middle line:84%
So what I mean is you can
take these integers 1,

00:38:32.750 --> 00:38:36.930 align:middle line:84%
2, 3 all the way
up to nm plus 1.

00:38:36.930 --> 00:38:39.930 align:middle line:84%
n and m are just parameters
in this theorem statement.

00:38:39.930 --> 00:38:42.920 align:middle line:84%
And instead of considering
them all in increasing order.

00:38:42.920 --> 00:38:45.740 align:middle line:84%
I can put all of the
numbers in any order I want.

00:38:45.740 --> 00:38:48.600 align:middle line:84%
So basically, I take this deck
of cards and I shuffle it,

00:38:48.600 --> 00:38:51.260 align:middle line:84%
and I consider any
possible ordering, that's

00:38:51.260 --> 00:38:52.600 align:middle line:90%
what I mean by permutation.

00:38:52.600 --> 00:38:54.100 align:middle line:84%
We'll talk more
about them formally

00:38:54.100 --> 00:38:56.060 align:middle line:90%
later when we get to counting.

00:38:56.060 --> 00:38:59.460 align:middle line:84%
But I take any ordering
for these integers.

00:38:59.460 --> 00:39:03.700 align:middle line:84%
And what I claim is that there's
some of subsequence where

00:39:03.700 --> 00:39:08.740 align:middle line:84%
the numbers are going up by
one at least one each time,

00:39:08.740 --> 00:39:10.060 align:middle line:90%
and that's long.

00:39:10.060 --> 00:39:13.860 align:middle line:84%
Or if not, there is
some long subsequence

00:39:13.860 --> 00:39:17.900 align:middle line:84%
where the numbers are going
down at least by one each time.

00:39:17.900 --> 00:39:19.860 align:middle line:84%
So let's do an example,
because I should really

00:39:19.860 --> 00:39:23.500 align:middle line:84%
be more precise by what
I mean by a subsequence.

00:39:23.500 --> 00:39:27.940 align:middle line:84%
So let's take, for example,
m equals n equals 3.

00:39:27.940 --> 00:39:30.300 align:middle line:84%
So then I'm really just
asking for a permutation

00:39:30.300 --> 00:39:32.480 align:middle line:90%
of the integers from 1 up to 10.

00:39:32.480 --> 00:39:35.140 align:middle line:84%
So some shuffling of
that deck of cards.

00:39:35.140 --> 00:39:36.700 align:middle line:90%
Let's take an example.

00:39:36.700 --> 00:39:49.230 align:middle line:84%
We could take 3, 2, 1, 6,
5, 4, 9, 8, 7, and then 10.

00:39:49.230 --> 00:39:54.030 align:middle line:84%
So now an example of a
long increasing sequence

00:39:54.030 --> 00:39:55.630 align:middle line:90%
is this one right here.

00:39:55.630 --> 00:40:02.710 align:middle line:84%
I take 3, then I take 6, then
I take 9, and then I take 10.

00:40:02.710 --> 00:40:05.330 align:middle line:84%
So this sequence does not
have to be contiguous.

00:40:05.330 --> 00:40:07.230 align:middle line:84%
These positions
I'm interested in

00:40:07.230 --> 00:40:09.470 align:middle line:84%
don't have to be right
next to each other.

00:40:09.470 --> 00:40:11.390 align:middle line:84%
But what I want is
that when I consider

00:40:11.390 --> 00:40:14.310 align:middle line:84%
the sequence of integers just
in those positions where I've

00:40:14.310 --> 00:40:17.310 align:middle line:84%
put the arrows, that the
corresponding sequence

00:40:17.310 --> 00:40:21.310 align:middle line:84%
I get is strictly increasing
as I go up the arrows.

00:40:21.310 --> 00:40:23.290 align:middle line:84%
So that's an
increasing subsequence.

00:40:23.290 --> 00:40:27.150 align:middle line:84%
I can also think about having
a decreasing one like 3, 2, 1.

00:40:27.150 --> 00:40:29.510 align:middle line:84%
And that's the longest
increasing subsequence

00:40:29.510 --> 00:40:31.150 align:middle line:90%
I can get here.

00:40:31.150 --> 00:40:33.430 align:middle line:84%
So you can see that this
example illustrates,

00:40:33.430 --> 00:40:36.190 align:middle line:84%
A, it helps me
understand what exactly

00:40:36.190 --> 00:40:39.800 align:middle line:84%
these abstract definitions
mean, like a permutation

00:40:39.800 --> 00:40:41.960 align:middle line:90%
and an increasing subsequence.

00:40:41.960 --> 00:40:44.680 align:middle line:84%
It also tells me something
even more powerful,

00:40:44.680 --> 00:40:47.680 align:middle line:84%
which is that this
theorem really is tight.

00:40:47.680 --> 00:40:49.920 align:middle line:84%
Because in the case
where n equals m

00:40:49.920 --> 00:40:53.440 align:middle line:84%
equals 3, what I'm
promising you is

00:40:53.440 --> 00:40:57.460 align:middle line:84%
that there is a length for
increasing subsequence,

00:40:57.460 --> 00:41:00.840 align:middle line:84%
or there's a length for
decreasing subsequence.

00:41:00.840 --> 00:41:04.960 align:middle line:84%
And even though I found one that
has length 4 and is increasing,

00:41:04.960 --> 00:41:07.000 align:middle line:84%
what I claim in
this simple example

00:41:07.000 --> 00:41:10.000 align:middle line:84%
is that I can't create
anything longer,

00:41:10.000 --> 00:41:13.360 align:middle line:84%
and I can't even create a
decreasing subsequence that's

00:41:13.360 --> 00:41:18.420 align:middle line:84%
longer than 3, because if I did
3, 2, 1, then I'm in trouble.

00:41:18.420 --> 00:41:20.100 align:middle line:90%
Everything after it is larger.

00:41:20.100 --> 00:41:22.620 align:middle line:84%
If I do 6, 5, 4
again, I'm in trouble.

00:41:22.620 --> 00:41:24.840 align:middle line:90%
Everything after it is larger.

00:41:24.840 --> 00:41:25.340 align:middle line:90%
All right.

00:41:25.340 --> 00:41:27.880 align:middle line:90%
Any questions?

00:41:27.880 --> 00:41:29.440 align:middle line:84%
So I claim that
we can prove this

00:41:29.440 --> 00:41:31.160 align:middle line:90%
using the pigeonhole principle.

00:41:31.160 --> 00:41:34.440 align:middle line:84%
But we're going to have the same
difficulties we usually have,

00:41:34.440 --> 00:41:37.410 align:middle line:84%
which is where are where the
pigeons and where are the holes.

00:41:37.410 --> 00:41:39.810 align:middle line:84%
In fact, it'll be
even more abstract

00:41:39.810 --> 00:41:43.490 align:middle line:84%
because if you try and guess
things like the sequences are

00:41:43.490 --> 00:41:46.135 align:middle line:84%
the pigeons or the
positions are the pigeons,

00:41:46.135 --> 00:41:47.510 align:middle line:84%
you're going to
have a hard time.

00:41:47.510 --> 00:41:50.010 align:middle line:84%
That's not how this
proof is going to go.

00:41:50.010 --> 00:41:54.410 align:middle line:84%
Instead, we're going to need
a very delicate definition

00:41:54.410 --> 00:41:59.010 align:middle line:84%
to tell us where the pigeons
are and how this relates

00:41:59.010 --> 00:42:00.430 align:middle line:90%
to the pigeonhole principle.

00:42:00.430 --> 00:42:04.770 align:middle line:90%


00:42:04.770 --> 00:42:09.370 align:middle line:84%
And the idea, basically,
is that I can't--

00:42:09.370 --> 00:42:10.870 align:middle line:84%
this theorem, if
you think about it,

00:42:10.870 --> 00:42:12.790 align:middle line:84%
it's not telling me
which of them I have,

00:42:12.790 --> 00:42:16.570 align:middle line:84%
whether I have a long increasing
or a long decreasing sequence.

00:42:16.570 --> 00:42:18.090 align:middle line:84%
So in some sense,
what I want to do

00:42:18.090 --> 00:42:21.330 align:middle line:84%
is I want to keep track of
my progress on both of them.

00:42:21.330 --> 00:42:24.230 align:middle line:84%
How long is my largest
increasing subsequence?

00:42:24.230 --> 00:42:27.130 align:middle line:84%
How long is my largest
decreasing sequence?

00:42:27.130 --> 00:42:30.570 align:middle line:84%
And I want to see how those
progress measures grow.

00:42:30.570 --> 00:42:36.340 align:middle line:84%
So the proof is going to involve
this very careful definition.

00:42:36.340 --> 00:42:40.640 align:middle line:84%
Let's consider these
integers in order,

00:42:40.640 --> 00:42:48.110 align:middle line:84%
and let's consider the S-th
element in the sequence.

00:42:48.110 --> 00:42:53.580 align:middle line:90%


00:42:53.580 --> 00:42:56.780 align:middle line:84%
And what we're
going to do is we're

00:42:56.780 --> 00:42:59.580 align:middle line:84%
going to define these
helper variables.

00:42:59.580 --> 00:43:09.220 align:middle line:84%
So we're going to let I sub S
denote the length of the longest

00:43:09.220 --> 00:43:22.230 align:middle line:84%
increasing subsequence
ending at the S-th location.

00:43:22.230 --> 00:43:24.820 align:middle line:90%


00:43:24.820 --> 00:43:25.420 align:middle line:90%
OK?

00:43:25.420 --> 00:43:27.940 align:middle line:90%
That's one progress measure.

00:43:27.940 --> 00:43:29.520 align:middle line:90%
I is for increasing.

00:43:29.520 --> 00:43:33.790 align:middle line:84%
So I've chosen notation
that at least has a mnemonic

00:43:33.790 --> 00:43:35.310 align:middle line:90%
associated with it.

00:43:35.310 --> 00:43:37.830 align:middle line:84%
I have ds is going
to be the same thing,

00:43:37.830 --> 00:43:45.750 align:middle line:84%
but it'll be the longest
decreasing Subsequence.

00:43:45.750 --> 00:43:49.910 align:middle line:84%
But again, ending at
the S-th location.

00:43:49.910 --> 00:43:52.230 align:middle line:90%
OK?

00:43:52.230 --> 00:43:54.570 align:middle line:90%
So this is my progress measure.

00:43:54.570 --> 00:43:59.030 align:middle line:84%
In fact, this is a little bit
abstract, so I'll go about it.

00:43:59.030 --> 00:44:02.950 align:middle line:84%
So how are we going
to prove this thing?

00:44:02.950 --> 00:44:10.870 align:middle line:84%
So first, does anyone know what
this term right here means?

00:44:10.870 --> 00:44:13.150 align:middle line:90%
WLOG.

00:44:13.150 --> 00:44:14.210 align:middle line:90%
Just out of curiosity.

00:44:14.210 --> 00:44:15.030 align:middle line:90%
Yeah?

00:44:15.030 --> 00:44:16.410 align:middle line:90%
Without loss of generality.

00:44:16.410 --> 00:44:16.910 align:middle line:90%
OK.

00:44:16.910 --> 00:44:19.830 align:middle line:84%
So I told you that when
I was proving things

00:44:19.830 --> 00:44:22.670 align:middle line:84%
with the number of
people in a party

00:44:22.670 --> 00:44:25.450 align:middle line:84%
that I had to do this
case analysis, well,

00:44:25.450 --> 00:44:27.170 align:middle line:84%
to prevent my proof
from being too long,

00:44:27.170 --> 00:44:31.110 align:middle line:84%
let me just pretend s is larger
than t, because if it was

00:44:31.110 --> 00:44:33.310 align:middle line:84%
the other way around, I
would just switch what's S

00:44:33.310 --> 00:44:35.390 align:middle line:90%
and what's t.

00:44:35.390 --> 00:44:36.150 align:middle line:90%
Yeah?

00:44:36.150 --> 00:44:39.050 align:middle line:90%
AUDIENCE: [INAUDIBLE]?

00:44:39.050 --> 00:44:42.430 align:middle line:84%
Like, what are the-- the
longest increasing one

00:44:42.430 --> 00:44:45.557 align:middle line:90%
is six and the last [INAUDIBLE]?

00:44:45.557 --> 00:44:46.390 align:middle line:90%
ANKUR MOITRA: Sorry.

00:44:46.390 --> 00:44:49.190 align:middle line:90%
Which entry in the table here?

00:44:49.190 --> 00:44:50.165 align:middle line:90%
Yeah?

00:44:50.165 --> 00:44:50.790 align:middle line:90%
AUDIENCE: Yeah.

00:44:50.790 --> 00:44:51.842 align:middle line:90%
Three and six.

00:44:51.842 --> 00:44:52.550 align:middle line:90%
ANKUR MOITRA: OK.

00:44:52.550 --> 00:44:53.550 align:middle line:90%
All right.

00:44:53.550 --> 00:44:54.970 align:middle line:90%
So here.

00:44:54.970 --> 00:44:58.470 align:middle line:84%
So we want the longest
increasing sequence

00:44:58.470 --> 00:45:00.205 align:middle line:90%
that ends at three.

00:45:00.205 --> 00:45:02.542 align:middle line:90%
AUDIENCE: That ends at six.

00:45:02.542 --> 00:45:04.750 align:middle line:84%
ANKUR MOITRA: So do you want
this entry in the table?

00:45:04.750 --> 00:45:05.550 align:middle line:90%
OK.

00:45:05.550 --> 00:45:08.490 align:middle line:84%
So the longest increasing
one that ends at six.

00:45:08.490 --> 00:45:09.410 align:middle line:90%
So what would it be?

00:45:09.410 --> 00:45:12.578 align:middle line:90%


00:45:12.578 --> 00:45:13.870 align:middle line:90%
AUDIENCE: Oh, it's [INAUDIBLE].

00:45:13.870 --> 00:45:14.662 align:middle line:90%
ANKUR MOITRA: Yeah.

00:45:14.662 --> 00:45:15.190 align:middle line:90%
Yeah.

00:45:15.190 --> 00:45:17.150 align:middle line:84%
So it's not required
to be contiguous,

00:45:17.150 --> 00:45:19.750 align:middle line:84%
but it has to include
that end point.

00:45:19.750 --> 00:45:25.470 align:middle line:84%
So that's why these numbers are
not monotonically increasing.

00:45:25.470 --> 00:45:28.960 align:middle line:84%
So when I have the longest
decreasing sequence that

00:45:28.960 --> 00:45:32.500 align:middle line:84%
ends at three,
that's pretty long,

00:45:32.500 --> 00:45:36.160 align:middle line:84%
because I could go 5,
4, 3 and end there.

00:45:36.160 --> 00:45:38.640 align:middle line:84%
But as soon as I move
over to this next column

00:45:38.640 --> 00:45:41.926 align:middle line:84%
right here, if I
have to end at 6,

00:45:41.926 --> 00:45:44.240 align:middle line:84%
that makes the longest
decreasing sequence

00:45:44.240 --> 00:45:45.800 align:middle line:90%
only of length 1.

00:45:45.800 --> 00:45:48.520 align:middle line:84%
So the key is that I'm
fixing that my point has

00:45:48.520 --> 00:45:52.000 align:middle line:84%
to belong to that subsequence
and I'm considering progress

00:45:52.000 --> 00:45:53.820 align:middle line:90%
as I go left to right.

00:45:53.820 --> 00:45:54.780 align:middle line:90%
So any other questions?

00:45:54.780 --> 00:45:55.863 align:middle line:90%
This is a crucial part.

00:45:55.863 --> 00:45:57.280 align:middle line:84%
If you don't
understand the table,

00:45:57.280 --> 00:45:59.800 align:middle line:90%
you won't understand the proof.

00:45:59.800 --> 00:46:01.080 align:middle line:90%
Good?

00:46:01.080 --> 00:46:02.560 align:middle line:90%
All right.

00:46:02.560 --> 00:46:08.000 align:middle line:84%
So without loss of generality,
s is larger than t.

00:46:08.000 --> 00:46:10.600 align:middle line:90%
And so let's do the following.

00:46:10.600 --> 00:46:21.240 align:middle line:84%
So if the element
at the S-th location

00:46:21.240 --> 00:46:26.570 align:middle line:84%
is strictly larger
than the element

00:46:26.570 --> 00:46:34.170 align:middle line:84%
at the t-th location,
what I claim

00:46:34.170 --> 00:46:38.830 align:middle line:90%
is that is at least it plus 1.

00:46:38.830 --> 00:46:41.690 align:middle line:90%


00:46:41.690 --> 00:46:44.450 align:middle line:84%
It's the morning and I'm lazy,
so who can prove this for me

00:46:44.450 --> 00:46:46.290 align:middle line:90%
and justify this?

00:46:46.290 --> 00:46:47.690 align:middle line:90%
Why is this true?

00:46:47.690 --> 00:46:49.570 align:middle line:90%
Someone who hasn't answered.

00:46:49.570 --> 00:46:51.400 align:middle line:84%
Especially my back
row is very quiet.

00:46:51.400 --> 00:47:02.630 align:middle line:90%


00:47:02.630 --> 00:47:03.130 align:middle line:90%
Yeah?

00:47:03.130 --> 00:47:08.410 align:middle line:90%


00:47:08.410 --> 00:47:09.930 align:middle line:90%
That's exactly right.

00:47:09.930 --> 00:47:11.230 align:middle line:90%
So let me say that again.

00:47:11.230 --> 00:47:15.730 align:middle line:84%
So we can just use the
increasing subsequence that

00:47:15.730 --> 00:47:17.850 align:middle line:90%
ended at the t-th location.

00:47:17.850 --> 00:47:20.730 align:middle line:84%
And because the element
at the S-th location

00:47:20.730 --> 00:47:23.620 align:middle line:84%
is after the one that
happens at the t-th location

00:47:23.620 --> 00:47:27.220 align:middle line:84%
because S is larger than t, and
the element itself is bigger

00:47:27.220 --> 00:47:29.980 align:middle line:84%
too, I can just
append that element

00:47:29.980 --> 00:47:33.340 align:middle line:90%
and make my subsequence longer.

00:47:33.340 --> 00:47:34.200 align:middle line:90%
All right.

00:47:34.200 --> 00:47:38.060 align:middle line:84%
So how does the rest
of the proof go?

00:47:38.060 --> 00:47:41.380 align:middle line:84%
Who can fill in the rest
of the proof for me?

00:47:41.380 --> 00:47:44.220 align:middle line:84%
So this is one case
in the case analysis.

00:47:44.220 --> 00:47:47.660 align:middle line:84%
I've said without loss of
generality S is larger than t.

00:47:47.660 --> 00:47:50.780 align:middle line:84%
And if the element
at the S-th location

00:47:50.780 --> 00:47:53.780 align:middle line:84%
is larger than the element
at the t-th location,

00:47:53.780 --> 00:47:57.660 align:middle line:90%
my is is at least it plus 1.

00:47:57.660 --> 00:47:59.100 align:middle line:90%
Yeah?

00:47:59.100 --> 00:48:01.480 align:middle line:84%
AUDIENCE: Do the same thing
without the generality

00:48:01.480 --> 00:48:02.348 align:middle line:90%
S greater than t.

00:48:02.348 --> 00:48:03.140 align:middle line:90%
ANKUR MOITRA: Yeah.

00:48:03.140 --> 00:48:05.140 align:middle line:84%
AUDIENCE: Instead, the
element at the S location

00:48:05.140 --> 00:48:07.320 align:middle line:84%
is less than the element
at the t-th location.

00:48:07.320 --> 00:48:10.783 align:middle line:84%
Then you can do the
same for ds and dt.

00:48:10.783 --> 00:48:11.700 align:middle line:90%
ANKUR MOITRA: Perfect.

00:48:11.700 --> 00:48:14.500 align:middle line:90%
That's right.

00:48:14.500 --> 00:48:17.040 align:middle line:84%
And it's basically the same
reasoning but backwards.

00:48:17.040 --> 00:48:20.460 align:middle line:84%
So otherwise, in particular, if
the element at the S-th location

00:48:20.460 --> 00:48:24.150 align:middle line:84%
is strictly less than the
element of the t-th location,

00:48:24.150 --> 00:48:27.110 align:middle line:84%
I can just take the
decreasing subsequence that

00:48:27.110 --> 00:48:29.990 align:middle line:84%
ends at the t-th
location, and append what

00:48:29.990 --> 00:48:31.510 align:middle line:90%
happens at the S-th location.

00:48:31.510 --> 00:48:34.910 align:middle line:84%
That's smaller, so that's a
valid decreasing sequence.

00:48:34.910 --> 00:48:36.990 align:middle line:90%
And that's the proof.

00:48:36.990 --> 00:48:40.270 align:middle line:84%
I just proved for you that
these two pairs of integers

00:48:40.270 --> 00:48:43.230 align:middle line:84%
are different,
because I showed you

00:48:43.230 --> 00:48:45.630 align:middle line:84%
that either this one
is larger than this,

00:48:45.630 --> 00:48:48.970 align:middle line:90%
or this one is larger than this.

00:48:48.970 --> 00:48:51.150 align:middle line:84%
And now we're in
good shape because,

00:48:51.150 --> 00:48:53.410 align:middle line:90%
how does the entire thing work?

00:48:53.410 --> 00:48:56.520 align:middle line:84%
So just returning to the
proof, putting it all together.

00:48:56.520 --> 00:49:00.470 align:middle line:90%


00:49:00.470 --> 00:49:03.970 align:middle line:84%
Even though I said it in words,
let's just be precise about it.

00:49:03.970 --> 00:49:07.790 align:middle line:90%


00:49:07.790 --> 00:49:09.020 align:middle line:90%
So returning to the proof.

00:49:09.020 --> 00:49:13.790 align:middle line:90%


00:49:13.790 --> 00:49:22.040 align:middle line:84%
Let's suppose the theorem
is false for the purposes

00:49:22.040 --> 00:49:24.360 align:middle line:90%
of contradiction.

00:49:24.360 --> 00:49:39.040 align:middle line:84%
Then what I claim is that there
are at most nm possible values

00:49:39.040 --> 00:49:44.880 align:middle line:84%
for these pairs is, ds,
because that's what it means

00:49:44.880 --> 00:49:46.560 align:middle line:90%
for the theorem to be false.

00:49:46.560 --> 00:49:51.040 align:middle line:84%
There's no n plus 1 length
increasing subsequence.

00:49:51.040 --> 00:49:54.920 align:middle line:84%
There's no length m plus
1 decreasing subsequence.

00:49:54.920 --> 00:49:56.820 align:middle line:84%
When I look at my
pairs of integers,

00:49:56.820 --> 00:50:00.760 align:middle line:84%
is never becomes
larger than n, and ds

00:50:00.760 --> 00:50:03.760 align:middle line:90%
never becomes larger than m.

00:50:03.760 --> 00:50:08.600 align:middle line:84%
And these are my holes
is because each one

00:50:08.600 --> 00:50:12.240 align:middle line:84%
of the possible positions
is going to get mapped just

00:50:12.240 --> 00:50:16.120 align:middle line:84%
by this definition that I
gave you right here of is, ds

00:50:16.120 --> 00:50:20.010 align:middle line:84%
to the signature of these pair
of integers that just tells me

00:50:20.010 --> 00:50:21.970 align:middle line:90%
the name of my hole.

00:50:21.970 --> 00:50:25.770 align:middle line:90%
But how long is my sequence?

00:50:25.770 --> 00:50:31.190 align:middle line:84%
There are nm plus 1
values in the sequence.

00:50:31.190 --> 00:50:37.410 align:middle line:84%
These are all my pigeons, which,
by the pigeonhole principle,

00:50:37.410 --> 00:50:48.090 align:middle line:84%
means there is S not equal to t
that collide in some hole with

00:50:48.090 --> 00:50:53.270 align:middle line:90%
is, ds equal to it, dt.

00:50:53.270 --> 00:50:56.150 align:middle line:84%
That's what it means for them
to collide to the same hole,

00:50:56.150 --> 00:50:58.130 align:middle line:84%
because they get mapped
to the same thing.

00:50:58.130 --> 00:51:00.850 align:middle line:84%
And we know that
that's impossible.

00:51:00.850 --> 00:51:04.370 align:middle line:90%
But this is impossible.

00:51:04.370 --> 00:51:07.010 align:middle line:84%
So that contradicts
the assumption

00:51:07.010 --> 00:51:09.930 align:middle line:84%
we made at the beginning, which
was just that the theorem was

00:51:09.930 --> 00:51:10.430 align:middle line:90%
false.

00:51:10.430 --> 00:51:11.530 align:middle line:90%
Yes?

00:51:11.530 --> 00:51:13.170 align:middle line:84%
AUDIENCE: Without
loss of generality,

00:51:13.170 --> 00:51:15.900 align:middle line:84%
why are we comparing
is to i of t plus 1

00:51:15.900 --> 00:51:17.927 align:middle line:90%
instead of directly to it?

00:51:17.927 --> 00:51:18.760 align:middle line:90%
ANKUR MOITRA: Sorry.

00:51:18.760 --> 00:51:19.302 align:middle line:90%
Say it again.

00:51:19.302 --> 00:51:21.532 align:middle line:90%
So why are we comparing?

00:51:21.532 --> 00:51:26.592 align:middle line:84%
AUDIENCE: We compare that to i
of t plus 1 instead of to it.

00:51:26.592 --> 00:51:27.300 align:middle line:90%
ANKUR MOITRA: OK.

00:51:27.300 --> 00:51:30.700 align:middle line:84%
So just to be careful
right here, this is i sub t

00:51:30.700 --> 00:51:32.980 align:middle line:90%
and then plus 1 is outside.

00:51:32.980 --> 00:51:33.740 align:middle line:90%
Yeah.

00:51:33.740 --> 00:51:35.740 align:middle line:84%
So this is really just
saying that whatever

00:51:35.740 --> 00:51:37.820 align:middle line:84%
my length of my
increasing sequence

00:51:37.820 --> 00:51:42.940 align:middle line:84%
is right here, this value right
here, I can add 1 to the length.

00:51:42.940 --> 00:51:45.420 align:middle line:84%
So the plus 1 is not
in the subscript.

00:51:45.420 --> 00:51:47.300 align:middle line:90%
Does that make sense?

00:51:47.300 --> 00:51:49.660 align:middle line:90%
AUDIENCE: Why not?

00:51:49.660 --> 00:51:52.980 align:middle line:84%
Would it hold true that I ask is
strictly greater than it or no?

00:51:52.980 --> 00:51:55.300 align:middle line:84%
ANKUR MOITRA: is strictly
greater-- yes, definitely.

00:51:55.300 --> 00:51:57.820 align:middle line:84%
is definitely strictly
greater than it

00:51:57.820 --> 00:51:59.500 align:middle line:90%
because these are integers.

00:51:59.500 --> 00:52:00.220 align:middle line:90%
Yeah.

00:52:00.220 --> 00:52:04.740 align:middle line:84%
In fact, is not necessarily
equal to it plus 1

00:52:04.740 --> 00:52:07.080 align:middle line:84%
because there might be
some totally different

00:52:07.080 --> 00:52:09.940 align:middle line:84%
other subsequence
that's way longer that

00:52:09.940 --> 00:52:12.940 align:middle line:84%
just doesn't involve what
happens in the t-th location.

00:52:12.940 --> 00:52:14.050 align:middle line:90%
But all right.

00:52:14.050 --> 00:52:15.390 align:middle line:90%
Any other questions?

00:52:15.390 --> 00:52:17.000 align:middle line:84%
This was our hardest
proof for today.

00:52:17.000 --> 00:52:17.500 align:middle line:90%
Yeah?

00:52:17.500 --> 00:52:19.438 align:middle line:84%
AUDIENCE: What are we
doing in this case?

00:52:19.438 --> 00:52:20.230 align:middle line:90%
ANKUR MOITRA: Yeah.

00:52:20.230 --> 00:52:20.935 align:middle line:90%
So the pigeons.

00:52:20.935 --> 00:52:22.310 align:middle line:84%
This is why I told
you have to be

00:52:22.310 --> 00:52:23.910 align:middle line:90%
a little bit careful with this.

00:52:23.910 --> 00:52:27.270 align:middle line:84%
The pigeons are
actually the positions.

00:52:27.270 --> 00:52:29.510 align:middle line:84%
So what's happening
here is each one

00:52:29.510 --> 00:52:32.770 align:middle line:84%
of these positions, the first
element, the second element,

00:52:32.770 --> 00:52:35.590 align:middle line:84%
the third element, the fourth
element, the fifth, the sixth.

00:52:35.590 --> 00:52:37.350 align:middle line:90%
These are my pigeons.

00:52:37.350 --> 00:52:39.190 align:middle line:84%
How are they getting
mapped to a hole

00:52:39.190 --> 00:52:43.310 align:middle line:84%
is I map them to the hole whose
name is this integer, comma,

00:52:43.310 --> 00:52:43.900 align:middle line:90%
this integer.

00:52:43.900 --> 00:52:47.030 align:middle line:90%


00:52:47.030 --> 00:52:49.190 align:middle line:90%
It's just the pairs right here.

00:52:49.190 --> 00:52:50.310 align:middle line:90%
It's the pairs.

00:52:50.310 --> 00:52:53.870 align:middle line:84%
So my holes-- that's why I drew
the little hole right there

00:52:53.870 --> 00:52:56.990 align:middle line:84%
is that this is the
name of the hole.

00:52:56.990 --> 00:53:00.150 align:middle line:84%
And by assumption, if
the theorem is false,

00:53:00.150 --> 00:53:06.070 align:middle line:84%
is doesn't go larger than n,
ds doesn't go larger than m.

00:53:06.070 --> 00:53:11.800 align:middle line:84%
So there are at most n times
m possibilities for this.

00:53:11.800 --> 00:53:13.360 align:middle line:90%
Yeah?

00:53:13.360 --> 00:53:14.800 align:middle line:84%
AUDIENCE: So here,
maybe you could

00:53:14.800 --> 00:53:17.600 align:middle line:84%
have guessed the kind of
thing, because the problem is

00:53:17.600 --> 00:53:18.420 align:middle line:90%
like a product.

00:53:18.420 --> 00:53:19.212 align:middle line:90%
ANKUR MOITRA: Yeah.

00:53:19.212 --> 00:53:20.580 align:middle line:90%
AUDIENCE: But if you're--

00:53:20.580 --> 00:53:25.900 align:middle line:84%
I guess if it didn't have
this nice [INAUDIBLE],

00:53:25.900 --> 00:53:27.920 align:middle line:90%
how would you know?

00:53:27.920 --> 00:53:30.560 align:middle line:90%
ANKUR MOITRA: Math is hard.

00:53:30.560 --> 00:53:32.240 align:middle line:84%
I mean, we're
teaching you things

00:53:32.240 --> 00:53:35.720 align:middle line:84%
which we're not going to
give you this on a test

00:53:35.720 --> 00:53:38.320 align:middle line:84%
and ask you to
miraculously guess it.

00:53:38.320 --> 00:53:40.160 align:middle line:84%
But, for example,
we will ask you

00:53:40.160 --> 00:53:42.520 align:middle line:84%
on the set to do
a version of this

00:53:42.520 --> 00:53:45.327 align:middle line:84%
with three types
of subsequences,

00:53:45.327 --> 00:53:47.160 align:middle line:84%
and you're going to
have this as a blueprint

00:53:47.160 --> 00:53:51.080 align:middle line:84%
to go off of to try and
understand what's going on.

00:53:51.080 --> 00:53:53.640 align:middle line:84%
So this would be extraordinarily
clever if you just

00:53:53.640 --> 00:53:55.320 align:middle line:90%
came up with this on the spot.

00:53:55.320 --> 00:53:57.360 align:middle line:84%
There are also twists
to very simple problems

00:53:57.360 --> 00:54:00.280 align:middle line:84%
that will make things
very difficult and open.

00:54:00.280 --> 00:54:03.200 align:middle line:90%
But yeah, let's go with it.

00:54:03.200 --> 00:54:03.700 align:middle line:90%
All right.

00:54:03.700 --> 00:54:06.240 align:middle line:90%
Any other questions?

00:54:06.240 --> 00:54:06.960 align:middle line:90%
Good?

00:54:06.960 --> 00:54:07.580 align:middle line:90%
All right.

00:54:07.580 --> 00:54:08.080 align:middle line:90%
Yeah.

00:54:08.080 --> 00:54:08.997 align:middle line:90%
AUDIENCE: [INAUDIBLE]?

00:54:08.997 --> 00:54:13.970 align:middle line:90%


00:54:13.970 --> 00:54:17.590 align:middle line:84%
ANKUR MOITRA: Well, OK, that's
maybe a bit of a digression,

00:54:17.590 --> 00:54:20.170 align:middle line:90%
but basically if I--

00:54:20.170 --> 00:54:22.090 align:middle line:84%
this really mimics,
if you've taken

00:54:22.090 --> 00:54:26.010 align:middle line:84%
algorithms classes, a dynamic
programming type of solution.

00:54:26.010 --> 00:54:29.530 align:middle line:84%
Because if I want to know what
is the longest subsequence that

00:54:29.530 --> 00:54:32.010 align:middle line:84%
ends here, I really want
to piece it together

00:54:32.010 --> 00:54:34.570 align:middle line:84%
by answers the
subproblems before.

00:54:34.570 --> 00:54:36.570 align:middle line:84%
And this often has
the structure is

00:54:36.570 --> 00:54:40.050 align:middle line:84%
that once I tell you that
the subsequence includes

00:54:40.050 --> 00:54:42.290 align:middle line:84%
this element and
it's increasing,

00:54:42.290 --> 00:54:44.810 align:middle line:84%
I don't actually have to know
anything else about which

00:54:44.810 --> 00:54:46.430 align:middle line:90%
elements belong to it.

00:54:46.430 --> 00:54:48.790 align:middle line:84%
I just have to know it's
increasing and its length,

00:54:48.790 --> 00:54:51.050 align:middle line:84%
and the fact that it
belongs to it in order

00:54:51.050 --> 00:54:54.090 align:middle line:84%
to be able to piece together
what happens to the rest.

00:54:54.090 --> 00:54:56.710 align:middle line:84%
So this, a lot of these
things in mathematics,

00:54:56.710 --> 00:54:59.210 align:middle line:84%
they really mimic what
we do algorithmically

00:54:59.210 --> 00:55:01.680 align:middle line:84%
in terms of how we would
go about finding it.

00:55:01.680 --> 00:55:03.430 align:middle line:84%
And we'll see that
more and more in class.

00:55:03.430 --> 00:55:06.370 align:middle line:84%
That's true even when it comes
to writing proof and writing

00:55:06.370 --> 00:55:08.180 align:middle line:90%
code.

00:55:08.180 --> 00:55:09.180 align:middle line:90%
OK.

00:55:09.180 --> 00:55:10.020 align:middle line:90%
Good?

00:55:10.020 --> 00:55:11.260 align:middle line:90%
All right.

00:55:11.260 --> 00:55:16.972 align:middle line:84%
So let's do one of
my favorite examples

00:55:16.972 --> 00:55:19.860 align:middle line:90%
of the pigeonhole principle.

00:55:19.860 --> 00:55:24.300 align:middle line:84%
Does anyone want
to be my victim?

00:55:24.300 --> 00:55:24.840 align:middle line:90%
Oh, boy.

00:55:24.840 --> 00:55:27.820 align:middle line:84%
You guys volunteered
very quickly.

00:55:27.820 --> 00:55:28.580 align:middle line:90%
All right.

00:55:28.580 --> 00:55:29.100 align:middle line:90%
Sure.

00:55:29.100 --> 00:55:31.180 align:middle line:84%
Can you tell me about--
you can stay there.

00:55:31.180 --> 00:55:33.780 align:middle line:84%
Can you tell me something
about yourself, where

00:55:33.780 --> 00:55:35.200 align:middle line:90%
you're from, what your name is.

00:55:35.200 --> 00:55:37.700 align:middle line:90%
Introduce yourself to the class.

00:55:37.700 --> 00:55:38.820 align:middle line:90%
AUDIENCE: I'm Anthony.

00:55:38.820 --> 00:55:40.320 align:middle line:90%
I'm from Saint Louis, Missouri.

00:55:40.320 --> 00:55:44.540 align:middle line:90%


00:55:44.540 --> 00:55:45.160 align:middle line:90%
I don't know.

00:55:45.160 --> 00:55:46.743 align:middle line:84%
ANKUR MOITRA: Do you
have any hobbies?

00:55:46.743 --> 00:55:50.300 align:middle line:90%


00:55:50.300 --> 00:55:52.140 align:middle line:90%
AUDIENCE: Oh.

00:55:52.140 --> 00:55:54.100 align:middle line:90%
I have a two letter curve.

00:55:54.100 --> 00:55:56.340 align:middle line:90%
ANKUR MOITRA: OK.

00:55:56.340 --> 00:55:56.860 align:middle line:90%
Wow.

00:55:56.860 --> 00:55:57.520 align:middle line:90%
All right.

00:55:57.520 --> 00:55:59.923 align:middle line:90%


00:55:59.923 --> 00:56:01.840 align:middle line:84%
There are not many
possibilities for that one.

00:56:01.840 --> 00:56:02.620 align:middle line:90%
All right.

00:56:02.620 --> 00:56:07.630 align:middle line:84%
Now, I can, just based on
that, using my MIT superpowers,

00:56:07.630 --> 00:56:10.150 align:middle line:84%
I can tell you something
deeply personal

00:56:10.150 --> 00:56:13.310 align:middle line:90%
about your life history.

00:56:13.310 --> 00:56:16.790 align:middle line:84%
In your family tree,
it's not a tree.

00:56:16.790 --> 00:56:18.910 align:middle line:90%
And I know that for a fact.

00:56:18.910 --> 00:56:21.430 align:middle line:84%
So we're going to prove that
using the pigeonhole principle.

00:56:21.430 --> 00:56:25.070 align:middle line:84%
I should confess that I once
used this in 042 and I asked

00:56:25.070 --> 00:56:26.770 align:middle line:90%
for a volunteer or a victim.

00:56:26.770 --> 00:56:28.870 align:middle line:84%
That's why I call
it a victim now.

00:56:28.870 --> 00:56:32.370 align:middle line:84%
And the girl raised her hand
and told me a bit about herself,

00:56:32.370 --> 00:56:35.870 align:middle line:84%
and I told her, your family
tree is not a family tree.

00:56:35.870 --> 00:56:40.910 align:middle line:84%
And then she got very
red and she said, I know.

00:56:40.910 --> 00:56:43.490 align:middle line:84%
And I've been a little bit
scared to use this since then,

00:56:43.490 --> 00:56:45.090 align:middle line:84%
so that's why I
call it a victim.

00:56:45.090 --> 00:56:46.723 align:middle line:90%
So you signed up for it.

00:56:46.723 --> 00:56:48.390 align:middle line:84%
But it's not really
just true about you.

00:56:48.390 --> 00:56:50.930 align:middle line:84%
It's true about
everyone in class.

00:56:50.930 --> 00:56:52.590 align:middle line:84%
It's just a
mathematical fact that

00:56:52.590 --> 00:56:56.070 align:middle line:84%
follows from some very
basic axioms of biology,

00:56:56.070 --> 00:57:00.370 align:middle line:84%
things which are you
really can't poke holes in.

00:57:00.370 --> 00:57:02.270 align:middle line:90%
And it's true for all of us.

00:57:02.270 --> 00:57:04.240 align:middle line:84%
So let me tell you about
this fun application

00:57:04.240 --> 00:57:05.460 align:middle line:90%
of the pigeonhole principle.

00:57:05.460 --> 00:57:08.600 align:middle line:84%
First, let me state the
lemma, and then we'll

00:57:08.600 --> 00:57:10.920 align:middle line:84%
figure out, as usual,
how to model it

00:57:10.920 --> 00:57:14.800 align:middle line:84%
and how exactly to think
about it as pigeons and holes.

00:57:14.800 --> 00:57:28.799 align:middle line:84%
So what I claim is that
everyone's family tree

00:57:28.799 --> 00:57:36.860 align:middle line:84%
contains someone whose
parents are blood relatives.

00:57:36.860 --> 00:57:39.440 align:middle line:90%


00:57:39.440 --> 00:57:40.470 align:middle line:90%
It's just true.

00:57:40.470 --> 00:57:47.600 align:middle line:90%


00:57:47.600 --> 00:57:48.600 align:middle line:90%
OK.

00:57:48.600 --> 00:57:53.520 align:middle line:84%
So now I'm just going to assert
some very incontrovertible

00:57:53.520 --> 00:57:56.180 align:middle line:84%
things biologically
that are pretty safe.

00:57:56.180 --> 00:58:00.600 align:middle line:84%
But this will be enough to
be able to prove this fact.

00:58:00.600 --> 00:58:03.890 align:middle line:90%
So let's do the setup for this.

00:58:03.890 --> 00:58:06.250 align:middle line:84%
So what are the
axioms we're using?

00:58:06.250 --> 00:58:14.840 align:middle line:84%
So first of all, everyone
has two biological parents.

00:58:14.840 --> 00:58:18.932 align:middle line:90%


00:58:18.932 --> 00:58:20.390 align:middle line:84%
Of course, if I
removed biological,

00:58:20.390 --> 00:58:21.790 align:middle line:90%
it would be more complicated.

00:58:21.790 --> 00:58:23.750 align:middle line:84%
But I'm just saying
this biologically.

00:58:23.750 --> 00:58:27.330 align:middle line:84%
Everyone has two
biological parents.

00:58:27.330 --> 00:58:36.130 align:middle line:90%
No one has children after 100.

00:58:36.130 --> 00:58:37.080 align:middle line:90%
Seems pretty safe.

00:58:37.080 --> 00:58:39.730 align:middle line:90%


00:58:39.730 --> 00:58:51.490 align:middle line:84%
The human race is at
least 4,000 years old.

00:58:51.490 --> 00:58:54.330 align:middle line:90%
That's a very safe assumption.

00:58:54.330 --> 00:58:58.630 align:middle line:84%
And this is something that
can be checked by a biologist,

00:58:58.630 --> 00:59:03.020 align:middle line:84%
is that we have upper bounds
for the number of total humans

00:59:03.020 --> 00:59:04.460 align:middle line:90%
who've ever lived.

00:59:04.460 --> 00:59:06.580 align:middle line:84%
What I claim is that
there are at most 10

00:59:06.580 --> 00:59:11.570 align:middle line:84%
to the 12 humans who've
lived all throughout history.

00:59:11.570 --> 00:59:14.460 align:middle line:90%


00:59:14.460 --> 00:59:19.260 align:middle line:84%
And just from these axioms, I
claim that we can prove this.

00:59:19.260 --> 00:59:21.700 align:middle line:90%
So let's prove it.

00:59:21.700 --> 00:59:24.980 align:middle line:84%
And we have to figure out the
right mathematical abstraction

00:59:24.980 --> 00:59:26.720 align:middle line:90%
for how to think about this.

00:59:26.720 --> 00:59:31.540 align:middle line:84%
It's the same way as the
friends at a party where

00:59:31.540 --> 00:59:37.440 align:middle line:84%
we had this way of thinking
about it as degrees in a graph.

00:59:37.440 --> 00:59:40.200 align:middle line:84%
And what we can do here is we
can do the same kind of thing,

00:59:40.200 --> 00:59:42.230 align:middle line:84%
but we can trace
back our family tree.

00:59:42.230 --> 00:59:50.605 align:middle line:90%


00:59:50.605 --> 00:59:52.980 align:middle line:84%
In essence, what I'm
doing when I trace back

00:59:52.980 --> 00:59:56.340 align:middle line:84%
this family tree is I'm
defining a whole bunch of nodes

00:59:56.340 --> 01:00:00.390 align:middle line:84%
who have jobs or roles
in your family tree.

01:00:00.390 --> 01:00:02.870 align:middle line:90%
So there's you at the start.

01:00:02.870 --> 01:00:06.420 align:middle line:84%
Then if I trace it back,
you have your parents.

01:00:06.420 --> 01:00:08.950 align:middle line:90%


01:00:08.950 --> 01:00:15.490 align:middle line:84%
If I trace it back further,
I have your grandparents.

01:00:15.490 --> 01:00:22.030 align:middle line:90%


01:00:22.030 --> 01:00:28.790 align:middle line:84%
And when I do this, I'm going
to trace this back at least 40

01:00:28.790 --> 01:00:33.790 align:middle line:84%
generations, because human
history is at least 4,000 years

01:00:33.790 --> 01:00:38.030 align:middle line:84%
old and no one has
children after 100.

01:00:38.030 --> 01:00:43.390 align:middle line:84%
So I get at least that
my depth is at least 40.

01:00:43.390 --> 01:00:51.230 align:middle line:84%
So what this means is
that there are at least 2

01:00:51.230 --> 01:00:55.470 align:middle line:84%
to the 40 nodes in this
abstract family tree which

01:00:55.470 --> 01:00:58.040 align:middle line:90%
are just job descriptions.

01:00:58.040 --> 01:01:01.700 align:middle line:90%
Your maternal father of--

01:01:01.700 --> 01:01:06.520 align:middle line:84%
I mean, all the way back of
tracing all the possibilities.

01:01:06.520 --> 01:01:13.320 align:middle line:84%
And the trouble is that,
but 2 to the 40 is larger,

01:01:13.320 --> 01:01:19.020 align:middle line:84%
is strictly larger than 10 cubed
raised to the fourth power,

01:01:19.020 --> 01:01:23.080 align:middle line:84%
because 2 to the 10
is larger than 1,000.

01:01:23.080 --> 01:01:25.120 align:middle line:84%
And so this is larger
than the number

01:01:25.120 --> 01:01:27.920 align:middle line:84%
of nodes, all of
the possibilities,

01:01:27.920 --> 01:01:30.600 align:middle line:84%
all the possible humans
in human history.

01:01:30.600 --> 01:01:37.280 align:middle line:84%
So by the pigeonhole principle,
what we get is that at least two

01:01:37.280 --> 01:01:42.370 align:middle line:84%
nodes, two jobs get
mapped to the same person.

01:01:42.370 --> 01:01:48.680 align:middle line:90%


01:01:48.680 --> 01:01:50.100 align:middle line:90%
So that's pretty cool.

01:01:50.100 --> 01:01:51.760 align:middle line:84%
This is just the
mathematical fact

01:01:51.760 --> 01:01:56.080 align:middle line:84%
that you can use on your
friends to annoy them.

01:01:56.080 --> 01:01:58.300 align:middle line:90%
Please don't do that.

01:01:58.300 --> 01:01:59.800 align:middle line:84%
So this is what I
wanted to tell you

01:01:59.800 --> 01:02:01.203 align:middle line:90%
about the pigeonhole principle.

01:02:01.203 --> 01:02:03.120 align:middle line:84%
Now, as I told you, we're
going to be covering

01:02:03.120 --> 01:02:06.220 align:middle line:84%
a bunch of introductory topics
in the first few lectures,

01:02:06.220 --> 01:02:10.702 align:middle line:84%
so pigeonhole principle will
get more practice on the p sets.

01:02:10.702 --> 01:02:12.160 align:middle line:84%
We're actually
going to be spending

01:02:12.160 --> 01:02:15.880 align:middle line:84%
the next couple of lectures on
probability and then counting.

01:02:15.880 --> 01:02:17.480 align:middle line:84%
So we'll also be
talking a little bit

01:02:17.480 --> 01:02:20.340 align:middle line:84%
about elementary probability
in the first recitation,

01:02:20.340 --> 01:02:21.800 align:middle line:90%
the first homework.

01:02:21.800 --> 01:02:23.818 align:middle line:84%
So let me tell you at
least about the formalisms

01:02:23.818 --> 01:02:25.360 align:middle line:84%
for probability,
and then we're going

01:02:25.360 --> 01:02:28.260 align:middle line:84%
to go into a lot more
detail over the next couple

01:02:28.260 --> 01:02:31.080 align:middle line:84%
lectures that I'll
be explaining.

01:02:31.080 --> 01:02:33.480 align:middle line:84%
So let me tell you
about probability just

01:02:33.480 --> 01:02:37.295 align:middle line:90%
as an intro for later lectures.

01:02:37.295 --> 01:02:38.920 align:middle line:84%
And we're going to
connect all of this,

01:02:38.920 --> 01:02:41.180 align:middle line:90%
obviously, to counting as well.

01:02:41.180 --> 01:02:44.120 align:middle line:90%


01:02:44.120 --> 01:02:47.140 align:middle line:84%
So basically in class,
especially for our later topics,

01:02:47.140 --> 01:02:51.320 align:middle line:84%
everything is going to be built
on counting one way or another.

01:02:51.320 --> 01:02:53.580 align:middle line:84%
We're going to use it for
all kinds of fun things.

01:02:53.580 --> 01:02:56.930 align:middle line:90%


01:02:56.930 --> 01:02:58.970 align:middle line:84%
But let me give you a
little bit of motivation

01:02:58.970 --> 01:03:00.650 align:middle line:90%
before we get there.

01:03:00.650 --> 01:03:04.790 align:middle line:84%
So we're going to be focusing
mostly on discrete probability.

01:03:04.790 --> 01:03:07.970 align:middle line:90%


01:03:07.970 --> 01:03:10.610 align:middle line:84%
So why study
discrete probability?

01:03:10.610 --> 01:03:16.250 align:middle line:84%
Well, it's very useful
for things like counting.

01:03:16.250 --> 01:03:20.970 align:middle line:84%
You want to understand
basic setups like,

01:03:20.970 --> 01:03:24.050 align:middle line:84%
what are the chances of creating
certain kinds of objects

01:03:24.050 --> 01:03:27.690 align:middle line:84%
that are nice when you
choose an object at random?

01:03:27.690 --> 01:03:29.450 align:middle line:84%
That's very related
to counting, and it's

01:03:29.450 --> 01:03:33.530 align:middle line:84%
intertwined with basic
questions about probability.

01:03:33.530 --> 01:03:35.710 align:middle line:84%
Later when we do
more advanced topics,

01:03:35.710 --> 01:03:39.250 align:middle line:84%
we're going to use probability
in really cool ways

01:03:39.250 --> 01:03:43.810 align:middle line:84%
to show the existence
of very strange objects

01:03:43.810 --> 01:03:46.075 align:middle line:84%
that are otherwise
hard to construct.

01:03:46.075 --> 01:03:48.450 align:middle line:84%
And we're going to be doing
this through something called

01:03:48.450 --> 01:03:51.580 align:middle line:90%
the probabilistic method.

01:03:51.580 --> 01:03:53.340 align:middle line:84%
It's another example
where you can

01:03:53.340 --> 01:03:55.340 align:middle line:84%
use the language of
probability to show

01:03:55.340 --> 01:03:57.800 align:middle line:84%
that these very
strange objects exist,

01:03:57.800 --> 01:04:01.140 align:middle line:84%
even though no one knows how
to find any particular one.

01:04:01.140 --> 01:04:02.700 align:middle line:84%
So it's kind of
like the way that we

01:04:02.700 --> 01:04:08.180 align:middle line:84%
reason about those subsets of
sums of 20 four digit numbers,

01:04:08.180 --> 01:04:10.060 align:middle line:84%
that we knew that
there were subsets

01:04:10.060 --> 01:04:15.060 align:middle line:84%
whose sum was the same without
actually knowing which ones.

01:04:15.060 --> 01:04:16.780 align:middle line:84%
Later, when we talk
a little bit more

01:04:16.780 --> 01:04:27.100 align:middle line:84%
about some topics in algorithms,
things like primality testing

01:04:27.100 --> 01:04:31.900 align:middle line:84%
using some of the elementary
number theory that we do,

01:04:31.900 --> 01:04:35.740 align:middle line:84%
deciding whether a given
huge integer is prime or not,

01:04:35.740 --> 01:04:38.020 align:middle line:84%
it'll turn out that,
fundamentally, these algorithms

01:04:38.020 --> 01:04:38.800 align:middle line:90%
are randomized.

01:04:38.800 --> 01:04:40.300 align:middle line:84%
So really, to reason
about it, we'll

01:04:40.300 --> 01:04:44.060 align:middle line:84%
have to have the language of
probability to begin with.

01:04:44.060 --> 01:04:47.100 align:middle line:84%
And much later in
class, when we talk

01:04:47.100 --> 01:04:50.190 align:middle line:84%
about things like
coding theory, we're

01:04:50.190 --> 01:04:53.470 align:middle line:84%
going to use probability
intrinsically to model

01:04:53.470 --> 01:04:56.310 align:middle line:90%
types of communication.

01:04:56.310 --> 01:04:58.370 align:middle line:84%
For example, when
there's noise between us.

01:04:58.370 --> 01:05:00.670 align:middle line:84%
Like when a satellite
is sending images back

01:05:00.670 --> 01:05:04.030 align:middle line:84%
to Earth, what are ways
to reliably communicate

01:05:04.030 --> 01:05:07.030 align:middle line:84%
in the face of errors
that are introduced

01:05:07.030 --> 01:05:09.855 align:middle line:84%
when one party is
communicating with the other?

01:05:09.855 --> 01:05:11.230 align:middle line:84%
So we're going to
use probability

01:05:11.230 --> 01:05:13.630 align:middle line:84%
in all of these
different contexts.

01:05:13.630 --> 01:05:17.730 align:middle line:84%
I want to give you a little bit
of the setup for probability

01:05:17.730 --> 01:05:22.590 align:middle line:84%
before we get into a lot of
the key rules and definitions

01:05:22.590 --> 01:05:24.830 align:middle line:90%
next time.

01:05:24.830 --> 01:05:30.470 align:middle line:84%
So probability, even though
it's familiar to all of us,

01:05:30.470 --> 01:05:34.550 align:middle line:84%
it uses some very powerful
abstractions and definitions.

01:05:34.550 --> 01:05:36.030 align:middle line:84%
So the most
important of which is

01:05:36.030 --> 01:05:39.150 align:middle line:90%
what's called the sample space.

01:05:39.150 --> 01:05:42.190 align:middle line:84%
So in a basic probabilistic
setup, the way to think about it

01:05:42.190 --> 01:05:45.590 align:middle line:84%
is that points in
this sample space.

01:05:45.590 --> 01:05:49.880 align:middle line:90%


01:05:49.880 --> 01:05:54.440 align:middle line:84%
We associate them with
possible outcomes,

01:05:54.440 --> 01:06:01.280 align:middle line:84%
things that can happen out of
the range of all possibilities.

01:06:01.280 --> 01:06:03.720 align:middle line:84%
Just to do a
familiar example, we

01:06:03.720 --> 01:06:06.220 align:middle line:84%
could do something
like roll a die.

01:06:06.220 --> 01:06:09.520 align:middle line:90%


01:06:09.520 --> 01:06:14.740 align:middle line:84%
And if it's a normal die,
we have six possibilities.

01:06:14.740 --> 01:06:17.480 align:middle line:84%
That's our sample space,
because that describes

01:06:17.480 --> 01:06:19.580 align:middle line:84%
all of the possible
things that could happen,

01:06:19.580 --> 01:06:21.800 align:middle line:90%
what number shows up.

01:06:21.800 --> 01:06:23.560 align:middle line:84%
Now the important
thing is not just

01:06:23.560 --> 01:06:25.420 align:middle line:84%
what's the range
of possibilities,

01:06:25.420 --> 01:06:27.600 align:middle line:84%
but really, what's
the likelihood of each

01:06:27.600 --> 01:06:30.600 align:middle line:90%
of these different outcomes.

01:06:30.600 --> 01:06:37.720 align:middle line:84%
So to each point x
in this sample space,

01:06:37.720 --> 01:06:44.090 align:middle line:84%
we're going to assign some
probability p of x which

01:06:44.090 --> 01:06:46.330 align:middle line:90%
has the following properties.

01:06:46.330 --> 01:06:47.810 align:middle line:84%
These are all very
intuitive, so we

01:06:47.810 --> 01:06:50.610 align:middle line:84%
need that the probability
is non-negative,

01:06:50.610 --> 01:06:54.690 align:middle line:84%
and this should be true for
all points in the sample space.

01:06:54.690 --> 01:06:56.970 align:middle line:84%
And we want that,
in total, the sum

01:06:56.970 --> 01:07:03.970 align:middle line:84%
of all the probabilities over
the entire sample space is 1.

01:07:03.970 --> 01:07:06.910 align:middle line:84%
So these are the things
that define the setup

01:07:06.910 --> 01:07:07.850 align:middle line:90%
for basic probability.

01:07:07.850 --> 01:07:11.050 align:middle line:84%
We have a sample space and we
have this probability associated

01:07:11.050 --> 01:07:12.890 align:middle line:90%
with each one of the outcomes.

01:07:12.890 --> 01:07:15.950 align:middle line:84%
We can certainly do simple
examples like rolling a dice.

01:07:15.950 --> 01:07:18.890 align:middle line:84%
If it's a fair die, then each
one of these possibilities

01:07:18.890 --> 01:07:20.930 align:middle line:90%
has one sixth probability.

01:07:20.930 --> 01:07:23.010 align:middle line:84%
We're going to do a lot
more exotic examples

01:07:23.010 --> 01:07:26.110 align:middle line:84%
in class, things where the
sample space might be infinite.

01:07:26.110 --> 01:07:27.270 align:middle line:90%
That's perfectly fine.

01:07:27.270 --> 01:07:30.808 align:middle line:84%
We can still have
these axioms hold.

01:07:30.808 --> 01:07:32.850 align:middle line:84%
An example of something
we might be interested in

01:07:32.850 --> 01:07:36.050 align:middle line:84%
is the number of times
we flip a coin before we

01:07:36.050 --> 01:07:38.090 align:middle line:90%
see our first heads.

01:07:38.090 --> 01:07:40.550 align:middle line:84%
That, in principle,
can go on forever.

01:07:40.550 --> 01:07:43.940 align:middle line:84%
There's no bound on how
large that sample space is,

01:07:43.940 --> 01:07:46.820 align:middle line:84%
and we can still talk about
all of the basic axioms

01:07:46.820 --> 01:07:51.020 align:middle line:84%
of probability and
reason about things.

01:07:51.020 --> 01:07:54.220 align:middle line:84%
And we'll be particularly
interested in what

01:07:54.220 --> 01:07:55.090 align:middle line:90%
are called events.

01:07:55.090 --> 01:08:02.780 align:middle line:90%


01:08:02.780 --> 01:08:07.860 align:middle line:84%
So events are just subsets
of the sample space.

01:08:07.860 --> 01:08:10.500 align:middle line:84%
They're just some
subset of possibilities.

01:08:10.500 --> 01:08:13.820 align:middle line:84%
And in that case, we can
think about this probability

01:08:13.820 --> 01:08:17.020 align:middle line:84%
of the entire event
as just the sum of all

01:08:17.020 --> 01:08:20.939 align:middle line:84%
of the individual outcomes
that land in this event,

01:08:20.939 --> 01:08:22.919 align:middle line:90%
their total probability.

01:08:22.919 --> 01:08:23.419 align:middle line:90%
OK?

01:08:23.419 --> 01:08:27.259 align:middle line:90%


01:08:27.259 --> 01:08:29.779 align:middle line:84%
So for example, you could
think about an event

01:08:29.779 --> 01:08:32.209 align:middle line:90%
like rolling an even number.

01:08:32.209 --> 01:08:37.939 align:middle line:90%


01:08:37.939 --> 01:08:41.490 align:middle line:84%
That's not just one possible
outcome in the sample space,

01:08:41.490 --> 01:08:45.390 align:middle line:90%
but it's the set 2, 4, 6.

01:08:45.390 --> 01:08:51.830 align:middle line:84%
And the last little
baby piece of background

01:08:51.830 --> 01:08:58.270 align:middle line:84%
is that we'll also be interested
in complements of events.

01:08:58.270 --> 01:09:03.390 align:middle line:84%
So for example, I could look
at the probability of t bar.

01:09:03.390 --> 01:09:06.430 align:middle line:84%
Sometimes you'll see it
written as not T as well.

01:09:06.430 --> 01:09:10.510 align:middle line:84%
And that's just everything
that is in the sample

01:09:10.510 --> 01:09:12.710 align:middle line:90%
space outside the set t.

01:09:12.710 --> 01:09:15.870 align:middle line:84%
So for example, this is
defined as all of the points

01:09:15.870 --> 01:09:20.029 align:middle line:84%
in the outcome space that don't
occur in this original event.

01:09:20.029 --> 01:09:22.510 align:middle line:84%
So we can define this notion
of complementary events, which

01:09:22.510 --> 01:09:26.910 align:middle line:84%
is everything else
besides the events in T.

01:09:26.910 --> 01:09:29.310 align:middle line:84%
Basic fact is that a
lot of these things

01:09:29.310 --> 01:09:31.550 align:middle line:84%
behave the way you'd
expect them to.

01:09:31.550 --> 01:09:34.149 align:middle line:84%
So the probability of
the complement is just 1

01:09:34.149 --> 01:09:37.590 align:middle line:84%
minus the probability
of the event itself.

01:09:37.590 --> 01:09:41.040 align:middle line:90%
It's a very simple proof.

01:09:41.040 --> 01:09:42.640 align:middle line:84%
We're going to
stop now, but I'll

01:09:42.640 --> 01:09:44.223 align:middle line:84%
tell you a little
bit about what we're

01:09:44.223 --> 01:09:45.640 align:middle line:90%
going to be doing next time.

01:09:45.640 --> 01:09:48.399 align:middle line:84%
So now that we know at
least the basic definitions

01:09:48.399 --> 01:09:50.060 align:middle line:84%
for probability
theory, we're going

01:09:50.060 --> 01:09:52.560 align:middle line:84%
to be talking about conditional
probability, which is always

01:09:52.560 --> 01:09:54.960 align:middle line:84%
something that's very
counterintuitive.

01:09:54.960 --> 01:09:57.460 align:middle line:84%
So we're going to define what
conditional probabilities are.

01:09:57.460 --> 01:09:59.085 align:middle line:84%
I'll tell you some
of the basic results

01:09:59.085 --> 01:10:00.340 align:middle line:90%
and conditional probability.

01:10:00.340 --> 01:10:01.840 align:middle line:84%
And then I'm going
to give you a lot

01:10:01.840 --> 01:10:05.040 align:middle line:84%
of fun examples
of how people get

01:10:05.040 --> 01:10:06.797 align:middle line:90%
conditional probability wrong.

01:10:06.797 --> 01:10:08.380 align:middle line:84%
So there are a lot
of famous examples,

01:10:08.380 --> 01:10:11.720 align:middle line:84%
like the Monty Hall problem
that many of you may have seen.

01:10:11.720 --> 01:10:14.460 align:middle line:84%
For me, this was always
a little bit abstract.

01:10:14.460 --> 01:10:16.720 align:middle line:84%
Like, it's a cute
mathematical puzzle.

01:10:16.720 --> 01:10:20.320 align:middle line:84%
But I'm going to give you some
scarier examples of real world

01:10:20.320 --> 01:10:23.440 align:middle line:84%
things that happen with
doctors where they misinterpret

01:10:23.440 --> 01:10:24.982 align:middle line:90%
conditional probabilities.

01:10:24.982 --> 01:10:26.440 align:middle line:84%
So we'll do that
next time and I'll

01:10:26.440 --> 01:10:28.800 align:middle line:84%
tell you some personal
stories about that one.

01:10:28.800 --> 01:10:31.110 align:middle line:90%
So see you on Thursday.

01:10:31.110 --> 01:10:37.000 align:middle line:90%