Thinking Questions Practice Session-Mathematics

Please indicate the address for reprint: http://www.cnblogs.com/LadyLex/p/8885799.html

Terrible to finally do math...

I've only seen a little bit of inversion-related stuff before.

Previous Summary: Du Jiaosi  Inversion 

The goal of ascension is thinking, especially the ability to find key properties as a breakthrough.

It is impossible to find a general formula for all problems, especially in mathematics...so developing the ability to observe and analyze key properties is especially important

This blog will also focus on recording the breakthrough key points of each question... I hope I can improve in 2 days...

, , UOJ # 62

  This question is inversion set inversion set inversion 233333

  Experience on this subject:

  First of all, $\mu$ does not have to appear in the inversion process, we can directly use the for loop $O(nln_{n})$ to process it.

  So you can't be limited by $\mu$, but you must observe the relationship between the two functions

  Second, when we encounter a form of $f(gcd(i,j))$ that is not easy to dissolve, we have such an idea:

  Find/construct a new function $g(x)$ such that $f(n)=\sum_{d|n}g(d)$

  In this case, we can turn the limit of $f(gcd(i,j))$ into $\sum_{d|i,d|j}g(d)$

  In this way, new breakthroughs may be found. For example, we can use the two conditions of $d|i$ and $d|j$ separately, or change the enumeration order... and so on.

  Third, there is also a close connection between number theory and linear algebra. Never noticed this before

  For example, our inversion process can actually be expressed as multiplying an inverse matrix

  But because the matrix of Mobius inversion is special, we can have a convenient method.

  In addition, this problem also has a method for understanding linear algebra: we still use the $g$ function above to define the following three matrices:

  $A_{ij]=[j|i]$, $B_{ij}=[i==j]g(i)$, $C_{ij}=[i|j]$, push it to find $ f=A*B*C$,

  Here is a small property that was observed

  If we multiply a matrix A by a matrix B with only elements on the diagonal, then the effect is equivalent to giving each of the i-th row

  The great thing is that the inverses of these three matrices can all be found, so we get $O(n^2)$ to directly calculate the inverse

  The final push sub-optimization can also be done $O(nlog_{n})$

  (But I personally feel that the above three inversions are easy to understand)

  *Let's talk specifically about the linear algebra form of Mohan

  We know that $\sum_{d|n} \mu(d) == [n==1]$

  Then change the shape, there will be $[m|n] \sum_{d|\frac{n}{m}}\mu(d)==[\frac{n}{m}==1]== [n==m]$

  If we treat $n$ and $m$ as subscripts, the above is an identity matrix

  Next, we enumerate $c=m*d$ and continue to deform the original formula, there are:

  $ \sum_{c} [c|n][m|c]\mu(\frac{c}{m})$

  Now, we find two matrices A and B such that $A_{cn}==[c|n]$, $B_{mc}==[m|c]\mu(\frac{c}{m}) $

  Then there will be $BA==I$, where $I$ is the identity matrix

  From the definitions of $f$ and $g$ above, we know that $f=g*A$

  Multiply both sides by $B$, then $f*B=g$, you will find that this is also the formula inversion by Mobius

Later, I looked at the ppt of teacher vfk

Found a great sentence, this kind of idea of ​​using inversion to split the binary restriction relationship into independent is very good

It embodies fwt, dft, fmt, and ordinary Mobius inversion, etc.

Two, loj2513

md stupid Gaussian elimination has 80 points?

It's really touching to get 20 points if the boundary is wrongly judged.

Then I glanced at Mr. Xu Mingkuan's standard program and found a function called gauss? ? ?

Then I'll just think about it myself, what kind of stupid question is this?

Then output the matrix

found to be a lower triangular matrix

md, then I still have n^3 jbs, so just n^2 elimination.

Then this water problem is finished, but I have been playing this problem all morning

what happened? Recall that at first I thought about how the data could be counted, adding up and dividing by the total number of solutions

It took me an hour and a half to finish the naked elimination, and then I handed it in. I found that it was wrong.

Then I changed the calculation method, and then adjusted for more than an hour to find that boundary

