Comp 330

Lectures 1 – 5

Lecture 1 • 2017/09/05

A languageL is any subset of Σ*, which represents all sequences of elements from a finite set Σ

An algorithm Adecides a language L by answering if x ∈ L

Languages that we can decide = languages that we can describe – all languages

Decided languages and described languages are similar in size (#ℕ), but both are much smaller than the total available # of languages (#ℝ)

Two sets have the same cardinality if there exists a one to one mapping with all elements from set A to set B without any remaining elements in either sets

PCP – Post Correspondence Problem – Given tiles with a top sequence and a bottom sequence, find a sequence of such tiles (using any number of any tile) where the concatenated top sequence matches the concatenated bottom sequence

PCP cannot be decided by any algorithm in a finite amount of time when there are no valid sequences

Proof by reduction technique – if PCP was decidable, then another undecidable problem (the halting problem) would be decidable

The Halting Problem – Given an algorithm and an input, will the algorithm halt on that input or will it loop forever?

Algorithms can be fed an input matching their algorithm to return an incorrect response; no algorithm can be always correct

Lecture 3 • 2017/09/12

Given definition from last class, and let w = w1w2...wn (n ≥ 0) be a string where each symbol wi is from the alphabet ΣM accepts w if states s0,s1,...sn exist s.t

s0 = q0

si+1 = δ(si, wi+1) for i = 0, ... n – 1

sn ∈ F

(w is accepted if it starts at the start state and ends at an accept state)

Note that the size of the state is typically one greater than the size of the string

M recognizes language A if A = { w | M accepts w }

A language is a regular language if some finite automaton recognizes it

[Went through example proof by induction]

ε represents an empty string

Lecture 4 • 2017/09/14

Regular Operations

Union

A ∪ B

{ x | x ∈ A or x ∈ B }

Concatenation

A &compfn; B

{ xy | x ∈ A and y ∈ B }

Star

A*

{ x1x2 ... xk | K ≥ 0 and each xi ∈ A }

Non-Deterministic Finite Automata

May jump from state to state without consuming input (eg when encountering the empty string ε)

Definitions are similar to DFA, except that:

Alphabet – also includes an empty string ε

Transition function returns P(Q), which is a subset (partition) of Q that meets the requirements

Lecture 5 • 2017/09/21

(No class on 19th

Minimization of DFA

Lumping (quotient by an equivalence relation) – if two states lead to the same state(s) at all times, and are the same 'state' themselves, they may be merged together as their difference is forgotten after the next step.

~ (equivalence relations) are

Reflexive

∀x

x ~ x

Symmetric

∀x,y

x ~ y ⇒ y ~ x

Transitive

∀x,y,z

x ~ y, y ~ z ⇒ x ~ z

S/~ represents [s] = { x | x ~ s }

δ(s, a) – state you went to after reading alphabet a at state s

δ*(s, w) – state you went to after reading all letters in word w, starting at state s