Discrete Mathematics Math 6A

Slides:



Advertisements
Similar presentations
Chapter 2 Functions and Graphs.
Advertisements

Functions Reading: Epp Chp 7.1, 7.2, 7.4
Mathematical Preliminaries
Chapter 2: Basic Structures: Sets, Functions, Sequences, and Sums (1)
Learning Objectives for Section 7.2 Sets
Quadratic Inequalities
Counting. Counting = Determining the number of elements of a finite set.
Functions, Graphs, and Limits
Discrete Mathematics 3. MATRICES, RELATIONS, AND FUNCTIONS Lecture 5 Dr.-Ing. Erwin Sitompul
Lecture 15 Functions CSCI – 1900 Mathematics for Computer Science Fall 2014 Bill Pine.
Nested Quantifiers Needed to express statements with multiple variables Example 1: “x+y = y+x for all real numbers”  x  y(x+y = y+x) where the domains.
Equivalence Relations
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
© by Kenneth H. Rosen, Discrete Mathematics & its Applications, Sixth Edition, Mc Graw-Hill, 2007 Chapter 1: (Part 2): The Foundations: Logic and Proofs.
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
CS 454 Theory of Computation Sonoma State University, Fall 2011 Instructor: B. (Ravi) Ravikumar Office: 116 I Darwin Hall Original slides by Vahid and.
Sets 1.
Sets 1.
Sets. Copyright © Peter Cappello Definition Visualize a dictionary as a directed graph. Nodes represent words If word w is defined in terms of word.
1.2 – Open Sentences and Graphs
CSE115/ENGR160 Discrete Mathematics 01/20/11 Ming-Hsuan Yang UC Merced 1.
Adapted from Discrete Math
CS355 - Theory of Computation Lecture 2: Mathematical Preliminaries.
Chapter 1: The Foundations: Logic and Proofs
Discrete Mathematics Goals of a Discrete Mathematics Learn how to think mathematically 1. Mathematical Reasoning Foundation for discussions of methods.
A Brief Summary for Exam 1 Subject Topics Propositional Logic (sections 1.1, 1.2) –Propositions Statement, Truth value, Proposition, Propositional symbol,
MATH 224 – Discrete Mathematics
Set, Combinatorics, Probability & Number Theory Mathematical Structures for Computer Science Chapter 3 Copyright © 2006 W.H. Freeman & Co.MSCS Slides Set,
CS 103 Discrete Structures Lecture 10 Basic Structures: Sets (1)
Discrete Mathematics and Its Applications Sixth Edition By Kenneth Rosen Copyright  The McGraw-Hill Companies, Inc. Permission required for reproduction.
Dr. Eng. Farag Elnagahy Office Phone: King ABDUL AZIZ University Faculty Of Computing and Information Technology CPCS 222.
1.4 Sets Definition 1. A set is a group of objects . The objects in a set are called the elements, or members, of the set. Example 2 The set of positive.
Copyright © 2014 Curt Hill Sets Introduction to Set Theory.
CS201: Data Structures and Discrete Mathematics I
January 30, 2002Applied Discrete Mathematics Week 1: Logic and Sets 1 Let’s Talk About Logic Logic is a system based on propositions.Logic is a system.
MATH 224 – Discrete Mathematics
CompSci 102 Discrete Math for Computer Science
Copyright © Cengage Learning. All rights reserved.
Naïve Set Theory. Basic Definitions Naïve set theory is the non-axiomatic treatment of set theory. In the axiomatic treatment, which we will only allude.
Mathematical Preliminaries
Sets Goal: Introduce the basic terminology of set theory.
Fall 2008/2009 I. Arwa Linjawi & I. Asma’a Ashenkity 1 The Foundations: Logic and Proofs Predicates and Quantifiers.
Chapter 2 With Question/Answer Animations. Section 2.1.
Basic Structures: Sets, Functions, Sequences, and Sums.
Sets Definition: A set is an unordered collection of objects, called elements or members of the set. A set is said to contain its elements. We write a.
Predicates and Quantifiers Dr. Yasir Ali. 1.Predicates 2.Quantifiers a.Universal Quantifiers b.Existential Quantifiers 3.Negation of Quantifiers 4.Universal.
Predicate Logic One step stronger than propositional logic Copyright © Curt Hill.
FUNCTIONS COSC-1321 Discrete Structures 1. Function. Definition Let X and Y be sets. A function f from X to Y is a relation from X to Y with the property.
Module #3 - Sets 3/2/2016(c) , Michael P. Frank 2. Sets and Set Operations.
PREDICATES AND QUANTIFIERS COSC-1321 Discrete Structures 1.
August 2003 CIS102/LECTURE 9/FKS 1 Mathematics for Computing Lecture 9 LOGIC Chapter 3.
Chapter 2 1. Chapter Summary Sets (This Slide) The Language of Sets - Sec 2.1 – Lecture 8 Set Operations and Set Identities - Sec 2.2 – Lecture 9 Functions.
FUNCTIONS.
Discrete Mathematics Lecture # 17 Function. Relations and Functions  A function F from a set X to a set Y is a relation from X to Y that satisfies the.
Introduction to Set Theory (§1.6) A set is a new type of structure, representing an unordered collection (group, plurality) of zero or more distinct (different)
Algebra 2 Properties of Real Numbers Lesson 1-2 Goals Goal To graph and order real numbers. To Identity properties of real numbers. Rubric Level 1 –
1.1 – SETS AND SYMBOLS. Goals SWBAT understand basic set notation and set symbols SWBAT solve simple sentences with a given domain SWBAT graph sets of.
CHAPTER 3 SETS, BOOLEAN ALGEBRA & LOGIC CIRCUITS
The Language of Sets If S is a set, then
CSE15 Discrete Mathematics 01/23/17
Set, Combinatorics, Probability & Number Theory
MATH 224 – Discrete Mathematics
Taibah University College of Computer Science & Engineering Course Title: Discrete Mathematics Code: CS 103 Chapter 2 Sets Slides are adopted from “Discrete.
Propositional Logic Defining Propositional Logic
Algebra 1 Section 1.1.
Mathematics for Computer Science MIT 6.042J/18.062J
A Brief Summary for Exam 1
Week #2 – 4/6 September 2002 Prof. Marie desJardins
ICS 253: Discrete Structures I
Lecture Sets 2.2 Set Operations.
Presentation transcript:

