Docsity

MATH213 Homework 2: Functions and Graphs, Assignments of Discrete Mathematics

Toggle sidebar
bg1
MATH213 HW 2
Due Wednesday, September 6
Solve five of the six problems below.
1. Find the domain and range of these functions.
a) the function that assigns to each real number its square;
b) the function that assigns to each positive real number the square root of it;
c) the function that assigns to each bit string the difference between the number of zero
bits and the number of one bits in this string;
d) the function that assigns to each pair of positive integers their sum.
2. Give an explicit formula for a function from the set of positive integers to the set of
non-negative integers that is
a) one-to-one, but not onto;
b) onto, but not one-to-one;
c) neither onto nor one-to-one;
d) both one-to-one and onto.
3. Let f(x) = 2x+ 1, g(x) = x2−2, and h(x) = x−10. Find
a) f◦g◦h, b) h◦g◦f, c) h◦g◦f◦h.
4. Draw the graphs of these functions.
a) f1(x) = bx+1
2c − 1; b) f2(x) = bx−1
3c+dx+1
3e;
c) f3(x) = b0.5d2x/3e+ 0.5c.
5. If we have pennies, dimes, quarters and dollars, but no nickels, does the greedy
algorithm always produce change using the fewest coins possible? If “yes”, give a proof, if
no, present a counterexample.
6. Problem 2 on page 129 of the book.

Partial preview of the text

Download MATH213 Homework 2: Functions and Graphs and more Assignments Discrete Mathematics in PDF only on Docsity!

MATH213 HW 2

Due Wednesday, September 6 Solve five of the six problems below.

  1. Find the domain and range of these functions. a) the function that assigns to each real number its square; b) the function that assigns to each positive real number the square root of it; c) the function that assigns to each bit string the difference between the number of zero bits and the number of one bits in this string; d) the function that assigns to each pair of positive integers their sum.
  2. Give an explicit formula for a function from the set of positive integers to the set of non-negative integers that is a) one-to-one, but not onto; b) onto, but not one-to-one; c) neither onto nor one-to-one; d) both one-to-one and onto.
  3. Let f (x) = 2x + 1, g(x) = x^2 − 2, and h(x) = x − 10. Find a) f ◦ g ◦ h, b) h ◦ g ◦ f , c) h ◦ g ◦ f ◦ h.
  4. Draw the graphs of these functions. a) f 1 (x) = bx + 12 c − 1; b) f 2 (x) = bx − 13 c + dx + 13 e; c) f 3 (x) = b 0. 5 d 2 x/ 3 e + 0. 5 c.
  5. If we have pennies, dimes, quarters and dollars, but no nickels, does the greedy algorithm always produce change using the fewest coins possible? If “yes”, give a proof, if no, present a counterexample.
  6. Problem 2 on page 129 of the book.