Main Focus
What is a Computational Problem?
Problem: With some input given paired with a goal that can be determined by such input Solutions: Algorithms
How to Specify Problems?
Strings
Alphabet: A Finite Set of Symbols () String: A Finite Sequence of Symbols ("")
- length of a string Language: A Set of Strings (over a fixed )
- size of Language
- Set of all strings over Regular Expression: A way to describe the properties we want to test on
- ""
Rules of Regular Expressions
Numbers
Eval: →
Example
→ “All strings over that begin and end with different symbols”
Question: Given: , Output: ?
Deterministic Finite Automaton (DFA)
Definition
A DFA is a 5-tuple where:
- is a finite set of states
- is an alphabet (finite set of symbols)
- : as a table of which state have an edge to with a label of
- : the function returns the destination state in
- the starter state in
- the finish state(s)
The computation of DFA on input is the sequence of and such that
There exist only 1 possible sequence
The computation is accepting if The computation is rejecting if
: