Formal Language and Automata Theory notes f (1).pdf Flashcards

1
Q

What is automata theory?

A

The basis for the theory of formal languages.

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

Define a symbol in the context of automata theory.

A

A character, an abstraction that is meaningless by itself.

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

What is an alphabet?

A

A finite set of symbols.

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

What is a word in automata theory?

A

A finite string of symbols from a given alphabet.

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

Define a language in automata theory.

A

A set of words formed from a given alphabet.

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

What operations can be performed on formal languages?

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

What are the three ways formal languages are defined?

A
  • Regular expressions
  • Standard automata
  • Formal grammar system
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the most general and powerful automaton?

A

The Turing machine.

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

List the four major families of automata.

A
  • Finite-state machine
  • Pushdown automata
  • Linear-bounded automata
  • Turing machine
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What defines a finite-state machine (FSM)?

A

An automaton in which the state set Q contains only a finite number of elements.

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

Who were the first to present a description of finite automata?

A

Warren McCulloch and Walter Pitts in 1943.

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

What distinguishes a Mealy machine from a Moore machine?

A

A Mealy machine determines its outputs through the current state and the input, while a Moore machine’s output is based upon the current state alone.

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

Define the state transition function of a finite-state machine.

A

A function which maps an ordered sequence of input events into a corresponding sequence or set of output events.

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

What is a trap state in finite-state machines?

A

A state where no further input affects the outcome.

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

What is the formal definition of a finite automaton?

A

A 5-tuple (Q, Σ, δ, q0, F) where Q is the set of states, Σ is the input alphabet, δ is the transition function, q0 is the initial state, and F is the set of accepting states.

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

What does DFA stand for?

A

Deterministic Finite Automata.

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

What is the characteristic of a deterministic finite automaton (DFA)?

A

There is only one path for specific input from the current state to the next state.

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

True or False: DFA can accept the null move.

A

False.

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

What is the graphical representation of a DFA called?

A

State diagram.

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

What does the initial state of a DFA represent in a state diagram?

A

Marked with an arrow.

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

How can you describe the transition function of a DFA?

A

δ: Q x Σ → Q.

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

What is the significance of accepting states in finite automata?

A

If the input string ends in an accepting state, the input is considered accepted.

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

Fill in the blank: A finite automaton accepts or rejects an input based on a defined set of strings known as the _______.

A

[language of the automaton]

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

What is an example of a finite automaton application?

A

