Discrete Mathematics and Probability Theory Fall 2016 Seshia and Walrand HW 8

Similar documents
The next several lectures will be concerned with probability theory. We will aim to make sense of statements such as the following:

Compound Probability. Set Theory. Basic Definitions

Discrete Mathematics and Probability Theory Spring 2014 Anant Sahai Note 11

The topic for the third and final major portion of the course is Probability. We will aim to make sense of statements such as the following:

EECS 203 Spring 2016 Lecture 15 Page 1 of 6

CMath 55 PROFESSOR KENNETH A. RIBET. Final Examination May 11, :30AM 2:30PM, 100 Lewis Hall

Discrete Mathematics and Probability Theory Spring 2016 Rao and Walrand Note 13

Probability MAT230. Fall Discrete Mathematics. MAT230 (Discrete Math) Probability Fall / 37

Midterm 2 6:00-8:00pm, 16 April

Discrete Mathematics and Probability Theory Spring 2018 Ayazifar and Rao Midterm 2 Solutions

1. The chance of getting a flush in a 5-card poker hand is about 2 in 1000.

10-1. Combinations. Vocabulary. Lesson. Mental Math. able to compute the number of subsets of size r.

CS 237: Probability in Computing

The study of probability is concerned with the likelihood of events occurring. Many situations can be analyzed using a simplified model of probability

Solutions to Problem Set 6 - Fall 2008 Due Tuesday, Oct. 21 at 1:00

Discrete Structures for Computer Science

November 8, Chapter 8: Probability: The Mathematics of Chance

CS1800: More Counting. Professor Kevin Gold

I. WHAT IS PROBABILITY?

Combinatorics: The Fine Art of Counting

CS100: DISCRETE STRUCTURES. Lecture 8 Counting - CH6

Grade 8 Math Assignment: Probability

Section Introduction to Sets

Mat 344F challenge set #2 Solutions

University of Connecticut Department of Mathematics

CSC/MATA67 Tutorial, Week 12

CS 787: Advanced Algorithms Homework 1

INDEPENDENT AND DEPENDENT EVENTS UNIT 6: PROBABILITY DAY 2

6.041/6.431 Spring 2009 Quiz 1 Wednesday, March 11, 7:30-9:30 PM.

Detailed Solutions of Problems 18 and 21 on the 2017 AMC 10 A (also known as Problems 15 and 19 on the 2017 AMC 12 A)

Today s Topics. Sometimes when counting a set, we count the same item more than once

November 6, Chapter 8: Probability: The Mathematics of Chance

The probability set-up

Tail. Tail. Head. Tail. Head. Head. Tree diagrams (foundation) 2 nd throw. 1 st throw. P (tail and tail) = P (head and tail) or a tail.

Sample Spaces, Events, Probability

The Teachers Circle Mar. 20, 2012 HOW TO GAMBLE IF YOU MUST (I ll bet you $5 that if you give me $10, I ll give you $20.)

MATH 215 DISCRETE MATHEMATICS INSTRUCTOR: P. WENG

3 The multiplication rule/miscellaneous counting problems

Probability and Counting Techniques

Solutions for the Practice Final

Before giving a formal definition of probability, we explain some terms related to probability.

CS 32 Puzzles, Games & Algorithms Fall 2013

Combinatorics: The Fine Art of Counting

The probability set-up

CS1802 Week 9: Probability, Expectation, Entropy

1. Counting. 2. Tree 3. Rules of Counting 4. Sample with/without replacement where order does/doesn t matter.

Lesson 3: Chance Experiments with Equally Likely Outcomes

Week 1: Probability models and counting

Combinatorics: The Fine Art of Counting

CSC/MTH 231 Discrete Structures II Spring, Homework 5

Discrete Random Variables Day 1

1. An office building contains 27 floors and has 37 offices on each floor. How many offices are in the building?

Counting. Chapter 6. With Question/Answer Animations

3 The multiplication rule/miscellaneous counting problems

Lecture 14. What s to come? Probability. A bag contains:

8.2 Union, Intersection, and Complement of Events; Odds

Block 1 - Sets and Basic Combinatorics. Main Topics in Block 1:

9.5 Counting Subsets of a Set: Combinations. Answers for Test Yourself

Probability. March 06, J. Boulton MDM 4U1. P(A) = n(a) n(s) Introductory Probability

Counting and Probability Math 2320

CMPSCI 240: Reasoning Under Uncertainty First Midterm Exam

Math 454 Summer 2005 Due Wednesday 7/13/05 Homework #2. Counting problems:

Probability: introduction

Foundations of Computing Discrete Mathematics Solutions to exercises for week 12

Chapter 8: Probability: The Mathematics of Chance

Chapter-wise questions. Probability. 1. Two coins are tossed simultaneously. Find the probability of getting exactly one tail.

CSE 312: Foundations of Computing II Quiz Section #2: Combinations, Counting Tricks (solutions)

Important Distributions 7/17/2006

The Product Rule can be viewed as counting the number of elements in the Cartesian product of the finite sets

EE 126 Fall 2006 Midterm #1 Thursday October 6, 7 8:30pm DO NOT TURN THIS PAGE OVER UNTIL YOU ARE TOLD TO DO SO

Developed by Rashmi Kathuria. She can be reached at

CSE 312: Foundations of Computing II Quiz Section #2: Inclusion-Exclusion, Pigeonhole, Introduction to Probability

COMPOUND EVENTS. Judo Math Inc.

Extending the Sierpinski Property to all Cases in the Cups and Stones Counting Problem by Numbering the Stones

5. (1-25 M) How many ways can 4 women and 4 men be seated around a circular table so that no two women are seated next to each other.

Exercise Class XI Chapter 16 Probability Maths

CIS 2033 Lecture 6, Spring 2017

D1 Probability of One Event

Introductory Probability

CHAPTER 7 Probability

Counting and Probability

Section 6.1 #16. Question: What is the probability that a five-card poker hand contains a flush, that is, five cards of the same suit?

PROBABILITY Case of cards

CSE 312: Foundations of Computing II Quiz Section #2: Inclusion-Exclusion, Pigeonhole, Introduction to Probability (solutions)

Such a description is the basis for a probability model. Here is the basic vocabulary we use.

Class XII Chapter 13 Probability Maths. Exercise 13.1

RANDOM EXPERIMENTS AND EVENTS

Probability and Randomness. Day 1

MAT 17: Introduction to Mathematics Final Exam Review Packet. B. Use the following definitions to write the indicated set for each exercise below:

Ask a Scientist Pi Day Puzzle Party askascientistsf.com. Ask a Scientist Pi Day Puzzle Party askascientistsf.com

Name: Exam 1. September 14, 2017

Revision Topic 17: Probability Estimating probabilities: Relative frequency

CPCS 222 Discrete Structures I Counting

Reading 14 : Counting

Key Concepts. Theoretical Probability. Terminology. Lesson 11-1

7.1 Chance Surprises, 7.2 Predicting the Future in an Uncertain World, 7.4 Down for the Count

CSE 312 Midterm Exam May 7, 2014

Chapter 16. Probability. For important terms and definitions refer NCERT text book. (6) NCERT text book page 386 question no.

CS 361: Probability & Statistics

Lesson 10: Using Simulation to Estimate a Probability

Transcription:

CS 70 Discrete Mathematics and Probability Theory Fall 2016 Seshia and Walrand HW 8 1 Sundry Before you start your homewor, write down your team. Who else did you wor with on this homewor? List names and email addresses. (In case of hw party, you can also just describe the group.) How did you wor on this homewor? Woring in groups of 3-5 will earn credit for your "Sundry" grade. Please copy the following statement and sign next to it: I certify that all solutions are entirely in my words and that I have not looed at another student s solutions. I have credited all external sources in this write up. CS 70, Fall 2016, HW 8 1

2 Problems 1. Counting, Counting, and More Counting (32 points) The only way to learn counting is to practice, practice, practice, so here is your chance to do so. We encourage you to leave your answer as an expression (rather than trying to evaluate it to get a specific number). (a) How many 10-bit strings are there that contain exactly 4 ones? (b) How many different 13-card bridge hands are there? (A bridge hand is obtained by selecting 13 cards from a standard 52-card dec. The order of the cards in a bridge hand is irrelevant.) (c) How many different 13-card bridge hands are there that contain no aces? (d) How many different 13-card bridge hands are there that contain all four aces? (e) How many different 13-card bridge hands are there that contain exactly 6 spades? (f) How many 99-bit strings are there that contain more ones than zeros? (g) How many different anagrams of FLORIDA are there? (An anagram of FLORIDA is any re-ordering of the letters of FLORIDA, i.e., any string made up of the letters F, L, O, R, I, D, and A, in any order. The anagram does not have to be an English word.) (h) How many different anagrams of ALASKA are there? (i) How many different anagrams of ALABAMA are there? (j) How many different anagrams of MONTANA are there? () If we have a standard 52-card dec, how many ways are there to order these 52 cards? (l) Two identical decs of 52 cards are mixed together, yielding a stac of 104 cards. How many different ways are there to order this stac of 104 cards? (m) We have 9 balls, numbered 1 through 9, and 27 bins. How many different ways are there to distribute these 9 balls among the 27 bins? Assume the bins are distinguishable (e.g., numbered 1 through 27). (n) We throw 9 identical balls into 7 bins. How many different ways are there to distribute these 9 balls among the 7 bins such that no bin is empty? Assume the bins are distinguishable (e.g., numbered 1 through 7). (o) How many different ways are there to throw 9 identical balls into 27 bins? Assume the bins are distinguishable (e.g., numbered 1 through 27). (p) There are exactly 20 students currently enrolled in a class. How many different ways are there to pair up the 20 students, so that each student is paired with one other student? 2. Counting (2/3/5/5 points) (a) How many ways are there to arrange n 1s and 0s into a sequence? (b) How many solutions does x 0 + x 1 +... + x = n have, if all xs must be non-negative integers? CS 70, Fall 2016, HW 8 2

