Question: 1. Play poker with Sage. (a) Construct a standard deck of 52 cards. sage: Ranks = Set([2, 3, 4, 5, 6, 7, 8, 9, 10,

1. Play poker with Sage. (a) Construct a standard
1. Play poker with Sage. (a) Construct a standard deck of 52 cards. sage: Ranks = Set([2, 3, 4, 5, 6, 7, 8, 9, 10, 'Jack', 'Qneen', 'King', 'Ace']) sage: Suits = Set(['Hearts', 'Diamonds', 'Spades', 'Clubs'D sage: Cards = cartesian_product([Ranks, Suits]) Use Cardscardinalityo to check if the deck is dened correctly. (b) Dene the set of all possible hands of ve (this is the sample space). sage: Hands = Subsets(Cards, 5) Run both Hands.cardinality() and binomial(52,5). (c) Deal yourself a hand. sage: Me = Hands.random_element(); Me (d) Deal a hand for Sage. sage: Hands.random_element() (e) 1Who has a better hand? (f) Dene the set \"Flushes" of all ushes (5 cards of the same suit). Then compute the probability of a ush by sage: Flushes . cardinalityo /Hands.cardinality () 2. Find the number of solutions of the equation :1: + y + z + w = 15 (a) in non-negative integers, (b) in positive integers, (c) in integers satisfying a: > 2, y > 2, z > 0, w > 3. 3. Find the number of non-negative integer solutions of :31 + 2:2 + $3 + 9.34 S 6. 4. Show that more than half of the selections of 6 from 49 in the UK Lottery have no two consecutive numbers. 5. Find the number of ways of placing 4 marbles in 10 distinguishable boxes if (a) the marbles are distinguishable, and no box can hold more than one marble; (b) the marbles are indistinguishable, and no box can hold more than one; (c) the marbles are distinguishable, and each box can hold any number of them; (d) the marbles are indistinguishable, and each box can hold any number of them

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!