00:01
Okay, so we want to express a brute force algorithm that determines if there is a disjoint pair in these subsets so i have this code right here and you can look at it, but i'll kind of describe this code holistically i'll describe what we're doing holistically and i'll describe the code as we go so first thing that we'll do is we first assume that there is no this this joint o -i -n pairs so we assume that we assume that there is no disjoints that there is no different pairs and as we run the code we want to prove otherwise.
00:36
So this whole code is proving that there is one destroyed pairs.
00:41
So the first thing that we do is we have s1, s2 and blah blah blah to sn.
00:48
So first thing that we'll do is we'll compare is s1 destroyed to s2, is s1 destroyed to s3 all the way down to sn.
00:57
And suppose that none of these are distraint.
01:01
So we then have to go to s2.
01:04
And we have to see if s2 is this joint with s3, s4, blah, blah, all the way to sn.
01:10
So now it's important that we don't actually compare to s1 because we've, yeah, we don't compare to s1 here because we've already compared s2 to s1 here already.
01:20
And you have to do the same thing for s4 compared to s5 and blah blah, blah, all the way to sn, then we compare sn minus 1 to sn.
01:28
This is our last one.
01:31
So that's what this first four loop does.
01:36
This line here, that's what this line does.
01:37
This first line loops through s1, s2, s4 to sn.
01:42
What is s3, sorry, s3 is s3, this is 4.
01:45
So that's from 1 to n minus 1...