MAT 243 Final Exam Review

Ace your homework & exams now with Quizwiz!

Let the relation R on {1,2,3} be given by the following table: R 1 2 3 1 0 0 X 2 0 X 0 3 X 0 0 Which elements need to be added to make R reflexive? Check all that are required, and only those. *(1,1) *(3,3) *No matter what elements are added, the relation cannot become reflexive.

(1,1) (3,3) Reflexivity of a relation means that all diagonal elements are in the relation. In this context, when we speak of diagonal elements, we mean the elements (a,a). For the relation to become reflexive, it is necessary and sufficient to add the elements (1,1) and (3,3).

Let the relation R on {1,2,3} be given by the following table: R 1 2 3 1 0 0 0 2 0 X X 3 X 0 X Which elements need to be added to R to make it symmetric? Check all that are required. *(1,3) *(3,2) *(1,1) *(2,1) *(1,2)

(1,3) (3,2) For symmetry, every element (a,b) in R outside the diagonal requires its symmetric partner (b,a) also to be in R. There are two elements outside the diagonal: (3,1) and (2,3). Therefore, (1,3) and (3,2) need to be added to have symmetry.

Consider the following version of the Fibonacci sequence: f₀ = 1, f₁ = 1 and fₙ = fₙ₋₁ + fₙ₋₂ for all n ≥ 2. Find f₄.

5 f₀ = 1 f₁ = 1 f₂ = f₁ + f₀ = 2 f₃ = f₂ + f₁ = 3 f₄ = f₃ + f₂ = 5.

True or False? x³ is O(3ˣ).

True Any polynomial function is big-O of any increasing (base > 1) exponential function.

Suppose A and B are sets. No additional information is available. What can you say about |A∪B|? *|A∪B| = |A| + |B| *|A∪B| ≤ |A| + |B| *|A∪B| ≥ |A| + |B| *|A∪B| = |A| ∪ |B|

|A∪B| ≤ |A| + |B| By the inclusion-exclusion principle, |A∪B| = |A| + |B| - |A ∩ B|. Since |A ∩ B|≥ 0 (cardinalities of sets are always at least zero), we conclude that |A∪B| ≤ |A| + |B|.

Select which one of the following statements is logically equivalent to (p∨q) → r .

( p→ r ) ∧ ( q→ r ) You can find the correct answer by doing a truth table, or, more efficiently, by using logical equivalences, the distributive and commutative properties, and De Morgan's law: (p∨q)→r ≡¬(p∨q)∨r ≡(¬p∧¬q)∨r ≡(¬p∨r)∧(¬q∨r) ≡(p→r)∧(q→r)

Suppose R = { (1,1), (2,3), (3,4), (4,2), (2,4) } is a relation on the set S = { 1, 2, 3, 4 }. Check each ordered pair that is in the the relation R∘R. *(1,1) *(2,2) *(1,4) *(2,4) *(3,2) *(4,4) *(4,3) *(4,2) *(2,1) *(3,4) *(2,3) *(3,3)

(1,1) (2,2) (2,4) (3,2) (4,4) (4,3) Follow the path of the elements of the set {1,2,3,4} under R twice.

Let the relation R on {1,2,3} be given by the following table: R 1 2 3 1 X X X 2 0 X X 3 X X X Observe that R is not transitive, because 2R3 and 3R1, but not 2R1. The removal of which one of the following elements would make R transitive? *(2,3) *(1,1) *(3,3) *(2,2)

(2,3) We know that 2R3 and 3R1, but not 2R, rules out transitivity. To remove this breakdown of the transitivity condition, we need to remove (2,3) or (3,1). Of these two, only (2,3) is offered as a choice. Therefore, the correct answer must be (2,3). The new relation R' = R - { (2,3) } is indeed transitive. R' 1 2 3 1 X X X 2 0 X 0 3 X X X

Match the linear, constant-coefficient, homogeneous recurrence relation represented by its characteristic polynomial, to the general solution of the recurrence. (r-1)(r-2) (r-1)(r-2)² (r-1)²(r-2)² r²+1 *aₙ=p₁+p₂·2ⁿ *aₙ=p₁+(p₂+p₃n)·2ⁿ *aₙ=p₁+p₂n+(p₃+p₄n)·2ⁿ *aₙ=p₁(-i)ⁿ+p₂(i)ⁿ

