CSCI 2405
Discrete Mathematics II
Fall 2017
Homework Assignment 3

Due: Monday, October 2, at the beginning of class.

Show your work for each problem. Don't guess. You should be able to convince a skeptical person that your answer is correct. Answers are in blue.

  1. An urn contains 10 balls, numbered from 1 to 10.

    1. If you select one ball at random from the urn, what is the probability that the ball is ball 3?

      1/10
    2. If you select two balls at random, without replacing the first one after the first selection, what is the probability that one of the balls is a 3?

      There are 90 pairs (x, y) of balls and there are 18 pairs where one of the balls is ball 3. (Pair (3,3) is not allowed.) So the probability of getting a 3 is 18/90 = 1/5.
    3. If you select two balls at random, replacing the first one back into the urn after the first selection, what is the probability that at least one of the balls is a 3?

      There are 100 pairs of balls (x, y). There are 19 pairs that contain a 3. (Pair (3,3) is only counted once.) So the probability of getting ball 3 is 19/100.
    4. If you select two balls at random, replacing the first one back into the urn after the first selection, what is the probability that the two balls have the same number?

      After selecting the first ball, there is a 1/10 chance that the second choice matches the first. So the answer is 1/10.
    5. Suppose that three balls are chosen at random without replacement. What is the conditional probability that the third ball is ball 4, given that the first two balls are 1 and 5, in that order?

      The third ball is chosen out of 8 balls, one of which is ball 4. So the probability of getting ball 4 is 1/8.
    6. Suppose that three balls are chosen at random with replacement. What is the conditional probability that at least two of the three balls have the same number, given that the first two balls are 1 and 5, in that order?

      Two of the balls will be the same provided the third ball is ball 1 or ball 5. There is a 2/10 = 1/5 chance of that happening.

    7. Suppose that three balls are chosen at random with replacement. What is the conditional probability that all three balls have the same number, given that the first two balls have the same number?

      The third ball would need to have the same number as the first two balls. The probability of that is 1/10.
  2. A deck of cards consists of 52 cards. There are 13 different card ranks: ace, 2, 3, 4, 5, 6, 7, 8, 9, 10, jack, queen and king. There are 4 cards of each rank in the deck, one of each suit: spaces, clubs, hearts and diamonds.

    A poker hand consists of 5 cards drawn from a deck of cards.

    1. How many different poker hands are there?

      (52 choose 5)
    2. If a hand is chosen at random (all hands equally likely) what is the probability that the hand contains an ace?

      There are (48 choose 5) poker hands that do not contain an ace. So the probability of choosing a hand that does not contain an ace is (48 choose 5)/(52 choose 5).
        (48 choose 5)/(52 choose 5)
          = (48×47×46×45×44)/(52×51×50×49×48)
          = (47×46×45×44)/(52×51×50×49)
          = 4280760/6497400
          ≈  0.659.
      
      The probability of a hand containing an ace is about 1 − 0.659 = 0.341.
    3. A flush is a hand where all of the cards have the same suit. What is the probability that a randomly chosen hand is a flush?

      For each suit, there are (13 choose 5) poker hands that contain only cards of that suit. There are 4 suits, so the number of poker hands that are flushes is 4(13 choose 5). The probability of getting a flush is 4(13 choose 5)/(52 choose 5).
        4(13 choose 5)/(52 choose 5)
           = (4×13×12×11×10×9×5×4×3×2)/(5×4×3×2×52×51×50×49×48)
           = (4×13×12×11×10×9)/(52×51×50×49×48)
           = (12×11×10×9)/(51×50×49×48)
           = (12×11×9)/(51×5×49×48)
           = (11×9)/(51×5×49×4)
           = (11×3)/(17×5×49×4)
           = 33/16660
           ≈ 0.00198
      
    4. A straight is a hand whose cards consist of a sequence of ranks, without gaps. For example, a hand containing a 4, 5, 6, 7 and 8 is a straight. The suits of the cards does not matter. What is the probability that a randomly chosen hand is a straight?

      In poker, and ace can be either low or high in a straight. But I will assume that it can only be one of those, say high. There are 9 card ranks, (2, 3, 4, 5, 6, 7, 8, 9, 10) that can begin a straight. There are 9×4 = 36 of those cards. For each low card there are 4 ways to choose each remaining card in the straight, so there are 44 ways of selecting those. That means there are 36×44 hands that are straights.

      The probability of getting a straight is 36×44/(52 choose 5).

        36×44/(52 choose 5)
           = (36×44×5×4×3×2)/(52×51×50×49×48)
           = (36×44×5×3×2)/(13×51×50×49×48)
           = (36×42×5×3×2)/(13×51×50×49×3)
           = (36×42×5×2)/(13×51×50×49)
           = (36×42×5)/(13×51×25×49)
           = (36×42)/(13×51×5×49)
           = 576/162435
           ≈ 0.00355.
      
    5. A full house is a hand consisting of 3 cards of one rank and 2 cards of another rank. For example, a hand that has 3 jacks and 2 7's is a full house. What is the probability that a random hand is a full house?

      There are 13 ways to select which rank will have 3 cards in the hand. There are 4 ways to select 3 cards with that rank. So there are 13×4 ways to select the 3 matching cards.

      After choosing the 3 cards that match, there are 12 ranks to choose from for the other 2 cards. There are (4 choose 2) = 6 ways of choosing two cards of that rank. So there are 12×6 ways to select the 2 matching cards.

      The total number of full house hands is 13×4×12×6. The probability of choosing a full house is (13×4×12×6)/(52 choose 5).

        (13×4×12×6)/(52 choose 5)
           = (13×4×12×6×5×4×3×2)/(52×51×50×49×48)
           = (12×6×5×4×3×2)/(51×50×49×48)
           = (6×5×3×2)/(51×50×49)
           = (6×3)/(51×5×49)
           = (6)/(17×5×49)
           = 6/4165
           ≈ 0.00144
      

    6. What is the conditional probability that a randomly chosen hand contains at least two jacks, given that it contains at least one jack?

      There are (48 choose 4) hands that contain the jack of spades and no other jacks. Since there are 4 jacks, there are 4(48 choose 4) = 778320 poker hands that have exactly one jack.

      There are (4 choose 2)(48 choose 3) = 103776 hands with exactly two jacks, (4 choose 3)(48 choose 2) = 4512 hands with exactly three jacks and 48 hands with exactly 4 jacks.

      There are 103776 + 4512 + 48 = 108336 hands with two or more jacks. There are 778320 + 108336 = 886656 hands with at least one jack. So the conditional probability that a hand at least two jacks, given that it has at least one jack, is 108336/886656 ≈ 0.122.

    7. What is the conditional probability that a randomly chosen hand contains at least three jacks, given that it contains at least two jacks?

      From the preceding answer, there are 4512 + 48 = 4560 hands with at least three jacks, and 108336 hands with at least two jacks. The conditional probability that a randomly chosen hand contains at least three jacks, given that it contains at least two jacks, is 4560/108336 ≈ 0.042.
    8. What is the conditional probability that a randomly chosen hand is a straight, given that it is a flush?

      The number of hands that are flushes in spades is (13 choose 5) = 1287. Since there are 4 suits, the total number of hands that are flushes is 5×1287 = 5148.

      There are 9 straight-flush hands in a given suit, so there are a total of 36 straight-flush hands. The conditional probability of selecting a straight-flush, given that you have selected a flush, is 36/5148 = 1/143 ≈ 0.07.

  3.