Quiz 1 for Discrete Math

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

3 ∈ A

"3 is an element of the set A"

7 ∉ B

"7 is not an element of the set B"

A ⊄ B

"A is not the subset of B"

|A| = 5

"The number of elements in (cardinality of) the set A is 5"

DeMorgan's Laws

(A∪B)-Bar = (A-Bar)∩(B-Bar) (A∩B)-Bar = (A-Bar)∪(B-Bar)

NOR Gate (OR NOT)

An OR gate followed by a NOT.

A ⊂ B

Proper Subset A != B All elements of a are found in B

Truth Table steps

Create variables to hold each gate (X,Y,Z) Draw table using steps from above Complete table

DeMorgan's Laws

¬(p ^ q) ≡ ¬p ∨ ¬q ¬(p ∨ q) ≡ ¬p ^ ¬q

Double Negation Laws

¬(¬p) ≡ p

Partition

A set S, with respect to set X, whose elements are subsets spanning all of X, and whose elements are exclusive between each other.

Multiset

A set which may have multiple of the same element

NAND Gate (AND NOT)

An AND gate followed by a not gate. Very common in electronic and computer design because it requires fewer transistors to build a NAND gate than AND/OR gates, they are cheaper A NAND gate takes less space than an AND gate so they are the preferred gate for logic design. It is also possible to achieve any logic function by just using NAND gates.

Involution Law

A = (A-Bar)-Bar

Deriving an expression from combined gates

Create variable to hold output for each gate; X,Y,Z Write boolean expression for each gate Combine at the end

Commutation law

Declares it does not matter the order in which we place the variables OR Commutation law: A ∨ B ≡ B ∨ A AND Commutation law: A ∧ B ≡ B ∧ A

A−B / A∩B-Bar

Difference / Relative Complement The set of elements that belong to a set but not to another

Combinations for truth tables

Input A: Four 0's then Four 1's Input B: Two 0's then Two 1's (happens twice) Input C: Go down in an 0 1 pattern

A∩B

Intersection The set of the common elements of A and B {x | (x ∈ A)∧(x ∈ B)}

Association Law

Removal of brackets and regrouping of variables. Only works if the same operator is used throughout the whole expression. States it does not matter how we group the variables if the same operator is used throughout. OR associative law: A v(B v C) ≡ B v(A v C) ≡ C v (A v B) ≡ A v B v C AND associative law: A ∧ (B ∧ C) ≡ C ∧ (A ∧ B) ≡ A ∧ B ∧ C

Ordered Pair

Represented (a, b), a collection whose elements' order and values define it.

S∗

Set of elements in S excluding zero

S−

Set of negative elements in S

S+

Set of positive elements in S

De Morgan's First Law

States that a NOR gate with 2 inputs of A & B is the same as passing both A & B through an inverter then an AND gate. The operator changes, apply not to both variables ----- A∨B = ¬A ∧ ¬B NOT (A OR B) == NOT(A) AND NOT (B) Similarly, a NAND gate with 2 inputs of A & B is the same as passing both A & B through an inverter then an OR gate. ---- A∧B == ¬A ∨ ¬B NOT (A AND B) == NOT(A) OR NOT(B)

Double Negation law

States that reversing something twice will cause us to end up where we originally started. Sort of like cancels out. ¬(¬A) ≡ A

A ⊆ B

Subset All elements of A are found in B

B ⊇ A

Superset If A ⊆ B, then B ⊇ A

A⊕B

Symmetric Difference The set of elements exclusive to A or B {x | (x ∈ A)⊕(x ∈ B)} A∪B−A∩B = (A−B)∪(B−A)

Identity Laws

p ∧ T ≡ p p ∨ F ≡ p

Independent Laws

p ∧ p ≡ p p ∨ p ≡ p

Absorption Laws

p ∨ (p ∧ q) ≡ p p ∧ (p ∨ q) ≡ p

Distributive Laws

p ∨ (q ∧ r) ≡ (p ∨ q) ∧ (p ∨ r) p ∧ (q ∨ r) ≡ (p ∧ q) ∨ (p ∧ r)

Domination Laws

p ∨ T ≡ T p ∧ F ≡ F

Commutative Laws

p ∨ q ≡ q ∨ p p ∧ q ≡ q ∧ p

Negation Laws

p ∨ ¬p ≡ T p ∧ ¬p ≡ F

Exclusive Or

And operator

^

Associative Laws

(p ∨ q) ∨ r ≡ p ∨ (q ∨ r) (p ∧ q) ∧ r ≡ p ∧ (q ∧ r)

Distribution Law

