38 lines
		
	
	
		
			1.7 KiB
		
	
	
	
		
			Markdown
		
	
	
	
	
	
		
		
			
		
	
	
			38 lines
		
	
	
		
			1.7 KiB
		
	
	
	
		
			Markdown
		
	
	
	
	
	
|   | --- | |||
|  | title: Combinations | |||
|  | localeTitle: 组合 | |||
|  | --- | |||
|  | ## 组合
 | |||
|  | 
 | |||
|  | 组合是从集合中选择的项目,其中选择的顺序无关紧要。更正式地说: | |||
|  | 
 | |||
|  | > 集合S的k-组合是S的k个不同元素的子集。如果集合具有n个元素,则k-组合的数量等于[二项式系数](https://guide.freecodecamp.org/mathematics/counting/factorials-and-binomial-coefficients/) 1
 | |||
|  | 
 | |||
|  |  | |||
|  | 
 | |||
|  | 或者如果您更喜欢使用[阶乘](https://guide.freecodecamp.org/mathematics/counting/factorials-and-binomial-coefficients/) : | |||
|  | 
 | |||
|  |  | |||
|  | 
 | |||
|  | 组合指的是一次取k **而不**重复的n个事物的组合。为了引用允许重复的组合,经常使用术语k-选择或k-组合与重复,我们使用以下公式: | |||
|  | 
 | |||
|  |  | |||
|  | 
 | |||
|  | ## 一些例子:
 | |||
|  | 
 | |||
|  | 当您想要解决如下组合的组合问题时,组合非常有用: | |||
|  | ``` | |||
|  | Compute the probability to obtain a poker from  | |||
|  |  a standard fifty-two card deck drawing 5 cards  | |||
|  |  at the same time  | |||
|  | ``` | |||
|  | 
 | |||
|  | 为了解决这个简单的问题,您需要使用组合计算5张牌的数量: | |||
|  | 
 | |||
|  |  | |||
|  | 
 | |||
|  | 记住这一点根据二项式系数定义,等于48。 | |||
|  | 
 | |||
|  | ### 来源
 | |||
|  | 
 | |||
|  | 1 [维基百科组合条目](https://en.wikipedia.org/wiki/Combination) |