{\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf480 {\fonttbl\f0\fnil\fcharset77 Monaco;} {\colortbl;\red255\green255\blue255;} \margl1440\margr1440\vieww9000\viewh8400\viewkind0 \deftab720 \pard\pardeftab720\ql\qnatural \f0\fs20 \cf0 \ \ \ Lecture 2\ \ \ \ \ \ \ \ \ \ \

Lecture 2

\

ECS 20 (Prof. \ Martel)

\

\ \ \

Today:

\ \ \

Announcements

\ \ Ps1 is out.\ \

Lecture

\
    \
  1. \

    Card Shuffling

    \

    From last time, said if you shuffle a deck 5 times, it is not well\ mixed. (The result, due to \ Bayer and Diaconis (1992), is that you\ need to shuffle the deck 7 times to mix it well or, more generally, \ \ 3\ /\ 2\ log2n times with n cards.)

    \ \
    \
    Claim
    \
    5 shuffles is not enough to mix a deck of cards
    \
    Definition
    \
    A rising sequence R in the sequence S is a subsequence of S that contains successive integers and cannot be extended on the right or the left, preserving this property (i,i+1 are in the same rising sequence IFF i+1 to the right of i.
    \
    \ \

    So for example, in the following sequence:

    \

    3, 6, 7, 2, 1, 8, 4, 5

    \

    There are 4 rising sequences (6,7,8; 3,4,5; 2; and 1).\ The sequence 3,6,7,8 is not a rising \ sequence because 3 and 6 are not successive integers.

    \ \
    \
    Definition
    \

    Let nr(S) = the number of rising sequences needed to cover S.

    \

    Why is this number well-defined? \ Because the set of rising sequences is uniquely defined from the\ sequence, determined by the natural algorithm. So their cardinality is\ well defined, too.\ Check that definitions are well-defined (you get the same answer, no matter the process)

    \
    \ \

    So for a deck with 52 cards:

    \

    The case where the cards are in increasing order:
    \ Sinc = 1, 2, 3, ... , 51, 52\ Sequence where everything is increasing\
    nr(Sinc) = 1.

    \ \ \ \

    The case where the cards are in decreasing order.
    \ Sdec = 52, 51, 50, ... , 2, 51\ Sequence where everything is decreasing.\
    nr(Sinc) = 52.

    \ \

    Cutting the deck of cards and riffling will at most give you twice \ the number of rising sequences, because a given rising sequence remain in-tact up to \ the point where the deck was cut. New elements might appear at the front of the rising\ sequence or at the end, but the elements of the rising sequence cannot end up in more\ than two different rising sequences in the riffled deck S'. So

    \ \
    \
    Claim
    \

    If S´is a shuffle of S (so that \ SS´ in one shuffle)

    \

    Then rs(S´) ≤ 2rs(S)

    \
    \ \

    To illustrate, in the sequence:

    \

    3, 4, 5, 6, 7, 8, 9

    \

    The “cut” part of the shuffle could fall between any two numbers in \ the list, \ or it might not cut the sequence at all. Suppose it cuts \ between 6 and 7, then the single rising sequence 3,4,5,6,7,8,9 becomes 3,4,5,6 and 7,8,9. \ Actually, we could capture additional cards to the left of 3 or right of 6 or to the left of 7\ or to the right of 9, but certainly 3,4,5,6 and 7,8,9 will each appear in some rising sequence.\

    \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
    Srs(S)
    Sinc=1
    S1≤ 2
    S2≤ 4
    S3≤ 8
    S4≤ 16
    S5≤ 32
    \ \

    S5 has at most 32 rising sequences, which is still \ less than the 52 required. Specifically, five shuffles can't transform Sinc\ to Sdec. If we can't even reach all the possible ways of mixing up the\ deck, we can't possibly be well mixed. This proves that five shuffles is not enough to \ mix a deck of cards.

    \
  2. \ \ \ \ \ \
  3. \

    Sentential Logic

    \

    Sentential means no quantifiers. Quantifiers are either\ the universal quantifier for all or the existential quantifier \ there exists.

    \

    We will assign truth values\ to each \ proposition symbol—variables like P, Q, P1, Q1, \ or ItsRaining). Each proposition symbol takes on a value of true or \ false

    \

    Here are some other ways to represent true and false.

    \ \ \ \ \ \ \ \ \ \ \ \ \
    trueT1
    falseF0
    \ \

    I'll usually use the last of these notations. Here are some \ binary operators (with common alternative notations) \ on the boolean values, all arranged in a truth table:

    \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
    PQ“Disjunct”
    \ P or Q
    \ P || Q
    \ PQ
    “Conjunct”
    \ P and Q
    \ P && Q
    \ PQ
    “Not P and Q
    \ PQ (?)
    \ P nand Q
    “Neither P nor Q
    \ PQ (?)
    \ P nor Q
    \ “Either P or Q
    \ PQ
    \ P xor Q
    P if and only if Q
    \ PQ
    \ P iff Q
    \ PQ
    \ PQ
    “If P then Q
    \ “P implies Q
    \ PQ\ PQ
    000011011
    011010101
    101010100
    111100011
    \ \

    There is also the unary operator ¬, or “Not“

    \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
    P“Not P
    \ P
    \ !P
    \ ¬P
    01
    10
    \ \

    Examples

    \
      \
    1. “If my name is Peter then it is snowing” is true because the \ professor’s name is not Peter.
    2. \ \
    3. \ Given the statements:\
        \
      1. Jane and Pete won’t both win the math prize
      2. \
      3. Pete will win either the math prize or the chemistry prize
      4. \
      5. Jane will win the math prize
      6. \
      7. ∴ Pete will win the math prize
      8. \
      \ We make the proposition symbols:\
        \
      • JM (Jane wins the math prize)
      • \
      • JC (Jane wins the chemistry prize)
      • \
      • PM (Pete wins the math prize)
      • \
      • PC (Pete wins the chemistry prize)
      • \
      \ And rewrite the previous four statements.\
        \
      1. JMPM
      2. \
      3. PMPC
      4. \
      5. JM
      6. \
      7. PC
      8. \
      \ These statements follow, and can be confirmed by creating a truth table.
    4. \ \
    5. The NSF National Science Foundation\

      “The project description must be brief (no more than 2 to 5 pages)”

      \

      The logical meaning is unclear. Perhaps this means that the \ the description should be anywhere between two to five pages. Or maybe it means at \ most two pages. Or maybe it means at most five pages. You'd think the NSF could be\ more clear.

    6. \
    \ \

    Because of incompatibilities between English and sentential logic, we do not assign truth values to certain statements.

    \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
    Have Truth ValuesDon‘t Assign Truth Values
    There are 168 primes < 1000What’s a rational number
    17 is an even numberIs it raining?
    \ Note that something might have a truth value but you don't know what it is. That's very different\ from being a statement not having a truth value. \ \ \
    \
    Definition
    \
    \

    Let P be a (finite or countably infinite) set (the \ proposition symbols) not containing any symbol in the set\ \{0,1(,),∨,∧,¬,→&harr\}.

    \

    Then the well-formed formulas \ (WFFs) over \ P are the following:

    \
      \
    1. 0 and 1 are WFFs
    2. \
    3. PP is a WFF
    4. \
    5. If α and β are WFFs, \ then so are\
        \
      1. (3) (α ∨ β)
      2. \
      3. (4) (α ∧ β)
      4. \
      5. (5) (¬α)
      6. \
      7. (6) (α → β)
      8. \
      9. (7) (α ↔ β)
      10. \
    6. \
    \

    Nothing else is a WFF.

    \
    \ \
    Examples
    \
    \
      \
    1. ( (P ∨ (¬Q) → R) is a WFF. Using the earlier definitions, we can trace the following:

      \
        \
      1. Using (2), P, Q, and R are WFFs
      2. \
      3. Using (5), ¬Q is a WFF
      4. \
      5. Using (3), (P ∨ (¬Q) is a is a WFF
      6. \
      7. Using (6), ( (P ∨ (¬Q) → R) is a is a WFF
      8. \
      \ \
    2. \
    3. (¬¬P) is not a WFF, but \ we can regard it as one by adding some elided parentheses.
    4. \
    5. →∨Q is not a WFF. How could you prove this?
    6. \ \
    \
    \
    \ \

    To give a truth value to a WFF like (PQ) → Q, \ we use truth assignment. This is a function \ t: P → \{0, 1\}
    \ t(P) = t(Q) = 0: the example formula comes out false
    \ t(P) = t(Q) = 1: the example formula comes out true
    \

    \ \

    A We discussed various properties of the ALGEBRA of PROPOSITIONS from 4.7 in the text.

    \
  4. \
\ \ \ }