(r-1)(r-2) aₙ=p₁+p₂·2ⁿ (r-1)(r-2)² aₙ=p₁+(p₂+p₃n)·2ⁿ (r-1)²(r-2)² aₙ=p₁+p₂n+(p₃+p₄n)·2ⁿ r²+1 aₙ=p₁(-i)ⁿ+p₂(i)ⁿ (r-1)(r-2): the roots are distinct, 1 and 2, and each have multiplicity 1. This means the general solution is aₙ=p₁·1ⁿ+p₂·2ⁿ = p₁+p₂·2ⁿ. (r-1)(r-2)²: the roots are distinct, 1 and 2, but now 2 has a multiplicity of 2. This means that the coefficient of the 2ⁿ term gets changed from a constant to a general linear function. The general solution is aₙ= p₁+(p₂+p₃n)·2ⁿ. (r-1)²(r-2)²: now both roots have multiplicity 2. Both coefficients are general linear functions. The general solution is aₙ=(p₁+p₂n)·1ⁿ+(p₃+p₄n)·2ⁿ = p₁+p₂n+(p₃+p₄n)·2ⁿ. r²+1: this polynomial has imaginary roots, ±i, each with multiplicity 1. The general solution is aₙ=p₁(-i)ⁿ+p₂(i)ⁿ.

Let S be a set of strings defined recursively as follows : 1. 0 ∈ S. 2. For all a ∈ S, 2a0 ∈ S and 2aa1 ∈ S. (If a and b are strings then ab is the concatenation of a and b. For instance, if a = 0211 and b = 201 then ab = 0211201.) Let S₀ be the initial population.Let S₁ be all elements obtained by applying the recursion rule once to S₀.Let S₂ be all elements obtained by applying the recursion rule once to S₁. Check all elements of S ₀∪ S₁ ∪ S₂, and only those. *0 *200 *2001 *22000 *220010 *22002001 *2200120011 *22001 *220011 *201 *220000 *2200020001 *22200101 *2200100

0 200 2001 22000 220010 22002001 2200120011 S₀ = {0} S₁ = {200,2001} S₂ = {22000, 220010, 22002001, 2200120011}.

Find the smallest integer k so that f ( n ) = (n^3 + n^4) / (n^2 + 1) is order of nᵏ.

2 As n gets large, the +1 in the denominator becomes negligible. Thus, f is approximately n + n² for large n, and therefore order of n². To prove this exactly, we show that the limit of f(n)/n² is a positive number: lim n → ∞ (f(n)) / (n^2) = lim n → ∞ (n + n^2) / (n^2 + 1) = 1 The last part of the equation is true because of the horizontal asymptote rule for rational functions.

Select the smallest k so that f(x)=x·(lnx)⁴+x² is big-O of O(xᵏ).

2 Both terms are big-O of x², hence their sum is too. Neither is big-O of x, hence their sum can't be big-O of x either.

Match the following recursively defined sets to their descriptions. 0 ∈ S; for all x ∈ S, x+2 ∈ S. 1 ∈ S; for all x ∈ S, x+2 ∈ S and x-2 ∈ S. 1 ∈ S and 2 ∈ S; for all x ∈ S, x+3 ∈ S. 1 ∈ S; for all x ∈ S, 2x ∈ S. *S is the set of non-negative even integers. *The set of odd integers. *The set of positive integers that are not divisible by 3. *The set of powers of two, i.e. { 2ⁿ | n is a non-negative integer }.

0 ∈ S; for all x ∈ S, x+2 ∈ S. S is the set of non-negative even integers. 1 ∈ S; for all x ∈ S, x+2 ∈ S and x-2 ∈ S. The set of odd integers. 1 ∈ S and 2 ∈ S; for all x ∈ S, x+3 ∈ S. The set of positive integers that are not divisible by 3. 1 ∈ S; for all x ∈ S, 2x ∈ S. The set of powers of two, i.e. { 2ⁿ | n is a non-negative integer }. 0 ∈ S; for all x ∈ S, x+2 ∈ S: Here we start with 0, and we get all the other elements by adding 2 to elements we already got. So we get 0, 2, 4, 6, 8, etc. 1 ∈ S; for all x ∈ S, x+2 ∈ S and x-2 ∈ S: Here we start with 1, and we get all the other elements by adding or subtracting 2 to/from elements we already got. Just with the addition, we get 1, 3, 5, 7, 9, etc, and with the subtraction, also -1, -3, -5, -7, etc. This way, we get all odd numbers. We can't get more than the odd numbers because the initial population 1 is odd, and the recursion rules always produce odd numbers from an odd number (that's structural induction reasoning). 1 ∈ S and 2 ∈ S; for all x ∈ S, x+3 ∈ S: We start with 1 and 2, and we find all the other elements by adding 3 to elements we already got. So we get 4 and 5, 7 and 8, etc. Thinking in terms of mod 3 clarifies what is going on: all those numbers have a mod 3 value of 1 or 2. We are getting all positive integers that are not divisible by 3. 1 ∈ S; for all x ∈ S, 2x ∈ S: We start with 1 and keep multiplying by 2. We get the numbers 1, 2, 4, 8, 16, etc. This means that we get the powers of 2 (with positive integer exponents).

There are 193 member states of the United Nations. If you have 195 diplomats from these states in a room, then 1. It is certain that at least 2 of them are from the same state. 2. It is certain that at least 3 of them are from the same state. *Both statements are true. *Both statements are false. *1. is true, 2. is false. *1. is false, 2. is true.

1. is true, 2. is false. It is certain that at least 2 of them are from the same state, because if there was at most one diplomat from each state, then there would be at most 193 diplomats. It is not certain that at least 3 of them are from the same state. For example, 191 states might be represented by exactly 1 diplomat, and 2 states might be represented by 2 diplomats each.

How many 3 letter "words" can be created from the letters ABCDEFG when 1. repetition allowed 2. repetition is not allowed? The words do not have to meaningful. *1.7³ 2. P(7,3) = 7·6·5 *1. 3⁷ 2. P(7,3) = 7·6·5 *1. 7+7+7 = 21 2. 7+6+5 = 18 *1. 7³ 2. C(7,3) = 7·6·5/(3·2·1) *None of these.

1.7³ 2. P(7,3) = 7·6·5 1. There are 7 choices for each of the three letters. There are 7 choices for the first letter and 7 choices for the second letter and 7 choices for the third letter. 2. There are 7 choices for the first letter and 6 choices for the second letter and 5 choices for the third letter.

Evaluate 1010 OR 0011. Here, OR is the bitwise logical or, acting on bitstrings.

1011

At College X, 130 students were surveyed about their electronic possessions. -90 had a cell phone. -50 had an iPod. -80 had a computer. -70 had a cell phone and a computer. -20 had a cell phone and an iPod. -16 had a computer and an iPod. -13 had a cell phone, an iPod, and a computer. How many students had at least one of the devices?

127 We let P be the set of students with a cell phone, I the set with an iPod, and C the set with a computer. Then the given information translates into the following cardinalities: |P| = 90|I| = 50|C| = 80|P ∩ C| = 70|P ∩ I | = 20|I ∩ C| = 16|P ∩ I ∩ C| = 13. Using the inclusion-exclusion principle, we obtain |P ∪ I ∪ C| = |P| + |I| + |C| - |P ∩ C| - |P ∩ I | - |I ∩ C| + |P ∩ I ∩ C|. = 90 + 50 + 80 - 70 - 20 - 16 + 13 = 127.

At a pet owner's meeting of 150 people, there are exactly 67 dog owners, and 56 cat owners. A sociologist wants to interview at least 10 people with unusual pets, which she defines as any pet that is neither cat nor dog. How many people does she need to select at random to interview, at least, to guarantee 10 people with unusual pets?

133 Let U be the universal set here, i.e. all pet owners at the meeting; A the set of dog owners at the meeting and B the set of cat owners at the meeting. Then |U| = 150; |A| = 67 and |B| = 56. By the inclusion-exclusion principle, |A∪B| = |A| + |B| - |A ∩ B| ≤ |A| + |B| = 123. The sociologist will have to interview 133 people to guarantee at least 10 pet owners who are not dog or cat owners.

A and B are sets. A contains 12 elements, B contains 8. A and B have 5 elements in common. How many elements are in A∪B ?

15 By the inclusion-exclusion principle, |A∪B| = |A| + |B| - |A ∩ B| = 12 + 8 - 5 = 15.

Four authors are going together on a speaking tour. In each city, they hold one event for one evening where each of them speaks for the same amount of time. In consideration of the fact that the first and the last speaker of the evening have a special impact on the audience, they decide to rotate through all possible lineups, and to visit exactly as many cities as are needed to realize each lineup. How many cities are they visiting?

24 The lineups are ordered selections of 4 from 4 people without repetitions, aka permutations. The number of cities is 4! = 24.

How many distinct ternary logical operators are there? A ternary logical operator is an operator that takes three inputs, p, q and r, and for each truth configuration of the inputs, outputs true or false. Recall that a logical operator is defined by its truth table.

256 p can be true or false. Independently of p, q can be true or false. Independently of p and q, r can be true or false. By the multiplication principle, there are 8 different configurations of truth values that a ternary operator acts on (i.e. the truth table of such an operator has 8 rows, not counting the header).Put differently, a ternary logical operator is a function from a domain of 8 elements to a domain of 2 elements. There are 2⁸ = 256 such functions, again by the multiplication principle.

A true-false test contains 25 questions. In how many different ways can the 25-question test be answered? *2²⁵ *25² *50 *C(15,2) = 25·24/2 *None of these.

