COT 4.1, 4.2, 4.3

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

Which of the following is the correct octal expansion of 1776?

(3360) base 8 This is correct since 3*8^3 + 3*8^2 + 6*8^1 + 0*8^0 = 1776 1776 = 8 * 222 + 0 222 = 8 * 27 + 6 27 = 8 * 3 + 3 3 = 8 * 0 + 3

Match the pairs of integers on the left with the Bezout coefficients on the right 50 and 35 100 and 73 21 and 77 45 and 150

-2 and 3 Working backwards through the steps of the Euclidean algorithm, we get -2*50 + 3*35 = 5 -27 and 37 Working backwards through the steps of Euclidean algorithm, we get -27*100 + 37*73 = 1 4 and -1 Working backwards through the steps of Euclidean algorithm, we get 4*21 + -1*77 = 7 -3 and 1 Working backwards through the steps of Euclidean algorithm, we get -3*45 + 1*150 = 15

Arrange the steps below to produce a demonstration by trial division that 151 is prime

1) Note that sqart(151) = 12.28... 2) The prime numbers less than 12.28 are 2, 3, 5, 7, and 11. 3)So, we only need to check whether 151 is divisible by 2, 3, 5, 7, and 11. 4) We find that there is a nonzero remainder when we divide 151 by 2, 3, 5, 7, and 11. 5) Hence, 151 is prime

Match the hexadecimal number on the left with its binary expansion on the right. 1. ABCD 2. 789A 3. 1234 4. F2A5

1. 1010 1011 1100 1101 2. 111 1000 1001 1010 3. 1 0010 0011 0100 4. 1111 0010 1010 0101

Which of the following are true statements? 1. We can use any integer greater than or equal to 0 as the base when expressing integers. 2. If b is an integer greater than 1, then every positive integer n can be expressed in base b. 3. Octal and hexadecimal are used in computing 4. In everyday life, we use base 10 to express integers.

1. False 2.True 3.True 4.True

Put in order these steps of the pseudocode of the Euclidean algorithm for finding the greatest common divisor of a and b

1. Procedure gcd(a, b: positive integers) 2. x = a y = b 3. while y does not equal 0 4. r = x mod y 5. x = y y = r 6. return x

Order the following into a proof that a = b (mod m) and c = d (mod m), then ac = bd (mod m).

1. We perform a direct proof. 2. Assume that a = b (mod m) and c = d (mod m) 3. Then there are integers s and t such that b = a + sm and d = c + tm 4. Hence, bd = (a + sm)(c + tm) = ac + m(at + cs + stm). 5. Hence, ac = bd (mod m)

Arrange the following steps into a proof that if a | b and a | c, then a | (b+c).

1. We will use a direct proof 2. Suppose that a | b and a | c. 3. Then it follows that there must exist integers s and t with b = a *s and c = a*t 4. Hence, b + c = a * s + a * t = a (s + t ) 5. Therefore, a | b + c

The representation of n given by n = (a_k)(b^k) + (a_k-1)(b^k-1) + ... + (a_1)(b) + (a_0) is called the ---- b expansion of n. Setting b = 10 gives the ---- expansion. Setting b = 2 gives the ---- expansion. Setting b = 8 gives the ---- expansion.

1. base 2. decimal 3. binary 4. octal

If a and b are integers and m is a positive integer, then a is ---- to b ---- m if m divides a - b. We call the relations a = b (mod m) a ----- where m is the -----.

1. congruent 2. modulo 3. congruence 4. modulus

Which of these are prime factorizations

101 = 101 101 is prime so its prime factorization is simply 101. 77 = 7 * 11 This is prime factorization since 2, 3, and 5 are prime 450 = 2 * 3^2 * 5^2 This is prime factorization since 2, 3, and 5 are prime

There are ---- positive integers less than 100 divisible by 8. There are ---- positive integers less than 100 divisible by 9.

