CSE 312: Foundations of Computing II Quiz Section #1: Counting

Similar documents
CSE 312: Foundations of Computing II Quiz Section #1: Counting (solutions)

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

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

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

{ a, b }, { a, c }, { b, c }

Problem Set 2. Counting

CISC 1400 Discrete Structures

Counting Poker Hands

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

Math 166: Topics in Contemporary Mathematics II

Section 5.4 Permutations and Combinations

2. Combinatorics: the systematic study of counting. The Basic Principle of Counting (BPC)

Section 5.4 Permutations and Combinations

2.5 Sample Spaces Having Equally Likely Outcomes

Chapter 2. Permutations and Combinations

Section The Multiplication Principle and Permutations

Mat 344F challenge set #2 Solutions

3 The multiplication rule/miscellaneous counting problems

STAT 430/510 Probability Lecture 3: Space and Event; Sample Spaces with Equally Likely Outcomes

3 The multiplication rule/miscellaneous counting problems

MAT104: Fundamentals of Mathematics II Summary of Counting Techniques and Probability. Preliminary Concepts, Formulas, and Terminology

LEARN HOW TO PLAY MINI-BRIDGE

Counting integral solutions

Counting (Enumerative Combinatorics) X. Zhang, Fordham Univ.

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

CS 237 Fall 2018, Homework SOLUTION

Unit on Permutations and Combinations (Counting Techniques)

Advanced Intermediate Algebra Chapter 12 Summary INTRO TO PROBABILITY

More Probability: Poker Hands and some issues in Counting

Permutations and Combinations Section

CS Project 1 Fall 2017

50 Counting Questions

Poker Hands. Christopher Hayes

CISC-102 Fall 2017 Week 8

CS1802 Week 3: Counting Next Week : QUIZ 1 (30 min)

FAST ACTION HOLD EM. Copy hand-- means a five-card hand of a player that is identical in rank to the five-card hand of the dealer.

n! = n(n 1)(n 2) 3 2 1

Introduction. Firstly however we must look at the Fundamental Principle of Counting (sometimes referred to as the multiplication rule) which states:

Discrete Structures Lecture Permutations and Combinations

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

Compound Probability. Set Theory. Basic Definitions

Fundamentals of Probability

CSE 21: Midterm 1 Solution

Principles of Mathematics 12: Explained!

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

Problems from 9th edition of Probability and Statistical Inference by Hogg, Tanis and Zimmerman:

Poker: Probabilities of the Various Hands

Contents 2.1 Basic Concepts of Probability Methods of Assigning Probabilities Principle of Counting - Permutation and Combination 39

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

TABLE GAMES RULES OF THE GAME

BRIDGE is a card game for four players, who sit down at a

Texas Hold'em $2 - $4

Counting and Probability Math 2320

MATH 215 DISCRETE MATHEMATICS INSTRUCTOR: P. WENG

Basic Probability Models. Ping-Shou Zhong

Exercises Exercises. 1. List all the permutations of {a, b, c}. 2. How many different permutations are there of the set {a, b, c, d, e, f, g}?

Name: Exam 1. September 14, 2017

Counting Methods and Probability

6) A) both; happy B) neither; not happy C) one; happy D) one; not happy

Presents: Basic Card Play in Bridge

Theory of Probability - Brett Bernstein

Counting Things Solutions

HEADS UP HOLD EM. "Cover card" - means a yellow or green plastic card used during the cut process and then to conceal the bottom card of the deck.

Unit 5 Radical Functions & Combinatorics

PROBLEM SET 2 Due: Friday, September 28. Reading: CLRS Chapter 5 & Appendix C; CLR Sections 6.1, 6.2, 6.3, & 6.6;

6/24/14. The Poker Manipulation. The Counting Principle. MAFS.912.S-IC.1: Understand and evaluate random processes underlying statistical experiments

TABLE OF CONTENTS TEXAS HOLD EM... 1 OMAHA... 2 PINEAPPLE HOLD EM... 2 BETTING...2 SEVEN CARD STUD... 3

Topics to be covered

Math 1111 Math Exam Study Guide

MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question.

STAT 430/510 Probability Lecture 1: Counting-1

Probability and Counting Techniques

Finite Math Section 6_4 Solutions and Hints

LESSON 2. Objectives. General Concepts. General Introduction. Group Activities. Sample Deals

Counting. Chapter 6. With Question/Answer Animations

HIGH CARD FLUSH 1. Definitions

CS Programming Project 1

MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question.

Today s Topics. Next week: Conditional Probability

