EDITORIAL: Due to my bad math fundamentals, coupled with the lack of knowledge generation function, so this afternoon I dropped and non-dropped in the superposition state. And I write \ (\ LaTeX \) is very slow, so the notes quite confusing and incomplete. It means I do not understand too much food.
1. General generating function
Directly to the sequence written in the form of a polynomial. You can be a backpack.
- Formal power series: only care factor, do not care \ (x \) specific value. As long as easy operation, it can be \ (X \) any value is calculated.
\[1+x+x^2+…=\frac{1}{1-x}\]
Obviously, this thing is not right, such as \ (x = 2 \) on the gg.
But we are hard point \ (0 <the X-<1 \) , it is right.
- Example: seeking sequence \ (\ {0,1,4, ..., n ^ 2, ... \} \) generating functions.
Subtraction dislocation like to consider.
\[f(x)=\sum_{i=0}i^2x^i\]
\[x\cdot f(x)=\sum_{i=1}(i-1)^2x^i=\sum_{i=1}i^2x^i+\sum_{i=1}-2i\cdot x^i+\sum_{i=1}x^i\]
\[(1-x)f(x)=2\sum_{i=1} i\cdot x^i-\sum_{x=1}x^i=\frac{2x}{(1-x)^2}-\frac{x}{1-x}\]
\[f(x)=\frac{x^2+x}{(1-x)^3}=\frac{x(x+1)}{(1-x)^3}\]
2. The exponential generating function
The form \ (f (x) = \ sum \ frac {a_ix ^ i} {i!} \) Things, when the convolution will automatically generate a number of combinations, permutations type suitable for solving the problem.
\[f(x)=\sum_{i=0} \frac{x^i}{i!}=e^x\]
\ (e ^ x \) in the unfolded at the above equation is zero, although I do not know how to start.
\[f(x)=\sum_{i=0} \frac{x^{2i}}{(2i)!}=\frac{e^x+e^{-x}}{2}\]
The \ (x = -x \) is substituted into the first equation, and then adding the two.
\[f(x)=\sum_{i=0} \frac{x^{2i+1}}{(2i+1)!}=\frac{e^x-e^{-x}}{2}\]
Empathy.
- Circular convolution
Probably the result after the convolution of the index modulo.
FFT is the essence of the one-dimensional circular convolution, but to ensure that \ (the n-\) (circulation section) long, so it will not overflow (ie, modulo not required here).
Can be extended to two-dimensional, it is necessary to have two-dimensional DFT over the subscripts modulo.Even it can be extended to \ (k \) dimension for each dimension alone do just fine.
- For circular convolution, we need to do to cycle the length of the array of DFT section, so the next teacher told a DFT of any length \ (O (k \ log k ) \) fairy practice, and I'm (almost) understand the but because the formula is too long, I can not remember for long. Myy is the source of paper.
- \ (n-\) points \ (m \) have edges directed graph, the right side is a tuple \ ((a_i, B_i) \) , there is initially a tuple \ ((0,0) \ ) , each through an edge weight value becomes \ (((a_i + X) \ n-MOD, (Y + B_i) \ MOD (n--. 1)) \) . For each triplet () \ (I, X, Y) \ , determined from the point \ (I \) , goes through exactly \ (K \) edges Back \ (I \) point, the final value of as \ ((x, y) \ ) number scheme. \ (n-\ Leq 22 is, K \ ^ Leq 10. 9 \) .
Obviously, this is a two-dimensional circular convolution. Each element of the matrix of fast power as a matrix multiplication cycle is defined as a two-dimensional convolution. Each transition matrix for cyclic convolution matrix pretreated in the DFT, will be able to single cyclic convolution reduced complexity \ (O (^ n-2) \) , then the fast power matrix, overall complexity \ ( O (n-^. 5 \ log K) \) .
(By the way, barely above what I understand, it is impossible to write to write out)
- The next question is a god, like circular convolution square root, I dropped the.
- \ (m \) points of view of any one of length \ (K \) paths have multiple answers generated \ (C (n, len) \) contribution, the answer to \ (P \) modulo. \ (m \ Leq 10, K \ Leq 1000, P \ equiv1 (\ K MOD), n-\ Leq 18 is 10 ^ {} \) .
Each point plus a self-loop, so that \ (C (n, len) \) to a length translates into exactly \ (n-\) path, and the contributions are \ (1 \) .
Consider the fast power matrix, each dot needs to maintain a length \ (K \) array, \ (F_i \) represents the length \ (\ I equiv (\ K MOD) \) , the multiplication of this array is defined cycle volume product.
Violence done \ (O (m ^ 2 ^. 3K \ log n-) \) , but can be usedI would not have theSomething behind interpolation made DFT, do \ (O (m. 3K ^ \ ^ log K + n-2) \) .
- Binding Polya Theorem: a \ (n-\) points ring, dyed \ (m \) color, each color requires exactly \ (C_i \) a.
Polya Theorem sets can be found in, directly generating functions do just fine.
- Newton iteration
Not derivative, Taylor will not be launched, is down.
- Inverse polynomial / division / \ (\ LN \) / \ (\ exp \) / multi-evaluated / multi-point interpolation
Turn left your template Valley area, please. But NOI to 19 years did not test too FFT, it is estimated that things learned also futile.
- Seeking \ (n-\) of the partition number (integer sequences and not fall).
\ (O (\ sqrt n) \) practices:
For \ (a_i \ leq \ sqrt n \) case, the backpack can do.
Otherwise, such a \ (a_i \) up to \ (\ sqrt n \) a, can violence.
\ (O (n \ log n ) \) practices:
Polynomial \ (\ LN \) , Polynomials, polynomial \ (\ exp \) .
what is this? do not know.
- Then God is a problem, obviously I was cutting out.
- Then God is a problem, obviously I was cutting out.
- Then God is a problem, obviously I was cutting out.
- Then God is a problem, obviously I was cutting out.
Ah, not your network card.