Airplane safety control.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
What is the mathematical representation of a finite automaton?
Q, Σ, δ, q0, F.
26
What is the initial state of a DFA when given input 0?
The DFA changes state to q1.
27
What type of strings can a DFA accept?
Any string which ends with 0.
28
What type of strings will a DFA reject?
Any string which ends with 1.
29
What is the 5-tuple representation of an NDFA?
(Q, ∑, δ, q0, F)
30
What does Q represent in the NDFA definition?
A finite set of states.
31
What does ∑ represent in the NDFA definition?
A finite set of symbols called the alphabets.
32
What is the transition function δ in an NDFA?
δ: Q × ∑ → 2Q.
33
What does q0 signify in the NDFA definition?
The initial state from where any input is processed.
34
What does F represent in the NDFA definition?
A set of final state/states of Q.
35
How is an NDFA graphically represented?
By digraphs called state diagrams.
36
What do the vertices represent in an NDFA state diagram?
The states.
37
How are transitions indicated in an NDFA state diagram?
By arcs labeled with an input alphabet.
38
What indicates the initial state in an NDFA diagram?
An empty single incoming arc.
39
What indicates the final state in an NDFA diagram?
Double circles.
40
What is a key difference between DFA and NDFA regarding transitions?
DFA transitions to a single state; NDFA can transition to multiple states.
41
Can empty string transitions be seen in DFA?
No, they are not permitted.
42
What is the condition for a string to be accepted by a DFA or NDFA?
It ends in an accepting state after reading the string wholly.
43
What is the language L accepted by DFA/NDFA?
{S | S ∈ ∑* and δ*(q0, S) ∈ F}
44
What does L' represent in relation to DFA/NDFA?
The complement of accepted language L.
45
What strings does the DFA accept based on the example provided?
{0, 00, 11, 010, 101, ...}
46
What strings does the DFA reject based on the example provided?
{1, 011, 111, ...}
47
What is one of the examples of a DFA design?
Accept strings that start with 1 and end with 0.
48
What is the regular expression for the set of strings that end in 3 consecutive 1's?
(0 | 1)* 111
49
What is the union operator in regular expressions?
R1 | R2 or R1 U R2.
50
What does the concatenation operator do in regular expressions?
R1R2 combines patterns from R1 and R2.
51
What does the Kleene closure operator represent?
R1* includes epsilon, L(R1), and all concatenations of R1.
52
What is the language of the regular expression (0 + 10*)?
{0, 1, 10, 100, 1000, ...}
53
What does the regular expression (a+b)* represent?
Set of strings of a's and b's of any length including the null string.
54
What does the regular expression (11)* represent?
Set consisting of even number of 1's including empty string.
55
What is the property that states the union of two regular sets is regular?
Property 1.
56
What is an example of a regular expression that denotes an empty language?
φ
57
What does ε represent in regular expressions?
The language containing an empty string.
58
What is the language represented by the regular expression (aa)*(bb)*b?
Strings consisting of even number of a's followed by odd number of b's.
59
What is the set L1 in the context of regular expressions?
{ a, aa, aaa, aaaa, ....} (Strings of all possible lengths excluding Null)
60
What is the set L2 in the context of regular expressions?
{ ε, aa, aaaa, aaaaaa,.......} (Strings of even length including Null)
61
What is the result of the intersection L1 ∩ L2?
{ aa, aaaa, aaaaaa,.......} (Strings of even length excluding Null)
62
What is the regular expression for the intersection of L1 and L2?
RE (L1 ∩ L2) = aa(aa)*
63
What is the complement of a regular set?
All strings that are not in the set
64
What is the regular expression for the complement of the set L?
RE (L’) = a(aa)*
65
What does the difference of two regular sets represent?
Strings in the first set that are not in the second set
66
What is the regular expression for the difference L1 – L2?
RE (L1 – L2) = a (aa)*
67
What is the property of the reversal of a regular set?
The reversal of a regular set is also regular
68
What is the regular expression for the reversal LR of the set L?
RE (LR) = 01 + 10 + 11 + 10
69
What is the closure of a regular set?
The set formed by concatenating the regular set with itself zero or more times
70
What is the regular expression for the closure of the set L?
RE (L*) = a (a)*
71
What is a pushdown automaton (PDA)?
A mathematical model that extends finite automata with a stack for memory
72
What are the seven tuples that define a PDA?
M = (Q, ∑, Γ, δ, q0 , z0, F)
73
What does 'Q' represent in the context of a PDA?
A finite set of states
74
What does '∑' represent in the context of a PDA?
A finite set of input alphabet/symbols
75
What does 'Γ' represent in the context of a PDA?
A finite stack alphabet
76
What is the transition function 'δ' in a PDA?
It governs the behavior of the automaton, mapping state/input/stack symbol to new state/stack operation
77
What is the initial state 'q0' in a PDA?
The state before making any transitions
78
What does 'z0' represent in a PDA?
The stack start symbol
79
What is meant by the term 'Instantaneous Description' in a PDA?
A triplet (q, w, s) representing the state, unconsumed input, and stack contents
80
What does the turnstile notation represent in PDA transitions?
It connects pairs of IDs representing transitions
81
What is one application of finite automata?
Recognizing patterns in text or data
82
How are finite automata used in programming languages?
To implement regular expressions
83
What is one application of pushdown automata?
Parsing context-free grammars
84
What do pushdown automata model in natural language processing?
They recognize and parse sentences
85
True or False: A pushdown automaton can read an input symbol in every transition.
False
86
Fill in the blank: A PDA has a stack with _______ size.
infinite