Discrete Mathematics (CS503) Module I Suggested Questions Day 1, 2 1. Translate the following statement into propositional logic using the propositions provided: You can upgrade your operating system only if you have a 32-bit processor running at 1 GHz or faster, at least 1 GB RAM, and 16 GB free hard disk space, or a 64- bit processor running at 2 GHz or faster, at least 2 GB RAM, and at least 32 GB free hard disk space. Express you answer in terms of u: You can upgrade your operating system, b32: You have a 32-bit processor, b64: You have a 64-bit processor, g1: Your processor runs at 1 GHz or faster, g2: Your processor runs at 2 GHz or faster, r1: Your processor has at least 1 GB RAM, r2: Your processor has at least 2 GB RAM, h16: You have at least 16 GB free hard disk space, and h32: You have at least 32 GB free hard disk space. 2. Show that (p ( p q)) and p q are logically equivalent by developing a series of logical equivalences. 3. Determine whether each of the compound propositions (p q) (q r) (r p), (p q r) ( p q r), and (p q) (q r) (r p) (p q r) ( p q r) is satisfiable. Day 3, 4 4. Show that (p q) (r s) and (p r) (q s) are not logically equivalent. 5. Determine whether ( p (p q)) q is a tautology.
Day 5,6 6. Let Q(x, y) denote the statement x = y + 3. What are the truth values of the propositions Q(1, 2) and Q(3, 0)? 7. Consider the following program, designed to interchange the values of two variables x and y. temp := x x := y y := temp Find predicates that we can use as the precondition and the postcondition to verify the correctness of this program. Then explain how to use them to verify that for all valid input the program does what is intended. 8. Let P(x) denote the statement x > 3. What is the truth value of the quantification xp(x), where the domain consists of all real numbers? 9. Show that x(p(x) Q(x)) and xp(x) xq(x) are logically equivalent (where the same domain is used throughout). Day 7,8 10. Use rules of inference to showthat the hypotheses Randy works hard, If Randy works hard, then he is a dull boy, and If Randy is a dull boy, then he will not get the job imply the conclusion Randy will not get the job. 11. State which rule of inference is the basis of the following argument: It is below freezing now. Therefore, it is either below freezing or raining now. 12. Use rules of inference to show that if x(p(x) (Q(x) S(x))) and x(p(x) R(x)) are true, then x(r(x) S(x)) is true. Day 9, 10 13. Show that,, and form a functionally complete collection of logical operators. 14. Find the DNF of the following: (i) {p (q r)} (ii) ( p r) (p q) 15. Find the CNF of the following propositions: (i) {(p q) r (ii) (p q) (p q) II Day 1 Write the closure properties of real numbers and integers.
Which of the following numbers are divisible by 3: 10,873, 44,444, 123,456, 51,804? Which of the following numbers are divisible by 9: 41,728, 62,901, 654,321, 71,730? Day 2, 3 Express the terms of in b=a*q+r where b=-262 and a=5 Anita had to multiply two positive integers. Instead of taking 35 as one of the multipliers, she incorrectly took 53. As a result, the product went up by 540. What is the new product? Day 4 When testing to see whether a is prime, it is not necessary to check whether it has a prime factor greater than a. Why is this true? 1. Use the Euclidean algorithm to find the greatest common divisor of i. 864 and 291. ii. 378, 336, and 490. iii. 144, 156, and 162. Day 5 8. Find the greatest common divisors of the pair of numbers by finding the prime factor decompositions of the numbers. i. 70, 120. ii. 168, 504. iii. 180, 600. iv. 260, 455. Day 6 Day 7 Express the greatest common divisor of 864 and 291 as an integer linear form in 864 and 291. Compute: 414 * 463 mod 413 1 * 50 = 50 What is the value of Φ (13)? What is the value of Φ (10)? Day 8
Day 9-10 Prerequisites in college courses are a familiar partial ordering of available classes. We say that A<= B if successful completion of course A is required for the successful completion of course B. (This particular phrasing allows the relation to be reflexive). Consider the prerequisites given below for Mathematics classes and draw the diagram for the partial ordering of these classes. Class Prerequisites Math 101 None Math 201 Math 101 Math 250 Math 101 Math 251 Math 250 Math 340 Math 201 Math 341 Math 340 Math 450 Math 201, Math 250 Math 500 Math 450, Math 251 Consider the partially ordered set D = {1, 2, 3, 4, 5} which is ordered as shown: 1 5 2 3 4 Day 11-12 Draw the diagram for the inverse order on D. Suppose N = { 1, 2, 3, } is ordered by divisibility. State whether each of the following subsets o N are linearly ordered. (i) {24, 2, 6} (ii) {3, 15, 5} (iii) {2, 8, 32 4} (iv) {7} (v) {15, 5, 30} III
Day 1, 2 Day 3, 4 1. There are 32 microcomputers in a computer center. Each microcomputer has 24 ports. How many different ports to a microcomputer in the center are there? 2. Suppose that either a member of the mathematics faculty or a student who is a mathematics major is chosen as a representative to a university committee. How many different choices are there for this representative if there are 37 members of the mathematics faculty and 83 mathematics majors and no one is both a faculty member and a student? 3. How many bit strings of length eight either start with a 1 bit or end with the two bits 00? 4. How many strings of eight uppercase English letters are there a) if letters can be repeated? b) if no letter can be repeated? c) that start with X, if letters can be repeated? d) that start with X, if no letter can be repeated? e) that start and end with X, if letters can be repeated? f ) that start with the letters BO (in that order), if letters can be repeated? g) that start and end with the letters BO (in that order), if letters can be repeated? h) that start or end with the letters BO (in that order), if letters can be repeated? 5. How many permutations of the letters ABCDEFGH contain the string ABC? 6. How many poker hands of five cards can be dealt from a standard deck of 52 cards? Also, how many ways are there to select 47 cards from a standard deck of 52 cards? 7. A group of 30 people have been trained as astronauts to go on the first mission to Mars. How many ways are there to select a crew of six people to go on this mission (assuming that all crew members have the same job)?
Day 5 8. What is the coefficient of x8y9 in the expansion of (3x + 2y)17? 9. What is the coefficient of x101y99 in the expansion of (2x 3y)200? 10. Give a formula for the coefficient of xk in the expansion of (x + 1/x)100, where k is an integer. 11. Give a formula for the coefficient of xk in the expansion of (x2 1/x)100, where k is an integer. 12. What is the minimum number of students required in a discrete mathematics class to be sure that at least six will receive the same grade, if there are five possible grades, A, B, C, D, and F? 13. What is the least number of area codes needed to guarantee that the 25 million phones in a state can be assigned distinct 10-digit telephone numbers? (Assume that telephone numbers are of the form NXX-NXX-XXXX, where the first three digits form the area code, N represents a digit from 2 to 9 inclusive, and X represents any digit.) 14. During a month with 30 days, a baseball team plays at least one game a day, but no more than 45 games. Show that there must be a period of some number of consecutive days during which the team must play exactly 14 games. Day 6 15. Suppose that there are 1807 freshmen at your school. Of these, 453 are taking a course in computer science, 567 are taking a course in mathematics, and 299 are taking courses in both computer science and mathematics. Howmany are not taking a course either in omputer science or in mathematics? 16. A total of 1232 students have taken a course in Spanish, 879 have taken a course in French, and 114 have taken a course in Russian. Further, 103 have taken courses in both Spanish and French, 23 have taken courses in both Spanish and Russian, and 14 have taken courses in both French and Russian. If 2092 students have taken at least one of Spanish, French, and Russian, how many students have taken a course in all three languages? 17. How many permutations of the 26 letters of the English alphabet do not contain any of the strings fish, rat or bird?
Day 7,8 18. Suppose that there are two goats on an island initially. The number of goats on the island doubles every year by natural reproduction, and some goats are either added or removed each year. a) Construct a recurrence relation for the number of goats on the island at the start of the nth year, assuming that during each year an extra 100 goats are put on the island. b) Solve the recurrence relation from part (a) to find the number of goats on the island at the start of the nth year. c) Construct a recurrence relation for the number of goats on the island at the start of the nth year, assuming that n goats are removed during the nth year for each n 3. d) Solve the recurrence relation in part (c) for the number of goats on the island at the start of the nth year. Day 9, 10 19. Find all solutions of the recurrence relation a n = 5a n 1 6a n 2 + 7 n. 20. What is the solution of the recurrence relation a n = a n 1 + 2a n 2 with a 0 = 2 and a 1 = 7? IV 1. Find the chromatic number of the following graph G:
2. Find the chromatic and clique number of the following graph: 3. Find all cliques and clique numbers for the following graph: 4. Show that a cycle with n vertices is not perfect if n is odd and greater than 3. 5. Show that a cycle with n vertices is a perfect graph if n is even. 6. Show that every bi-partite graph is perfect. 7. Find the chromatic number of a cycle with 107 edges. 8. Find whether the polynomial x 3 + 5x 2-3x + 5 is the chromatic polynomial. 9. A tree can be colored with at most 3 colors in 768 ways. Find the number of vertices of the tree. 10. Find the maximal matching, maximum matching and matching numbers of each of the following 2 graphs. Find if there exists a perfect matching in the graph.