Truth value assignment (or just truth assignment):
- Gives a value (0 or 1) to each propositional variable.
- Value can be extended to all formulas using those variables through the
truth tables, by w
Regular Languages
- We have shown that a language is accepted by a FSA iff there is a R.E. for it.
- A language is called regular iff it is denoted by some R.E., or equivalently,
iff it is accepted by
Proving Logical Equivalences
Prove or disprove each of the logical equivalences below, without
using truth tables:
a) p -> (q /\ r) LEQV (p -> q) /\ (p -> r)
answer: p -> (q /\ r)
LEQV ~p \/ (q /\ r)
Propositional Logic
Notation for expressing concepts precisely, and formalism for reasoning.
"Propositions" are statements, which are either true or false,
as opposed to other kinds of English sentenc
Propositional Formulas:
- Let PV be a set of propositional variables. The set of propositional formulas
PF is the smallest set such that:
. any variable in PV is in PF.
. if p1 and p2 are in PF then s
Structures, valuations, interpretations:
- A "structure" S for a first-order language L consists of:
. a domain D (nonempty)
. for each constant symbol c of L, an element c^S of D
. for each n-ary pre
Termination Questions
Termination: Let E = l + 1 - i. E is definitely an integer because l and i
are both integers. Sine f <= l by the precondition: E_0 = l + 1 - i_0 =
l + 1 - f >= 1, and since i_k <
RecBinSearch. Recurrence for worst-case running time of
RecBinSearch is:
cfw_4
if n = 1
T(n) = cfw_
cfw_ 7 + max cfw_ T(ceil(n/2), T(floor(n/2) + 1 if n > 1
1. Repeated substitutions. Since this is u
Regular Expressions
- Regular expressions describe sets of strings using a small number of
basic operations.
- The set of regular expressions (regexps) over an alphabet S is defined
as follows, assumi
Test Preparation Questions
1- Let L be the set of strings over cfw_0,1 that contain both 01 and 10
as substrings.
(a) Daw the diagram of a DFSA that accepts L
(b) Give a regular expression that denote
Example 2: Prove that for any natural numbers n >= 1, if x is a real
number such that 1 + x > 0 then (1 + x)^n >= 1+nx.
. S(n) can be defined as "if x is a real number and 1 + x > 0 then
(1 + x)^n >=