(c) How many solutions does x 0 + x 1 = n have, if all xs must be strictly positive integers? (d) How many solutions does x 0 + x 1 +... + x = n have, if all xs must be strictly positive integers? 3. Fermat s Neclace (2/3/5/5 points) Let p be a prime number and let be a positive integer. We have an endless supply of beads. The beads come in different colors. All beads of the same color are indistinguishable. (a) We have a piece of string. As a relaxing study brea, we want to mae a pretty garland by threading p beads onto the string. How many different ways are there construct such a sequence of p beads of different colors? (b) Now let s add a restriction. We want our garland to be exciting and multicolored. Now how many different sequences exist? (Your answer should be a simple function of and p.) (c) Now we tie the two ends of the string together, forming a circular neclace which lets us freely rotate the beads around the neclace. We ll consider two neclaces equivalent if the sequence of colors on one can be obtained by rotating the beads on the other. (For instance, if we have = 3 colors red (R), green (G), and blue (B) then the length p = 5 neclaces RGGBG, GGBGR, GBGRG, BGRGG, and GRGGB are all equivalent, because these are cyclic shifts of each other.) How many non-equivalent sequences are there now? Again, the p beads must not all have the same color. (Your answer should be a simple function of and p.) [Hint: What follows if rotating all the beads on a neclace to another position produces an identical looing neclace?] (d) Use your answer to part (c) to prove Fermat s little theorem. (Recall that Fermat s little theorem says that if p is prime and a 0 (mod p), then a p 1 1 (mod p).) 4. Maze (5/5 points) Let s assume that Tom is located at the bottom left corner of the maze below, and Jerry is located at the top right corner. Tom of course wants to get to Jerry by the shortest path possible. a) How many such shortest paths exist? b) How many shortest paths pass through the edge labelled X? c) (Optional) The edge labelled Y? Both the edges X and Y? Neither edge X nor edge Y? d) (Optional) How many shortest paths pass through the vertex labelled Z? The vertex labelled W? Both the vertices Z and W? Neither vertex Z nor vertex W? CS 70, Fall 2016, HW 8 3

5. Story Problems (5/5/5/5 points) Prove the following identities by combinatorial argument: (a) (b) ( ) n = ( ) n 1 + 1 ( ) n 1 ( ) ( ) 2n n = 2 + n 2. 2 2 (c) (Hint: Consider how many ways there are to pic groups of people ("teams") and then a representative ("team leaders").) n ( ) n = n2 n 1 =0 (d) (Hint: consider a generalization of the previous part.) ( )( ) ( ) n n = 2 n j j j n = j 6. Sample Space and Events (1/1/1/1/1/1/2/2 points) Consider the sample space Ω of all outcomes from flipping a coin 3 times. (a) List all the outcomes in Ω. How many are there? (b) Let A be the event that the first flip is a heads. List all the outcomes in A. How many are there? (c) Let B be the event that the third flip is a heads. List all the outcomes in B. How many are there? CS 70, Fall 2016, HW 8 4

(d) Let C be the event that the first and third flip are heads. List all outcomes in C. How many are there? (e) Let D be the event that the first or the third flip is heads. List all outcomes in D. How many are there? (f) Are the events A and B disjoint? Express C in terms of A and B. Express D in terms of A and B. (g) Suppose now the coin is flipped n 3 times instead of 3 flips. Compute Ω, A, B, C, D. (h) Your gambling buddy found a website online where he could buy tric coins that are heads or tails on both sides. He puts three coins into a bag: one coin that is heads on both sides, one coin that is tails on both sides, and one that is heads on one side and tails on the other side. You shae the bag, draw out a coin at random, put it on the table without looing at it, then loo at the side that is showing. Suppose you notice that the side that is showing is heads. What is the probability that the other side is heads? Show your wor. (Hint: the answer is NOT 1/2). 7. To Be Fair (10 points) Suppose you have a biased coin with P(heads) 0.5. How could you use this coin to simulate a fair coin? (Hint: Thin about pairs of tosses.) CS 70, Fall 2016, HW 8 5