Notes/Languages & Machines/Regular languages.md

1.2 KiB

type
type
math

Induction

Similar (if not the same) to:

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, 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,

Operations on strings

  • Concatenation (associative)
  • Substring, prefix, suffix
  • Replication (exponentiation): a string concatenated with itself
  • Reversal (u^R)

Operations on languages

  • Lifting operations on strings to languages
  • Concatenation of languages
  • Kleene star -