Test 3 QUizzes

अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!

Refering again to the blur algorithm described previously, by what factor does the number of operations increase when instead of applying it at full HD resolution (1920 x 1080), we apply it at UHD resolution (3840 x 2160) ? 4 16 2 8

4

You may have noticed that in practice problems related to order, logarithms are usually just "log". As you know from algebra, there is more than one logarithm. For each positive number b, there is a base-b logarithm. They are all different- the base-2 logarithm of 8 is 3, while the base 10 logarithm of 8 is 0.90308998699... . There is also a base-e logarithm, called the natural logarithm and usually written as "ln". This begs the question of how it could be justified to just say that a function f(n) is order of "log(n)". Isn't this meaningless if the base of the log is not specified?

Actually, "f is order of log(n)" means the same thing regardless of the base. More precisely, if a and b are two positive real numbers, then f is of order base-a log of n if and only if f is of order base-b log of n. The reason for that lies in the change of base formula, which says that any two log functions are in a constant positive factor relationship with each other. Order relations between two function do not change when you change a constant positive factor in one of the functions.

If an integer a divides a product of two integers b and c, then a must divide b or a must divide c.

False

True or false? The conclusion of the inductive step, P(n+1), is shown by substituting n+1 for the n in the statement P(n).

False

True or false? We always prove the statement P(n+1) by taking the statement P(n) and adding n+1 to both sides.

False

Your job is to write a basic blurring algorithm for a video driver. The algorithm will do the following: it will go through all pixels on the screen and for each pixel, compute the average intensity value (in red, green and blue separately) of the pixel and its 8 neighbors. (At the edges of the screen, there are fewer neighbors for each pixel.) Let's say the number of pixels on the screen is n. Then what is the order of the number of arithmetic operations (additions and divisions) required? The number is order of n³. The number is order of n². The number is order of n . The number is order of n⁴.

The number is order of n .

If an integer a divides an integer b, then a also divides any multiple of b.

True

An inductive proof that P(n) is true for all n always starts with the base case. What is the base case? a. The base case is P(0) → P(1) b. The base case is always P(n) for the lowest n value for which P(n) is defined. c. The base case is always the statement P(0). d. The base case is always the statement P(1).

b

In the inductive step, we show that a.since P(0) is true, P(1) is true. b. if P(n) is true, then P(n+1) is true. c. if P(n+1) is true, then P(n) is true. d. P(n+1) is true for all n.

b

We always start the inductive step with the assumption that a. P(n+1) is true for some n. b. P(n+1) is true for all n. c. P(n) is true for all n. d. P(n) is true for some n.

d

A prime number is a positive integer that is only divisible by 1 and itself.

false

Adding two integers and then taking the remainder produces the same result as taking their remainders first and then adding them.

false

If p and q are primes, then pq+1 is also prime.

false

If p is prime and n is a positive integer, then the number p^n has exactly n positive divisors.

false

If the positive integers a and b are relatively prime, then so are a+1 and b+1.

false

If two functions are of order g, then so is their sum.

false

It is possible for a positive integer to have two prime factorizations such that the prime factor 3 appears in one of them but not the other.

false

Judge the following reasoning as true or false. You are working for a tech company. You came up with an algorithm that performs a needed operation on n inputs in order of n operations. Someone else in the company simultaneously came up with an algorithm that performs the same task in order of log(n) operations. Then it follows necessarily that your algorithm will require more operations to perform this task and is therefore inferior and should not be used.

false

There is a "largest order", i.e. there is some function g so that all other functions f are O(g).

false

There is a largest prime, and it is about the size of Graham's number.

false

True or false? If P(n) is a summation formula involving a sigma sum, we always prove the statement P(n+1) by taking the statement P(n) and adding n+1 to both sides.

false

True or false? If a is a positive real number, and x and y are real numbers, then aˣ⁺ʸ = aˣ + aʸ.

false

True or false? In the context of our theory of inductive proofs, P(n) represents the quantity about which we are proving something.

false

True or false? In the inductive step, we justify the assumption P(n) by referring to the base case. (Example: "Since P(0) is true, we can now assume that P(n) is true for some n...")

false

When you perform division by 5 with remainder, the remainder is an integer from -5 to 5.

false

You can convert a number from decimal to binary by replacing each decimal digit separately by its corresponding binary representation.

false

True or false? If x is a real number, then 2·3ˣ = 6ˣ.

false = 2 * (3^x)

You have a large text file of people. Each person is represented by one line in the text file. The line starts with their ID number and after that, has the person's name. The lines are sorted by ID number in ascending order. There are n lines in this file. You write a search function that returns the name of a person whose ID number is given. The simplest way to do that would be to program a loop that goes through each line and compares the ID number in the line against the given ID number. If there is a match, then it returns the name in that line. This is very inefficient, because the worst-case scenario is that this program needs to go through almost everyone- the person we are looking for could be last. Using the fact that the file is sorted will greatly speed up the process, by allowing us to use a binary search algorithm: We go to the middle line of the file first and compare the ID found there (P) to the given ID (Q). (If the number of lines is even, we go above or below the arithmetic middle.) If P=Q then our algorithm terminates - we have found the person we are looking for. If P is less than Q, that means that the person we are looking for is in the second half of the file. We now repeat our algorithm on the second half of the file. If P is greater than Q, that means that the person we are looking for is in the first half of the file. We now repeat our algorithm on the first half of the file. Of what order is the worst-case number of comparison operations that are needed for this algorithm to terminate? n 2^n log(n) sqr root of n

log n

(x)=x is O(x²).

true

Adding two integers and then taking the remainder produces the same result as taking their remainders first, then adding them, and then applying the remainder operation once more.

