Download American Meteorological Society (Jack Gittinger)

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Fundamental theorem of algebra wikipedia , lookup

Algebraic number field wikipedia , lookup

Factorial wikipedia , lookup

Transcript
CMSC 180 Discrete Mathematics
Study Guide for the Final Exam
1. Review all homework assignments, quizzes, and problems solved in class
2. Download the exam from 2005 and its solution, and practice (note, that it does not
contain problems on relations, however the 2006 exam will contain relations).
3. Check the solutions of the homework assignments and quizzes from previous
years (the links to previous 180 classes are on my web page)
4. Below are some additional problems – to study and solve. (Some of them you
already know from the handouts, homework assignments, and quizzes.)
Problems on logic
1. Consider the expression:
 n (integer(n)  even_square(n)  even(n))
Which of the following sentences are equivalent to the above expression:
a.
b.
c.
d.
e.
All integers have even squares and are even.
Given any integer whose square is even, that integer is itself even.
For all integers, there are some whose square is even.
Any integer with an even square is even.
All even integers have even squares.
2. Answer the following questions with True or False:
(a) (p  q)  (~q  ~p)
(b) (p  q)  (~p V q)
3. Use logical equivalences to show that Modus ponens is a tautology, i.e. that
(p  (p  q))  q  T
4. Construct a logical argument using rules of inference to show that the
following sentences imply the conclusion “It rained:"
(1) If it does not rain or if it is not foggy, then the sailing race will be
held and the life-saving demonstration will go on.
(2) If the sailing race is held, then the trophy will be awarded.
(3) The trophy was not awarded.
Justify each step by indicating the rule you applied.
Problems on Functions
1
1. Give an example of a function that is one-to-one but not onto
2. Give an example of a function that is onto but not one-to-one.
3. Give an example of a function that is neither one-to-one nor onto
4. Give an example of a function that is both one-to-one and onto
5. How many functions are there from A = {1,2} to B = {a, b}? Write them as sets
of ordered pairs. Which are one-to-one? Which are onto?
6. Let X = {1, 2, 3, 4}, Y = {a, b, c, d}. For each of the following subsets of X x Y
determine whether it is a function or not. If it is a function, determine whether it is
one-to-one, onto, or both. If it is a bijection, determine its inverse function as a set
of ordered pairs.
A1 = {(1,a), (2,a), (3,c), (4, b)}
A2 = {(1, c), (2, a), (3, b), (4, c), (2, d)}
A3 = {(1, c), (2, d), (3, a), (4, b)}
A4 = {(1, d), (2, d), (4, a)}
A5 = {(1, b), (2, b), (3, b), (4, b)}
7. Do the following sets define functions? If so, give their domain and range:
F1 = {(1, (2,3)), (2, (3,4)), (3, (1,4)), (4, (2,4))}
F2 = {((1,2), 3), ((2,3), 4), ((3,3), 2)}
F3 = {(1, (2,3)), (2, (3,4)), (1, (2,4))}
F4 = {(1, (2,3)), (2, (2,3)), (3, (2,3))}
8. True or false?
The function y = x2 is:
a. one-to-one on the set of integers.
b. onto on the set of integers.
c. one-to-one on the set of positive integers.
9. Let N be the set of all non-negative integers. Determine which of the following
functions are one-to-one, which are onto, and which are one-to-one and onto:
a. f: N N
f(n) = n2 + 2
b. f: N N
f(n) = n(mod 3)
c. f: N N
f(n) = 1 if n is odd, 0 if n is even
d. f: N {0, 1} f(n) = 1 if n is odd, 0 if n is even
10. Let X and Y be finite sets. Find a necessary condition for the existence of one-toone mappings from X to Y. Show that if the condition is not present, there are no
one-to-one mappings from X to Y.
11. Let A be a finite set. Show that any function from A to A that is one-to-one must
also be onto and conversely.
2
12. Show that there exists a one-to-one function from A x B to B x A. Is it also onto?
13. Let g = {(1, a), (2, c), (3, a)} be a function from X = {1, 2, 3} to Y = {a, b, c, d},
and f = {(a, x), (b, x), (c, z), (d, w)} be a function from Y to Z = {w, x, y, z}.
Write g  f as a set of ordered pairs.
14. Let f and g be functions from N to N defined by the equations:
f(n) = 2n + 1, g(n) = 3n -1
Find the compositions f  f , g  g, g  f , and f  g
Hint: f  g = g(f(x))
Problems on proof techniques
Choose and apply a method of proof or disproof (direct proof, proof by contraposition, proof by
contradiction, disprove by counterexample, proof by mathematical induction) to prove or
disprove the following statements:
1. For all integers n, n2 is even if and only if n is even. Note: if and only if means: a) if n2
is even then n is even, b) if n is even then n2 is even
2. For all integers k, k3 is odd if and only if k is odd
3. 2 + 4 + 6 + …. + 2n = n(n+1) , for all n ≥1
4. 12 + 32 + 52 + …. + (2n-1) 2 = n(2n+1)(2n-1)/3, n ≥1
5. 1 + a + a2 + a3 + …. + a(n-1) = (an – 1)/(a-1), n ≥1, a  1
6. For all integers n, if n is even then (n-1)(n+1) is odd
7. For all integers n, if (n+1)(n-1) is odd then n is even
8. Consider the sequence a1, a2, …, an …. defined recursively:
a1 = a, an+1 = an + d, n ≥1, d  0
Prove that an = a1 + (n-1)d
9. The square of any integer can be written in one of the following forms: 4k or 4k+1
10. Let n be an odd integer. Then n3 + 2n2 is also odd.
11. 2 + 6 + 18 + …. + 2*3(n-1) = 3n – 1, n ≥1
12. 1*2 + 2*3 + 3*4 + …. + n(n+1) = n(n+1)(n+2)/3
13. 32n + 7 is divisible by 8, n ≥0
14. (1 – ½)(1 – 1/3)…..(1 – 1/(n+1)) = 1/(n+1) for every positive integer n
15. 7n – 2n is divisible by 5 for all n ≥1
16. Let a, b and c be integers. Prove that if a does not divide bc, then a does not
divide c
3
Proof Problems on Sets
Prove
1. (A  B) – B = A – B
2. (A – B)  B = A  B
3. A – (A – B ) = A  B
4. A – B = A  ~B
5. A  (~A  B) = A  B
6. (A – B)  (B – A) = (A  B) – (A  B)
7. A – (A  B) = A ~B
8. (A  B )  (A  ~B ) = A
9. (A – B)  (B – A) = 
10. A  B iff ~B  ~A
Problems on sequences and recursion
1. Every day, starting on day 0, one vampire arrives in Iowa from Transylvania and,
starting on the day after its arrival, bites one Iowan every day. People bitten
become vampires themselves and live forever. New vampires also bite one person
each day starting the next day after they were bitten. Let Vn be the number of
vampires in Iowa on day n. So, for example, V0 = 1, V1 = 3 (one that arrived from
Transylvania on day 0, one that he bit on day 1, and another one that arrived from
Transylvania on day 1), V2 = 7 and so on.
Write a recurrence relation for Vn that is valid for any n  2.
Problems on Relations
1. Given S = {1,2,3,…,10} and the relation R = {(x,y)| x + y = 10} on S, what are the
properties of R?
2. How many different binary relations are there from a set A of size n to a set B of size
m?
3. Consider the relation R on 6 letter words, defined by
R = {(w1,w2) | w1 is the reverse of w2}
For example, (aad,daa) R, (abc, cabg) R
Is R an equivalence relation? Explain your answer.
4
4. Consider the relation R on 6 letter words, defined by
R = {(w1,w2) | each letter in w1 appears exactly once in w2}
For example, (baad,abda) R, (abc, cabg) R
Is R an equivalence relation? Explain your answer.
5. Determine whether the following relations R on the set of all people are relations of
equivalence, partial order, or none. Explain your answer
(a, b)  R if and only if
 a is taller than b
 a and b were born on the same day
 a has the same first name as b
 a and b have a common grandparent.
