WEBVTT

00:00:00.080 --> 00:00:02.430
The following content is
provided under a Creative

00:00:02.430 --> 00:00:03.820
Commons license.

00:00:03.820 --> 00:00:06.050
Your support will help
MIT OpenCourseWare

00:00:06.050 --> 00:00:10.150
continue to offer high-quality
educational resources for free.

00:00:10.150 --> 00:00:12.690
To make a donation or to
view additional materials

00:00:12.690 --> 00:00:16.600
from hundreds of MIT courses,
visit MIT OpenCourseWare

00:00:16.600 --> 00:00:17.305
at ocw.mit.edu.

00:00:25.715 --> 00:00:26.640
PROFESSOR: All right.

00:00:26.640 --> 00:00:27.910
Welcome back.

00:00:27.910 --> 00:00:30.680
Today is probably our
last lecture about 3SAT,

00:00:30.680 --> 00:00:34.680
but this time it's about
planar 3SAT, which we've

00:00:34.680 --> 00:00:38.060
sort of alluded to in the past.

00:00:38.060 --> 00:00:40.310
And we saw a version
of what you might

00:00:40.310 --> 00:00:44.250
call planar 3SAT with planar
CircuitSAT last class.

00:00:44.250 --> 00:00:49.400
But planar 3SAT is a very
useful special case of 3SAT.

00:00:49.400 --> 00:00:54.850
It is just like
3SAT, but you also

00:00:54.850 --> 00:01:09.630
are told that the bipartite
graph, let's say of variables

00:01:09.630 --> 00:01:14.320
versus clauses is
a planar graph.

00:01:18.360 --> 00:01:27.410
So the idea is you have
some vertices representing

00:01:27.410 --> 00:01:28.290
variables.

00:01:28.290 --> 00:01:30.350
v for variable here.

00:01:30.350 --> 00:01:32.615
And then you separately
have some clauses.

00:01:36.848 --> 00:01:42.162
I guess I should really
have more variables.

00:01:42.162 --> 00:01:49.490
You have an edge between a
variable and a clause whenever

00:01:49.490 --> 00:01:51.140
that clause includes
that variable,

00:01:51.140 --> 00:01:53.390
either in positive
or negative form.

00:01:53.390 --> 00:01:54.890
So maybe some of
these edges, I'll

00:01:54.890 --> 00:01:56.610
draw a red to
indicate, actually,

00:01:56.610 --> 00:02:01.640
that's v bar that is
included in this clause.

00:02:01.640 --> 00:02:10.110
So this clause is
vi or vj bar or vk.

00:02:10.110 --> 00:02:10.620
And so on.

00:02:10.620 --> 00:02:13.465
And this graph should be planar,
shouldn't have any crossings.

00:02:17.999 --> 00:02:23.611
Something like that would be
a valid input to planar 3SAT.

00:02:23.611 --> 00:02:24.110
Question.

00:02:24.110 --> 00:02:28.110
AUDIENCE: So if
you're given the fact

00:02:28.110 --> 00:02:33.826
that a particular
bipartite graph is planar,

00:02:33.826 --> 00:02:38.456
is there a polynomial operation
to find a planar arrangement?

00:02:38.456 --> 00:02:39.080
PROFESSOR: Yes.

00:02:39.080 --> 00:02:40.810
Deciding whether
a graph is planar

00:02:40.810 --> 00:02:43.970
and finding a planar embedding
when it is is linear time.

00:02:43.970 --> 00:02:46.697
So here I'm just saying it's
given as a planar graph,

00:02:46.697 --> 00:02:47.780
but not with an embedding.

00:02:47.780 --> 00:02:49.660
So we're going to use the
embeddings in our reduction.

00:02:49.660 --> 00:02:50.380
Yeah, good point.

00:02:50.380 --> 00:02:52.040
So we do actually
need the ability

00:02:52.040 --> 00:02:54.580
to draw these things
without crossings.

00:02:54.580 --> 00:02:56.240
Good.

00:02:56.240 --> 00:02:59.390
So first thing I'm going to
do is prove that this is hard.

00:02:59.390 --> 00:03:01.670
And usually I don't prove
base problems are hard,

00:03:01.670 --> 00:03:05.600
but this is a sufficiently
sophisticated base problem.

00:03:05.600 --> 00:03:08.620
I mean, we do lots of
reductions from planar 3SAT.

00:03:08.620 --> 00:03:10.340
But the proof is
actually from 3SAT,

00:03:10.340 --> 00:03:12.340
and I think it's a
representative example of how

00:03:12.340 --> 00:03:14.970
to build a crossover in
this kind of setting,

00:03:14.970 --> 00:03:16.830
and what kind of
extra properties

00:03:16.830 --> 00:03:18.430
you can get out of it.

00:03:18.430 --> 00:03:20.910
So here it is.

00:03:20.910 --> 00:03:25.200
This is the proof
in a single diagram.

00:03:25.200 --> 00:03:27.820
So the notation here is that
the little green circles

00:03:27.820 --> 00:03:28.970
are clauses.

00:03:28.970 --> 00:03:32.070
And the bigger circles
are the variables.

00:03:32.070 --> 00:03:33.820
Purple circles are variables.

00:03:33.820 --> 00:03:36.945
So the idea is it in
your initial instance--

00:03:36.945 --> 00:03:38.430
so we're going to
reduce from 3SAT.

00:03:38.430 --> 00:03:41.330
We're given an
arbitrary 3SAT instance.

00:03:41.330 --> 00:03:44.340
So that has a corresponding
bipartite graph.

00:03:44.340 --> 00:03:45.420
Variables versus clauses.

00:03:45.420 --> 00:03:46.600
Just not planar.

00:03:46.600 --> 00:03:47.960
So consider any drawing.

00:03:47.960 --> 00:03:50.311
Actually, we'll look at a
specific drawing in a moment.

00:03:50.311 --> 00:03:52.310
But it's going to have
some crossings like this.

00:03:52.310 --> 00:03:54.393
This is a clause-variable
connection, another one.

00:03:54.393 --> 00:03:55.170
They cross here.

00:03:55.170 --> 00:03:58.580
We're going to replace that
with this picture, which

00:03:58.580 --> 00:04:02.707
is technically not 3SAT, because
there's a four-variable clause

00:04:02.707 --> 00:04:03.290
in the center.

00:04:03.290 --> 00:04:04.400
But we can fix that.

00:04:04.400 --> 00:04:05.880
That's not too hard.

00:04:05.880 --> 00:04:08.310
Let me first convince
you-- and this'll

00:04:08.310 --> 00:04:11.930
take a little while-- that
this is equivalent to this.

00:04:11.930 --> 00:04:14.160
So the ultimate
claim-- so there's

00:04:14.160 --> 00:04:17.649
four Greek letters in the
center as extra variables.

00:04:17.649 --> 00:04:22.180
The main claim is that
a1 equals a2 equals a.

00:04:22.180 --> 00:04:24.980
And b1 equals b2 equals b.

00:04:24.980 --> 00:04:27.820
If that's true, then, of
course, this connection

00:04:27.820 --> 00:04:30.010
simulates that connection.

00:04:30.010 --> 00:04:32.950
And that connection
simulates this connection.

00:04:32.950 --> 00:04:34.750
And the claim is as
long as you satisfy

00:04:34.750 --> 00:04:36.750
that, you can always set
the stuff in the middle

00:04:36.750 --> 00:04:37.890
to be happy.

00:04:37.890 --> 00:04:40.940
So those are the only
constraints, basically.

00:04:40.940 --> 00:04:47.060
So let's start with
over here and down here.

00:04:47.060 --> 00:04:52.150
These little sort of length two
paths-- sorry, so the coloring

00:04:52.150 --> 00:04:54.010
is similar to what
I did on the board.

00:04:54.010 --> 00:04:55.700
The red are negative
connections,

00:04:55.700 --> 00:04:59.080
meaning that clause has not
a and this clause has not a2.

00:04:59.080 --> 00:05:01.990
And the blue connections
are positive connections.

00:05:01.990 --> 00:05:06.420
So when you have this sort of
alternating four-cycle here,

00:05:06.420 --> 00:05:09.380
you can read that
as not a or a2,

00:05:09.380 --> 00:05:12.030
which is the same as
saying a implies a2.

00:05:12.030 --> 00:05:13.535
And also, a2 implies a.

00:05:13.535 --> 00:05:15.700
That means they
have the same value.

00:05:15.700 --> 00:05:17.040
a if and only if a2.

00:05:17.040 --> 00:05:19.970
Or I'll just write equality
of their truth values.

00:05:19.970 --> 00:05:20.670
Same thing here.

00:05:20.670 --> 00:05:26.380
So that part is just
to get warmed up.

00:05:26.380 --> 00:05:29.130
Now the fun part
is on the inside.

00:05:29.130 --> 00:05:31.950
And I think the next
step is to think

00:05:31.950 --> 00:05:36.520
about these sort of
triangles in the corner.

00:05:36.520 --> 00:05:39.100
If you stare at them
for a little while,

00:05:39.100 --> 00:05:40.690
you get these kinds
of constraints.

00:05:40.690 --> 00:05:42.490
So let's work through this one.

00:05:42.490 --> 00:05:46.260
You'll see there's a certain
symmetry among what the alpha,

00:05:46.260 --> 00:05:48.330
beta, gamma, deltas are.

00:05:48.330 --> 00:05:53.220
They're going to be all
sort of all patterns of a2

00:05:53.220 --> 00:05:58.060
possibly complemented, anded
with b2 possibly complemented.

00:05:58.060 --> 00:06:00.905
So these are supposed to be
the four cases of a versus b.

00:06:00.905 --> 00:06:03.650
The trick is that some of them
are 2's and some of them are

00:06:03.650 --> 00:06:04.550
1's.

00:06:04.550 --> 00:06:07.160
So that's what makes it
a little bit annoying.

00:06:07.160 --> 00:06:09.250
It would be nice to make
it perfectly symmetric,

00:06:09.250 --> 00:06:13.440
but that would, in terms
of these labels-- but that

00:06:13.440 --> 00:06:14.940
would destroy planarity.

00:06:14.940 --> 00:06:17.940
So this is the planar version.

00:06:17.940 --> 00:06:20.300
So let's look at this.

00:06:20.300 --> 00:06:26.410
We have, for example,
not alpha or b2.

00:06:26.410 --> 00:06:28.520
So alpha implies b2.

00:06:28.520 --> 00:06:30.740
Also, alpha implies a2.

00:06:30.740 --> 00:06:34.730
So if alpha is true, then
they must both be true.

00:06:34.730 --> 00:06:39.070
And conversely, I want
a2 and b2 to imply alpha.

00:06:39.070 --> 00:06:39.570
Right.

00:06:39.570 --> 00:06:41.740
So if these are both
true, then this guy's

00:06:41.740 --> 00:06:43.530
unsatisfied from
those two red clauses.

00:06:43.530 --> 00:06:44.450
So alpha must be true.

00:06:44.450 --> 00:06:44.950
Good.

00:06:44.950 --> 00:06:46.280
So it works in both directions.

00:06:46.280 --> 00:06:47.230
You get equality.

00:06:47.230 --> 00:06:49.396
It's exactly the same in
each of these four corners,

00:06:49.396 --> 00:06:52.250
just the coloring is different.

00:06:52.250 --> 00:06:53.840
And you're connected
to a different b.

00:06:53.840 --> 00:06:56.960
So here if you reflect, you're
connected to b1 instead of b2.

00:06:56.960 --> 00:06:58.990
And there's a complement
here basically

00:06:58.990 --> 00:07:03.904
because these two colors
switched from here.

00:07:03.904 --> 00:07:05.320
So it's exactly
the same argument,

00:07:05.320 --> 00:07:08.060
but you just imagine
flipping the value of b1.

00:07:08.060 --> 00:07:10.120
And then reflect over here.

00:07:10.120 --> 00:07:12.060
Switch the value of the a's.

00:07:12.060 --> 00:07:15.030
Reflect over here, switch
the coloring of the b's.

00:07:15.030 --> 00:07:18.550
So that's what's
happening in the corners.

00:07:18.550 --> 00:07:22.930
And at this point, I had to
draw a table of all the cases.

00:07:22.930 --> 00:07:23.830
Oh, sorry.

00:07:23.830 --> 00:07:26.595
This is a little bit about
what happens in the center.

00:07:26.595 --> 00:07:29.220
So of course, the center clause
says that at least one of these

00:07:29.220 --> 00:07:29.720
is true.

00:07:29.720 --> 00:07:32.680
We want exactly one to be
true, because exactly one

00:07:32.680 --> 00:07:34.280
of these cases should happen.

00:07:34.280 --> 00:07:36.350
But that's a weak constraint.

00:07:36.350 --> 00:07:38.770
And then we also
have some constraints

00:07:38.770 --> 00:07:47.010
like if alpha is true, then this
is not satisfied from alpha.

00:07:47.010 --> 00:07:48.000
And similarly, this.

00:07:48.000 --> 00:07:50.580
And therefore,
beta must be false.

00:07:50.580 --> 00:07:53.430
So if alpha is true, then
beta and delta are false.

00:07:53.430 --> 00:07:55.080
I think that's
actually all you need.

00:07:55.080 --> 00:07:56.720
I think these might
not be necessary.

00:07:56.720 --> 00:07:59.500
But they make for a
nice symmetric diagram.

00:07:59.500 --> 00:08:01.290
And they don't hurt.

00:08:01.290 --> 00:08:06.326
So now I drew a table-- there
may be a more direct argument--

00:08:06.326 --> 00:08:09.710
of all the possible
settings a2 and b2,

00:08:09.710 --> 00:08:12.110
and what you can
derive from that.

00:08:12.110 --> 00:08:15.890
And everything except this
part is really easy to derive,

00:08:15.890 --> 00:08:18.920
assuming I can remember
what I did last night.

00:08:18.920 --> 00:08:22.420
So let's say a2
and b2 are false.

00:08:22.420 --> 00:08:25.990
I claim alpha is false,
because we have this equation.

00:08:25.990 --> 00:08:26.850
That's easy.

00:08:26.850 --> 00:08:29.100
And in general, you can
compute alpha directly,

00:08:29.100 --> 00:08:30.960
because it's just a
function of a2 and b2.

00:08:30.960 --> 00:08:32.350
It's the end function.

00:08:32.350 --> 00:08:33.659
So that's good.

00:08:33.659 --> 00:08:34.409
What about beta?

00:08:34.409 --> 00:08:42.429
I claim if alpha is false here,
then in this particular case--

00:08:42.429 --> 00:08:43.059
well, OK.

00:08:43.059 --> 00:08:44.400
Here's one thing we wrote.

00:08:44.400 --> 00:08:46.570
Alpha implies not
beta and not gamma.

00:08:46.570 --> 00:08:49.370
So in this last row,
if alpha is true,

00:08:49.370 --> 00:08:52.510
we know that beta
and gamma are false.

00:08:52.510 --> 00:08:53.120
That's good.

00:08:53.120 --> 00:08:57.000
We hope also that beta
and delta are false.

00:08:57.000 --> 00:08:58.430
We hope also that
gamma is false.

00:08:58.430 --> 00:09:03.710
But I don't think we
need that, because if you

00:09:03.710 --> 00:09:07.920
look at this equation
on delta, which we know

00:09:07.920 --> 00:09:14.000
is 0, that must mean that
one of these two things is 0.

00:09:14.000 --> 00:09:15.910
But b2 is true.

00:09:15.910 --> 00:09:16.410
Sorry.

00:09:16.410 --> 00:09:18.243
I'm going to use true
and 1 interchangeably,

00:09:18.243 --> 00:09:21.630
and 0 and false for
whatever reason today.

00:09:21.630 --> 00:09:25.920
So this needs to be
0, but this is 1.

00:09:25.920 --> 00:09:29.690
So this must be 0, which
means that a1 is 1.

00:09:29.690 --> 00:09:33.100
And symmetrically on the top,
this is a symmetric between a

00:09:33.100 --> 00:09:33.600
and b.

00:09:33.600 --> 00:09:39.040
So up here, you
know that a2 is 1.

00:09:39.040 --> 00:09:42.990
And therefore, b1 bar must be 0.

00:09:42.990 --> 00:09:44.480
So b1 must be 1.

00:09:44.480 --> 00:09:46.644
So we transfer the information.

00:09:46.644 --> 00:09:48.810
And the only other thing
to check in all these cases

00:09:48.810 --> 00:09:50.518
is that actually
everything is satisfied.

00:09:50.518 --> 00:09:52.246
But that's sort of boring.

00:09:52.246 --> 00:09:53.870
I want to do the
other direction, which

00:09:53.870 --> 00:09:56.150
is that you are
forced to communicate

00:09:56.150 --> 00:09:58.259
the copies of a and
the copies of b.

00:09:58.259 --> 00:09:59.300
So that was the last row.

00:09:59.300 --> 00:10:00.674
I think the first
row should also

00:10:00.674 --> 00:10:03.970
be easy for a slightly
different reason.

00:10:03.970 --> 00:10:07.575
So a2 and b2 are false.

00:10:10.830 --> 00:10:11.910
Alpha is false.

00:10:11.910 --> 00:10:12.830
Beta is false.

00:10:12.830 --> 00:10:16.810
That's as far as
we've gotten so far.

00:10:16.810 --> 00:10:18.350
Let's see.

00:10:18.350 --> 00:10:24.440
Delta is a1 bar and b2, right?

00:10:27.781 --> 00:10:28.280
Right.

00:10:28.280 --> 00:10:31.835
Because b2 is false, we
know that delta is false.

00:10:31.835 --> 00:10:33.820
So it doesn't matter what a1 is.

00:10:33.820 --> 00:10:35.650
So it's sort of the
reverse direction.

00:10:35.650 --> 00:10:39.490
And similarly, we
should be able to-- oh,

00:10:39.490 --> 00:10:42.221
because from this, we know
at least one of them is true,

00:10:42.221 --> 00:10:43.970
at least one of the
Greek letters is true,

00:10:43.970 --> 00:10:45.410
then we've got three down.

00:10:45.410 --> 00:10:47.000
So it must be
gamma that is true.