Then after getting 70 points, I discovered the nature...

...... Maybe I don't have the same mind with the person who asked the question...

But the next time you do a question, you must first consider all the formulas and boundary conditions.

It is easy to miss the situation while playing

Playing Gaussian elimination in the past two days, I found a new idea: by observing the formula/matrix, you can get $O(n^{2})$ or even $O(n)$ elimination

In fact, it is manual enumeration instead of for loop 233333


Here is the dividing line, this time my efficiency is so low... I only did this question...

Communication between cancers

Next is the topic session that lasts for the morning.

Because I was an idiot, I found out later that there were many wonderful parts that I missed when I was distracted.

Realize what has not been learned in the past, and know that those who come here can be chased... To improve efficiency in the future, we must not let ourselves down...

I feel that the efficiency is extremely low when I discuss with others when I do the questions a few days ago

In the future, when you are doing questions, you should avoid discussion first... I feel guilty about my inefficiency... I'm sorry for my goals...

come on! Come on!

So... let's take a look at this topic

Since the polynomial part is more serious, let's talk about the polynomial first...

First of all, this time I finally solved a problem: how are these XXTs constructed?

Thanks RYF for the explanation, although the two of us sitting together and discussing will always become inefficient 2333333

Now we want a transformation with a complexity better than n^2, which satisfies the forward transformation and inverse transformation (the transformation matrix is ​​invertible)

How to solve it? Since our transformation is a process of "forward transformation --> corresponding bit multiplication --> inverse transformation"

We can write the two positive transformations of the objective formula and the calculation formula on both sides of the equal sign, and change the formula, you will find that the transformation matrix you constructed should satisfy

