videos/02-algo3.srt
author Christian Urban <christian.urban@kcl.ac.uk>
Fri, 03 Dec 2021 22:07:11 +0000
changeset 857 2b11eb06af76
parent 774 42733adf2a48
permissions -rw-r--r--
updated
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
     1
1
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
     2
00:00:06,350 --> 00:00:10,305
774
42733adf2a48 updated
update
parents: 773
diff changeset
     3
Welcome come back. I
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
     4
can hear you saying,
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
     5
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
     6
2
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
     7
00:00:10,305 --> 00:00:12,000
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
     8
yes, you tried it out on
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
     9
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    10
3
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    11
00:00:12,000 --> 00:00:14,760
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    12
one example and you
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    13
were much better.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    14
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    15
4
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    16
00:00:14,760 --> 00:00:17,415
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    17
But how about on other examples?
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    18
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    19
5
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    20
00:00:17,415 --> 00:00:21,265
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    21
Specifically, we had two
774
42733adf2a48 updated
update
parents: 773
diff changeset
    22
evil regular expressions.
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    23
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    24
6
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    25
00:00:21,265 --> 00:00:23,480
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    26
How about the other case?
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    27
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    28
7
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    29
00:00:23,480 --> 00:00:27,480
774
42733adf2a48 updated
update
parents: 773
diff changeset
    30
Well, let's have a look at
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    31
that other case in this video.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    32
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    33
8
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    34
00:00:29,140 --> 00:00:32,705
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    35
So I'm back here
774
42733adf2a48 updated
update
parents: 773
diff changeset
    36
in this re2.sc file.
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    37
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    38
9
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    39
00:00:32,705 --> 00:00:35,180
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    40
And here's this test
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    41
case which run quite
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    42
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    43
10
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    44
00:00:35,180 --> 00:00:39,665
774
42733adf2a48 updated
update
parents: 773
diff changeset
    45
nicely for strings between 0 and 1000.
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    46
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    47
11
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    48
00:00:39,665 --> 00:00:42,725
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    49
Here is the other test case.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    50
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    51
12
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    52
00:00:42,725 --> 00:00:44,090
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    53
I still run it only
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    54
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    55
13
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    56
00:00:44,090 --> 00:00:48,470
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    57
for relatively small
774
42733adf2a48 updated
update
parents: 773
diff changeset
    58
strings between 0 and 20.
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    59
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    60
14
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    61
00:00:48,470 --> 00:00:50,240
774
42733adf2a48 updated
update
parents: 773
diff changeset
    62
And let's see what it says.
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    63
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    64
15
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    65
00:00:50,240 --> 00:00:51,800
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    66
So I'm running the test in
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    67
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    68
16
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    69
00:00:51,800 --> 00:00:57,320
774
42733adf2a48 updated
update
parents: 773
diff changeset
    70
the Amoonite REPL and it 
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    71
doesn't look too bad.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    72
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    73
17
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    74
00:00:57,320 --> 00:01:01,160
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    75
But this might be because
774
42733adf2a48 updated
update
parents: 773
diff changeset
    76
20 is not generous enough.
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    77
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    78
18
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    79
00:01:01,160 --> 00:01:03,620
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    80
So let's try it with 30.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    81
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    82
19
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    83
00:01:03,620 --> 00:01:06,530
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    84
Let's run this test again.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    85
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    86
20
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    87
00:01:06,530 --> 00:01:11,075
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    88
And 20 is quite okay.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    89
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    90
21
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    91
00:01:11,075 --> 00:01:15,965
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    92
22, okay, that's now
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    93
almost ten times as much.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    94
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    95
22
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    96
00:01:15,965 --> 00:01:18,995
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    97
And then the next
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    98
one would be 24.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    99
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   100
23
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   101
00:01:18,995 --> 00:01:23,615
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   102
And we're waiting and waiting.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   103
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   104
24
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   105
00:01:23,615 --> 00:01:26,410
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   106
And we are waiting.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   107
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   108
25
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   109
00:01:26,410 --> 00:01:29,300
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   110
Actually, it isn't
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   111
calculated at all.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   112
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   113
26
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   114
00:01:29,300 --> 00:01:31,399
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   115
It run out of memory.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   116
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   117
27
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   118
00:01:31,399 --> 00:01:33,905
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   119
So here is something going on,
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   120
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   121
28
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   122
00:01:33,905 --> 00:01:37,640
774
42733adf2a48 updated
update
parents: 773
diff changeset
   123
which is definitely bad and we
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   124
have to have a look at that.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   125
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   126
29
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   127
00:01:37,640 --> 00:01:40,640
774
42733adf2a48 updated
update
parents: 773
diff changeset
   128
It's always
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   129
instructive with
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   130
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   131
30
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   132
00:01:40,640 --> 00:01:43,460
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   133
this algorithm to
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   134
look at the sizes of
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   135
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   136
31
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   137
00:01:43,460 --> 00:01:45,695
774
42733adf2a48 updated
update
parents: 773
diff changeset
   138
the regular expressions
42733adf2a48 updated
update
parents: 773
diff changeset
   139
we calculate.
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   140
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   141
32
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   142
00:01:45,695 --> 00:01:49,625
774
42733adf2a48 updated
update
parents: 773
diff changeset
   143
The EVIL2 is this
42733adf2a48 updated
update
parents: 773
diff changeset
   144
a star, star b.
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   145
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   146
33
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   147
00:01:49,625 --> 00:01:51,800
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   148
So there's nothing we
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   149
can compress there.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   150
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   151
34
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   152
00:01:51,800 --> 00:01:55,490
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   153
It has just stars and
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   154
sequences and nothing else.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   155
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   156
35
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   157
00:01:55,490 --> 00:01:58,430
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   158
And so it's not that we
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   159
can play the same trick
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   160
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   161
36
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   162
00:01:58,430 --> 00:02:01,805
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   163
of trying to introduce
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   164
an explicit constructor.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   165
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   166
37
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   167
00:02:01,805 --> 00:02:04,190
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   168
But now let's have a
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   169
look at the derivatives.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   170
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   171
38
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   172
00:02:04,190 --> 00:02:05,600
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   173
As you can see here.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   174
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   175
39
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   176
00:02:05,600 --> 00:02:08,420
774
42733adf2a48 updated
update
parents: 773
diff changeset
   177
If I take this EVIL2 regular
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   178
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   179
40
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   180
00:02:08,420 --> 00:02:09,935
774
42733adf2a48 updated
update
parents: 773
diff changeset
   181
expression and then build
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   182
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   183
41
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   184
00:02:09,935 --> 00:02:12,470
774
42733adf2a48 updated
update
parents: 773
diff changeset
   185
longer and
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   186
longer derivatives,
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   187
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   188
42
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   189
00:02:12,470 --> 00:02:14,090
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   190
you can see this grows.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   191
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   192
43
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   193
00:02:14,090 --> 00:02:16,055
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   194
And as you see in this line,
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   195
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   196
44
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   197
00:02:16,055 --> 00:02:17,270
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   198
if I'm trying to take
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   199
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   200
45
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   201
00:02:17,270 --> 00:02:20,180
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   202
the derivative of a
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   203
quite large string,
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   204
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   205
46
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   206
00:02:20,180 --> 00:02:21,680
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   207
it is quite quick.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   208
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   209
47
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   210
00:02:21,680 --> 00:02:26,870
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   211
But the size of the
774
42733adf2a48 updated
update
parents: 773
diff changeset
   212