Problems on counting
1. How many permutations of the letters a,b,c,d,e,f,g,h are there?
Solution:8!
2. How many permutations of the letters a,b,c,d,e,f,g,h are there that don't contain
the sequence “bad” ?
3. How many permutations of the letters a,b,c,d,e,f,g,h are there that contain none of
the sequences “bad” and “fech”
4. How many words of length 10 can be constructed using the letters a,b,c,d,e,f,g,h
that contain exactly 3 a's? (They don't have to have any English meaning.)
5. Consider 6 letter words (not necessarily meaningful) over an alphabet of 26 letters
.
(a) How many different 6 letter words are there?
(b) How many different 6 letter words are there with at least one repeated letter?
6. A deck of 10 cards, each bearing a distinct number from 1 to 10, is shuffled to
mix the cards thoroughly, so that each order is equally likely. What is the
probability that the top three cards are in sorted (increasing) order?
Hint: The probability of an event is equal to the desired outcomes divided by all possible
outcomes.
5
7. 100 people walk into an airplane, each with a preassigned seat. The first person to
walk in, rather than sitting in their own assigned seat, chooses one of the 100 seats
uniformly at random and sits there. The remaining passengers walk onto the
airplane one by one, and each person who walks in goes to their assigned seat. If
nobody is sitting there, the passenger sits down. Otherwise, the passenger picks an
empty seat uniformly at random and sits there. What is the probability that the last
person will sit in his/her assigned seat?
8. How many even numbers in 100-999 have no repeated digits?
9. In the town of Palukaville there are three elected positions: mayor, sheriff, and
dog-catcher, to be chosen from among the 70 people in town. Each person can be
elected to at most one of these positions
a. How many ways are there of filling all three of these positions? That is,
how many different election outcomes are possible (assuming no ties)?
b. During the election four years ago there were only 65 people in town and
someone forgot to prohibit the same person from being elected to more
than one position. How many outcomes were possible then?
c. After a recent scandal involving a terrier, it was decided that for the next
election Ralph, one of the townspeople in Palukaville, will no longer
eligible to be chosen as dog-catcher. In how many ways can the three
positions be chosen next time?
6