2²⁵ There are 2 choices for each of the 25 questions. The choices are independent from each other. Thus, there are 2²⁵ choices.

How many different four-digit code words can be constructed using the digits 0,1,2,3,4,5,6,7,8,9 with no repeated digits that start with either 0 or 9? *2·(9·8·7) *9·7·8 *2·(9+8+7) *2·(9·9·9) *None of these.

2·(9·8·7) If the first digit is 0, then rest of the digits can be picked P(9,3) ways. If the first digit is 9, then the rest of the digits can be picked P(9,3) ways. Now we use the sum rule: the digits can be picked in P(9,3) + P(9,3) ways.

At a job fair, the organizers offer some free gifts to the participants. There are 4 different bags, 3 different water bottles and 5 different binders. Each participant can choose a bag and a water bottle and a binder. How many different choices does a participant have? *4·3·5 *4+3+5 *4!·3!·5! *4!+3!+5! *None of these.

4·3·5 A participant selects one item from each category. By the multiplication principle a participant can have 4·3·5 different choices.

In a class of 3000 students, the professor gives a multiple choice quiz with 4 questions, possible answers A,B,C, D or E. Each student answers each question. Among the 3000 students, at least how many students will turn in the exact same answers for the quiz questions?

5 There are 5⁴=625 possible answers for the quiz. Considering 625 · 4 = 2600 625 · 5 = 3125, we realize that there must be 5 students who will turn in the exact same answer sheet. This is because if each answer sheet was only turned in by at most 4 students, there would at most be 625 · 4 = 2600 students total.

The intersection of two sets contains 10 elements, and the union 45. What is the sum of the elements in the two sets?

55 By the inclusion-exclusion principle, |A∪B| = |A| + |B| - |A ∩ B|. We substitute the given information and get: 45 = |A| + |B| - 10. Thus|A| + |B|= 55.

A device produces random 64-bit integers at a rate of one billion per second. After how many years of running is it unavoidable that the device produces an output for the second time? Round to the nearest number of years.

585 The device is capable of producing 2⁶⁴ many different outputs. The device produces 10⁹ outputs per second. Therefore, it produces 10⁹ · 3600 · 24 · 365.25 outputs per year. By the pigeonhole principle, it is unavoidable that the device has produced at least one output twice when it has produced 2⁶⁴ + 1 outputs. It takes the device (2⁶⁴ + 1)/(10⁹ · 3600 · 24 · 365.25) years to produce 2⁶⁴ + 1 outputs. That is 584.54 years, or 585 years when rounded to the nearest year. (Approximating the length of the year to 365 year does not change the rounded answer here.)

Find the lowest integer k so that 1⁵ + 2⁵ + 3⁵ + 4⁵ + 5⁵ + ... + n⁵ is O(nᵏ).

6 Let us call 1⁵ + 2⁵ + 3⁵ + 4⁵ + 5⁵ + ... + n⁵ = S(n). Since each base is at most n, we have the inequality S(n) ≤ n⁵ + n⁵ + ... + n⁵ = n·n⁵ = n⁶. Therefore, S(n) is O(n⁶). On the other hand, if n is even, then n/2 + 1 bases in the sum are at least n/2. For example, S(8) = 1⁵ + 2⁵ + 3⁵ + 4⁵ + 5⁵ + 6⁵ + 7⁵ + 8⁵ , which has 5 bases that are at least 4. Thus, for even n, S(n) > (n/2)⁵ + (n/2)⁵ + ... + (n/2)⁵, where we have more than n/2 terms (n/2)⁵ on the right side. Therefore, S(n) > (n/2)⁶ = n⁶ / 64. This means that S(n) cannot be O(n⁵). Another way to see that S(n) cannot be O(n⁵) is to use calculus. By making a Riemann sum diagram, you can see that S(n) is a left sum for the integral of f(x) = x⁵ from x=1 to x=n+1. Since f is decreasing, the left sum overestimates the integral. The value of the integral is 1/6 ( (n+1)⁶ - 1), an order n⁶ function.

Enter the smallest integer n so that the following function is O(xⁿ). f(x)=x²(x³ + 1)+x⁵log(x).

6 The first term is order of x⁵ , hence also big-O of x⁵. The second term is "between" x⁵ and x⁶ in order, hence big-O of x⁶ but not x⁵. That makes the first term negligible, and the sum big-O of x⁶ but not x⁵.

What is the minimum number of people you need to guarantee that there are three among them who were born on the same day? There are 366 possible birthdays.

733 With 2·366 = 732 people, there could be exactly two people that were born on each birthday. With 733 people, that is impossible, because up to two people for each birthday can only add up to 732 people total.

