(1) We are given 40 identical (indistinguishable) objects and we want to distribute them among 7 distinct (distinguishable) boxes such that the box 1 must contain at least 3, and at most 10 objects. Use generating function to find the number of ways to do that.
(1) We are given 40 identical (indistinguishable) objects and we want to distribute them among 7...
We randomly distribute 5 identical balls to 3 distinct boxes numbered 1,2,3. Given that no box is empty find the probability that box 1 contains 3 balls.
2. Consider the problem of counting the ways to distribute 31 identical objects into 6 boxes with at least objects in each box. a) Model this problem as an integer-solution-of-equation-problem. b) Model this problem as a certain coefficient of a generating function. c) Solve this problem. The answer is a) e1+. . +e6=31, ei>=3; b) (x^3 + x^3...)^6, coef x^31; c) C(13+6-1,13); Please show me how to get the answer, thanks. It's for my midterm, so it's important.
1. Multiplication theorem There are 20 toys and 12 children. We want to distribute the toys to the children. In each of the cases below, count how many ways can we distribute the toys. (Hint: think, what are my boxes and how can I fill them?). Please show your work. You can leave the expressions as is, so no nieed to do the calculations (a) If cach child gets cxactly one toy. b) Every toy is given out and it...
6. A box contains 8 novels and 7 math books going to loan 6 books to a friend. How many different (a) You are book selections could your friend receive? going to loan 3 novels and 4 math books to a friend. How (b) You are many different book selections could your friend receive? (c) You are going to loan at least 13 books to a friend. How many different book selections could your friend receive? going to loan at...
Problem 4. Suppose you are given a set of small boxes, numbered 1 to n, identical in every aspect except that each of the first i contains a pearl whereas the remaining n − i are empty. You can have two magic wands that can each test if a box is empty or not in a single touch, except that a wand disappears if you test it on a box that is empty. Show that, without knowing the value of...
Consider n indivisible objects with distinct types i = 1, 2, 3,…, n. We are given positive integer weights W = {w1,w2...wn} and positive integer prices V = {v1,v2...vn} for the objects and a knapsack of weight capacity (m). Our problem is to find the maximum profit possible by including a subset of the objects into the knapsack with total weight of at most m. This form of the 0/1 Knapsack Problem can be solved by a Decrease and Conquer...
Problem 4. 1. I’ve invited 6 friends over to my house, and each of them brings a cat with them. (It’s a cat party, obviously!) I decide to place the 6 distinct cats into 3 identical cat beds. In how many ways can I do this? 2. Prove the S(n, k) = S(n − 1, k − 1) + kS(n − 1, k). 3. Give an example of an onto function f : [6] → [3]. Give an example of...
In python..
If we want the computer to pick a random number in a given range say to write code for Picking a random element from a list or pick a random card from a deck, flip a coin etc. we can use Random module The Random module contains some very useful functions one of them is randrange() randrange(start, stop) Example from random import randrange for i in range (3): print ("printing a random number using randrange(1, 7)",r andrange(1, 7))...
PartB (COMBINATORICS) -LEAVE ALL ANSWERA IN TERMS OF C(n,r) or factorials, Q4(a)(i ) In how many ways can you arrange the letters in the word INQUISITIVE? in how many of the above arrangements, U immediately follows Q? Q4. (b)Su next semester. Your favorite professor, John Smith, is teaching 2 courses next semester and therefore ppose you are a math major who is behind in requirements and you must take 4 math courses you "must" take at least one of them....
Let's say you are given a sequence of distinct positive numbers. We want to find a subsequence with the maximum possible sum, with the restriction that we are not allowed to take three consecutive elements from the original sequence. For example, for input 1, 6, 5, 2, 7, 9, 3, 4, the subsequence with the maximum possible sum is 6, 5, 7, 9, 4 (we have two pairs of consecutive elements 6, 5 and 7, 9 but not three consecutive...