diff options
| author | 2026-11-08 05:23:31 +0000 | |
|---|---|---|
| committer | 2026-11-08 05:24:55 +0000 | |
| commit | 3f36aca66e1ac6c872300059e8db691a473614d4 (patch) | |
| tree | 48c65f463c487d281c7c4091c7ba01dd4a2ff8f1 /README.org | |
| download | lab-02-3f36aca66e1ac6c872300059e8db691a473614d4.tar.gz | |
Diffstat (limited to 'README.org')
| -rw-r--r-- | README.org | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/README.org b/README.org new file mode 100644 index 0000000..01bc3ce --- /dev/null +++ b/README.org | |||
| @@ -0,0 +1,57 @@ | |||
| 1 | #+title: Regular expressions | ||
| 2 | #+subtitle: Non-deterministic and deterministic finite state machines | ||
| 3 | #+date: 2025H1 | ||
| 4 | |||
| 5 | * Task | ||
| 6 | :PROPERTIES: | ||
| 7 | :CUSTOM_ID: task | ||
| 8 | :END: | ||
| 9 | Construct a regular expression, then a non-deterministic finite state | ||
| 10 | machine, and determinize it (transitions can be specified using | ||
| 11 | ranges). Implement a program that checks the entered text using the | ||
| 12 | finite state machine implementation (output options: the string | ||
| 13 | matches, does not match, characters are not from the alphabet). It is | ||
| 14 | also necessary to implement a function for randomly generating a valid | ||
| 15 | string based on the resulting finite state machine. | ||
| 16 | |||
| 17 | Examples of correct strings: | ||
| 18 | #+begin_example | ||
| 19 | https://docs.google.com/document/d/1poUMiPBYm/edit?usp=sharing&sd=true | ||
| 20 | https://docs.google.com/document/d/1poUMiPm-wfYTyTf6NFtPwbWEae_/preview | ||
| 21 | http://docs.google.com/document/d/1po-MiPBwUfY5MUTyTf6NFtPwbWEae_/copy | ||
| 22 | docs.google.com/document/d/1po-UMiPBYmfY5MlaksjdshUTywTf6NFtPwbWEae_/export? | ||
| 23 | docs.google.com/document/d/1po-UMiPBYmfY5MUsdfTywTf6NFtPwbWEae_ | ||
| 24 | docs.new | ||
| 25 | http://docs.new/ | ||
| 26 | https://docs.new// | ||
| 27 | #+end_example | ||
| 28 | |||
| 29 | There are 3 possible protocol specifications: | ||
| 30 | - an empty string | ||
| 31 | - =http​://= | ||
| 32 | - =https​://= | ||
| 33 | |||
| 34 | There are 2 different inputs: | ||
| 35 | - =docs.new= -- only the characters =/=. | ||
| 36 | - =docs.google.com=, then: | ||
| 37 | 1. must be =/document/d/=, | ||
| 38 | 2. must be a document identifier | ||
| 39 | 3. an optional path command after =/= | ||
| 40 | 4. optional options after =?= | ||
| 41 | |||
| 42 | * Documentation | ||
| 43 | :PROPERTIES: | ||
| 44 | :CUSTOM_ID: documentation | ||
| 45 | :END: | ||
| 46 | The exported report can be found at [[https://git.michalec.dev/files/uni/term-06/math-logic/lab-02/report.pdf][this link]]. | ||
| 47 | |||
| 48 | * Showcase | ||
| 49 | :PROPERTIES: | ||
| 50 | :CUSTOM_ID: showcase | ||
| 51 | :END: | ||
| 52 | |||
| 53 | * Unlicense | ||
| 54 | :PROPERTIES: | ||
| 55 | :CUSTOM_ID: unlicense | ||
| 56 | :END: | ||
| 57 | #+include: UNLICENSE verse | ||
