Stanford University Wang Ying
The acm icpc competition generally involves eight questions within five hours. It comprehensively examines the math, algorithm, coding, and debug capabilities of contestants, as well as the team cooperation capabilities. In mathematics, the capabilities of combining mathematics, graph theory, and number theory are emphasized. The algorithms cover a wide range, involving most classical algorithms and a few cutting-edge algorithms. Because each question must pass all the test data before it can be scored, and the exact solution is required, this limits the application of Approximation Algorithm in some NP-hard questions, so that the search and pruning strategies are very important for NP-hard questions.
Comparison between final questions and regional questions
The official competition of acm icpc can be divided into world final and regional contest. The final question is more orthodox and rigorous, emphasizing the comprehensive application of algorithms. A question often requires the combination of several algorithms. From the perspective of final questions over the past few years, final has increased the number of questions in code and enhanced the requirements for code capabilities. Regional is more flexible, and each Division also has its own question style. The European division is famous for its high quality, and its emphasis on algorithms and mathematics exceeds World final. Many simulation questions in the United States Division emphasize the amount of code. Asia is between the two. At the same time, there are some new divisions every year, so there is no fixed model.
Next, let's talk about the coverage of acm icpc in recent years. Some common algorithms and question types are not well discussed. The following mainly focuses on some novel knowledge points or question types, or some cutting-edge content.
New questions about mathematics
In addition to some basic questions about composite mathematics and composite number theory, in recent years, probability and Combinatorial Game theory have gradually increased. Many interesting questions are based on the Markov process and require some relevant knowledge.
Last year, a very interesting question in the Hangzhou division of China was that a character set (such as {a, B, c}) and a string T (such as acbbcac) were given ), now, from an empty string S, each equi-probability is added with a character in a, B, and C until T is a substring of S. The length of string S is expected. This is a typical Markov process, and its solution can be easily calculated using the generated function. A more interesting version is that if there is another string R, T or R will be terminated when s appears, and the probability of termination in T and R is different. This problem is detailed in Graham, knuth, and concrete mathematics co-authored by patashnik and has a beautiful conclusion.
In terms of game theory, it is mainly about the classic Combinatorial Game theory, but less about zero-sum game and Nash equilibrium. In the past, only a few contestants knew about the title of the SD-Grundy value. Although most of the questions are two-person perfect information impartial game, it is basically possible to solve them by using SD-Grundy theorem, but there have also been misere play cases. Some other questions are solved by finding rules and summarizing them.
In terms of graph theory, the Shanghai Division launched a chordal graph recognition question many years ago, allowing many contestants to invest in the study of string and interval graphs and learn about the perfect graph theory; one year, IPSC came out of consecutive ones problem, which caused contestants to pay attention to the determination of PQ trees and planicharts.
In addition, there are some scattered non-trivial questions, and even some very involved questions. For example, Liu rujia gave an unbreakable tiling question to the Dhaka division. One of my favorite topics is a floodlight problem in northeast Europe four years ago: N points on the plane represent n lamps, each lamp can illuminate a fan-shaped area with a circular angle of 2 * hour/n. Ask how to control the angle of these lights so that the entire plane can be illuminated.
There are also some mathematical problems to test the creative ability. For example, if n is given, it is required to find a matrix of N * n, where each element is an integer between 1 and N and is not equal, at the same time, each row and column have two diagonal lines and two or two. The structure of this question is quite complicated. The simplest method is to generate a random query and determine whether it has this property.
In recent years, almost every year, final has a question about the contestant's calculus ability. There are few differential equations.
There are few questions about large linear equations, complex matrix algebra, and feature value solutions.
New Question Types of Algorithms
The algorithm enhancement is mainly reflected in the fact that new data structures are constantly getting familiar to contestants and some new fields appear in acm icpc.
In terms of data structure, some special balancing trees are gradually mastered, such as splay tree and leftist tree. Interval Tree is widely used for counting. In terms of strings, suffix tree groups that are easy to implement are gradually accepted.
Some algorithms: In terms of network flow, many players began to master the push-relabel algorithm and gave up the classic Ford-Fulkerson Algorithm. After Liu lujia's book was widely circulated, many contestants have mastered the fractional programming and dinkelbach algorithms. Currently, few contestants are skilled in implementing linear programming, but it is expected that this will become a required skill after a while.
Computational ry has always been a problem in acm icpc. It is not only difficult to program, but also difficult to implement due to precision issues. Computational ry is often abandoned during the competition. Even if the algorithm is not very difficult, contestants do not dare to do it at will.
Some scattered classic content has also been tested, such as stable marriage and FFT.
Summary and Forecast
Basically, algorithms that are not too complex in implementation can all come up with an acm icpc question. As the topic's knowledge keeps increasing, more and more such algorithms are included. On the other hand, with the development of algorithms, some original questions without simple algorithms have also appeared new solutions, such questions have also been added to acm icpc. After years of accumulation, acm icpc has a large number of questions, and its coverage is also very wide.
It is foreseeable that some new excellent algorithms will gradually appear in acm icpc. For example, because the Edmonds-carp algorithm of any graph matching is complicated to implement, the ICPC still does not have the current intention matching question (even if it has a very small size ). Vijay vazirani's paper <matching is as easy as matrix inversion> provides a general algorithm for finding matching through matrix inversion, although this algorithm is difficult to implement, I believe it will be used by some contestants, so that some questions of arbitrary graph matching will appear, even more difficult exact match (this problem does not currently have deterministic polynomial-time algorithm, but a probability algorithm can be obtained using the above method ).
Some new fields will surely inspire acm icpc beginners. For example, more and more bio-informatics questions have appeared in ICPC. Some good questions with polynomial algorithms, such as inversion distance of signed permutations, have not yet appeared in the questions due to the complexity of their theory.
There are still countless good questions in graph theory, such as linear time for minimum cut and gomory-hu tree applications, which will certainly appear in ICPC in the near future.
I think another trend will happen is that random algorithms, probability algorithms, and approximation algorithms will account for a larger proportion in ACM ICPC. As for the balance between algorithm capability and code capability testing, I personally like mathematics and algorithms very much. I hope that the final questions will be closer to those in the Central Europe Division.
Acm icpc not only understands and masters classical algorithms, but also creates algorithms. If you learn so many algorithms, you must understand them to solve practical problems with inspiration.
If you are interested, I can analyze a few specific questions or discuss some specific algorithm theories. I would also like to share some experience on ACM, some interesting people I met in major algorithm competitions, and some interesting things I 've experienced. Having written this article in a hurry, omissions are inevitable, and the logic is not consistent. I hope you will forgive me.
[Switch] on the topic style of acm icpc and the development of topics in recent years