regular expression,
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   213
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   214
48
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   215
00:02:26,870 --> 00:02:28,310
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   216
the number of nodes,
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   217
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   218
49
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   219
00:02:28,310 --> 00:02:30,815
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   220
is also like nearly
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   221
eight millions.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   222
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   223
50
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   224
00:02:30,815 --> 00:02:33,845
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   225
And so even if that calculates
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   226
relatively quickly,
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   227
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   228
51
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   229
00:02:33,845 --> 00:02:37,865
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   230
that is the reason why at 24,
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   231
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   232
52
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   233
00:02:37,865 --> 00:02:39,560
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   234
it just runs out of memory.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   235
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   236
53
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   237
00:02:39,560 --> 00:02:42,785
774
42733adf2a48 updated
update
parents: 773
diff changeset
   238
This regular expression
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   239
just grew too much.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   240
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   241
54
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   242
00:02:42,785 --> 00:02:46,520
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   243
So we somehow need
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   244
to still compress
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   245
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   246
55
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   247
00:02:46,520 --> 00:02:49,655
774
42733adf2a48 updated
update
parents: 773
diff changeset
   248
this regular expression
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   249
and make it not
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   250
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   251
56
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   252
00:02:49,655 --> 00:02:52,700
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   253
grow so much when we
774
42733adf2a48 updated
update
parents: 773
diff changeset
   254
build the derivative.
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   255
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   256
57
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   257
00:02:52,700 --> 00:02:54,020
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   258
So we have to look at
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   259
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   260
58
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   261
00:02:54,020 --> 00:02:57,050
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   262
where does that grow
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   263
actually come from.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   264
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   265
59
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   266
00:02:57,050 --> 00:03:00,170
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   267
Let's look at the
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   268
derivative operation
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   269
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   270
60
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   271
00:03:00,170 --> 00:03:01,895
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   272
again in more detail.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   273
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   274
61
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   275
00:03:01,895 --> 00:03:03,740
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   276
When we introduced
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   277
it, we looked at
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   278
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   279
62
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   280
00:03:03,740 --> 00:03:06,560
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   281
this example of a
774
42733adf2a48 updated
update
parents: 773
diff changeset
   282
regulat expression r,
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   283
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   284
63
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   285
00:03:06,560 --> 00:03:11,465
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   286
which is a star of some
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   287
alternative and some sequence.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   288
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   289
64
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   290
00:03:11,465 --> 00:03:13,130
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   291
And we can build now
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   292
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   293
65
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   294
00:03:13,130 --> 00:03:15,800
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   295
the derivative of this
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   296
r according to a,
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   297
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   298
66
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   299
00:03:15,800 --> 00:03:18,965
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   300
b, and c and see
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   301
what it calculates.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   302
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   303
67
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   304
00:03:18,965 --> 00:03:21,935
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   305
And you see in case of a,
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   306
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   307
68
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   308
00:03:21,935 --> 00:03:26,570
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   309
it's like one times b plus
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   310
0 and then followed by r,
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   311
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   312
69
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   313
00:03:26,570 --> 00:03:29,015
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   314
which is this whole
774
42733adf2a48 updated
update
parents: 773
diff changeset
   315
regular expression again.
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   316
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   317
70
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   318
00:03:29,015 --> 00:03:30,935
774
42733adf2a48 updated
update
parents: 773
diff changeset
   319
So you can also see
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   320
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   321
71
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   322
00:03:30,935 --> 00:03:34,745
774
42733adf2a48 updated
update
parents: 773
diff changeset
   323
the derivative operation
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   324
introduces a lot of junk.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   325
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   326
72
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   327
00:03:34,745 --> 00:03:38,165
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   328
This plus 0 isn't
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   329
really necessary.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   330
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   331
73
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   332
00:03:38,165 --> 00:03:42,455
774
42733adf2a48 updated
update
parents: 773
diff changeset
   333
And this times 1 could
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   334
be also thrown away.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   335
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   336
74
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   337
00:03:42,455 --> 00:03:43,685
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   338
So in the first case,
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   339
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   340
75
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   341
00:03:43,685 --> 00:03:48,110
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   342
actually we could just have
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   343
one times b is b plus 0,
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   344
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   345
76
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   346
00:03:48,110 --> 00:03:49,580
774
42733adf2a48 updated
update
parents: 773
diff changeset
   347
it still b,
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   348
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   349
77
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   350
00:03:49,580 --> 00:03:54,905
774
42733adf2a48 updated
update
parents: 773
diff changeset
   351
so it would be b followed by
42733adf2a48 updated
update
parents: 773
diff changeset
   352
r. And in this second case,
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   353
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   354
78
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   355
00:03:54,905 --> 00:03:57,515
774
42733adf2a48 updated
update
parents: 773
diff changeset
   356
0 times b, that will be just 0.
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   357
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   358
79
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   359
00:03:57,515 --> 00:03:59,270
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   360
Then 0 plus one is
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   361
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   362
80
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   363
00:03:59,270 --> 00:04:05,330
774
42733adf2a48 updated
update
parents: 773
diff changeset
   364
1 ... times r would be just
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   365
r. And in the last case,
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   366
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   367
81
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   368
00:04:05,330 --> 00:04:12,155
774
42733adf2a48 updated
update
parents: 773
diff changeset
   369
0 times b would be 0. 0 plus
42733adf2a48 updated
update
parents: 773
diff changeset
   370
0 is 0. 0 times r would be 0.
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   371
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   372
82
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   373
00:04:12,155 --> 00:04:17,540
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   374
Okay? So we could throw out
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   375
all these useless zeros and
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   376
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   377
83
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   378
00:04:17,540 --> 00:04:20,960
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   379
ones because actually
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   380
we have to throw
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   381
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   382
84
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   383
00:04:20,960 --> 00:04:24,845
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   384
them out because over time
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   385
they just accumulate.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   386
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   387
85
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   388
00:04:24,845 --> 00:04:27,035
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   389
And then we build
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   390
the next derivative.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   391
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   392
86
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   393
00:04:27,035 --> 00:04:31,130
774
42733adf2a48 updated
update
parents: 773
diff changeset
   394
And the 0s wouldn't go away by
42733adf2a48 updated
update
parents: 773
diff changeset
   395
building a new derivative.
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   396
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   397
87
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   398
00:04:31,130 --> 00:04:34,310
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   399
So we need to somehow
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   400
a mechanism to
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   401
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   402
88
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   403
00:04:34,310 --> 00:04:39,120
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   404
delete the junk from
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   405
these derivatives.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   406
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   407
89
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   408
00:04:39,280 --> 00:04:41,900
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   409
But how to delete junk?
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   410
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   411
90
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   412
00:04:41,900 --> 00:04:43,370
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   413
We already know we have
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   414
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   415
91
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   416
00:04:43,370 --> 00:04:47,825
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   417
the simplification rules
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   418
which say like if r plus 0,
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   419
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   420
92
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   421
00:04:47,825 --> 00:04:53,000
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   422
I can just replace by
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   423
r and the other ones.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   424
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   425
93
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   426
00:04:53,000 --> 00:04:55,760
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   427
And so what I now
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   428
need to do is in
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   429
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   430
94
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   431
00:04:55,760 --> 00:04:58,715
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   432
my algorithm when I
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   433
built the derivative,
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   434
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   435
95
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   436
00:04:58,715 --> 00:05:01,415
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   437
this might have
774
42733adf2a48 updated
update
parents: 773
diff changeset
   438
introduced some junk.
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   439
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   440
96
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   441
00:05:01,415 --> 00:05:02,960
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   442
And I now have to have
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   443
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   444
97
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   445
00:05:02,960 --> 00:05:06,590
774
42733adf2a48 updated
update
parents: 773
diff changeset
   446
