CS 1382 EXAM 3 Review
What is the coefficient of x^7 in (1 + x)^11?
(11/7)*1^4 = 330
What is the coefficient of x^8y^9 in the expansion of (3x + 2y)^17?
(17/9) * 3^8 * 2^9 = 24310 · 6561 · 512 = 81,662,929,920
What is the coefficient of x^9 in (2 − x)^19?
-2^10 * (10/9) = -94,595,072
What is the coefficient of x^101y^99 in the expansion of (2x − 3y)^200?
-2^101 * 3^99 (200/99)
Below is a row of Pascal's triangle containing the binomial coefficients for some expansion. 1 10 45 120 210 252 210 120 45 10 1 What is the row immediately following this row in Pascal's triangle
1 11 55 165 330 462 462 330 165 55 11 1
How many license plates can be made using either three digits followed by three uppercase English letters or three uppercase English letters followed by three digits?
10^3 * 26^3 + 26^3* 10^3 = 35,152,000
How many license plates consisting of three letters followed by three digits contain no letter or digit twice?
11,232,000
How many license plates can be made using either two or three uppercase English letters followed by either two or three digits?
20,077,200
How many license plates can be made using either three uppercase English letters followed by three digits or four uppercase English letters followed by two digits?
26^3 * 10^3 + 26^4 * 10^2 = 63,273,600
1. How many strings are there of four lowercase letters that have the letter x in them?
26^4 - 25^4 = 66,351
A committee is formed consisting of one representative from each of the 50 states in the United States, where the representative from a state is either the governor or one of the two senators from that state. How many ways are there to form this committee?
3^50
How many strings are there of lowercase letters of length four or less, not counting the empty string?
475,255 (counting the empty string)
How many license plates can be made using either two uppercase English letters followed by four digits or two digits followed by four uppercase English letters?
52,457,600
How many permutations of {a, b, c, d, e, f, g} end with a?
6! =720
Show that in any set of six classes, each meeting regularly once a week on a particular day of the week, there must be two that meet on the same day, assuming that no classes are held on weekends.
Because there are six classes, but only five weekdays, the pigeonhole principle shows that at least two classes must be held on the same day
An office building contains 27 floors and has 37 offices on each floor. How many offices are in the building?
By the product rule there are 27 · 37 = 999 offices
How many bit strings of length n, where n is a positive integer, start and end with 1s?
If n = 0, then the empty string—vacuously—satisfies the condition (or does not, depending on how one views it). If n = 1, then there is one, namely the string 1. If n ≥ 2, then such a string is determined by specifying the n - 2 bits between the first bit and the last, so there are 2n-2 such strings.
Construct a truth table for each of these compound propositions. a. p → (¬q ∨ r) b. ¬p → (q → r) c. (p → q) ∨ (¬p → r) d. (p → q) ∧ (¬p → r) e. (p ↔ q) ∨ (¬q ↔ r) f. (¬p ↔ ¬q) ↔ (q ↔ r) g. (p ⊕ q) ∨ (p ⊕ ¬q) h. (p ⊕ q) ∧ (p ⊕ ¬q)
Look on BB exam answers #7
How many different permutations are there of the set {a, b, c, d, e, f, g}?
P(7, 7) = 7! = 5040
Show that if there are 30 students in a class, then at least two have last names that begin with the same letter.
This follows from the pigeonhole principle, with k = 26
Determine the truth value of the statement ∃x∀y(x ≤ y2) if the domain for the variables consists of: a. the positive real numbers. b. the integers. c. the nonzero real numbers.
This statement says that there is a number that is less than or equal to all squares. a) This is false, since no matter how small a positive number x we might choose, if we let y = %x/2, then x = 2y2 , and it will not be true that x ≤ y2. b) This is true, since we can take x = -1, for example. c) This is true, since we can take x = -1, for example.
A club has 25 members. a. How many ways are there to choose four members of the club to serve on an executive committee? b. How many ways are there to choose a president, vice president, secretary, and treasurer of the club, where no person can hold more than one office?
a) 12,650 b) 303,600
1. Find the value of each of these quantities. a. P(6, 3) b. P(6, 5) c. P(8, 1) d. P(8, 5) e. P(8, 8) f. P(10, 9)
a) 120 b) 720 c) 8 d) 6720 e) 40,320 f) 3,628,800
A drawer contains a dozen brown socks and a dozen black socks, all unmatched. A man takes socks out at random in the dark. a. How many socks must he take out to be sure that he has at least two socks of the same color? b. How many socks must he take out to be sure that he has at least two black socks?
a) 3 b) 14
A multiple-choice test contains 10 questions. There are four possible answers for each question. a. In how many ways can a student answer the questions on the test if the student answers every question? b. In how many ways can a student answer the questions on the test if the student can leave answers blank?
a) 4^10 b) 5^10
Find the value of each of these quantities. a. C(5, 1) b. C(5, 3) c. C(8, 4) d. C(8, 8) e. C(8, 0) f. C(12, 6)
a) 5 b) 10 c) 70 d) 1 e) 1 f) 924
There are 18 mathematics majors and 325 computer science majors at a college. a. In how many ways can two representatives be picked so that one is a mathematics major and the other is a computer science major? b. In how many ways can one representative be picked who is either a mathematics major or a computer science major?
a) 5850 b) 343
Let p and q be the propositions p: I bought a lottery ticket this week. q: I won the million dollar jackpot. Express each of these propositions as an English sentence. a. ¬p b. p ∨ q c. p → q d. p ∧ q e. p ↔ q f. ¬p → ¬q g. ¬p ∧ ¬q h) ¬p ∨ (p ∧ q)
a) I did not buy a lottery ticket this week. b) Either I bought a lottery ticket this week or [in the inclusive sense] I won the million dollar jackpot on Friday. c) If I bought a lottery ticket this week, then I won the million dollar jackpot on Friday. d) I bought a lottery ticket this week and I won the million dollar jackpot on Friday. e) I bought a lottery ticket this week if and only if I won the million dollar jackpot on Friday. f) If I did not buy a lottery ticket this week, then I did not win the million dollar jackpot on Friday. g) I did not buy a lottery ticket this week, and I did not win the million-dollar jackpot on Friday. h) Either I did not buy a lottery ticket this week, or else I did buy one and won the million dollar jackpot on Friday.
Express the negations of these propositions using quantifiers, and in English. a. Every student in this class likes mathematics. b. There is a student in this class who has never seen a computer. c. There is a student in this class who has taken every mathematics course offered at this school. d. There is a student in this class who has been in at least one room of every building on campus.
a) In English, the negation is "Some student in this class does not like mathematics." Quantifier is ∃x¬L(x). b) In English, the negation is "Every student in this class has seen a computer." With the obvious propositional function, this is ∀xS(x). c) In English, the negation is "For every student in this class, there is a mathematics course that this student has not taken." With the obvious propositional function, this is ∀x∃c¬T(x, c). d) let P(z, y) be "Room z is in building y," and let Q(x, z) be "Student x has been in room z." Then the original statement is ∃x∀y∃z#P(z, y) ∧ Q(x, z). To form the negation, we change all the quantifiers and put the negation on the inside, then apply De Morgan's law. The negation is therefore ∀x∃y∀z#¬P(z, y) ∨ ¬Q(x, z) , which is also equivalent to ∀x∃y∀z#P(z, y) → ¬Q(x, z). In English "For every student there is a building such that for every room in that building, the student has not been in that room.
Suppose the domain of the propositional function P(x, y) consists of pairs x and y, where x is 1, 2, or 3 and y is 1, 2, or 3. Write out these propositions using disjunctions and conjunctions. a. ∀x∀yP(x, y) b. ∃x∃yP(x, y) c. ∃x∀yP(x, y) d. ∀y∃xP(x, y)
a) P(1, 1) ∧ P(1, 2) ∧ P(1, 3) ∧ P(2, 1) ∧ P(2, 2) ∧ P(2, 3) ∧ P(3, 1) ∧ P(3, 2) ∧ P(3, 3) b) P(1, 1) ∨ P(1, 2) ∨ P(1, 3) ∨ P(2, 1) ∨ P(2, 2) ∨ P(2, 3) ∨ P(3,1) ∨ P(3, 2) ∨ P(3, 3) c) (P(1, 1) ∧ P(1, 2) ∧ P(1, 3)) ∨P(2, 1) ∧ P(2, 2) ∧ P(2, 3)) ∨ (P(3, 1) ∧ P(3, 2) ∧ P(3, 3)) d) (P(1, 1) ∨ P(2, 1) ∨ P(3, 1)) ∧ (P(1, 2) ∨ P(2, 2) ∨ P(3, 2)) ∧ (P(1, 3) ∨ P(2, 3) ∨ P(3, 3))
How many permutations of the letters ABCDEFGH contain: a. the string ED? b. the string CDE? c. the strings BA and FGH? d. the strings AB, DE, and GH? e. the strings CAB and BED? f. the strings BCA and ABF?
a) P(7, 7) = 7! = 5040. b) P(6, 6) = 6! = 720. c) P(5, 5) = 5! = 120 d) P(5, 5) = 5! = 120. e) P(4, 4) = 4! = 24. f) There are no permutations with both of these substrings, since B cannot be followed by both C and F at the same time.
Let W(x, y) mean that student x has visited website y, where the domain for x consists of all students in your school and the domain for y consists of all websites. Express each of these statements by a simple English sentence. a. W(Sarah Smith, www.att.com) b. ∃xW(x, www.imdb.org) c. ∃yW(Jos´e Orez, y) d. ∃y(W(Ashok Puri, y) ∧W(Cindy Yoon, y)) e. ∃y∀z(y ≠ (David Belcher) ∧ (W(David Belcher, z)→W(y,z))) f. ∃x∃y∀z((x ≠ y) ∧ (W(x, z) ↔ W(y, z)))
a) Sarah Smith has visited www.att.com. b) At least one person has visited www.imdb.org. c) Jose Orez has visited at least one website. d) There is a website that both Ashok Puri and Cindy Yoon have visited. e) There is a person besides David Belcher who has visited all the websites that David Belcher has visited. f) There are two different people who have visited exactly the same websites
Let S = {1, 2, 3, 4, 5}. a. List all the 3-permutations of S. b. List all the 3-combinations of S.
a) There are 60 permutation 123 ,132 ,213, 231, 312 ,321, 124,142, 214,241 412 ,421 ,125, 152. 215. 251. 512. 521,134,143 314, 341, 413 ,431, 135 ,153 ,315, 351, 513, 531 145 ,154, 415, 451, 514, 541,234 ,243, 324, 342 423, 432, 235,253, 325, 352, 523, 532,245,254 425 2 524 542, 345,354, 435 ,453, 534 ,543 b) There are 10 combinations 123 , 124 ,125, 134 ,135, 145 , 234, 235, 245, 345
A bowl contains 10 red balls and 10 blue balls. A woman selects balls at random without looking at them. a. How many balls must she select to be sure of having at least three balls of the same color? b. How many balls must she select to be sure of having at least three blue balls?
a) There are two colors: these are the pigeonholes. We want to know the least number of pigeons needed to ensure that at least one of the pigeonholes contains three pigeons. By the generalized pigeonhole principle, the answer is 5. If five balls are selected, at least ⌈ 5/2 ⌉= 3 must have the same color. On the other hand, four balls is not enough, because two might be red and two might be blue. Note that the number of balls was irrelevant (assuming that it was at least 5). b) She needs to select 13 balls in order to ensure at least three blue ones. If she does so, then at most 10 of them are red, so at least three are blue. On the other hand, if she selects 12 or fewer balls, then 10 of them could be red, and she might not get her three blue balls. This time the number of balls did matter
1. Which of these are propositions? What are the truth values of those that are propositions? a.) Do not pass go. b.) What time is it? c.) There are no black flies in Maine. d.) 4 + x = 5. e.) The moon is made of green cheese. f.) 2n >= 100.
a) This is not a proposition; it's a command. b) This is not a proposition; it's a question. c) This is a proposition that is false, as anyone who has been to Maine knows. d) This is not a proposition; its truth value depends on the value of x. e) This is a proposition that is false. f) This is not a proposition; its truth value depends on the value of n.
Determine the truth value of each of these statements if the domain for all variables consists of all integers. a. ∀n∃m(n2 < m) b. ∃n∀m(n < m2) c. ∀n∃m(n + m = 0) d. ∃n∀m(nm = m) e. ∃n∃m(n2 + m2 = 5) f. ∃n∃m(n2 + m2 = 6) g. a. ∃n∃m(n + m = 4 ∧ n − m = 1) h. a. ∃n∃m(n + m = 4 ∧ n − m = 2) i. a. ∀n∀m∃p(p = (m + n)∕2)
a) True b) True c) True d) True e) True f) False g) False h) True i) False
Let p and q be the propositions p: It is below freezing. q: It is snowing. Write these propositions using p and q and logical connectives (including negations). a. It is below freezing and snowing. b. It is below freezing but not snowing. c. It is not below freezing and it is not snowing. d. It is either snowing or below freezing (or both). e. If it is below freezing, it is also snowing. f. Either it is below freezing or it is snowing, but it is not snowing if it is below freezing. g. That it is below freezing is necessary and sufficient for it to be snowing.
a) p ∧ q b) p ∧ ¬q c) ¬p ∧ ¬q d) p ∨ q e) p → q f) (p ∨ q) ∧ (p →¬q) g) q ↔ p
Let L(x, y) be the statement "x loves y," where the domain for both x and y consists of all people in the world. Use quantifiers to express each of these statements. a. Everybody loves Jerry. b. Everybody loves somebody. c. There is somebody whom everybody loves. d. Nobody loves everybody. e. There is somebody whom Lydia does not love. f. There is somebody whom no one loves. g. There is exactly one person whom everybody loves. h. There are exactly two people whom Lynn loves. i. Everyone loves himself or herself. j. There is someone who loves no one besides himself or herself.
a) ∀xL(x, Jerry) b) ∀x∃yL(x, y) c) ∃y∀xL(x, y) d) ∀x∃y¬L(x, y) e) ∃x¬L(Lydia, x) f) ∃x∀y¬L(y, x) g) ∃x(∀yL(y, x) ∧ ∀z((∀wL(w, z)) → z = x)) h) ∃x∃y(x ≠y∧L(Lynn, x) ∧ L(Lynn, y) ∧ ∀z(L(Lynn, z) → (z = x ∨ z = y))) i) ∀xL(x, x) j) ∃x ∀ y (L(x, y) ↔ x = y)
List all the permutations of {a, b, c}.
abc, acb, bac, bca, cab, cba
Suppose that a password for a computer system must have at least 8, but no more than 12, characters, where each character in the password is a lowercase English letter, an uppercase English letter, a digit, or one of the six special characters ∗, >, <, !, +, and =. a. How many different passwords are available for this computer system? b. How many of these passwords contain at least one occurrence of at least one of the six special characters? c. Using your answer to part (a), determine how long it takes a hacker to try every possible password, assuming that it takes one nanosecond for a hacker to check each possible password.
idk
How many bit strings with length not exceeding n, where n is a positive integer, consist entirely of 1s, not counting the empty string?
n + 1 (counting the empty string)