diff --git a/.obsidian/graph.json b/.obsidian/graph.json index 182ef1b..872109c 100644 --- a/.obsidian/graph.json +++ b/.obsidian/graph.json @@ -46,6 +46,6 @@ "repelStrength": 10, "linkStrength": 1, "linkDistance": 250, - "scale": 0.665400791557209, + "scale": 0.9981011873358133, "close": false } \ No newline at end of file diff --git a/.obsidian/workspace.json b/.obsidian/workspace.json index 4e1027c..d76ef88 100644 --- a/.obsidian/workspace.json +++ b/.obsidian/workspace.json @@ -13,44 +13,15 @@ "state": { "type": "markdown", "state": { - "file": "Software Engineering/Meeting.md", + "file": "Languages & Machines/Regular languages.md", "mode": "source", "source": false }, "icon": "lucide-file", - "title": "Meeting" - } - }, - { - "id": "2768622d9c36a711", - "type": "leaf", - "state": { - "type": "markdown", - "state": { - "file": "Software Engineering/Reqirements.md", - "mode": "source", - "source": false - }, - "icon": "lucide-file", - "title": "Reqirements" - } - }, - { - "id": "38a53b83b5981fc5", - "type": "leaf", - "state": { - "type": "markdown", - "state": { - "file": "Operating Systems/Introductory lecture.md", - "mode": "source", - "source": false - }, - "icon": "lucide-file", - "title": "Introductory lecture" + "title": "Regular languages" } } - ], - "currentTab": 2 + ] } ], "direction": "vertical" @@ -228,16 +199,34 @@ "omnisearch:Omnisearch": false } }, - "active": "38a53b83b5981fc5", + "active": "fcc28e70ad8acbd2", "lastOpenFiles": [ - "Introduction to Machine Learning/Introductory lecture.md", - "Introduction to Machine Learning/image.png", - "Operating Systems/Introductory lecture.md", + "Discrete Structures/Mathematical Data Structures.md", + "Discrete Structures/Mathematical Proofs (Induction).md", + "Discrete Structures/Recurrence relations.md", + "Discrete Structures/Relations and Digraphs.md", + "Discrete Structures/Counting.md", + "Languages & Machines/Regular languages.md", "Software Engineering/Meeting.md", - "Software Engineering/Initial Questions.md", - "Functional Programming/Eq and Num.md", - "Functional Programming/Basic Haskell.md", "Software Engineering/Reqirements.md", + "Introduction to Machine Learning/Introductory lecture.md", + "Languages & Machines/Introduction.md", + "Functional Programming/Proofs.md", + "Functional Programming/Recursion.md", + "Functional Programming/Lists.md", + "Functional Programming/Eq and Num.md", + "Functional Programming/Introduction to Functional Programming.md", + "Functional Programming/Basic Haskell.md", + "Languages & Machines/assets/Pasted image 20250113151159.png", + "Languages & Machines/assets/Pasted image 20250414190100.png", + "Languages & Machines/assets", + "Languages & Machines/assets/Pasted image 20250414190229.png", + "Languages & Machines/assets/Pasted image 20250414190144.png", + "Languages & Machines/assets/Pasted image 20250414190119.png", + "Operating Systems/Introductory lecture.md", + "Languages & Machines", + "Introduction to Machine Learning/image.png", + "Software Engineering/Initial Questions.md", "Software Engineering/TA Meeting 1.md", "Extracurricular/Misc/Plan.md", "Extracurricular/Misc/Proposed Routine Plan.canvas", @@ -245,7 +234,6 @@ "Extracurricular/Circuitree/Antenna Building/Idea and proposed timeline.md", "Extracurricular/Circuitree/Antenna Building/Untitled", "Extracurricular/Circuitree/Antenna Building", - "Functional Programming/Proofs.md", "Software Engineering", "Operating Systems/assets/image.png", "Operating Systems/assets/Pasted image 20250204103541.png", @@ -257,25 +245,9 @@ "Fundamentals of Electronics/Introductory Lecture.md", "Fundamentals of Electronics", "Extracurricular/Circuitree/Committee Market/Macro pad.md", - "Functional Programming/Recursion.md", - "Functional Programming/Lists.md", "Functional Programming/Polymorphism.md", - "Functional Programming/Introduction to Functional Programming.md", "Discrete Structures/Midterm/Midterm prep.md", - "Discrete Structures/Counting.md", - "Discrete Structures/Mathematical Data Structures.md", - "Discrete Structures/Mathematical Proofs (Induction).md", "Functional Programming/assets/Pasted image 20241125164049.png", - "Functional Programming/Drawing 2024-12-24 17.52.22.excalidraw.md", - "Untitled.md", - "Statistics and Probability/Mock exam run 1.md", - "Pasted image 20250113151159.png", - "Extracurricular/satQuest/img/Pasted image 20241218122110.png", - "Extracurricular/satQuest/img/Pasted image 20241206134213.png", - "Extracurricular/satQuest/img/Pasted image 20241206134207.png", - "Extracurricular/satQuest/img/Pasted image 20241206134156.png", - "Extracurricular/satQuest/img", - "Extracurricular/satQuest", "Untitled.canvas", "Web Engineering/canvae/server_client.canvas", "Advanced Programming/projects/second/Refactoring.canvas", diff --git a/Languages & Machines/Introduction.md b/Languages & Machines/Introduction.md new file mode 100644 index 0000000..ffa815b --- /dev/null +++ b/Languages & Machines/Introduction.md @@ -0,0 +1,55 @@ +--- +type: theoretical +ty: +--- + +## The foundations of computation +Looking for answers for basic questions like: +- Computability? +- Power $\leftrightarrow$ Programming constructs? + +Which leads us to fundamental concepts like: +- State +- Transitions +- Non-determinism +- Undecideability + + +## Models +### Finite memory +Finite automata, regexp +![](Pasted%20image%2020250414190100.png) +### Finite memory with stack +Push down automata +![](Pasted%20image%2020250414190119.png) +### Unrestricted +Turing machines + +![](Pasted%20image%2020250414190144.png) + + + +## Grammars + +![](Pasted%20image%2020250414190229.png) + + +On a higher level, it seems like grammars and machines are very different, but parsing a language (a set of strings) is quite similar to computation. + +## State-based systems and glossary +An FSM can be a specification for OOP. + +- States ($q_0,\ldots, q_n$) +- Transitions ($a,b,c,\ldots,z$) +- We can interpret the transitions as class methods and specify the sequences of allowed invocations - **typestate** + + + +## Notation +- $x \in X, X\subseteq Y$ +- $\forall x \in X: P(x), \exists x \in X: P(x)$ +- $R \subseteq X \times Y$ is a relation between $X$ and $Y$ +- $xRy \equiv (x,y) \in R$ +- $G = (V, E)$, where $E \subseteq V\times V$ is a directed graph + +Part of [Relations and Digraphs](Relations%20and%20Digraphs.md) \ No newline at end of file diff --git a/Languages & Machines/Regular languages.md b/Languages & Machines/Regular languages.md new file mode 100644 index 0000000..5340f74 --- /dev/null +++ b/Languages & Machines/Regular languages.md @@ -0,0 +1,36 @@ +--- +type: math +--- +## Induction +Similar (if not the same) to: +- [Mathematical Proofs (Induction)](Mathematical%20Proofs%20(Induction).md) +- [Structural Proofs](Proofs.md) + + +- Base case $0\in \mathbb{N}$ +- Inductive step - if $n\in \mathbb{N} \implies n+1\in \mathbb{N}$ +- We allow a finite number of steps + + +I.e. +Given $f (n) = n(n + 1)$ for all $n\in N$, then $f (n)$ is even. + +**Base case:** $f(0) = 0\times 1 = 0$, which is even +**I.S.:** +$$ +f(n+1) = (n+1)(n+2)= n(n+1)+2(n+1) = f(n) + 2(n+1) \blacksquare +$$ + +## Strings and Languages +Literally the same as [Mathematical Data Structures](Mathematical%20Data%20Structures.md), but on strings + +How to define the reversal of a string, inductively? + + +Let $w$ be a finite string. We define $w^R$ by induction on $|w|$: + +**B.C.:** +$|w| = 0$, then, trivially, $w = \epsilon \therefore w^R = \epsilon$ + +**I.S.:** +$|w| = n \geq 1$, so $w = u a$ with $|u| = n-1$, diff --git a/Pasted image 20250113151159.png b/Languages & Machines/assets/Pasted image 20250113151159.png similarity index 100% rename from Pasted image 20250113151159.png rename to Languages & Machines/assets/Pasted image 20250113151159.png diff --git a/Languages & Machines/assets/Pasted image 20250414190100.png b/Languages & Machines/assets/Pasted image 20250414190100.png new file mode 100644 index 0000000..0fbe809 Binary files /dev/null and b/Languages & Machines/assets/Pasted image 20250414190100.png differ diff --git a/Languages & Machines/assets/Pasted image 20250414190119.png b/Languages & Machines/assets/Pasted image 20250414190119.png new file mode 100644 index 0000000..d7a9f3f Binary files /dev/null and b/Languages & Machines/assets/Pasted image 20250414190119.png differ diff --git a/Languages & Machines/assets/Pasted image 20250414190144.png b/Languages & Machines/assets/Pasted image 20250414190144.png new file mode 100644 index 0000000..c11c009 Binary files /dev/null and b/Languages & Machines/assets/Pasted image 20250414190144.png differ diff --git a/Languages & Machines/assets/Pasted image 20250414190229.png b/Languages & Machines/assets/Pasted image 20250414190229.png new file mode 100644 index 0000000..ae16e15 Binary files /dev/null and b/Languages & Machines/assets/Pasted image 20250414190229.png differ