Board Question 1. There are 5 Competitors in 100m final. How many ways can gold silver and bronze be awarded? May 27, / 28

MGF 1106: Exam 2 Solutions

Simple Counting Problems

Poker: Further Issues in Probability. Poker I 1/29

Discrete Finite Probability Probability 1

Honors Precalculus Chapter 9 Summary Basic Combinatorics

Math 1111 Math Exam Study Guide

13:69E-1.13Z Criss cross poker; physical characteristics

5.8 Problems (last update 30 May 2018)

CATFISH BEND CASINOS, L.C. RULES OF THE GAME FOUR CARD POKER

Fundamental Counting Principle 2.1 Page 66 [And = *, Or = +]

6. In how many different ways can you answer 10 multiple-choice questions if each question has five choices?

Counting Principles Review

Poker Rules Friday Night Poker Club

FOUR CARD POKER. Hand-- means the best four card poker hand that can be formed by each player and the dealer from the cards they are dealt.

Lecture 18 - Counting

HOMEWORK ASSIGNMENT 5

Name: Checked: jack queen king ace

POKER (AN INTRODUCTION TO COUNTING)

Math 475, Problem Set #3: Solutions

LET IT RIDE POKER. Stub-- means the remaining portion of the deck after all cards in the round of play have been dealt or delivered.

Transcription:

CSE 312: Foundations of Computing II Quiz Section #1: Counting Review: Main Theorems and Concepts 1. Product Rule: Suppose there are m 1 possible outcomes for event A 1, then m 2 possible outcomes for event A 2,..., m n possible outcomes for event A n. Then there are possible outcomes overall. 2. Number of ways to order n distinct objects: 3. Number of ways to select from n distinct objects: (a) Permutations (number of ways to linearly arrange k objects out of n distinct objects, when the order of the k objects matters): (b) Combinations (number of ways to choose k objects out of n distinct objects, when the order of the k objects does not matter): 4. Multinomial coefficients: Suppose there are n objects, but only k are distinct, with k n. (For example, godoggy has n = 7 objects (characters) but only k = 4 are distinct: (g, o, d, y)). Let n i be the number of times object i appears, for i {1, 2,..., k}. (For example, (3, 2, 1, 1), continuing the godoggy example.) The number of distinct ways to arrange the n objects is: Exercises Several exercises below deal with a standard 52-card deck, such as is used in the games of bridge and poker. This deck consists of 52 cards divided into 4 suits of 13 cards each. The 4 suits are (black) spades, (red) hearts, (black) clubs, and (red) diamonds. The 13 cards ( ranks ) of each suit are 2, 3, 4, 5, 6, 7, 8, 9, 10, J, Q, K, A. 1. How many ways are there to select 5 cards from a standard deck of 52 cards, where the 5 cards contain cards from at most two suits, if: (a) order does not matter (b) order matters 1

2. Consider a set of 25 people that form a social network. (The structure of the social network is determined by which pairs of people in the group are friends.) How many possibilities are there for the structure of this social network? 3. Suppose we have 3 diamonds and 3 hearts from a standard deck. How many ways are there to arrange the cards if they have to alternate suit? 4. How many ways are there to choose three initials that have two being the same or all three being the same? 5. A license plate has the form AXYZBCD, where A, B, C, and D are digits and X, Y, and Z are upper case letters. What is the number of different license plates that can be created? 6. A chef is preparing desserts for the week, starting on a Sunday. On each day, only one of five desserts (apple pie, cherry pie, strawberry pie, pineapple pie, and cake) may be served. On Thursday there is a birthday, so cake must be served that day. On no two consecutive days can the chef serve the same dessert. How many dessert combinations are there for the week? 7. A store has 4 books, 14 movies, 6 toys, and 5 posters. In how many ways can a customer buy exactly 1 item from each of exactly 3 categories? 8. In Schnapsen, assuming the stock is not closed, no one has exchanged the jack of trumps, and no marriage has been declared, how many possible orderings of the cards face-down in the stock are there, given the cards you have seen... (a)... before trick 1? (b)... before trick 2? (c)... before trick 3? (d)... before trick 4? (e)... before trick 5? 9. In how many different ways can you arrange seven people around a circular table? 10. Suppose that 8 people, including you and a friend, line up for a picture. In how many ways can the photographer organize the line if she wants to have fewer than 2 people between you and your friend? 11. Your CSE 312 teaching staff lines up for a picture. How many possible arrangements are there with Maestro Tompa not at either end of the line? 2

