equal
deleted
inserted
replaced
269 operation on sets is defined as |
269 operation on sets is defined as |
270 |
270 |
271 \[ |
271 \[ |
272 A^* \dn \bigcup_{0\le n} A^n |
272 A^* \dn \bigcup_{0\le n} A^n |
273 \] |
273 \] |
|
274 |
|
275 \noindent |
|
276 Note that this expands to |
|
277 |
|
278 \[ |
|
279 A^* \dn A^0 \cup A^1 \cup A^2 \cup A^3 \cup A^4 \cup \ldots |
|
280 \] |
|
281 |
|
282 \noindent which is equivalent to |
|
283 |
|
284 \[ |
|
285 A^* \dn \{[]\} \cup A \cup A@A \cup A@A@A \cup A@A@A@A \cup \ldots |
|
286 \] |
|
287 |
|
288 \noindent |
|
289 Remember that $A^0$ is always the set containing the empty |
|
290 string. |
274 |
291 |
275 We will use parentheses to disambiguate regular expressions. |
292 We will use parentheses to disambiguate regular expressions. |
276 Parentheses are not really part of a regular expression, and |
293 Parentheses are not really part of a regular expression, and |
277 indeed we do not need them in our code because there the tree |
294 indeed we do not need them in our code because there the tree |
278 structure of regular expressions is always clear. But for |
295 structure of regular expressions is always clear. But for |