- DEFINE
- Phrase-Structure Grammar- A phrase-structure grammar(V, T, S, P) consists of a vocabulary V, a subset T of V consisting of terminal elements, a start symbol S from V, and a set of productions P.
- Vocabulary- a finite non-empty set of symbols in a grammar
- Word- a string of finite length of elements of V
- Production Rules- rules showing how nonterminal symbols can be replaced by nonterminal and/or terminal symbols.
- Finite-State Machine- a finite-state machine (M = (S, I, O, f, g,
) consists of a finite set of states, a finite input alphabet I, a finite output alphabet O, a transition function f that assigns to each state and input pair a new state, an output function g that assigns to each state and input pair an output and an initial state 
SHORT ANSWERS
Describe the difference(s) between terminal symbols and non-terminal symbols in a grammar.
Non-terminal symbols can be replaced by other symbols in the vocabulary, terminal symbols cannot be replaced.
List the parts of a phrase-structured grammar.
- V- Vocabulary
- S- States
- T- Terminal Symbols
- P- Production rules
List the parts of a finite-state machine.
- S- states
- I- Input alphabet
- O- Output alphabet
- f- a function that assigns to each pair of states and input a state
- g- a function that assigns to each pair of states and input an output
-
- an initial state
List the parts of a finite automaton.
- S- States
- I- input alphabet
- f- transition function
- an initial state
- F- a set of final states
Describe the differences between a deterministic finite automaton and a non-deterministic automaton.
The function in a deterministic finite automaton assigns only 1 state to each pair of unique state and input symbol.
PROBLEMS
Represent the following relation using a i) graph and, ii) matrix.
{(1,1), (1,2), (1,3), (2,2), (3,3)}
- Graph representation

- Matrix

Use the Matrix representation from Problems #1 to determine the properties of the relation above.
Reflexive property
Show how the matrix from #1 ii would have to change to show the following properties:
- Irreflexive
| |
1 |
2 |
3 |
|
1 |
0 |
1 |
1 |
|
2 |
0 |
0 |
0 |
|
3 |
0 |
0 |
0 |
- Symmetric
| |
1 |
2 |
3 |
|
1 |
1 |
1 |
1 |
|
2 |
1 |
1 |
0 |
|
3 |
1 |
0 |
1 |
Determine if the following Relations are Equivalence Relations
- {(0,0), (1,1), (1,2), (2,1), (2,2), (3,3)} - Yes
- {(0,1), (1,1), (2,2), (3,3)} - No
Show the partitions of the equivalence relation from Problems #4.
[0] = 0
[1] = 1, 2
[2] = 1, 2
[3] = 3
Determine if the following relation on the set {a, b} is a partial order.
{(a,a), (a,b), (b,b)}
Yes, because it is reflexive, antisymmetric, and transitive