Problem : Let f: N -> N be the function defined by
if n = 0
f(n) = < 2,
if n = 1
\ 4*f(n - 2) + 2^n
if n > 1
Prove that for every integer n >= 3, f(n) <= 3*n*2^cfw_n - 2
Define S(n) to be the predicate "f(n) <= 3*n*2^cf
Equivalence of Regular Expressions
R.E. to FSA.
- We use the defintion of a R.E. and induction:
. Basis: if R = empty then M contains only one state and no accepting state.
if R = e then M contains only one state which is also an accetping state.
if R = a
Finite State Automata
- Simple models of computing devices used to analyze strings. A F.S.A.
has a fixed, finite set of "states", one of which is the "initial state"
and some of which are "accepting" (or "final") states, as well as
"transitions" from one
Formal Language Theory
- Alphabet: any finite, non-empty set of atomic symbols (meaning
"compound" symbols like "ab" are not allowed)
(e.g., cfw_a,b,c, cfw_0,1, cfw_+).
- String: any finite sequence of symbols; the empty sequence is den
Examples of wrong inductive proofs:
- Example 1.8 on page 31 of the notes.
- Exercise 13 on page 58 of the notes. First state the problem clearly
and let them think about it for a few minutes.
Here is the solution:
The error is in the inudction step. The
First Order Language L Questions
Consider the first-order language L that consists of only one
binary predicate symbol E, and consider the structure S for L
whose domain is the collection of all sets and where E^S(x,y)
holds iff x is an element of y. Tran
FSA to R.E Example
Here is an example: for L^0_cfw_i,j, if i <> j the only string that
takes M from i to j without going through any other state (because k = 0) is the
string which has only the symbol(s) on the transition arrow(s) from i to j.
If i = j, y
- Formula F "logically implies" formula E if and only if every interpretation
that satisfies F also satisfies E.
Example: forall x(A(x) -> B(x) and A(c) logically implies B(c).
- Formulas F and E are "logically equivalent" if every i
Free vs bound variables:
- Variable x is "bound" in formula A if it appears in A within the scope
of a quantifier on x. Variable x is "free" if it appears outside the
scope of any quantifier.
. "forall x P(x) \/ exists y Q(x,y)": x is bound (i
General divide-and-conquer recurrences:
- Many algorithms written using "divide-and-conquer" technique: split up
problem, solve subproblems recursively, combine solutions. Worst-case
running times of such algorithms satisfy recurrences of the form:
DNF and CNF Formulas Question
Consider the following formula:
(~x -> (y /\ x) /\ (~y -> (x /\ z)
- Give the truth table of this formula.
(to do this use the method described on pages 146 and 147 of the book)
- Using the truth table, give a DNF and CNF for