Let the relation R on {1,2,3} be given by the following table: R 1 2 3 1 0 X 0 2 0 X 0 3 X 0 X Also, let S be the relation on {1,2,3} given by the following table: S 1 2 3 1 X 0 X 2 0 X 0 3 0 X 0 Determine which of the following tables represents the relation S ∘ R. ? 1 2 3 1 0 X 0 2 0 X 0 3 X X X ? 1 2 3 1 X X X 2 0 X 0 3 0 X 0 ? 1 2 3 1 X 0 X 2 0 0 0 3 0 X 0 ? 1 2 3 1 0 0 0 2 X X X 3 0 X 0

? 1 2 3 1 0 X 0 2 0 X 0 3 X X X The second choice is the relation R ∘ S.

Let the relation R on {1,2,3} be given by the following table: R 1 2 3 1 0 0 0 2 0 X 0 3 X 0 X Check all properties that this relation has. *Reflexive *Symmetric *Anti-symmetric *Transitive

Anti-symmetric Transitive R is not reflexive because 1R1 is not the case. R is not symmetric because 3R1 but not 1R3. R is anti-symmetric because for every element in R not on the diagonal (there is only one, (3,1)), the symmetric partner is missing, in this case, (1,3)). To see that R is transitive, we have to check the transitivity condition through exhaustion. 2R2 and 2R2, and also 2R2. 3R1, 1 is related to nothing, so transitivity does not require anything here. 3R3 and 3R3, and also 3R3.

There are 10 applied math and 13 pure math professors on the faculty in the mathematics department. How many ways are there to select a committee of 7 members if the committee needs to have 4 applied math and 3 pure math members? *C(10,4) · C(13,3) = 10·9·8·7/4! · 13·12·11/3! *C(10,4) + C(13,3) = 10·9·8·7/4! + 13·12·11/3! *P(10,4) · P(13,3) = 10·9·8·7 · 13·12·11 *P(10,4) + P(13,3) = 10·9·8·7 + 13·12·11 *None of these.

C(10,4) · C(13,3) = 10·9·8·7/4! · 13·12·11/3! We select 4 applied math people out of 10 (order of the selection does not matter). For each selection of the 4-member-applied math committee, we select pure math people out of the 13 (again the order of the selection does not matter).

True or False? There is a smallest real number a so that 3ˣx is O(aˣ).

False Let us use the notations f(x) = 3ˣx and g(x) = 3ˣ. f(x) is not O(g(x)) because f(x)/g(x)=x goes to infinity as x goes to infinity. On the other hand, f(x) is O(aˣ) for any real number a > 3. For example, f(x) is O(3.01ˣ). You can see that this is true by considering the quotient again: f(x)/g(x) = (3/a)ˣ·x. 3/a is less than 1, hence (3/a)ˣ goes to zero as x goes to infinity. Exponential decay beats polynomial growth (this is a calculus fact), so even (3/a)ˣ·x still goes to zero. Since 3ˣx is O(aˣ) for all a > 3, but not for a = 3, there is no smallest real number a so that 3ˣx is O(aˣ).

Determine the truth of the quantified statement ∀x ∃y (xy > x). The domain of discourse is the set of real numbers.

False The statement is false because for x = 0, no such y can exist. With x = 0, xy = 0 regardless of what y is, and 0 is not greater than 0.

True or False? There is a smallest real number k so that xlog(x) is O(xᵏ).

False xlog(x) is not O(x) because xlog(x)/x = log(x) goes to infinity. On the other hand, xlog(x) is O(xᵏ) for any k > 1. This is because xlog(x) / xᵏ = log(x) / xᵏ⁻¹, which goes to zero as x goes to infinity. (Use L'Hospital's rule to justify this statement.) It's a calculus fact that any positive power of x goes faster to infinity than log(x), so the denominator in log(x) / xᵏ⁻¹ (x has a positive power) "wins".

Determine the truth of the quantified statement ∀x ∃y (xy > x). The domain of discourse is the set of positive real numbers.

T Suppose any positive real number x is given. Pick y = 2. Then xy = 2x. 2x > x since x > 0. [Adding x to both sides of x > 0 produces x + x > x, or 2x > x.]

Let the relation R on {1,2,3} be given by the following table: R 1 2 3 1 X 0 0 2 X X 0 3 X X X How many elements can be added to R so that R is still anti-symmetric? *None *One *Two *Three

None Anti-symmetry means that if any non-diagonal element (a,b) is in R, then (b,a) cannot be in R. The following non-diagonal elements are in R: (2,1), (3,1), (3,2). That means that anti-symmetry rules out (1,2), (1,3), (2,3). That means all potential additional elements are ruled out.