essentially an additional function
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   447
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   448
98
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   449
00:05:06,590 --> 00:05:08,945
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   450
which deletes this junk again.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   451
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   452
99
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   453
00:05:08,945 --> 00:05:10,490
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   454
And in doing so,
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   455
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   456
100
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   457
00:05:10,490 --> 00:05:13,340
774
42733adf2a48 updated
update
parents: 773
diff changeset
   458
keeps the regular expression,
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   459
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   460
101
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   461
00:05:13,340 --> 00:05:16,730
774
42733adf2a48 updated
update
parents: 773
diff changeset
   462
relatively small, because that
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   463
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   464
102
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   465
00:05:16,730 --> 00:05:19,535
774
42733adf2a48 updated
update
parents: 773
diff changeset
   466
is the Achilles' heel
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   467
of this algorithm.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   468
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   469
103
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   470
00:05:19,535 --> 00:05:22,565
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   471
If this regular expression
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   472
grows too much,
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   473
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   474
104
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   475
00:05:22,565 --> 00:05:25,070
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   476
then all these functions
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   477
will slow down.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   478
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   479
105
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   480
00:05:25,070 --> 00:05:26,360
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   481
So the purpose of
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   482
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   483
106
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   484
00:05:26,360 --> 00:05:30,455
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   485
the simplification function
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   486
is to after the derivative,
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   487
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   488
107
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   489
00:05:30,455 --> 00:05:33,080
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   490
compress again this
774
42733adf2a48 updated
update
parents: 773
diff changeset
   491
regular expression
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   492
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   493
108
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   494
00:05:33,080 --> 00:05:35,570
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   495
and then do the next derivative.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   496
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   497
109
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   498
00:05:35,570 --> 00:05:39,815
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   499
So if we introduce that
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   500
additional functions simp,
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   501
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   502
110
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   503
00:05:39,815 --> 00:05:42,440
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   504
which essentially
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   505
just goes through
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   506
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   507
111
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   508
00:05:42,440 --> 00:05:46,040
774
42733adf2a48 updated
update
parents: 773
diff changeset
   509
this regular expression and
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   510
deletes all this junk,
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   511
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   512
112
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   513
00:05:46,040 --> 00:05:50,045
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   514
then we should be in a
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   515
much better position.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   516
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   517
113
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   518
00:05:50,045 --> 00:05:52,490
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   519
As you can see on this slide,
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   520
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   521
114
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   522
00:05:52,490 --> 00:05:54,440
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   523
the simplification
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   524
function can actually
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   525
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   526
115
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   527
00:05:54,440 --> 00:05:56,855
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   528
be implemented very easily.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   529
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   530
116
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   531
00:05:56,855 --> 00:05:59,750
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   532
However, there are few
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   533
interesting points.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   534
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   535
117
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   536
00:05:59,750 --> 00:06:02,720
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   537
First of all, there
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   538
are only two cases.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   539
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   540
118
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   541
00:06:02,720 --> 00:06:05,060
774
42733adf2a48 updated
update
parents: 773
diff changeset
   542
We only simplify when we have
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   543
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   544
119
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   545
00:06:05,060 --> 00:06:08,255
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   546
an alternative or a sequence.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   547
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   548
120
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   549
00:06:08,255 --> 00:06:12,859
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   550
So for example, we will
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   551
never simplify under star.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   552
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   553
121
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   554
00:06:12,859 --> 00:06:15,950
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   555
If you look at the
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   556
derivative operation
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   557
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   558
122
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   559
00:06:15,950 --> 00:06:17,825
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   560
and you scratch your
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   561
head a little bit,
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   562
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   563
123
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   564
00:06:17,825 --> 00:06:20,180
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   565
we'll find out why
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   566
is that the case.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   567
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   568
124
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   569
00:06:20,180 --> 00:06:22,145
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   570
It's essentially a waste of time.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   571
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   572
125
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   573
00:06:22,145 --> 00:06:25,505
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   574
So you would not
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   575
simplify under star.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   576
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   577
126
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   578
00:06:25,505 --> 00:06:27,650
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   579
You only simplify if you have
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   580
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   581
127
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   582
00:06:27,650 --> 00:06:30,530
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   583
an alternative and the sequence.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   584
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   585
128
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   586
00:06:30,530 --> 00:06:34,880
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   587
Now, however, there
774
42733adf2a48 updated
update
parents: 773
diff changeset
   588
is one small point
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   589
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   590
129
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   591
00:06:34,880 --> 00:06:39,785
774
42733adf2a48 updated
update
parents: 773
diff changeset
   592
you have to be aware of.
42733adf2a48 updated
update
parents: 773
diff changeset
   593
These simplification rules
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   594
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   595
130
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   596
00:06:39,785 --> 00:06:42,740
774
42733adf2a48 updated
update
parents: 773
diff changeset
   597
they need to be essentially
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   598
applied backwards.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   599
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   600
131
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   601
00:06:42,740 --> 00:06:45,650
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   602
So I have to first essentially
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   603
go to the leaves of
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   604
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   605
132
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   606
00:06:45,650 --> 00:06:49,085
774
42733adf2a48 updated
update
parents: 773
diff changeset
   607
this regular expression and
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   608
then have to find out,
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   609
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   610
133
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   611
00:06:49,085 --> 00:06:51,170
774
42733adf2a48 updated
update
parents: 773
diff changeset
   612
can I apply the simplification?
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   613
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   614
134
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   615
00:06:51,170 --> 00:06:52,670
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   616
And then if yes,
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   617
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   618
135
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   619
00:06:52,670 --> 00:06:55,430
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   620
I apply the simplification
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   621
and I look at the next step,
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   622
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   623
136
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   624
00:06:55,430 --> 00:06:57,815
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   625
can I now simplify
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   626
something more?
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   627
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   628
137
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   629
00:06:57,815 --> 00:06:59,390
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   630
The reason is how
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   631
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   632
138
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   633
00:06:59,390 --> 00:07:03,125
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   634
the simplification
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   635
rules are formulated.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   636
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   637
139
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   638
00:07:03,125 --> 00:07:05,300
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   639
They might fire in
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   640
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   641
140
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   642
00:07:05,300 --> 00:07:08,765
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   643
a higher level if something
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   644
simplifies below.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   645
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   646
141
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   647
00:07:08,765 --> 00:07:14,315
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   648
So we have to essentially
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   649
simplify from the inside out.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   650
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   651
142
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   652
00:07:14,315 --> 00:07:16,850
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   653
And in this
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   654
simplification function,
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   655
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   656
143
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   657
00:07:16,850 --> 00:07:20,885
774
42733adf2a48 updated
update
parents: 773
diff changeset
   658
what that means we're
42733adf2a48 updated
update
parents: 773
diff changeset
   659
matching this regular expression.
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   660
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   661
144
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   662
00:07:20,885 --> 00:07:23,120
774
42733adf2a48 updated
update
parents: 773
diff changeset
   663
We test whether it's
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   664
an alternative or
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   665
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   666
145
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   667
00:07:23,120 --> 00:07:26,345
774
42733adf2a48 updated
update
parents: 773
diff changeset
   668
a sequence. Only then we
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   669
actually go into action.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   670
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   671
146
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   672
00:07:26,345 --> 00:07:28,385
774
42733adf2a48 updated
update
parents: 773
diff changeset
   673
Once we know
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   674
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   675
147
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   676
00:07:28,385 --> 00:07:30,530
774
42733adf2a48 updated
update
parents: 773
diff changeset
   677
in case of an alternative,
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   678
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   679
148
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   680
00:07:30,530 --> 00:07:32,120
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   681
what are the two components?
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   682
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   683
149
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   684
00:07:32,120 --> 00:07:35,765
774
42733adf2a48 updated
update
parents: 773
diff changeset
   685
