CSCE222 First Exam
Existential Generalization (EG)
"Michelle got an A in the class." "Therefore, someone got an A in the class."
even integer
2k
Tuples
The ordered n-tuple (a1,a2,.....,an) is the ordered collection that has a1 as its first element and a2 as its second element and so on until an as its last element
pre-image
if the x for F(x)
Floor function
|_x_| is the largest integer less than or equal to x. 3.5=3
Implication (symbol)
→
Existential Instantiation (EI)
"There is someone who got an A in the course." "Let's call her a and say that a got an A"
De Morgan's Second Law
(A ∩ B)' = (A)' ∪ (B)'
De Morgan's First law
(A ∪ B)' = (A)' ∩ (B)'
Complementation law
(A=)=A *first equal sign denotes a double bar on top of A*
ordered pairs
2-tuples are called ordered pairs.
How many rows are there in a truth table with n propositional variables
2^(n)
odd integer
2k+1
if a set has n elements what is the cardinality of the *power set*
2ⁿ
Bijections
A function f is a one-to-one correspondence, or a bijection, if it is both one-to-one and onto (surjective and injective). *basically a function as we usually know*
Geometric Progression
A geometric progression is a sequence of the form: where the initial term a and the common ratio r are real numbers.
Partial Functions
A partial function f from a set A to a set B is an assignment to each element a in a subset of A, called the domain of definition of f, of a unique element b in B ex: f: N → R where f(n) = √n is a partial function from Z to R where the domain of definition is the set of nonnegative integers. Note that f is undefined for negative integers.
Proper Subsets
A proper subset of a set A is a subset of A that is not equal to A. In other words, if B is a proper subset of A, then all elements of B are in A but A contains at least one element that is not in B. For example, if A={1,3,5} then B={1,5} is a proper subset of A. The set C={1,3,5} is a subset of A, but it is not a proper subset of A since C=A. The set D={1,4} is not even a subset of A, since 4 is not an element of A.
Sequences
A sequence is a function from a subset of the integers (usually either the set {0, 1, 2, 3, 4, .....} or {1, 2, 3, 4, ....} ) to a set S.
Complement laws
A ∪ A' = U A ∩ A' = ∅
Algorithms
An algorithm is a finite set of precise instructions for performing a computation or for solving a problem.
Proof by Contraposition
Assume ¬q and show ¬p is true also. This is sometimes called an indirect proof method. If we give a direct proof of ¬q → ¬p then we have a proof of p → q.
Distributive laws
A∩(B∪C)=(A∩B)∪(A∩C) A∪(B∩C)=(A∪B)∩(A∪C)
Associative laws
A∪(B∪C)=(A∪B)∪C A∩(B∩C)=(A∩B)∩C
Idempotent laws
A∪A=A A∩A=A
Commutative laws
A∪B=B∪A A∩B=B∩A
Domination laws
A∪U=U A∩∅=∅
Identity laws
A∪∅=A A∩U=A
2 things to know about subsets
Because a ∈ ∅ is always false, ∅ ⊆ S for every set S. Because a ∈ S → a ∈ S, S ⊆ S, for every set S.
Conjunction (Rules of Inference for Propositional )
Corresponding Tautology: ((p) ∧ (q)) →(p ∧ q) Example: Let p be "I will study discrete math." Let q be "I will study English literature." "I will study discrete math." "I will study English literature." "Therefore, I will study discrete math and I will study English literature."
Resolution
Corresponding Tautology: ((¬p ∨ r ) ∧ (p ∨ q)) →(q ∨ r) ¬p ∨ r p ∨ q ________ ∴q ∨ r
Simplification (Rules of Inference for Propositional )
Corresponding Tautology: (p∧q) →p Let p be "I will study discrete math." Let q be "I will study English literature." "I will study discrete math and English literature" "Therefore, I will study discrete math."
Modus Tollens
Corresponding Tautology: (¬q∧(p →q))→¬p Let p be "it is snowing." Let q be "I will study discrete math." "If it is snowing, then I will study discrete math." "I will not study discrete math." "Therefore , it is not snowing."
Hypothetical Syllogism
Corresponding Tautology: ((p →q) ∧ (q→r))→(p→ r) Let p be "it snows." Let q be "I will study discrete math." Let r be "I will get an A." "If it snows, then I will study discrete math." "If I study discrete math, I will get an A." "Therefore , If it snows, I will get an A."
Disjunctive Syllogism
Corresponding Tautology: (¬p∧(p ∨q))→q Let p be "I will study discrete math." Let q be "I will study English literature." "I will study discrete math or I will study English literature." "I will not study discrete math." "Therefore , I will study English literature."
Addition (Rules of Inference for Propositional )
Corresponding Tautology: p →(p ∨q) p _________________ ∴p∨q Let p be "I will study discrete math." Let q be "I will visit Las Vegas." "I will study discrete math." "Therefore, I will study discrete math or I will visit Las Vegas."
Arithmetic Progression
Definition: A arithmetic progression is a sequence of the form: where the initial term a and the common difference d are real numbers.
Fibonacci Sequence
Definition: Define the Fibonacci sequence, f0 ,f1 ,f2,..., by: Initial Conditions: f0 = 0, f1 = 1 Recurrence Relation: fn = fn-1 + fn-2
Factorial Function
Definition: f: N → Z+ , denoted by f(n) = n! is the product of the first n positive integers when n is a nonnegative integer. f(6) = 6! = 1 ∙ 2 ∙ 3∙ 4∙ 5 ∙ 6 = 720
Natural Numbers
Denoted by N {0,1,2,3....}
Integers
Denoted by Z {...,-3,-2,-1,0,1,2,3,...}
True or false? ∅ = { ∅ }
False ∅ ≠ { ∅ }
Inclusive Or
For p ∨q to be true, either one or both of p and q must be true
Truth Sets of Quantifiers
Given a predicate P and a domain D, we define the truth set of P to be the set of elements in D for which P(x) is true. The truth set of P(x) is denoted by {x ∈ D|P(x)} ex: The truth set of P(x) where the domain is the integers and P(x) is "|x| = 1" is the set {-1,1}
Complement
If A is a set, then the complement of the A (with respect to U), denoted by Ā is the set U - A Ā = {x ∈ U | x ∉ A} ex: If U is the positive integers less than 100, what is the complement of {x | x > 70} Solution: {x | x ≤ 70}
Implication
If p denotes "I am at home." and q denotes "It is raining." then p →q denotes "If I am at home then it is raining
Biconditional
If p denotes "I am at home." and q denotes "It is raining." then p ↔q denotes "I am at home if and only if it is raining."
Conjunction
If p denotes "I am at home." and q denotes "It is raining." then p ∧q denotes "I am at home and it is raining."
Disjunction
If p denotes "I am at home." and q denotes "It is raining." then p ∨q denotes "I am at home or it is raining."
Negation
If p denotes "The earth is round.", then ¬p denotes "It is not the case that the earth is round," or more simply "The earth is not round."
Cardinality
If there are exactly n distinct elements in S where n is a nonnegative integer, we say that S is finite. Otherwise it is infinite. |ø| = 0 Let S be the letters of the English alphabet. Then |S| = 26 |{1,2,3}| = 3 |{ø}| = 1
Functions
Let A and B be nonempty sets. A function f from A to B, denoted f: A → B is an assignment of each element of A to exactly one element of B. We write f(a) = b if b is the unique element of B assigned by the function f to the element a of A.
Difference
Let A and B be sets. The difference of A and B, denoted by A - B, is the set containing the elements of A that are not in B. The difference of A and B is also called the complement of B with respect to A. A - B = {x | x ∈ A x ∉ B} = A ∩B *A-B would leave only the A (without the intersection) shaded*
Union
Let A and B be sets. The union of the sets A and B, denoted by A ∪ B, is the set {x|x ∈ A V x ∈ B} ex: What is {1,2,3} ∪ {3, 4, 5}? Solution: {1,2,3,4,5} *the whole venn diagram*
Russell's Paradox
Let S be the set of all sets which are not members of themselves. A paradox results from trying to answer the question "Is S a member of itself?" ex Henry is a barber who shaves all people who do not shave themselves. A paradox results from trying to answer the question "Does Henry shave himself?"
Inverse Functions
Let f be a bijection from A to B. Then the inverse of f, denoted f^(-1), is the function from B to A defined as f^(-1)(y)=x if f(x)=y
Composition
Let f: B → C, g: A → B. The composition of f with g, denoted f∘g(g) is the function from A to C defined by f∘g(x)=f(g(x))
Universal Instantiation
Our domain consists of all dogs and Fido is a dog. "All dogs are cuddly." "Therefore, Fido is cuddly."
Universal Generalization (UG)
P(c) for an arbitrary c ------------------ ∴∀xP(x)
Example of Set builder notation
S = {x | x is a positive integer less than 100} Q+ = {x ∈ R | x = p/q, for some positive integers p,q}
{{1,2,3},a, {b,c}} {*N*,*Z*,*Q*,*R*} This is an example of...
Sets being elements of sets.
Modus Ponens
Tautology (p ∧ (p →q)) → q Let p be "It is snowing." Let q be "I will study discrete math." "If it is snowing, then I will study discrete math." "It is snowing." "Therefore , I will study discrete math."
Cartesian Product
The Cartesian Product of two sets A and B, denoted by A × B is the set of ordered pairs (a,b) where a ∈ A and b ∈ B ex: A = {a,b} B = {1,2,3} A × B = {(a,1),(a,2),(a,3), (b,1),(b,2),(b,3)}
How is an empty set symbolized
The empty set is the set with no elements. Symbolized ∅, but {} also used
Intersection
The intersection of sets A and B, denoted by A ∩ B, is {x|x ∈ A ^ x ∈ B} ex: {1,2,3} ∩ {3,4,5} Solution: {3} {1,2,3} ∩ {4,5,6} ? Solution: ∅ *middle of venn diagram*
equality of ordered pairs
The ordered pairs (a,b) and (c,d) are equal if and only if a = c and b = d.
Subsets
The set A is a subset of B, if and only if every element of A is also an element of B. The notation A ⊆ B is used to indicate that A is a subset of the set B.
Power Sets
The set of all subsets of a set A, denoted P(A), is called the power set of A. ex: If A = {a,b} then P(A) = {ø, {a},{b},{a,b}}
Symmetric Difference
The symmetric difference of A and B, denoted by A ⊕ B is the set (A-B) U (B-A) ex: U = {0,1,2,3,4,5,6,7,8,9,10} A = {1,2,3,4,5} B ={4,5,6,7,8} What is A ⊕ B : Solution: {1,2,3,6,7,8} *everything but the middle of the venn diagram*
Exclusive Or
This is the meaning of Exclusive Or (Xor). In p ⊕ q , one of p and q must be true, but not both
Biconditional Statements
To prove a theorem that is a biconditional statement, that is, a statement of the form p ↔ q, we show that p → q and q →p are both true
Proof by Contradiction
To prove p, assume ¬p and derive a contradiction such as p ∧ ¬p. (an indirect form of proof). Since we have shown that ¬p →F is true , it follows that the contrapositive T→p also holds.
Showing that A is not a Subset of B
To show that A is not a subset of B, A ⊈ B, find an element x ∈ A with x ∉ B. (Such an x is a counterexample to the claim that x ∈ A implies x ∈ B.)
Showing that A is a Subset of B
To show that A ⊆ B, show that if x belongs to A, then x also belongs to B.
Set Equality
Two sets are equal if and only if they have the same elements. *no matter the order* {1,3,5} = {3, 5, 1} {1,5,5,5,3,3,1} = {1,3,5} are both equal sets
A tautology is...
a proposition which is always true
Absorption laws
a ∩ (a ∪ b)=a ∪ (a ∩ b)=a
Translate: You can access the Internet from campus only if you are a computer science major or you are not a freshman
a:You can access the internet from campus," c:"You are a computer science major," f: "You are a freshman." a→ (c ∨ ¬ f )
term of the sequence
a_n
codomain
are all the F(x)'s in F(x)=x
domain
are all the x's in F(x)=x
For interval notation name the symbol for *closed interval*
closed interval [a,b]
Asymmetric
if and only if (x,y) in R implies (y,x) not in R
Irreflexive
if and only if xRx does not hold for any x in A
reflexive
if and only if xRx for all x in A
Antisymmetric
if and only if xRy and yRx implies x = y
transitive
if and only if xRy and yRx implies xRz
symmetric
if and only xRy implies yRx
disjoint
if the intersection is empty, then A and B are said to be
image
is the *y*
Other names for functions
mappings or transformations.
For interval notation name the symbol for *open interval*
open interval (a,b)
one-to-one
or injective, if and only if f(a) = f(b) implies that a = b for all a and b in the domain of f. A function is said to be an injection if it is one-to-one. *passes the vertical line test*
onto
or surjective, if and only if for every element b∈B there is an element a∈A with f(a)=b . A function f is called a *surjection* if it is *onto.*
Translate: The automated reply cannot be sent when the file system is full
p: "The automated reply can be sent" q :"The file system is full." q→ ¬ p
converse of p →q and It raining is a sufficient condition for my not going to town
q →p If I do not go to town, then it is raining
universal set U
set containing everything currently under consideration
set of C
set of complex numbers.
set of Q
set of rational numbers
set of R
set of real numbers
Ceiling function
|-x-| is the smallest integer greater than or equal to x -1.5=-1
Negation (symbol)
¬
inverse of p → q and It raining is a sufficient condition for my not going to town
¬ p → ¬ q If it is not raining, then I will go to town.
contrapositive of p →q and It raining is a sufficient condition for my not going to town
¬q → ¬ p If I go to town, then it is not raining.
Biconditional (symbol)
↔
Universal Quantifier
∀xP(x) - P(x) holds for all x in the domain
Uniqueness Quantifier
∃!x P(x) means that P(x) is true for one and only one x in the universe of discourse.
Some student in this class has visited Mexico. Let M(x) denote "x has visited Mexico" and S(x) denote "x is a student in this class," and U be all people.
∃x (S(x) ∧ M(x))
Every student in this class has visited Canada or Mexico Let M(x) denote "x has visited Mexico" and S(x) denote "x is a student in this class," and U be all people Add C(x) denoting "x has visited Canada
∃x (S(x)→ (M(x)∨C(x)))
Existential Quantifier
∃xP(x) - P(x) holds for some x in the domain D
Conjunction (symbol)
∧
Disjunction (symbol)
∨