当前位置:网站首页>Second understanding permutation and combination

Second understanding permutation and combination

2022-06-24 21:02:00 Messenger Xiaolin

To tell a story is to better understand mathematical concepts , Second, to form a long-term memory , Later, I will remember this concept through stories .

The story will be a little long , But it can be understood for a long time only once and without rote learning !

Permutation and combination

Let's start with the concept description found on Wikipedia and Baidu Encyclopedia , If you understand the conceptual description, you don't need to continue reading the story .

array : It refers to taking a specified number of elements from a given number of elements for sorting .

Combine : It refers to taking only a specified number of elements from a given number of elements , Don't think about sorting .

difference : Of the selected element The order Whether it will affect the results .

1. array :

In mathematics, permutation is the act of arranging the members of a set into a sequence or order, or, if the set is already ordered,

hypothesis 7 There are three programmers 3 One will go bald , The degree of baldness is divided into , Total baldness , Half bald , Microalopecia .

that 7 Choose from the programmers 1 A totally bald programmer , For the sake of fairness , Everyone has a chance to be bald , Then there is 7 In this case ;

Next, from the rest 6 Choose from the programmers 1 Half bald , Yes 6 In this case ;
If we continue, we will 5 choose 1, It is 5 In this case ;

So there are 7x6x5 situation .

If I were cruel , I hope all programmers are bald , But the degree of baldness is different ( Three to seven percent baldness , Alopecia punctata ······). So what it says 7 A programmer has 7x6x5x4x3x2x1 Baldness .

But I am kind ! from 7 A programmer specifies 3 A programmer must be bald , other 4 One will not go bald , So how can we save these programmers ?

Compare the above two formulas , It can be seen that 4x3x2x1 Get rid of it. , And then there is (7x6x5x4x3x2x1)/(4x3x2x1), namely ( 7 ! ) / ( 4 ! ) (7!)/(4!) (7!)/(4!)
By analogy, we get the following inference : from n individual ( The programmer ) Elements k individual ( Baldness ) Sort , There is P In this case P = ( n ! ) / ( n − k ) ! = P ( n , k ) P=(n!)/(n-k)!=P(n,k) P=(n!)/(nk)!=P(n,k)

2. Combine

In mathematics, a combination is a selection of items from a collection, such that (unlike permutations) the order of selection does not matter.

The above story is to make programmers all kinds of bald , But I think it's too cruel , So I still hope that bald programmers have no hair to take off , A uniform bald head !

The next story is 7 Programmers selected 3 One is bald !

So it's the same as the first story 7 choose 1,6 choose 1,5 choose 1 Do you ? No ! The difference is that the people selected are not uniform !

2.1 The first story is , When I want to select the first one that is slightly bald , The second half bald , The third is completely bald , So everyone rushed to sign up for the first baldness , Because I'm afraid of being chosen to be completely bald or semi bald . Choose total baldness , Half bald , The process of not balding is sequential .

2.2 The second story is , Choose to make them all bald , When they are chosen , There is no order . I'm bald anyway , Others don't care who is chosen .

The story changes , Give Way 3 The degree of baldness of a programmer is different from that of a programmer 3 Every programmer becomes bald .

Then the second story can be based on the first story , exclude 3 A bald, different programmer , How to eliminate it ? Before 7 Exclusions 4 They all use division , This is also true. . But this is not an exclusion 4 I am not bald !

It's exclusion 3 A different bald man . Some people here will directly think that only 3 The only bald person is 3 In this case , But this 3 Individual baldness should continue to be ranked ! So there will be 3x2x1 situation , The end result is :

( 7 ! ) / ( 4 ! 3 ! ) (7!)/(4!3!) (7!)/(4!3!)

By analogy, we get the following inference : from n individual ( The programmer ) Elements k individual ( Baldness ), There is no need to sort , There is C In this case C = ( n ! ) / ( n − k ) ! k ! = C ( n , k ) C=(n!)/(n-k)!k!=C(n,k) C=(n!)/(nk)!k!=C(n,k)

原网站

版权声明
本文为[Messenger Xiaolin]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202211322518876.html