1. Suppose you wish to prove that the following is true for all

advertisement
1. Suppose you wish to prove that the following is true for all positive integers n by using the
Principle of Mathematical Induction: 1 + 3 + 5 + ... + (2n – 1) = n2.
a) Write P(1)
1 = 12
b) Write P(k)
1 + 3 + 5 + ... + (2n – 1) = n2
c) Write P(k + 1)
1 + 3 + 5 + ... + (2n – 1) + (2(n + 1) – 1) = (n + 1)2
d) Use the Induction to prove that P(n) is true for all positive integers n.
Base case proved above.
Inductive Hypothesis: 1 + 3 + 5 + ... + (2n – 1) = n2
So from the inductive hypothesis we want prove that the inductive step is true.
1 + 3 + 5 + ... + (2n – 1) = n2
Add 2(n+1) – 1 to both sides.
1 + 3 + 5 + ... + (2n – 1) + (2(n + 1) – 1) = n2 + (2(n + 1) – 1)
1 + 3 + 5 + ... + (2n – 1) + (2(n + 1) - 1) = n2 + 2n + 1
1 + 3 + 5 + ... + (2n – 1) + (2(n + 1) - 1) = (n + 1)2
Thus the induction is shown and the proof finished.
Remember: when showing P(n+1) is true for the inductive step, your proof must be
dependent on P(n), your inductive hypothesis. If you don't show that P(n) implies P(n+1)
then you didn't show the induction.
2. Use the Principle of Mathematical Induction to prove that n3 > n2 + 3 for all n >= 2.
Base case: P(2)
23 > 22 + 3
8>4+2
8>6
Base case is true.
Inductive Hypothesis: P(n)
n3 > n2 + 3
Add 3n2 + 3n + 1 to left side.
Add 2n + 1 to right side.
n3 + 3n2 + 3n + 1 > n2 + 3 + 2n + 1
(n + 1)3 > n2 + 2n + 1 + 3
(n + 1)3 > (n + 1)2 + 3
Thus we have proven the inductive step, P(n + 1).
Finally we need to prove that 3n2 + 3n + 1 > 2n + 1 in order to insure that the
sign of the inequality is preserved. This can easily be done by subtracting one
side from the whole thing.
3n2 + 3n + 1 > 2n + 1
3n2 + n > 0
Since n is always positive, the left side is always positive thus the inequality is
always true.
3. In the questions below give a recursive definition with initial condition(s).
a) The function f(n) = n!, n 0, 1, 2...
f(n + 1) = f(n) * n, f(0) = 1
b) The function f(n) = 5n + 2, n = 1, 2, 3...
f(n + 1) = f(n) + 5, f(1) = 7
c) The set S of all positive integer
f(n + 1) = f(n) + 5, f(1) = 5
4. Suppose that a password is any string of exactly eight characters comprising of lower case
letters (a through z), upper case letters (A through Z), and the digits (0 through 9), and a
valid password must have at least one digit. How many valid passwords can one have?
For this question, we should note that it is much easier to figure out how many
passwords violate the constraint than to directly figure out how many are valid. The passwords
that violate the constraint are all the passwords that are made of just letters, upper or lowercase.
The number of eight character passwords you can make with upper and lower case letters is 528
(8 spots with with (26+26) possibilities). Then you should all the possibilities for a password
not considering the constraint. That is 628 (8 spots each with (26+26+10) possibilities). So
simply subtract the number of passwords that don't work from the total number of passwords
that can be made. This gives you the answer:
628 - 528
Figuring out the direct answer is very difficult. This question should be done by figuring
out how many passwords don't fit the constraint and subtracting that number from the total
number of possible passwords.
5. Suppose a restaurant serves a “special dinner” consisting of soup or salad, entree, dessert,
and beverage. The restaurant has five kinds of soup, three kinds of salad, ten entrees, five
desserts, and four beverages. How many different special dinners are possible? (Two
special dinners are different if they differ in at least one selection.)
This questions gives you four options to make your dinner with. First there's the soup or
salad, then the entree, then the dessert, then the beverage. So the answer will be in the following
form:
(number of soups and salads) * (number of entrees) * (number of desserts) * (number of beverage)
It is important to note that you add the number of soups and salads to get the number for
the first option. You add because soup and salad are mutually exclusive, as in, you will never
have both at the same time. You multiply the rest because they are all equal parts of the total
dinner and changing any of them creates a new “special dinner.” So the answer is:
(5 + 3) * 10 * 5 *4
Download