# Practice Exam for First Midterm Exam

### Directions:

• Answer the problems on the exam pages.
• There are six problems for 100 total points. Probable scale is A=90, C=63.
• If you need extra space use the back of a page.
• No books, notes, calculators, or collaboration.
• The first four questions are true/false, with five points for the correct boolean answer and up to five for a correct justification.
• The parts of Question 5 and part (b) of Question 6 have numerical answers -- you may give your answer in the form of an expression using arithmetic operations, powers, falling powers, or the factorial function. If you give your answer using the "choose" notation, also give it using only operations on this list. In addition, if your answer is a non-negative integer less than or equal to 100, you must compute the number for full credit.

```  Q1: 10 points
Q2: 10 points
Q3: 10 points
Q4: 10 points
Q5: 30 points
Q6: 30 points
Total: 100 points
```

• Question 1 (10): True or false with justification: Over 90% of the ten-letter sequences of a's and b's have at least two a's and at least two b's.

• Question 2 (10): True or false with justification: Consider bridge hands, which are thirteen-card subsets of the 52-card deck. The number of bridge hands, consisting of twelve cards of one suit and an ace of another suit, is less than 200.

• Question 3 (10): True or false with justification: The number of thirteen-card bridge hands that either contain all four aces, or contain all four kings, or both, is strictly less than 2 times (48 choose 9).

• Question 3 (10): True or false with justification: There are over a million nine-letter words that contain all the letters that occur in the word "CAMBRIDGE".

• Question 5 (30): In this problem you will count various subsets of the three-letter strings that use only letters that occur in the word "CAMBRIDGE".
• (a,5) How many such strings are there in all?
• (b,5) How many such strings do not contain a repeated letter?
• (c,5) In how many of these strings do the letters occur in the same order as in the word "CAMBRIDGE", with letters possibly repeated? (For example, "BRR" is such a word.)
• (d,5) How many of these strings are in both the set counted in part (b) and the set counted in part (c)?
• (e,5) How many of the strings counted in (b) have the letters in alphabetical order, as in the word "AEM"?
• (f,5) How many of the strings counted in (a) have two consonants and a vowel, with the vowel in the middle, as in "BIB" or "DIG"? (Here "A", "E", and "I" are vowels and the other six letters are consonants.)

• Question 6 (30): This question involves strings of different lengths over the alphabet {a,b}. Let X be the set of strings that begin with "a" and never have two "b"'s in a row. Let Y be the set of strings that never have three "a"'s or three "b"'s in a row.
• (a,5) Find all the four-letter strings in X.
• (b.5) Compute how many four-letter strings are in Y. (Hint: You can always examine all 24 four-letter strings, but you could also use Inclusion/Exclusion to count the strings that have the first three letters equal, the last three letters equal, or both.)
• (c,10) For any non-negative integer n, let f(n) be the number of strings of length n in X. Argue that for any n, f(n+2) = f(n+1) + f(n). (Hint: How can a string in X begin? When do you know that you can delete some initial letters of a string in X and be left with another string in X?)
• (d,10) For any non-negative integer n, let g(n) be the number of strings of length n in Y. Argue that for any n, g(n) = 2f(n). (Hint: If w is a string of a's and b's, I can map it to v, another string of a's and b's of the same length, as follows. When a letter of w is different from the previous letter, or is the first letter of w, write an "a" in v. If the letter of w is the same as the previous letter, write a "b" in v. If w is in Y, what can we tell about v? What does this say about the number of strings in X and Y of that length?)