00:10:47.000 --> 00:10:48.500
And once you know
gamma is true, you

00:10:48.500 --> 00:10:50.230
know exactly what a1 and b1 are.

00:10:50.230 --> 00:10:52.510
So that's another good case.

00:10:52.510 --> 00:10:53.940
These are slightly
more annoying,

00:10:53.940 --> 00:10:55.880
at least as far as I could see.

00:10:55.880 --> 00:10:58.090
Maybe there's a
cleaner argument.

00:10:58.090 --> 00:10:59.820
So let's say they're
symmetric, though.

00:10:59.820 --> 00:11:01.640
So let's do the second row.

00:11:01.640 --> 00:11:04.000
So a2 is 0.

00:11:04.000 --> 00:11:06.220
b2 is 0.

00:11:06.220 --> 00:11:08.710
I think just like
this argument, we

00:11:08.710 --> 00:11:13.470
get that beta is 0,
because beta involves a2.

00:11:13.470 --> 00:11:18.000
We know a2 is 0, so beta
equals 0, just like this case,

00:11:18.000 --> 00:11:19.010
actually.

00:11:19.010 --> 00:11:19.510
OK.

00:11:19.510 --> 00:11:21.480
So that's good for that.

00:11:21.480 --> 00:11:23.590
I think it's harder
to figure out delta.

00:11:26.700 --> 00:11:28.480
Or here's one way to argue it.

00:11:28.480 --> 00:11:30.170
Suppose that gamma were 1.

00:11:30.170 --> 00:11:34.700
It should be 0, because
gamma's supposed to be only 1

00:11:34.700 --> 00:11:36.480
in this situation.

00:11:36.480 --> 00:11:43.290
If it's 1, then I claim that
alpha 1 and beta 1 must be 0.

00:11:43.290 --> 00:11:45.570
That's from this equation.

00:11:45.570 --> 00:11:48.150
And then we should
get a contradiction.

00:11:48.150 --> 00:11:49.530
Help me find the contradiction.

00:11:49.530 --> 00:11:51.500
AUDIENCE: Delta becomes 1.

00:11:51.500 --> 00:11:53.060
PROFESSOR: Delta becomes 1.

00:11:53.060 --> 00:11:55.920
AUDIENCE: And then the clause
between gamma and delta is--

00:11:55.920 --> 00:11:57.530
PROFESSOR: And then
this is unhappy.

00:11:57.530 --> 00:11:58.030
Good.

00:11:58.030 --> 00:11:58.530
OK.

00:11:58.530 --> 00:12:01.960
So we do need a couple other
constraints like this one.

00:12:01.960 --> 00:12:02.460
Cool.

00:12:02.460 --> 00:12:03.620
So that's the idea.

00:12:03.620 --> 00:12:05.710
Therefore, gamma is 0.

00:12:05.710 --> 00:12:08.690
And then by that,
delta must be 1.

00:12:08.690 --> 00:12:10.406
And then we're happy again.

00:12:10.406 --> 00:12:11.040
OK?

00:12:11.040 --> 00:12:14.490
So that's the idea
in a nutshell.

00:12:14.490 --> 00:12:17.010
There's maybe other
ways to see it.

00:12:17.010 --> 00:12:20.930
And this is an old proof
by Lichtenstein in 1982.

00:12:20.930 --> 00:12:21.741
It's a cool paper.

00:12:21.741 --> 00:12:22.990
It has a lot of results in it.

00:12:22.990 --> 00:12:25.140
We'll be covering a
few different results.

00:12:25.140 --> 00:12:28.320
But at this point,
we have shown this.

00:12:28.320 --> 00:12:30.350
You just apply this
to each crossing.

00:12:30.350 --> 00:12:34.100
Eventually you get a
planar bipartite graph

00:12:34.100 --> 00:12:37.280
that's satisfiable if and only
if the original is a planar

00:12:37.280 --> 00:12:39.150
3SAT is NP-hard.

00:12:39.150 --> 00:12:39.830
Question?

00:12:39.830 --> 00:12:41.452
So many questions.

00:12:41.452 --> 00:12:43.160
AUDIENCE: I guess this
is probably silly.

00:12:43.160 --> 00:12:45.544
But [INAUDIBLE]
3SAT, every clause

00:12:45.544 --> 00:12:46.710
had to have three variables.

00:12:46.710 --> 00:12:47.060
PROFESSOR: Yes.

00:12:47.060 --> 00:12:47.430
OK.

00:12:47.430 --> 00:12:47.964
Right.

00:12:47.964 --> 00:12:48.880
AUDIENCE: Two or four.

00:12:48.880 --> 00:12:51.630
PROFESSOR: I cheated
a little bit here.

00:12:51.630 --> 00:12:52.130
OK.

00:12:52.130 --> 00:12:53.020
Yeah.

00:12:53.020 --> 00:12:53.695
Some have two.

00:12:56.510 --> 00:13:00.790
So for that, I need to be able
to construct the value false.

00:13:00.790 --> 00:13:01.960
And some have four.

00:13:01.960 --> 00:13:06.440
The four, I believe
the claim is you

00:13:06.440 --> 00:13:09.460
can take a little
clause like this

00:13:09.460 --> 00:13:17.310
and convert it into a clause
with another variable.

00:13:17.310 --> 00:13:19.727
AUDIENCE: And one of
the two edges connecting

00:13:19.727 --> 00:13:20.810
the variables [INAUDIBLE].

00:13:20.810 --> 00:13:21.518
PROFESSOR: Right.

00:13:24.130 --> 00:13:24.710
Like this?

00:13:30.720 --> 00:13:34.010
So the claim is this four-way
clause to the 4SAT clause

00:13:34.010 --> 00:13:36.570
is equivalent to these
two 3SAT clauses.

00:13:36.570 --> 00:13:38.210
Let's call this new variable x.

00:13:45.500 --> 00:13:47.270
So the idea is x is
going to represent

00:13:47.270 --> 00:13:50.640
whether the left side satisfies
the clause or the right side

00:13:50.640 --> 00:13:53.480
satisfies the clause.

00:13:53.480 --> 00:13:56.055
If x is 1, then it
satisfies this for free.

00:13:56.055 --> 00:13:58.430
But it doesn't satisfy this
one, so at least one of these

00:13:58.430 --> 00:14:00.470
must be satisfied.

00:14:00.470 --> 00:14:05.470
On the other hand, if x is 0,
then it satisfies this one.

00:14:05.470 --> 00:14:07.890
And so at least one of these
two should be satisfied.

00:14:07.890 --> 00:14:08.390
OK?

00:14:08.390 --> 00:14:14.360
So that's a reduction from
4SAT to 3SAT, so to speak.

00:14:14.360 --> 00:14:18.580
Now, I didn't create
any degree-two clauses,

00:14:18.580 --> 00:14:21.050
but I have tons of degree-two
clauses over there.

00:14:21.050 --> 00:14:22.782
AUDIENCE: Just use
parallel edges.

00:14:22.782 --> 00:14:24.240
PROFESSOR: Just
use parallel edges.

00:14:24.240 --> 00:14:30.000
So you could just repeat the
same variable in the clause

00:14:30.000 --> 00:14:31.330
multiple times.

00:14:31.330 --> 00:14:32.490
That sounds good.

00:14:32.490 --> 00:14:35.340
I don't know if there's an easy
way to avoid multiple edges.

00:14:35.340 --> 00:14:36.560
I think it's a little tricky.

00:14:36.560 --> 00:14:39.360
You can't construct false
in the CircuitSAT sense,

00:14:39.360 --> 00:14:42.542
because everything you
build should be satisfiable.

00:14:42.542 --> 00:14:44.000
So you have to be
a little careful.

00:14:44.000 --> 00:14:46.950
But it might be possible
to pair them up,

00:14:46.950 --> 00:14:53.772
because there should be an
even number of those guys.

00:14:53.772 --> 00:14:56.230
And so maybe you pair them up
and connect them in some way.

00:14:56.230 --> 00:14:58.260
But let's just allow
multiple edges here.

00:14:58.260 --> 00:14:59.715
Yeah?

00:14:59.715 --> 00:15:01.655
AUDIENCE: In the original
instance of 3SAT,

00:15:01.655 --> 00:15:06.990
does it allow two clauses
with two variables?

00:15:06.990 --> 00:15:08.024
For getting planar?

00:15:08.024 --> 00:15:08.690
PROFESSOR: Yeah.

00:15:08.690 --> 00:15:12.580
I mean, in general, this would
work for any kind of SAT,

00:15:12.580 --> 00:15:14.330
any kind of CNF-SAT.

00:15:14.330 --> 00:15:18.199
We're not relying on three-ness
at all in this picture.

00:15:18.199 --> 00:15:20.240
But it's not going to
split things up, of course.

00:15:20.240 --> 00:15:21.740
AUDIENCE: But the
definition of 3SAT

00:15:21.740 --> 00:15:24.010
has three distinct
variables in each clause.

00:15:24.010 --> 00:15:25.760
PROFESSOR: There are
a couple definitions.

00:15:25.760 --> 00:15:28.910
One has exactly
three, but we never, I

00:15:28.910 --> 00:15:31.132
think, specify that
they are distinct.

00:15:31.132 --> 00:15:33.090
I think that is hard when
they're all distinct.

00:15:33.090 --> 00:15:36.740
But I don't know the
reduction offhand.

00:15:36.740 --> 00:15:38.990
I think the way we define
it is there's exactly three,

00:15:38.990 --> 00:15:41.750
but we didn't say
any uniqueness.

00:15:41.750 --> 00:15:42.640
So let's say that.

00:15:42.640 --> 00:15:44.670
And then we're still
happy here, because we

00:15:44.670 --> 00:15:47.488
can duplicate variables.

00:15:47.488 --> 00:15:48.300
Yeah?

00:15:48.300 --> 00:15:53.900
AUDIENCE: Why did we include the
a equals a2, and b equals b2?

00:15:53.900 --> 00:15:56.160
PROFESSOR: I think it's
for the next slide.

00:15:56.160 --> 00:15:58.860
[LAUGHTER]

00:15:58.860 --> 00:16:04.760
The next claim is that not only
is that bipartite graph planar,

00:16:04.760 --> 00:16:08.350
but it also remains planar if
we connect all the variables

00:16:08.350 --> 00:16:21.930
together in a cycle.

00:16:34.740 --> 00:16:36.950
So let's say we number
the variables 1 through n.

00:16:36.950 --> 00:16:39.240
It doesn't matter
how you number them.

00:16:39.240 --> 00:16:41.120
Well, in a certain sense.

00:16:41.120 --> 00:16:45.210
You can restrict to
instances of 3SAT

00:16:45.210 --> 00:16:51.940
that this cycle plus the
variable clause adjacency graph

00:16:51.940 --> 00:16:55.350
is together planar.

00:16:55.350 --> 00:16:56.310
OK?

00:16:56.310 --> 00:17:02.150
So that's less clear here.

00:17:02.150 --> 00:17:03.680
But let me prove it.

00:17:03.680 --> 00:17:07.000
This is proved in
the same paper.

00:17:07.000 --> 00:17:12.430
So here's a top-level diagram
of what we're trying to do.

00:17:12.430 --> 00:17:14.160
So we have clauses on one hand.

00:17:14.160 --> 00:17:15.839
Let's put them
all on the y-axis.

00:17:15.839 --> 00:17:17.750
We have variables
on the other hand.

00:17:17.750 --> 00:17:21.369
These are the original variables
in the original 3SAT instance.

00:17:21.369 --> 00:17:23.060
Put them on the x-axis.

00:17:23.060 --> 00:17:25.579
Then draw all the connections
in the bipartite graph.

00:17:25.579 --> 00:17:30.434
And furthermore, draw this
cycle on the vertices down here.

00:17:30.434 --> 00:17:31.350
OK?

00:17:31.350 --> 00:17:33.240
And obviously, we
put them in the order

00:17:33.240 --> 00:17:34.490
that they appear in the cycle.

00:17:34.490 --> 00:17:37.980
Otherwise we're making
our lives harder.

00:17:37.980 --> 00:17:39.820
And here is that
crossover gadget.

00:17:39.820 --> 00:17:42.480
This is how it's
originally drawn.

00:17:42.480 --> 00:17:45.580
In this case, it's already
been expanded in the center

00:17:45.580 --> 00:17:46.830
into that picture over there.

00:17:46.830 --> 00:17:50.460
This is where I got
that reduction from.

00:17:50.460 --> 00:17:52.410
And then there's no
color here, but you'll

00:17:52.410 --> 00:17:57.800
notice the curvy line is an
attempt to connect together

00:17:57.800 --> 00:18:00.210
all of the variables that
appear in the crossover

00:18:00.210 --> 00:18:06.420
gadget in linear order without
introducing any crossings.

00:18:06.420 --> 00:18:11.790
So that diagram is still planar
when we add all of those edges.

00:18:11.790 --> 00:18:15.300
And so what this says
is that if we-- we're

00:18:15.300 --> 00:18:17.590
trying to build a
global cycle that

00:18:17.590 --> 00:18:18.952
connects all the variables.

00:18:18.952 --> 00:18:20.910
So obviously, we have
this for these variables,

00:18:20.910 --> 00:18:23.410
but we need to add
into this cycle

00:18:23.410 --> 00:18:26.170
all the variables that appear
in all these crossings.

00:18:26.170 --> 00:18:29.020
And so what this says is if
we are coming in either here

00:18:29.020 --> 00:18:32.070
or here into a1, we
can follow this path

00:18:32.070 --> 00:18:35.900
and then leave either
here or here on a2.

00:18:35.900 --> 00:18:37.599
OK?

00:18:37.599 --> 00:18:39.390
And because the diagram
is symmetric, also,

00:18:39.390 --> 00:18:43.620
if you're coming into
b1, you can end up in b2.

00:18:43.620 --> 00:18:48.070
And I'm guessing this
is why we separate b2.

00:18:48.070 --> 00:18:51.890
The reason we separated
b2 from b in general

00:18:51.890 --> 00:18:54.180
is to basically add
this connection,

00:18:54.180 --> 00:18:57.970
so we can separate this
gadget from this gadget.

00:18:57.970 --> 00:19:00.860
So just showing that we
can copy and extend things.

00:19:00.860 --> 00:19:02.660
It may not be necessary,
but it definitely

00:19:02.660 --> 00:19:04.330
matches this diagram.

00:19:04.330 --> 00:19:04.830
OK.

00:19:04.830 --> 00:19:07.160
So this diagram is
this diagram, but where

00:19:07.160 --> 00:19:11.210
every intersection plus a few
extra places, like over here,

00:19:11.210 --> 00:19:12.560
we add these little diamonds.

00:19:12.560 --> 00:19:15.230
The diamonds
indicate that gadget.

00:19:15.230 --> 00:19:19.240
Then sorry there's no
color, but in curved lines

00:19:19.240 --> 00:19:21.950
is the attempt to connect
all the variables together

00:19:21.950 --> 00:19:23.260
in one single path.

00:19:23.260 --> 00:19:23.935
Question.

00:19:23.935 --> 00:19:26.110
AUDIENCE: So what are the
extra crossover gadgets

00:19:26.110 --> 00:19:27.570
that don't cross anything over?

00:19:27.570 --> 00:19:30.290
PROFESSOR: They're just
to do this path thing.

00:19:30.290 --> 00:19:32.280
So what are they?

00:19:32.280 --> 00:19:33.860
I mean, they are
exactly this gadget,

00:19:33.860 --> 00:19:35.484
just there's no
connection on the left.

00:19:35.484 --> 00:19:38.320
AUDIENCE: So they're a crossover
of the path on the variables.

00:19:38.320 --> 00:19:39.300
Is that right?

00:19:39.300 --> 00:19:39.570
PROFESSOR: Yeah.

00:19:39.570 --> 00:19:41.200
So instead of going
straight here,

00:19:41.200 --> 00:19:43.680
you just put a crossover
gadget in the middle.

00:19:43.680 --> 00:19:44.940
You can still go through.

00:19:44.940 --> 00:19:47.260
You're copying some
arbitrary information here

00:19:47.260 --> 00:19:49.030
to some arbitrary
information here.

00:19:49.030 --> 00:19:51.470
So you don't preserve the
number of solutions, let's say.

00:19:51.470 --> 00:19:53.980
But who cares?

00:19:53.980 --> 00:19:57.500
The reason for that is so
that we can take this path,

00:19:57.500 --> 00:19:59.700
connect to this vertex,
and then get out over here.

00:19:59.700 --> 00:20:02.470
AUDIENCE: Yeah, that's
what I meant by crossing.

00:20:02.470 --> 00:20:07.090
PROFESSOR: So that we can
do this kind of loop thing.

00:20:07.090 --> 00:20:08.530
So how do we follow the path?

00:20:08.530 --> 00:20:10.940
I mean, we basically do
it in scan-line order.

00:20:10.940 --> 00:20:13.717
It's like some
printers used to do

00:20:13.717 --> 00:20:15.300
this, where they
print back and forth,

00:20:15.300 --> 00:20:16.790
left and right, line printers.

00:20:16.790 --> 00:20:19.010
So we come in here.

00:20:19.010 --> 00:20:21.950
I don't know quite why they draw
it coming in the middle here.

00:20:21.950 --> 00:20:24.410
But it's essentially
coming to this vertex.

00:20:24.410 --> 00:20:27.070
Then ending on this
vertex on the left side.

00:20:27.070 --> 00:20:31.524
Then going into this vertex,
which brings us to here.

00:20:31.524 --> 00:20:32.690
Let's say coming on the top.

00:20:32.690 --> 00:20:33.670
Doesn't matter.

00:20:33.670 --> 00:20:36.120
And then we go to the right
till we get to the end.

00:20:36.120 --> 00:20:39.140
Here we add an extra crossover,
so we can basically cross over

00:20:39.140 --> 00:20:40.960
this line with our path.

00:20:40.960 --> 00:20:42.870
And add another one.

00:20:42.870 --> 00:20:45.600
And whenever we visit an
intersection, we can just go.

00:20:45.600 --> 00:20:47.516
And then we go to the
next line and so on.

00:20:47.516 --> 00:20:48.600
We clear?

