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
Q

What is the mathematical representation of a finite automaton?

A

Q, Σ, δ, q0, F.

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

What is the initial state of a DFA when given input 0?

A

The DFA changes state to q1.

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

What type of strings can a DFA accept?

A

Any string which ends with 0.

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

What type of strings will a DFA reject?

A

Any string which ends with 1.

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

What is the 5-tuple representation of an NDFA?

A

(Q, ∑, δ, q0, F)

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

What does Q represent in the NDFA definition?

A

A finite set of states.

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

What does ∑ represent in the NDFA definition?

A

A finite set of symbols called the alphabets.

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

What is the transition function δ in an NDFA?

A

δ: Q × ∑ → 2Q.

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

What does q0 signify in the NDFA definition?

A

The initial state from where any input is processed.

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

What does F represent in the NDFA definition?

A

A set of final state/states of Q.

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

How is an NDFA graphically represented?

A

By digraphs called state diagrams.

36
Q

What do the vertices represent in an NDFA state diagram?

A

The states.

37
Q

How are transitions indicated in an NDFA state diagram?

A

By arcs labeled with an input alphabet.

38
Q

What indicates the initial state in an NDFA diagram?

A

An empty single incoming arc.

39
Q

What indicates the final state in an NDFA diagram?

A

Double circles.

40
Q

What is a key difference between DFA and NDFA regarding transitions?

A

DFA transitions to a single state; NDFA can transition to multiple states.

41
Q

Can empty string transitions be seen in DFA?

A

No, they are not permitted.

42
Q

What is the condition for a string to be accepted by a DFA or NDFA?

A

It ends in an accepting state after reading the string wholly.

43
Q

What is the language L accepted by DFA/NDFA?

A

{S | S ∈ ∑* and δ*(q0, S) ∈ F}

44
Q

What does L’ represent in relation to DFA/NDFA?

A

The complement of accepted language L.

45
Q

What strings does the DFA accept based on the example provided?

A

{0, 00, 11, 010, 101, …}

46
Q

What strings does the DFA reject based on the example provided?

A

{1, 011, 111, …}

47
Q

What is one of the examples of a DFA design?

A

Accept strings that start with 1 and end with 0.

48
Q

What is the regular expression for the set of strings that end in 3 consecutive 1’s?

A

(0 | 1)* 111

49
Q

What is the union operator in regular expressions?

A

R1 | R2 or R1 U R2.

50
Q

What does the concatenation operator do in regular expressions?

A

R1R2 combines patterns from R1 and R2.

51
Q

What does the Kleene closure operator represent?

A

R1* includes epsilon, L(R1), and all concatenations of R1.

52
Q

What is the language of the regular expression (0 + 10*)?

A

{0, 1, 10, 100, 1000, …}

53
Q

What does the regular expression (a+b)* represent?

A

Set of strings of a’s and b’s of any length including the null string.

54
Q

What does the regular expression (11)* represent?

A

Set consisting of even number of 1’s including empty string.

55
Q

What is the property that states the union of two regular sets is regular?

A

Property 1.

56
Q

What is an example of a regular expression that denotes an empty language?

57
Q

What does ε represent in regular expressions?

A

The language containing an empty string.

58
Q

What is the language represented by the regular expression (aa)(bb)b?

A

Strings consisting of even number of a’s followed by odd number of b’s.

59
Q

What is the set L1 in the context of regular expressions?

A

{ a, aa, aaa, aaaa, ….} (Strings of all possible lengths excluding Null)

60
Q

What is the set L2 in the context of regular expressions?

A

{ ε, aa, aaaa, aaaaaa,…….} (Strings of even length including Null)

61
Q

What is the result of the intersection L1 ∩ L2?

A

{ aa, aaaa, aaaaaa,…….} (Strings of even length excluding Null)

62
Q

What is the regular expression for the intersection of L1 and L2?

A

RE (L1 ∩ L2) = aa(aa)*

63
Q

What is the complement of a regular set?

A

All strings that are not in the set

64
Q

What is the regular expression for the complement of the set L?

A

RE (L’) = a(aa)*

65
Q

What does the difference of two regular sets represent?

A

Strings in the first set that are not in the second set

66
Q

What is the regular expression for the difference L1 – L2?

A

RE (L1 – L2) = a (aa)*

67
Q

What is the property of the reversal of a regular set?

A

The reversal of a regular set is also regular

68
Q

What is the regular expression for the reversal LR of the set L?

A

RE (LR) = 01 + 10 + 11 + 10

69
Q

What is the closure of a regular set?

A

The set formed by concatenating the regular set with itself zero or more times

70
Q

What is the regular expression for the closure of the set L?

A

RE (L) = a (a)

71
Q

What is a pushdown automaton (PDA)?

A

A mathematical model that extends finite automata with a stack for memory

72
Q

What are the seven tuples that define a PDA?

A

M = (Q, ∑, Γ, δ, q0 , z0, F)

73
Q

What does ‘Q’ represent in the context of a PDA?

A

A finite set of states

74
Q

What does ‘∑’ represent in the context of a PDA?

A

A finite set of input alphabet/symbols

75
Q

What does ‘Γ’ represent in the context of a PDA?

A

A finite stack alphabet

76
Q

What is the transition function ‘δ’ in a PDA?

A

It governs the behavior of the automaton, mapping state/input/stack symbol to new state/stack operation

77
Q

What is the initial state ‘q0’ in a PDA?

A

The state before making any transitions

78
Q

What does ‘z0’ represent in a PDA?

A

The stack start symbol

79
Q

What is meant by the term ‘Instantaneous Description’ in a PDA?

A

A triplet (q, w, s) representing the state, unconsumed input, and stack contents

80
Q

What does the turnstile notation represent in PDA transitions?

A

It connects pairs of IDs representing transitions

81
Q

What is one application of finite automata?

A

Recognizing patterns in text or data

82
Q

How are finite automata used in programming languages?

A

To implement regular expressions

83
Q

What is one application of pushdown automata?

A

Parsing context-free grammars

84
Q

What do pushdown automata model in natural language processing?

A

They recognize and parse sentences

85
Q

True or False: A pushdown automaton can read an input symbol in every transition.

86
Q

Fill in the blank: A PDA has a stack with _______ size.