Let the relation R on {1,2,3} be given by the following table: R 1 2 3 1 0 X 0 2 0 X X 3 X X X Select the table that describes the relation R². R 1 2 3 1 0 X X 2 X X X 3 X X X R 1 2 3 1 X X X 2 X X X 3 X X X R 1 2 3 1 0 X X 2 X X X 3 0 X X R 1 2 3 1 X X 0 2 0 X X 3 0 0 X

R 1 2 3 1 0 X X 2 X X X 3 X X X To find R², we need to find all "indirectly" related elements (a,c) of {1,2,3}, in the sense that aRb and bRc for some in {1,2,3}. Geometrically speaking, we need to imagine three copies of the set {1,2,3}, and then draw arrows as shown in the lecture to see which elements of {1,2,3} on the right we can reach by starting on the left and going through the middle. From 1, we can reach 2, and from there, we can reach 2 and 3. Therefore, (1,2) and (1,3) are in R². From 2, we can reach 2 and 3, and just from 3, we can reach 1,2 and 3. Therefore, (2,1), (2,2), (2,3) are in R². From 3, we can reach 1,2 and 3, and from 3 alone, we can reach 1, 2 and 3 again, so (3,1), (3,2) and (3,3) are in R². This means that R² = { (1,2), (1,3), (2,1), (2,2), (2,3), (3,1), (3,2), (3,3) }

Check all the properties that the relation R = { (a,b) | ab ≥ 0 } has on the set of integers. *Reflexive *Symmetric *Transitive *Antisymmetric *An equivalence relation

Reflexive Symmetric It is reflexive since a·a ≥0 for all integer a. It is symmetric, since a·b ≥0 implies b·a ≥0. It is not transitive. 1 is related to 0 and 0 is related to -1, but 1 is not related to -1. It is not antisymmetric. For example, 1 is related to 2 and 2 is related to 1, but 1 is not the same as 2.

True or False? If there are 22 people in a room, then it is certain that at least 4 of them were born on the same day of the week.

True If there were at most 3 born on each day of the week, there would be at most 21 people, because there are only 21 days of the week.

Check all functions f(x) that are O(x²). *f(x) = log(xˣ) *f(x) = x³/2 + x² *f(x) = ⌊x+2⌋ · ⌈x⌉ *f(x)=2x1.9 +2x-1.9 *f(x) = (x⁴+2x+3)/(x²-2) *f(x) = (x⁵+2x+3)/(x²-2) *f(x) = x² · log(x) *f(x) = 2ˣ +x²

f(x) = log(xˣ) f(x) = ⌊x+2⌋ · ⌈x⌉ f(x)=2x1.9 +2x-1.9 f(x) = (x⁴+2x+3)/(x²-2) f(x) = log(xˣ) = xlog(x) is O(x²). f(x) = x³/2 + x² is of higher degree than x² and therefore not O(x²). f(x) = ⌊x+2⌋ · ⌈x⌉ is approximately x². More precisely: ⌊x+2⌋ ≤ x + 2 and ⌈x⌉ ≤ x + 1. Therefore, f(x) ≤ (x + 2)(x + 1). This means that f(x) is O(x² + 3x + 2). Since x² + 3x + 2 is O(x²), ⌊x+2⌋ · ⌈x⌉ is O(x²) as well. f(x)=2x^1.9 +2x^(-1.9) is O(x²) because each of the terms is. f(x) = (x⁴+2x+3)/(x²-2) < (x⁴+2x+3)/x² = x²+2/x+3/x² which is O(x²). f(x) = (x⁵+2x+3)/(x²-2) is a cubic function plus a proper rational part, and can't therefore be O(x²). f(x) = x² · log(x) can't be O(x²) because f(x)/x² = log(x) goes to infinity. f(x) = 2ˣ +x² can't be O(x²) because f(x)/x² = 2ˣ / x² + 1 goes to infinity.

Consider the statement "Unless you stop smoking, you will get sick". Select which one of the following statements are logically equivalent to that conditional above. * You will get sick if you keep smoking. * Continuing to smoke is sufficient to get sick. * Continuing to smoke is necessary to get sick. * If you get sick, that means you didn't stop smoking. * You will get sick only if you keep smoking.

You will get sick if you keep smoking. Continuing to smoke is sufficient to get sick. Recall that "p only if q" does NOT mean "if q, then p". It means the converse: "If p, then q". "Unless you stop smoking, you will get sick" means "If you don't stop smoking, then you will get sick" . Equivalently, "If you keep smoking, you will get sick."

Find a closed-form representation of the following recursively defined sequence: *aₙ = 9aₙ₋₂ for n ≥ 2, with initial conditions a₀ = 6 and a₁ = 12. *aₙ =(-3)ⁿ +5·3ⁿ *aₙ =3·(3)ⁿ +3 *aₙ= 6 · 3ⁿ - 2n· 3ⁿ *aₙ = 0.75 · 9ⁿ + 5.25 *None of these.

