I need solve this homework , in order and with the number of questions then answer please
Posted: Sun May 15, 2022 9:57 am
I need solve this homework ,
in order and with the number of questions then answer please
1) List all the steps used to search for numbers 45 and 54 in the following list (3.8. 12, 34, 54.84.91.110) a a linear search b. a binary search. c. Compare and contrast the linear Search and binary Search algorithms in searching for numbers 45 and 54 in the above list 2) Which of the following Divisibility relationship is True and which is False? a) 1378 b) -624 c) 11-33 d) 2396 e) 5126 3) Give a big-O estimate for the number of operations, where an operation is a comparison or a multiplication, used in this segment of an algorithm for i:=1 to n: forj -i ton-1: m-mintaa,m). 4) Give a big-O estimate for the number of operations of the following algorithm Low 0; High-1: while Low High Do mid: (Low+High 2: if array ſmidl-value: return mid else if (midl< value: Low - mid + 1 else if (mid > value: High-mid-1 5) Find the least integer n such that f(x) is O(x") for each of these functions. a fx) - 2x + x 2log b. f(x) - 3x + (log x) 2 c. f(x) = (**+ x + 1)(x+1) d. f(x)= (**+ 5 log x(x + 1)
Find the results of the following operations a. 22 mod 7 b. -77 mod 13 (422317323) mod 10 d. (148-14432) mod 12 c. (14433) mod 12 f. (8°212) mod 9 7) Suppose that a and b are integers, x = 2 (mod 10), and y=3(mod 10. Find the integer z with 0 5 259 such that a. 29x (mod 10) b. zlly (mod 10) c. 2x+y (mod 10) d. z2x+3y (mod 10) 2.765 8) Convert the decimal expansion of each of these integers to binary expansion. a. b. 7259 c. 459865 9) Convert the octal expansion of each of these integers to a binary expansion. a. (747) b. (6245) 10) Convert the hexadecimal expansion of each of these integes to a binary expansion a (879CB) b. (D3465F) 11) Assume the inputs come from Z. Find the solution for the following: 4. Add 7 to 14 in Zus b. Multiply 11 by 7 in 2 12) Find the Greatest Common Divisor for the following pairs of integers using the Euclidean algorithm a 2311, 654 b. 88.220 c. 300, 42 401,700 c. 2740, 1760 13) Determine whether the integers in each of this set 425, 41, 49, 64 } is pairwise relatively prime? 14) Encrypt the message WATCH YOUR STEP by translating the letters into numbers, applying the given encryption function, and then translating the numbers back into letters. Where f(p)-6-7p+1) mod 26 ABCDEFGHIJKLMNOPQRSTUVWXYZ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
15)There are 5 men and 4 women competing for an executive body consisting of: 1. President 2. Vice President 3. Secretary 4. Treasurer It is required that women and 2 men must be selected How many ways the executive body can be formed? 16) Prove that for every positive integer n, j2 = (n − 1)2*++2. 17) Difference Between Big oh, Big Omega and Big Theta, .No Big Oh Big Omega Big Theta
18) Construct an argument using rules of inference to show that the hypotheses : "It is not sunny this afternoon and it is colder than yesterday. We will go swimming only if it is sunny. If we do not go swimming, then we will take a canoe trip. If we take a canoe trip, then we will be home by sunset". 19) For each of these arguments, determine whether the argument is correct or incorrect and explain why: a) Everyone enrolled in the university has lived in a dormitory. Hind has never lived in a dormitory. Therefore, Hind is not enrolled in the university: b) Quincy likes all action movies. Quincy likes the movie Eight Men Out. c) All lobstermen (1) set at least a dozen traps (t). Hamilton is a lobsterman. Therefore, Hamilton sets at least a dozen traps. 20) Prove or disprove: The sum of two odd numbers is even. 21) Prove by Contrapositive: for any integer a and b, a+b215 implies that a > 8 or b28
in order and with the number of questions then answer please
1) List all the steps used to search for numbers 45 and 54 in the following list (3.8. 12, 34, 54.84.91.110) a a linear search b. a binary search. c. Compare and contrast the linear Search and binary Search algorithms in searching for numbers 45 and 54 in the above list 2) Which of the following Divisibility relationship is True and which is False? a) 1378 b) -624 c) 11-33 d) 2396 e) 5126 3) Give a big-O estimate for the number of operations, where an operation is a comparison or a multiplication, used in this segment of an algorithm for i:=1 to n: forj -i ton-1: m-mintaa,m). 4) Give a big-O estimate for the number of operations of the following algorithm Low 0; High-1: while Low High Do mid: (Low+High 2: if array ſmidl-value: return mid else if (midl< value: Low - mid + 1 else if (mid > value: High-mid-1 5) Find the least integer n such that f(x) is O(x") for each of these functions. a fx) - 2x + x 2log b. f(x) - 3x + (log x) 2 c. f(x) = (**+ x + 1)(x+1) d. f(x)= (**+ 5 log x(x + 1)
Find the results of the following operations a. 22 mod 7 b. -77 mod 13 (422317323) mod 10 d. (148-14432) mod 12 c. (14433) mod 12 f. (8°212) mod 9 7) Suppose that a and b are integers, x = 2 (mod 10), and y=3(mod 10. Find the integer z with 0 5 259 such that a. 29x (mod 10) b. zlly (mod 10) c. 2x+y (mod 10) d. z2x+3y (mod 10) 2.765 8) Convert the decimal expansion of each of these integers to binary expansion. a. b. 7259 c. 459865 9) Convert the octal expansion of each of these integers to a binary expansion. a. (747) b. (6245) 10) Convert the hexadecimal expansion of each of these integes to a binary expansion a (879CB) b. (D3465F) 11) Assume the inputs come from Z. Find the solution for the following: 4. Add 7 to 14 in Zus b. Multiply 11 by 7 in 2 12) Find the Greatest Common Divisor for the following pairs of integers using the Euclidean algorithm a 2311, 654 b. 88.220 c. 300, 42 401,700 c. 2740, 1760 13) Determine whether the integers in each of this set 425, 41, 49, 64 } is pairwise relatively prime? 14) Encrypt the message WATCH YOUR STEP by translating the letters into numbers, applying the given encryption function, and then translating the numbers back into letters. Where f(p)-6-7p+1) mod 26 ABCDEFGHIJKLMNOPQRSTUVWXYZ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
15)There are 5 men and 4 women competing for an executive body consisting of: 1. President 2. Vice President 3. Secretary 4. Treasurer It is required that women and 2 men must be selected How many ways the executive body can be formed? 16) Prove that for every positive integer n, j2 = (n − 1)2*++2. 17) Difference Between Big oh, Big Omega and Big Theta, .No Big Oh Big Omega Big Theta
18) Construct an argument using rules of inference to show that the hypotheses : "It is not sunny this afternoon and it is colder than yesterday. We will go swimming only if it is sunny. If we do not go swimming, then we will take a canoe trip. If we take a canoe trip, then we will be home by sunset". 19) For each of these arguments, determine whether the argument is correct or incorrect and explain why: a) Everyone enrolled in the university has lived in a dormitory. Hind has never lived in a dormitory. Therefore, Hind is not enrolled in the university: b) Quincy likes all action movies. Quincy likes the movie Eight Men Out. c) All lobstermen (1) set at least a dozen traps (t). Hamilton is a lobsterman. Therefore, Hamilton sets at least a dozen traps. 20) Prove or disprove: The sum of two odd numbers is even. 21) Prove by Contrapositive: for any integer a and b, a+b215 implies that a > 8 or b28