1 / 11

Discrete Mathematics Math 6A

Discrete Mathematics Math 6A. Homework 2.

brenna
Download Presentation

Discrete Mathematics Math 6A

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Discrete MathematicsMath 6A Homework 2

  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.

  3. 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))

  4. 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))

  5. 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

  6. 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.

  7. 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.

  8. 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)

  9. 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)

  10. 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

  11. 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

More Related