2019 summer training Day1 composition count Jinhua

Autistic training Day1

Combination count

T1

\ (the n-\ Le 10 \) : direct violence enumeration.

\ (n-\ Le 32 \) : Meet in The Middle, if left elected \ (X \) , the right chose \ (Y \) (and \ (X + Y \ Le B \) ), then the answer contribution is
\ [{Bx-y + n
-1 \ choose n-1} \] The Vandermonde Durham equation
\ [{a + b \ choose n} = \ sum_ {i = 0} ^ n {a \ choose i} {b \ choose ni} \]
Therefore, the above can be disassembled into the
\ [\ sum_ {i = 0
} ^ {n-1} {Cx \ choose i} {- y \ choose ni-1} \] enum \ ( the X-\) , about \ (y \) is a prefix and.

AGC036 F

Without limiting the lower bound, only \ (p_i \ in [0, r_i] \) restrictions, so the \ (r_i \) sorting program number is
\ [\ prod (r_i-i
) \] then for \ (p_i \ in [L_i, r_i] \) , can be found in the \ (x = i, y = p_i \) image, must be a ring:

Observation image, \ (R & lt [. 1, n-] \) is the largest, if it must chose at the top, the \ (l [1, n] \) and \ (r [n + 1,2n] \) mixed together. And if \ (L_i> l_j \) , so \ (r_i> r_j \) .

What sort of mixed together. If you know the total selected a few \ (L [1, the n-] \) , then the current rankings can also be selected after seeking out.

Therefore, the outer layer is selected from the enumeration \ (K \) a \ (L \) , then the inner DP: set \ (dp_ {i, j} \) represents the former \ (I \) substituents selected from the \ (J \) a \ (a \) the number of programs. Finally out \ (dp_ {2n-1, k} \) Contribution answer.

Unequal relationship

The \ (> \) regarded as "unlimited" - "<" to the inclusion and exclusion, it may then be seen as <<?<?<<<????<?a serial number request scheme. The \ (<\) regarded as an edge, it is the \ (n-\) number of the plurality of sets thrown so, the program number is
\ [\ frac {n!}
{\ Prod size_i!} \] Can be set \ (dp_i \) represents the former \ (I \) the number of packets, the number of coefficients with the program repellent capacity, can then be enumerated position to transfer a packet.

FFT uses divide and conquer to transfer, you can do \ (O (the n-\ log ^ the n-2) \) .

T4

If you found a direct count of the number of columns per row by each program together, then the weight will be counted.

When will re-count it? It can be shown that only the form

The time will be counted weight.

We force the line of intersection takes up, inclusion and exclusion of illegal programs, enumerate a few of the ranks not legal, to give
\ [\ sum_ {i = 0 } ^ n (-1) ^ i {n \ choose i} { m \ choose i} i! (
m + 1) ^ {ni} (n + 1) ^ {mi} \] gone.

Random Cube

Can be found, \ ([0,1] \) uniformly and randomly placed directly within \ ((of WXH)! \) Permutations are equivalent.

Binomial inversion, for the sake of converting \ (F_k \) represents at least \ (K \) th is a great number of programs.

First consider the case of two-dimensional. If a point is great, then the number of a row to be smaller than him.

To carry out a great point, you may assume they are down a diagonal line from the top left corner, and is a monotonically decreasing.

So not great for a point, it's the only limit is less than the minimum and maximum point him in the same row / column.

The number can then be seen as less than one edge point in the rectangular structure constitutes a forest, where the lower right corner point no father.

The stack number is \ (\ frac {n!} {\ Prod size_i} \) concluded, the number of programs that can be analyzed
\ [(nm)! / ( \ Prod_ {i = 1} ^ k (nm - (Ni) (mi))) \]
(about it)

Then take on a pile of number combinations is the answer.

Extended to three-dimensional, it should be similar. (probably)

random graph

Set \ (p_ {n, m} \) represents \ (n-\) dots, random \ (m \) edges, the probability of communication.

Set \ (n-Q_ {,} = m. 1-n-P_ {,} m \) .

The answer is \ (\ {n-sum_m Q_, m} \) .

Inductive proof, can know \ (n-Q_ {,} m = \ sum_ I = {0} ^ {^ n-C_ {n-2}, I} (I / ^ n-2) ^ m \) .

So the answer is
\ [\ sum_m \ sum_ {i = 0} ^ {n ^ 2} c_ {n, i} (\ frac i {n ^ 2}) ^ m \\ = \ sum_ {i = 0} ^ { n ^ 2} c_ {n,
i} \ frac 1 {1- \ frac i {n ^ 2}} \] Finally, in some way determined \ (n-C_ {,} I \) , it is finished.

The cushions

endless spin

显然\(\min-\max\)容斥,转换为每一种撒点方法的\(\frac{1}{n(n+1)-\sum s(s+1)}\)之和。

\(dp_{i,j}\)表示前\(i\)个点,\(\sum s(s+1)=j\),带容斥系数的方案数。

转移\(O(n)\),总复杂度\(O(n^4)\)

LGV lemma

对于一个有向无环图,给定\(a_{1..n}\)\(b_{1...n}\),求\(a_1\rightarrow b_1\)\(a_2\rightarrow b_2\),……的路径组,并且他们两两不想交的方案数。

\(g_{u,v}\)表示\(a_u\rightarrow b_v\)的方案数,那么答案就是\(g\)的行列式。

Guess you like

Origin www.cnblogs.com/p-b-p-b/p/11305217.html