We first, simplify each component,
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   686
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   687
150
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   688
00:07:35,765 --> 00:07:39,095
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   689
okay, and then we
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   690
get a result back.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   691
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   692
151
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   693
00:07:39,095 --> 00:07:41,180
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   694
And we check whether
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   695
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   696
152
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   697
00:07:41,180 --> 00:07:45,679
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   698
this simplification of
774
42733adf2a48 updated
update
parents: 773
diff changeset
   699
r1 resulted into a 0.
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   700
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   701
153
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   702
00:07:45,679 --> 00:07:47,884
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   703
Then because it's an alternative
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   704
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   705
154
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   706
00:07:47,884 --> 00:07:49,190
774
42733adf2a48 updated
update
parents: 773
diff changeset
   707
then I can just replace it
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   708
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   709
155
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   710
00:07:49,190 --> 00:07:53,375
774
42733adf2a48 updated
update
parents: 773
diff changeset
   711
by r2s, which a simplified
42733adf2a48 updated
update
parents: 773
diff changeset
   712
version of r2.
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   713
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   714
156
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   715
00:07:53,375 --> 00:07:58,820
774
42733adf2a48 updated
update
parents: 773
diff changeset
   716
If it came back r2s
42733adf2a48 updated
update
parents: 773
diff changeset
   717
is actually 0,
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   718
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   719
157
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   720
00:07:58,820 --> 00:08:00,410
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   721
then I can replace it by
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   722
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   723
158
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   724
00:08:00,410 --> 00:08:03,785
774
42733adf2a48 updated
update
parents: 773
diff changeset
   725
the simplified version of a r1.
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   726
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   727
159
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   728
00:08:03,785 --> 00:08:07,460
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   729
If I simplify both
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   730
alternatives and it
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   731
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   732
160
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   733
00:08:07,460 --> 00:08:11,180
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   734
happens that the simplified
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   735
versions are the same,
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   736
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   737
161
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   738
00:08:11,180 --> 00:08:15,170
774
42733adf2a48 updated
update
parents: 773
diff changeset
   739
then  I can throw away
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   740
one of the alternatives.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   741
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   742
162
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   743
00:08:15,170 --> 00:08:18,080
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   744
Otherwise, I just have to
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   745
keep the alternatives,
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   746
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   747
163
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   748
00:08:18,080 --> 00:08:21,155
774
42733adf2a48 updated
update
parents: 773
diff changeset
   749
but the simplified components.
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   750
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   751
164
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   752
00:08:21,155 --> 00:08:23,915
774
42733adf2a48 updated
update
parents: 773
diff changeset
   753
In the sequence case it is
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   754
pretty much the same.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   755
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   756
165
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   757
00:08:23,915 --> 00:08:27,950
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   758
I first have to check what
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   759
does it simplify underneath.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   760
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   761
166
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   762
00:08:27,950 --> 00:08:31,385
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   763
So I call first simplify
774
42733adf2a48 updated
update
parents: 773
diff changeset
   764
and then have a look...
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   765
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   766
167
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   767
00:08:31,385 --> 00:08:33,020
774
42733adf2a48 updated
update
parents: 773
diff changeset
   768
Does it matches 0 one of 
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   769
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   770
168
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   771
00:08:33,020 --> 00:08:36,035
774
42733adf2a48 updated
update
parents: 773
diff changeset
   772
the simplifications,
42733adf2a48 updated
update
parents: 773
diff changeset
   773
then I just return 0.
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   774
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   775
169
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   776
00:08:36,035 --> 00:08:38,330
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   777
Or if the other component is 0,
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   778
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   779
170
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   780
00:08:38,330 --> 00:08:40,535
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   781
I can also return a 0.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   782
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   783
171
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   784
00:08:40,535 --> 00:08:43,310
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   785
If it's one, then I keep
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   786
the other component.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   787
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   788
172
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   789
00:08:43,310 --> 00:08:45,920
774
42733adf2a48 updated
update
parents: 773
diff changeset
   790
And if the rs2 is one,
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   791
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   792
173
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   793
00:08:45,920 --> 00:08:47,615
774
42733adf2a48 updated
update
parents: 773
diff changeset
   794
and I keep the first component.
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   795
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   796
174
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   797
00:08:47,615 --> 00:08:50,359
774
42733adf2a48 updated
update
parents: 773
diff changeset
   798
And otherwise it's
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   799
still the sequence.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   800
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   801
175
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   802
00:08:50,359 --> 00:08:53,540
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   803
And in all the other cases I
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   804
don't have to do anything.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   805
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   806
176
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   807
00:08:53,540 --> 00:08:55,700
774
42733adf2a48 updated
update
parents: 773
diff changeset
   808
If it's just a plain
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   809
0. I leave it in.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   810
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   811
177
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   812
00:08:55,700 --> 00:08:57,860
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   813
If it's a plain
774
42733adf2a48 updated
update
parents: 773
diff changeset
   814
1, I leave it in.
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   815
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   816
178
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   817
00:08:57,860 --> 00:09:00,170
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   818
And if something is under a star,
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   819
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   820
179
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   821
00:09:00,170 --> 00:09:02,840
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   822
I don't open up this
774
42733adf2a48 updated
update
parents: 773
diff changeset
   823
star and simplify it.
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   824
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   825
180
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   826
00:09:02,840 --> 00:09:06,680
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   827
I just apply that to be
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   828
as quick as possible.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   829
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   830
181
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   831
00:09:06,680 --> 00:09:10,280
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   832
Let's see whether this has
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   833
any effect on our code.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   834
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   835
182
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   836
00:09:10,280 --> 00:09:12,980
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   837
So I'm now in the
774
42733adf2a48 updated
update
parents: 773
diff changeset
   838
file re3.sc,
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   839
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   840
183
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   841
00:09:12,980 --> 00:09:17,405
774
42733adf2a48 updated
update
parents: 773
diff changeset
   842
and it's the same as re2.sc.
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   843
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   844
184
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   845
00:09:17,405 --> 00:09:20,885
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   846
It still has this
774
42733adf2a48 updated
update
parents: 773
diff changeset
   847
explicit and n-times case,
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   848
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   849
185
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   850
00:09:20,885 --> 00:09:24,665
774
42733adf2a48 updated
update
parents: 773
diff changeset
   851
nullable and derivative are
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   852
still the same.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   853
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   854
186
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   855
00:09:24,665 --> 00:09:28,610
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   856
Except now we have this
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   857
simplification function as well.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   858
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   859
187
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   860
00:09:28,610 --> 00:09:29,960
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   861
And when we apply
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   862
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   863
188
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   864
00:09:29,960 --> 00:09:33,725
774
42733adf2a48 updated
update
parents: 773
diff changeset
   865
the derivative and after
42733adf2a48 updated
update
parents: 773
diff changeset
   866
we apply the derivative,
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   867
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   868
189
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   869
00:09:33,725 --> 00:09:35,870
774
42733adf2a48 updated
update
parents: 773
diff changeset
   870
we simplify it to throw away
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   871
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   872
190
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   873
00:09:35,870 --> 00:09:39,050
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   874
all the junk this
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   875
derivative introduced.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   876
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   877
191
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   878
00:09:39,050 --> 00:09:41,510
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   879
Otherwise everything
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   880
stays the same.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   881
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   882
192
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   883
00:09:41,510 --> 00:09:43,580
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   884
You still have this expansion
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   885
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   886
193
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   887
00:09:43,580 --> 00:09:45,515
774
42733adf2a48 updated
update
parents: 773
diff changeset
   888
