Find the domain and range of the following function, the function that assigns to a bit string the number of one bits in the string.
This is only the fourth problem in the section! Think about how you need to set up the problem so you are able to reason out some on your exam. Think... hmmm. Lets try this...
Lets use the following bit strings as an example.
1) 0
2) 10
3) 101
4) 100
5) 000
6) ∅
7) 101010
f(1) = 0, f(2) = 1, f(3) = 2, f(4) = 1, f(5) = 0, f(6) = 0... you get the idea now.
Notice that all of the "outputs" or better said elements in the "Range" are going to be a number x≥0, a positive integer. Even for f(6), the empty string, because it contains no 1 bits. Thus, your DOMAIN, which is the original set you want to operate on, is the SET OF ALL POSSIBLE BIT STRINGS, which also includes the empty string. And as we illustrated before, the RANGE, which is the result of operating on an element in your DOMAIN, are the POSITIVE INTEGERS.
(Redundant, I know. Please note that my f(x) notation for the bit strings may not be accurate, but illustrates my point. My capitals don't mean "yelling", just want to emphasize the answer in my post.)
Have some fun with Math! :-)
This is definitely a challenging class for anyone, even if you are a math major. Other than domain and range, this section is going to test your reasoning and logic skills. That is the theme of the whole book. Moreover, it tests these skills through different types of applications, such as counting in the the binary system and computer science applications. When you get to such things that you may not know, try to learn just a enough about the application (via the web) to get a handle on it, it will do you better during your exam.
Best of luck to you.
-Yvonne
Thank you for the encouragement. Hopefully I am picking up enough to pass the two exams. I have the midterm waiting for me and hope to complete the last few lessons within the next two weeks so I can be done with this class and never have to think about it again!!!!
Thank you for the encouragement. Hopefully I am picking up enough to pass the two exams. I have the midterm waiting for me and hope to complete the last few lessons within the next two weeks so I can be done with this class and never have to think about it again!!!!