WEBVTT

00:01.240 --> 00:07.840
Hello, in this section, we will discuss about sex, so first of all, let us see what a said is.

00:09.760 --> 00:18.490
Asset is the type of data structure which contains multiple elements, these elements are unordered

00:18.640 --> 00:19.780
like dictionaries.

00:20.200 --> 00:27.010
They do not have any fixed position like lists, and also the elements have to be unique in nature.

00:27.820 --> 00:36.760
So here we have two sets, A and B in this particular picture, the set, it contains four values,

00:37.060 --> 00:44.260
one, two, five and six, while the Set B contains three and nine.

00:45.190 --> 00:47.230
Here's the set.

00:47.230 --> 00:50.620
A and B do not contain any common values.

00:51.550 --> 00:56.260
And the entire data is called a universe.

00:56.920 --> 01:01.180
A universe is contained of a lot of six.

01:02.970 --> 01:05.370
Now, let us see this particular image.

01:05.580 --> 01:09.320
So here we have said it can be very sick.

01:09.400 --> 01:11.280
It is a complete.

01:12.710 --> 01:20.440
Set of values which are present in be so set me contains value one, two, three, four and five miles

01:20.450 --> 01:20.840
set.

01:20.840 --> 01:23.600
It contains value for two and one.

01:24.810 --> 01:35.640
Because the values presenting are also present in being is actually a subset of B. Riley B because it

01:35.640 --> 01:46.320
is larger than E, and it has values from A, it is called a superset, please, not for a sect to be

01:46.320 --> 01:51.480
a superset of E, it should contain all the elements present in.

01:53.050 --> 02:00.700
Or for it to be a subset of all the elements presenting it should be a part of the.

02:01.930 --> 02:11.290
Now, let us see another example here, if we consider that envy and get the values, the job doesn't

02:11.480 --> 02:13.380
involve envy.

02:13.600 --> 02:15.700
It is called a union office.

02:15.700 --> 02:24.880
And if they are interested in the values which are common between A and B, they are called an intersection

02:24.910 --> 02:34.720
of A and B, in case we want to find out values which are present only in A and are not pleasant.

02:34.720 --> 02:46.940
And B, this is called a difference of A and B a semantic difference is a union of A and B, and we'd

02:46.960 --> 02:50.220
surprise the intersection of envy from it.

02:50.530 --> 02:51.070
So.

02:52.260 --> 02:58.200
Semantic difference is union of in B minus the intersection of.

02:58.240 --> 03:01.530
And now let us see this with data.

03:02.400 --> 03:06.300
So here we have to set the uncute.

03:08.170 --> 03:17.950
The union of the MQ will be having elements from the uncute, so the Union of the Amcu will have values

03:17.950 --> 03:29.170
nine three six eight to enforce an intersection of A and B. So here an intersection of the N.

03:29.170 --> 03:32.020
Q will contain only six.

03:33.270 --> 03:37.250
Because sex is the only value which is common between being and.

03:38.670 --> 03:50.790
Now let's find out the difference between A and B. So here the minus Q will be only nine and three because

03:50.790 --> 03:54.660
sex is the only element which is present in both of you.

03:54.930 --> 03:58.820
So the difference between the and will be nine and three.

03:59.250 --> 04:06.100
If we subtract B from Q, then the difference will be eight, two and four.

04:06.990 --> 04:13.170
So the values of B minus Q and Q minus B are entirely different.

04:15.310 --> 04:22.960
The values of symmetry of difference will be nine, three, four to eight.

04:23.140 --> 04:28.470
That is the union of being equal minus the value of six.

04:28.660 --> 04:35.770
So the entire set, except for the value which is common between the two, is called the symmetric difference.

04:36.850 --> 04:39.670
Now, let us see how we can hold this in.

04:42.200 --> 04:53.450
So let us list down the features of sex also so it will be unordered.

04:56.080 --> 05:01.450
It will have unique values.

05:05.840 --> 05:06.650
And.

05:08.520 --> 05:10.470
It can have elements.

05:12.680 --> 05:16.010
All different data.