00:20:48.600 --> 00:20:51.560
Then at the very end, we're
either on the right or left,

00:20:51.560 --> 00:20:53.450
depending on parity.

00:20:53.450 --> 00:20:55.420
Probably we want
to be on the right.

00:20:55.420 --> 00:20:58.000
So if we're on the left, we'll
just add extra crossovers here

00:20:58.000 --> 00:20:59.370
to end up on the right.

00:20:59.370 --> 00:21:02.340
Then we can go through all
these variables in reverse order

00:21:02.340 --> 00:21:04.050
and then come back up here.

00:21:04.050 --> 00:21:08.700
So that will be one non-crossing
path in this planar embedding.

00:21:08.700 --> 00:21:12.180
Therefore, we've
constructed a new formula

00:21:12.180 --> 00:21:14.520
where the bipartite graph
plus the path through all

00:21:14.520 --> 00:21:16.220
the variables is planar.

00:21:16.220 --> 00:21:19.230
And so this new version
of planar 3SAT is hard.

00:21:19.230 --> 00:21:22.046
This version is usually
called planar 3SAT, but if you

00:21:22.046 --> 00:21:23.420
want to distinguish
it, you could

00:21:23.420 --> 00:21:27.893
call it planar 3SAT with a
variable cycle or something.

00:21:27.893 --> 00:21:29.160
Yeah?

00:21:29.160 --> 00:21:31.305
AUDIENCE: Why is it
that we care about this?

00:21:31.305 --> 00:21:32.430
PROFESSOR: Why do you care?

00:21:32.430 --> 00:21:33.550
Aha.

00:21:33.550 --> 00:21:35.680
We'll get to that
a little bit later.

00:21:35.680 --> 00:21:38.060
Well, we've seen a lot
of proofs, actually,

00:21:38.060 --> 00:21:41.500
where you visit a variable
and make a choice,

00:21:41.500 --> 00:21:44.860
and then visit the next variable
and make a choice, and so on.

00:21:44.860 --> 00:21:47.790
And when you make a choice, you
go visit the clauses and things

00:21:47.790 --> 00:21:48.540
like that.

00:21:48.540 --> 00:21:51.170
So when we're reducing
from planar 3SAT,

00:21:51.170 --> 00:21:54.080
it's often handy to have
this traversable path.

00:21:54.080 --> 00:21:58.500
If we have a robot or
somebody moving around,

00:21:58.500 --> 00:22:02.620
then we can guarantee
planarity of that motion still.

00:22:02.620 --> 00:22:04.490
And the connections
between the variables

00:22:04.490 --> 00:22:05.790
don't have to cross anything.

00:22:05.790 --> 00:22:09.050
In general, our goal here is
to avoid crossover gadgets

00:22:09.050 --> 00:22:12.260
when we're reducing from
3SAT to something else.

00:22:12.260 --> 00:22:15.080
So this gives you kind
of a generic crossover,

00:22:15.080 --> 00:22:17.600
so that as long as you can
do variables and clauses more

00:22:17.600 --> 00:22:20.841
or less independently and
you can build connections,

00:22:20.841 --> 00:22:23.340
then you don't have to worry
about the connections crossing.

00:22:23.340 --> 00:22:23.909
Yeah?

00:22:23.909 --> 00:22:25.950
AUDIENCE: When you're
given this bipartite graph,

00:22:25.950 --> 00:22:30.500
how do you actually tell whether
an edge is negated or not?

00:22:33.950 --> 00:22:36.980
PROFESSOR: You're still
given a formula, let's say.

00:22:36.980 --> 00:22:39.704
And then you're just
told this extra fact

00:22:39.704 --> 00:22:42.120
that the bipartite graph plus
this path and the variables,

00:22:42.120 --> 00:22:44.880
in that order, is planar.

00:22:44.880 --> 00:22:46.894
AUDIENCE: The
variable nodes, you

00:22:46.894 --> 00:22:49.301
have one for every variable
and its first negation?

00:22:49.301 --> 00:22:50.070
Or do you just--

00:22:50.070 --> 00:22:50.710
PROFESSOR: No.

00:22:50.710 --> 00:22:51.640
Sorry.

00:22:51.640 --> 00:22:55.050
There's only vertices for
variables and for clauses,

00:22:55.050 --> 00:22:57.130
not for literals.

00:22:57.130 --> 00:22:59.730
But the next version is
actually about that case.

00:23:03.890 --> 00:23:12.629
The next one is-- so the
idea, if you were just

00:23:12.629 --> 00:23:14.170
given the bipartite
graph, you'd have

00:23:14.170 --> 00:23:16.850
to be told the coloring
of the edges here

00:23:16.850 --> 00:23:18.690
to know which literal
you're talking about.

00:23:21.240 --> 00:23:24.590
But also, the problem
remains planar

00:23:24.590 --> 00:23:41.720
if we use literals
instead of variables.

00:23:41.720 --> 00:23:44.990
So if you were wondering
about that version,

00:23:44.990 --> 00:23:47.540
that will also be planar.

00:23:47.540 --> 00:23:49.400
It doesn't follow immediately.

00:23:49.400 --> 00:23:52.525
But the idea is
suppose we have vi.

00:23:52.525 --> 00:23:54.930
So in the regular
bipartite graph,

00:23:54.930 --> 00:23:58.870
we have some positive edges and
we have some negative edges.

00:23:58.870 --> 00:24:07.990
Instead, I want to represent
that as vi and vi bar.

00:24:07.990 --> 00:24:10.176
And the positive
connections are over here.

00:24:10.176 --> 00:24:11.800
The negative connections
are over here.

00:24:11.800 --> 00:24:12.970
Now I don't need
the two coloring,

00:24:12.970 --> 00:24:15.260
because I have the labels
to tell me which is which.

00:24:15.260 --> 00:24:17.740
And furthermore, I can add
this edge connecting them.

00:24:17.740 --> 00:24:18.870
That will still be planar.

00:24:18.870 --> 00:24:21.990
So just split vi into two parts.

00:24:21.990 --> 00:24:25.600
What this tells me is that
the positive connections to vi

00:24:25.600 --> 00:24:27.780
appear as a contiguous chunk.

00:24:27.780 --> 00:24:30.550
And the negative connections
appear as a contiguous chunk.

00:24:30.550 --> 00:24:32.920
So it's not like alternating
white, red, white, red.

00:24:32.920 --> 00:24:36.690
So far, it is if you
look at the reduction.

00:24:36.690 --> 00:24:39.200
But we can fix that.

00:24:39.200 --> 00:24:39.700
OK.

00:24:42.640 --> 00:24:50.460
So I just want to add, with an
edge between the xi and xi bar.

00:24:50.460 --> 00:24:50.960
Yeah?

00:24:50.960 --> 00:24:52.956
AUDIENCE: When you say you
add an edge between them,

00:24:52.956 --> 00:24:53.902
what does that mean?

00:24:53.902 --> 00:24:55.318
Because all the
edges are supposed

00:24:55.318 --> 00:24:57.220
to be in between
literals and clauses.

00:24:57.220 --> 00:24:59.720
PROFESSOR: Well, I mean, the
graph already wasn't bipartite.

00:25:02.430 --> 00:25:05.520
We start with a bipartite graph
between variables and literals.

00:25:05.520 --> 00:25:07.680
Then we also add the
edges between variables

00:25:07.680 --> 00:25:08.780
and their complements.

00:25:08.780 --> 00:25:14.310
And then we also add a cycle
among all the variables,

00:25:14.310 --> 00:25:18.020
among all the
literals, let's say.

00:25:18.020 --> 00:25:20.830
So I guess this could be part
of the cycle, for example.

00:25:20.830 --> 00:25:23.984
And that graph, which is not
bipartite, must be planar.

00:25:23.984 --> 00:25:24.900
That's the constraint.

00:25:24.900 --> 00:25:28.090
The claim is that all
such problems are NP-hard.

00:25:28.090 --> 00:25:31.690
In general, we want to
make as small a problem

00:25:31.690 --> 00:25:34.330
as we can, as special a
case as we can NP-hard,

00:25:34.330 --> 00:25:35.790
because then we're reducing.

00:25:35.790 --> 00:25:38.500
We have more structure
that we get to exploit.

00:25:38.500 --> 00:25:42.310
This is a special case of this
is a special case of this.

00:25:42.310 --> 00:25:45.660
So the more we can
confine it, the better.

00:25:45.660 --> 00:25:46.560
Cool.

00:25:46.560 --> 00:25:48.900
So this is proved also in
the Lichtenstein paper.

00:25:48.900 --> 00:25:51.340
Although, we'll see a
cleaner proof in a moment,

00:25:51.340 --> 00:25:53.310
so I won't cover this
in too much detail.

00:25:53.310 --> 00:25:57.650
But the idea is this.

00:25:57.650 --> 00:26:01.660
So we're taking
each variable, we're

00:26:01.660 --> 00:26:04.199
replacing it with a
big cycle like this.

00:26:04.199 --> 00:26:06.240
I think it's the same kind
of trick as over here.

00:26:06.240 --> 00:26:10.260
It doesn't matter.

00:26:10.260 --> 00:26:13.714
All these a's should be the
same or sort of alternating.

00:26:13.714 --> 00:26:15.380
And we're connecting
the negative side--

00:26:15.380 --> 00:26:17.920
so this is really two
vertices connected by an edge.

00:26:17.920 --> 00:26:19.680
But I draw it like
that to make clear

00:26:19.680 --> 00:26:24.470
that that represents the same
variable to literals of it.

00:26:24.470 --> 00:26:26.900
And do this thing.

00:26:26.900 --> 00:26:29.680
And then this is the path.

00:26:29.680 --> 00:26:33.290
So suppose the path used
to go through this way.

00:26:33.290 --> 00:26:35.840
Then the path now bisects.

00:26:35.840 --> 00:26:38.490
And you see that all
of the positive copies

00:26:38.490 --> 00:26:42.632
are on one side, and negative
copies are on the other side.

00:26:42.632 --> 00:26:44.857
That's the idea.

00:26:44.857 --> 00:26:46.940
We will see another proof
of a stronger statement,

00:26:46.940 --> 00:26:49.250
so I think let's
not worry about this

00:26:49.250 --> 00:26:51.865
too much unless
there are questions.

00:26:57.260 --> 00:26:58.530
Here's the stronger statement.

00:27:42.970 --> 00:27:50.000
So in general, the
variable cycle--

00:27:50.000 --> 00:27:52.840
so I'm going to not subdivide
into literals for the moment.

00:27:52.840 --> 00:27:56.190
But we could put that back.

00:27:56.190 --> 00:27:59.130
So here's the variable cycle.

00:27:59.130 --> 00:28:01.370
This decomposes the
plane at two regions--

00:28:01.370 --> 00:28:03.015
the interior and the exterior.

00:28:03.015 --> 00:28:04.390
Or course, I could
flip the edge,

00:28:04.390 --> 00:28:06.220
and it doesn't matter which
one's interior and exterior.

00:28:06.220 --> 00:28:07.780
But there are two regions.

00:28:07.780 --> 00:28:11.610
And what I'm going to
require is that every clause

00:28:11.610 --> 00:28:16.730
that I draw here should have
entirely positive connections

00:28:16.730 --> 00:28:18.120
on this side.

00:28:18.120 --> 00:28:22.320
And every clause
that I draw out here

00:28:22.320 --> 00:28:25.235
should have entirely
negative connections.

00:28:28.150 --> 00:28:28.650
OK?

00:28:28.650 --> 00:28:32.240
This is monotone 3SAT again.

00:28:32.240 --> 00:28:34.450
So this implies monotone.

00:28:38.110 --> 00:28:39.397
We know monotone 3SAT is hard.

00:28:39.397 --> 00:28:41.230
Now we're claiming that
planar monotone 3SAT

00:28:41.230 --> 00:28:45.670
is hard when all the
positive clauses are

00:28:45.670 --> 00:28:47.210
on one side of the
variable cycle,

00:28:47.210 --> 00:28:49.335
and all the negative clauses
are on the other side.

00:28:49.335 --> 00:28:52.454
This is really helpful.

00:28:52.454 --> 00:28:54.120
I haven't yet given
this problem a name,

00:28:54.120 --> 00:28:56.250
because it has a name that
uses another word, which

00:28:56.250 --> 00:28:57.970
I should first introduce.

00:28:57.970 --> 00:29:00.965
So that's the next page.

00:29:11.539 --> 00:29:16.230
That word is
"rectilinear." so this

00:29:16.230 --> 00:29:18.520
is a relatively simple
modification to what we

00:29:18.520 --> 00:29:21.040
have already.

00:29:21.040 --> 00:29:24.690
I want the variables
to live on the x-axis.

00:29:24.690 --> 00:29:27.590
You can think of them
as horizontal segments

00:29:27.590 --> 00:29:28.810
on the x-axis.

00:29:28.810 --> 00:29:31.430
I prefer this drawing.

00:29:31.430 --> 00:29:34.450
So imagine each variable is like
a little horizontal segment,

00:29:34.450 --> 00:29:36.500
or in this case, a box.

00:29:36.500 --> 00:29:38.990
And the clauses are
horizontal segments.

00:29:38.990 --> 00:29:41.540
And then they're connected
by vertical segments

00:29:41.540 --> 00:29:43.970
between the clause
and the variable.

00:29:43.970 --> 00:29:47.690
And all of the clauses
that are above the x-axis

00:29:47.690 --> 00:29:49.200
should be all positive.

00:29:49.200 --> 00:29:51.020
All the clauses that
are below the x-axis

00:29:51.020 --> 00:29:52.520
should be all negative.

00:29:52.520 --> 00:29:54.740
That would be planar
monotone rectilinear 3SAT,

00:29:54.740 --> 00:29:55.920
and I jumped the gun.

00:29:55.920 --> 00:29:57.670
Planar rectilinear has
no such constraint.

00:29:57.670 --> 00:30:00.170
Each of these could be
positive or negative.

00:30:00.170 --> 00:30:01.000
OK.

00:30:01.000 --> 00:30:06.150
So variables are segments.

00:30:06.150 --> 00:30:06.650
All right.

00:30:06.650 --> 00:30:10.705
So each variable is a
segment on the x-axis.

00:30:13.630 --> 00:30:24.180
And each clause is another
horizontal segment,

00:30:24.180 --> 00:30:31.570
plus vertical connections
to the three variables

00:30:31.570 --> 00:30:34.410
that it includes in
positive or negative form.

00:30:39.580 --> 00:30:40.280
OK.

00:30:40.280 --> 00:30:54.220
And then planar monotone
rectilinear 3SAT

00:30:54.220 --> 00:30:57.030
is a special case
of monotone 3SAT,

00:30:57.030 --> 00:31:09.390
where all positive
clauses are above the line

00:31:09.390 --> 00:31:14.970
and conversely, above x-axis.

00:31:14.970 --> 00:31:18.530
Every clause above the x-axis
should be all positive.

00:31:18.530 --> 00:31:23.810
And every clause below the
x-axis should be all negative.

00:31:33.050 --> 00:31:33.770
OK.

00:31:33.770 --> 00:31:36.810
So I guess this one you
could call monotone planar

00:31:36.810 --> 00:31:38.340
3SAT without rectilinear.

00:31:38.340 --> 00:31:42.670
But of course, rectilinear
doesn't change much.

00:31:42.670 --> 00:31:46.770
I didn't say why, but if
you have a planar drawing

00:31:46.770 --> 00:31:50.550
like we had before, this is
just a particularly nice way

00:31:50.550 --> 00:31:52.390
to make that drawing.

00:31:52.390 --> 00:31:55.900
To go here, I just used the fact
that there are no crossings.

00:31:55.900 --> 00:31:58.580
And I stretched out the
variables to decent lengths,

00:31:58.580 --> 00:32:01.380
so that clauses can
just go straight down.

00:32:01.380 --> 00:32:06.920
You can prove any planar graph
can be drawn in this way.

00:32:06.920 --> 00:32:11.370
Any planar graph that has the
vi cycle and has some degree--

00:32:11.370 --> 00:32:13.690
three vertices that
connect to variables.

00:32:13.690 --> 00:32:15.580
They have to nest in
this way, because if you

00:32:15.580 --> 00:32:17.150
think of a clause,
they could either

00:32:17.150 --> 00:32:22.540
be in this pocket or outside
of it, or down in this region.

00:32:22.540 --> 00:32:24.765
And so you can just
figure out how big

00:32:24.765 --> 00:32:27.390
this thing needs to be, and then
make the next one a little bit

00:32:27.390 --> 00:32:28.200
bigger.

00:32:28.200 --> 00:32:29.800
And so you can
represent the nesting

00:32:29.800 --> 00:32:32.320
in this nice orthogonal,
or rectilinear structure.

00:32:32.320 --> 00:32:35.910
Rectilinear just means
horizontal and vertical lines.

00:32:35.910 --> 00:32:36.660
Cool?

00:32:36.660 --> 00:32:40.840
So that's planar rectilinear
3SAT first observed

00:32:40.840 --> 00:32:44.270
by Knuth and Raghunathan.

00:32:44.270 --> 00:32:47.840
Now we want to-- let's
prove that planar monotone

00:32:47.840 --> 00:32:49.890
rectilinear 3SAT is also hard.

00:32:49.890 --> 00:32:50.390
Question.

00:32:50.390 --> 00:32:51.015
AUDIENCE: Wait.

00:32:51.015 --> 00:32:54.760
If rectilinearity just is a
nice way to draw the graph,

00:32:54.760 --> 00:32:57.380
can we use the fact that it's
rectilinear in our reductions?

00:32:57.380 --> 00:32:59.130
I mean, is that going
to help us any more?

00:32:59.130 --> 00:33:00.879
PROFESSOR: The rectilinear
helps us mainly

00:33:00.879 --> 00:33:04.600
when we're reducing to a
problem that lives on a grid.

00:33:04.600 --> 00:33:06.660
It's just a convenient
way of thinking about it.

00:33:06.660 --> 00:33:08.670
It doesn't directly help us.

00:33:08.670 --> 00:33:10.890
I mean, it's a linear
time reduction.

00:33:10.890 --> 00:33:12.390
I mean, all of these
are reductions,

