NAME (1 pt): TA (1 pt): Name of Neighbor to your left (1 pt): Name of Neighbor to your right (1 pt):

Similar documents
MTH 310, Section 001 Abstract Algebra I and Number Theory. Sample Midterm 1

Discrete Mathematics and Probability Theory Fall 2017 Ramchandran and Rao Midterm 2 Solutions

MAT 243 Test 2 SOLUTIONS, FORM A

1 Sequences of events and their limits

Lecture 6: The Pigeonhole Principle and Probability Spaces

Carleton University. Final Examination Fall DURATION: 2 HOURS No. of students: 223

1. Consider the conditional E = p q r. Use de Morgan s laws to write simplified versions of the following : The negation of E : 5 points

Counting. Math 301. November 24, Dr. Nahid Sultana

Page Max. Possible Points Total 100

Carleton University. Final Examination Winter DURATION: 2 HOURS No. of students: 152

Algorithms: Background

Georgia Tech High School Math Competition

Final Exam Review. 2. Let A = {, { }}. What is the cardinality of A? Is

MATH FINAL EXAM REVIEW HINTS

MATH 201 Solutions: TEST 3-A (in class)

Midterm 2. Your Exam Room: Name of Person Sitting on Your Left: Name of Person Sitting on Your Right: Name of Person Sitting in Front of You:

MATH 3510: PROBABILITY AND STATS July 1, 2011 FINAL EXAM

Assignment #2 COMP 3200 Spring 2012 Prof. Stucki

MCS 256 Discrete Calculus and Probability Exam 5: Final Examination 22 May 2007

Lecture 4: Probability, Proof Techniques, Method of Induction Lecturer: Lale Özkahya

MATH 220 (all sections) Homework #12 not to be turned in posted Friday, November 24, 2017

The PRIMES 2014 problem set

*EXAM 1 Answer key* EECS 203 Spring 2016

PROBABILITY. Contents Preface 1 1. Introduction 2 2. Combinatorial analysis 5 3. Stirling s formula 8. Preface

Lecture 20 : Markov Chains

Countability Sets of Measure Zero Random Reals Normal Numbers There s a Bear in There. The Real Thing. Paul McCann. Wednesday, 3 August, 2011

Chapter 1 : The language of mathematics.

1. Is the set {f a,b (x) = ax + b a Q and b Q} of all linear functions with rational coefficients countable or uncountable?

MATH 13 SAMPLE FINAL EXAM SOLUTIONS

Notation Index. gcd(a, b) (greatest common divisor) NT-16

Discrete Mathematics 2007: Lecture 5 Infinite sets

Carleton University. Final Examination Winter DURATION: 2 HOURS No. of students: 275

PRIMES Math Problem Set

Monty Hall Puzzle. Draw a tree diagram of possible choices (a possibility tree ) One for each strategy switch or no-switch

Introduction to Probability. Ariel Yadin. Lecture 1. We begin with an example [this is known as Bertrand s paradox]. *** Nov.

HW2 Solutions, for MATH441, STAT461, STAT561, due September 9th

MATH 3300 Test 1. Name: Student Id:

Johns Hopkins Math Tournament 2018 Proof Round: Sequences

Statistical Inference

University of California, Berkeley, Statistics 134: Concepts of Probability. Michael Lugo, Spring Exam 1

Lecture Notes. Here are some handy facts about the probability of various combinations of sets:

Basic Combinatorics. Math 40210, Section 01 Fall Homework 8 Solutions

Name: Exam 2 Solutions. March 13, 2017

Stat 609: Mathematical Statistics I (Fall Semester, 2016) Introduction

Introduction to Decision Sciences Lecture 11

NORTHWESTERN UNIVERSITY Tuesday, Oct 6th, 2015 ANSWERS FALL 2015 NU PUTNAM SELECTION TEST

Counting Methods. CSE 191, Class Note 05: Counting Methods Computer Sci & Eng Dept SUNY Buffalo

Math 564 Homework 1. Solutions.

Notes. Combinatorics. Combinatorics II. Notes. Notes. Slides by Christopher M. Bourke Instructor: Berthe Y. Choueiry. Spring 2006

STAT:5100 (22S:193) Statistical Inference I

1 The Basic Counting Principles