12. How many ways are there to permute the 8 letters A, B, C, D, E, F, G, H so that A is not at the beginning and H is not at the end? 13. There are 40 seats and 40 students in a classroom. Suppose that the front row contains 10 seats, and there are 5 students who must sit in the front row in order to see the board clearly. How many seating arrangements are possible with this restriction? 14. Permutations of objects, some of which are indistinguishable. (a) How many permutations are there of the letters in DAWGY? (b) How many permutations are there of the letters in DOGGY? (c) How many permutations are there of the letters in GODOGGY? 15. A bridge hand consists of 13 cards dealt from a shuffled standard deck of 52 cards. Given a bridge hand consisting of 5 spades, 2 hearts, 3 diamonds, and 3 clubs, in how many ways can the hand be arranged so that the cards of each suit are together... (a)... but not necessarily sorted by rank within each suit? (b)... and each suit is sorted in ascending rank order? (c)... and each suit is sorted in ascending rank order and the suits are arranged so that the suit colors alternate? 16. Suppose two cards are drawn in order from a bridge deck. In how many ways can the first card be a diamond and the second card a jack? 17. Rabbits Peter and Pauline have three offspring: Flopsie, Mopsie, and Cotton-tail. These five rabbits are to be distributed to four different pet stores so that no store gets both a parent and a child. It is not required that every store gets a rabbit. In how many different ways can this be done? 18. You are playing a game of Schnapsen against the Maestro. The cards you have not seen yet during the current deal are the following: TKJ ATQJ AT KQJ Of the possible 5-card hands the Maestro could be holding, how many of them contain at least 18 trick points? Try to find the simplest way to solve this exercise. 3

19. You have 12 red beads, 16 green beads, and 20 blue beads. How many distinguishable ways are there to place the beads on a string, assuming that beads of the same color are indistinguishable? (The string has a loose end and a tied end, so that reversing the order of the beads gives a different arrangement, unless the pattern of colors happens to form a palindrome.) Try solving the problem two different ways, once using permutations and once using using combinations. 20. There are 12 points on a plane. Five of them are collinear and, other than these, no three are collinear. (a) How many lines, each containing at least 2 of the 12 points, can be formed? (b) How many triangles, each containing at least 3 of the 12 points, can be formed? 21. You have a triangular prism with top and bottom both being congruent equilateral triangles and the three sides being congruent rectangles. If you pick 5 out of 7 different colors, one to paint each of the 5 faces, how many differently painted triangular prisms can you get? Just rotating the prism does not constitute a different color scheme. 22. There are 6 men and 7 women in a ballroom dancing class. If 4 men and 4 women are chosen and paired off, how many pairings are possible? 23. How many ways are there to seat 10 people, consisting of 5 couples, in a row of 10 seats if... (a)... the seats are assigned arbitrarily? (b)... all couples are to get adjacent seats? (c)... the seats are assigned arbitrarily, except that one couple insists on not sitting in adjacent seats? 24. How many bridge hands have a suit distribution of 5, 5, 2, 1? (That is, you are playing with a standard 52-card deck and you have 5 cards of one suit, 5 cards of another suit, 2 of another suit, and 1 of the last suit.) 25. A hand in draw poker consists of 5 cards dealt from a shuffled 52-card standard deck. (a) How many different hands are there that form a flush? (A hand is said to form a flush if all 5 cards are from the same suit.) (b) How many different hands are there that form a straight? (A hand is said to form a straight if the ranks of all 5 cards form an incrementing sequence. The suits do not matter. The lowest straight is A, 2, 3, 4, 5 and the highest straight is 10, J, Q, K, A.) 4

(c) How many different hands are there that form one pair? (This occurs when the cards have ranks a, a, b, c, d, where a, b, c, and d are all distinct. The suits do not matter.) (d) How many different hands are there that form two pairs? (This occurs when the cards have ranks a, a, b, b, c, where a, b, and c are all distinct. The suits do not matter.) (e) How many different hands are there that form three of a kind? (This occurs when the cards have ranks a, a, a, b, c, where a, b, and c are all distinct. The suits do not matter.) (f) How many different hands are there that form a full house? (This occurs when the cards have ranks a, a, a, b, b, where a and b are distinct. The suits do not matter.) (g) How many different hands are there that form four of a kind? (This occurs when the cards have ranks a, a, a, a, b. The suits do not matter.) (h) How many different hands are there that form a straight flush? (This occurs when the cards form a straight and a flush; i.e., a straight with all 5 cards of the same suit) 5