00:33:12.390 --> 00:33:15.200
so of course, none of
them help us in theory.

00:33:15.200 --> 00:33:17.900
But the cleaner you can
make the problem-- I mean,

00:33:17.900 --> 00:33:18.950
this looks pretty.

00:33:18.950 --> 00:33:20.650
And we'll see, I
think at the end

00:33:20.650 --> 00:33:23.550
of class, a proof that
directly mimics this structure.

00:33:23.550 --> 00:33:24.809
So that's the only reason.

00:33:24.809 --> 00:33:26.600
You could, of course,
as a first step, say,

00:33:26.600 --> 00:33:27.900
hey, draw it rectilinearly.

00:33:27.900 --> 00:33:32.130
But this saves you that step.

00:33:32.130 --> 00:33:33.800
Cool.

00:33:33.800 --> 00:33:34.440
All right.

00:33:34.440 --> 00:33:38.010
So planar monotone
rectilinear 3SAT.

00:33:41.740 --> 00:33:43.365
Here's an explicit example.

00:33:43.365 --> 00:33:44.990
Although it's not
going to be modified,

00:33:44.990 --> 00:33:48.480
it's just another example
of planar rectilinear 3SAT

00:33:48.480 --> 00:33:49.450
without the monotone.

00:33:49.450 --> 00:33:52.920
You see there's negations
above, lack of negations below.

00:33:52.920 --> 00:33:55.285
And here is the
trick to fix things.

00:33:58.130 --> 00:34:01.250
So suppose you have a
variable xi on the x-axis,

00:34:01.250 --> 00:34:03.970
you have a clause above
it that uses that variable

00:34:03.970 --> 00:34:05.550
in the wrong orientation.

00:34:05.550 --> 00:34:07.825
So of course, or the
reflective picture.

00:34:07.825 --> 00:34:08.929
But let's say it's above.

00:34:08.929 --> 00:34:10.610
It's U is negated.

00:34:10.610 --> 00:34:12.790
So in general, we have a
bunch of connections up.

00:34:12.790 --> 00:34:14.610
We have a bunch of
connections down.

00:34:14.610 --> 00:34:17.270
This one is somewhere
in the middle.

00:34:17.270 --> 00:34:19.000
These bold lines are
just to distinguish

00:34:19.000 --> 00:34:21.666
these are the ones to the right,
these are the ones to the left.

00:34:21.666 --> 00:34:23.650
They don't mean
negation, necessarily.

00:34:23.650 --> 00:34:25.489
Because this one
should be negated.

00:34:25.489 --> 00:34:25.989
OK.

00:34:25.989 --> 00:34:29.060
So we're just going to
replace it like this.

00:34:29.060 --> 00:34:32.049
This is the trick that we
saw in the right and bottom

00:34:32.049 --> 00:34:33.340
corner of the crossover gadget.

00:34:33.340 --> 00:34:35.909
We're going to duplicate
xi, way except we'll

00:34:35.909 --> 00:34:37.260
negate it at the same time.

00:34:37.260 --> 00:34:40.909
So the other one had a negation
here and one negation here,

00:34:40.909 --> 00:34:42.080
not here.

00:34:42.080 --> 00:34:47.022
This xi or a, together with
xi bar or a bar-- again,

00:34:47.022 --> 00:34:47.980
these are 2SAT clauses.

00:34:47.980 --> 00:34:52.520
You have to duplicate
an edge to make it 3SAT.

00:34:52.520 --> 00:34:56.239
That forces xi to
be not a, I think.

00:34:56.239 --> 00:34:58.753
Maybe I even have
that as a fate.

00:34:58.753 --> 00:35:00.710
OK, xi is not equal to a.

00:35:00.710 --> 00:35:04.370
Similarly, a does not equal
b, which means b equals xi.

00:35:04.370 --> 00:35:04.870
OK?

00:35:04.870 --> 00:35:08.920
So we just duplicated xi to be
used in all the old scenarios.

00:35:08.920 --> 00:35:10.720
And maybe these guys
still all go down.

00:35:10.720 --> 00:35:13.250
We could move some of them
over here if we wanted to.

00:35:13.250 --> 00:35:15.000
The ones to the left
have to be over here.

00:35:15.000 --> 00:35:17.120
The ones to the right
have to be over here.

00:35:17.120 --> 00:35:20.280
This one gets to use
a negated copy of xi.

00:35:20.280 --> 00:35:23.870
So boom, one negation down.

00:35:23.870 --> 00:35:25.760
One negation that was
on the wrong side.

00:35:25.760 --> 00:35:29.816
Repeat this n times.

00:35:29.816 --> 00:35:31.815
Where you have a negation
you're not supposed to

00:35:31.815 --> 00:35:33.981
and everywhere you don't
have a negation that you're

00:35:33.981 --> 00:35:36.006
supposed to, apply this trick.

00:35:36.006 --> 00:35:37.630
You'll increase the
number of variables

00:35:37.630 --> 00:35:40.360
by some constant factor.

00:35:40.360 --> 00:35:42.090
And now you're in
the monotone case.

00:35:42.090 --> 00:35:43.810
So that's actually really easy.

00:35:43.810 --> 00:35:45.920
It's our first proof that
monotone 3SAT is hard.

00:35:45.920 --> 00:35:47.650
But it's a pretty easy one.

00:35:47.650 --> 00:35:48.689
Yeah?

00:35:48.689 --> 00:35:50.480
AUDIENCE: Can we use
a similar construction

00:35:50.480 --> 00:35:53.210
to recover splitting the
variables into literals?

00:35:56.210 --> 00:35:58.030
PROFESSOR: Oh, to do this?

00:35:58.030 --> 00:35:59.230
AUDIENCE: Yeah.

00:35:59.230 --> 00:36:03.002
Because we dropped that when
we moved over here, right?

00:36:03.002 --> 00:36:04.960
AUDIENCE: But you said
it was just [INAUDIBLE].

00:36:04.960 --> 00:36:06.567
PROFESSOR: Well, we sort of did.

00:36:06.567 --> 00:36:09.150
No, actually, this is supposed
to be a generalization of this,

00:36:09.150 --> 00:36:11.910
because you could just
split apart-- I mean, you

00:36:11.910 --> 00:36:14.700
can carve vi in half
to the positive side

00:36:14.700 --> 00:36:16.400
and the negative side.

00:36:16.400 --> 00:36:18.200
And all the negative
sides are below,

00:36:18.200 --> 00:36:20.310
and all the positive
sides are above.

00:36:20.310 --> 00:36:23.170
So yeah, we could
already do that.

00:36:26.450 --> 00:36:26.950
Right.

00:36:26.950 --> 00:36:29.870
Because this was not
about having them--

00:36:29.870 --> 00:36:34.445
it was about having the vertices
labeled as literals instead of

00:36:34.445 --> 00:36:35.020
as variables.

00:36:35.020 --> 00:36:37.660
So we don't need to explicitly
say that this one does not

00:36:37.660 --> 00:36:38.430
equal that one.

00:36:38.430 --> 00:36:40.410
That's already in the problem.

00:36:40.410 --> 00:36:43.000
So we can combine all of
the things I've said so far.

00:36:43.000 --> 00:36:46.810
That may not always be the case,
but so far, we can combine all.

00:36:46.810 --> 00:36:47.310
Yeah?

00:36:47.310 --> 00:36:48.351
AUDIENCE: Silly question.

00:36:48.351 --> 00:36:50.910
If we're carving them into
positive side of the variable

00:36:50.910 --> 00:36:52.170
on one side and negative
on the other side,

00:36:52.170 --> 00:36:53.770
wouldn't that make
all the connections

00:36:53.770 --> 00:36:55.620
below that positive
connections instead

00:36:55.620 --> 00:36:57.270
of negative connections?

00:36:57.270 --> 00:36:58.240
PROFESSOR: Sorry.

00:36:58.240 --> 00:37:00.830
I don't mean split it in
the way of that diagram.

00:37:00.830 --> 00:37:03.480
I mean that we
could, in this sense,

00:37:03.480 --> 00:37:06.910
we could have vertices
represent a positive vi

00:37:06.910 --> 00:37:09.077
and a negative vi, and
have the connections.

00:37:09.077 --> 00:37:10.660
This was saying that
we could separate

00:37:10.660 --> 00:37:12.850
the positive connections
from the negative ones.

00:37:12.850 --> 00:37:15.300
And I'm just saying we
already have that here.

00:37:15.300 --> 00:37:17.730
This is a stronger property
to say that they're also

00:37:17.730 --> 00:37:19.086
all in the same direction.

00:37:19.086 --> 00:37:20.710
If you just had this
property, then you

00:37:20.710 --> 00:37:23.520
could have some white
here and some white here,

00:37:23.520 --> 00:37:24.962
and red here and red here.

00:37:24.962 --> 00:37:26.920
But this is saying you
can get them all aligned

00:37:26.920 --> 00:37:29.831
in the right direction.

00:37:29.831 --> 00:37:30.330
Yeah.

00:37:30.330 --> 00:37:38.992
In fact, if we look
at this diagram,

00:37:38.992 --> 00:37:40.700
maybe you didn't
understand this diagram,

00:37:40.700 --> 00:37:44.360
but it has the same issue.

00:37:44.360 --> 00:37:46.050
Or this is exactly
that kind of picture.

00:37:46.050 --> 00:37:47.470
So here we have a5.

00:37:47.470 --> 00:37:50.330
The positive is over here,
the negative is over here.

00:37:50.330 --> 00:37:51.200
Here we have a4.

00:37:51.200 --> 00:37:53.640
The negative is there,
and the positive is there.

00:37:53.640 --> 00:37:56.284
So this was getting
the weaker property.

00:37:56.284 --> 00:37:57.950
Again, you don't have
to worry about it,

00:37:57.950 --> 00:38:00.980
because we got the stronger one.

00:38:00.980 --> 00:38:02.650
But that's just to
show that there's

00:38:02.650 --> 00:38:05.880
a difference between the two.

00:38:05.880 --> 00:38:07.860
Good.

00:38:07.860 --> 00:38:13.840
So that was planar
monotone rectilinear 3SAT.

00:38:13.840 --> 00:38:14.470
OK.

00:38:14.470 --> 00:38:20.475
I have a governor
general's warning.

00:38:26.070 --> 00:38:28.490
So here's another problem.

00:38:28.490 --> 00:38:29.955
Suppose we have
the variable cycle.

00:38:35.290 --> 00:38:39.370
And I say, well, every
clause is inside the cycle.

00:38:39.370 --> 00:38:42.990
And you are free to have
positive and negative

00:38:42.990 --> 00:38:43.490
connections.

00:38:49.260 --> 00:38:50.670
It's going to get hard.

00:38:50.670 --> 00:38:51.370
OK.

00:38:51.370 --> 00:38:53.900
Something like that.

00:38:53.900 --> 00:38:56.000
And it's planar.

00:38:56.000 --> 00:38:59.520
That problem is
polynomially solvable.

00:38:59.520 --> 00:39:02.440
So I'll rephrase this.

00:39:02.440 --> 00:39:22.140
If all the clauses are on one
side, of the variable cycle,

00:39:22.140 --> 00:39:25.630
then that version of 3SAT
is polynomially solvable.

00:39:25.630 --> 00:39:29.800
And the intuition is that
this kind of nesting structure

00:39:29.800 --> 00:39:32.700
is essentially a tree.

00:39:32.700 --> 00:39:35.335
If you look at what
nests inside of what,

00:39:35.335 --> 00:39:38.550
what clauses fall
underneath other clauses,

00:39:38.550 --> 00:39:42.460
that is a nesting relation,
which corresponds to a tree.

00:39:42.460 --> 00:39:45.530
And then you just do dynamic
programming over the tree.

00:39:45.530 --> 00:39:46.860
That's easy.

00:39:46.860 --> 00:39:48.930
The sort of surprising
thing is that just

00:39:48.930 --> 00:39:51.640
having two of these trees, one
on the inside of the cycle, one

00:39:51.640 --> 00:39:54.215
on the outside, is enough
to make the problem hard.

00:39:54.215 --> 00:39:55.590
That's a typical
thing, actually,

00:39:55.590 --> 00:39:58.340
because the trees interdigitate.

00:39:58.340 --> 00:40:00.240
They have no real
relation to each other,

00:40:00.240 --> 00:40:02.240
and there's no way to
keep track of both of them

00:40:02.240 --> 00:40:05.500
simultaneously with the dynamic
program unless P equals mp.

00:40:10.080 --> 00:40:10.580
OK.

00:40:10.580 --> 00:40:12.319
So that's one gotcha
to be careful of.

00:40:12.319 --> 00:40:13.860
So when you're doing
your reductions,

00:40:13.860 --> 00:40:16.380
you have to worry about things
above the line and things

00:40:16.380 --> 00:40:17.050
below the line.

00:40:20.850 --> 00:40:23.640
Also, here's a
special case of this.

00:40:41.950 --> 00:40:44.670
Suppose I phrase the
following problem.

00:40:44.670 --> 00:40:47.690
I want the bipartite graph
on variables versus clauses,

00:40:47.690 --> 00:40:52.110
plus the cycle v1
through vn back to v1,

00:40:52.110 --> 00:40:56.460
plus another cycle on the
clause's c1 to cn and back

00:40:56.460 --> 00:40:56.990
to c1.

00:40:56.990 --> 00:41:01.010
I want that whole
graph to be planar.

00:41:01.010 --> 00:41:03.070
OK?

00:41:03.070 --> 00:41:04.820
If you think about
that for a second, that

00:41:04.820 --> 00:41:06.990
would imply all the
clauses are on one side

00:41:06.990 --> 00:41:08.442
of the variable cycle.

00:41:08.442 --> 00:41:10.150
And so we're in this
case, which is easy.

00:41:10.150 --> 00:41:12.225
So this is a special
case of that case.

00:41:12.225 --> 00:41:15.650
Now, this one I mentioned,
because if this were hard,

00:41:15.650 --> 00:41:16.910
life would be so easy.

00:41:16.910 --> 00:41:18.230
It's not so life isn't easy.

00:41:18.230 --> 00:41:21.140
But you already knew that.

00:41:21.140 --> 00:41:25.270
Recall, say, proving
push-1 is hard in 2D.

00:41:25.270 --> 00:41:28.389
Well, first we did it in 3D and
then we had a crossover gadget.

00:41:28.389 --> 00:41:30.430
And most of the work was
in the crossover gadget.

00:41:30.430 --> 00:41:32.530
The base proof was
trivial or very easy.

00:41:36.180 --> 00:41:38.850
So we can get all of these
connections between variables

00:41:38.850 --> 00:41:40.560
and clauses to be planar.

00:41:40.560 --> 00:41:42.870
We can get all of these
connections, the variables

00:41:42.870 --> 00:41:45.510
in a line, to be
planar together,

00:41:45.510 --> 00:41:46.980
all of those things together.

00:41:46.980 --> 00:41:51.040
But we cannot also have a path
connecting all the clauses

00:41:51.040 --> 00:41:51.660
together.

00:41:51.660 --> 00:41:52.420
Even a path.

00:41:52.420 --> 00:41:58.840
So I said a path here,
which is what we want.

00:41:58.840 --> 00:42:00.847
So that's annoying,
because if we

00:42:00.847 --> 00:42:02.430
could make all of
these things planar,

00:42:02.430 --> 00:42:04.840
we wouldn't have to worry
about these crossovers.

00:42:04.840 --> 00:42:07.960
Same thing with all the Nintendo
proofs, like Super Mario

00:42:07.960 --> 00:42:09.570
Brothers again.

00:42:09.570 --> 00:42:13.170
The player is going from
one variable to the next,

00:42:13.170 --> 00:42:16.320
so you need those edges
connecting all the variables

00:42:16.320 --> 00:42:17.142
in a path.

00:42:17.142 --> 00:42:18.850
You need the edges
connecting the clauses

00:42:18.850 --> 00:42:20.740
in a path for the final check.

00:42:20.740 --> 00:42:22.620
So planar 3SAT
basically doesn't buy

00:42:22.620 --> 00:42:24.550
you anything in these proofs.

00:42:24.550 --> 00:42:28.330
Now, if we could somehow avoid
adding these connections,

00:42:28.330 --> 00:42:30.000
everything else could be planar.

00:42:30.000 --> 00:42:31.940
That's sort of the
point of planar 3SAT.

00:42:31.940 --> 00:42:33.690
So if you can avoid
these things--

00:42:33.690 --> 00:42:35.898
and there are a lot of games
where that would happen.

00:42:35.898 --> 00:42:37.896
Just you have to
get a point here,

00:42:37.896 --> 00:42:39.520
and it's just added
to your total score

00:42:39.520 --> 00:42:42.440
in some Never Never
Land not in the plane,

00:42:42.440 --> 00:42:46.950
then life would be much easier,
because you wouldn't need

00:42:46.950 --> 00:42:49.570
a crossover gadget,
because you can just

00:42:49.570 --> 00:42:52.170
reduce from planar 3SAT.

00:42:52.170 --> 00:42:53.702
OK?

00:42:53.702 --> 00:42:55.160
That should give
you some intuition

00:42:55.160 --> 00:42:57.460
why we care about
planar 3SAT, but also

00:42:57.460 --> 00:42:59.825
why we didn't use it
for those problems.

00:42:59.825 --> 00:43:01.200
As far as we know,
there's no way

00:43:01.200 --> 00:43:04.015
to use planar 3SAT and make a
simpler Super Mario Brothers

00:43:04.015 --> 00:43:04.765
proof or whatever.

00:43:08.660 --> 00:43:10.990
OK.

00:43:10.990 --> 00:43:14.030
So next topic.

00:43:25.000 --> 00:43:30.350
We will see some
planar 3SAT proofs,

00:43:30.350 --> 00:43:31.579
reductions from planar 3SAT.

00:43:31.579 --> 00:43:33.870
But let me first tell you
about other versions of 3SAT.

00:43:33.870 --> 00:43:36.078
Remember there are three
main versions-- planar 3SAT,

00:43:36.078 --> 00:43:38.460
planar 1-in-3SAT, and-- sorry.

00:43:38.460 --> 00:43:41.550
There are three versions
of 3SAT-- 3SAT, 1-in-3SAT,

