From e1051991a23fb441b95c03395dcf3c961e3358e3 Mon Sep 17 00:00:00 2001 From: Jan Meyer Date: Thu, 23 Apr 2026 22:39:23 +0200 Subject: [PATCH] vault backup: 2026-04-23 22:39:23 --- 00 Inbox/29622985 - 2026-04-28.md | 27 +++++++++++++++++++++++++++ 40 Extras/OOP/die_einen_da | 2 +- 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/00 Inbox/29622985 - 2026-04-28.md b/00 Inbox/29622985 - 2026-04-28.md index 3ba28c7..0615289 100644 --- a/00 Inbox/29622985 - 2026-04-28.md +++ b/00 Inbox/29622985 - 2026-04-28.md @@ -16,3 +16,30 @@ tags: --- ## 📝 Content + +A containment hierarchy of classes of formal grammars. Grammars are classified into four types with different limitations. + +### Type 0 +no restrictions + +### Type 1 +Each rule $sans(w)_1 -> sans(w_2)$ satisfies $sans(abs(w_1) <= abs(w_2))$ with the exception that $sans(S) -> epsilon$ is allowed if $sans(S)$ does not occur on any right hand side of rules. +$sans(abs(w_1) <= abs(w_2))$ implies that no shortening rules are allowed. + +### Type 2 (context free) +Same restriction as [[#Type 1|type 1]] and additionally for each rule $sans(w_1 -> w_2)$ the string $sans(w_1)$ contains only a single variable (i.e. $sans(w_1 in V)$) + +### Type 3 (regular) +Same restriction as [[#Type 2|type 2]] and additionally $sans(w_2 in Sigma union Sigma V)$), i.e. the right hand side is either a single terminal symbol or a terminal symbol followed by a variable. + +> [!REMARK] +> The order of the variable and the terminal symbol is chosen arbitrarily. +> Important is just that within a regular grammar only a single order occurs. If for all rules $sans(w_2 in Sigma union V Sigma)$ it would also be a regular grammar. + +## Definition +A language $sans(L subset Sigma^*)$ is said to be of type 0 (1,2,3) if there exist a type 0 (1,2,3) grammar $sans(G)$ for which $sans(L(G) = L)$. + +> [!REMARK] +> In order to show that a language is op type 0 (1,2,3) one thus just has to find a corresponding grammar. +> In order to show that a grammar is not of type 0 (1,2,3) one has to prove that no type 0 (1,2,3) grammar can exist generating the corresponding language. + diff --git a/40 Extras/OOP/die_einen_da b/40 Extras/OOP/die_einen_da index d7b00e7..3af3ede 160000 --- a/40 Extras/OOP/die_einen_da +++ b/40 Extras/OOP/die_einen_da @@ -1 +1 @@ -Subproject commit d7b00e7700733ca4605a9597f69871b98f1adaa9 +Subproject commit 3af3edea6ffcfbe6aa68892523a07765d8538fab