05:18.050 --> 05:20.520
Now let us see what all operations could be done.

05:20.780 --> 05:29.600
We can add value, we can remove a value, we can do union of different sects.

05:30.110 --> 05:34.310
We can find out the intersection between the sets.

05:34.670 --> 05:36.500
We can find the difference.

05:40.480 --> 05:42.430
And the cement.

05:43.960 --> 05:44.630
Patrick.

05:47.780 --> 05:50.990
Difference between two six.

05:53.410 --> 05:58.030
Now, let us see how we will do that, so let us create two sets.

06:04.240 --> 06:05.620
So let us create.

06:07.270 --> 06:18.470
A steady and steady the values were set and said B will be, let us say we will create it by creating

06:18.580 --> 06:25.390
daily basis and inside these gaudy places we will put in the values which we wanted to have.

06:25.400 --> 06:29.710
So let us say it has value a.

06:31.800 --> 06:32.400
We.

06:36.370 --> 06:37.240
Hi.

06:39.690 --> 06:40.350
S..

06:43.040 --> 06:47.150
D and let me have high.

06:49.340 --> 06:50.150
Ex.

06:53.410 --> 06:54.130
Why?

06:56.400 --> 07:00.490
Said and let us increase the number of common values.

07:01.110 --> 07:06.170
So let us have see also this one and let us have.

07:14.730 --> 07:19.890
And in this one, let us have the values X as.

07:21.360 --> 07:23.090
So let us run this.

07:23.480 --> 07:30.210
So here we can print tea so you can see it has all the values which we have created.

07:30.480 --> 07:40.490
Now let's see the type of E so the type of E said, let us try to add multiple values.

07:40.560 --> 07:44.550
So let let's try to add more X and more.

07:45.330 --> 07:53.940
So if you do this and let us see, the E will contain only one occurences of these values, no value

07:53.960 --> 07:55.200
will be repeated.

07:56.370 --> 08:03.840
Now, let us see how we can use different operators, so let us say we want to find out if a particular

08:03.840 --> 08:05.570
value is present in an sec.

08:06.060 --> 08:07.530
So let us check if.

08:10.210 --> 08:10.660
A.

08:11.830 --> 08:13.060
Is present in.

08:15.320 --> 08:15.630
Set.

08:17.030 --> 08:19.950
So when we done this, we get through as an answer.

08:20.210 --> 08:22.790
Now let us try another scenario.

08:23.720 --> 08:27.080
Let us check if he is present in a.

08:28.060 --> 08:29.980
So it gives back false.

08:32.370 --> 08:37.860
Now, let us say we want to add another value to our set so we can do that by.

08:38.880 --> 08:39.750
Steg.

08:41.040 --> 08:42.510
B Q are.

08:46.780 --> 08:51.190
And we want to do it so we will see a dot on.

08:55.080 --> 08:55.800
EQR.

08:57.060 --> 09:02.830
So we just want to add you are to the city and let us check again.

09:03.270 --> 09:11.550
So here you can see the value here has been added and there is no specific ordinance, so it just got

09:11.550 --> 09:12.150
added.

09:13.040 --> 09:20.040
At some position now, let us try to remove a particular value.

09:20.060 --> 09:28.220
So let's say we want to remove a particular value so we can save a dot and lose.

09:31.920 --> 09:39.600
Hi, so we are just trying to remove hi from this and then we'll print it so you can see we have successfully

09:39.600 --> 09:41.310
removed high from.

09:43.450 --> 09:50.560
Now, let's see if we want to trade on top of the set, then we can simply use for loop so we can say

09:50.560 --> 09:55.960
for Vul or any Weeble in the safety.

09:57.670 --> 09:59.400
And we can see Brent.

10:00.660 --> 10:01.290
Well.

10:03.480 --> 10:11.280
So it has printed the volumes I'm here, you can see that, although that is as it seems like there

10:11.280 --> 10:17.720
is an order present every time we print visitors printing A, B, C, D in alphabetical order.

10:17.940 --> 10:24.980
But when we actually try to trade on top of this particular set, the volumes are coming out randomly.