00:43:41.550 --> 00:43:43.180
and Not All Equal SAT.

00:43:43.180 --> 00:43:47.760
Turns out 1-in-3SAT is hard
when its graphs are planar.

00:43:47.760 --> 00:43:50.680
Not All Equal SAT is easy
when graphs are planar.

00:43:50.680 --> 00:43:53.131
So I will show you both.

00:43:53.131 --> 00:43:54.630
AUDIENCE: For this
easy case, do you

00:43:54.630 --> 00:43:56.463
have to have both the
variables in the cycle

00:43:56.463 --> 00:43:58.280
and a clauses in a cycle?

00:43:58.280 --> 00:44:01.380
Or is it just like seeing the
clauses in a path or cycle

00:44:01.380 --> 00:44:04.410
immediately triggers
this easy condition?

00:44:04.410 --> 00:44:07.640
PROFESSOR: So I don't know.

00:44:07.640 --> 00:44:09.570
I think if the
clauses are in a path

00:44:09.570 --> 00:44:12.290
and the variables are
not connected at all,

00:44:12.290 --> 00:44:13.730
it should still be hard.

00:44:13.730 --> 00:44:15.360
But I couldn't find
a proof of that.

00:44:15.360 --> 00:44:17.580
It's just a vague recollection.

00:44:17.580 --> 00:44:20.020
So I'm pretty sure if
variables are in a path

00:44:20.020 --> 00:44:22.890
and clauses are in a path,
then that's enough to be toast.

00:44:22.890 --> 00:44:25.132
But all I proved here was cycle.

00:44:25.132 --> 00:44:26.340
But I think a path is enough.

00:44:26.340 --> 00:44:29.466
It will still
behave like a tree.

00:44:29.466 --> 00:44:29.965
Mm.

00:44:29.965 --> 00:44:30.600
Maybe not.

00:44:30.600 --> 00:44:33.691
I'm not sure.

00:44:33.691 --> 00:44:34.190
Yeah.

00:44:34.190 --> 00:44:36.030
So it's a good question.

00:44:36.030 --> 00:44:36.730
All right.

00:44:36.730 --> 00:44:38.710
Let's do planar 1-in-3SAT.

00:44:38.710 --> 00:44:41.440
So it's pretty much
the same thing.

00:44:41.440 --> 00:44:43.280
I won't duplicate
all of the text here.

00:44:43.280 --> 00:44:48.520
We take the bipartite graph
of variables versus clauses.

00:44:48.520 --> 00:44:53.210
And we also add
a path, or cycle,

00:44:53.210 --> 00:44:55.850
connecting all the variables.

00:44:55.850 --> 00:44:59.150
And that graph should be planar.

00:44:59.150 --> 00:45:03.580
And otherwise, it's
1-in-3SAT, exactly 1-in-3SAT.

00:45:03.580 --> 00:45:05.790
So here's the proof.

00:45:05.790 --> 00:45:08.902
It's one of the easiest
proofs we'll cover.

00:45:08.902 --> 00:45:09.985
Suppose you have a clause.

00:45:14.470 --> 00:45:20.260
It's a reduction from planar
3SAT to planar 1-in-3SAT.

00:45:20.260 --> 00:45:21.470
OK?

00:45:21.470 --> 00:45:25.200
So this is also our first
proof of 1-in-3SAT being hard.

00:45:25.200 --> 00:45:28.580
We are going to take
a regular 3SAT clause

00:45:28.580 --> 00:45:32.520
and turn it into three
1-in-3SAT clauses.

00:45:32.520 --> 00:45:35.929
And that transformation
preserves planarity, so done.

00:45:35.929 --> 00:45:37.720
So all of our proofs
are going to just keep

00:45:37.720 --> 00:45:38.720
building up in this way.

00:45:38.720 --> 00:45:40.440
We've already proved
this problem's hard

00:45:40.440 --> 00:45:42.100
when the graph is planar.

00:45:42.100 --> 00:45:44.576
So let's do this.

00:45:44.576 --> 00:45:45.950
At least one of
them should be 1.

00:45:45.950 --> 00:45:47.241
We don't want them all to be 0.

00:45:47.241 --> 00:45:50.200
So let's try when they're all 0,
see if something should break.

00:45:50.200 --> 00:45:52.730
Let's say this variable
is 0, easier to reach.

00:45:52.730 --> 00:45:58.380
So that makes this
guy satisfied,

00:45:58.380 --> 00:46:00.250
which means both of
these must be false.

00:46:00.250 --> 00:46:01.730
This variable's
just hanging out.

00:46:01.730 --> 00:46:04.180
It's just to make
everything degree three.

00:46:04.180 --> 00:46:09.680
So if this is 0, this
is 1, so this must be 0.

00:46:09.680 --> 00:46:10.970
So this is 0.

00:46:10.970 --> 00:46:12.290
This is 0.

00:46:12.290 --> 00:46:14.720
That means exactly one
of these should be 1.

00:46:14.720 --> 00:46:16.870
If cp is 1, obviously,
we're happy.

00:46:16.870 --> 00:46:19.065
But this will end up
forcing this guy to be 0.

00:46:19.065 --> 00:46:19.680
Or sorry.

00:46:19.680 --> 00:46:22.660
Actually, it'll leave this
guy free to do whatever.

00:46:22.660 --> 00:46:28.650
So if this is 0, 0, 0,
then this must be 1.

00:46:28.650 --> 00:46:29.910
This is 1.

00:46:29.910 --> 00:46:30.480
This is 1.

00:46:30.480 --> 00:46:31.920
Therefore, both of these are 0.

00:46:31.920 --> 00:46:35.780
If zr bar is 0, that
must mean this one is 1.

00:46:35.780 --> 00:46:39.520
So if both of these were 0,
it forced this guy to be a 1.

00:46:39.520 --> 00:46:43.175
If this was 0 and this is
1, for example, this is 1.

00:46:45.750 --> 00:46:49.020
Then this must be 0/ OK.

00:46:49.020 --> 00:46:50.220
This is 0.

00:46:50.220 --> 00:46:52.320
But we're free to set
either one of these to 1.

00:46:52.320 --> 00:46:55.420
So zr is free, which
is what we want to do.

00:46:55.420 --> 00:46:56.700
We're simulating regular 3SAT.

00:46:56.700 --> 00:46:58.684
If this is 1, then
both of these guys

00:46:58.684 --> 00:47:00.350
should be able to do
whatever they want.

00:47:00.350 --> 00:47:03.150
And that's what these
guys let you do.

00:47:03.150 --> 00:47:04.840
They're free floating.

00:47:04.840 --> 00:47:07.170
This guy can toggle if
it's not constrained

00:47:07.170 --> 00:47:08.940
to be the only guy that's 1.

00:47:08.940 --> 00:47:09.850
Yeah?

00:47:09.850 --> 00:47:13.450
AUDIENCE: What's the
dashed line represent?

00:47:13.450 --> 00:47:16.102
PROFESSOR: Dashed line is
the outline of the gadget.

00:47:16.102 --> 00:47:20.750
It's just saying you replace
that blob with this blob.

00:47:20.750 --> 00:47:22.945
I mean, slightly
more formally, I

00:47:22.945 --> 00:47:24.320
think it's saying
something like,

00:47:24.320 --> 00:47:26.952
if you contract this to a
point or if you contract this

00:47:26.952 --> 00:47:28.910
to a point, then it's
exactly the same diagram.

00:47:28.910 --> 00:47:30.451
So it's one way to
argue you preserve

00:47:30.451 --> 00:47:32.170
planarity, something like that.

00:47:35.150 --> 00:47:37.630
So ignore it, basically.

00:47:37.630 --> 00:47:40.310
Now, I guess you
would have to argue

00:47:40.310 --> 00:47:44.482
that you can still have a path
that visits all the variables.

00:47:44.482 --> 00:47:45.190
Another question?

00:47:45.190 --> 00:47:46.174
AUDIENCE: Yeah.

00:47:46.174 --> 00:47:50.632
What's preventing you from
setting all three to false?

00:47:50.632 --> 00:47:52.590
PROFESSOR: That is one
of the cases I just did.

00:47:52.590 --> 00:47:57.550
If these two are false,
then these have to be true.

00:47:57.550 --> 00:47:58.520
No, sorry.

00:47:58.520 --> 00:47:59.480
These have to be 0.

00:47:59.480 --> 00:48:00.920
So these are both 0.

00:48:00.920 --> 00:48:04.030
And then this has to
be a 1 or satisfy this.

00:48:06.650 --> 00:48:08.820
It's easy to get confused,
because that one is 3SAT,

00:48:08.820 --> 00:48:10.130
this one is 1-in-3SAT.

00:48:10.130 --> 00:48:13.490
So these all have
exactly 1 constraints.

00:48:13.490 --> 00:48:14.740
OK.

00:48:14.740 --> 00:48:16.960
Now, this proof has negations.

00:48:16.960 --> 00:48:20.380
And you may recall
that monotone--

00:48:20.380 --> 00:48:23.150
I'm going to switch to saying
positive 1-in-3SAT where you

00:48:23.150 --> 00:48:25.720
have no negations is also hard.

00:48:25.720 --> 00:48:32.980
So we can also define
planar positive 1-in-3SAT.

00:48:40.170 --> 00:48:45.110
This is also hard by a slightly
more complicated proof,

00:48:45.110 --> 00:48:47.000
more recent proof also.

00:48:47.000 --> 00:48:51.380
Surprisingly, this planar
monotone rectilinear 3SAT,

00:48:51.380 --> 00:48:54.290
or just planar monotone
3SAT, is also very recent.

00:48:54.290 --> 00:48:55.960
I think 2010.

00:48:55.960 --> 00:48:58.560
So a lot of these
just fell recently

00:48:58.560 --> 00:49:02.270
but are a natural culmination
of all these simplifications.

00:49:02.270 --> 00:49:04.450
So this is a version
that-- well, these

00:49:04.450 --> 00:49:06.090
are some gadgets, actually.

00:49:06.090 --> 00:49:09.010
This is one way to force
the two variables to have

00:49:09.010 --> 00:49:11.770
opposite values and force
the two variables to have

00:49:11.770 --> 00:49:16.340
equal values, using--
I guess this is really

00:49:16.340 --> 00:49:21.730
planar positive
rectilinear 1-in-3SAT.

00:49:21.730 --> 00:49:23.810
It's the 1-in-3SAT
version of this problem.

00:49:23.810 --> 00:49:25.640
So again, variables
are on the x-axis.

00:49:25.640 --> 00:49:27.570
Everything above is
implicitly all positive.

00:49:27.570 --> 00:49:29.835
Everything below is
implicitly all negative.

00:49:29.835 --> 00:49:31.360
Oh, sorry.

00:49:31.360 --> 00:49:33.056
Here, everything
is all positive.

00:49:33.056 --> 00:49:33.986
Yeah?

00:49:33.986 --> 00:49:35.486
AUDIENCE: Another
nice thing to note

00:49:35.486 --> 00:49:36.944
about that particular
construction

00:49:36.944 --> 00:49:39.860
is that each of the variables
in the clauses are unique,

00:49:39.860 --> 00:49:40.832
so it's exactly 3.

00:49:40.832 --> 00:49:44.234
And they're all
unique, which someone

00:49:44.234 --> 00:49:45.514
was asking about before.

00:49:45.514 --> 00:49:46.180
PROFESSOR: Good.

00:49:46.180 --> 00:49:51.660
So in this construction,
1-in-3SAT, all of the clauses

00:49:51.660 --> 00:49:53.900
do not repeat any variables.

00:49:53.900 --> 00:49:56.000
Exactly three
distinct guys, yeah.

00:49:56.000 --> 00:50:00.250
AUDIENCE: So to be clear,
this problem is hard,

00:50:00.250 --> 00:50:06.780
but in this terminology, planar
positive rectilinear 3SAT,

00:50:06.780 --> 00:50:10.440
not 1-in-3SAT, is easy.

00:50:10.440 --> 00:50:13.420
Because if everything was
on one side of the line--

00:50:13.420 --> 00:50:16.550
PROFESSOR: I mean,
positive 3SAT is easy.

00:50:16.550 --> 00:50:20.372
You set all the
variables to true.

00:50:20.372 --> 00:50:21.330
AUDIENCE: I'm confused.

00:50:21.330 --> 00:50:23.004
Positive means that--

00:50:23.004 --> 00:50:25.170
PROFESSOR: Positive is sort
of the 1-in-3SAT version

00:50:25.170 --> 00:50:25.910
of monotone.

00:50:25.910 --> 00:50:29.260
So 3SAT monotone
means every clause is

00:50:29.260 --> 00:50:30.770
all positive or all negative.

00:50:30.770 --> 00:50:34.070
In 1-in-3SAT, you just
need everything positive.

00:50:34.070 --> 00:50:35.051
And it's still hard.

00:50:35.051 --> 00:50:36.925
But with 3SAT, that
doesn't work, because you

00:50:36.925 --> 00:50:38.800
can set everything to true.

00:50:38.800 --> 00:50:43.090
1-in-3SAT requires
some false things.

00:50:43.090 --> 00:50:45.320
So it's sort of the analog.

00:50:45.320 --> 00:50:49.650
This is sometimes called planar
monotone rectilinear 1-in-3SAT.

00:50:49.650 --> 00:50:53.130
But to avoid confusion, because
they are somewhat different,

00:50:53.130 --> 00:50:54.580
I'm calling it positive.

00:50:54.580 --> 00:50:56.550
I think this paper
actually calls it positive,

00:50:56.550 --> 00:50:58.250
which makes me happy.

00:50:58.250 --> 00:51:01.560
Anyway, you can check these
gadgets that they force.

00:51:01.560 --> 00:51:04.790
In particular here, you're
basically forcing a to b 0

00:51:04.790 --> 00:51:06.880
by this little construction.

00:51:06.880 --> 00:51:08.930
You can see as 1.

00:51:08.930 --> 00:51:12.520
Therefore, this clause
forces exactly one of these

00:51:12.520 --> 00:51:13.936
to be true, the
other to be false.

00:51:13.936 --> 00:51:15.352
So it forces them
to be different.

00:51:15.352 --> 00:51:17.140
You repeat that twice,
you get equality.

00:51:17.140 --> 00:51:18.250
Then you do this.

00:51:21.840 --> 00:51:24.670
First, you get rid
of all negations,

00:51:24.670 --> 00:51:26.100
because you have
this way to force

00:51:26.100 --> 00:51:28.270
two things to be different.

00:51:28.270 --> 00:51:30.110
These Xed out ones
are the red lines.

00:51:30.110 --> 00:51:32.950
Those are connected
to negated copies.

00:51:32.950 --> 00:51:35.850
You just duplicate the
variable in negated form

00:51:35.850 --> 00:51:37.860
and then use a wire there.

00:51:37.860 --> 00:51:39.670
So this wire
becomes that one. x2

00:51:39.670 --> 00:51:42.150
is different from x1.
x3 is different from x2.

00:51:42.150 --> 00:51:43.190
So it's equal to x1.

00:51:43.190 --> 00:51:45.050
Same trick we saw before.

00:51:45.050 --> 00:51:46.320
Now you have no negations.

00:51:46.320 --> 00:51:50.340
So now this type of
clause is a 3SAT clause.

00:51:50.340 --> 00:51:51.460
It's a little weird.

00:51:51.460 --> 00:51:54.187
Right of the arrows, these
are 1-in-3SAT clauses.

00:51:54.187 --> 00:51:56.020
Left of the arrows are
regular 3SAT clauses.

00:51:56.020 --> 00:51:58.430
So we replace this
with this construction.

00:52:02.834 --> 00:52:04.750
It's sort of like the
old one but a little bit

00:52:04.750 --> 00:52:06.242
spread out, with
the duplications,

00:52:06.242 --> 00:52:08.885
with these equal gadgets.

00:52:08.885 --> 00:52:11.260
We get a copy of x over here.

00:52:11.260 --> 00:52:13.820
That's so that if we have
more connections below,

00:52:13.820 --> 00:52:17.570
we can easily access x still.

00:52:17.570 --> 00:52:21.030
And yeah.

00:52:21.030 --> 00:52:25.717
These 1-in-3 gadgets
constrain this.

00:52:25.717 --> 00:52:27.050
Yeah, there is an equal gadget--

00:52:27.050 --> 00:52:27.470
AUDIENCE: The equals
and not equals

00:52:27.470 --> 00:52:29.159
are not part of the
problem, they're

00:52:29.159 --> 00:52:30.700
just referring to
the earlier gadget.

00:52:30.700 --> 00:52:30.946
PROFESSOR: No.

00:52:30.946 --> 00:52:31.445
Right.

00:52:31.445 --> 00:52:33.580
That's shorthand
for these gadgets.

00:52:33.580 --> 00:52:35.750
So you would plug in
each of those things

00:52:35.750 --> 00:52:37.640
into those little pictures.

00:52:37.640 --> 00:52:38.140
Yeah.

00:52:40.460 --> 00:52:40.960
OK.

00:52:40.960 --> 00:52:43.070
So let's skip those details.

00:52:43.070 --> 00:52:48.840
But you get that planar positive
rectilinear 1-in-3SAT is hard.

00:52:48.840 --> 00:52:52.361
And that was 2008.

00:52:52.361 --> 00:52:52.860
Cool.

00:52:56.640 --> 00:53:06.590
Let's do planar
Not All Equal 3SAT.

00:53:09.670 --> 00:53:10.650
This is polynomial.

00:53:10.650 --> 00:53:13.020
Important thing to remember--
in the planar world,

00:53:13.020 --> 00:53:16.820
you have to be careful
with all sorts of things.

00:53:16.820 --> 00:53:19.400
It would be nice to have
a Schaefer-type dichotomy

00:53:19.400 --> 00:53:23.610
theorem for planar graphs, but I
don't know of any such theorem.

00:53:23.610 --> 00:53:26.465
So meanwhile, this is the
sort of main characterization.

00:53:26.465 --> 00:53:28.820
You have those three
standard problems.

00:53:28.820 --> 00:53:30.920
This one falls in
the planar case.

00:53:30.920 --> 00:53:31.980
Same setup.

