Discrete Mathematics and Its Applications, Seventh Edition

Published by McGraw-Hill Education
ISBN 10: 0073383090
ISBN 13: 978-0-07338-309-5

Chapter 2 - Section 2.3 - Functions - Exercises - Page 152: 5

Answer

a)Domain is the set of all bit strings, the Range is Z b)Domain is the set of all bit strings, the Range is positive even numbers c)Domain is the set of all bit strings, the Range is {0, 1, 2, 3, 4, 5, 6, 7}. d)Domain is the set of positive integers; the Range {1, 4, 9, 16, ... }.

Work Step by Step

In each case we want to find the domain (the set on which the function operates, which is implicitly stated in the problem) and the range (the set of possible output values). a) Clearly the domain is the set of all bit strings. The range is Z; the function evaluated at a string with n 1's and no 0's is n, and the function evaluated at a string with n 0's and no 1's is -n. b) Again the domain is clearly the set of all bit strings. Since there can be any natural number of 1's in a bit string, the value of the function can be 0, 2, 4, .... Therefore the range is the set of even natural numbers. c) Again the domain is the set of all bit strings. Since the number of leftover bits can be any whole number from 0 to 7 (if it were more, then we could form another byte), the range is {0, 1, 2, 3, 4, 5, 6, 7}. d) As the problem states, the domain is the set of positive integers. Only perfect squares can be function values, and clearly every positive perfect square is possible. Therefore the range is {l, 4, 9, 16, ... }.
Update this answer!

You can help us out by revising, improving and updating this answer.

Update this answer

After you claim an answer you’ll have 24 hours to send in a draft. An editor will review the submission and either publish your submission or provide feedback.