《离散数学》杨争锋ch

上传人:xiao****1972 文档编号:71415355 上传时间:2019-01-20 格式:PPT 页数:21 大小:259.32KB
返回 下载 相关 举报
《离散数学》杨争锋ch_第1页
第1页 / 共21页
《离散数学》杨争锋ch_第2页
第2页 / 共21页
《离散数学》杨争锋ch_第3页
第3页 / 共21页
《离散数学》杨争锋ch_第4页
第4页 / 共21页
《离散数学》杨争锋ch_第5页
第5页 / 共21页
点击查看更多>>
资源描述

《《离散数学》杨争锋ch》由会员分享,可在线阅读,更多相关《《离散数学》杨争锋ch(21页珍藏版)》请在金锄头文库上搜索。

1、,4.5 Generalized Permutations and Combinations (一般性的排列与组合) Introduction See page 325.,2. Permutations with Repetition (有重复的排列) (1) Example 1 (page 325) How many strings of length n can be formed from the English alphabet? Solution: 26n,(2) Theorem 1 (page 325) The number of r-permutations of a set o

2、f n objects with repetition allowed is nr. Proof: 当允许重复时,在r-排列中对r-个位置中的每个位置有n种方式选择集合的元素,因为对每个选择,所有n个物体都是有效的。因此,由乘法规则,当允许重复时存在nr 个r-排列。,3. Combinations with Repetition(有重复的组合) (1) Example 2 (page 336) How many ways are there to select four pieces of fruit from a bowl containing apples, oranges, and p

3、ears if the order in which the pieces are selected does not matter, only the type of fruit and not the individual pieces matters, and there are at least four pieces of each type of fruit in the bowl.,Solution: 15 ways: 4 apples 4 oranges 4 pears 3 apples, 1 oranges 3 pears, 1 pear 3 oranges, 1 apple

4、 3 oranges, 1 pear 3 pears, 1 apple 3 pears, 1 orange 2 apples, 2 oranges 2 apples, 2 pears 2 oranges, 2 pears 2 apples, 1 orange, 1 pear 2 oranges, 1 apple, 1 pear 2 pears, 1 apple, 1 orangle This solution is the number of 4-combinations with repetition allowed from a three-element set apple, orang

5、e, pear,(2) Example 3 (page 326) How many ways are there to select five bills from a cashbox containing $1 bills, $2 bills, $5 bills, $10 bills, $20 bills, $50 bills, and $100 bills? Assume that the order in which the bills are chosen does not matter, that the bills of each denomination are indistin

6、guishable (同种币值的纸币是不加区分的), and that there are at least five bills of each type.,Solution: 要点如下(page 336337),用6 | 和 5 *来描述, 例如: (1) | | | * * | | | * * *表示2 $10s, 3 $1s (2) * | * | * * | | * | | 表示 1 $100, 1 $50, 2 $20s, 1 $5 (3) * | | | * * | | * | * 表示 1 $100, 2 $10s, 1 $2, 1$1 问题转化为:在11个位置中选5个*号的位

7、置(请仔细思考) C(11, 5) = 11!/(5!6!),(3) Theorem 2 There are C(n+r-1, r) r-combinations from a set with n elememts when repetition of elements are allowed. Proof: 当允许重复时n个元素集合的每个r-组合可以用n-1条竖线和r颗星的表表示。这n-1条竖线是用来标记n个不同的单元。每当集合的第i个元素出现在组合中,第i个单元就包含一颗星。例如,4元素集合的一个6-组合用3条竖线和6颗星来表示。这里 ,代表了恰好包含2个第一元素、个第二元素、个第三元素

8、和个第四元素。 正如我们已经看到,包含n-1条竖线和r颗星的每一个不同的表对应于n元素集合的允许重复的一个r-组合。这种表的个数是C(n-1+r, r),因为每个表对应于从包含r颗星和n-1条竖线的n-1+r个位置中取r个位置来放r颗星的一种选择。,(4) Example 4 (page 338) Suppose that a cookie shop has four different kinds of cookies. How many different ways can six cookies be chosen? Assume that only the type of cookie

9、, and not the individual cookies or the order in which they are chosen, matters. Solution: four-the number of elements six- 6-combination C(4+6-1, 6) (可以直接套用公式) Remark: Please use this theorem to consider example 2 (page 336): C(3+4-1, 6),(5) Example 5 (page 338) How many solutions does the equation

10、 x1+x2+x3=11 have, where x1, x2, and x3 are nonnegative integers? Solution: -selecting 11 items from a set with three elements. x1 items of type one x2 items of type two x3 items of type three,- 11-combinations with repetition allowed from a set of three elements - answer: C(3+11-1, 11),Remark: Vari

11、ables can have constraints. For example, x11, x22, and x33. Solution: (a) Firstly, choose one item from type one, two of type two, and three of type three. (b) Then, select five additional items answer: C(3+5-1, 5),(6) Example 6 (page 339) Solution: Please read it by yourself. (7) Example 7 (page 33

12、9) Solution: Please read it by yourself.,4. Permutations with Indistinguishable Objects (具有不可区别物体的集合的排列) (a) Example 8 (page 339) How many different strings can be made by reordering the letters of the word SUCCESS Solution: Success-3 Ss, 2 Cs, 1 U, 1 E,(a) 3 Ss can be placed among 7 positions in C(

13、7, 3) ways. (b) 2 Cs can be placed in C(4,2) ways. (c) U can be placed in C(2,1) ways. (d) E can be placed in C(1,1) way. Answer - C(7,3)C(4,2)C(2,1)C(1,1),(b) Theorem 3 (page 340) the number of different permutations of n objects, where they are n1 indistinguishable objects of type 1, n2 indistingu

14、ishable objects of type 2, ., and nk indistinguishable objects of type k, is n! / ( n1!n2!nk! ) Proof: similar to example 2.,5. Distributing Objects into Boxes (把物体放入盒子) (1) Example 9 (page 341) How many ways are there to distribute hands of 5 cards of four player from the standard of deck of 52 cards. Solution: C(52,5)C(47,5) C(42,5) C(37,5),(5) Theorem 4 (page 341) The number of ways to distribute n distinguishable objects into k distinguishable boxes so that ni objetcs are placed into box i, i=1,2, , k, equals n! / ( n1!n2!nk! ),Exercises,P342 :6、8、14、16、30、32、38(Fifth and Sixth Edition),

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 高等教育 > 大学课件

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号