$T_{k,i} * T_{l,i} = T_{k#l,i)$

This is great, for example, if we solve an equation by hand, we can solve the matrix of $fwt$

In addition, if the subscript system satisfies the circular law, we can also use the unit root to construct it, such as $dft$

In fact, these transformations are all limited by an if statement, which makes it difficult for us to deal with

General restrictions are mod relationship, equality relationship, bit operation relationship...

Then, we need to combine this statement to find a way to convert the limit

For example, if the circular convolution is mod, we use the special judgment of the summation of unit complex roots to find a way to unpack the mod

For the OR/AND transformation of fwt, we turn p|q==r into p belongs to r&&q belongs to r to split the restriction, and then use the high-dimensional prefix sum to do the transformation

gcd in inversion we look for d|i && d|j to remove the limit

For binomial inversion, we replace $n==m$ with the expansion of $(1-1)^n$, then do the inversion, etc.

I feel like I have a new understanding of inversion and transformation...

In addition, I seem to have learned a new skill. Several problems have used this deformation: $ik=((i+k)^2-i^2-k^2)/2$

Another form is $ik=((i+k)(i+k-1)-i(i-1)-k(k-1))/2$, which is more common in circular convolution of arbitrary length middle

However, I just listened to this technology a little, but I haven't actually implemented it...to be filled

In this way, if we have an index with ik piled up when we roll the chicken,

Using this technique, you can unpack the indices that also have $ik$ in the index when rolling, and then you can do

And the lc question is really 6 for the application of difference...

I personally feel that I have never been able to use the difference... I am very weak

There are many uses for our difference. For example, when maintaining information, we can change interval addition to single-point addition, interval addition arithmetic sequence to interval addition...etc.

Can also be used for faders...maybe differentiable if there's something intractable in the expression

split term cancellation

dislocation subtraction

Then you can also observe the properties through the difference, such as the previous question of permutation, and find that the transfer formula is equivalent to the one that exchanges the difference

You can also deal with some monotonic problems by difference, such as the problem of maintaining the difference array of the maximum value of the suffix

But... Having said so much, if I really encounter problems, I still won't use 23333

The inversion part has a nice title bzoj2627 of srs: JZPKIL

This question is pretty good too... One place I didn't think of is factoring the primes

Specifically, since n is very large, we consciously group all the positive functions together, and set them as the function $F$

Then enumerate the prime factors of n, then $f(n)=\prod(f(pi^ki))$

And since this is an inversion problem, he has $mu$... In the case of only one prime factor, mu has only 2 possible values: 1 to the 0th power and -1 to the 1st power

Then our formula is simplified, and we're done!

When there is mu in the formula, this method of decomposing the prime factors seems to be very classic

There are applications of this approach in the classic topics of one's number theory and the beauty of cycles

In addition, yzh's topic is also very good

Individuals can only come up with a partial score of 30 points, and did not derive more formulas

In fact, if you replace the enumeration gcd, you can come up with an algorithm with a higher score?

The positive solution is an algorithm of...$O(n^{\frac{3}{7}})$, which has not been studied yet

It seems that the complexity analysis of some number theory topics (especially these tumor inversions) is also a very important part

Integral is a common gesture

If the complexity analysis is not good, you may make the wrong solution, or you may not dare to make the correct solution.

But now the exam does not seem to be particularly careful to calculate the time and space complexity

Pay attention to this in the future to avoid wasting time because of this

Then there are some probabilistic and game topics

The topic selected by wq is a very good game theory (bzoj4220)

The game theory we talked about before is all about sg functions and other models or conclusions.

But it turns out that high-end players don't play conclusion questions anymore 23333

These game theory topics pay more attention to "game analysis", that is, using human intelligence to analyze the process of the game and consider when the game decision will be good

It's really brain-burning...Analyzing this thing is very examining thinking...

For this problem, we can first analyze the decisions of the two players and write a profit matrix

And then...we realize that if everyone uses a single strategy, two people will never settle on a stable strategy because both are incredibly smart

Then we will realize that we should find a stable strategy with probability, so that neither of them can increase their profits by adjusting their strategies, while the opponent does not move

Although this is the model of Nash equilibrium...but this analysis can also be done without knowing the model

After this, we find the probability of that equilibrium point, so that we have the strategy of two people, and then we can continue the analysis...

I have never seen this kind of game analysis topic before, and I have not specially trained the thinking of analyzing the problem.

If you have time, pick two good questions for training, maybe you can ask two questions from wq

Then, the ltr question seems to be the kind of question with very difficult thinking and short code?

I had no idea when I saw this question before class... As a result, I didn't understand it when I spoke, and I didn't have any ideas at all.

So GG...

And then...feeling guilty listening to wxhao's probabilistic data structures (loj2263),

and wxhui's quantum state fwt (uoj328) when I was distracted...

So I'm basically in a state of ignorance, and I didn't get a lot from the topic.

I feel like I'm at a loss... I haven't learned 3 good questions this time. I don't know if there is time to make up the questions...

The last is the total list of questions, in the order of lectures 2333

uoj62 zzh

bzoj2627 srs

loj509 yzh

Original question+cf901E lc

loj6271 / 548 ryf

uoj328 wxhui

bzoj4220 wq

loj552 ltr

loj2263 wxhao

bzoj4820 wzz

Summarize the math special exam questions?

Now it seems that most of it is actually what was written above?

Obviously it was written after the exam

There is one topic that I think is particularly novel, that is the one that finds loops and makes use of BSGS

I feel like the last thing I think about when I'm doing math problems is loops...weak...

And I haven't thought about using BSGS to find loops. I just know that I can find A^x=B (mod C)

But in fact, that is also a cycle festival... Anyway, I still don't have this awareness.

If there is a loop section, we can reduce the amount of calculation that is originally infinite by the definition of the title

There was a question before that meant to do infinite fwt questions, which can also be done by looking for loops

The awareness of finding the cycle by myself is basically 0... I can't remember the exam.

To develop this awareness...

And then there is a bizarre gauss topic

Take advantage of a large wave of expected linearity

The difficulty of thinking about that question is also quite high, very nb

Final summary:

This mathematics topic seems to be over...

I feel that I am still very empty, and I still can't do it when I see the question...

But this time I learned a lot of new ideas and saw a lot of new questions...

In the future, I will probably find some topics to do like recently.

I found that some data structure problems are also very good, and data structures are not necessarily all cancer problems.

In the future, I will find some good data structure problems and cheating problems as topics.

above.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325012985&siteId=291194637