[Combinatorial Mathematics/Computer Mathematics] Chapter 1 Permutation, Combination, and Binomial Theorem

1.

Among the numbers less than 2000, how many positive integers contain the number 2?

Use the elementary school approach.
The thousands place is 1 or 0, the hundreds place is 2: 2 × 10 × 10 = 200 2\times 10\times 10=2002×10×10=The thousands place of 200
is 1 or 0, the hundreds place is not 2, and the tens place is 2:2 × 9 × 10 = 180 2\times 9\times 10=1802×9×10=180
The thousands place is 1 or 0, the hundreds place is not 2, and the tens place is not 2:2 × 9 × 9 = 162 2\times 9\times 9=1622×9×9=162
total200 + 180 + 162 = 542 200+180+162=542200+180+162=542

2.

Among all the 7-digit 01 strings, how many contain both the "101" string and the "11" string?

There are 6 1's and 1 0 in the string: 5 types.
There are 5 1's and 2 0's in the string: there are 6 positions to choose from in 11111 and 0 to be inserted in 2 positions. Excluding the 0111110 inserted at the beginning and end at the same time, a total of ( 6 2 ) − 1 = 14 \binom{6}{2}-1=14(26)1=
There are 4 1s and 3 0s in the 14 string: if 2 0s are continuous and 1 0 is not continuous, in 1111, there are (5 2) P (2, 2) \binom{5}{2}P(2 ,2)(25)P(2,2 ) , but excluding the case starting/ending with 04 × 2 = 8 4\times 2=84×2=8 species, total(5 2) P (2, 2) − 8 = 12 \binom{5}{2}P(2,2)-8=12(25)P(2,2)8=12 species. If the three zeros are not consecutive, in 1111 CCP( 5 3 ) − 1 \binom{5}{3}-1(35)1. There are 9 types
in total. There are 3 1s in the string, and the rest are all 0s: there must be a substring 1011 or 1101. 1/2/3/4 0s can be inserted before 1011 or 1101, and the remaining 0s are placed at the end, a total of4 × 2 = 8 4\times 2=84×2=8 species.
5+14+12+9+8=48

4.

n = 3 × 5 × 4 × 3 = 180 n=3\times 5\times 4\times 3=180 n=3×5×4×3=180

The sum of the ones digits of these 180 numbers: (2 + 4 + 6) × 60 = 720 (2+4+6)\times 60=720(2+4+6)×60=720

Tens sum: ( 1 + 2 + 3 + 4 + 5 ) × 12 + ( 1 + 3 + 4 + 5 + 6 ) × 12 + ( 1 + 2 + 3 + 5 + 6 ) × 12 = 612 (1+ 2+3+4+5)\times 12+(1+3+4+5+6)\times 12+(1+2+3+5+6)\times 12=612(1+2+3+4+5)×12+(1+3+4+5+6)×12+(1+2+3+5+6)×12=612
612 × 10 = 6120 612\times 10=6120 612×10=6120
sum of hundreds:612 × 100 = 61200 612\times 100=61200612×100=The sum of 61200
digits:612 × 1000 = 612000 612\times 1000=612000612×1000=612000
m = 612000 + 61200 + 6120 + 720 = 680040 m=612000+61200+6120+720=680040 m=612000+61200+6120+720=680040

5.

From { 1 , 2 , . . . , 7 } \{1,2,...,7\}{ 1,2,...,Among the 5 digits composed of 5 different 5 numbers selected from 7 } , how many numbers are there in which 1 and 2 are not adjacent?
No 1, 2:P ( 5 , 5 ) = 120 P(5,5)=120P(5,5)=There is only 1 in 120
:P ( 5 , 4 ) × 5 = 600 P(5,4)\times 5=600P(5,4)×5=There are only 2 in 600
:P ( 5 , 4 ) × 5 = 600 P(5,4)\times 5=600P(5,4)×5=600
has 1 and 2 at the same time: assuming the remaining 3 digits are XXX, there areP ( 5 , 3 ) ( 4 2 ) P ( 2 , 2 ) = 720 P(5,3)\binom{4}{2}P( 2,2)=720P(5,3)(24)P(2,2)=720 (XXX has P(5,3) kinds, choose 2 of the 4 vacancies in _X_X_X_(4 2) \binom{4}{2}(24) , there are P(2,2) kinds of arrangements of 1 and 2)
There are a total of 120+600+600+720=2040

