please type only Exercise 3.3.4: Properties of functions on strings and power sets. For each of the functions below, indicate whether the function is onto, one-to-one, neither or both. If the function is not onto or not one-to-one, give an example showing why. (b) f: {0, 1}3→{0, 1}3. The output of f is obtained by taking the input string and replacing the first bit by 1, regardless of whether the first bit is a 0 or 1. For example, f(001) = 101 and f(110) = 110. (c) f: {0, 1}3→{0, 1}3. The output of f is obtained by taking the input string and reversing the bits. For example f(011) = 110. (d) f: {0, 1}3→{0, 1}4. The output of f is obtained by taking the input string and adding an extra copy of the first bit to the end of the string. For example, f(100) = 1001.

icon
Related questions
Question

please type only

Exercise 3.3.4: Properties of functions on strings and power sets.

 

For each of the functions below, indicate whether the function is onto, one-to-one, neither or both. If the function is not onto or not one-to-one, give an example showing why.

(b)

f: {0, 1}3→{0, 1}3. The output of f is obtained by taking the input string and replacing the first bit by 1, regardless of whether the first bit is a 0 or 1. For example, f(001) = 101 and f(110) = 110.

(c)

f: {0, 1}3→{0, 1}3. The output of f is obtained by taking the input string and reversing the bits. For example f(011) = 110.

(d)

f: {0, 1}3→{0, 1}4. The output of f is obtained by taking the input string and adding an extra copy of the first bit to the end of the string. For example, f(100) = 1001.

(e)

Let A be defined to be the set {1, 2, 3, 4, 5, 6, 7, 8}. f: P(A) → {0, 1, 2, 3, 4, 5, 6, 7, 8}. For X ⊆ A, f(X) = |X|. Recall that for a finite set A, P(A) denotes the power set of A which is the set of all subsets of A.

Expert Solution
Step 1

Given:

To determine if the function is onto, one-to-one, neither or both. If the function is not onto or not one-to-one, the example is shown below as,

trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 5 steps

Blurred answer