00:53:31.980 --> 00:53:34.680
We have Not All Equal
clauses and the connections

00:53:34.680 --> 00:53:38.720
between those and the
variables negated or not.

00:53:38.720 --> 00:53:42.690
Even when you allow negations,
this problem is polynomial.

00:53:42.690 --> 00:53:46.889
The fun thing is the proof of
this theorem is a reduction,

00:53:46.889 --> 00:53:48.680
and it looks exactly
like a hardness proof.

00:53:48.680 --> 00:53:51.170
I mean-- [LAUGHS]
It just happens

00:53:51.170 --> 00:53:55.330
to be from this problem to a
known polynomial time problem,

00:53:55.330 --> 00:53:58.010
namely, planar max cut.

00:53:58.010 --> 00:54:00.810
So we're going to
reduce to-- this

00:54:00.810 --> 00:54:06.370
is one of the few times we will
reduce to something-- planar

00:54:06.370 --> 00:54:08.370
max cut.

00:54:08.370 --> 00:54:10.620
So max cut is I
give you a graph,

00:54:10.620 --> 00:54:13.340
and I want to color the
vertices two different colors.

00:54:13.340 --> 00:54:15.640
Think of them as the
two sides of a cut.

00:54:15.640 --> 00:54:16.866
Say red and blue.

00:54:16.866 --> 00:54:18.240
And I want to
maximize the number

00:54:18.240 --> 00:54:21.510
of edges that are red, blue.

00:54:21.510 --> 00:54:27.280
So I want to maximize the number
of, here, white-black edges,

00:54:27.280 --> 00:54:29.080
bichromatic edges.

00:54:29.080 --> 00:54:29.887
That's max cut.

00:54:29.887 --> 00:54:32.220
In general graphs, that's
NP-hard, but in planar graphs,

00:54:32.220 --> 00:54:35.460
it's easy, because if you
look at the dual graph

00:54:35.460 --> 00:54:38.210
and then solve the Chinese
postman tour problem, which

00:54:38.210 --> 00:54:40.670
is the shortest path that
visits all of the edges at least

00:54:40.670 --> 00:54:42.520
once, which you can
do in polynomial time

00:54:42.520 --> 00:54:46.930
by perfect matching and a
bipartite null in a cleek.

00:54:46.930 --> 00:54:49.350
Anyway, you do that.

00:54:49.350 --> 00:54:52.740
And then all the edges that
you double are not in the cut,

00:54:52.740 --> 00:54:53.240
I think.

00:54:53.240 --> 00:54:55.710
And all the edges that you
don't double in that tour

00:54:55.710 --> 00:55:00.090
are in the max cut.

00:55:00.090 --> 00:55:01.040
Fun fact.

00:55:01.040 --> 00:55:04.490
So this is a known fact.

00:55:04.490 --> 00:55:05.970
Planar max cut is easy.

00:55:05.970 --> 00:55:09.660
So if we reduce from planar
Not Equal 3SAT to max cut,

00:55:09.660 --> 00:55:10.730
the problem is easy.

00:55:10.730 --> 00:55:11.850
And here's the proof.

00:55:11.850 --> 00:55:16.720
It's got a variable gadget and
a Not All Equal clause gadget.

00:55:16.720 --> 00:55:20.370
So we want to represent
Not All Equal.

00:55:20.370 --> 00:55:23.080
And so the idea is we're
going to represent a variable

00:55:23.080 --> 00:55:25.550
with this alternating chain.

00:55:25.550 --> 00:55:27.970
And if you want to maximize
the number of red-blue edges,

00:55:27.970 --> 00:55:30.137
you should alternate, because
this have even length.

00:55:30.137 --> 00:55:31.761
If you don't alternate
anywhere, you're

00:55:31.761 --> 00:55:33.160
going to not get as many edges.

00:55:33.160 --> 00:55:36.382
In general, we'll say,
well, the target cut

00:55:36.382 --> 00:55:38.340
size you're trying to
get, the decision problem

00:55:38.340 --> 00:55:40.640
is, is there a cut of
size at least something?

00:55:40.640 --> 00:55:42.880
The something is going to
be, in particular, it's

00:55:42.880 --> 00:55:44.921
going to be a sum of
things, but for this gadget,

00:55:44.921 --> 00:55:46.710
it is two times the
number of occurrences

00:55:46.710 --> 00:55:50.510
that the variable would
say, or basically the length

00:55:50.510 --> 00:55:52.549
of this cycle.

00:55:52.549 --> 00:55:54.090
We'll just make the
cycle big enough,

00:55:54.090 --> 00:55:57.930
so we get lots of copies of
xi, lots of copies of xi bar.

00:55:57.930 --> 00:56:00.300
So this is one possible setting.

00:56:00.300 --> 00:56:04.370
If blue means true, this is like
saying that we set xi to true.

00:56:04.370 --> 00:56:05.400
We could do the reverse.

00:56:05.400 --> 00:56:09.910
We could set xi to false
and set xi bar to true.

00:56:09.910 --> 00:56:11.260
But they have to be opposites.

00:56:11.260 --> 00:56:14.090
So now we have-- this is
basically a split gadget.

00:56:14.090 --> 00:56:19.060
We have several copies
of xi and xi bar.

00:56:19.060 --> 00:56:21.860
Then we're going to connect them
with this Not All Equal clause,

00:56:21.860 --> 00:56:24.330
which is just a triangle.

00:56:24.330 --> 00:56:28.380
And the idea is if these
are-- so this is really

00:56:28.380 --> 00:56:31.260
a negated version of xi,
but it doesn't matter.

00:56:31.260 --> 00:56:34.420
If you negate all the variables,
they'll still be not all equal.

00:56:34.420 --> 00:56:36.090
And exactly when
they're not all equal,

00:56:36.090 --> 00:56:39.040
we get two points
out of this gadget.

00:56:39.040 --> 00:56:40.890
Well, we also have to
get the three points

00:56:40.890 --> 00:56:42.440
from these connections.

00:56:42.440 --> 00:56:43.750
That forces this alternation.

00:56:43.750 --> 00:56:45.650
So we say the target
in this gadget

00:56:45.650 --> 00:56:47.580
is to get a cut of size 5.

00:56:47.580 --> 00:56:49.570
We want five red-blue edges.

00:56:49.570 --> 00:56:52.210
That's the most you could hope
for because of an odd cycle

00:56:52.210 --> 00:56:53.030
here.

00:56:53.030 --> 00:56:57.770
And if you get the sum of all
these cut sizes, in total,

00:56:57.770 --> 00:57:01.320
you must have Not All
Equal in every clause.

00:57:01.320 --> 00:57:05.000
So that's simulating
Not All Equal-- planar

00:57:05.000 --> 00:57:06.040
Not All Equal 3SAT.

00:57:06.040 --> 00:57:07.630
This also preserves planarity.

00:57:07.630 --> 00:57:09.192
And we just contract
the variable

00:57:09.192 --> 00:57:10.650
to a point, the
clauses to a point.

00:57:10.650 --> 00:57:14.900
And it is the bipartite graph
of the Not All Equal picture.

00:57:14.900 --> 00:57:17.390
And we've simulated that planar
Not All Equal 3SAT instance

00:57:17.390 --> 00:57:21.284
with planar max cut,
which here, we actually

00:57:21.284 --> 00:57:22.450
have a polynomial algorithm.

00:57:22.450 --> 00:57:24.074
So that gives us a
polynomial algorithm

00:57:24.074 --> 00:57:26.250
for planar Not All Equal 3SAT.

00:57:26.250 --> 00:57:28.280
So that's kind of fun.

00:57:28.280 --> 00:57:28.970
Similar style.

00:57:32.680 --> 00:57:34.200
Yeah.

00:57:34.200 --> 00:57:34.700
Good.

00:57:38.330 --> 00:57:39.580
So many problems.

00:58:03.600 --> 00:58:09.190
So I guess now we're going
to do some reductions

00:58:09.190 --> 00:58:13.280
from various planar 3SAT
things to problems you might

00:58:13.280 --> 00:58:15.690
care a little bit more about.

00:58:15.690 --> 00:58:17.230
I'm going to
start-- I mean, it's

00:58:17.230 --> 00:58:19.300
sort of a vague
transition, because these,

00:58:19.300 --> 00:58:22.120
you could think of just more
problems of the same type.

00:58:22.120 --> 00:58:25.740
X3C is something we talked about
in the context of 3PARTITION.

00:58:25.740 --> 00:58:30.040
This was exact cover
with sets of size 3.

00:58:30.040 --> 00:58:33.620
I think Exact Cover
with sets of size 3.

00:58:33.620 --> 00:58:36.574
So this was-- you could
think of it as a hyper-graph.

00:58:36.574 --> 00:58:38.490
Or you could think of
it as a bipartite graph.

00:58:38.490 --> 00:58:43.290
You have sets of size 3
which cover variables.

00:58:43.290 --> 00:58:45.890
You want every variable to
be covered exactly once.

00:58:49.720 --> 00:58:52.496
But you can only
choose sets of size 3.

00:58:52.496 --> 00:58:54.210
Yeah.

00:58:54.210 --> 00:59:01.250
So this is closely related,
I guess, to planar 1-in-3SAT.

00:59:01.250 --> 00:59:04.420
Here, each of these
things could have

00:59:04.420 --> 00:59:06.480
arbitrary degree--
each element can

00:59:06.480 --> 00:59:09.420
appear in many different sets.

00:59:09.420 --> 00:59:13.410
Whereas over-- and you're
covering these with these.

00:59:13.410 --> 00:59:21.110
I think this is the reverse
setup, where every-- let's see.

00:59:23.620 --> 00:59:26.230
The clauses, again, have
to be exactly covered

00:59:26.230 --> 00:59:29.300
by these things.

00:59:29.300 --> 00:59:34.266
And these things
have arbitrary size.

00:59:34.266 --> 00:59:36.140
So these are the things
that you're choosing.

00:59:36.140 --> 00:59:38.056
I'm choosing to make
this variable true, which

00:59:38.056 --> 00:59:39.389
covers this guy.

00:59:39.389 --> 00:59:40.680
These have arbitrary size here.

00:59:40.680 --> 00:59:43.590
The thing that I'm
choosing has size 3.

00:59:43.590 --> 00:59:44.090
OK?

00:59:44.090 --> 00:59:45.447
So it's sort of the dual of--

00:59:45.447 --> 00:59:46.780
AUDIENCE: What are you choosing?

00:59:46.780 --> 00:59:49.400
PROFESSOR: --of
planar 1-in-3SAT.

00:59:49.400 --> 00:59:55.060
So the goal-- maybe I should
write down the problem again.

00:59:55.060 --> 00:59:56.850
You're given three sets.

00:59:56.850 --> 00:59:58.680
These are sets of size 3.

00:59:58.680 --> 01:00:03.820
And you want to choose,
let's say, k of them.

01:00:08.150 --> 01:00:12.765
Actually, it would be choose
n/3 of them that are disjoint.

01:00:15.450 --> 01:00:18.510
And therefore, every
element-- they're n elements--

01:00:18.510 --> 01:00:23.570
every element is covered exactly
once by exactly one 3SAT.

01:00:23.570 --> 01:00:25.340
So it's, I think,
sort of complementary

01:00:25.340 --> 01:00:26.910
to planar 1-in-3SAT.

01:00:26.910 --> 01:00:31.350
The planar version is that
this bipartite graph is planar.

01:00:31.350 --> 01:00:36.010
And Dyer and Freeze,
this is same people

01:00:36.010 --> 01:00:40.240
that approved one of these
many problems is hard.

01:00:40.240 --> 01:00:44.396
I think the-- I'll look back.

01:00:47.890 --> 01:00:50.070
Planar 1-in-3SAT.

01:00:50.070 --> 01:00:51.540
So no surprise.

01:00:51.540 --> 01:00:54.864
So we're going to reduce
from planar 1-in-3SAT

01:00:54.864 --> 01:00:57.840
to this problem, prove
that this is hard.

01:00:57.840 --> 01:00:59.600
And here's a very simple proof.

01:00:59.600 --> 01:01:00.940
They make it more complicated.

01:01:00.940 --> 01:01:05.110
But for starters,
let's make a variable

01:01:05.110 --> 01:01:07.740
by this kind of
even cycle trick.

01:01:07.740 --> 01:01:11.750
And the picture here is that
the big circles are 3SATs,

01:01:11.750 --> 01:01:13.970
the dots are the elements
you're trying to cover.

01:01:13.970 --> 01:01:15.761
And every element should
be covered exactly

01:01:15.761 --> 01:01:17.700
by exactly one set.

01:01:17.700 --> 01:01:20.380
So this looks good, because
there are exactly two ways

01:01:20.380 --> 01:01:21.970
to solve this thing.

01:01:21.970 --> 01:01:25.490
You could choose these guys
and cover those points exactly

01:01:25.490 --> 01:01:28.987
once, in which case, this
is covered, this is covered,

01:01:28.987 --> 01:01:29.820
and this is covered.

01:01:29.820 --> 01:01:31.840
But these other
guys are uncovered.

01:01:31.840 --> 01:01:34.630
Those are going to
attach to other gadgets.

01:01:34.630 --> 01:01:36.510
Or you could do the reverse.

01:01:36.510 --> 01:01:39.590
So that's going to correspond
to a true or false setting.

01:01:39.590 --> 01:01:41.430
And I think-- this is
not in their paper,

01:01:41.430 --> 01:01:46.040
but I think this would be a
clause for exactly one 3SAT.

01:01:46.040 --> 01:01:51.870
Just connect-- you
could have even negated

01:01:51.870 --> 01:01:53.700
versions of your variables.

01:01:53.700 --> 01:01:57.430
But let's say we have all
positive planar 1-in-3SAT.

01:01:57.430 --> 01:01:59.700
3, So I'll just
take a positive copy

01:01:59.700 --> 01:02:02.800
of xi, a positive copy
of xj from somewhere,

01:02:02.800 --> 01:02:06.365
and then just bring them
together at a common dot.

01:02:06.365 --> 01:02:07.740
Then that point
should be covered

01:02:07.740 --> 01:02:10.073
by exactly one of them, which
means exactly one of those

01:02:10.073 --> 01:02:11.339
is true.

01:02:11.339 --> 01:02:11.838
Done.

01:02:11.838 --> 01:02:13.320
Very easy.

01:02:13.320 --> 01:02:15.310
Now, they want to
prove more things,

01:02:15.310 --> 01:02:20.150
so they end up using-- I think
I will just show you for fun.

01:02:20.150 --> 01:02:24.520
They end up using a more
complicated clause and a more

01:02:24.520 --> 01:02:29.400
complicated way to connect
these things into the clause,

01:02:29.400 --> 01:02:33.400
because they want to prove
another problem hard,

01:02:33.400 --> 01:02:39.597
which is planar
three-dimensional matching.

01:02:39.597 --> 01:02:41.555
Three-dimensional matching
was a generalization

01:02:41.555 --> 01:02:45.780
of numerical three-dimensional
matching, which was

01:02:45.780 --> 01:02:48.300
closely related to 3PARTITION.

01:02:48.300 --> 01:02:52.170
In general,
three-dimensional matching,

01:02:52.170 --> 01:02:53.480
it's like this problem.

01:02:53.480 --> 01:02:55.390
But you also have
the extra information

01:02:55.390 --> 01:02:59.280
that for every set of size
3, one of these is red,

01:02:59.280 --> 01:03:03.430
another one is blue,
another one is yellow.

01:03:03.430 --> 01:03:06.260
This paper uses the
additive primary colors.

01:03:06.260 --> 01:03:07.516
I don't know why.

01:03:07.516 --> 01:03:10.780
It could be green if you prefer.

01:03:10.780 --> 01:03:12.840
So there are three
types of elements.

01:03:12.840 --> 01:03:15.730
And you're told that every
set has one of each type.

01:03:15.730 --> 01:03:19.790
So that's extra information
that's useful in some proofs.

01:03:19.790 --> 01:03:22.610
So this is a better
construction,

01:03:22.610 --> 01:03:26.400
because it's going to end
up being three-colorable.

01:03:26.400 --> 01:03:28.834
Yeah.

01:03:28.834 --> 01:03:31.000
I don't know how much you
care about this reduction.

01:03:31.000 --> 01:03:34.100
I think I will skip the
details, although I spent

01:03:34.100 --> 01:03:37.270
a lot of time understanding it.

01:03:37.270 --> 01:03:40.207
The rough idea is that
these connectors-- there's

01:03:40.207 --> 01:03:42.290
a positive and a negative
version, because they're

01:03:42.290 --> 01:03:43.289
worried about negations.

01:03:43.289 --> 01:03:46.190
But these connections
will attach

01:03:46.190 --> 01:03:48.090
to these three terminals
for one variable,

01:03:48.090 --> 01:03:49.506
these three terminals
for another,

01:03:49.506 --> 01:03:50.720
and these three for another.

01:03:50.720 --> 01:03:53.530
And just by a counting
argument in here,

01:03:53.530 --> 01:04:00.290
there is 1, 2, 3, 4, 5,
6, 7, 8, 9 of these guys.

01:04:00.290 --> 01:04:03.455
And there are however many--
I guess I should really

01:04:03.455 --> 01:04:04.580
be counting the black dots.

01:04:04.580 --> 01:04:11.360
1, 2, 3, 4, 5, 6, 7, 8,
9, 11, 12 points here.

01:04:11.360 --> 01:04:17.210
So the best you can do is
to choose three of the sets

01:04:17.210 --> 01:04:20.680
inside that will cover
all of the black dots

01:04:20.680 --> 01:04:22.230
except for three of them.

01:04:22.230 --> 01:04:24.490
And so from that, you
get exactly one 1SAT.

01:04:24.490 --> 01:04:28.196
Exactly one of these should be
covered from somewhere else.

01:04:28.196 --> 01:04:29.820
That would correspond
to this situation

01:04:29.820 --> 01:04:31.954
where you cover
these three points as

01:04:31.954 --> 01:04:34.370
opposed to this situation,
where none of them get covered.

01:04:34.370 --> 01:04:35.844
That's like these guys.

01:04:35.844 --> 01:04:37.510
And then you can
always satisfy the rest