Allows for the expansion or factorisation of variables in an expression. The operator stays the same when expanding. OR Distribution law: A ∧ (B ∨ C) ≡ (A ∧ B) ∨ (A ∧ C) AND Distribution law: A ∨ (B ∧ C) ≡ (A ∨ B) ∧ (A ∨ C)

Absorptive law

Allows use to reduce a slightly complicated expression into an equivalent simpler one. States that the second term inside the bracket can always be eliminated and absorbed by the term outside the brackets if given rules are met. Rules: - The operator inside and outside the brackets must be different - Outside can be OR, inside has to be AND - Outside can be AND, inside has to be OR - The term outside the brackets must also appear inside the brackets If these rules are met, we can take the second term, eliminate it completely so we are left with just the first term (the one that appears twice). OR Absorptive law: A ∨ (A ∧ B) = A AND Absorptive law: A ∧ (A ∨ B) = A

Bound Laws

A∪U = U A∩∅ = ∅

Identity Laws

A∪∅ = A A∩U = A

Boolean simplification rules

Association Distribution Commutation Double negation De morgans laws

Cartesian Product (A × B)

A×B = {(a, b) | (a ∈ A)∧(b ∈ B)} The set of all ordered pairs (a, b), such that a ∈ A and b ∈ B

Disjoint

A∩B = ∅

Absorption Laws

A∪(A∩B) = A A∩(A∪B) = A

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

Complement Laws

A∪A-Bar = U A∩A-Bar = ∅

Commutative Laws

A∪B = B∪A A∩B = B∩A

Set

Collection of objects, called elements

A-Bar = {x ∈ U | x ∉ A}

Complement The set of elements (in the universal set) that do not belong to a given set

Tuples

Elements of a cartesian product

NOT Gate

Flips the bits. Sign is ¬A

Karnaugh Map rules

For 4 variables: Columns of 00, 01, 11, 10. Repeat for rows. - Draw largest rectangle around groups of 1s. Groups of 1,2,4,8. - Groups can overlap and wrap around - Ensure the total number of groups is as low as possible - Make the groups as large as possible Simplifying: - Create an expression for each group by looking at rows and columns use AND & NOT (/\,¬) - Combine all expressions using OR (\/) Creating expression for each group: - Check rows and columns, if any variable changes disregard this variable - If none flip, they either stay at 1 or 0: If it stays at 1: Write variable name; A,B,C,D If it stays at 0: Use inverse (NOT) of variable - Use AND (/\) between each variable

Boolean expression general rules

For simplifying AND expressions: X ∧ 0 = 0 X ∧ 1 = X X ∧ X = X X ∧ ¬X = 0 For simplifying OR expressions: X ∨ 0 = X X ∨ 1 = 1 X ∨ X = X X ∨ ¬X = 1

Logical operations

NOT (Negation) AND (Conjunction) OR (Disjunction) XOR (Exclusive OR)

∅ / {}

Null Set Empty Set Set with no elements

Element

One object of a set

OR Gate

Only on if either A or B are on Sign is A \/ B

AND Gate

Only on when both A & B are on. Sign is A /\ B

XOR Gate

Only on when one of A or B is on, but not both. Sign is \__/

|2^A| = 2^|A|

The cardinality of the power set of A is equal to 2 to the power of A's cardinality

Power Set

The collection of all subsets of a set

C

The set of complex number

Q

The set of rational numbers

R

The set of real numbers

Principle of Extension

Two sets are equal if and only if they have the same elements (A = B ≡ ∀x(x ∈ A ↔ x ∈ B))

A∪B

Union The set of all elements in A or B {x | (x ∈ A)∨(x ∈ B)}

OR operator

V

Set-Builder Notation

Way to define a set by stating a property (predicate) P(x) verified by exactly its elements (A = {x ∈ U | p(x)})

Generalized Union and Intersection

[N/U/n=1] An = A1 ∪A2 ∪···∪AN = {x |∃n(x ∈ An)} The set of elements of n unions is found in at least one set [N/∩/n=1] An = A1 ∩ A2 ∩···∩AN = {x |∀n(x ∈ An)} The set of n intersections has elements from all component sets

Material Implication

p → q ≡ ¬p ∨ q

N

{0,1,2,3,···} = The set of natural numbers

Z

{··· ,−3,−2,−1,0,1,2,3,···} = The set of integers

0/1 Laws

∅-Bar = U U-Bar = ∅


Ensembles d'études connexes

SB HW Ch 5 Evidence & Documentation

View Set

Chapter 7 Groups & Consumer Behavior

View Set

Chapter 7 Management and Leadership

View Set

Chapter 7: Trust, Justice and Ethics

View Set

Study Unit 8- Depreciation and Depletion

View Set

Hazmat Awareness: Container types and Behavior

View Set