Week 1 Lecture 1 - Strings, grammars and finite state automata

0.0(0)
studied byStudied by 0 people
0.0(0)
full-widthCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/10

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

11 Terms

1
New cards

What are the 3 central concepts?

Language

Grammar → A set of rules that specify the language

Automaton → An abstract computational machine that recognises members of the language [plural: Automata]

2
New cards

What does ‘Σ’ represent in automata theory?

Alphabet → Finite nonempty sets of symbols.

Σ = {0,1} or = {a,b,c,…}

Σ is a set of ASCII characters

3
New cards

What is a string in automata theory?

Sequence of symbols of the alphabet including the
empty string, λ

Σk set of strings of length k.
– Σ* union of all strings of length k ≥ 0.
– Σ* = Σ0 ∪ Σ1 ∪ Σ2 ∪ ⋯, where Σ0 = {𝜆}.
– We can define the set that excludes the empty string :
Σ+ = Σ1 ∪ Σ2 ∪ ⋯

4
New cards

What are languages in automata theory?

Sets of strings chosen from some Σ*

L is a language over Σ: L Σ*

It is just a set of strings.

5
New cards

Concatenation of languages L1 and L2

L1L2 is defined by:

{𝑥𝑦 𝑥 ∈ 𝐿1 ∧ 𝑦 ∈ 𝐿2}

6
New cards

The set of all strings not in L:

L (with a line on top) = Σ* − 𝐿

7
New cards

Assume 𝑎, 𝑏 and 𝑎𝑖, 𝑏𝑖 are members of Σ

What are:
𝑎n

𝑤 = 𝑎1𝑎2 … 𝑎n and 𝑣 = 𝑏1𝑏2 … 𝑏m

|𝑤|

→ a…a

𝑎1𝑎2 … 𝑎n𝑏1𝑏2 … 𝑏m

→ The length of 𝑤

8
New cards

What does a transition graph consist of?

→ States

→ One initial state

→ One or more final/accepting states

→ Labelled transitions between states

9
New cards
<p>For this transition graph, give the lexical analyser:</p>

For this transition graph, give the lexical analyser:

knowt flashcard image
10
New cards
<p>For this transition graph, give the transition table: </p>

For this transition graph, give the transition table:

knowt flashcard image
11
New cards
<p>For this off-on switch, prove using induction:</p><p><span style="font-size: calc(var(--scale-factor)*20.27px)">𝑆</span><span style="font-size: calc(var(--scale-factor)*15.00px)"><sub>1</sub></span><span style="font-size: calc(var(--scale-factor)*20.27px)">(𝑛): automaton is off after n pushes iff n is even</span></p>

For this off-on switch, prove using induction:

𝑆1(𝑛): automaton is off after n pushes iff n is even

Base: n = 0

OFF is initial state, therefore when n = 0 the state is off. Therefore n is even.
𝑆
1(0) = (𝑡𝑟𝑢𝑒 ⇔ 𝑡𝑟𝑢𝑒)

Inductive:

𝑆1(𝑛 + 1)
Automaton is off ⇒ 𝑛 + 1 is even
Assume automation is off when n + 1 pushes
n is not even, by S1(n)

n is odd
n+1 is even