6.

Arrange for 5 people to visit 3 schools, with at least one person from each school. How many arrangements are there?
The original problem can be transformed into: 5 different balls are put into 3 different boxes, no empty boxes are allowed, there are 3! S (5, 3) 3!S(5,3)3!S(5,3 ) S (5, 3) = S (4, 2) + 3 S (4, 3) = 2 3 − 1 + 3 (4 2) = 7 + 3 × 6 = 25 S(5,3) \
\=S(4,2)+3S(4,3) \\=2^{3}-1+3\binom{4}{2} \\=7+3\times 6=25S(5,3)=S(4,2)+3 S ( 4 ,3)=231+3(24)=7+3×6=25

3 ! S ( 5 , 3 ) = 150 3!S(5,3)=150 3!S(5,3)=150

8.

There are 7 types of balls, each with 1 to 7 stars. In an event, the organizer randomly distributed gift boxes with two such balls in each box. How many types of such gift boxes are there?

The original problem can be transformed into: put 2 identical small balls into 7 different boxes, allowing them to be empty. Total (2 + 7 − 1 2) = 28 \binom{2+7-1}{2}=28(22+71)=28 types
You can also use infinite sets ofrrr combination,n = 7 n=7n=2 of 7 types of ballsThe combination of 2 is (2 + 7 − 1 2) = 28 \binom{2+7-1}{2}=28(22+71)=28

12.

S = { n 1 ⋅ a 1 , n 2 ⋅ a 2 , . . . , n k ⋅ a k } S=\{n_1\cdot a_1,n_2\cdot a_2,...,n_k\cdot a_k\} S={ n1a1,n2a2,...,nkak} , wheren 1 = 1 n_1=1n1=1 n 2 + n 3 + . . . + n k = n n_2+n_3+...+n_k=n n2+n3+...+nk=n , proveSSThe number of circular arrangements of S is equal to n ! n 2 ! n 3 ! . . . nk ! \frac{n!}{n_2!n_3!...n_k!}n2!n3!...nk!n!
∑ i = 1 k n i = n + 1 \sum_{i=1}^kn_i=n+1 i=1kni=n+1The
total number of permutations of multiple sets
(n + 1) ! 1 ! n 2 ! n 3 ! . . . nk ! \frac{(n+1)!}{1!n_2!n_3!...n_k!}1!n2!n3!...nk!(n+1)!
Total n + 1 n+1n+1 element,( n + 1 ) (n+1)(n+1 ) The number of circular arrangements of elements is the total number of arrangements divided by the total number of elements(n + 1) (n+1)(n+1)

即:
( n + 1 ) ! first ! n 2 ! n 3 ! . . . nk ! / ( n + 1 ) = n ! n 2 ! n 3 ! . . . nk ! \frac{(n+1)!}{1!n_2!n_3!...n_k!}/(n+1)=\frac{n!}{n_2!n_3!...n_k!}1!n2!n3!...nk!(n+1)!/(n+1)=n2!n3!...nk!n!

30

Prove: The perimeter is 2 n 2n2 n , the number of triangles with integer side lengths is equal tonnThe 3-divided number of n .
Satisfy:x + y + z = n x+y+z=nx+y+z=n,则2 ( x + y + z ) = 2 n 2(x+y+z)=2n2(x+y+z)=2n,其中
( x + y ) + ( x + z ) = 2 x + y + z > y + z (x+y)+(x+z)=2x+y+z>y+z (x+y)+(x+z)=2x _+y+z>y+z
( x + y ) + ( y + z ) = 2 y + x + z > x + z (x+y)+(y+z)=2y+x+z>x+z (x+y)+(y+z)=2 y+x+z>x+z
( y + z ) + ( x + z ) = 2 z + x + y > x + y (y+z)+(x+z)=2z+x+y>x+y (y+z)+(x+z)=2z _+x+y>x+y
( x + y ) , ( y + z ) , ( x + z ) (x+y),(y+z),(x+z) (x+y),(y+z),(x+z ) can form a triangle with a perimeter of2 n 2n2 n
Let the perimeter of the triangle be2 n 2n2 n , the side lengths are a, b, ca, b, crespectivelya,b,c a + b + c = 2 n , n = a + b + c 2 a+b+c=2n,n=\frac{a+b+c}{2} a+b+c=2 n ,n=2a+b+c
x = n − a , y = n − b , z = n − c x=n-a,y=n-b,z=n-c x=na,y=nb,z=ncx + y = 2 n − a − b = c , y + z = 2 n − b − c = a , x + z = 2 n − b − c = a x+y=2n-ab=c, y+z=2n-bc=a,x+z=2n-bc=ax+y=2n _ab=c,y+z=2n _bc=a,x+z=2n _bc=a
则满 Footx+ y + z = n x+y+z=nx+y+z=n 'snThree splits of n ( x , y , z ) (x,y,z)(x,y,z ) can construct a circumference of2 n 2n2n triangle . The perimeter is2n 2nThe number of triangles in 2 n isnn3-split number of n

31

n n n people go out for a picnic, whererrr people sit in a circle, andn − r nrnHow many different plans are there for r people in a circle?

Choose rrr total of individuals(nr) \binom{n}{r}(rn) scheme,rrThe r personal circle arrangement isr ! r = ( r − 1 ) ! \frac{r!}{r}=(r-1)!rr!=(r1)!, ( n − r ) (n-r) (nr ) Personal circle arrangement( n − r ) ! n − r = ( n − r − 1 ) ! \frac{(nr)!}{nr}=(nr-1)!nr(nr)!=(nr1)!

( n r ) ( r − 1 ) ! ( n − r − 1 ) ! = n ! ( n − r ) r \binom{n}{r}(r-1)!(n-r-1)!=\frac{n!}{(n-r)r} (rn)(r1)!(nr1)!=(nr)rn!kind of plan.

32

Put nnn small balls of different colors are placed inrrHow many ways are there for r boxes of different shapes to have exactly one empty box? There are exactlym ( m < n ) m(m<n)m(m<How many ways are there to place n ) empty boxes?

There is exactly one empty box, and each box may be an empty box, totaling rrr boxes. Forr − 1 r-1r1 box, the problem is transformed into:nnn balls are placedr − 1 r-1r1 box, no empty boxes allowed, total( r − 1 ) ! S ( n , r − 1 ) (r-1)!S(n,r-1)(r1)!S(n,r1 ) species. Multiplying the two, the total isr ! S ( n , r − 1 ) r!S(n,r-1)r!S(n,r1 ) species.

Exactly mmm empty boxes, fromrrSelect mm from r boxesm empty boxes, total(rm) \binom{r}{m}(mr) kind. Forr − m rmrm boxes, the problem is transformed into:nnn balls are placedr − m rmrm boxes, empty boxes are not allowed, total(r − m)! S (n, r − m) (rm)!S(n,rm)(rm)!S(n,rm ) species. Multiplying the two, the total is(rm) (r − m)! S (n, r − m) \binom{r}{m}(rm)!S(n,rm)(mr)(rm)!S(n,rm ) species.

33

If any three diagonals in a convex decagon have no common points (that is, they do not intersect at the same point), how many line segments are these diagonals divided into by their intersection points?
Number of diagonals ( 10 2 ) − 10 = 35 \binom{10}{2}-10=35(210)10=35 , number of intersections(10 4) = 210 \binom{10}{4}=210(410)=210 .
BookIIThe number of intersection points ni n_i on i diagonalsni, then the line segment has ni + 1 n_i+1ni+1条,
∑ i = 1 35 ( n i + 1 ) = ∑ i = 1 35 n i + 35 \sum_{i=1}^{35}(n_i+1)=\sum_{i=1}^{35}n_i+35 i=135(ni+1)=i=135ni+35

Each intersection point is formed by the intersection of 2 diagonals, ∑ i = 1 35 ni = 2 × 210 = 420 \sum_{i=1}^{35}n_i=2\times 210=420i=135ni=2×210=420

The total number of line segments is 420+35=455

Guess you like

Origin blog.csdn.net/qq_46640863/article/details/135156163