true

All power functions f(x)=xⁿ, where n is a real constant, are O(eˣ).

true

Among all base-b representations of a positive integer n, the binary one is always at least as long as any other (in terms of number of digits.)

true

Expressed in base-n, the integer n is "10".

true

Expressed in base-n, the integer n^2 is "100".

true

Given an integer n and a base b, we can find the last digit of the base-b expansion of n by performing the division algorithm to find n = qb + r. The remainder r is the last digit. By repeating the process with q instead of n, we find the next digit, and so on.

true

Given the prime factorizations of positive integers a and b, we can easily find the gcd and the lcm of a and b.

true

If a and b are positive integers, and a = bq + r is the decomposition of a given by the division algorithm, then q can be found as the floor of a/b, and then r can be found as r = a - bq.

true

If a,b,q and r are integers and a= bq + r, then gcd(a,b) = gcd(b,r).

true

If an integer divides two numbers, it also divides their difference.

true

If an integer divides two numbers, it also divides their sum.

true

If p and q are distinct primes, then they are also relatively prime to each other.

true

If p is a polynomial of degree n, and q is a polynomial of degree m, and n<m, then p is O(q)

true

If p is a polynomial of degree n, and q is a polynomial of degree m, and n=m, then p is of order q.

true

If p is prime, then p+2 may or may not be prime, i.e. there exist primes p such that p+2 is prime, and there exist primes p such that p+2 is not prime.

true

If p,q and r are distinct primes, then gcd(pq, qr) = q.

true

If there are only finitely many primes, then 1=2.

true

If two functions are O(g), then so is their sum.

true

In base-b, it is easy to see whether an integer is a multiple of b. Its last digit is zero in that case.

true

In duodecimal (base-12), every digit is 0,1,2,3,4,5,6,7,8,9,A or B.

true

In octal (base-8), every digit is 0,1,2,3,4,5,6 or 7.

true

In ternary (base-3), every digit is a 0,1 or 2.

true

Saying that a divides b is the same as saying that b is a multiple of a.

true

The fast modular exponentiation algorithm computes bⁱ mod m in only about log₂(i) steps. This enables it to be applied to extremely large n.

true

The fast modular exponentiation algorithm takes advantage of the binary representation of the exponent.

true

The gcd of two distinct primes is 1.

true

The lcm of two distinct primes is their product.

true

The number n can have at most the floor of base-2 log of n many prime factors, if prime factors are counted with repetition (i.e. 2*3*3*5 has 4 prime factors.)

true

The number of prime numbers between 1 and 100 is greater than the number of prime numbers between 1000 and 1100.

true

The security of Diffie-Hellmann Key Exchange is based on the difficulty of computing discrete logarithms.

true

The sequence of prime numbers follows no exact pattern.

true

The triangle inequality says that for all real numbers a and b, |a + b| ≤ |a| + |b|.

true

To test whether 101 is prime, you only need to divide it by 2,3,5 and 7. If it is not divisible by any of those numbers, then it is prime.

true

True or false? If LaTeX: a_n= \sum_{k=1}^n k^2 a n = ∑ k = 1 n k 2 , then LaTeX: a_{n+1}= \sum_{k=1}^{n+1} k^2 a n + 1 = ∑ k = 1 n + 1 k 2 .

true

True or false? If P(n) is a summation formula for the sigma sum LaTeX: \sum_{k=0}^n f(k) =S(n) ∑ k = 0 n f ( k ) = S ( n ) , where S(n) represents the sum in closed form, we prove the statement P(n+1) from P(n) by taking the statement P(n) and adding f(n+1) to both sides. Then we simplify S(n)+f(n+1) algebraically to show that it is S(n+1).

true

True or false? If a is a positive number and x and y are real numbers, then LaTeX: a^{xy} = (a^{x})^{y} a x y = ( a x ) y .

true

When you perform division by 3 with remainder, the remainder is one of the integers 0,1,2.

true

You can convert a number from binary to octal by grouping the digits ("bits") of the binary number into groups of 3, going from right to left. If the number of bits is not a multiple of 3, you may have to add one or two leading 0 bits on the left side. Then you convert each group of 3 bits into one octal digit.

true

You can convert a number from hexadecimal to binary by replacing each hexadecimal digit separately by its corresponding 4-bit binary representation.

true

f(x)=5x is of order 3x.

true

if p,q and r are distinct primes, then lcm(pq, qr) = prq.

true

If f and g are functions defined for all positive real numbers and if LaTeX: \lim_{x\rightarrow\infty}\left|\frac{f\left(x\right)}{g\left(x\right)}\right| =C lim x → ∞ | f ( x ) g ( x ) | = C lim x → ∞ | f ( x ) g ( x ) | = C lim x → ∞ | f ( x ) g ( x ) | = C lim x → ∞ | f ( x ) g ( x ) | = C where C is a positive constant, then f is of order g.

true its a theorem f(x)/g(x) = c then f is of order g


संबंधित स्टडी सेट्स

Programming Test I Review (Practices 2-6)

View Set

Chapter 11: The Healthcare Delivery System

View Set

LabCE Course - Red Cell Disorders: Peripheral Blood Clues to Nonneoplastic Conditions

View Set

International Business: The International Business Environment

View Set

Module 2 - Electronic Components (Question Sheet)

View Set

Peristiwa-peristiwa sekitar proklamasi dan proses terbentuknya Negara Kesatuan Republik Indonesia

View Set

duolingo 11 (Paris, At home 4, shopping 3)

View Set

Networking Devices and Initial Configuration Module 7 - 9 Checkpoint Exam

View Set