Question

In: Computer Science

A) What is the minimum and maximum number of zeros in a 4-bit string? Use roster...

A) What is the minimum and maximum number of zeros in a 4-bit string? Use roster notation and find the range of f.

(The first elements in the range is f(0,0,0,0) = 0)

B) For the functions below, indicate whether the function is: Onto ,One-to-one ,Bijection.

i) f: Z → Z, f(x) = 5x - 4

ii) f: Z → Z, f(x) = 5x - 4

C) Start with the number n = 54527. Divide n by 5 and round the result down to an integer. Keep repeating the division and rounding step until the resulting number is less than 5. How many divisions are performed? You can use a calculator for this problem, but you should not have to actually perform all of the divisions. Provide an integer answer.

D) Start with the number n = 32844. Divide n by 7 and round the result down to an integer. Keep repeating the division and rounding step until the resulting number is less than 7. How many divisions are performed? Provide an integer answer.

 

This is the discerete structures problem.

This is the discerete structures problem.

Solutions

Expert Solution

A) Minimum number of zeros occur when all the inputs are 1 and maximum number of zeros occur when all the inputs are 0. Since there are 4 inputs here, there can be at most 4, at least 0 zeros.

B)

i)Given  , we shall find whether it is one to one and onto. To check weather is one to one, consider and such that . We shall prove that

Add 4 and divide by 5 on both sides, then

, which proves that is one to one.

In order to prove that is onto, consider

Add 4 and divide by 5 on both sides, then

In other words, .

We can also see that is also one to one. By which we can conclude that is onto as well.

Since is both one to one and onto, we can conclude that is an bijection.

ii) same

C) We can treat this as converting 54527 to base 5. Number of digits (0-4) required to represent it in base-5 notation - 1 is the number of divisions.

Consider and . Since is between them, it requires 7 digits to get represented in base-5 form. So, actual number of divisions would be 6.

D) Similar to the previous one

Consider and . Since is between them, it requires 6 digits to get represented in base-7 form. So, actual number of divisions would be 5.


Related Solutions

What is the minimum and maximum number of solutions that we can expect to see in...
What is the minimum and maximum number of solutions that we can expect to see in any given system of nonlinear equations? In your own words, what is the meaning of extraneous solutions? When solving a system of nonlinear equations, is it possible to always use the Addition Method? Explain your reasoning in complete sentences. PLEASE TYPE, DO NOT WRITE IT DOWN and Check your punctuation and proofreading.
Using Selection Sort on an any array of size 7, what will be the minimum/maximum number...
Using Selection Sort on an any array of size 7, what will be the minimum/maximum number of comparisons and number of exchanges? 1 for i = 1 to A.length-1 2 for j = i+1 to A.length 3 if A[j] < A[i] 4 exchange A[i] with A[j]
Provide the Java code to compute the sum, average, maximum number and minimum number if I...
Provide the Java code to compute the sum, average, maximum number and minimum number if I have a string sentence of double numbers. Assume that the length of the string sentence is not known. It can be of any length. To split a string based on the comma character use the following. String sentence = "A,B,C,D,E"; String[] stringsArray = receivedSentence.split(","); Then stringsArray is an array of five elements such that: stringsArray[0] = 'A' stringsArray[1] = 'B' stringsArray[2] = 'C' stringsArray[3]...
Design and Test an 8-bit Adder using 4-bit adder. Use 4-bit adder coded in class using...
Design and Test an 8-bit Adder using 4-bit adder. Use 4-bit adder coded in class using full adder that is coded using data flow model. Use test bench to test 8-bit adder and consider at least five different test vectors to test it.
Let A be a three-bit unsigned number. Use a seven-bit adder (and NOT gates, as necessary)...
Let A be a three-bit unsigned number. Use a seven-bit adder (and NOT gates, as necessary) to design a circuit that calculates the following operations. Note that the output may be assumed as unsigned, unless it is possible for the operation to produce a negative answer, in which case, the output must be correct in 2’s complement: W = 3A + 1 X = 2A – 17 Y = 40A + 6 Z = 32 – 4A
Sentences are to be minimum of 4 paragraph up to a maximum of 10 sentences. Discussion...
Sentences are to be minimum of 4 paragraph up to a maximum of 10 sentences. Discussion Topic: How does management in nursing practice differ from management in general? What tasks are common to both leadership and management. What are the major leadership styles? Which style is optimal to use in which situation?
What is the biological rationale for parsimony to use as an optimality criterion the minimum number...
What is the biological rationale for parsimony to use as an optimality criterion the minimum number of changes? Please provide your answer in the form of a written statement.
Use the method of Lagrange multipliers to find the absolute maximum and minimum values of the...
Use the method of Lagrange multipliers to find the absolute maximum and minimum values of the function f(x, y, z) = x^2yz^2 subject to the constraint 2x ^2 + 3y^ 2 + 6z^ 2 = 33
Why don't we use the setting at the maximum or minimum point of the flowmeter to...
Why don't we use the setting at the maximum or minimum point of the flowmeter to do measurements? Does it give inaccurate results?
2.) Use the method of Lagrange multipliers to find the maximum and minimum values of the...
2.) Use the method of Lagrange multipliers to find the maximum and minimum values of the function ?(?, ?) = ??^2 − 2??^2 given the constraint ?^2 + ?^2 = 2 along with evaluating the critical points of the function, find the absolute extrema of the function ?(?, ?) = ??^2 − 2??^2 in the region ? = {(?, ?)|?^2 + ?^2 ≤ 2}.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT