当前位置:网站首页>[combinatorics] permutation and combination (example of permutation and combination)
[combinatorics] permutation and combination (example of permutation and combination)
2022-07-03 12:06:00 【Programmer community】
List of articles
- One 、 Examples of permutations 1 ( Combine | product rule | The law of addition )
- Two 、 Examples of permutations 2
Reference blog :
- 【 Combinatorial mathematics 】 Basic counting principle ( The principle of addition | Multiplication principle )
- 【 Combinatorial mathematics 】 Examples of permutation and combination of sets ( array | Combine | Circular arrangement | binomial theorem )
- 【 Combinatorial mathematics 】 Permutation and combination ( Arrange and combine content summary | Select the question | Set arrangement | Set combination )
One 、 Examples of permutations 1 ( Combine | product rule | The law of addition )
The basic counting formula is The law of addition , product rule ;
from
1
1
1 ~
300
300
300 Take out at will
3
3
3 Number , So that the sum of these three numbers can be
3
3
3 to be divisible by , How many selection methods are there ?
Use classification ( product rule ) , Distribution ( The law of addition ) , Permutation and combination To solve the problem ;
Put the above
1
1
1 ~
300
300
300 Numbers , Divide by
3
3
3 The remainder of is divided into the following three categories :
- ① Divide
3
3
3 Remainder is
1
1
A
=
{
1
,
4
,
⋯
,
298
}
A = \{ 1, 4, \cdots , 298 \}
A={ 1,4,⋯,298}
1 :
- ② Divide
3
3
3 Remainder is
2
2
B
=
{
2
,
5
,
⋯
,
299
}
B = \{ 2, 5, \cdots , 299 \}
B={ 2,5,⋯,299}
2 :
- ③ Divide
3
3
3 Remainder is
0
0
C
=
{
3
,
6
,
⋯
,
300
}
C = \{ 3, 6, \cdots , 300\}
C={ 3,6,⋯,300}
0 :
Combination question :
stay
A
A
A Set any
3
3
3 Number , The sum of the three numbers must be
3
3
3 Multiple , Can times
3
3
3 to be divisible by ; The selection methods are
C
(
100
,
3
)
C(100, 3)
C(100,3) Kind of ;
stay
B
B
B Set any
3
3
3 Number , The sum of the three numbers must be
3
3
3 Multiple , Can times
3
3
3 to be divisible by ; The selection methods are
C
(
100
,
3
)
C(100, 3)
C(100,3) Kind of ;
stay
C
C
C Set any
3
3
3 Number , The sum of the three numbers must be
3
3
3 Multiple , Can times
3
3
3 to be divisible by ; The selection methods are
C
(
100
,
3
)
C(100, 3)
C(100,3) Kind of ;
product rule : stay
A
,
B
,
C
A,B,C
A,B,C Take a number from each set in , The sum of the three numbers is also
3
3
3 Multiple ,
- The first set takes
1
1
1 Number , Yes
100
100
100 To plant and take
- The second set takes
1
1
1 Number , Yes
100
100
100 To plant and take
- The third set takes
1
1
1 Number , Yes
100
100
100 To plant and take
All in all
10
0
3
100^3
1003 To plant and take ;
The final choice , Use the rule of addition :
3
C
(
100
,
3
)
+
10
0
3
=
1485100
3C(100, 3) + 100^3 = 1485100
3C(100,3)+1003=1485100
Two 、 Examples of permutations 2
1000
!
1000!
1000! At the end of
0
0
0 The number of ?
This value is calculated by multiplication , A very large , Basically impossible to calculate ;
List the factors : take
1000
!
1000!
1000! regard as
1000
×
999
×
998
×
⋯
×
2
×
1
1000 \times 999 \times 998 \times \cdots \times 2 \times 1
1000×999×998×⋯×2×1
Factor ;
Principle that : Among the above factors
1000
1000
1000 A factor , Will this
1000
1000
1000 Factorization , If there is
i
i
i individual
5
5
5 ,
j
j
j individual
2
2
2, be
i
i
i and
j
j
j The smaller value in
min
{
i
,
j
}
\min\{ i,j \}
min{ i,j} Namely
0
0
0 The number of ;
Above
1
1
1 ~
1000
1000
1000 this
1000
1000
1000 It is statistically decomposed from numbers
2
2
2 and
5
5
5 The number of
Statistics
2
2
2 The number of factors : Certainly more than 500 ;
- ① yes
2
2
2 The number of multiples of is
500
500
500 individual
- ② yes
4
4
4 The number of multiples of is
250
250
2
×
2
2\times2
2×2 , One of them
2
2
2 It has been counted before , Here we add
250
250
250 individual
2
2
2 , The current is
750
750
750 individual
2
2
2 ;
250 individual , Break it down
- ③ yes
16
16
16 The number of multiples of is
62
62
2
×
2
×
2
2\times2 \times 2
2×2×2 , Two of them
2
2
2 It has been counted before , Here we add
62
62
62 individual
2
2
2 , The current is
812
812
812 individual
2
2
2 ;
62 individual , Break it down
- ④ yes
32
32
32 The number of multiples of is
31
31
2
×
2
×
2
×
2
2\times2 \times 2\times 2
2×2×2×2 , Three of them
2
2
2 It has been counted before , Here we add
31
31
31 individual
2
2
2 , The current is
833
833
833 individual
2
2
2 ;
⋮
\vdots
⋮
31 individual , Break it down
Statistics
5
5
5 The number of factors :
249
249
249 individual ;
- ① yes
5
5
5 The number of multiples of is
200
200
1
1
1 A factor
5
5
5 The situation of , There must be some factors that can be decomposed into
25
,
125
,
625
25, 125, 625
25,125,625 , etc. , Next, gradually refine and peel out the factors without statistics ;
200 individual , Statistics
- ② yes
25
25
25 The number of multiples of is
40
40
5
×
5
5\times5
5×5 , One of them
5
5
5 It has been counted before , Here we add
40
40
40 individual
5
5
5 , The current is
240
240
240 individual
5
5
5 ;
40 individual , Break it down
- ③ yes
125
125
125 The number of multiples of is
8
8
5
×
5
×
5
5\times5 \times 5
5×5×5 , Two of them
5
5
5 It has been counted before , Here we add
8
8
8 individual
5
5
5 , The current is
248
248
248 individual
5
5
5 ;
8 individual , Break it down
- ④ yes
625
625
625 The number of multiples of is
1
1
5
×
5
×
5
×
5
5\times5 \times 5 \times 5
5×5×5×5 , Three of them
5
5
5 It has been counted before , Here we add
1
1
1 individual
5
5
5 , The current is
249
249
249 individual
5
5
5 ;
1 individual , Break it down
It's broken down into
2
2
2 The number of
i
i
i It must be greater than
500
500
500 Number of numbers ;
It's broken down into
5
5
5 The number of
j
j
j The value is
249
249
249 individual ;
therefore
1000
!
1000!
1000! At the end of
0
0
0 The number of yes
249
249
249 individual ;
边栏推荐
- Flutter: about monitoring on flutter applications
- rxjs Observable filter Operator 的实现原理介绍
- Socket TCP for network communication (I)
- Vulnhub geminiinc
- Kubernetes three dozen probes and probe mode
- Cacti monitors redis implementation process
- Vulnhub's Nagini
- 安装electron失败的解决办法
- Vulnhub narak
- ArcGIS application (XXI) ArcMap method of deleting layer specified features
猜你喜欢
(database authorization - redis) summary of unauthorized access vulnerabilities in redis
Vulnhub's Nagini
Kubernetes three dozen probes and probe mode
Niuniu's team competition
Solution to the second weekly test of ACM intensive training of Hunan Institute of technology in 2022
小鹏 P7 撞护栏安全气囊未弹出,官方回应称撞击力度未达到弹出要求
MCDF Experiment 1
错排问题 (抽奖,发邮件)
vulnhub之Nagini
OpenGL draws colored triangles
随机推荐
vulnhub之narak
Solution to the second weekly test of ACM intensive training of Hunan Institute of technology in 2022
Differences between MySQL Union and union all
Basic knowledge of OpenGL (sort it out according to your own understanding)
DEJA_ Vu3d - 054 of cesium feature set - simulate the whole process of rocket launch
Apprendre à concevoir des entités logicielles réutilisables à partir de la classe, de l'API et du cadre
rxjs Observable filter Operator 的实现原理介绍
网络通讯之Socket-Tcp(一)
Optimize interface performance
量化计算调研
牛牛的组队竞赛
(construction notes) learning experience of MIT reading
【mysql专项】读锁和写锁
抓包整理外篇fiddler———— 会话栏与过滤器[二]
4000 word super detailed pointer
vulnhub之Ripper
Vulnhub geminiinc V2
在CoreOS下部署WordPress实例教程
vulnhub之raven2
4000字超详解指针