Carleton University. Final Examination Fall DURATION: 2 HOURS No. of students: 275

MATH 19B FINAL EXAM PROBABILITY REVIEW PROBLEMS SPRING, 2010

PROBABILITY VITTORIA SILVESTRI

Definition: Let S and T be sets. A binary relation on SxT is any subset of SxT. A binary relation on S is any subset of SxS.

3. A square has 4 sides, so S = 4. A pentagon has 5 vertices, so P = 5. Hence, S + P = 9. = = 5 3.

Discrete Math Notes. Contents. William Farmer. April 8, Overview 3

Exam 1 Solutions. Problem Points Score Total 145

MATH STUDENT BOOK. 12th Grade Unit 9

MA 301 Test 4, Spring 2007

2. Polynomials. 19 points. 3/3/3/3/3/4 Clearly indicate your correctly formatted answer: this is what is to be graded. No need to justify!

UCSD CSE 21, Spring 2014 [Section B00] Mathematics for Algorithm and System Analysis

Math 180B Problem Set 3

CMSC Discrete Mathematics SOLUTIONS TO FIRST MIDTERM EXAM October 18, 2005 posted Nov 2, 2005

Carleton University. Final Examination Fall DURATION: 2 HOURS No. of students: 195

Questionnaire for CSET Mathematics subset 1

2007 Marywood Mathematics Contest

CS 246 Review of Proof Techniques and Probability 01/14/19

Math 3012 Applied Combinatorics Lecture 5

Recitation 6. Randomization. 6.1 Announcements. RandomLab has been released, and is due Monday, October 2. It s worth 100 points.

Executive Assessment. Executive Assessment Math Review. Section 1.0, Arithmetic, includes the following topics:

Math.3336: Discrete Mathematics. Cardinality of Sets

Selected problems from past exams and a few additional problems

