Robert Batzinger
Dec 2 17
\[ \]
\[ \begin{array}{|c|c|c|} \hline Symbols & Reading & Type\\ \hline P \land Q & & \\ & Not P & \\ P \lor Q & & Negation\\ &P\quad AND\quad Q & \\ P \implies Q & & Conjugation \\ & P\quad IF\ AND\ ONLY\ IF\quad Q & \\ P \leftrightarrow Q& & Implication\\ &P\quad OR\quad Q & \\ \not P & & Biconditional\\ & IF\quad P\quad THEN\quad Q & \\ & & Disjugation\\ \hline \end{array} \]
An argument is a set of statements that draw a conclusion from a hypothesis in the form of a series of premises.
\( \therefore \) Edith gets a cookie.
*Florence must eat her vegetables in order to get a cookie.
\( \therefore \) Florence gets a cookie.
To prove an implication
\[ P \implies Q \]
It is enough to
Who knows the rule for Squares ending in 5??
The converse of an implication
\[ P \implies Q \quad\not=\quad Q \implies P \]
The contrapositive of an implication
\[ P \implies Q \therefore \neg P \implies \neq Q \]
\[ !P \lor Q == P \rightarrow Q \]
\[ !(P\land Q) \therefore !P \lor !Q \]
\[ !(P\lor Q) \therefore !P \land !Q \]
\[ !(!P) \therefore P \]
\[ !(P \rightarrow Q) \therefore P\land !Q \]
\[ P\lor Q \rightarrow R \therefore (P \rightarrow R) \lor (Q \rightarrow R) \]
Holmes owns two suits: one black and one tweed. He always wears either a tweed suit or sandals. Whenever he wears his tweed suit and a purple shirt, he chooses to not wear a tie. He never wears the tweed suit unless he is also wearing either a purple shirt or sandals. Whenever he wears sandals, he also wears a purple shirt. Yesterday, Holmes wore a bow tie. What else did he wear?
Note: each of the five houses is painted a different color, and their inhabitants are of different national extractions, own different pets, drink different beverages and smoke different brands of American cigarettes.
\[ \begin{array}{rcl} A\lor \neg A &\equiv& T\\ A\lor A &\equiv& A\\ A\lor F &\equiv& A\\ A\lor T &\equiv& T\\ \end{array} \]
\[ \begin{array}{rcl} A\land \neg A &\equiv& F\\ A\land A &\equiv& A\\ A\land F &\equiv& F\\ A\land T &\equiv& A\\ \end{array} \]
\[ \begin{array}{rcl} A\land (B\lor \neg B)&\equiv& A\\ A\lor A \land B &\equiv& A\\ A\land (A \lor B)&\equiv& A\\ A\lor B &\equiv& B \lor A\\ A\land B &\equiv& B \land A\\ \end{array} \]
\[ \begin{array}{rcl} \neg (A\lor B) &\equiv&\neg A \land \neg B\\ \neg (A\land B) &\equiv& \neg A \lor \neg B\\ \end{array} \]
\[ \begin{array}{rcl} A\lor (B \lor C) = (A\lor B) \lor C &\equiv& B\lor(A\lor C)\\ A\land (B \land C) = (A\land B) \land C &\equiv& B\land(A\land C)\\ A\land (B \lor C) &\equiv& (A\land B) \lor (A\land C)\\ (A\lor B)\land(C\lor D) &\equiv& (A\land C)\lor(A\land D)\lor(B\land C)\lor(B\land D)\\ \end{array} \]
\[ \begin{array}{rcl} p\lor q&\equiv&q \lor p\\ p\land q &\equiv&q \land p\\ \end{array} \]
\[ \begin{array}{rcl} (p\lor q)\lor r&\equiv&p \lor (q \lor r)\\ (p\land q)\land r &\equiv&p \land (q\land r)\\ \end{array} \]
\[ \begin{array}{rcl} p\lor (q\land r)&\equiv&(p \lor q) \land (p\lor r)\\ p\land (q\lor r)&\equiv&(p \land q)\lor (p \land r)\\ \end{array} \]
\[ \begin{array}{rcl} p \lor p &\equiv p \equiv& p \lor F\\ p\land p &\equiv p \equiv& p\land T\\ \end{array} \]
\[ \begin{array}{rcl} p \lor T &\equiv& T\\ p \land F &\equiv& F\\ \end{array} \]
\[ \begin{array}{rcl} \overline{p\lor q}&\equiv& \overline{p} \land \overline{q}\\ \overline{p\land q}&\equiv& \overline{p} \lor \overline{q}\\ \end{array} \]
\[ \begin{array}{rcl} p\implies q&\equiv&\overline{q}\implies\overline{q} \equiv \overline{p}\lor q\\ \end{array} \]
\[ \Large (A\lor B)\land (B \lor C)\qquad \]
\[ \begin{array}{l} = (A\land B)\lor (A\land C)\lor (B\land B)\lor (B\land C)\\ = (A\land B)\lor (A\land C)\lor (B)\lor (B\land C)\\ = (A\land B)\lor (A\land C)\lor \left(B\land (T \lor C)\right)\\ = (A\land C)\lor (A\land B)\lor B\\ = (A\land C)\lor \left(B\land (A\lor T)\right)\\ = (A\land C)\lor B\\ \end{array} \]
\[ \Large (A\land B)\land(\neg B\lor C)\qquad \]
\[ \begin{array}{l} = (A\land B\land\neg B)\lor (A\land B\land C)\\ = A\land B\land C\\ \end{array} \]
\[ \Large B\land(A\lor \neg B)\lor (B\land C)\qquad \]
\[ \begin{array}{l} = (B\land A)\lor (B\land \neg B)\lor (B\land C)\\ = (B\land A)\lor (B\land C)\\ = B\land (A\lor C)\\ \end{array} \]
\[ \Large B\land(A\lor C)\lor C\qquad \]
\[ \begin{array}{l} = (B\land A)\lor (B\land C)\lor C\\ = (A\land B)\lor \left(C\land (B\lor T)\right)\\ = (A\land B)\lor C\\ \end{array} \]
\[ (A\land B)\lor (A \land C)\lor (B \land C)\lor (A\land B\land C) \]
\[ \begin{array}{l} = A\land \left(B\lor C \lor (B\land C)\right)\\ = A\land \left(B\lor C\land(T \lor B)\right)\\ = A\land (B\lor C)\\ \end{array} \]
\[ (A\land B)\lor (\neg B\land C)\lor(A\land C) \]
\[ \overline{(A\land B)}\land(B\lor C) \]
\[ B\land (A\lor C)\lor C \]
Math Symbol | Arithmetic Equiv |
---|---|
\( A\land B \) | \( A \times B \) |
\( A\lor B \) | \( A + B \) |
\( True \) | \( 1 \) |
\( False \) | \( 0 \) |
\( \neg(A\lor B) = \neg A \land \neg B \) | \( \overline{A + B} = \overline A \times \overline B \) |
Field | Abbrev | Description | Sample |
---|---|---|---|
0 | id | Record number | 0 |
1 | cntry | Country | France |
2 | descr | Review | This wine is very… |
3 | label | Brand name | Martha's Vineyard |
4 | pts | Reviewer points | 83 |
5 | price | Price per litre | 20.75 |
6 | prov | Province | California |
7 | reg_1 | Region 1 grown | Oakland |
8 | reg_2 | Alternative Region | Napa Valley |
9 | variety | Grape variety | Cabernet Sauvignon |
10 | winery | Manufacturer | Heitz |
\[ \Large(E\land P \land C) \lor \\ \Large(E\land Q \land X) \lor \\ \Large(L\land Q \land C) \lor \\ \Large(L \land Q \land X)\lor \\ \Large(\neg E\land Q \land C) \lor \\ \Large(\neg E\land Q \land \neg C) \lor\\ \Large(C \land P \land E) \lor\\ \Large(X \land Q \land L)\lor\\ \Large(U \land E)\lor\\ \Large(V \land L) \]
Parameter | Mean | Std Dev | min | Q-05 | Q-50 | Q-95 | max | count |
---|---|---|---|---|---|---|---|---|
Price | 33.13 | 36.31 | 4.00 | 10.00 | 24.00 | 80.00 | 2300.00 | 137235 |
Price by Grape | 22.86 | 14.29 | 0.00 | 8.80 | 20.00 | 45.03 | 150.00 | 632 |
Review pts | 87.89 | 3.06 | 80.00 | 83.00 | 88.00 | 93.00 | 100.00 | 150930 |
Wines by Grape | 238.81 | 1215.43 | 1.00 | 1.00 | 8.00 | 982.00 | 14482.00 | 632 |
# E = Most expensive
def e?
return (
@record[5].to_f
> 79.99)
end
# L = Least expensive
def l?
return (
@record[5].to_f
< 10.01)
end
def fuzzyE
value =
(@record[5].to_f -
10) / 70.00
if value > 1
value = 1.00
elsif value < 0
value = 0.00
end
return value
end
def fuzzyAND(*fuzzyArray)
return fuzzyArray.min
end
def fuzzyOR(*fuzzyArray)
return fuzzyArray.max
end
def fuzzyNEG(val)
return 1.00 - val
end
Wine Parameter | Logic | Tally | Inv | Extreme | |||
---|---|---|---|---|---|---|---|
Cost per bottle | Dis | E | 7323 | !E | 143607 | L | 24110 |
Fuz | 7323 | 143607 | 24110 | ||||
Quality | Dis | Q: | 12460 | !Q: | 138470 | P: | 12489 |
Fuz | 12460 | 138470 | 12489 | ||||
Grape Type | Dis | C: | 125476 | !C: | 25454 | X: | 97 |
Fuz | : 125476 | !C: | 25454 | X: | 1191 | ||
Value by Grape | Dis | V: | 4347 | !V: | 146583 | I: | 135 |
Fuz | 1908 | 149022 | 174 |
dataset.rb
for the missing logic functions to determine the counts of wines that meet the criteria and record the time used. Selected: 9465
Rejected: 141465
Time used: 9.812 sec
Selected: 9172
Rejected: 141758
Time used: 28.859 sec
Methods
Attributes
Determine if a statement is valid and true
If \( ab \) is an even number, then \( a \) or \( b \) is even.
CONTRAPOSITIVE
if \( a \) and \( b \) are odd: \( ab \) is odd.
\[ \begin{array}{rcl} ab &=& (2k+1)(2m+1)\\ &=& 4km + 2k + 2m + 1\\ &=& 2(km + k + m) + 1\\ \end{array} \]
DIRECT PROOF
if \( a \) or \( b \) is even:
\[ \begin{array}{rcl} ab&=&(2k)b\\ &=&2(kb)\\ \end{array} \]
*
COUNTER EXAMPLE
if \( ab \) is even and \( a \) and \( b \) are odd:
\[ \begin{array}{rcl} ab = 2n &=& (2k+1)(2m+1)\\ 2n &=& 4km +2k +2m +1\\ n &=& 2km + k + m + {1\over 2}\\ \end{array} \]
DIRECT PROOF
if \( ab \) is even and \( a \) is odd:
\[ \begin{array}{rcl} ab = 2n &=&(2k+1)b\\ 2n &=& 2kb + b\\ 2n - 2kb &=& b\\ 2(n - kb)&=& b\\ \end{array} \]
Assume \( P \) Explain, explain \( \therefore \) Q
Prove if \( n \) is even, then \( n^2 \) is even.
Prove that if \( a/b \) and \( b/c \) then \( a/c \)
**Assume \( \neg Q \) explain, explain \( \therefore \) \( \neg P \)
Prove if \( n \) is even, then \( n^2 \) is even.
Prove that if \( a/b \) and \( b/c \) then \( a/c \)
Invalidation by showing an example where the statement is wrong
Prove if \( n \) is even, then \( n^2 \) is even.
Prove \( n^2 - n + 41 \) is not always prime
\( n \) | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
---|---|---|---|---|---|---|---|
\( n^2-n+41 \) | 41 | 43 | 47 | 53 | 61 | 71 | 83 |
Prove that \( n^3 - n \) is always even.
Prove that \( n^3 - n \) is divisible by 3
Prove that not all lines are perpendicular to each other.
\[ \begin{array}{rcl} f_1(x) = 3x + 7\\ f_2(x) = 2x - 3\\ \end{array} \]
Prove by showing that all cases are true
Prove that \( n^3-n \) is always even
\[ \begin{array}{l} n^3 - n \\ \quad = (2k)^3 - 2k\\ \quad = 8k^3 - 2k\\ \quad = 2(4k^3 - k)\\ \end{array} \]
\[ \begin{array}{l} n^3 - n \\ \quad = (2k+1)^3 - (2k+1)\\ \quad = 8k^3 + 12k^2 + 6k + 1 - 2k - 1\\ \quad = 8k^3 + 12k^2 + 4k)\\ \quad = 2(4k^3 + 6k^2 + 2k)\\ \end{array} \]
n x x/12
1 0 0
2 6 0.5
3 24 2
4 60 5
5 120 10
6 210 17.5
7 336 28
8 504 42
9 720 60
10 990 82.5
n x x/12
11 1320 110
12 1716 143
13 2184 182
14 2730 227.5
15 3360 280
16 4080 340
17 4896 408
18 5814 484.5
19 6840 570
20 7980 665
Level of membership on a scale of 0 - 1
Collection of the inverse of membership calculated as 1 minus the membership
Collection of the maximum degrees of membership
Collection of the minimum degrees of membership
\[ \Large (A\land B)\lor (\neg B\land C)\lor(A\land C)\qquad \]
\[ \begin{array}{l} = (A\land B)\lor (\neg B\land C)\lor(A\land C)\land(\neg B\lor B)\\ = (A\land B)\lor (\neg B\land C)\lor(A\land\neg B\land C)\lor (A\land B\land C)\\ = (A\land B)\land(T \lor C)\lor (\neg B\land C)\land(T\lor A)\\ = (A\land B)\lor (\neg B\land C)\\ \end{array} \]
\[ \Large \overline{(A\land B)}\land(B\lor C)\qquad\qquad \]
\[ \begin{array}{l} = (\overline{A}\lor \overline{B})\land(B\lor C)\\ = (\overline{A}\land B)\lor (\overline{A}\land C)\lor (\overline{B}\land B)\lor (\overline{B}\land C)\\ = (\overline{A}\land B)\lor (\overline{A}\land C)\lor (\overline{B}\land C)\\ \end{array} \]
\[ \Large B\land (A\lor C)\lor C\qquad \]
\[ \begin{array}{l} = (B\land A)\lor (B\land C)\lor C\\ = (B\land A)\lor (B\lor T)\land C\lor C\\ = (B\land A)\lor C\lor C\\ = (A\land B)\lor C\\ \end{array} \]
Quality | H1 | H2 | H3 | H4 | H5 |
---|---|---|---|---|---|
Color | yellow | blue | red | ivory | green |
National | norway | ukrain | england | spain | japan |
Cigarette | kools | chesterfield | OldGolf | LuckyStrike | Parliament |
Drink | WATER | tea | milk | orangeJuice | coffee |
Pet | fox | horse | snails | dog | ZEBRA |