10:26.490 --> 10:28.840
So now let's try another thing.

10:29.250 --> 10:36.990
So let's try to do a union of these values, so for doing an onion, you can say let's create a new

10:36.990 --> 10:43.890
sexy and we can see is equal to a union.

10:46.190 --> 10:57.540
The latest princi, so here you can see when we did a union of A and C, it just gave the entire list

10:57.540 --> 11:06.450
of values that are present in and the world and combined it together and created the sexy for us.

11:06.600 --> 11:16.980
And you can see all the other values, C, D and X were common in A and B, but still the sexy does

11:16.980 --> 11:19.260
not contain multiple occurrences of this.

11:19.270 --> 11:21.840
There is only one occurrence of these values.

11:23.030 --> 11:31.780
Now, in case we want to find out an intersection, we can simply see a DOT intersection.

11:34.290 --> 11:34.740
B.

11:35.900 --> 11:43.520
And you can see we got the intersection values of A and B, which is C, V and X, which were common

11:43.520 --> 11:44.870
values, which we created.

11:46.250 --> 11:56.740
Now, in case you want to check, if a particular set is a subset of another set so we can use is subsid,

11:56.930 --> 12:01.970
so let us try to check if a dot is.

12:04.860 --> 12:11.370
Subset of B. So when you run this, you get a fall.

12:11.410 --> 12:14.110
So this means that is not a subset of B.

12:14.400 --> 12:23.640
Now remember, we created C and C was a union of E and B, so C contains all the elements of A and B.

12:23.970 --> 12:31.590
So if we say C, A subset of C.

12:34.720 --> 12:44.500
Sorry is subset of see, so it gives a true that is it is a subset of C and similarly if we try to do

12:44.500 --> 12:51.020
it on V, so which is a subset of C, it gives a true value.

12:51.700 --> 12:55.360
So this is how we can check if a value is a subset.

12:55.390 --> 13:03.730
Now if you want to check if OPSEC is a super sick of another set, we can do it by C dog is superset.

13:05.200 --> 13:15.910
Of the so it gives a true value, which means that is a superset of the now another thing which we can

13:15.910 --> 13:19.970
do is we can find out the difference and the symmetric difference.

13:20.290 --> 13:23.730
So let us try to find out the difference between A and B..

13:24.280 --> 13:28.190
So a dot difference.

13:30.910 --> 13:31.300
The.

13:33.380 --> 13:37.940
So we can get the values of a job as an only in a. and not in the.

13:39.180 --> 13:43.590
We can find out the difference.

13:45.180 --> 13:45.540
A.

13:47.080 --> 13:50.230
And let me bring the values of.

13:53.690 --> 13:59.790
A and B here's.

14:01.240 --> 14:03.850
So that you can see what other differences.

14:07.410 --> 14:17.790
So here you can see that the value of A is B, B, C, E, X and B, while the value of B is DC high,

14:17.820 --> 14:20.610
H, A, Z, X and Y.

14:20.790 --> 14:27.810
So here are the values which are present only in A are A, B and B QR.

14:29.230 --> 14:38.200
Similarly, here we are finding a difference of B minus E, so the values which are only present and

14:38.200 --> 14:44.110
B are high Y and Z, so that comes up with the result of.

14:45.050 --> 14:54.700
The difference now is they want to find out symmetric difference so we can do it by simply stating it

14:54.700 --> 14:57.110
not symmetric.

15:00.050 --> 15:01.370
Defense.

15:02.910 --> 15:03.390
The.

15:04.700 --> 15:14.300
And gives this value and we can simply find out we got symmetric defense.

15:17.060 --> 15:24.560
So here you can see that the symmetric defense is seen from either direction while defense has different

15:24.560 --> 15:28.660
values based on the value which we are subtracting it from.

15:28.670 --> 15:36.380
So subtracting B from E, then it has the values which are only present in A Anovia, subtracting E

15:36.380 --> 15:40.400
from B, then it has values which are present only in the.

15:41.480 --> 15:41.990
Thank you.