Discrete Mathematics Math 6A Homework 2

1.4-16 A discrete mathematics class contains a mathematics major who is a freshman, 21 mathematics majors who are sophomores, 15 computer science majors who are sophomores, 2 mathematics majors who are juniors, 2 computer science majors who are juniors, and 1 computer science major who is a senior. Express each of these statements in terms of quantifiers and then determine its truth value. We let P(s,c,m) be the statement that student s has class standing c and is majoring in m. The variable s ranges over students in the class, the variable c ranges over the four class standings, and the variable m ranges over all possible majors. The proposition is smP(s, junior,m). It is true from the given information. The proposition is scP(s,c,computer science). This is false, since there are some mathemathics majors. The proposition is xcm(P(s,c,m)  (c≠ junior)  (m ≠mathematics)). This is true, since there is a sophomore majoring in computer science. The proposition is s(cP(s,c,computer science)  mP(s, sophomore,m)). This is false, since ther is a freshman mathematics major. The proposition is mcsP(s,c,m). This is false. It cannot be that m is mathematics, since there is no senior mathematics major, and it cannot be that m is computer science, since there is no freshman computer science major. Nor can m be any other major.

1.4-21 Use predicates, quantifiers, logical connectives, and mathematical operartors to express the statement that every positive integer is the sum of the squares of four integers. xabcd ((x > 0)  x = a2 + b2 + c2 + d2), where the universe of discourse consists of all integers 1.4-30 Rewrite each of these statements so that negations appear only within predicates (that is, so that no negation is outside a quantifier or an express involving logical connectives) ~yxP(x,y): yx~P(x,y) ~xyP(x,y): xy~P(x,y) ~y(Q(y) x~R(x,y)): y(~Q(y)  xR(x,y)) ~y(xR(x,y)  xS(x,y)): y(x~R(x,y)  x~S(x,y)) ~y(xzT(x,y,z)  xzU(x,y,z)): y(xz~T(x,y,z)  xz~U(x,y,z))