of the optional regular expression.
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   889
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   890
194
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   891
00:09:45,515 --> 00:09:49,670
774
42733adf2a48 updated
update
parents: 773
diff changeset
   892
Here are our two EVIL regular
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   893
expressions we use as a test.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   894
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   895
195
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   896
00:09:49,670 --> 00:09:52,460
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   897
And here's now this test case,
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   898
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   899
196
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   900
00:09:52,460 --> 00:09:55,835
774
42733adf2a48 updated
update
parents: 773
diff changeset
   901
the first one and we're
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   902
actually now trying it
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   903
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   904
197
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   905
00:09:55,835 --> 00:10:00,515
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   906
out for strings between
774
42733adf2a48 updated
update
parents: 773
diff changeset
   907
0 and 9000 a's.
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   908
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   909
198
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   910
00:10:00,515 --> 00:10:08,285
774
42733adf2a48 updated
update
parents: 773
diff changeset
   911
So let's see. So also the 
42733adf2a48 updated
update
parents: 773
diff changeset
   912
simplification makes 
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   913
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   914
199
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   915
00:10:08,285 --> 00:10:10,655
774
42733adf2a48 updated
update
parents: 773
diff changeset
   916
actually this case faster.
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   917
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   918
200
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   919
00:10:10,655 --> 00:10:16,260
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   920
So we can now run strings
774
42733adf2a48 updated
update
parents: 773
diff changeset
   921
up to 9000.
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   922
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   923
201
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   924
00:10:16,260 --> 00:10:19,360
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   925
And we don't actually
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   926
sweat about this at all.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   927
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   928
202
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   929
00:10:19,360 --> 00:10:24,745
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   930
For I have to say my laptop
774
42733adf2a48 updated
update
parents: 773
diff changeset
   931
is now starting to run its fan.
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   932
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   933
203
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   934
00:10:24,745 --> 00:10:28,525
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   935
And also, because the times
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   936
are relatively small,
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   937
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   938
204
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   939
00:10:28,525 --> 00:10:30,610
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   940
I'm actually running
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   941
each test three
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   942
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   943
205
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   944
00:10:30,610 --> 00:10:32,785
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   945
times and then take the average,
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   946
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   947
206
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   948
00:10:32,785 --> 00:10:34,720
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   949
which I didn't do before,
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   950
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   951
207
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   952
00:10:34,720 --> 00:10:37,720
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   953
just to be a tiny bit
774
42733adf2a48 updated
update
parents: 773
diff changeset
   954
more accurate.
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   955
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   956
208
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   957
00:10:37,720 --> 00:10:42,025
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   958
So three seconds for a
774
42733adf2a48 updated
update
parents: 773
diff changeset
   959
string of 9000 a's.
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   960
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   961
209
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   962
00:10:42,025 --> 00:10:44,980
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   963
And now the more
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   964
interesting question is,
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   965
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   966
210
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   967
00:10:44,980 --> 00:10:46,240
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   968
for the second case,
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   969
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   970
211
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   971
00:10:46,240 --> 00:10:48,625
774
42733adf2a48 updated
update
parents: 773
diff changeset
   972
this a star, star, b.
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   973
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   974
212
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   975
00:10:48,625 --> 00:10:51,250
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   976
And you can already see
774
42733adf2a48 updated
update
parents: 773
diff changeset
   977
on these numbers...
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   978
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   979
213
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   980
00:10:51,250 --> 00:10:53,260
774
42733adf2a48 updated
update
parents: 773
diff changeset
   981
we are really ambitious.
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   982
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   983
214
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   984
00:10:53,260 --> 00:10:57,860
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   985
And let's see how our
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   986
program is coping with that.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   987
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   988
215
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   989
00:11:02,610 --> 00:11:07,780
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   990
Again. No sweat, at
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   991
least not on my part.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   992
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   993
216
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   994
00:11:07,780 --> 00:11:10,480
774
42733adf2a48 updated
update
parents: 773
diff changeset
   995
The laptop has to
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   996
calculate quite a bit.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   997
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   998
217
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
   999
00:11:10,480 --> 00:11:12,940
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1000
But this is now a string of
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1001
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1002
218
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1003
00:11:12,940 --> 00:11:16,539
774
42733adf2a48 updated
update
parents: 773
diff changeset
  1004
3 million a's and
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1005
it needs a second.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1006
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1007
219
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1008
00:11:16,539 --> 00:11:20,680
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1009
And let's see how far we get.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1010
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1011
220
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1012
00:11:20,680 --> 00:11:25,280
774
42733adf2a48 updated
update
parents: 773
diff changeset
  1013
4 million a's around two seconds.
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1014
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1015
221
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1016
00:11:27,030 --> 00:11:29,050
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1017
So say it again,
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1018
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1019
222
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1020
00:11:29,050 --> 00:11:31,690
774
42733adf2a48 updated
update
parents: 773
diff changeset
  1021
I'm actually slowing it down
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1022
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1023
223
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1024
00:11:31,690 --> 00:11:34,150
774
42733adf2a48 updated
update
parents: 773
diff changeset
  1025
here artificially with running the test
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1026
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1027
224
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1028
00:11:34,150 --> 00:11:36,895
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1029
three times and then
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1030
take the average.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1031
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1032
225
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1033
00:11:36,895 --> 00:11:42,749
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1034
But it seems to be something
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1035
less than five seconds.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1036
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1037
226
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1038
00:11:42,749 --> 00:11:48,185
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1039
And remember that is a
774
42733adf2a48 updated
update
parents: 773
diff changeset
  1040
string of 6 million a's.
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1041
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1042
227
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1043
00:11:48,185 --> 00:11:51,170
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1044
Let's just have a
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1045
look at the graphs.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1046
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1047
228
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1048
00:11:51,170 --> 00:11:56,105
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1049
So the simplification also
774
42733adf2a48 updated
update
parents: 773
diff changeset
  1050
made our first case faster.
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1051
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1052
229
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1053
00:11:56,105 --> 00:11:58,880
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1054
So earlier without
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1055
simplification,
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1056
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1057
230
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1058
00:11:58,880 --> 00:12:00,710
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1059
where we just have
774
42733adf2a48 updated
update
parents: 773
diff changeset
  1060
this explicit 
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1061
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1062
231
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1063
00:12:00,710 --> 00:12:03,050
774
42733adf2a48 updated
update
parents: 773
diff changeset
  1064
n-times. That is this graph.
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1065
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1066
232
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1067
00:12:03,050 --> 00:12:05,210
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1068
And now we can go up to
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1069
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1070
233
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1071
00:12:05,210 --> 00:12:09,620
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1072
10 thousand and be still
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1073
under five seconds.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1074
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1075
234
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1076
00:12:09,620 --> 00:12:12,300
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1077
So that is good news.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1078
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1079
235
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1080
00:12:13,270 --> 00:12:16,745
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1081
In the other example, remember,
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1082
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1083
236
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1084
00:12:16,745 --> 00:12:19,220
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1085
the existing regular
774
42733adf2a48 updated
update
parents: 773
diff changeset
  1086
expression matchers in
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1087
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1088
237
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1089
00:12:19,220 --> 00:12:22,880
774
42733adf2a48 updated
update
parents: 773
diff changeset
  1090
Java 8, Python,
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1091
and JavaScript.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1092
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1093
238
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1094
00:12:22,880 --> 00:12:26,030
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1095
And thanks to the
774
42733adf2a48 updated
update
parents: 773
diff changeset
  1096
student we also 
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1097
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1098
239
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1099
00:12:26,030 --> 00:12:27,935
774
42733adf2a48 updated
update
parents: 773
diff changeset
  1100