aₙ =(-3)ⁿ +5·3ⁿ The characteristic equation is r2 - 9 = 0, and its roots are r1 = -3 and r2 = 3. The general solution is an =c1(-3)n +c23n. When you substitute n=0 and n=1 and the given initial values of the sequence, you can solve for c1 and c2 .

Check all functions f(x) that are Ω(x²). f(x) = log(xˣ) *f(x) = x³/2 + x² *f(x) = ⌊x+2⌋ · ⌈x⌉ *f(x)=2x1.9 +2x-1.9 *f(x) = (x⁴+2x+3)/(x²-2) *f(x) = (x⁵+2x+3)/(x²-2) *f(x) = x² · log(x) *f(x) = 2ˣ +x²

f(x) = x³/2 + x² f(x) = ⌊x+2⌋ · ⌈x⌉ f(x) = (x⁴+2x+3)/(x²-2) f(x) = (x⁵+2x+3)/(x²-2) f(x) = x² · log(x) f(x) = 2ˣ +x² Remember that f(x) being Ω(x²) means that f grows "at least as fast" as x². This is the case if |f(x)| / x² is greater than or equal a positive constant, has a positive limit, or goes to infinity. If the quotient goes to zero, then f(x) is not Ω(x²). For f(x) = log(xˣ), f(x) / x² = log(x)/x goes to zero. For f(x) = x³/2 + x², f(x) / x² = x/2 + 1 goes to infinity. f(x) = ⌊x+2⌋ · ⌈x⌉ ≥ x · x , so f(x) / x² ≥ 1. For f(x)=2x^1.9 +2x^(-1.9), f(x) / x² = 2x^(-0.1) +2x^(-3.9) goes to zero. For f(x) = (x⁴+2x+3)/(x²-2), f(x) / x² = (x⁴+2x+3)/(x²(x²-2)) goes to 1, according to the horizontal asymptote rule for rational functions. For f(x) = (x⁵+2x+3)/(x²-2), f(x) / x² is a linear function, which goes to infinity, plus a proper rational part, which goes to zero. Hence f(x) / x² goes to infinity. For f(x) = x² · log(x), f(x) / x² = log(x) goes to infinity. For f(x) = 2ˣ +x², f(x) / x² = 2ˣ / x² + 1 which goes to infinity.

Check all functions f(x) that are Θ(x²). *f(x) = log(xˣ) *f(x) = x³/2 + x² *f(x) = ⌊x+2⌋ · ⌈x⌉ *f(x)=2x1.9 +2x-1.9 *f(x) = (x⁴+2x+3)/(x²-2) *f(x) = (x⁵+2x+3)/(x²-2) *f(x) = x² · log(x) *f(x) = 2ˣ +x²

f(x) = ⌊x+2⌋ · ⌈x⌉ f(x) = (x⁴+2x+3)/(x²-2) f is Θ(x²) iff f is both O(x²) and Ω(x²). We get the answers to this problem by combining the answers of the two previous ones.

If f(x) is O(x³) and g(x) is O(x⁴), then what is the best we can say about f(x)+g(x)? Find the "lowest" big-O estimate that is guaranteed by the given information. *f(x)+g(x) is O(x³). *f(x)+g(x) is O(x⁴). *f(x)+g(x) is O(x⁷). *f(x)+g(x) is O(x¹²).

f(x)+g(x) is O(x⁴). The example f(x) =x³ and g(x) = x⁴ shows that we can't conclude that f(x)+g(x) is O(x³). We can conclude f(x)+g(x) is O(x⁴) by the sum rule. This means that f(x)+g(x) is also O(x⁷) and O(x¹²), but the question asked for the "lowest" big-O estimate.

If f(x) is O(x³) and g(x) is O(x⁴), then what is the best we can say about f(x)·g(x)? Find the "lowest" big-O estimate that is guaranteed by the given information. *f(x)·g(x) is O(x³). *f(x)·g(x) is O(x⁴). *f(x)·g(x) is O(x⁷). *f(x)·g(x) is O(x¹²).

f(x)·g(x) is O(x⁷). The example f(x) =x³ and g(x) = x⁴ shows that we can't conclude that f(x)·g(x) = x⁷ is O(x³) or O(x⁴). We can conclude f(x)·g(x) is O(x⁷) by the product rule. This means that f(x)·g(x) is also O(x¹²), but the question asked for the "lowest" big-O estimate.