12 and 11 There are 100/8 = 12 positive integers less than 100 divisible by 8. There are 100/9 = 11 positive integers less than 100 divisible by 9

Which of these statements are true?

15 = 5 (mod 2) 2 divides 15-5=10 17 = 5 (mod 6) 6 divides 17 - 5 = 12 Incorrect 24 = 14 (mod 6) 6 does not divide 24 - 14 = 10

Match the pairs of numbers on the left with their greatest common divisor on the right 18 and 22 17 and 34 45 and 50 36 and 48 11 and 17

2 --- gcd(18,22) = 2 17 --- gcd(17,34) = 17 5 --- gcd(45,50) = 5 12 --- gcd(36,48) = 12 1 --- gcd(11,17) = 1

Which of these is true?

8 * 9 base 14 = 2 in Z base 14 8 * 9 base 14 = (8 * 9) mod 14 = 72 mod 14 = 2 1 + 2 base 7 = 3 in Z base 7 1 + 2 base 7 = (1+2) mod 7 = 3 mod 7 = 3 12 + 6 base 15 = 3 in Z base 15 12 + 6 base 15 = (12+6) mod 15 = 18 mod 15 = 3

Match the decimal digit on the left with the equivalent hexadecimal on the right. 10 11 12 13 14 15

A B C D E F

Which of the following are true?

Every integer greater than 1 can be written uniquely as a prime or as the product of primes in non-decreasing order. -This is the fundamental theorem of arithmetic. Every integer greater than 1 can be written uniquely as a product of prime powers where the primes are listed in increasing order. -This is the fundamental theorem of arithmetic where we combine all the same primes to form powers.

True or false: f(n) = n^2 - n +41 is prime for all positive integers n.

False -It is false because f(41) = 41^2 -Although, true for n=1, 2, ..., 40, it is when n = 41.

True or false: if a | b + 1 and a | c + 1, then a | b + c +1 for all integers a, b, and c, where a does not equal 0.

False Yes, a counterexample is a = 3, b = 2, and c = 5, since 3|3 and 3|6, but it is not the case that 3|8

Which of these statements about the sieve of Eratosthenes is true?

In the first step of the sieve, all even numbers other than 2 are eliminated. -This is the way the algorithm works. Given a positive integer n, the sieve of Eratosthenes can be used to find all the primes less than or equal to n. -This is the goal of algorithm The last step involves eliminating all remaining numbers divisible by the greatest prime not exceeding sqart(n) -This is the way the algorithm works

Match the numbers on the left with the description on the right. 11 12 1 9

Prime Composite and not a power of a prime Neither prime nor composite A power of a prime

Which of the following statements are true?

The complexity of addition of two n-bit integers is O(n) - We add each pair of bits and the carry if present for each of the n places. Multiplication (following the conventional algorithm) of two n-bit integers uses O(n^2) bit additions. - For each bit in the second integer, we form a partial product by multiplying and using O(n) operations, and there are n of these

Which of the following statements are true?

The element 1 is the identity element for multiplication modulo m. - This is because, for any nonnegative integer a less than m, a * 1 = (a*1) mod m = a and 1 * base m (a) = 1 *a mod m = a If a and b belong to Z base m, then a + b = b + a -This is commutativity If a does not equal 0 belongs to Z base m, then m - a is an additive inverse of a modulo m. -This is because a + (m-a) = (a + (m-a)) mod m = m mod m = 0.

Which of the following statements are true?

To convert binary to octal, starting from the right, group the bits into three-digits binary numbers and convert each into an octal digit. Each hexadecimal digit corresponds to four binary digits.


Set pelajaran terkait

AP Biology: chapter 16-19 quetsions

View Set

MGMT 231 CH 2-Traditional and Contemporary Issues and Challenges

View Set

(Chapter 17) The Beginning of the Population Explosion

View Set

Psych 205 Learning Curve Ch. 1 & 3

View Set