have a graph for Swift.
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1101
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1102
240
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1103
00:12:27,935 --> 00:12:29,750
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1104
They're pretty atrocious.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1105
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1106
241
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1107
00:12:29,750 --> 00:12:33,320
774
42733adf2a48 updated
update
parents: 773
diff changeset
  1108
They need like for 30 a's,
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1109
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1110
242
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1111
00:12:33,320 --> 00:12:37,490
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1112
something like on the
774
42733adf2a48 updated
update
parents: 773
diff changeset
  1113
magnitude of 30 seconds.
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1114
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1115
243
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1116
00:12:37,490 --> 00:12:39,740
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1117
As I said already,
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1118
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1119
244
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1120
00:12:39,740 --> 00:12:42,665
774
42733adf2a48 updated
update
parents: 773
diff changeset
  1121
Java 9 is slightly better.
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1122
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1123
245
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1124
00:12:42,665 --> 00:12:44,870
774
42733adf2a48 updated
update
parents: 773
diff changeset
  1125
Java 9 and above, 
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1126
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1127
246
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1128
00:12:44,870 --> 00:12:46,220
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1129
if you try that example,
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1130
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1131
247
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1132
00:12:46,220 --> 00:12:48,665
774
42733adf2a48 updated
update
parents: 773
diff changeset
  1133
the same example in Java 9,
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1134
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1135
248
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1136
00:12:48,665 --> 00:12:51,230
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1137
you would be able to
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1138
process something
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1139
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1140
249
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1141
00:12:51,230 --> 00:12:54,215
774
42733adf2a48 updated
update
parents: 773
diff changeset
  1142
like 40 thousand a's
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1143
in half a minute.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1144
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1145
250
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1146
00:12:54,215 --> 00:12:57,740
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1147
I have to admit I'm not
774
42733adf2a48 updated
update
parents: 773
diff changeset
  1148
100% sure what they
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1149
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1150
251
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1151
00:12:57,740 --> 00:13:03,575
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1152
did to improve the
774
42733adf2a48 updated
update
parents: 773
diff changeset
  1153
performance between Java 8 and 9.
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1154
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1155
252
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1156
00:13:03,575 --> 00:13:05,510
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1157
I know they did something on
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1158
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1159
253
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1160
00:13:05,510 --> 00:13:07,790
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1161
their regular expression
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1162
matching engine,
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1163
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1164
254
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1165
00:13:07,790 --> 00:13:09,770
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1166
but I haven't really looked
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1167
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1168
255
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1169
00:13:09,770 --> 00:13:12,230
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1170
at what precisely they've done.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1171
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1172
256
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1173
00:13:12,230 --> 00:13:17,945
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1174
But that's still not
774
42733adf2a48 updated
update
parents: 773
diff changeset
  1175
really a competition for us.
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1176
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1177
257
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1178
00:13:17,945 --> 00:13:20,915
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1179
So our third version,
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1180
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1181
258
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1182
00:13:20,915 --> 00:13:24,335
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1183
in this example, a star, star b.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1184
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1185
259
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1186
00:13:24,335 --> 00:13:28,445
774
42733adf2a48 updated
update
parents: 773
diff changeset
  1187
We said for something like
42733adf2a48 updated
update
parents: 773
diff changeset
  1188
6 million a's we need 15 secs.
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1189
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1190
260
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1191
00:13:28,445 --> 00:13:31,760
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1192
And again, I think these
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1193
are slightly older times,
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1194
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1195
261
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1196
00:13:31,760 --> 00:13:33,770
774
42733adf2a48 updated
update
parents: 773
diff changeset
  1197
so here it needs 20 seconds.
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1198
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1199
262
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1200
00:13:33,770 --> 00:13:37,250
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1201
I think we had something
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1202
like below five seconds.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1203
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1204
263
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1205
00:13:37,250 --> 00:13:40,865
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1206
But again, you can see
774
42733adf2a48 updated
update
parents: 773
diff changeset
  1207
the trends. We run.
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1208
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1209
264
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1210
00:13:40,865 --> 00:13:42,590
774
42733adf2a48 updated
update
parents: 773
diff changeset
  1211
circles around them.
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1212
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1213
265
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1214
00:13:42,590 --> 00:13:46,530
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1215
And that's quite nice.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1216
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1217
266
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1218
00:13:46,570 --> 00:13:49,774
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1219
So what's good about
774
42733adf2a48 updated
update
parents: 773
diff changeset
  1220
this algorithm
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1221
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1222
267
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1223
00:13:49,774 --> 00:13:51,605
774
42733adf2a48 updated
update
parents: 773
diff changeset
  1224
by Brzozowski?
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1225
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1226
268
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1227
00:13:51,605 --> 00:13:54,500
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1228
Well, first, it extends
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1229
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1230
269
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1231
00:13:54,500 --> 00:13:57,800
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1232
actually to quite a number
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1233
of regular expressions.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1234
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1235
270
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1236
00:13:57,800 --> 00:13:59,900
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1237
So we saw in this example
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1238
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1239
271
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1240
00:13:59,900 --> 00:14:03,950
774
42733adf2a48 updated
update
parents: 773
diff changeset
  1241
the n-times regular expression.
42733adf2a48 updated
update
parents: 773
diff changeset
  1242
Is a little bit of work, but
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1243
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1244
272
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1245
00:14:03,950 --> 00:14:05,405
774
42733adf2a48 updated
update
parents: 773
diff changeset
  1246
we could extend that.
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1247
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1248
273
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1249
00:14:05,405 --> 00:14:08,480
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1250
It also extends to the
774
42733adf2a48 updated
update
parents: 773
diff changeset
  1251
not regular expression,
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1252
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1253
274
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1254
00:14:08,480 --> 00:14:10,820
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1255
which I explain on
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1256
the next slide.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1257
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1258
275
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1259
00:14:10,820 --> 00:14:15,290
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1260
It's very easy to implement
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1261
in a functional language.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1262
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1263
276
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1264
00:14:15,290 --> 00:14:16,610
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1265
If you don't buy
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1266
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1267
277
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1268
00:14:16,610 --> 00:14:20,675
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1269
all that functional
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1270
programming language stuff,
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1271
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1272
278
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1273
00:14:20,675 --> 00:14:22,955
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1274
you still have to agree.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1275
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1276
279
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1277
00:14:22,955 --> 00:14:25,715
774
42733adf2a48 updated
update
parents: 773
diff changeset
  1278
It's quite beautiful in Scala.
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1279
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1280
280
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1281
00:14:25,715 --> 00:14:28,160
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1282
And you could also
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1283
easily implemented
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1284
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1285
281
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1286
00:14:28,160 --> 00:14:31,760
774
42733adf2a48 updated
update
parents: 773
diff changeset
  1287
in the C language or in Python.
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1288
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1289
282
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1290
00:14:31,760 --> 00:14:34,250
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1291
There's really no
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1292
problem with that.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1293
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1294
283
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1295
00:14:34,250 --> 00:14:38,390
774
42733adf2a48 updated
update
parents: 773
diff changeset
  1296
The algorithm is actually
42733adf2a48 updated
update
parents: 773
diff changeset
  1297
quite old already. 
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1298
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1299
284
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1300
00:14:38,390 --> 00:14:44,899
774
42733adf2a48 updated
update
parents: 773
diff changeset
  1301
Brzozowski wrote it down in
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1302
1964 and his PhD thesis.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1303
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1304
285
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1305
00:14:44,899 --> 00:14:49,460
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1306
Somehow it was forgotten during
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1307
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1308
286
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1309
00:14:49,460 --> 00:14:54,095
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1310
the next decades and only
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1311
recently has been rediscovered.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1312
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1313
287
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1314
00:14:54,095 --> 00:14:57,065
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1315
At the moment, we are
774
42733adf2a48 updated
update
parents: 773
diff changeset
  1316
