Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:00,640 --> 00:00:08,880
hi okay so we're gonna move on now to satin's
transformation and for this we have two sets
2
00:00:08,880 --> 00:00:14,480
of materials for you so one of them is the
lecture slides here like your notes i meant
3
00:00:15,200 --> 00:00:19,120
and the second one is the lecture
slides here so the lecture slides
4
00:00:20,080 --> 00:00:26,400
well that's um divided into two parts the first
spot is going to be a little overview of satin
5
00:00:27,200 --> 00:00:33,520
transformation it gives you some intuition of
how it works uh with some animation as well but
6
00:00:33,520 --> 00:00:38,480
the second part will be on the pll algorithm
itself so we're gonna go through the lecture
7
00:00:38,480 --> 00:00:44,640
slides and i'm just gonna pull it up here so i
have this in keynotes um so let's go through that
8
00:00:46,720 --> 00:00:50,080
so yeah so the first thing we're going
to do now is we're going to look at
9
00:00:50,080 --> 00:00:59,920
saturn's transformation so the motivation
is that last time we have looked at um
10
00:01:00,560 --> 00:01:07,040
the following theorem that every formula
can be converted into both cnf and dnf yeah
11
00:01:08,000 --> 00:01:15,840
but if you remember how it works this
gives you an exponential blow up in general
12
00:01:15,840 --> 00:01:26,320
and here is uh in fact um a little example
where the little example of formula where
13
00:01:26,320 --> 00:01:36,800
the um the equivalent formula in dnf has to be
at most exponential size yeah so um uh i'm not
14
00:01:36,800 --> 00:01:41,840
gonna give you a proof for that but yeah so this
is uh something that i'm just going to leave it
15
00:01:42,880 --> 00:01:46,880
for you for homework and we will try to go
through this at some point in one of the
16
00:01:46,880 --> 00:01:55,760
following um one of the following lectures okay
so um now that we know assuming this we know that
17
00:01:56,640 --> 00:02:04,640
um the transformation the knife transformation uh
using distributivity yeah that we saw before using
18
00:02:04,640 --> 00:02:10,640
um using boolean algebra axioms yeah
will inevitably give you something
19
00:02:10,640 --> 00:02:15,440
that is of exponential size yeah so
the in fact yeah so the this uh this
20
00:02:16,160 --> 00:02:22,240
proposition here says that this is unavoidable
so you cannot find an equivalent formula in dnf
21
00:02:23,280 --> 00:02:31,520
that is of size that has to be of size that
is of size better than exponential and in fact
22
00:02:31,520 --> 00:02:37,200
the same thing can be proven if you want to go
from a formula to cnf because if you remember
23
00:02:37,840 --> 00:02:44,320
or and and they are dual yeah so you can actually
in fact um also show the same thing using um
24
00:02:45,200 --> 00:02:51,360
we can also show the same thing here
for the cnf um normal form okay so
25
00:02:52,160 --> 00:02:59,840
now if you remember resolution we've seen that
resolution only works on cnn formulas yeah
26
00:02:59,840 --> 00:03:06,560
and in fact modern set solvers
also work on cna formulas yeah and
27
00:03:09,360 --> 00:03:15,520
one way to achieve this is that is one
way to avoid this exponential blow up yeah
28
00:03:15,520 --> 00:03:21,120
to is to perform the so-called side since
transformation yeah so this is important
29
00:03:21,120 --> 00:03:26,880
because if you want to be able to just only work
on cnn formulas it is important to know that this
30
00:03:26,880 --> 00:03:34,880
um normal form yeah is general enough yeah that's
uh if you have a formula it doesn't require you to
31
00:03:34,880 --> 00:03:39,200
transform it into something that's exponentially
large before you can actually process it
32
00:03:39,200 --> 00:03:46,000
so this is an extremely important um [Music] this
is an extremely important prerequisite if you want
33
00:03:46,000 --> 00:03:52,320
to be able to make this kind of resolution and
all the uh modern sets all this work and if you
34
00:03:52,320 --> 00:03:59,360
um you've done a bit of uh programming in c3 yeah
and as you see i've noticed like okay i don't have
35
00:03:59,360 --> 00:04:07,040
to actually in fact convert anything to cnf or
anything yeah so but um z3 does this explicit uh
36
00:04:07,040 --> 00:04:13,440
implicitly for you okay but this is that is not
the case for modern set solvers yeah well i mean
37
00:04:13,440 --> 00:04:20,160
for some modifications they do this uh titan's
transformation automatically for you but in most
38
00:04:20,160 --> 00:04:26,880
cases you do need to actually do it yourself and
import in fact it is important for you to know um
39
00:04:26,880 --> 00:04:32,240
how this work but you know saturn transformation
is actually not very complicated but the key thing
40
00:04:32,240 --> 00:04:37,920
about sizes transformation is that it does
not produce a formula so this transformation
41
00:04:37,920 --> 00:04:43,520
does not produce a formula that is equivalent to
the original formula but it produces a formula
42
00:04:43,520 --> 00:04:50,240
that preserves satisfiability that is the output
is satisfiable if only the input is satisfiable
43
00:04:51,200 --> 00:04:56,640
and in order to do that we actually have
to as you will see the set of variables of
44
00:04:56,640 --> 00:05:01,040
these two formulas will actually not be
the same right so let's take a look at
45
00:05:01,840 --> 00:05:07,200
some examples how to do this so here is the
crux of the reduction we're going to show this
46
00:05:08,640 --> 00:05:15,760
by a little picture a little example with
some pictures so here's a formula um that is
47
00:05:15,760 --> 00:05:26,400
not in that it's not in cnf but it is close
to uh cnf so i mean here i depict the um
48
00:05:26,400 --> 00:05:32,400
parse tree of the formula but um so if you in
case you forgot how um the notion of parse tree
49
00:05:32,400 --> 00:05:38,880
formula so i can i'll just write it out for you
it's very intuitive here so um at the top here
50
00:05:40,240 --> 00:05:46,080
you have a conjunction of guys yeah and each
of the sub formula consists of this bit that
51
00:05:46,080 --> 00:05:51,120
bit and that bit okay so let me write it down
so you have conjunction of three sub formulas
52
00:05:51,120 --> 00:05:57,600
so the first one is hold
on a second so you have um
53
00:06:00,320 --> 00:06:12,640
not p or yeah so that's the first
conjunct and second conjunct is rp
54
00:06:19,120 --> 00:06:22,480
and then the third conjunct is not b or not q
55
00:06:24,240 --> 00:06:31,440
right okay so that's uh if you take a look at
this this is not really in cnf yet because of
56
00:06:31,440 --> 00:06:38,480
the because of this right so this is
not because of this thing here this
57
00:06:41,920 --> 00:06:50,160
the first conjunct is not yet a clause so um how
do we turn this into a clause so you can of course
58
00:06:50,160 --> 00:06:55,280
do the knife transformation and distributivity
but we're not going to do that we'll show you how
59
00:06:55,280 --> 00:07:00,480
to use the titan's transformation here and this
can be of course generalized to other examples
60
00:07:00,480 --> 00:07:07,360
so the first thing you need to do for scientist
transformation is you need to find a minimal
61
00:07:07,360 --> 00:07:12,240
non-literal sub formula so that is you want
to find out you remember the notion of sub
62
00:07:12,240 --> 00:07:17,360
formula before right so you want to find
a sub formula a minimum sub formula that
63
00:07:17,360 --> 00:07:22,080
is as small as possible but it should not be
a literal okay so it has to at least contain
64
00:07:23,600 --> 00:07:33,840
it has to at least contain an n or an or and the
first um and a minimalist non-literal sub formula
65
00:07:33,840 --> 00:07:42,000
well they're actually um um as you take a look
as you see here there are um in fact there are
66
00:07:42,640 --> 00:07:48,160
three types of non-literal sub-formula a minimal
non-literals of formulas and these are namely
67
00:07:53,120 --> 00:08:00,560
this one here one two three yeah these are
the three non-literal uh minimal non-literal
68
00:08:00,560 --> 00:08:09,200
subformulas so minimal here so this literally
means you have to have a conjunction or a disjunct
69
00:08:09,200 --> 00:08:15,920
conjunction of literals or disjunction of literals
and you have to at least have one um have you have
70
00:08:15,920 --> 00:08:24,320
to at least have one binary operation here okay
and um for our argument's sake here because if you
71
00:08:24,320 --> 00:08:29,520
take a look at this the closest this is almost
a sienna formula yeah because but only because
72
00:08:29,520 --> 00:08:36,640
of the first minimal non-literal subformula
here then this is actually not yet a cnf
73
00:08:37,280 --> 00:08:45,680
right in cnf so we pick that one right we pick
this guy and what we're gonna do next is we're
74
00:08:45,680 --> 00:08:53,680
gonna introduce a new variable yeah let's call it
x and we're gonna say that x is true if and only
75
00:08:53,680 --> 00:08:59,920
if this minimal non-linear subformula is true okay
so you will say so we'll introduce a new variable
76
00:08:59,920 --> 00:09:06,240
and assert that this is equivalent to this guy
here okay so we will um do that and if you take
77
00:09:06,240 --> 00:09:11,520
a look at this if and only if statement that it
is equivalent yeah so this would look like um
78
00:09:12,480 --> 00:09:19,360
the formula is uh what was it again
um i almost forgot let's take a look
79
00:09:21,440 --> 00:09:24,000
a little bit uh r and not q
80
00:09:26,480 --> 00:09:30,080
okay r not q so you want to say like x if only if
81
00:09:32,400 --> 00:09:39,520
r and not q yeah and if you take a look at
this accident leave r not q this is pretty much
82
00:09:39,520 --> 00:09:46,080
equivalent to a conjunction of this so um
if you expand this if and only if you into
83
00:09:47,600 --> 00:09:56,160
into if you remove the iphone leaf you basically
get the conjunction of f1 and f2 and f3 okay
84
00:09:56,160 --> 00:10:00,240
so uh you just simply have to
assert this if only statement yeah
85
00:10:00,240 --> 00:10:04,400
then you just simply have to put it at the
top here because you have the when i set
86
00:10:04,400 --> 00:10:09,280
top means top level which is here yeah so you
have to put it here and you just have to say
87
00:10:10,320 --> 00:10:15,600
x if and only if r and not q and of course each of
this thing you convert into a conjunction of these
88
00:10:15,600 --> 00:10:24,320
three guys f1 f2 and f3 and yeah that's pretty
much it so if uh have a look here this guy here
89
00:10:24,880 --> 00:10:32,800
that we just have replaced this is no longer
this is you you don't this is actually now
90
00:10:32,800 --> 00:10:38,400
just a single variable yeah so you don't uh you
don't have some form you don't have a minimal non
91
00:10:38,400 --> 00:10:46,720
literal um sub formula anymore it's just a single
variable now so the um the original formula itself
92
00:10:46,720 --> 00:10:54,160
that is uh uh excluding f1 f1 and f3 actually gets
smaller each time when you do this replacement
93
00:10:54,160 --> 00:11:00,240
right so that's pretty much um what you do and
this has to result in something that is equivalent
94
00:11:00,240 --> 00:11:06,000
uh equivalent in the sense that um uh something
that is uh that that preserves satisfiability
95
00:11:06,000 --> 00:11:11,920
because what you're really doing here is that you
take the original formula and you just replace it
96
00:11:11,920 --> 00:11:16,720
replace a particular subformula okay
it's gone and then you just basically
97
00:11:16,720 --> 00:11:20,560
say that this particular uh you replace it
with a new variable and you just have to
98
00:11:21,440 --> 00:11:26,880
somehow axiomatize this new variable you just
say that this new variable is true if and only
99
00:11:26,880 --> 00:11:33,360
if this is a formula is true right so this is um
intuitively how it works of course this requires a
100
00:11:33,360 --> 00:11:39,920
proof and we'll go through some the reason why
this is the case there is the proof for that
101
00:11:39,920 --> 00:11:48,480
in a bit of details uh later on but before that
let's take a look at some um some question here
102
00:11:50,480 --> 00:11:56,400
how big is the size of the output formula
if you do the following yeah so this uh of
103
00:11:56,400 --> 00:12:01,360
course requires you to think a little bit about
it yeah so you do in this case here yeah so you
104
00:12:01,360 --> 00:12:06,320
only you have just done one step right you have
only done one step uh of this replacement if
105
00:12:06,320 --> 00:12:14,160
only introduced a single variable but what can
you say here about the resulting formula well
106
00:12:15,600 --> 00:12:21,120
in general if you have a formula that is
more complex than this you will you might
107
00:12:21,120 --> 00:12:26,000
have to do this for every minimal non-literal
subformula and at some point if you keep doing
108
00:12:26,000 --> 00:12:33,200
this of course we will get into a a single
the case of a single literal yeah so um this
109
00:12:33,200 --> 00:12:37,840
procedure will eventually terminate at some point
because the original formula that is of course
110
00:12:39,200 --> 00:12:43,360
excluding the new conjuncts that we just
introduced just now f1 after and f3 here
111
00:12:44,960 --> 00:12:52,800
this will be this will this will get reduced
each time but what can you see now from the
112
00:12:54,000 --> 00:13:00,480
um from the from the construction here or from the
transformation if you keep doing this thing let's
113
00:13:00,480 --> 00:13:09,360
say you have formula of um let's say you have um
n boolean operators uh binary boolean operators
114
00:13:11,840 --> 00:13:15,200
so if you if you have that you
will have to at most perform
115
00:13:15,200 --> 00:13:22,240
and and times of this of this replacement right
and each time you perform this replacement
116
00:13:22,880 --> 00:13:28,800
you will introduce uh three coin jones well
sometimes you might you might have to you
117
00:13:28,800 --> 00:13:33,520
might have to um so yeah we have not gone through
the case of or but i will say that it's uh it's
118
00:13:33,520 --> 00:13:39,040
very similar in fact this will be less you have to
introduce i think only two conjuncts instead yeah
119
00:13:39,040 --> 00:13:45,680
but as you see here you each time you do this you
only you remove one part of the you remove a sub
120
00:13:45,680 --> 00:13:52,560
formula a minimal sub formula that is something
of size um so it has to be of a constant size yeah
121
00:13:53,600 --> 00:13:59,920
and you then have to replace this with the
formula of a constant size as well yeah so
122
00:13:59,920 --> 00:14:06,480
and then you have to do this n times yeah so um
because it's you do it n times then this has to
123
00:14:06,480 --> 00:14:13,120
be linear basically right so um the increase here
is actually linear so the resulting the resulting
124
00:14:13,120 --> 00:14:19,040
formula yeah after it's saturn's transformation
has to be linear in the size of the um
125
00:14:20,720 --> 00:14:27,600
of the original formula and also um you you also
have a you can also ask me the following question
126
00:14:27,600 --> 00:14:32,880
for example like okay so this resulting uh this
at the moment here this resulting formula this is
127
00:14:32,880 --> 00:14:38,960
this uh what do we need to do anything more here
so the answer is yes you can do more thing here
128
00:14:38,960 --> 00:14:45,760
you can actually keep going and apply
saturn's transformation but um here as you
129
00:14:45,760 --> 00:14:49,520
see here this is already in cnf so you
can stop as soon as you hit the cnf okay
130
00:14:50,080 --> 00:14:58,720
so um that's pretty much the general overview
of that of the of saturn's transformation
131
00:14:58,720 --> 00:15:03,600
yeah with a picture and also i told you the
size is uh is linear but let's go through some
132
00:15:03,600 --> 00:15:09,680
details now um just so that you get well i guess
you can get a bit more intuition and also the
133
00:15:09,680 --> 00:15:16,000
you can also see why this is uh this relief is of
satisfiability so for this i need to go um switch
134
00:15:17,200 --> 00:15:24,560
to a different window so let's open
this up so this is the node from
135
00:15:24,560 --> 00:15:29,120
here yeah and i'm gonna open this in
a different window which is this one
136
00:15:37,760 --> 00:15:39,840
okay
137
00:15:45,040 --> 00:15:53,840
right so let's go through a bit more
details on titan's transformation
138
00:15:56,960 --> 00:15:59,680
so firstly
139
00:16:02,720 --> 00:16:08,400
remember we want to produce given a formula that
is not necessarily in cnn if we want to produce a
140
00:16:08,400 --> 00:16:15,120
formula cnf that is equally satisfiable that is
it preserves satisfiability in other words the
141
00:16:15,120 --> 00:16:21,520
original formula is satisfiable if and only the
output formula is satisfiable and the output is
142
00:16:21,520 --> 00:16:28,160
going to be linear in this house with the original
formula so we assume now that the input operators
143
00:16:29,200 --> 00:16:36,800
are only not or or n yeah and we assume
that this is already in n f okay so
144
00:16:36,800 --> 00:16:43,360
because we saw before that the transformation to n
f is pretty simple and this is uh also also linear
145
00:16:45,040 --> 00:16:51,960
so also recall that we've defined the notion
of subformulas yeah so this is uh [Music]
146
00:16:53,520 --> 00:16:56,320
so this is also written here just for convenience
147
00:17:00,400 --> 00:17:07,040
so i've mentioned the notion that a formula
um that we that sighting transformation
148
00:17:07,760 --> 00:17:13,920
replaces minimal non literal sub formulas
each time yeah so here is the definition
149
00:17:13,920 --> 00:17:20,480
formal definition of um minimal non-literal sub
formula so as a formula is minimal non-literal
150
00:17:22,640 --> 00:17:29,840
so minimal sub formula is said to be minimal
non-literal if it's of the following form here
151
00:17:31,120 --> 00:17:34,960
l dot l prime where l and l prime are literals
152
00:17:34,960 --> 00:17:39,200
and dot here is n or or okay so as i
mentioned to you this always has to be
153
00:17:41,120 --> 00:17:47,520
basically it means that you have a conjunction
or a disjunction of two of two literals yeah um
154
00:17:47,520 --> 00:17:54,080
so this is also this also explains why we had
this um if you remember we had three different
155
00:17:55,680 --> 00:18:01,200
um we have we have three different minimal
non-literal sub formulas before in our
156
00:18:01,840 --> 00:18:08,480
in our example on the slides so uh saturn's
transformation as i mentioned so this works
157
00:18:08,480 --> 00:18:15,600
recursively you replace a minimal non-literal
sub formula by a new variable and then you're
158
00:18:15,600 --> 00:18:24,480
gonna assert that this new variable is equivalent
to the um is equivalent to the um the formula that
159
00:18:24,480 --> 00:18:29,760
you replace it with so equivalent here simply
means if and only if yeah so i use the so be
160
00:18:30,560 --> 00:18:36,800
be careful here by uh when i when i wrote the
uh when i when i say equivalent here okay so
161
00:18:36,800 --> 00:18:43,280
this simply just says x if only if psi okay so
this is an axiomatization of psi so to speak
162
00:18:44,960 --> 00:18:52,400
okay so um basically if you want to formalize this
thing so what you do here is that initially so you
163
00:18:52,400 --> 00:18:58,320
you you have this set of formulas that you
carry around initially you set this to be
164
00:18:58,320 --> 00:19:07,680
an empty set and what you're gonna do is you're
gonna while you recursively replace an unliteral
165
00:19:07,680 --> 00:19:17,120
sub formula l dot l prime by phi okay uh of by a
new variable x you always add this axiomatization
166
00:19:17,120 --> 00:19:25,360
that is uh the um the formula that asserts this is
uh that this actually defines this l dot l prime
167
00:19:25,360 --> 00:19:35,360
yeah x defines l dot l prime you add this formula
to c okay so there are two cases of course uh so
168
00:19:35,360 --> 00:19:38,880
i'm gonna let's go through this one by one
so this is actually the case that we you
169
00:19:38,880 --> 00:19:43,760
um we went through already so in the case
of uh that the for the the operator is n
170
00:19:44,560 --> 00:19:53,680
this contains precisely the following clauses yeah
here the following three clauses here now this
171
00:19:53,680 --> 00:19:59,440
simply of course uh if you take a look at these
three clauses here this simply just says that
172
00:19:59,440 --> 00:20:08,480
x if and only if l dot l prime and if you expand
this thing this is says this is equivalent to
173
00:20:09,440 --> 00:20:14,800
this first formula and the second formula and the
third formula okay so you just remove the ethan
174
00:20:14,800 --> 00:20:21,360
leaf and the same goes here with the second case
yeah so this is basically just an expansion of
175
00:20:21,360 --> 00:20:30,640
the formula x if and only if l or l prime okay so
you get these three clauses here yeah so that's um
176
00:20:31,680 --> 00:20:36,080
that basically you here you do this isn't
it really just an equivalent formula
177
00:20:37,680 --> 00:20:41,920
okay so so this is what i explained here as well
178
00:20:44,960 --> 00:20:52,160
and as i mentioned to you this procedure
terminates at some point because yeah because
179
00:20:52,160 --> 00:20:58,720
you because the formula fi you keeps reducing
it each time you remove at least one binary
180
00:20:58,720 --> 00:21:03,760
operator so at some point so if you keep doing
this thing the original formula will get reduced
181
00:21:04,640 --> 00:21:10,880
further and further and at some point you will
have no binary operator anymore and in that case
182
00:21:10,880 --> 00:21:18,320
you stop yeah so the formula stops when you have
only um when you end up with the single literal
183
00:21:23,680 --> 00:21:29,840
so let's go through a little
example which is this one
184
00:21:34,000 --> 00:21:43,200
so if you have a look at this formula here
let's take let's try to first identify what the
185
00:21:43,200 --> 00:21:48,720
minimal literal not sub formulas minimal
non-literal sub formulas are in this case you
186
00:21:48,720 --> 00:21:54,000
only have a single non-literal a minimal a single
minimal non-literal sub formula which is this
187
00:21:54,720 --> 00:22:04,880
y n set yeah so uh what you do here is um
firstly you start with phi and c0 is empty set
188
00:22:04,880 --> 00:22:12,400
what we do here is we initially replace y and
z yeah by a new variable so this is uh the only
189
00:22:12,400 --> 00:22:23,760
possibility here so um in this case we obtain we
follow the recipe here so you have y and z yeah so
190
00:22:23,760 --> 00:22:30,960
you if you just look at this c1 that is you have
to add this three guys with this l and l prime uh
191
00:22:30,960 --> 00:22:37,600
appropriately you cover this appropriately yeah
using this what you get here is the following
192
00:22:39,280 --> 00:22:49,200
um not x1 so you use x x1 instead of x yeah
so you have not x1 or y not x1 or that uh
193
00:22:50,240 --> 00:22:57,520
not y or not z or x1 yeah so this is
basically using this recipe here now oops
194
00:23:01,440 --> 00:23:08,560
right so we add this three clauses
into c c0 and you get c1 yeah um
195
00:23:08,560 --> 00:23:15,600
and the formula here phi f um phi one so
i wrote it in uh as x implies x one but
196
00:23:15,600 --> 00:23:22,320
actually that just simply uh means not x or
um x one of course yeah it's the same thing
197
00:23:23,120 --> 00:23:28,240
so now we're going to replace this
not x or x1 by any variable x2
198
00:23:30,640 --> 00:23:38,080
and we in to do this we're going add we're
gonna do the same thing but then we have this
199
00:23:38,080 --> 00:23:48,480
um we have this three clauses here that we add so
let's take a look again here so what what do we
200
00:23:48,480 --> 00:23:58,240
have so we have not x or x1 yeah so we follow the
recipe here so you have x2 uh let's have a look
201
00:23:58,240 --> 00:24:07,040
so you have not x2 or l l in this case is not
x1 or l prime l prime in this case is x1 yeah
202
00:24:07,760 --> 00:24:16,880
and then you have not l or x not l is uh so l here
is not x of course so not l here will be x yeah
203
00:24:17,440 --> 00:24:21,760
and the same thing goes with the last one right
so you add this thing to c therefore you obtain
204
00:24:21,760 --> 00:24:33,200
phi 2 equals x 2 and c 2 here is uh not x 1 or y
so basically you just skip you add everything here
205
00:24:33,200 --> 00:24:39,440
to the um to c1 so you get this bigger uh bigger
set of constraints yeah so the output formula here
206
00:24:39,440 --> 00:24:48,880
in this case is simply just um um the conjunction
of this clause in c2 yeah and of course
207
00:24:51,040 --> 00:24:56,400
you have the formula you conjunct that with
the formula of i2 yeah so you have this formula
208
00:24:56,400 --> 00:25:02,880
here yeah so remember phi 2 here is already
a single formula yeah so you only get x2 yeah
209
00:25:02,880 --> 00:25:12,000
so that's uh basically uh the end of saturn's
transformation here so uh one question that you
210
00:25:12,000 --> 00:25:17,120
should think about um right now is the following
do you really need to end up do you really need to
211
00:25:17,120 --> 00:25:23,120
keep doing this thing until the very end when you
apply certain transformation that is do you really
212
00:25:23,120 --> 00:25:29,200
need to get rid of all the boolean binary uh
binary boolean operators from the original formula
213
00:25:29,920 --> 00:25:33,520
well the answer is well this really
depends on what you try to do yeah so
214
00:25:33,520 --> 00:25:40,080
this works of course for um set solving okay
that this will transform something to cnf and
215
00:25:40,080 --> 00:25:45,520
yeah i mean you but the the thing is that this
is something transformation that works in general
216
00:25:46,160 --> 00:25:50,160
so if you want to tailor this thing
for set solving for our purposes
217
00:25:51,360 --> 00:25:56,400
it is um one thing to notice of course is that
you don't you you can actually you don't really
218
00:25:56,400 --> 00:26:02,240
need to go until the end you can stop as soon
as the original formula that is this physe yeah
219
00:26:02,800 --> 00:26:08,000
become that that is already in cnf yeah so
for example if you take a look at this this
220
00:26:08,000 --> 00:26:12,160
formula this little formula here this is
of course not in cnf this is in dnf yeah
221
00:26:12,800 --> 00:26:19,040
but the second one here the phi one oh sorry not
if i one here yeah so this phi one here this is
222
00:26:19,040 --> 00:26:23,440
already a formula in cnf right because this is a
single clause so you could actually have stopped
223
00:26:23,440 --> 00:26:30,320
here but i just showed you that we can actually
continue um just for the purpose of illustration
224
00:26:31,520 --> 00:26:36,800
yeah but if you want to use this if you're
asked for example to transform this to cnf
225
00:26:36,800 --> 00:26:41,280
you could have stopped here and of course there
are um again one thing the other thing that is
226
00:26:41,280 --> 00:26:48,080
important is that there are at any given moment
there could be multiple options for this minimal
227
00:26:48,080 --> 00:26:54,640
non-literal sub formulas and you can pick
different ones yeah but um in general you
228
00:26:54,640 --> 00:26:59,760
yeah this is uh you know this is a non this is not
deterministic engine so you can pick any one of
229
00:26:59,760 --> 00:27:05,520
them but if you want to for you're asked to do
this and if you want to do this really well of
230
00:27:05,520 --> 00:27:10,800
course you there are certain choices that could
lead you to smaller formulas of course yeah so
231
00:27:10,800 --> 00:27:15,680
smaller in the sense yeah i mean you know they
are still like only linearly bigger but they are
232
00:27:15,680 --> 00:27:20,960
actually in fact um i mean if you just look at the
number of variables for example this can minimal
233
00:27:20,960 --> 00:27:25,360
you can actually minimize the number of variables
and of course in the exam you don't really need to
234
00:27:26,720 --> 00:27:30,960
carry it out until the end you just need to
stop as soon as it becomes a formula in cnf
235
00:27:31,520 --> 00:27:35,120
so you you need to experiment a little
bit yeah and to see what kind of uh
236
00:27:35,760 --> 00:27:43,840
what kind of choices will lead you to a more
optimal formula a smaller formula okay so that's
237
00:27:43,840 --> 00:27:48,320
titan's transformation that's the description
of the recursive procedure so we're going to
238
00:27:49,280 --> 00:27:55,680
prove this little theorem now that titan's
transformation is satisfiability preserving
239
00:27:59,120 --> 00:28:02,320
and in order to prove this this is something
240
00:28:02,320 --> 00:28:05,680
this theorem follows from the more
general the falling more general lemma
241
00:28:06,640 --> 00:28:15,840
and this is what the lemma says so let me try to
give you a little illustration here what's oops
242
00:28:17,920 --> 00:28:24,320
so what does it say here so suppose you have
a formula phi so let me just draw this formula
243
00:28:25,840 --> 00:28:31,680
and so suppose you have this formula
phi and you have this sub formula psi
244
00:28:33,840 --> 00:28:38,560
and you pick a variable x that
does not appear in phi okay
245
00:28:41,360 --> 00:28:47,360
so the lemma here says that you can
replace psi by x and assert that
246
00:28:48,240 --> 00:28:53,840
x is equivalent or x if only psi yeah
so this this new formula is uh phi prime
247
00:28:54,880 --> 00:29:02,080
so i'm just gonna put this one
like this basically this is the
248
00:29:05,680 --> 00:29:06,320
phi yeah
249
00:29:10,000 --> 00:29:15,200
so this is phi x is used to
replace your replaces by x
250
00:29:18,560 --> 00:29:20,000
yeah and
251
00:29:22,080 --> 00:29:30,080
x if and only if psi that's formula um
prime so this is equivalent so this is um
252
00:29:30,080 --> 00:29:36,560
this formula phi prime so for any
interpretation i that satisfies x if only if psi
253
00:29:36,560 --> 00:29:47,040
that that satisfies this maximization we have that
this interpretation cannot be distinguished by
254
00:29:47,040 --> 00:29:54,720
the formula phi and phi prime so the formula phi
and phi prime agree on the interpretation i okay
255
00:29:55,680 --> 00:30:00,960
and in particular phi satisfiable
if only if i prime is satisfiable
256
00:30:01,760 --> 00:30:10,560
okay so let's try to take a uh proof uh a look at
the proof of that and one thing here that i wrote
257
00:30:10,560 --> 00:30:16,640
down for the proof it is important to firstly
recall the substitutions theorem so this is
258
00:30:16,640 --> 00:30:22,480
actually an application of substitution theorem
but you in fact you need to first kind of look at
259
00:30:22,480 --> 00:30:25,920
a general version of the substitution theorem
and this is i'm just going to state it here
260
00:30:28,480 --> 00:30:36,240
basically this two lines here the last two lines
of the first paragraph it says that suppose you
261
00:30:36,240 --> 00:30:49,840
take a formula f yeah and um and you have so
let me just draw it here so you take a formula f
262
00:30:52,640 --> 00:30:57,680
okay and then you have um maybe i
just take different this different
263
00:30:59,760 --> 00:31:08,720
this h here so in different places okay so you
have uh f and then you have the sub formulas h
264
00:31:08,720 --> 00:31:19,040
here suppose i take some uh some formula g yeah
uh so i just take another formula g yeah and
265
00:31:20,480 --> 00:31:27,600
i plug this g into f here so i replace
h by g so i get something like this f
266
00:31:31,280 --> 00:31:36,080
okay so maybe i'll just draw it
like this now okay so this is g now
267
00:31:39,200 --> 00:31:46,000
so this is g and this is g yeah so here we make
an assumption that uh so take any interpretation
268
00:31:46,000 --> 00:31:57,120
i yeah that's um that agrees on g and h yeah so um
that is i satisfies g infinitely if i satisfies h
269
00:31:59,200 --> 00:32:09,600
then this formula this interpretation i cannot
really distinguish f uh cannot distinguish this uh
270
00:32:09,600 --> 00:32:16,640
this second formula here that is obtained by
replacing every current of h by g and the original
271
00:32:16,640 --> 00:32:21,120
formula f here yeah so this is the original
formula f so they cannot really distinguish
272
00:32:21,120 --> 00:32:29,200
these two formulas so they uh they will agree on
this uh on on this interpretation okay so into
273
00:32:29,200 --> 00:32:34,080
intuitively it is quite clear yeah because
you know so you take an interpretation i so
274
00:32:34,640 --> 00:32:41,840
this uh the definition of satisfaction of course
in defined in terms of um is defined recursively
275
00:32:41,840 --> 00:32:47,600
right and when you hit when you look at this uh
this definition of interpretation this eventually
276
00:32:47,600 --> 00:32:56,000
goes to um this eventually goes to the subformula
h right and in this case h and g they're really
277
00:32:56,000 --> 00:33:03,280
they really really agree on each other um on this
interpretation i so they cannot be distinguished
278
00:33:03,280 --> 00:33:11,120
by i so they have to um the bigger the bigger guy
that is f and f g h they have to agree on i that's
279
00:33:11,680 --> 00:33:18,800
that's intuitively uh what happens here okay so
um so we're going to make an assumption uh we're
280
00:33:18,800 --> 00:33:27,280
going to make this uh [Music] um we can assume
this general statement of the substitution theorem
281
00:33:29,440 --> 00:33:39,040
so how do we prove the lemma here um from
the uh from the uh from this generalization
282
00:33:39,040 --> 00:33:43,280
of substitution theorem so let's try
to prove that so here is the proof
283
00:33:45,600 --> 00:33:53,520
let me try to just erase this thing for
us right okay so let's try to prove this
284
00:33:56,080 --> 00:34:01,600
so in order to prove this we
consider an interpretation i that
285
00:34:02,880 --> 00:34:08,080
satisfies x if it only if psi
so we use the assumption here
286
00:34:10,560 --> 00:34:15,200
and we need to prove that i cannot
distinguish phi and phi prime yeah
287
00:34:18,960 --> 00:34:27,280
so let's try to prove this so the assumption
here yeah so this is this the assumption so i
288
00:34:27,280 --> 00:34:34,080
satisfies x if and only psi so this is the
same as saying i satisfies x if only if i
289
00:34:34,080 --> 00:34:40,800
satisfies psi yeah so this is an assumption of
the interpretation that we meant that we take and
290
00:34:45,360 --> 00:34:54,160
so do we have here so let's make use of the
substitutions uh this generalization of the
291
00:34:54,160 --> 00:35:02,800
substitution theorem that is here so we
have um this is this one right okay so
292
00:35:03,840 --> 00:35:11,200
basically this says that if you look at this
part here this simply says that i satisfies
293
00:35:12,560 --> 00:35:21,280
um i satisfy the formula phi where psi is
replaced by x yeah if and only if i satisfies phi
294
00:35:21,280 --> 00:35:29,840
okay so this is the just the corollary of this of
this generalization of the substitution theorem so
295
00:35:34,400 --> 00:35:42,000
so if we so now we gonna prove it uh from
left to right and from and then afterwards
296
00:35:42,000 --> 00:35:47,120
from right to left there so we take uh from
right to left here which is basically the spot
297
00:35:48,160 --> 00:35:54,400
yeah so from right to uh sorry left
to right so you have i implies 5
298
00:35:56,160 --> 00:36:02,400
basically you now go through this you take a look
at this this just says that then you will have to
299
00:36:02,400 --> 00:36:15,120
have i satisfies this will i will just put a
star here yeah so this means i satisfies phi x
300
00:36:18,160 --> 00:36:30,480
phi x i but this thing is nothing but um this is
a sub formula of phi prime and if you remember if
301
00:36:30,480 --> 00:36:39,840
you want to prove i satisfies phi prime you need
to prove that i satisfies this and i satisfies
302
00:36:41,840 --> 00:36:49,840
x if and only if psi yeah so this is uh the
thing that you need to prove but actually
303
00:36:49,840 --> 00:36:55,120
that is actually already one of the that's
already um that you already assume here yeah
304
00:36:57,120 --> 00:36:58,000
in the assumption here
305
00:37:00,800 --> 00:37:07,840
so therefore we have that i this is by assumption
306
00:37:12,720 --> 00:37:18,720
f i satisfies phi prime okay so this is from
left to right and from right to left now
307
00:37:20,240 --> 00:37:24,560
this is written here and this act this
part actually is easier i satisfies
308
00:37:24,560 --> 00:37:27,760
phi prime and you want to
prove now that i satisfies phi
309
00:37:27,760 --> 00:37:35,920
so how do you show that well i satisfies phi
prime so if you look at phi prime again here so
310
00:37:35,920 --> 00:37:43,840
this consists of it consists of two parts and so
the first part is uh phi so i satisfies phi prime
311
00:37:46,000 --> 00:37:52,800
well this one here is just uh phi x psi and x
312
00:37:54,320 --> 00:38:11,600
psi right psi so this is basically uh this would
imply that i satisfies phi x i yeah and we can now
313
00:38:12,240 --> 00:38:17,880
make use of the generalization of the
substitution theorem again here yeah that [Music]
314
00:38:20,160 --> 00:38:25,600
this would imply that uh i would just
put um what's a symbol here to use
315
00:38:28,480 --> 00:38:31,840
yeah so i will just put a star again
316
00:38:34,400 --> 00:38:40,880
yeah so this would imply that i satisfy spy
alrighty so this is a corollary of the um
317
00:38:41,680 --> 00:38:47,280
this star of course as you saw this is a crawlery
of the generalization of the substitutions theorem
318
00:38:47,280 --> 00:38:56,240
so that's pretty much it for this uh first part
of the oops i will put this double star so for uh
319
00:38:57,360 --> 00:39:01,760
for the first part of lemma one so in order to
prove that phi satisfiable if and only five prime
320
00:39:01,760 --> 00:39:11,280
is satisfiable you just need to define the uh the
interpretation i yeah basically by looking at the
321
00:39:11,840 --> 00:39:21,280
um by setting the um the variable the new variable
to be one if and only this satisfies the the the
322
00:39:21,280 --> 00:39:28,160
the given interpretation i satisfies satisfies
as a formula in the original formula so this is i
323
00:39:28,160 --> 00:39:37,520
x equals one if finally if i satisfy psi here yeah
so that's that's pretty much it okay so um yeah
324
00:39:37,520 --> 00:39:45,920
so that's pretty much the proof of this lemma
one and of course this would imply that um the
325
00:39:48,080 --> 00:39:52,400
uh theorem one that satins transformation
is satisfiability preserving because what
326
00:39:52,400 --> 00:39:56,800
you're doing here really is that
your this is a single step of the
327
00:39:56,800 --> 00:40:01,760
of satins transformation and then you each
so this is in some sense you would call this
328
00:40:01,760 --> 00:40:08,480
an invariant yeah so each time you perform
this transfer replacement each step of tyson
329
00:40:08,480 --> 00:40:15,280
transformation preserves this environment
and at the end this basically you will get
330
00:40:17,440 --> 00:40:21,520
the final one will be satisfiable if
not the original one is satisfiable
331
00:40:21,520 --> 00:40:25,120
because each of the steps is
satisfiably preserving okay
42020
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.