Exam 1 Discrete Structures CS 124

अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!

Propositions

( can also be referred to as Statements ) A sentence that is either True or False but not both

Negation of p ↔ q

(p ∨ q) ∧ ~ (p ∧ q)

Suppressing Quantifiers

(x∈D ∧ P(x)) → Q(x) i.e. If t is a good basketball team then t will win at least one game

De Morgan's laws

*Flip the operator and negate everything* ¬(p ∧ q) ≡ ¬p ∨ ¬q ¬(p ∨ q) ≡ ¬p ∧ ¬q *Note* when negating inequalities using De Morgan's laws, pay attention to problems like this: 4 < 2 ≤ 6 There is a hidden *and* so the negation is 4 ≥ 2 *or* 2 > 6

Venn Diagram Symbols

*U* Represents the set of all possible elements (AKA the universe) *S* A set represented by a disc (All elements in S live in the disc) *•* (dots) Represents individual elements

Bit-Wise Operators

*~* Negation *&* Conjunction (and) *|* Disjunction (or)

Version 2 of the Product Rule

- Suppose that task T can be divided into a sequence of Y sub-tasks t₁, t₂, ..., tᵧ - If each task tᵢ can be complete in nᵢ ways... no matter how the previous tasks were done THEN THERE ARE n₁ x n₂ x ... x nᵧ WAYS TO COMPLETE T

Version 1 of the Product Rule

- Suppose that task T can be divided into two sub-tasks t₁ and t₂ - If t₁ can be complete in n₁ ways... no matter how it is completed - Then there are n₂ ways to complete t₂ SO THERE ARE n₁ x n₂ WAYS TO COMPLETE T

Constructing a truth table

- You must have a column for each of the variables - The table will need 2ⁿ rows (n being the number of variables in the propositional form) - The T and F values must follow the standard truth table enumeration - When trying to prove something, you must annotate the table

1010 0110 & -------

= 1010 0110 & ------- 0010

1010 0110 | -------

= 1010 0110 | ------- 1110

~ 1010

= 0101

Contradiction

A propositional form that is *always False*, no matter what truth values are substituted for its variables p ∧ ~p

Tautology

A propositional form that is *always True*, no matter what truth values are substituted for its variables p ∨ ~p

Axiom of Extension

A set is completely determined by what its elements are - not the order in which they might be listed or the fact that some elements might be listed more than once

*N*

A set of *natural numbers* {1, 2, 3, 4, 5, ...}

*Z*

A set of integers {..., -2, -1, 0, 1, 2, ...}

*Q*

A set of rational numbers {4/5, 3.3333, 0.5, 3/9}

*R*

A set of real numbers {1, 1/2, 0.33333, 0, π, -5}

Ø

A set with no elements (AKA null set)

Universal Statement

A statement in the form ∀x∈D(P(x)) and it is *true*: when no matter what value in D is substituted for x, P(x) is true *false*: when there is at least one value in D where P(x) is false

Existential Statement

A statement in the form ∃x∈D(P(x)) and it is *true*: when there is at least one element in D where P(x) is true *false*: when no matter what element x is in D, P(x) is false

Propositional Form

An expression made of variables (p, q, r) and logical connectives / operators (∨, Λ, ¬). They don't have truth values

Set

An unordered collection of elements

Quantifiers - ∃

Existential quantifier - "there exists"

Negating Quantified Statements

Flip the quantifier and negate the proposition ~∀x∈ P(x) ≡ ∃x∈ ~P(x) ~∃x∈ P(x) ≡ ∀x∈ ~P(x)

Truth tables

Give the truth values corresponding to all possible combinations of truth values for a propositional forms variables

Cardinality

How many distinct elements there are in a set

Principle of Inclusion/Exclusion

If: - a task can be done using one of the two procedures p₁ and p₂ - p₁ can be done n₁ ways and p₂ can be done n₂ ways - there are n₃ ways common between n₁ and n₂ THEN THERE ARE n₁ + n₂ - n₃ WAYS TO COMPLETE THE TASK

Predicate

Replacing some or all of the nouns with variables. It is a sentence with a finite number of variables. Bob likes gumballs -> *x* likes gumballs

Universal Conditions

Represented as ∀x∈D(P(x) → Q(x)) i.e. For all teams t, if t is good, then t will win at least one game

Element

Something in a set

Addition and Subtraction Rule

Sometimes the Principle of Inclusion/Exclusion can be referred to as the: - *Addition* / Sum rule if *n₃ = 0* or the - *Subtraction* rule if *n₃ != 0*

Set-Roster Notation

Specifies a set by giving the elements of the set as a *comma separated list enclosed in braces ({ })* i.e. {1, 2, A, :), 5, ..., {3, 2, 1}}

Convert: Binary → Decimal

Starting from the right, multiply each value in the binary number by 2^n (n being the place value of each decimal digit starting from 0) Example: binary 1 0 1 1 place 3 2 1 0 value 2^3 2^2 2^1 2^0 decimal 8x1 + 4x1 + 2x1 + 1x1 = 11

Conjunction

The conjunction of two propositions (p, q) is the proposition *p and q* It is denoted by p Λ q

Disjunction

The conjunction of two propositions (p, q) is the proposition *p or q* It is denoted by p ∨ q (it is an inclusive or)

Negation

The negation of p is the proposition "It is not the case that p" It is denoted by ¬p, ~p, or !p If p = T then ¬p = F

Set*⁻*

The negative of the set

Set*ⁿᵒⁿⁿᵉᵍ*

The non-negation of a set

Set*⁺*

The positive of the set

Conditional Statements

The proposition such that "If p, then q" It is false when p is true and q is false, it is true otherwise i.e. *If* you take this flight, *then* you bought the ticket Denoted by *p → q* (equivalent to the contrapositive)

Biconditional

The proposition such that "p if and only if q" It is true when both p and q are either T or F together, and false otherwise i.e. You can take the flight *if and only if* you buy the ticket Denoted by *p ↔ q*

Truth Set

The set of all elements that can substitute for x to make P(x) true

Domain of a Predicate

The set of all values that can substitute the variable

Two's Complement representation

The sign is represented by negating the positive version of the number and adding one: 1. Convert the positive version of the decimal into binary and pad left with 0's -- 9 = 1001 --> 00001001 2. Negate the binary number -- ~00001001 = 11110110 3. Add 1 to the negation -- 11110110 + 1 = 11110111 = -9

Sign and Magnitude representation

The sign of a binary number is represented by the most significant (left most) digit. 10001001 = -9 00001001 = +9 There is a limitation to this method - When using 8 bit strings, we are left with only 7 bits to represent the magnitude and there are two values for 0 (which is inefficient) 10000000 = -0 00000000 = +0

Combinatorics

The study of arrangements of objects

Set Symbols

UPPERCASE to denote sets lowercase to denote elements ∈ to denote "element of" x ∈ A = x is an element of the set A ∉ to denote "not an element of"

Quantifiers - ∀

Universal quantifier - "for all"

Inclusive OR

When given options and more than one can be chosen - *includes* possibilities of both/all

Exclusive OR

When given options but you can only choose one - *Excludes* possibilities of both/all

Satisfiable

When there is *at least one substitution of truth values* for its variables that make the propositional form *true*

Logically Equivalent

When two propositional forms have *identical truth values* for each possible substitution of propositions for their variables

Trivial Truth

When you claim something is false, but cannot find a counterexample then it is trivially true

Truth value

Whether a proposition is true or false

Negation of p → q

p ∧ ~ q

Converse (of p → q)

q → p "If *q*, then *p*" (equivalent to the inverse)

P ≡ Q ↔

~P ≡ ~Q

Inverse (of p → q)

~p → ~q "If *not p*, then *not q*" (equivalent to the converse)

Contrapositive (of p → q)

~q → ~p "If *not q*, then *not p*" (equivalent to the conditional)

Negating Universal Conditions

~∀ x (P(x) → Q(x)) ≡ ∃x (~(P(x) → Q(x)) ≡ ∃x (~(P(x) ∧ ~Q(x))

π

π ∈ *R* π ∉ *Q*

Suppressing Conditionals

∀x∈D(L → Q(x)) - L represents the truth set for P(x) i.e. All good teams will win at least one game


संबंधित स्टडी सेट्स

Combo with "APUSH Period 7" and 5 others

View Set

MS II Prep U Ch. 26: Management of Patients With Dysrhythmias and Conduction Problems

View Set

Урок 2-2 корейские числительные и китайс

View Set

Immigration in the Industrial Revolution

View Set

Linux+ Certification Exam Study Guide

View Set

Evolve - STI, Sexuality, Reproduction, Alzheimer's/Dementia/Delirium

View Set

Practical Law Chapter 19 Basic Concepts

View Set

cspp Chapter 8 - Intrusion Detection - Stallings 4th ed.

View Set