only solved the problem
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1317
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1318
288
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1319
00:14:57,065 --> 00:15:02,240
774
42733adf2a48 updated
update
parents: 773
diff changeset
  1320
of given a regular expression,
42733adf2a48 updated
update
parents: 773
diff changeset
  1321
givven a string, does
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1322
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1323
289
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1324
00:15:02,240 --> 00:15:05,550
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1325
the regular expression
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1326
match the string yes or no.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1327
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1328
290
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1329
00:15:05,550 --> 00:15:08,740
774
42733adf2a48 updated
update
parents: 773
diff changeset
  1330
We want to of course, use
42733adf2a48 updated
update
parents: 773
diff changeset
  1331
it as part of our lexer.
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1332
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1333
291
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1334
00:15:08,740 --> 00:15:12,370
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1335
And there we have to do
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1336
something more complicated.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1337
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1338
292
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1339
00:15:12,370 --> 00:15:15,384
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1340
We have to essentially
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1341
generate tokens.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1342
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1343
293
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1344
00:15:15,384 --> 00:15:18,670
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1345
And this will still take
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1346
a little bit of work.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1347
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1348
294
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1349
00:15:18,670 --> 00:15:22,045
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1350
And that's actually relatively
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1351
recent work by somebody
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1352
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1353
295
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1354
00:15:22,045 --> 00:15:26,110
774
42733adf2a48 updated
update
parents: 773
diff changeset
  1355
called Sulzmann and
42733adf2a48 updated
update
parents: 773
diff changeset
  1356
the co-worker called Lu.
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1357
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1358
296
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1359
00:15:26,110 --> 00:15:30,880
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1360
And what I personally
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1361
also find very satisfying
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1362
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1363
297
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1364
00:15:30,880 --> 00:15:32,695
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1365
about this algorithm is
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1366
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1367
298
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1368
00:15:32,695 --> 00:15:36,040
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1369
that we can actually
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1370
prove that it's correct.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1371
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1372
299
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1373
00:15:36,040 --> 00:15:37,735
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1374
You might remember I did
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1375
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1376
300
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1377
00:15:37,735 --> 00:15:41,500
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1378
quite some interesting
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1379
transformations
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1380
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1381
301
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1382
00:15:41,500 --> 00:15:44,830
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1383
when I calculated the derivative.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1384
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1385
302
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1386
00:15:44,830 --> 00:15:48,270
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1387
How can I be sure that
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1388
this is all correct?
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1389
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1390
303
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1391
00:15:48,270 --> 00:15:50,270
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1392
Actually, I can now go away and
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1393
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1394
304
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1395
00:15:50,270 --> 00:15:52,865
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1396
prove the correctness
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1397
of this algorithm.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1398
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1399
305
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1400
00:15:52,865 --> 00:15:56,645
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1401
Does it really satisfy
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1402
the specification?
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1403
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1404
306
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1405
00:15:56,645 --> 00:15:58,550
774
42733adf2a48 updated
update
parents: 773
diff changeset
  1406
Is it really true that if a string
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1407
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1408
307
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1409
00:15:58,550 --> 00:16:00,440
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1410
is in the language
774
42733adf2a48 updated
update
parents: 773
diff changeset
  1411
of a regular expression.
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1412
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1413
308
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1414
00:16:00,440 --> 00:16:03,050
774
42733adf2a48 updated
update
parents: 773
diff changeset
  1415
Does that matter? I would say yes.
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1416
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1417
309
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1418
00:16:03,050 --> 00:16:07,070
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1419
However, I leave that
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1420
for another video.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1421
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1422
310
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1423
00:16:07,070 --> 00:16:10,580
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1424
What I also like about
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1425
this algorithm that can be
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1426
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1427
311
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1428
00:16:10,580 --> 00:16:13,775
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1429
actually extended to quite a
774
42733adf2a48 updated
update
parents: 773
diff changeset
  1430
number of regular expressions.
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1431
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1432
312
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1433
00:16:13,775 --> 00:16:17,810
774
42733adf2a48 updated
update
parents: 773
diff changeset
  1434
So this is the NOT regular
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1435
expression that is
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1436
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1437
313
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1438
00:16:17,810 --> 00:16:19,760
774
42733adf2a48 updated
update
parents: 773
diff changeset
  1439
supposed to match strings which
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1440
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1441
314
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1442
00:16:19,760 --> 00:16:22,235
774
42733adf2a48 updated
update
parents: 773
diff changeset
  1443
this regular expression cannot match.
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1444
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1445
315
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1446
00:16:22,235 --> 00:16:24,245
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1447
So here's an example.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1448
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1449
316
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1450
00:16:24,245 --> 00:16:28,640
774
42733adf2a48 updated
update
parents: 773
diff changeset
  1451
If you're in the business of
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1452
trying to find out what
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1453
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1454
317
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1455
00:16:28,640 --> 00:16:33,530
774
42733adf2a48 updated
update
parents: 773
diff changeset
  1456
are comments in languages like
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1457
Java or C. Then you know,
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1458
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1459
318
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1460
00:16:33,530 --> 00:16:35,060
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1461
they always start with a slash,
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1462
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1463
319
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1464
00:16:35,060 --> 00:16:36,245
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1465
then comes a star,
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1466
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1467
320
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1468
00:16:36,245 --> 00:16:38,240
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1469
then comes an arbitrary string.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1470
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1471
321
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1472
00:16:38,240 --> 00:16:41,195
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1473
And then they finish
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1474
with a slash and a star.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1475
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1476
322
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1477
00:16:41,195 --> 00:16:44,330
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1478
And how you want to specify
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1479
that is something like this.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1480
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1481
323
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1482
00:16:44,330 --> 00:16:45,530
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1483
You want to say, OK,
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1484
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1485
324
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1486
00:16:45,530 --> 00:16:48,245
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1487
a comment starts with
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1488
a slash and a star.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1489
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1490
325
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1491
00:16:48,245 --> 00:16:51,410
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1492
Then it comes any
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1493
string in between.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1494
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1495
326
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1496
00:16:51,410 --> 00:16:55,340
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1497
But this string
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1498
in-between cannot contain
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1499
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1500
327
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1501
00:16:55,340 --> 00:16:58,280
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1502
any star and slash
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1503
because that would then
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1504
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1505
328
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1506
00:16:58,280 --> 00:17:01,415
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1507
indicate there's the
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1508
end already there.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1509
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1510
329
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1511
00:17:01,415 --> 00:17:03,680
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1512
And then after you
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1513
have such a string
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1514
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1515
330
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1516
00:17:03,680 --> 00:17:06,410
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1517
which doesn't
774
42733adf2a48 updated
update
parents: 773
diff changeset
  1518
contain a star and a slash,
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1519
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1520
331
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1521
00:17:06,410 --> 00:17:11,180
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1522
then at the end you want to
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1523
match a star and a slash.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1524
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1525
332
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1526
00:17:11,180 --> 00:17:13,460
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1527
So for these kind of comments,
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1528
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1529
333
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1530
00:17:13,460 --> 00:17:15,995
774
42733adf2a48 updated
update
parents: 773
diff changeset
  1531
this regular expression is
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1532
actually quite useful.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1533
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1534
334
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1535
00:17:15,995 --> 00:17:19,430
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1536
And if you ever seen
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1537
how to do the negation,
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1538
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1539
335
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1540
00:17:19,430 --> 00:17:21,995
774
42733adf2a48 updated
update
parents: 773
diff changeset
  1541
