Lecture 3 : DFA AND NFA Flashcards

1
Q

What is regular expression

A

Regular expressions (REs) are a language for expressing patterns

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

What is L(s)?

A

L(s) is known as the “language of s”.

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

What is s*?

A

s* is a RE such that L(s*) = L(s) concatenated zero or more times.

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

What is s?

A

S? indicates that s is optional.
S? can be written as (S|e).

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

What is s+

A

s+ indicates that s is repeated one or more times
s+ can be written as ss*

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

What is [a-z]

A

[a-z] indicates any character in that range.
[a-z] can be written as (a|b|…|z)

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

What is r1|r2 and r1.r2?

A

r1|r2 means either r1 or r2
r1.r2 means r1 followed by r2

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

What is [^x]?

A

[ˆx] indicates any character except one.[ˆx] can be written as Ʃ- x

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

A DFA has 5 tuples?

A

{Q,E,q0,F,&}
Q: Set of all states
E: Finite set of input symbols
q0: initial state
F: Set of all final state
&: transition function

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

Common ways to solve ambiguity in nfa

A

Crystal ball interpretation
Many-worlds interpretation

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

Describe Crystal ball interpretation

A

The Crystal ball interpretation suggests that the NFA somehow “knows” what the best choice is, by some means external to the NFA itself.

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