Find a big-O estimate of: f(x)=(3x² + xlog(x²) + x²log(x²))·(πx³ + 2x + 4) + (x² + x⁴log(x)) such that in your estimate f(x) is O(g(x)) and g(x) is a simple function of the smallest order. *g(x)=x⁵log(x) *g(x)=x⁶ *g(x)=x⁴log(x) *g(x)=x⁵ *None of these functions are big O estimates of f(x).

g(x)=x⁵log(x) Let us call 1⁵ + 2⁵ + 3⁵ + 4⁵ + 5⁵ + ... + n⁵ = S(n). Since each base is at most n, we have the inequality S(n) ≤ n⁵ + n⁵ + ... + n⁵ = n·n⁵ = n⁶. Therefore, S(n) is O(n⁶). On the other hand, if n is even, then n/2 + 1 bases in the sum are at least n/2. For example, S(8) = 1⁵ + 2⁵ + 3⁵ + 4⁵ + 5⁵ + 6⁵ + 7⁵ + 8⁵ , which has 5 bases that are at least 4. Thus, for even n, S(n) > (n/2)⁵ + (n/2)⁵ + ... + (n/2)⁵, where we have more than n/2 terms (n/2)⁵ on the right side. Therefore, S(n) > (n/2)⁶ = n⁶ / 64. This means that S(n) cannot be O(n⁵). Another way to see that S(n) cannot be O(n⁵) is to use calculus. By making a Riemann sum diagram, you can see that S(n) is a left sum for the integral of f(x) = x⁵ from x=1 to x=n+1. Since f is decreasing, the left sum overestimates the integral. The value of the integral is 1/6 ( (n+1)⁶ - 1), an order n⁶ function.

Match logically equivalent expressions. p ↔ q p ⊕ q p ∨ q p ∧ q *¬ ( (p → q) → ¬(q → p) ) *(p ∨ q) ∧¬ (p ∧ q) *¬p → q *¬(¬p ∨¬q)

p ↔ q ¬ ( (p → q) → ¬(q → p) ) p ⊕ q (p ∨ q) ∧¬ (p ∧ q) p ∨ q ¬p → q p ∧ q ¬(¬p ∨¬q) We know ¬p ∨ q ≡ p → q from the lecture. By substituting ¬p for p and using the double negation law, we get p ∨ q ≡ ¬p → q. By using De Morgan and the double negation law, we get p ∧ q ≡ ¬(¬p ∨¬ q). We know from the lecture that p ⊕ q is true when exactly one of p,q is true. So we can define it as: p or q, but (and) not both. This means p ⊕ q ≡ (p ∨ q) ∧¬ (p ∧ q). ----------------- Biconditional, Solution 1: The biconditional is the negation of the exclusive or. By using the equivalence we just derived, p ↔ q ≡ ¬ ((p ∨ q) ∧¬ (p ∧ q)). We use De Morgan to simplify ¬ (p ∧ q): p ↔ q ≡ ¬ ((p ∨ q) ∧ (¬p ∨ ¬q)). We now distribute the right side inside the parentheses. We will place unnecessary parentheses around the conjunctions to emphasize the order of operations. p ↔ q ≡ ¬ ( (p∧¬p) ∨ (q∧¬p) ∨ (p∧¬q) ∨ (q∧¬q) ). We use the fact that p∧¬p and q∧¬q are contradictions, and then the identity law. p ↔ q ≡ ¬ ( F ∨ (q∧¬p) ∨ (p∧¬q) ∨ F ) ≡ ¬ ( (q∧¬p) ∨ (p∧¬q) ). We now use De Morgan on the two inside conjunctions and commute: p ↔ q ≡ ¬ ( ¬(¬q∨p) C ¬(¬p∨q) ) ≡ ¬ ( ¬(¬p∨q) ∨ ¬(¬q∨p) ) Using the definition of conditional three times, we get p ↔ q ≡ ¬ ( ¬(p → q) ∨ ¬(q→ p) ) ≡ ¬ ( (p → q) → ¬(q→ p) ). ----------------- Biconditional, Solution 2: The biconditional is equivalent to (p → q) ∧ (q → p). Using De Morgan, we get (p → q) ∧ (q → p)≡¬(¬(p → q) ∨ ¬(q → p)). Now, apply the definition of conditional to obtain ¬(¬(p → q) ∨ ¬(q → p))≡¬((p → q) → ¬(q → p)).


Related study sets

Microbiology-chapter 6 (exam 2) pt3

View Set

CompTIA SY0-401 - Topic 3, Threats and Vulnerabilities

View Set

AP Stat - Chapters 1-4 - Multiple Choice - Cumulative Test

View Set

Topic 8 (The Cabinet and Departments)

View Set

Disability Income and Related Insurance

View Set

Database Design : Chapter 9, 10, 11

View Set

N20025: E3: Drugs to Decrease Histamine Effects & Allergic Response

View Set