This exam is closed book and closed notes. (You will have access to a copy of the Table of Common Distributions given in the back of the text.

Honors Algebra 2 Final Exam 2002

F 99 Final Quiz Solutions

Introduction to Probability

What is The Continued Fraction Factoring Method

NAME (1 pt): SID (1 pt): TA (1 pt): Name of Neighbor to your left (1 pt): Name of Neighbor to your right (1 pt):

A is a subset of (contained in) B A B iff x A = x B Socrates is a man. All men are mortal. A = B iff A B and B A. A B means A is a proper subset of B

Sets. Subsets. for any set A, A and A A vacuously true: if x then x A transitivity: A B, B C = A C N Z Q R C. C-N Math Massey, 72 / 125

COS 341: Discrete Mathematics

Problem # Number of points 1 /20 2 /20 3 /20 4 /20 5 /20 6 /20 7 /20 8 /20 Total /150

Discrete Random Variables. Discrete Random Variables

MATH CSE20 Homework 5 Due Monday November 4

Probability: Terminology and Examples Class 2, Jeremy Orloff and Jonathan Bloom

CS1800 Discrete Structures Final Version A

CS1800 Discrete Structures Fall 2016 Profs. Aslam, Gold, Ossowski, Pavlu, & Sprague 27 October, CS1800 Discrete Structures Midterm Version A

Math 430 Exam 1, Fall 2006

Discrete Structures, Final Exam

Composition of Axial Functions of Product of Finite Sets

Math 16 - Practice Final

NANYANG TECHNOLOGICAL UNIVERSITY SEMESTER I EXAMINATION MH4702/MAS446/MTH437 Probabilistic Methods in OR

Math 16A Second Midterm 6 Nov NAME (1 pt): Name of Neighbor to your left (1 pt): Name of Neighbor to your right (1 pt):

Solutions to Practice Final

Probability, For the Enthusiastic Beginner (Exercises, Version 1, September 2016) David Morin,

Lecture Notes 7 Random Processes. Markov Processes Markov Chains. Random Processes

The probability of an event is viewed as a numerical measure of the chance that the event will occur.

Problems from Probability and Statistical Inference (9th ed.) by Hogg, Tanis and Zimmerman.

Math Fall Final Exam. Friday, 14 December Show all work for full credit. The problems are worth 6 points each.

Transcription:

Math 55 Final Exam May 2004 NAME ( pt): TA ( pt): Name of Neighbor to your left ( pt): Name of Neighbor to your right ( pt): Instructions: This is a closed book, closed notes, closed calculator, closed computer, closed network, open brain exam. You get one point each for filling in the 4 lines at the top of this page. All other questions are worth 0 points. Write all your answers on this exam. If you need scratch paper, ask for it, write your name on each sheet, and attach it when you turn it in (we have a stapler). For full credit justify your answers. 2 3 4 5 Total

Question. (0 points) Question a. (5 points) If 6 people are sitting in a row of 80 chairs, prove that there are at least 4 consecutive occupied chairs. Let the pigeons be the 6 people, and the holes be the 20 disjoint sets of 4 consecutive chairs -4, 5-8, 9-2,..., 77-80. By the Generalized Pigeonhole Principle some hole must get at least 6/20 4pigeons. Question b. (5 points) Label each of the following sets as finite, countably infinite, or uncountable. Justify your answers (you may cite theorems proven in class).. Set of all correct computer programs in Java. 2. Set of all computer programs in Java that have ever been written. 3. Set of rational numbers between and 2. 4. Set of functions with domain {0,, 2} and codomain N {, 2, 3,...}. 5. Set of functions with domain N and codomain {0,, 2}.. Countably infinite, because it is an infinite subset of the countable set consisting of all finite strings of characters on the keyboard. 2. Finite, because each of finitely many Java programmers (or Java generating programs) can only have written a finite amount of code in the finite amount of time they have existed, working at a finite speed. 3. Countably infinite. The set of all pairs of integers is countably infinite because it is the Cartesian product of two countably infinite sets, by a result in class. Then, the rationals between and 2 are in a one-to-one correspondence with an infinite subset of all pairs (i, j) of integers, namely those where j 0, gcd(i, j),andj i 2j. Finally, an infinite subset of a countable set is countably infinite by a result shown in class. 4. Countably infinite, because the set of functions is in one-to-one correspondence with N N N. 5. Uncountable, because we showed in class that the set of all sequences of 0s and s is uncountable by a diagonalization argument, and the set of all sequences of 0s, s and 2s is only larger. 2

Question. (0 points) Question a. (5 points) If 8 cars are parked in a row of 00 parking places, prove that there are at least 5 consecutive occupied parking places. Let the pigeons be the 8 cars, and the holes be the 20 disjoint sets of 5 consecutive parking places -5, 6-0, -5,..., 96-00. By the Generalized Pigeonhole Principle some hole must get at least 8/20 5pigeons. Question b. (5 points) Label each of the following sets as uncountable, countably infinite, or finite. Justify your answers (you may cite theorems proven in class).. Set of rational numbers between.5 and. 2. Set of all correct computer programs in C. 3. Set of functions with domain {, 0, +} and codomain Z {..., 3, 2,, 0,, 2, 3,...}. 4. Set of functions with domain Z and codomain {, 0, +}. 5. Set of all computer programs in C that have ever been written.. Countably infinite. The set of pairs of integers is countably infinite, because it is the Cartesian product of two countably infinite sets, by a result in class. Then, the rationals between.5 and are in a one-to-one correspondence with an infinite subset of all pairs (i, j) of integers, namely those where j 0, gcd(i, j),andj/2 i j. Finally, an infinite subset of a countable set is countably infinite by a result shown in class. 2. Countably infinite, because it is an infinite subset of the countable set consisting of all finite strings of characters on the keyboard. 3. Countably infinite, because the set of functions is in one-to-one correspondence with Z Z Z, and the Cartesian product of 3 countably infinite sets is countably infinite. 4. Uncountable, because we showed in class that the set of all sequences of 0s and s is uncountable by a diagonalization argument, and the set of all sequences of s, 0s and s is only larger. 5. Finite, because each of finitely many C programmers (or C generating programs) can only have written a finite amount of code in the finite amount of time they have existed, working at a finite speed. 3

Question 2 (0 points) Question 2a (5 points) Prove algebraically that C(n, r) C(n r, k) C(n, k) C(n k, r). C(n, r) C(n r, k) n! r!(n r)! (n r)! k!(n r k)! n! r! k!(n r k)! n! k! r!(n r k)! n! k!(n k)! (n k)! r!(n r k)! C(n, k) C(n k, r) Question 2b. (5 points) Prove the same identity using a counting argument. We count the number of ways to choose a subset of r elements and a disjoint subset of k elements from a set of n elements. () First choose r elements (there are C(n, r) ways) and then choose k elements from the remaining n r elements (there are C(n r, k) ways). Since each pair of choices leads to a different pair of subsets, the product is the number of ways, namely C(n, r) C(n r, k). (2) First choose k elements and then r elements from the remaining n k. The same argument yields the expression C(n, k) C(n k, r). 4

Question 2 (0 points) Question 2a (5 points) Prove algebraically that C(m, s) C(m s, j) C(m, j) C(m j, s). C(m, s) C(m s, j) m! s!(m s)! (m s)! j!(m s j)! m! s! j!(m s j)! m! j! s!(m s j)! m! j!(m j)! (m j)! s!(m s j)! C(m, j) C(m j, s) Question 2b. (5 points) Prove the same identity using a counting argument. We count the number of ways to choose a subset of s elements and a disjoint subset of j elements from a set of m elements. () First choose s elements (there are C(m, s) ways) and then choose j elements from the remaining m s elements (there are C(m s, j) ways). Since each pair of choices leads to a different pair of subsets, the product is the number of ways, namely C(m, s) C(m s, j). (2) First choose j elements and then s elements from the remaining m j. The same argument yields the expression C(m, j) C(m j, s). 5

Question 3. (0 points) Question 3a. (5 points) For what integer values of n does 4s + 264t n have integer solutions s and t? Either by using the Euclidean algorithm or prime factorization, gcd(4, 264) 3. Then we know by the extended Euclidean algorithm that there are integers s and t such that 4s + 264t 3,namelys 5and t 8. Soifn is any multiple of 3 then a solution s s n/3 and t t n/3 exists, and since 3 4 and 3 264, we get 3 n, so a solution exists only if 3 n as well. Question 3b (5 points) Find the set of all solutions to 4x 33 mod 264. The extended Euclidean Algorithm shows that 35 4 8 264 or 33 3 5 4 8 264 65 4 88 264, sox 65 is one solution. Two different solutions x and x satisfy 4(x x) 0 mod 264, or264 4(x x) or 88 47(x x) or 88 (x x) since 88 and 47 are relatively prime or x x + m 88 65 + m 88 for any m or x 65 mod 88 77 mod 88 is the general solution. 6

Question 3. (0 points) Question 3a. (5 points) For what integer values of r does 26n + 47m r have integer solutions n and m? Either by using the Euclidean algorithm or prime factorization, gcd(26, 47) 3. Then we know by the extended Euclidean algorithm that there are integers n and m such that 26n + 47m 3,namelyn 9 and m 6. So if r is any multiple of 3 then a solution n n r/3 and m m r/3 exists, and since 3 26 and 3 47, we get 3 r, soasolution exists only if 3 r as well. Question 3b (5 points) Find the set of all solutions to 26y 42 mod 47. The extended Euclidean Algorithm shows that 3 9 26 + 6 47 or 42 4 34 ( 9) 26 + 4 6 47 26 26 + 224 47, soy 26 is one solution. Two different solutions y and y satisfy 26(y y) 0 mod 47, or47 26(y y) or 49 87(y y) or 49 (y y) since 49 and 87 are relatively prime or y y +m 49 26+m 49 for any m or y 26 mod 49 2 mod 49 is the general solution. 7

Question 4. (0 points) Rosencrantz has an unfair coin that comes up heads 2/3 of the time and tails /3 of the time. He plays the following game: first he flips the coin repeatedly until it has come up tails a total of twice. If the first two tails are consecutive, then he scores zero points. If they are non-consecutive, then he scores a number of points equal to the number of flips up to and including the first tail. Let f be the random variable which is the number of points he scores. Question 4a. (5 points) Find the generating function G(x) for the random variable f. Note that P (f 0) 3, since the chance of getting another tail right after the first tail (or at any flip, for that matter) is 3. For k>0, P (f k) (2 3 )k 3 2 3,since winning k points means that Rosencrantz gets k heads in a row, then one tail, then one head again (further flips do not affect the outcome). Thus G(x) 3 + k0 k x k ( 2 3 )k 3 2 3 3 (2x 3 )k 3 2x 3 3 2x Rosencrantz and Guildenstern were minor characters in Shakespeare s Hamlet. For their connection to coin tossing, see the first scene of Stoppard s play Rosencrantz and Guildenstern Are Dead. Question 4b. (5 points) Compute E(f) andv (f). G (x) 2 (3 2x) 2 so E(f) G () 2. G (x) 8 (3 2x) 3 so V (f) G () + G () (G ()) 2 8+2 2 2 6. 8

Question 4. (0 points) Guildenstern has an unfair coin that comes up heads /4 of the time and tails 3/4 of the time. He plays the following game: first he flips the coin repeatedly until it has come up heads a total of twice. If the first two heads are consecutive, then he scores zero points. If they are non-consecutive, then he scores a number of points equal to the number of flips up to and including the first head. Let f be the random variable which is the number of points he scores. Question 4a. (5 points) Find the generating function G(x) for the random variable f. Note that P (f 0) 4, since the chance of getting another head right after the first head (or at any flip, for that matter) is 4.Fork>0, P (f k) (3 4 )k 4 3 4,since winning k points means that Guildenstern gets k tails in a row, then one head, then one tail again (further flips do not affect the outcome). Thus G(x) 4 + k0 k x k ( 3 4 )k 4 3 4 4 (3x 4 )k 4 3x 4 4 3x Rosencrantz and Guildenstern were minor characters in Shakespeare s Hamlet. For their connection to coin tossing, see the first scene of Stoppard s play Rosencrantz and Guildenstern Are Dead. Question 4b. (5 points) Compute E(f) andv (f). G (x) 3 (4 3x) 2 so E(f) G () 3. G (x) 8 (4 3x) 3 so V (f) G () + G () (G ()) 2 8+3 3 2 2. 9

Question 5 (0 points) Sort the following functions into increasing order using O( ) notation. For example, one possible answer is f O(f 2 ), f 2 O(f 3 ),... Justify your answers. f (n) n j j 4 f 2 (n) n! Hint: Stirling s formula says n! 2πn n+/2 e n. f 3 (n) log(log(n nn )) f 4 (n) 6 2n /2 6n f 5 (n) n j 4 j Some simplifications and approximations: f (n) n 5 /5+O(n 4 ) f 2 (n) 2π n e n n n by Stirling s formula f 3 (n) log(n n log n) n log n +loglogn log f 4 (n) 2 n log 6 6 n log 2 as n so f 4 (n) 0. f 5 (n) (4 n+ )/3 Thus f 4 (n) O(f 3 (n)) since f (n) 0 and f 3 (n). Then f 3 (n) O(f (n)) since f (n) grows like n 5 and f 3 (n) grows like n log n. Then f (n) O(f 5 (n)) since f 5 (n) grows exponentially (like 4 n )andf (n) just grows like a polynomial (n 5 ). Then f 5 (n) O(f 2 (n)) since log f 5 (n) O(n) and log f 2 (n) (n+/2) log n n+log 2π grows like n log n. 0

Question 5 (0 points) Sort the following functions into increasing order using O( ) notation. For example, one possible answer is g 5 O(g ), g O(g 3 ),... Justify your answers. g (m) m! Hint: Stirling s formula says m! 2πm m+/2 e m. g 2 (m) 7 3m /3 7m g 3 (m) log(log(m m2m )) g 4 (m) m k k 5 g 5 (m) m k 7 k Some simplifications and approximations: g (m) 2π m e m m m by Stirling s formula log g 2 (m) 3 m log 7 7 m log 3 as m so g 2 (m) 0. g 3 (m) log(m 2m log m) 2m log m +loglogm g 4 (m) m 6 /6+O(m 5 ) g 5 (m) (7 m+ )/6 Thus g 2 (m) O(g 3 (m)) since g 2 (m) 0 and g 3 (m). Then g 3 (m) O(g 4 (m)) since g 4 (m) grows like m 6 and g 3 (m) grows like m log m. Then g 4 (m) O(g 5 (m)) since g 5 (m) grows exponentially (like 7 m )andg 4 (m) just grows like a polynomial (m 6 ). Then g 5 (m) O(g (m)) since log g 5 (m) O(m) and log g (m) (m +/2) log m m + log 2π grows like m log m.