

3. [10 points] Consider the following theorem. Theorem. Assume that m is an integer that leaves...
1. [10 marks] Modular Arithmetic. The Quotient-Remainder theorem states that given any integer n and a positive integer d there exist unique integers q and r such that n = dq + r and 0 r< d. We define the mod function as follows: (, r r>n = qd+r^0<r< d) Vn,d E Z d0 Z n mod d That is, n mod d is the remainder of n after division by d (a) Translate the following statement into predicate logic:...
1. Consider the following proposition: For each integer a, if 3 divides aạ, then 3 divides a. (a) Write the contrapositive of this proposition. (b) Prove the proposition by proving its contrapositive. Hint: consider using cases based on the division algorithm using the remainder for "division by 3."
UUIDOR Quiz 2 - Ma Consider the following theorem. Theorem: The sum of any even integer and any odd integer is odd. Six of the sentences in the following scrambled list can be used to prove the theorem. By definition of even and odd, there are integers rands such that m = 2r and n = 2s + 1. By substitution and algebra, m + n = 2r + 25 + 1) = 2(r + s) + 1. Suppose m...
12. 10 points) Use pseudocode to write out algorithms for the following problems. (a) Assume n is any integer with n 2 7. Write out an algorithm SumofCertainIntenger in pseudocode that uses n as input variable. Use a "for" loop to compute the sum (Gk +4) (b) Assume m is any integer with m 2 5. Write out an algorithm ProductOfCertainInte- gers in pseudocode that uses m as input variable. Use a "while" loop to compute the product IT (é+4)....
7. Theorem: If (a, b) = 1, and both a and b divide an integer m, then their product divides m. a. Use this theorem and congruences to show that if n is odd, and if 3 doesn't divide n then n2 = 1(mod 24).
10 points, 2 points for T/F. 8 points for the justification. 3. Assume you have functions T and S such that T(n) = O(S(n)). For the following statement, decide whether you think it is True or False. If you think the answer is True, prove it, otherwise, provide a counter example. T(n)+2S(n)=0(S(n))
8. [10 points) Consider the following algorithm procedure Algorithm(: integer, n: positive integer; 81,...a s integers with vhilei<r print (l, r, mı, arn, 》 if z > am then 1:= m + 1 if za then anstwer-1 return answer 18 and the (a) Assume that this algorithm receives as input the numbersz-32 and corresponding sequence of integers 2 | 3 1 1 4151617| 8| 9 | 10 İ 11 İ 12 | 13 | 14|15 | 16 | 17 |...
Problem (2), 10 points Let n be an integer. Prove that if 3 does not divide n, then 3(2n2 5)
Problem (2), 10 points Let n be an integer. Prove that if 3 does not divide n, then 3(2n2 5)
Problem 8: 10 points. Prove the inclusion-exclusion theorem for n = 3, i.e., prove that for arbitrary sets P1, P2, and P3, the following holds: |P1 U P2 U P3| = |P1| + |P2| + |P3| - |P1 intersection P2| - |P1 intersection P3| - |P2 intersection P3| + |P1 intersection P2 intersection P3|
In the following problem, we will work through a proof of an
important theorem of arithmetic. Your job will be to read the proof
carefully and answer some questions about the argument. Theorem
(The Division Algorithm). For any integer n ≥ 0, and for any
positive integer m, there exist integers d and r such that n = dm +
r and 0 ≤ r < m. Proof: (By strong induction on the variable n.)
Let m be an arbitrary...