1.4-33 Rewrite each of these statements so that negations appear only within predicates (that is, so that no negation is outside a quantifier or an expresssion involving logical connectives.) ~xyP(x,y): xy~P(x,y) ~yxP(x,y): yx~P(x,y) ~yx(P(x,y)  Q(x,y)): yx~(P(x,y)  Q(x,y)) = yx(~P(x,y)  ~Q(x,y)) ~(xy~P(x,y)  xyQ(x,y)): xyP(x,y)  (xy~Q(x,y)) ~x(yzP(x,y,z)  zyP(x,y,z)): x~(yzP(x,y,z)  zyP(x,y,z)) = x(~yzP(x,y,z)  ~zyP(x,y,z)) = x(yz~P(x,y,z)  zy~P(x,y,z))

1.6-2 Use set guilder notation to give a description of each of these sets. {0,3,6,9,12}: {3n | n = 0,1,2,3,4} or {x | x is a multiple of 3  0  x  12} {-3, -2, -1, 0, 1, 2, 3}: {x | -3  x  3}, where we are assuming that the universe of discourse is the set of integers. {m, n, o, p}: {x | x is a letter of the word monopoly other than l or y} 1.6-7 Determine whether each of these statements is true of false. 0  : false, since the empty set has no elements.   {0}: false: The set on the right has only one element, namely the number 0, not the empty set {0}  : false: the empty set has no proper subsets.   {0}: true: every element of the set on the left is an element of the set on the right; and the set on the right contains an element, namely 0, that is not the set on the left {0}  {0}: false: the set on the right has only one element, namely the number 0, not the set containing the number 0 {0}  {0}: false: for one set to be a proper subset of another, the two sets cannot be equal {}  {}: true: every set is a subset of itself

1.6-12 Find two sets A and B such that A B and A  B Since the empty set is a subset of every set, we just need to take a set B that contains as an element. Thus, we can let A = and B={} as the simplest example 1.6-21 what is the Cartesian product AB C, where A is the set of all airlines and B and C are both the set of all cities in the United States? This is the set of triples (a,b,c), where a is an airline and b and c are cities. For example, (TWA, Rochester Hills Michigan, Middletown New Jersey) is an elements of this Cartesian product. A useful subbset of this set is the set of triples (a, b, c) for which a flies between b and c. For example, (Northewest, Detroit, New York) is in this subset, but the triple mentioned earliers is not.

1.7-4 Let A={a,b,c,d,e} and B={a,b,c,d,e,f,g,h}. Find a) A  B: {a,b,c,d,e,f,g,h} b) A  B: {a,b,c,d,e} c) A – B:  d) B- A: {f,g,h} 1.7-12 Let A and B be sets. Show that {A  B}  A: if x is in AB, then perforce it is in A (by definition of intersection) A  (A  B): if x is in A, then perforce it is in A  B (by definition of union) A – B  A: if x is in A-B, then perforce it is in A (by definition of difference) A  (B - A) = : if xA then xB-A. Therefore, there can be no elements in A  (B - A), so A  (B - A) =  A  (B – A ) = (A  B): The left-hand side consists precisely of those thinks that are either elements of A or else elements of B but no A, in other words, thinks that are elements of either A or B (or both). This is precisely the definition of the right-hand side.

1.7-17 Let A, B, and C be sets. Show that A  (B  C) = (A  B)  C: {x | xA  x(B  C)} = {x | xA  (xB  x C)} = {x | (xA  xB)  x C)} = {x | (xA  B)  x C)} = (A  B)  C b) A  (B  C) = (A  B)  C: {x | xA  x(B  C)} = {x | xA  (xB  x C)} = {x | (xA  xB)  x C)} = {x | (xA  B)  x C)} = (A  B)  C c) A  (B  C) = (A  B)  (A  C): {x | xA  x(B  C)} = {x | xA  (xB  x C)} = {x | (xA  xB)  (xA  xC))} = {x | (xA  B)  (xA  C)} = (A  B)  (A  C) There are many ways to prove these identities. One way is to reduce them to logical identities. Alternatively, we could argue in each case that the left-hand side is a subset of the right-hand side and vice versa. Another method would be to construct membership tables. 1.7-20 Draw the Venn diagrams for each of these combinations of the sets A, B, and C a) A  (B  C) b) A'  B'  C' c) (A-B)  (A-C)  (B-C)

1. 7-40 Suppose that the universal set is U={1,2,3,4,5,6,7. 8. 9. 10} 1.7-40 Suppose that the universal set is U={1,2,3,4,5,6,7.8.9.10}. Express each of these sets with bit strings where the ith bit in the string is 1 if i is in the set and 0 otherwise. {3,4,5}: 00 1110 0000 {1,3,6,10}: 10 1001 0001 {2,3,4,7,8,9}: 01 1100 1110 1.8-1 why is f not a function from R to R if f(x) = 1/x?: f(0) is not defined f(x) = x?: Things like -3 are not defined f(x) = (x2 + 1) ?: The rule for f is ambiguous. We must have f(x) defined uniquely, but here there are two values associated with every x, the positive square root and the negative square root of (x2 + 1)

1.8-5 Find the domain and range of these functions. the function that assigns to each bit string the difference between the number of ones and the number of zeros: domain is the set of all bit strings and the range is Z. For example, if the input is 1010000, then 3 or -3 the function that assigns to each bit string twice the number of zeros in that string: domain is the set of all bit strings and the range is the set of even natural numbers. (the value of function can be 0,2,4,...) the function that assigns the number of bits left over when a bit string is split into bytes (which are blocks of 8 bits): domain is the set of all bit strings and the range is {0,1,2,3,4,5,6,7} the function that assigns to each positive integer the largest perfect square not exceeding this integer: the domain is the set of positive integers and the range is {1,4,9,16,... 1.8-10 Determine whether each of these functions from {a,b,c,d} to itself is one-to-one f(a)=b, f(b)=a, f(c)=c, f(d)=d: one-to-one f(a)=b, f(b)=b, f(c)=d, f(d)=c: not one-to-one, since b is the image of both a and b f(a)=d, f(b)=b, f(c)=c, f(d)=d: not one-to-one, since d is the image of both a and d

1.8-11 Which functions in Exercise 10 are onto? a) 1.8-14 Determine whether f:Z  Z  Z is onto if f(m,n) = 2m – n: onto f(m,n) = m2 – n2: not onto, for example, 2 is not in the range. If m2 – n2 =(m+n)(m-n), then this expression is divisible by 4 and hence cannot equal 2 c) f(m,n) = m + n + 1: onto d) f(m,n) = |m| – |n|: onto e) f(m,n) = m2 – 4: not onto onto: every element bB there is an element aA with f(a)=b 1.8-19 Determine whether each of these functions is a bijection from R to R f(x) = 2x + 1: bijection f(x) = x2 + 1: not a bijection, range is [1, infinite) f(x) = x3: bijection: f(x) = (x2 + 1)/(x2+2): not a bijection, not injection since x and –x have the same image for all real numbers x If a function is not a bijection, we cannot define an inverse function