01:04:37.510 --> 01:04:39.130
by adding three in there.

01:04:39.130 --> 01:04:42.870
So that's roughly how
that clause works.

01:04:42.870 --> 01:04:45.860
Then that picture
is three-colorable.

01:04:45.860 --> 01:04:50.449
And this way, you can color
all the dots with three colors.

01:04:50.449 --> 01:04:51.490
And it pretty much works.

01:04:51.490 --> 01:04:54.210
The variable
alternates red, yellow.

01:04:54.210 --> 01:04:56.570
So we always get blue
connections, which is good.

01:04:56.570 --> 01:04:59.250
So we can attach to
anything, except that the way

01:04:59.250 --> 01:05:00.730
that we attach is like this.

01:05:00.730 --> 01:05:05.400
And these are three
colors which match here.

01:05:05.400 --> 01:05:08.552
And in this case, these
three colors match here.

01:05:08.552 --> 01:05:10.510
But you might want to
attach here, for example.

01:05:10.510 --> 01:05:15.530
So you need another connector,
which is slightly different.

01:05:15.530 --> 01:05:17.370
This does exactly
the same thing,

01:05:17.370 --> 01:05:20.350
but now this color
pattern matches

01:05:20.350 --> 01:05:22.020
here, but in negated form.

01:05:22.020 --> 01:05:28.510
And if you switch these two
colors, it matches here,

01:05:28.510 --> 01:05:29.780
I think when it's upside-down.

01:05:29.780 --> 01:05:32.238
So there's this version, and
there's the reflected version.

01:05:32.238 --> 01:05:37.130
And then there's also this
coloring of the same gadget.

01:05:37.130 --> 01:05:38.462
And so you do all these things.

01:05:38.462 --> 01:05:40.170
You know what you're
supposed to connect,

01:05:40.170 --> 01:05:42.253
and so you just choose one
of these three gadgets,

01:05:42.253 --> 01:05:44.989
and it connects to one of
the three appropriate places.

01:05:44.989 --> 01:05:45.780
That's their proof.

01:05:45.780 --> 01:05:47.480
It was fun to read.

01:05:47.480 --> 01:05:49.730
And that proves that planar
three-dimensional matching

01:05:49.730 --> 01:05:51.270
is hard.

01:05:51.270 --> 01:05:51.870
OK.

01:05:51.870 --> 01:05:54.426
Plus, in their
diagrams, oh, they

01:05:54.426 --> 01:05:56.300
have dashed lines through
everything in order

01:05:56.300 --> 01:05:58.550
to illustrate that you
can have one path that

01:05:58.550 --> 01:06:01.495
visits all of the elements,
just like in planar 3SAT.

01:06:01.495 --> 01:06:04.630
So also, both planar
three-dimensional matching and

01:06:04.630 --> 01:06:11.512
planar exact cover by 3SATs,
you can have one cycle

01:06:11.512 --> 01:06:12.595
that visits every element.

01:06:16.240 --> 01:06:18.120
Yeah.

01:06:18.120 --> 01:06:19.300
Cool.

01:06:19.300 --> 01:06:22.385
Here's another
relatively simple proof.

01:06:22.385 --> 01:06:24.260
This is in the original
Lichtenstein paper,

01:06:24.260 --> 01:06:27.540
so this is one of their
motivations for planar 3SAT.

01:06:27.540 --> 01:06:29.040
Planar vertex cover.

01:06:29.040 --> 01:06:32.190
So what's vertex cover?

01:06:32.190 --> 01:06:33.430
You're given a graph.

01:06:33.430 --> 01:06:36.440
You want to choose
a set of vertices

01:06:36.440 --> 01:06:37.810
that cover all of the edges.

01:06:37.810 --> 01:06:39.950
So for example, if
you have a triangle,

01:06:39.950 --> 01:06:42.085
and I choose this vertex,
it covers this edge,

01:06:42.085 --> 01:06:43.470
and it covers this edge.

01:06:43.470 --> 01:06:44.660
I have one edge uncovered.

01:06:44.660 --> 01:06:46.790
So I'm going to add
this one and cover that.

01:06:46.790 --> 01:06:49.440
So I don't require
exactly one cover.

01:06:49.440 --> 01:06:52.150
Just every edge has to be
covered by at least one

01:06:52.150 --> 01:06:53.810
of its endpoints.

01:06:53.810 --> 01:06:57.970
So you can think of it as
an oar of its two endpoints.

01:06:57.970 --> 01:06:58.470
OK.

01:06:58.470 --> 01:07:01.750
But this problem is NP-hard
even for planar graphs.

01:07:01.750 --> 01:07:03.710
And here's one way to do.

01:07:03.710 --> 01:07:05.910
This is like the whole
proof in one little picture.

01:07:05.910 --> 01:07:08.450
You have a variable
gadget, which,

01:07:08.450 --> 01:07:12.040
again, is just a even cycle.

01:07:12.040 --> 01:07:16.610
And in an even cycle,
the vertex cover--

01:07:16.610 --> 01:07:18.350
let's say this has size k.

01:07:18.350 --> 01:07:21.570
And I give you the budget of
only k/2 for your vertex cover,

01:07:21.570 --> 01:07:22.924
then you have to alternate.

01:07:22.924 --> 01:07:25.090
So either these three guys
are in your vertex cover,

01:07:25.090 --> 01:07:26.794
or these three guys are.

01:07:26.794 --> 01:07:28.210
This proof actually
looks the same

01:07:28.210 --> 01:07:30.120
as the last one we saw, right?

01:07:30.120 --> 01:07:32.620
Then those things are just
connected to triangles.

01:07:32.620 --> 01:07:33.970
Same deal here.

01:07:33.970 --> 01:07:35.900
I'm going to give
you a budget of two

01:07:35.900 --> 01:07:38.700
for this clause, because to
cover all three of these edges,

01:07:38.700 --> 01:07:42.480
you need at least two vertices,
like we did over there.

01:07:42.480 --> 01:07:45.752
And if you're going to get
away with only two-- so

01:07:45.752 --> 01:07:47.460
if I choose, for
example, these two, that

01:07:47.460 --> 01:07:50.020
also covers this edge
and this edge for free.

01:07:50.020 --> 01:07:51.450
But it does not cover this edge.

01:07:51.450 --> 01:07:53.640
This would be the one edge
not covered by the clause

01:07:53.640 --> 01:07:55.640
alone if you only
get a budget of two.

01:07:55.640 --> 01:07:57.106
And that's the
one that better be

01:07:57.106 --> 01:07:58.480
covered by this
side, which means

01:07:58.480 --> 01:08:00.117
this variable is set to true.

01:08:00.117 --> 01:08:02.200
And in general, at least
one of these three things

01:08:02.200 --> 01:08:02.960
better be covered.

01:08:02.960 --> 01:08:05.110
Otherwise you won't
have enough budget

01:08:05.110 --> 01:08:07.620
to finish that triangle clause.

01:08:07.620 --> 01:08:08.420
Question?

01:08:08.420 --> 01:08:11.620
AUDIENCE: So the hexagon
versus square here

01:08:11.620 --> 01:08:13.370
is just to give you
more connection points

01:08:13.370 --> 01:08:13.810
into other clauses?

01:08:13.810 --> 01:08:14.030
PROFESSOR: Yeah.

01:08:14.030 --> 01:08:15.405
Just make these
cycles big enough

01:08:15.405 --> 01:08:18.120
to connect up to all the
things you need it in.

01:08:18.120 --> 01:08:20.340
So if you have ni
occurrences, you're

01:08:20.340 --> 01:08:22.754
going to do, like,
2 ni or something.

01:08:25.970 --> 01:08:26.470
Cool.

01:08:26.470 --> 01:08:28.330
So that's planar vertex cover.

01:08:28.330 --> 01:08:31.939
And because this reduction
preserved planarity,

01:08:31.939 --> 01:08:35.180
we get planar
vertex cover's hard,

01:08:35.180 --> 01:08:36.390
because planar 3SAT is hard.

01:08:36.390 --> 01:08:37.848
Here we didn't need
any connections

01:08:37.848 --> 01:08:39.186
between the variables.

01:08:39.186 --> 01:08:40.810
Here's one where we
do need connections

01:08:40.810 --> 01:08:42.330
between the variables.

01:08:42.330 --> 01:08:46.970
So this is planar-directed
Hamiltonian cycle.

01:08:46.970 --> 01:08:49.810
So I think you all know
what Hamiltonian cycle is.

01:08:49.810 --> 01:08:52.090
And you're given a
directed graph here.

01:08:52.090 --> 01:08:54.560
You want to find one path that
visits every vertex exactly

01:08:54.560 --> 01:08:55.490
once.

01:08:55.490 --> 01:08:57.149
Don't care about edges.

01:08:57.149 --> 01:08:59.980
So we can do a
similar kind of thing.

01:08:59.980 --> 01:09:02.615
The proof is a little bit--
but checking this works is

01:09:02.615 --> 01:09:03.740
a little bit more annoying.

01:09:03.740 --> 01:09:08.262
But here's Lichtenstein's
idea for variable.

01:09:08.262 --> 01:09:09.095
Essentially, a wire.

01:09:11.720 --> 01:09:13.069
The graph is directed here.

01:09:13.069 --> 01:09:15.724
So we get to say there's
an incoming edge here.

01:09:15.724 --> 01:09:16.640
Then you get a choice.

01:09:16.640 --> 01:09:18.340
So which way it'll go.

01:09:18.340 --> 01:09:20.414
But then you basically
have to alternate.

01:09:20.414 --> 01:09:22.080
Because of these
vertices in the middle,

01:09:22.080 --> 01:09:23.540
you've got to visit all of them.

01:09:23.540 --> 01:09:25.649
And the only way to do
that is to alternate.

01:09:25.649 --> 01:09:27.520
So you get this
alternating pattern,

01:09:27.520 --> 01:09:31.330
which means if you look at
these edges, a1 and a1 bar,

01:09:31.330 --> 01:09:33.430
exactly one of these is in.

01:09:33.430 --> 01:09:35.899
And then the opposite
of these are in.

01:09:35.899 --> 01:09:38.170
The variable here is called a.

01:09:38.170 --> 01:09:40.529
So there's many instances of a.

01:09:40.529 --> 01:09:44.439
And these are going to
be in-- they're going

01:09:44.439 --> 01:09:45.630
to be both in or both out.

01:09:45.630 --> 01:09:48.700
And then these are going to be
both out or both in and so on.

01:09:48.700 --> 01:09:51.569
So because I have
to zigzag, I made

01:09:51.569 --> 01:09:56.090
a bunch of copies, ni
copies of the variable a.

01:09:56.090 --> 01:09:58.460
But you're free to choose
one setting or the other.

01:09:58.460 --> 01:10:01.420
And then the clause is just
going to be a single vertex.

01:10:01.420 --> 01:10:07.617
And the idea is if we want b
bar to satisfy this clause,

01:10:07.617 --> 01:10:09.200
we're going to add
in those two edges.

01:10:09.200 --> 01:10:12.140
So instead of going straight
here, you could have done this

01:10:12.140 --> 01:10:13.620
and grabbed the clause for free.

01:10:13.620 --> 01:10:15.180
You don't have to.

01:10:15.180 --> 01:10:17.650
But this is going to
get grabbed if and only

01:10:17.650 --> 01:10:20.692
if exactly-- at
least one of these

01:10:20.692 --> 01:10:21.900
chooses the appropriate edge.

01:10:21.900 --> 01:10:23.384
If you're using
this edge, there's

01:10:23.384 --> 01:10:24.550
no way to cover this clause.

01:10:24.550 --> 01:10:27.010
But if using this
edge, you can do that.

01:10:27.010 --> 01:10:29.715
You have to check that you
can't let go from here to there

01:10:29.715 --> 01:10:30.880
to over here.

01:10:30.880 --> 01:10:32.470
That's what this
figure is about.

01:10:32.470 --> 01:10:35.080
So basically, if you're
alternating here,

01:10:35.080 --> 01:10:38.300
you switch sides, and then
you're alternating here,

01:10:38.300 --> 01:10:40.420
this guy is uncovered.

01:10:40.420 --> 01:10:42.010
And apparently, this
proof works even

01:10:42.010 --> 01:10:44.590
when the graph is undirected,
but that's even less clear.

01:10:44.590 --> 01:10:46.954
We'll see other
Hamiltonian cycle proofs

01:10:46.954 --> 01:10:48.120
that are stronger than this.

01:10:48.120 --> 01:10:49.650
But it's a nice illustration.

01:10:49.650 --> 01:10:52.910
Here we're using that we
can connect all the vertices

01:10:52.910 --> 01:10:53.480
together.

01:10:53.480 --> 01:10:56.980
That's what these
connections are in the cycle.

01:10:56.980 --> 01:11:00.342
So there's this big
vertex loop on the outside

01:11:00.342 --> 01:11:02.300
taking these gadgets,
and pasting them together

01:11:02.300 --> 01:11:06.110
in a big loop, because we want
an overall Hamiltonian cycle.

01:11:06.110 --> 01:11:10.340
Because we know that preserves
linearity, life is good.

01:11:10.340 --> 01:11:10.840
OK.

01:11:10.840 --> 01:11:12.550
So there'll be some
clauses inside the cycle,

01:11:12.550 --> 01:11:13.841
some clauses outside the cycle.

01:11:13.841 --> 01:11:16.500
But that doesn't matter.

01:11:16.500 --> 01:11:17.000
OK.

01:11:17.000 --> 01:11:19.345
That's planar-directed
Hamiltonian cycle.

01:11:22.310 --> 01:11:24.930
Time for a Nikoli game.

01:11:24.930 --> 01:11:28.060
I bumped into this slide
that I made a while ago.

01:11:28.060 --> 01:11:30.610
So for fun, these are
all the Nikoli games

01:11:30.610 --> 01:11:32.850
I know that have been proved
hard except the one I'm

01:11:32.850 --> 01:11:34.180
going to talk about.

01:11:34.180 --> 01:11:37.300
These are the references.

01:11:37.300 --> 01:11:40.120
We covered one of them,
right, the Light Up.

01:11:40.120 --> 01:11:42.800
But there's a lot.

01:11:42.800 --> 01:11:44.440
And lots of papers proving them.

01:11:44.440 --> 01:11:46.580
So here's a relatively new game.

01:11:46.580 --> 01:11:48.970
It came out a couple
years ago in Nikoli land,

01:11:48.970 --> 01:11:50.520
although it was
invented before that.

01:11:50.520 --> 01:11:54.800
Shakashaka, which is
like a shaking sound.

01:11:54.800 --> 01:12:00.359
So we have a square grid, blank
squares, and obstacle squares.

01:12:00.359 --> 01:12:02.900
The obstacle squares, some of
them have numbers, some of them

01:12:02.900 --> 01:12:04.970
are wild cards.

01:12:04.970 --> 01:12:10.720
And what you're allowed to do
for a blank square-- or some

01:12:10.720 --> 01:12:14.670
of the blank squares,
you can fill in one half.

01:12:14.670 --> 01:12:16.540
So you have like
four different halves

01:12:16.540 --> 01:12:18.340
of the square you can choose.

01:12:18.340 --> 01:12:21.040
There they are-- this one, this
one, this one, and this one.

01:12:21.040 --> 01:12:23.730
And you can fill it in
half black, half white.

01:12:23.730 --> 01:12:26.170
So you cut along a
diagonal, and then you

01:12:26.170 --> 01:12:28.705
choose one of the two
halves to fill in black.

01:12:28.705 --> 01:12:29.455
You don't have to.

01:12:29.455 --> 01:12:32.280
You could just leave it white.

01:12:32.280 --> 01:12:35.020
And when you have
a numbered square,

01:12:35.020 --> 01:12:37.950
then the number of filled things
must be exactly that number.

01:12:37.950 --> 01:12:42.150
So here, there's one adjacent
to it, and nothing down here.

01:12:42.150 --> 01:12:46.120
This guy has exactly two
half-filled squares next to it.

01:12:46.120 --> 01:12:47.380
This one has exactly one.

01:12:47.380 --> 01:12:50.900
This one has exactly
zero half-filled squares.

01:12:50.900 --> 01:12:56.530
Think of blank squares as zeros
and these as counting as one.

01:12:56.530 --> 01:12:59.440
Plus, the goal is that the
regions you make-- this

01:12:59.440 --> 01:13:02.296
would all be easy
so far, I think.

01:13:02.296 --> 01:13:04.670
But the extra constraint is
that all the regions you make

01:13:04.670 --> 01:13:07.220
must be rectangles.

01:13:07.220 --> 01:13:07.720
OK?

01:13:07.720 --> 01:13:11.120
This is a 45-degree-rotated
rectangle.

01:13:11.120 --> 01:13:12.460
This is a regular rectangle.

01:13:12.460 --> 01:13:13.730
So you can use either one.

01:13:13.730 --> 01:13:14.855
So it's a funny constraint.

01:13:14.855 --> 01:13:17.540
It's actually quite
a fun game to play.

01:13:17.540 --> 01:13:19.970
You're not allowed to
fill in a square 100%.

01:13:19.970 --> 01:13:22.250
That one was already filled.

01:13:22.250 --> 01:13:24.190
That's the rules.

01:13:24.190 --> 01:13:26.840
Here's a reduction
from planar 3SAT.

01:13:26.840 --> 01:13:28.230
Pretty simple.

01:13:28.230 --> 01:13:30.830
Looks a lot like
Minesweeper, in some sense,

01:13:30.830 --> 01:13:32.640
a little bit thickened.

01:13:32.640 --> 01:13:36.600
But this is a
wire, because the 1

01:13:36.600 --> 01:13:38.610
says that one of the two
sides is half-filled.

01:13:38.610 --> 01:13:41.068
Once that's half-filled, you
have to make this a rectangle.

01:13:41.068 --> 01:13:43.300
You can't just leave
it as a pentagon.

01:13:43.300 --> 01:13:45.830
So you've got to fill that
in to a rotated square.

01:13:45.830 --> 01:13:48.030
But because of the 1, this
must be an empty square.

01:13:48.030 --> 01:13:49.330
So it alternates.

