RU beehive logo ITEC dept promo banner
ITEC 122
2008fall
ibarland

homeinfoexamsarchive

lect01b
propositions; truth-tables

- logic: a language for writing proofs (and, specs)
  propositions: the vocabulary of our language.
  http://cnx.org/content/m10715/latest/
  (HoP example)
- connectives: and/or/not;implies;iff
   or: "lunch money or else";  "and/or"
   if: "If you commit a crime, then you go to jail."
       "If my baby is a girl, I'll name her Jessie"
       "If you know Paris Hilton's phone#, then I'm a mule's uncle!"
       "the receiver gained 20yds if he gained an inch!"
        (but perhaps s/he caught it out of bounds, upon replay)
       aka: "my candidate got 10000 votes if they got one"
   iff: crime iff jail;  

- work through Book: #1,5,11.


Q:  T or F:  "if today is Wednesday, we are skipping lecture"
    Suppose "if they like me, they'll call me tonight" is true.
       Suppose you get called.  Can you conclude they like you?
       No: "F -> T" and "T -> T" are both T.
       Suppose you don't get called.  Can you conclude they don't like you?
       Yes:   if q is false and yet "p->q" is true, then p must be false.
       

- make a truth table for...
  p->q, and for  -p v q, and for q->p, and for -q -> -p.
  Note: they are *equivalent*.  We write  p->q ≡ -p v q.

  Are the following two equivalent?

   (distributive law)
    p v (q ^ r)     (pvq) ^ (pvr)
    p^F;  p^T

  p->q   <->  (-q->-p)
  p v -p
  "tautology"

   
   a->(b->c)  vs  (a->b)->c


- bitstrings (and,or  on bitstrings)

=====What about Boolean alg?!

Example 1: contrapositive:
        a -> b
≡ -a v b  (by def'n of ->)
≡ b v -a  (by commutativity of v)
≡ --b v -a (by double-complementation)
≡ -b -> -a  (by def'n of ->, with phi = -b, and psi = -a)
This last step is a bit subtle.


Example 2:
Show the absorption law, W/O using it itself.
The very first step is devious!:

        a ^ (avb)
≡ (a v F) ^ (a v b)  (by idempotence of ∨ over F)
≡ a v (F ^ b)        (by distribution of v over ^, in reverse)
≡ a v F              (by dominance of F over ^)
≡ a                  (by idempotence of ∨ over F)

Note: we've shown that the absorption law is actually redundant.
It makes you wonder: what is a *minimal* set of equivalencies?!



Def'n: CNF:
  A formula is in "Conjunctive Normal Form" if it is written as
  phi_1 ^ phi_2 ^ ... ^ phi_n
  where each phi_i is written as
    (l_1 v l_2 v ... v l_k)
  where each l_j is either a proposition or the negation of a proposition.

Examples:
  (a v b v -c) ^ (a v -b v c) ^ (a v b v c)
  Is there a simpler example?  Yes:
  (a v b) ^ (a v -c)
  An even simpler example?  Yes:
  (a) ^ (b)     [here we have two clauses, each w/ one term]
  (a v b)       [one clause with two terms]
  An even simpler example?  Yes:
  a
  An even simpler example?
    Hmm-- can we make the conjunction of zero clauses?
    The empty-formula is ambiguous, but "T" would be the logical
    value of conjunction-of-zero-things.
    We need a definition of what a formula is, to decide this.
    (Most definitions dis-allow the empty formula.
     However, the conjunction of zero things is True, 
     so perhaps we'd consider "T" in CNF???)

Non-examples:
   (a ^ b ^ c) v (a ^ -b)    [this is actually in *disjunctive* normal form!]
   (a v (b ^ (c v a)))
   a -> b
   a v (b ^ c)
Non-non-examples:
   (a v b)    [that's already listed above]
   a ^ b      [also listed above]


Note: don't confuse "a formula in CNF" with
"a formula which is equivalent to some *other* formula in CNF".
E.g., we've seen "a -> b" is equivalant to "(-a v b)" which is
a one-clause CNF formula.
Do you think *every* formula is equivalent to CNF?
WHy or why not?


Who cares about normal forms?
  Consider to equivlanet *algebra* formulas (equations):
     x^3 - x = 0
  and equivalently
     x(x+1)(x-1)=0.
In the second version, it's easy to read off all the
values of x which make the formula true.
In the first version, it wasn't obvious.
That's why we prefer the first version.


homeinfoexamsarchive


©2008, Ian Barland, Radford University
Last modified 2008.Sep.10 (Wed)
Please mail any suggestions
(incl. typos, broken links)
to iba�rlandrad�ford.edu
Powered by PLT Scheme