Language & Regular Expressions Flashcards

1
Q

Alphabet

A

A finite set of fundamental units, Σ

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Language

A

A set of strings of symbols from the alphabet, plus rules specific to the language

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Words

A

Finite strings that are permissible in the language generated from the alphabet and the rules of the language

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

empty, null string symbol

A

lowercase epsilon ε or uppercase lambda Λ

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Concatenation

A

Joining character strings end-to-end

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Palindromes

A

A word, phrase, number or sequence of words that reads the same backwards as forwards

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Closure Kleene Star

A

A programming resource that offers outcomes related to the concatenation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Regular expressions

A

A sequence of characters that define a search pattern

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Rule 1 of defining regular expressions

A

If x ∈ Σ then x is a regular expression

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Rule 2 of defining regular expressions

A

If r1 and r2 are regular expressions then so are (r1), r1r2, r1|r2, r1*

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Rule 3 of defining regular expressions

A

Nothing else is a regular expression

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

When can only 2 regular expressions be equivalent?

A

If and only if they describe the same language

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Rule 1 for language to be associated with a regex

A

If r is a regex, then language(r) = {r}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Rule 2 for language to be associated with a regex

A

If L1 = language(r1) and L2 = language(r2), the (r1r2) = L1L2, (r1|r2) = L1|L2, (r1) = L1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly