### Create a StudySoup account

#### Be part of our community, it's free to join!

Already have a StudySoup account? Login here

# Bundle for Test 1 CS 2305

UTD

GPA 3.5

### View Full Document

## About this Document

## 81

## 3

1 review

## Popular in Discrete Math for Computing I

## Popular in ComputerScienence

This 12 page Bundle was uploaded by Aaron Maynard on Wednesday February 17, 2016. The Bundle belongs to CS 2305 at a university taught by Timothy Farage in Spring 2016. Since its upload, it has received 81 views.

### What is Karma?

#### Karma is the currency of StudySoup.

#### You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!

Date Created: 02/17/16

Discreet Math for Computing Aaron Maynard Timothy Farage January 14 , 2016 There are two parts to math. MATH LOGIC SET THREORY Fermat's Last Theorem: + n n n Let A, B, C, N € Z exist such that if A + B = C , then n ≤ 2 LOGIC Definition: A proposition is a statement "This is either True or False". Examples 2 + 3 = 7 True All cats have hearts True X + 2 = 7 False “There is an ‘x’ such that ‘x + 2 = 7” True Logic Variables are either True (1) or False (0) It is traditional to use variables such as P, Q, R1 o2 Pn, P , P . Logical Operators (Boolean Operators) Also known as an unary operator, only deals with one proposition. P !P (not P) 0 1 1 0 Binary Operators PVQ, pronounced "P or Q" or "P or Q or Both” P ΛQ, pronounced "P and Q" P⊕Q / {P xor Q, pronounced "P x or Q" or "P or Q but NOT both" P<->Q, pronounced "P if and only if Q" P->Q, pronounced "If P then Q" or "P implies Q" Discreet Math for Computing Aaron Mthnard Timothy Farage January 14 , 2016 Truth Table for the Binary Operators P Q PVQ P ΛQ P⊕Q P<->Q P->Q 0 0 0 0 0 1 1 0 1 1 0 1 0 1 1 0 1 0 1 0 0 1 1 1 1 0 1 1 Side Notes from Class Example of P<->Q: o Two sides of a triangle are equal if and only if the angles opposite those sides are equal. o If two sides of a triangle are not equal then the angles opposite those sides are not equal. P is called the antecedent, Q is called the consequence / conclusion. Discreet Math for Computing AarothMastard Timothy Farage January 19 -21 , 2016 Compound Proposition Definition: Using multiple propositions with apparition. P -> (Q V R) P Q R ( Q V R ) P -> ( Q V R ) 0 0 0 0 1 0 0 1 1 1 0 1 0 1 1 0 1 1 1 1 1 0 0 0 0 1 0 1 1 1 1 1 0 1 1 1 1 1 1 1 If every circumstance is true, then the compound proposition is known as an example of "Tautology" A logical expression that is true for any values of its variables is said to be tautology. ( P Λ Q ) Λ (P -> Q) P Q PΛQ P->Q (PΛQ) Λ (P- >Q) 0 0 0 1 0 0 1 0 1 0 1 0 1 0 0 1 1 0 1 0 A compound proposition that is false for all values of its variables is known as a "contradiction". “I am that I am." Discreet Math for Computing AarothMastard Timothy Farage January 19 -21 , 2016 Math Equivalences: For any x and y, x + y = y + x x + 2 = 5 Logical Equivalences (Propositional Equivalences): PVQ QVP PΛQ QΛP (PVQ)VR PV(QVR) PΛ(QVR) (PΛQ)V(PΛR) ~P is known as “not P” Negate and Simplify: Definition: Simplifying until there are no negations except over variables. ~[(PΛQ) -> (Q->R)] (PΛQ) Λ ~(Q->R) (PΛQ) Λ (QΛ~R) PΛQΛ~R Done! Converse of P -> Q If the animal is a cat, then it has four legs. Q -> P If the animal has four legs, then it is a cat. If a triangle has 2 equal sides, then it has 2 equal angles. If a triangle has 2 equal angles, then it has 2 equal sides. Contrapositive of P -> Q If you get over 90%, then you get an A. ~P -> ~Q If you get an A, then you get over 90%. Things to have memorized: P->Q <=> ~PVQ ~(P->Q) <=> P Λ ~Q - The negation of an implication is NOT an implication, it's an AND! Demorgans Laws: ~(PVQ) <=> ~P Λ ~Q ~(P Λ Q) <=> ~PV~Q Discreet Math for Computing Aaron Maynard th Timothy Farage January 26 -28th, 2016 Predicate Logic (First Order Logic) Definition: A predicate is a propositional function. Its value is either true or false. F:R->R where F(x) = x 2 U x *N = {0, 1, 2, 3, …} P(x) = x > 7 Q(x,y) = x + y = 10 S(x): x is smart, U =x{women} Predicates can also be made into propositions using quantifiers. Definition: A formal expression used in asserting that a stated general proposition is true of all of the members of the delineated universe or class. Universal Quantifier: ∀ = fxr all x, for every x; Existential Quantifier: ∃ = xhere exists an x, there exists at least one x; Examples using s(x,y): x+y=10 U + U = Nx= {0,y1, 2, 3, …} ∃ x∃ *ys(x,y)] = There is a natural number x, there is a natural number y, such that x + y = 10. ∀ *∀ *[s(x,y)] = For every natural number x, for every natural number y, x + y = x y 10. ∀ x∃ *xs(x,y)] = For every natural number x, there exists a natural number y, x + y = 10. ∃ x∀ *xs(x,y)] = There is a natural number x, for every natural number y, x + y = 10. Examples using integers: P(x) = x is prime, U + U = N x y ∀ x[P(x) -> ∃ *yP(y) Λ(y>x)] = For every natural number x, if x is prime, then there is a natural number such that y is prime and y > x. Discreet Math for Computing Aaron Maynard th Timothy Farage January 26 -28th, 2016 U x U = ykitty cats} ∀ x For all x ∃ x There exists (at least one) x S(x): x is smart, D(x): x is destructive, C(x): x is cute, M(x): x is a tomcat, F(x): x is a female, T(x,y): x wants to mate with y ∃ xS(x): there exists a cat that is smart ∀ xC(x): All cats are cute ∃ [C(x)ΛD(x)]: There exists a cat that is cute and destructive x ∀ xS(x) -> ~D(x)]: All cats that are smart are not destructive ∀ x yM(x)ΛF(y) -> T(x,y)]: for all cats x, for all cats y, if x is a male tomcat and y is a female in heat, then x wants to mate with y U = U = U = ZΛ + (Positive Integers) x y z E(x): x is even, P(x): x is prime ∀ xE(x)Λ(x >= 4) -> ∃ ∃ [Py zΛP(z)Λ(X=y+z)]:for all evens >= 4, there are two prime numbers whose sum is equal to that even number Discreet Math for Computing Aaron Maynard Timothy Farage February 9th-11th, 2016 Preface What is PI? Definition: Pi is a ratio of the circumference divided by the diameter. It is also a constant: 3.141592654. Another example of an irrational number is 0.10010001000010000010000001... Negation of Quantifiers ∀ xsome expression] ∃ ~[sxme expression] ∃x[some expression] ∀ ~[sxme expression] U = {animals}, D(x): is a dog, C(x): x likes cats; x ~∀ [D(x) -> C(x)] ∃ ~[D(x) Λ C(x)] x x [NOTE] Know how to prove variables, we will be using them with quantifiers. Examples are as follows: “If 3n+2 is odd, them n is odd” Proof: 3n+2 = 2k+1 3n = 2k-1 n = (2k-1)/3 Take any two or more digit number, mix the numbers and subtract from the original. Those numbers will always be divisible by 9. Proof: N1 = 100A + 10B + C N2 = 100C + 10A + C N1 - N2 = 90A - 9B - 99C = 9(10A + B - 11C) Discreet Math for Computing Aaron Maynard Timothy Farage February 9th-11th, 2016 Proof by Contradiction Proposition: P, Assume that P is false... Assume ~P From the negation of P, if you arrive at a contradiction, then P must be true. A famous contradiction is root(2) is irrational. All real numbers can be divided into rational and irrational numbers. 'ratio'nal numbers can be expressed as a fraction. 5 can be expressed as 5/1, .666666 as 2/3. Fractions are either terminate such as 2/5 is .4, and repeat as 17.241373737. Numbers that are irrational (not rational) do not terminate, and do not repeat in the decimal form. 0.101001000100001... is a computable number, however it is an irrational number. If root(2) could be written as a fraction in simplest form: root(2) = B/C 2 = B^2 / C^2 B^2 = 2C^2 B^2 is even B is even B = 2K, for some value K B^2 = 4K^2 2C^2 = 4K^2 C^2 = 2K^2 C^2 is even C is even If B and C are even, then B/C is not in simplest form. So therefore root(2) is not in simplest form. The opposite of the theorem is false, so therefore the theorem is true. Discreet Math for Computing Aaron Maynard Timothy Farage February 9th-11th, 2016 Theorem: If B is not a perfect square, then root(B) is irrational. Proof by contradiction: Assume: If B is not a perfect square, then root(B) is rational. P/Q = root(B) = x x = P/Q = B Qx = P Qx - P = 0 Note that both Q and P must be integers Discreet Math for Computing Aaron Maynard Timothy Farage February 15 2016 Preface Tetration Function – This is a function where the f(x) is a variable exponent of itself, and itself, and itself… you get the idea? f(x) = y = xx^(x… forever) To solve this issue, we can utilize the natural log functions! y = xy ln(y) = yln(x) Highest convergence is “e”. [ln(y)]/y = ln(x) y(1/y= x Quick notice from professor: The test WILL be closed book, closed notes. It will consist of mostly negation, simplification, and some true / false questions. Set Theory There are four main sets within set theory to take note of: Set of real numbers Set of positive numbers Set of integers Rational vs Irrational In order of list above – Ƶ = {… -3, -2, -1, 0, 1, 2, 3…} + Ƶ = {1, 2, 3, 4, 5, 6, 7…} [NOTE] “0” is not included in this set because it is not considered a positive number. N = {0, 1, 2, 3, 4, 5, 6…} [NOTE] “0” is included in this set because it is an integer, in this class we will only be referring to integers x >= 0. R = {Real Numbers} Discreet Math for Computing Aaron Maynard th Timothy Farage February 15 2016 Naïve Set Theory Definition: “Informal” – A set, a collection of unique, well defined objects. Undefined terms are those to be considered to be a point, line, or set. We say that a set B is a subset of a set C, B c C, B c C If ∀x[(x ε B) -> (x ε C)] C B Empty Set: “NULL Set” This type of set will look like { }= 0, It is a subset of every set. ~∀ xx ~ε 0]: Nothing is in the empty set. ∀ [0 c S]: Null set is in the set S. s The size or cardinality of a set B, |B|, is the number of elements in B. B = {7, 24, 42} |B| = 3 How to write the Cartesian product of two sets B & C. BxC = {(x, y) | (x ε B) Λ (y ε c)} B = {Red, Yellow} C = {7, 24, 42} BxC = {(Red, 7), (Red, 24), (Red, 42), (Yellow, 7), (Yellow, 24), (Yellow, 42)} BUC = {x | (x ε B) U (x ε C)} B∩C = {x | (x ε B) Λ (x ε C)} B C Discreet Math for Computing Aaron Maynard Timothy Farage February 15 2016 Let S be a set * The Power Set of S, P(S) = {All Subsets of S} B = {7, 24, 42} P(B) = {0, {7}, {24}, {42}, {7, 24}, {7, 42}, {24, 42}, {7, 24, 42}} ^ This contains a total of eight sets |P(B)| = 2|B| Ending Accounts Subsets can be explained through binary strings of length |B|. A set is said to be normal if the set does not contain itself. Test 1 will cover sections 1.1, 1.3, 1.4, 1.5, 1.7, 2.1, and 2.2. This test will also account for 1/3 of our final grade. Good luck everyone!

### BOOM! Enjoy Your Free Notes!

We've added these Notes to your profile, click here to view them now.

### You're already Subscribed!

Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'

## Why people love StudySoup

#### "I was shooting for a perfect 4.0 GPA this semester. Having StudySoup as a study aid was critical to helping me achieve my goal...and I nailed it!"

#### "Selling my MCAT study guides and notes has been a great source of side revenue while I'm in school. Some months I'm making over $500! Plus, it makes me happy knowing that I'm helping future med students with their MCAT."

#### "There's no way I would have passed my Organic Chemistry class this semester without the notes and study guides I got from StudySoup."

#### "It's a great way for students to improve their educational experience and it seemed like a product that everybody wants, so all the people participating are winning."

### Refund Policy

#### STUDYSOUP CANCELLATION POLICY

All subscriptions to StudySoup are paid in full at the time of subscribing. To change your credit card information or to cancel your subscription, go to "Edit Settings". All credit card information will be available there. If you should decide to cancel your subscription, it will continue to be valid until the next payment period, as all payments for the current period were made in advance. For special circumstances, please email support@studysoup.com

#### STUDYSOUP REFUND POLICY

StudySoup has more than 1 million course-specific study resources to help students study smarter. If you’re having trouble finding what you’re looking for, our customer support team can help you find what you need! Feel free to contact them here: support@studysoup.com

Recurring Subscriptions: If you have canceled your recurring subscription on the day of renewal and have not downloaded any documents, you may request a refund by submitting an email to support@studysoup.com

Satisfaction Guarantee: If you’re not satisfied with your subscription, you can contact us for further help. Contact must be made within 3 business days of your subscription purchase and your refund request will be subject for review.

Please Note: Refunds can never be provided more than 30 days after the initial purchase date regardless of your activity on the site.