2019/10/2 Graph Theory Test Summary

T1:

  Meaning of the questions: find a tree two points disjoint paths, making them the right and the point of maximum;

  Thought process: think of a similar problem - the trees do the most right side k edges do not cross paths and, for the thought of the split point edge, and soon found wrong. Taking into account only two sides of a diameter so calculated first, and then a second way to see whether the discussion classification after the first diameter, the bfs without selecting the maximum value, after the request for each point of the longest diameter a to its endpoint, the dot diameter does not pass through the chain, and then selecting the maximum value greedy.

  Solution: the same idea;

T2:

  The meaning of problems: a complete graph, a tree class, full distance between two points is equal to the distance between the FIG tree points, find the longest path in the complete Hamiltonian FIG;

  Process Considerations: thought to take out, taking 60% of the data for N <= 1e3, and Figure violence thought weighted bipartite graph matching; if elected later found u-> v path can not be selected from the v-> u of road, consider the cost flow, and then want to build a map of the various operations, we found that there are always some small problems, want to take the last few minutes the second best 30 points did not get a (small test did not want to cheat points);

  Solution: Do not discuss from the complete graph, consider the case of the tree. First consider the Hamiltonian circuit, each tree selected on the boundary edge (preferably constant) smaller size of the two subtrees * 2 it is connected, and one side of the Hamiltonian path simply remove it, and this obviously the best edge connected in its center of gravity;

T3:

  Meaning of the title: a graph, each point has a height, each side has a length, has an initial height, went from 1 to n, walk the length of a fall a height at the point you can take time to adjust the height, are asked the shortest time to the top of the n points;

  Thought process: no;

  Solution: Consider the height is 0, the length of each path to climb on the line. When a high degree of direct jump (jump over if the height of the point v considered separately), up to a height of 0. Run the shortest;

Guess you like

Origin www.cnblogs.com/Cduiz/p/11618812.html