for this kind of regular
42733adf2a48 updated
update
parents: 773
diff changeset
  1542
expression with automata,
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1543
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1544
336
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1545
00:17:21,995 --> 00:17:24,710
774
42733adf2a48 updated
update
parents: 773
diff changeset
  1546
you will know that's
42733adf2a48 updated
update
parents: 773
diff changeset
  1547
a bit of a pain.
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1548
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1549
337
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1550
00:17:24,710 --> 00:17:26,675
774
42733adf2a48 updated
update
parents: 773
diff changeset
  1551
But for the Brzozowski,
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1552
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1553
338
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1554
00:17:26,675 --> 00:17:28,370
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1555
it's no pain at all.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1556
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1557
339
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1558
00:17:28,370 --> 00:17:30,710
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1559
The meaning of this
774
42733adf2a48 updated
update
parents: 773
diff changeset
  1560
regular expression
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1561
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1562
340
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1563
00:17:30,710 --> 00:17:32,255
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1564
would be something like that.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1565
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1566
341
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1567
00:17:32,255 --> 00:17:35,540
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1568
If I have all the
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1569
strings there are,
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1570
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1571
342
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1572
00:17:35,540 --> 00:17:38,390
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1573
and I take away all the strings,
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1574
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1575
343
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1576
00:17:38,390 --> 00:17:40,055
774
42733adf2a48 updated
update
parents: 773
diff changeset
  1577
this r can match.
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1578
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1579
344
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1580
00:17:40,055 --> 00:17:42,080
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1581
The remaining strings are
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1582
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1583
345
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1584
00:17:42,080 --> 00:17:44,630
774
42733adf2a48 updated
update
parents: 773
diff changeset
  1585
what this regular expression
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1586
is supposed to match.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1587
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1588
346
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1589
00:17:44,630 --> 00:17:47,165
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1590
So I can specify
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1591
what the meaning is.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1592
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1593
347
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1594
00:17:47,165 --> 00:17:49,760
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1595
And then it's also very easy to
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1596
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1597
348
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1598
00:17:49,760 --> 00:17:52,174
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1599
say what is nullable
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1600
and derivative.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1601
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1602
349
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1603
00:17:52,174 --> 00:17:54,140
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1604
So for nullable, it would be
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1605
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1606
350
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1607
00:17:54,140 --> 00:17:56,570
774
42733adf2a48 updated
update
parents: 773
diff changeset
  1608
just a test whether r
42733adf2a48 updated
update
parents: 773
diff changeset
  1609
is nullable.
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1610
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1611
351
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1612
00:17:56,570 --> 00:17:58,985
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1613
And I just take the
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1614
negation of that.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1615
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1616
352
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1617
00:17:58,985 --> 00:18:00,680
774
42733adf2a48 updated
update
parents: 773
diff changeset
  1618
And then I have to build
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1619
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1620
353
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1621
00:18:00,680 --> 00:18:03,620
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1622
the derivative of this
774
42733adf2a48 updated
update
parents: 773
diff changeset
  1623
NOT regular expression.
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1624
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1625
354
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1626
00:18:03,620 --> 00:18:05,420
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1627
Then I just have to move
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1628
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1629
355
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1630
00:18:05,420 --> 00:18:07,325
774
42733adf2a48 updated
update
parents: 773
diff changeset
  1631
this ....
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1632
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1633
356
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1634
00:18:07,325 --> 00:18:10,070
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1635
derivative inside
774
42733adf2a48 updated
update
parents: 773
diff changeset
  1636
the regular expression
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1637
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1638
357
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1639
00:18:10,070 --> 00:18:12,575
774
42733adf2a48 updated
update
parents: 773
diff changeset
  1640
and keep the NOT on
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1641
the outermost level.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1642
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1643
358
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1644
00:18:12,575 --> 00:18:15,515
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1645
So there's again no
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1646
pain involved in
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1647
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1648
359
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1649
00:18:15,515 --> 00:18:19,130
774
42733adf2a48 updated
update
parents: 773
diff changeset
  1650
adding this regular expression
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1651
to the algorithm.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1652
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1653
360
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1654
00:18:19,130 --> 00:18:22,100
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1655
We made it to the end of
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1656
this video and we made
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1657
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1658
361
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1659
00:18:22,100 --> 00:18:24,739
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1660
it also to the end
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1661
of this algorithm.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1662
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1663
362
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1664
00:18:24,739 --> 00:18:27,620
774
42733adf2a48 updated
update
parents: 773
diff changeset
  1665
I can see to loose strands.
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1666
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1667
363
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1668
00:18:27,620 --> 00:18:29,420
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1669
One is we implemented
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1670
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1671
364
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1672
00:18:29,420 --> 00:18:32,855
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1673
this algorithm for the
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1674
basic regular expressions.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1675
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1676
365
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1677
00:18:32,855 --> 00:18:38,705
774
42733adf2a48 updated
update
parents: 773
diff changeset
  1678
And we also added the 
42733adf2a48 updated
update
parents: 773
diff changeset
  1679
n-times out of necessity.
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1680
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1681
366
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1682
00:18:38,705 --> 00:18:41,120
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1683
And I also showed
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1684
you how to implement
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1685
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1686
367
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1687
00:18:41,120 --> 00:18:44,840
774
42733adf2a48 updated
update
parents: 773
diff changeset
  1688
the NOT regular
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1689
expression on a slide.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1690
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1691
368
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1692
00:18:44,840 --> 00:18:48,995
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1693
But your task in the
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1694
coursework actually is
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1695
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1696
369
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1697
00:18:48,995 --> 00:18:52,970
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1698
to extend that to some of
774
42733adf2a48 updated
update
parents: 773
diff changeset
  1699
the extended regular expressions.
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1700
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1701
370
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1702
00:18:52,970 --> 00:18:57,260
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1703
So especially these bounded
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1704
repetitions like from 0 to
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1705
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1706
371
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1707
00:18:57,260 --> 00:19:01,550
774
42733adf2a48 updated
update
parents: 773
diff changeset
  1708
n-times or between n and m times.
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1709
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1710
372
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1711
00:19:01,550 --> 00:19:04,325
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1712
And I think also
774
42733adf2a48 updated
update
parents: 773
diff changeset
  1713
plus and option.
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1714
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1715
373
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1716
00:19:04,325 --> 00:19:07,220
774
42733adf2a48 updated
update
parents: 773
diff changeset
  1717
The other loose strand is,
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1718
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1719
374
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1720
00:19:07,220 --> 00:19:09,200
774
42733adf2a48 updated
update
parents: 773
diff changeset
  1721
remember I did this wild
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1722
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1723
375
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1724
00:19:09,200 --> 00:19:11,645
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1725
calculations with
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1726
regular expressions.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1727
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1728
376
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1729
00:19:11,645 --> 00:19:13,205
774
42733adf2a48 updated
update
parents: 773
diff changeset
  1730
Why on earth
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1731
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1732
377
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1733
00:19:13,205 --> 00:19:14,480
774
42733adf2a48 updated
update
parents: 773
diff changeset
  1734
is that all correct?
773
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1735
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1736
378
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1737
00:19:14,480 --> 00:19:16,355
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1738
Why on earth should
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1739
this algorithm
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1740
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1741
379
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1742
00:19:16,355 --> 00:19:18,575
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1743
actually satisfy
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1744
our specification,
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1745
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1746
380
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1747
00:19:18,575 --> 00:19:20,450
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1748
which we set out
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1749
at the beginning.
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1750
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1751
381
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1752
00:19:20,450 --> 00:19:25,410
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1753
So that needs to be looked at
260e330f7466 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
  1754
more closely. Bye for now.