01:13:49.330 --> 01:13:51.130
You can do this or this.

01:13:51.130 --> 01:13:51.630
OK.

01:13:51.630 --> 01:13:54.170
You can easily split just
by connecting those things

01:13:54.170 --> 01:13:55.740
in the obvious way.

01:13:55.740 --> 01:13:57.210
You can do 90-degree turns.

01:13:57.210 --> 01:13:57.710
No problem.

01:14:00.520 --> 01:14:04.790
Here's a slightly more
sophisticated-- slightly more

01:14:04.790 --> 01:14:06.350
sophisticated gadget.

01:14:06.350 --> 01:14:09.120
You can think of
this as a terminator.

01:14:09.120 --> 01:14:12.072
It would be hard to just
stop this somewhere.

01:14:12.072 --> 01:14:15.466
Well, maybe you could
just go all black.

01:14:15.466 --> 01:14:17.560
I think that's OK as well.

01:14:17.560 --> 01:14:19.080
This could also be a terminator.

01:14:19.080 --> 01:14:23.510
You can also think
of this as a negator.

01:14:23.510 --> 01:14:25.680
Of course, also, the
splitter's like a negator.

01:14:25.680 --> 01:14:28.770
This guide's just
probably not so necessary.

01:14:28.770 --> 01:14:31.340
Let's get to Clause.

01:14:31.340 --> 01:14:33.890
So Clause is bringing
three things together

01:14:33.890 --> 01:14:34.970
with one of these blocks.

01:14:34.970 --> 01:14:36.480
But we do it in a funny way.

01:14:36.480 --> 01:14:38.200
There's no 1's here or here.

01:14:38.200 --> 01:14:39.960
So we end up with
this L blank shape.

01:14:39.960 --> 01:14:42.520
Everything else is
now drawn as black.

01:14:42.520 --> 01:14:43.450
That's just obstacles.

01:14:43.450 --> 01:14:46.050
So this is not
happy the way it is.

01:14:46.050 --> 01:14:48.280
There's lots of
ways to resolve it.

01:14:48.280 --> 01:14:50.270
The one case where
we can't resolve

01:14:50.270 --> 01:14:57.360
it is when all of these wires
are 0's, because there's

01:14:57.360 --> 01:14:59.870
already stuff here, and
stuff here, and stuff here,

01:14:59.870 --> 01:15:01.480
so we can't put anything here.

01:15:01.480 --> 01:15:03.360
Can't put anything
here, or here, or here,

01:15:03.360 --> 01:15:04.440
because of those 1's.

01:15:04.440 --> 01:15:07.800
Then you're forced to have
the L shape, and you're toast.

01:15:07.800 --> 01:15:10.430
In every other case,
we can decompose

01:15:10.430 --> 01:15:13.710
into sometimes a big rectangle,
sometimes little squares,

01:15:13.710 --> 01:15:14.950
sometimes rotated squares.

01:15:14.950 --> 01:15:15.810
But that's OK.

01:15:15.810 --> 01:15:19.040
So this is a
regular 3SAT clause.

01:15:19.040 --> 01:15:22.680
The one thing that's
missing at this point

01:15:22.680 --> 01:15:27.290
is a parity shift gadget,
because a lot of these gadgets

01:15:27.290 --> 01:15:30.880
have very specific lengths,
modular 3 or whatever.

01:15:30.880 --> 01:15:35.360
So it turns out this is a
way to shift things slightly.

01:15:35.360 --> 01:15:37.750
It can be filled in two ways.

01:15:37.750 --> 01:15:42.630
You can fill in all of
these guys like that

01:15:42.630 --> 01:15:44.880
and make this giant
rotated square.

01:15:44.880 --> 01:15:48.370
Or if these are not allowed
because these are here,

01:15:48.370 --> 01:15:50.512
then you can do
this weird filling.

01:15:50.512 --> 01:15:52.970
You end up with a rectangle
there, and two rotated squares,

01:15:52.970 --> 01:15:55.659
another rectangle.

01:15:55.659 --> 01:15:56.950
And you count the total length.

01:15:56.950 --> 01:16:02.387
This is length 4, whereas most
of the things are length 2?

01:16:02.387 --> 01:16:03.580
AUDIENCE: 3 [INAUDIBLE].

01:16:03.580 --> 01:16:04.180
PROFESSOR: 3.

01:16:04.180 --> 01:16:04.680
OK.

01:16:04.680 --> 01:16:08.032
So that makes me happy.

01:16:08.032 --> 01:16:08.740
Shift the parity.

01:16:08.740 --> 01:16:11.899
And that is Shakashaka.

01:16:11.899 --> 01:16:13.690
Here's an overall
picture where we actually

01:16:13.690 --> 01:16:15.500
plugged some gadgets together.

01:16:15.500 --> 01:16:16.420
That was fun.

01:16:19.370 --> 01:16:26.450
So I think I have one
more proof to just sketch.

01:16:26.450 --> 01:16:30.220
So this is a problem of
so-called fixed-angle chains.

01:16:30.220 --> 01:16:32.320
So you have this
forced 90-degree angle.

01:16:32.320 --> 01:16:34.560
We had a similar thing
with the Hamiltonian path

01:16:34.560 --> 01:16:37.240
with cubes and
elastics between them.

01:16:37.240 --> 01:16:40.380
You could twist one
edge around the other,

01:16:40.380 --> 01:16:43.710
one block around the other, but
you couldn't adjust this angle.

01:16:43.710 --> 01:16:44.210
OK?

01:16:44.210 --> 01:16:46.492
So the problem is I give
you such a chain, which

01:16:46.492 --> 01:16:48.575
is specified by lengths
and then 90-degree angles.

01:16:48.575 --> 01:16:51.280
So it can be-- you don't know
whether the 90-degree angle

01:16:51.280 --> 01:16:52.870
goes up or down.

01:16:52.870 --> 01:16:56.850
And you want to just put it into
the plane without crossings.

01:16:56.850 --> 01:16:59.030
And this is an old
proof from 2000.

01:16:59.030 --> 01:17:01.150
The problem is weakly NP-hard.

01:17:01.150 --> 01:17:02.690
It's basically a
partition proof,

01:17:02.690 --> 01:17:04.490
so it is a partition proof.

01:17:04.490 --> 01:17:07.150
You get to choose, for
each of these things,

01:17:07.150 --> 01:17:08.550
whether it goes left or right.

01:17:08.550 --> 01:17:10.260
And you need to line
up this with that.

01:17:10.260 --> 01:17:12.342
Otherwise you get collisions.

01:17:12.342 --> 01:17:13.550
You would just need to argue.

01:17:13.550 --> 01:17:16.260
This outer structure has a
unique embedding, roughly.

01:17:16.260 --> 01:17:17.370
Unique enough.

01:17:17.370 --> 01:17:19.150
It always looks like that.

01:17:19.150 --> 01:17:24.180
So we proved a few years ago
that it is strongly NP-hard.

01:17:24.180 --> 01:17:25.790
And I will just
sketch the proof,

01:17:25.790 --> 01:17:28.440
because it's fun and cool.

01:17:28.440 --> 01:17:30.060
So here's the rough idea.

01:17:30.060 --> 01:17:32.910
Imagine this is like
a piece of wire.

01:17:32.910 --> 01:17:35.610
And you can flip it up or down.

01:17:35.610 --> 01:17:37.700
All the angles stay 90 degrees.

01:17:37.700 --> 01:17:38.820
These are the down-case.

01:17:38.820 --> 01:17:40.290
Here are some example up-cases.

01:17:40.290 --> 01:17:42.740
One of them's going to
represent false, the other true.

01:17:42.740 --> 01:17:43.240
Question?

01:17:43.240 --> 01:17:45.823
AUDIENCE: What's the difference
between this and the Carpenter

01:17:45.823 --> 01:17:46.685
Ruler problem?

01:17:46.685 --> 01:17:47.810
PROFESSOR: Which Carpenter?

01:17:47.810 --> 01:17:50.140
AUDIENCE: Like you have
to fold the ruler to fit.

01:17:50.140 --> 01:17:51.973
PROFESSOR: Oh, to fit
inside a given length.

01:17:54.954 --> 01:17:56.120
Well, the goal is different.

01:17:56.120 --> 01:17:59.490
Here, the goal is to draw it
in the plane without crossings.

01:17:59.490 --> 01:18:03.600
Before, the goal was to draw it
in the plane with minimum span.

01:18:06.220 --> 01:18:07.330
To fit inside box.

01:18:07.330 --> 01:18:07.830
Yeah.

01:18:07.830 --> 01:18:09.790
I mean, this proof is
pretty much the same.

01:18:09.790 --> 01:18:11.496
This proof will be
totally different.

01:18:11.496 --> 01:18:13.120
That problem was also
only weakly hard.

01:18:13.120 --> 01:18:15.060
There was a pseudo
poly-algorithm.

01:18:15.060 --> 01:18:16.620
This problem is
strongly NP-hard.

01:18:16.620 --> 01:18:17.994
There is no pseudo
poly-algorithm

01:18:17.994 --> 01:18:19.140
unless P equals np.

01:18:19.140 --> 01:18:21.314
So just a slightly
different goal.

01:18:21.314 --> 01:18:22.730
That one was more
one-dimensional.

01:18:22.730 --> 01:18:24.896
This is going to be much
more two-dimensional That's

01:18:24.896 --> 01:18:25.860
the other difference.

01:18:25.860 --> 01:18:26.360
OK.

01:18:26.360 --> 01:18:30.610
So this is our some
kind of variable gadget.

01:18:30.610 --> 01:18:32.645
This is the variables gadget.

01:18:32.645 --> 01:18:34.570
All n variables are
represented here.

01:18:34.570 --> 01:18:36.022
This represents one variable.

01:18:36.022 --> 01:18:38.230
At this point, I only have
one copy of each variable,

01:18:38.230 --> 01:18:40.600
because there's no
constraint between these.

01:18:40.600 --> 01:18:43.060
Each of them can
independently flip up or down.

01:18:43.060 --> 01:18:44.120
Next, we have a clause.

01:18:44.120 --> 01:18:46.510
This is where things get fun.

01:18:46.510 --> 01:18:51.240
So there's some infrastructure,
but the main action is here.

01:18:51.240 --> 01:18:53.250
Each of these is
sort of independently

01:18:53.250 --> 01:18:55.270
pop in or outable.

01:18:55.270 --> 01:18:57.810
It's like some kind
of pleated form.

01:18:57.810 --> 01:19:00.300
It can either pleat back and
forth, like it's doing here,

01:19:00.300 --> 01:19:02.780
where it pleats in and
out and out and in.

01:19:02.780 --> 01:19:06.120
And that gets this
to this position.

01:19:06.120 --> 01:19:08.030
With a slightly
different pleating,

01:19:08.030 --> 01:19:09.495
it ends up in this position.

01:19:09.495 --> 01:19:10.870
Or a slightly
different pleating,

01:19:10.870 --> 01:19:13.700
where they're all out, you
end up in this position.

01:19:13.700 --> 01:19:17.100
And notice this structure.

01:19:17.100 --> 01:19:18.930
So I'll go through it again.

01:19:18.930 --> 01:19:20.610
Here's the left one.

01:19:20.610 --> 01:19:24.410
And then the middle one.

01:19:24.410 --> 01:19:26.540
And then the last one.

01:19:26.540 --> 01:19:29.510
What ends up happening is
that these pegs, in order

01:19:29.510 --> 01:19:36.700
to avoid hitting that peg, I
occupy either P1 or P2 or P3.

01:19:36.700 --> 01:19:38.640
So I'll go through
it one more time.

01:19:38.640 --> 01:19:40.900
Here it's hitting P1,
because this basically

01:19:40.900 --> 01:19:43.576
pushes this thing down.

01:19:43.576 --> 01:19:45.200
Whereas the other
ones can be up-- this

01:19:45.200 --> 01:19:48.440
is up and up and up and up.

01:19:48.440 --> 01:19:50.390
Or if we shift it
into the middle,

01:19:50.390 --> 01:19:52.220
then this one has to be down.

01:19:52.220 --> 01:19:56.040
But this guy can be up
and avoid P1 but hit P2.

01:19:56.040 --> 01:20:00.530
Or this one's down, these
are up, and we hit P3.

01:20:00.530 --> 01:20:02.740
We want to avoid
collisions, so we

01:20:02.740 --> 01:20:06.440
have to collide with
exactly one of these things,

01:20:06.440 --> 01:20:08.790
or at least one
of them, I guess.

01:20:08.790 --> 01:20:11.890
So that's the sort of picture.

01:20:11.890 --> 01:20:14.710
This is a bunch
of those clauses.

01:20:14.710 --> 01:20:21.427
There's one here, there's one
here, and there's one here.

01:20:21.427 --> 01:20:22.010
Look familiar?

01:20:22.010 --> 01:20:28.080
This is planar monotone
rectilinear 3SAT, I think.

01:20:31.160 --> 01:20:32.910
So far so good,
except this chain

01:20:32.910 --> 01:20:34.380
is separate from
this one, so we're

01:20:34.380 --> 01:20:35.671
going to connect them together.

01:20:37.980 --> 01:20:39.550
Is a little more, I think.

01:20:39.550 --> 01:20:40.400
Yeah.

01:20:40.400 --> 01:20:41.790
Connect them together.

01:20:41.790 --> 01:20:43.990
So now it is one big chain.

01:20:43.990 --> 01:20:46.340
What I ended up doing,
there's still this big thing

01:20:46.340 --> 01:20:48.180
to represent the
entire variable.

01:20:48.180 --> 01:20:50.770
But I basically made a
whole bunch of copies of it,

01:20:50.770 --> 01:20:54.070
so that I could
attach things here.

01:20:54.070 --> 01:20:57.120
But for example, when this
is up, all of these guys

01:20:57.120 --> 01:20:58.630
have to simultaneously be up.

01:20:58.630 --> 01:21:01.980
So it forces all the
copies of the variable

01:21:01.980 --> 01:21:03.430
here to be one way or the other.

01:21:03.430 --> 01:21:05.669
This is one variable,
this is another variable,

01:21:05.669 --> 01:21:07.960
this is another variable,
and this is another variable,

01:21:07.960 --> 01:21:09.370
just like before.

01:21:09.370 --> 01:21:11.780
So same thing, but now I can
connect them all together.

01:21:11.780 --> 01:21:16.830
Up here, these are all the
negative, I think, clauses.

01:21:16.830 --> 01:21:17.510
Doesn't matter.

01:21:17.510 --> 01:21:20.070
And then down here, you put
all the positive clauses.

01:21:20.070 --> 01:21:21.128
And that's the proof.

01:21:21.128 --> 01:21:21.627
Question.

01:21:21.627 --> 01:21:23.263
AUDIENCE: --all those
three dots in a row?

01:21:23.263 --> 01:21:25.679
Like, it seems to me that if
you have two dots [INAUDIBLE]

01:21:25.679 --> 01:21:28.940
straight line, they might as
well just merge into one dot.

01:21:28.940 --> 01:21:31.070
PROFESSOR: I think the
idea is, yeah, this

01:21:31.070 --> 01:21:32.470
could be a single line.

01:21:32.470 --> 01:21:34.970
We subdivide it just to point
out that you can attach things

01:21:34.970 --> 01:21:35.970
to it.

01:21:35.970 --> 01:21:36.810
Yeah.

01:21:36.810 --> 01:21:41.260
There's extra dots, but just
for consistency's sake, I guess.

01:21:41.260 --> 01:21:45.242
So now everywhere here, you
can attach one of the clauses.

01:21:45.242 --> 01:21:46.700
And that way, they
all kind of hold

01:21:46.700 --> 01:21:48.238
to the same infrastructure.

01:21:48.238 --> 01:21:51.230
Yeah.

01:21:51.230 --> 01:21:51.830
Clear?

01:21:51.830 --> 01:21:52.929
[LAUGHS]

01:21:52.929 --> 01:21:54.970
So obviously, you get
pretty complicated pictures

01:21:54.970 --> 01:21:55.470
in the end.

01:21:55.470 --> 01:21:57.980
But this is a proof
that clearly benefited

01:21:57.980 --> 01:22:01.400
from the rectilinear aspect
and the monotone aspect

01:22:01.400 --> 01:22:04.920
that all the true thing-- we
could not get some true above

01:22:04.920 --> 01:22:06.070
and some true below.

01:22:06.070 --> 01:22:07.832
They all wanted to
go the same way.

01:22:07.832 --> 01:22:09.290
And the rectilinear
was nice, so we

01:22:09.290 --> 01:22:11.570
could draw this all
on a horizontal line

01:22:11.570 --> 01:22:13.660
and only have to worry
about vertical connections

01:22:13.660 --> 01:22:14.990
between the top and the bottom.

01:22:14.990 --> 01:22:16.490
So that gets to
your question about,

01:22:16.490 --> 01:22:19.570
why do we need rectilinear?

01:22:19.570 --> 01:22:20.360
But there you go.

01:22:20.360 --> 01:22:25.310
So that was just a few
examples of planar 3SAT.

01:22:25.310 --> 01:22:28.240
But in general, the idea
is that a lot of 3SAT--

01:22:28.240 --> 01:22:31.320
or many 3SAT proofs
get easier when you use

01:22:31.320 --> 01:22:32.870
the appropriate planar version.

01:22:32.870 --> 01:22:36.290
You just have to be careful
of ones that are not hard.

01:22:36.290 --> 01:22:38.130
As long as you
avoid that and you

01:22:38.130 --> 01:22:40.210
have the right sort
of graph setup,

01:22:40.210 --> 01:22:42.350
you don't have to add
too many extra edges.

01:22:42.350 --> 01:22:44.110
Then you'll have
planarity and not

01:22:44.110 --> 01:22:45.401
have to worry about crossovers.

01:22:45.401 --> 01:22:47.150
And crossover, it
wouldn't have a clue

01:22:47.150 --> 01:22:50.839
how to do a crossover
in a problem like this.

01:22:50.839 --> 01:22:53.380
And other times, it just makes
your life a little bit easier,

01:22:53.380 --> 01:22:55.550
because you skip one gadget.

01:22:55.550 --> 01:22:58.130
But that is planar 3SAT.