Some graph theory, the net Inflow question summary, summary

Source: Internet
Author: User
Tags closure mixed split

Turn from: Here to write the link content
Shortest circuit problem
This type of problem is small and less deformed

POJ 2449 remmarguts ' Date (medium)
http://acm.pku.edu.cn/JudgeOnline/problem?id=2449
Test instructions: Classic problem: K Short Circuit
Solution: dijkstra+a* (REC), many methods
Related: http://acm.pku.edu.cn/JudgeOnline/showcontest?contest_id=1144
This question is also put in the search recommendation question

POJ 3013-big Christmas Tree (Basic)
http://acm.pku.edu.cn/JudgeOnline/problem?id=3013
Test instructions: The simplest shortest way, but this problem to go through, need better program speed and, also pay attention to the accuracy
Solution: Dijkstra

POJ 3463-sightseeing (Medium)
http://acm.pku.edu.cn/JudgeOnline/problem?id=3463
Test instructions: The shortest path and the number of roads that are 1 larger than the shortest
Solution: Need to really understand Dijkstra

POJ 3613-cow Relays (more difficult)
http://acm.pku.edu.cn/JudgeOnline/problem?id=3613
Test instructions: To find the shortest path through n edges
Solution: Floyd + multiplication, greed

POJ 3621-sightseeing Cows (medium)
http://acm.pku.edu.cn/JudgeOnline/problem?id=3621
Test instructions: Find a loop, happy value/total path max
Solution: Parametric search + Shortest Path (MS original Bellman Tle, with SPFA only)

POJ 3635-full tank? Medium
http://acm.pku.edu.cn/JudgeOnline/problem?id=3635
Test instructions: Shortest-circuit distortion
Solution: Wide Search
Related: http://hi.baidu.com/hnu_reason/blog/item/086e3dccfc8cb21600e9286b.html

Spanning Tree issues
The basic spanning tree will not be put up.

POJ 1639-picnic Planning (more difficult)
http://acm.pku.edu.cn/JudgeOnline/problem?id=1639
Test instructions: Minimum spanning tree with limited vertex degrees
Solution: Greedy + Prim/kruskal

POJ 1679-the Unique MST (Base)
http://acm.pku.edu.cn/JudgeOnline/problem?id=1679
Test instructions: Determine if MST is unique
Solution: Prim on the line, but still easy to wrong problem

POJ 2728-desert King (medium)
http://acm.pku.edu.cn/JudgeOnline/problem?id=2728
Test instructions: The so-called optimal ratio spanning tree
Solution: Parametric search + prim

POJ 3164-command Network (difficult)
http://acm.pku.edu.cn/JudgeOnline/problem?id=3164
Test instructions: Minimum tree diagram
Solution: Liu Ju algorithm, the probability of this test is relatively small bar.

POJ 3522-slim Span (Base)
http://acm.pku.edu.cn/JudgeOnline/problem?id=3522
Test instructions: Ask for a spanning tree to minimize the minimum edge difference of the maximum edge
Solution: Kruskal Utilization

connectivity, degrees, topological issues
This kind of problem mainly involves the DFS, shrinks the point and so on skill

POJ 1236-network of schools (Basic)
http://acm.pku.edu.cn/JudgeOnline/problem?id=1236
Test instructions: Ask how many edges are added to become fully connected graphs
Solution: Pinch point, see degree

POJ 1659-frogs ' Neighborhood (Basic)
http://acm.pku.edu.cn/JudgeOnline/problem?id=1659
Test instructions: Constructing a diagram based on a degree sequence
Solution: Greedy, detailed proof see Havel theorem

POJ 2553-the Bottom of a Graph (base)
http://acm.pku.edu.cn/JudgeOnline/problem?id=2553
POJ 2186-popular Cows (Basic)
http://acm.pku.edu.cn/JudgeOnline/problem?id=2186
Test instructions: The point of the strongly connected component with a scale of 0

POJ 2762-going from U to V or from V to u? Medium
http://acm.pku.edu.cn/JudgeOnline/problem?id=2762
Test instructions: One-way connected graph determination
Solution: Pinch + DP to find the longest chain

POJ 2914-minimum Cut (difficult)
http://acm.pku.edu.cn/JudgeOnline/problem?id=2914
Test instructions: Minimal cut of graph without direction
Solution: Stoer-wagner algorithm, using network flow enumeration to determine the hanging

POJ 2942-knights of the Round Table (difficult)
http://acm.pku.edu.cn/JudgeOnline/problem?id=2942
Test instructions: Whether or not the double-unicom component (or block) contains odd rings
Solution: Finding two-connected components and making black-and-white dyeing to determine the two-part graph
Related: http://hi.baidu.com/zfy0701/blog/item/57ada7ed104ce9d2b31cb104.html

POJ 3177-redundant Paths (medium)
http://acm.pku.edu.cn/JudgeOnline/problem?id=3177

POJ 3352-road Construction (medium)
http://acm.pku.edu.cn/JudgeOnline/problem?id=3352
Test instructions: How many edges can be added to become bidirectional connected graphs
Solution: Divide the cutting edge of the different components of the shrinking point tree, the degree of view
Recommended comparison of the next 1236, a graph to add how many edges into a strong connected graph

POJ 3249-test for Job (base)
http://acm.pku.edu.cn/JudgeOnline/problem?id=3249
Solution: Bfs/dfs + DP

POJ 3592-instantaneous Transference (Basic)
http://acm.pku.edu.cn/JudgeOnline/problem?id=3592
Solution: Shrinking point, the longest road, less people do water problems, attention to detail

POJ 3687-labeling Balls (medium)
http://acm.pku.edu.cn/JudgeOnline/problem?id=3687
Solution: Topological ordering

POJ 3694-network (Medium)
http://acm.pku.edu.cn/JudgeOnline/problem?id=3694
Solution: Double connected component + and check set

2-sat problems
It is not difficult to understand the meaning of this type of problem

POJ 2723-get Luffy Out (medium)
http://acm.pku.edu.cn/JudgeOnline/problem?id=2723
POJ 2749-building Roads (more difficult)
http://acm.pku.edu.cn/JudgeOnline/problem?id=2749
Solution: two points + 2-sat judgment

POJ 3207-ikki ' s story Iv-panda ' s Trick (Foundation)
http://acm.pku.edu.cn/JudgeOnline/problem?id=3207
Solution: Simple 2-sat, but other methods are faster

POJ 3648-wedding (Medium)
http://acm.pku.edu.cn/JudgeOnline/problem?id=3648
Solution: It will be more interesting to do with 2-sat, but the search is still 0ms

POJ 3678-katu Puzzle (Basic)
http://acm.pku.edu.cn/JudgeOnline/problem?id=3678
Solution: Directly according to the combined composition of the test.

POJ 3683-priest John ' s busiest day (medium)
http://acm.pku.edu.cn/JudgeOnline/problem?id=3683
Solution: N^2 The compatibility of the enumeration points between the composition, the solution 2-sat

Maximum flow problem
A lot of deformation, the understanding of the minimum cutting maximum flow theorem is the key

POJ 1149-pigs (more difficult)
http://acm.pku.edu.cn/JudgeOnline/problem?id=1149
An absolutely classic composition question

POJ 1273-drainage ditches (Basic)
http://acm.pku.edu.cn/JudgeOnline/problem?id=1273
Maximum Inflow Gate

POJ 1459-power Network (Basic)
http://acm.pku.edu.cn/JudgeOnline/problem?id=1459
Basic composition

POJ 1637-sightseeing Tour (Crazy)
http://acm.pku.edu.cn/JudgeOnline/problem?id=1637
Test instructions: To find out whether the Euler traces of mixed graphs exist
Solution: Non-directional arbitrary orientation, composition, detailed construction of black book P324

POJ 1815-friendship (Medium)
http://acm.pku.edu.cn/JudgeOnline/problem?id=1815
Test instructions: Ask for the smallest point cut
Solution: Convert the split to edge cut.
Related: http://hi.baidu.com/zfy0701/blog/item/a521f230b06dea9fa9018e0e.html

POJ 1966-cable TV Network (medium)
http://acm.pku.edu.cn/JudgeOnline/problem?id=1966
Test instructions: How many points are removed to make the diagram disconnected
Solution: Ninding Source Point, enumerate meeting point to seek point cut set (transition to seek edge cut), the smallest point cut

POJ 2112-optimal Milking (Basic)
http://acm.pku.edu.cn/JudgeOnline/problem?id=2112
Binary enumeration, Max Stream

POJ 2391-ombrophobic bovines (medium)
http://acm.pku.edu.cn/JudgeOnline/problem?id=2391
Test instructions: Floyd, split, two-point enumeration
Related: http://hi.baidu.com/zfy0701/blog/item/3e0006c4f73f0eaf8226acff.html

POJ 2396-budget (Medium)
http://acm.pku.edu.cn/JudgeOnline/problem?id=2396
Test instructions: A feasible flow of upper and lower bounds with Yuanhui
Solution: Compose with matrix-network flow model, then split the edges
Related: http://hi.baidu.com/zfy0701/blog/item/6449d82a64e15e3e5343c1ba.html
, the application of minimum cut model in competition

POJ 2455-secret Milking Machine (Basic)
http://acm.pku.edu.cn/JudgeOnline/problem?id=2455
Binary enumeration, which generally requires write-to-edge capacity update operations instead of all re-framing each time

POJ 2699-the Maximum Number of strong Kings (more difficult)
http://acm.pku.edu.cn/JudgeOnline/problem?id=2699
Solution: Enumerator + Max Flow (thanks to xpcnq_71 Daniel's tips for building the map)

POJ 2987-firing (more difficult)
http://acm.pku.edu.cn/JudgeOnline/problem?id=2987
Test instructions: Maximum weight closure
Solution: First edge weight amplification, first question total-maximum flow, second ask for minimum cut
Related: http://wywcgs.spaces.live.com/blog/cns!4D861A02A3382142!1109.entry?&_c02_owner=1
Profit (Medium)
http://www.vijos.cn/Problem_Show.asp?id=1352
Special case of the most powerful closure diagram
ZOJ 2071-technology Trader is also this type, lazy did not do
http://acm.zju.edu.cn/show_problem.php?pid=2071

POJ 3084-panic (medium, good title)
http://acm.pku.edu.cn/JudgeOnline/problem?id=3084
Test instructions: Slightly
Solution: Based on minimum cut modeling

POJ 3155-hard Life (very challenging)
http://acm.pku.edu.cn/JudgeOnline/problem?id=3155
Test instructions: Maximum density sub-graph
Solution: Parametric search + maximum weight closure diagram, A.v.goldberg paper (NB solution)
The application of minimum cut model in the competition of informatics there is also a talk in the article

POJ 3189-steady Cow Assignment (medium)
http://acm.pku.edu.cn/JudgeOnline/problem?id=3189
Test instructions: Finding the smallest interval to complete the match
Solution: This problem fully illustrates the strength of SAP, pure violence can be over. A better approach is to continually delete and add edges to continue the network flow during the enumeration interval.

POJ 3204-ikki ' s Story i-road Reconstruction (Foundation)
http://acm.pku.edu.cn/JudgeOnline/problem?id=3204

ZOJ 2532-internship (Basic)
http://acm.zju.edu.cn/show_problem.php?pid=2532
Test instructions: Determines whether an edge is an edge in a cut
Solution: DFS cut on both sides, or brute force enumeration (need to write an operation to cancel an augmented path (but the data is weak and may not be canceled or mixed))

POJ 3308-paratroopers (more difficult)
http://acm.pku.edu.cn/JudgeOnline/problem?id=3308
POJ 2125-destroying the Graph (difficult)
http://acm.pku.edu.cn/JudgeOnline/problem?id=2125
Test instructions: Minimum point weight coverage

POJ 3469-dual Core CPU (medium)
http://acm.pku.edu.cn/JudgeOnline/problem?id=3469
Test instructions: Min cut

POJ 3498-march of the Penguins (medium)
http://acm.pku.edu.cn/JudgeOnline/problem?id=3498
Test instructions: Network flow that satisfies the point capacity limit
Solution: Split the point capacity into edge capacity, enumerate meeting points

ZOJ 2587-unique Attack (more difficult)
http://acm.zju.edu.cn/show_problem.php?pid=2587
Test instructions: Determine if the minimum cut is unique
Solution: To understand the nature of Dfs seeking minimum cut algorithm

Spoj 839-optimal Marks (difficult)
http://www.spoj.pl/problems/OPTM/
Test instructions: Slightly
Solution: Very classic Oh, see Amber's training team paper, according to the label of each to find the smallest cut

SGU 326-perspective (Medium)
http://acm.sgu.ru/problem.php?contest=0&problem=326
A more classical method of composition

Cost Flow issues
Can be km not put here, in addition, feel unless very special diagram, the general use of continuous augmentation path algorithm is enough

POJ 2175-evacuation Plan (medium)
http://acm.pku.edu.cn/JudgeOnline/problem?id=2175
Test instructions: Judging whether the given solution is the optimal solution, the more yin One
Solution: Construct the flow according to the given plan, then eliminate and only take a negative circle

POJ 3422-kaka ' s Matrix travels (medium)
http://acm.pku.edu.cn/JudgeOnline/problem?id=3422
Test instructions: Slightly
Solution: Split Point

POJ 3680-intervals (more difficult)
http://acm.pku.edu.cn/JudgeOnline/problem?id=3680
Test instructions: Slightly, this is still a pretty classic.
Solution: Discuss in more detail

Spoj 371-boxes (Simple)
http://www.spoj.pl/problems/BOXES/
Test instructions: Slightly
Solution: Cost flow, but there seems to be a better approach than network streaming

SGU 185-two Shortest (medium)
http://acm.sgu.ru/problem.php?contest=0&problem=185
Test instructions: Ask for two the shortest path not to be handed
Solution: The cost flow can also be the shortest circuit + maximum flow.

Matching issues
It is important to understand the KM algorithm correctly

Here I would like to say a few words: the most correct solution to the minimum right is to use a large number-the current edge weight, rather than directly to the Benquan (this can only deal with the right and left points equal to the complete dichotomy, that is, K (n, N)

The above is probably still said a bit of a problem, later to add

POJ 1486-sorting Slides (medium)
http://acm.pku.edu.cn/JudgeOnline/problem?id=1486
Test instructions: The necessary side of the dichotomy graph
Solution: Need to really understand the maximum matching algorithm, see http://hi.baidu.com/kevin0602/blog/item/1d5be63b5bec9bec14cecb44.html

POJ 1904-king ' s Quest (medium, good title)
http://acm.pku.edu.cn/JudgeOnline/problem?id=1904
Test instructions: Finding all possible matching edges of a binary graph
Solution: Although the matching algorithm is not used at the end, it is necessary to understand the idea of matching into the strong connected component problem.

POJ 2060-taxi Cab Scheme (Basic)
http://acm.pku.edu.cn/JudgeOnline/problem?id=2060
Test instructions: Minimum path overlay

POJ 2594-treasure Exploration (medium)
http://acm.pku.edu.cn/JudgeOnline/problem?id=2594
Test instructions: Intersect Minimum path overlay
Solution: First pass the closure transformation

POJ 3041-asteroids (Basic)
http://acm.pku.edu.cn/JudgeOnline/problem?id=3041
POJ 2226-muddy fields (Basic)
http://acm.pku.edu.cn/JudgeOnline/problem?id=2226
Test instructions: The coverage of the ranks
Solution: Minimum point set overwrite = maximum match

POJ 2195-going Home (Basic)
http://acm.pku.edu.cn/JudgeOnline/problem?id=2195
Test instructions: Minimum weight matching
Solution: KM algorithm

POJ 2400-supervisor, Supervisee (medium)
http://acm.pku.edu.cn/JudgeOnline/problem?id=2400
Test instructions: Output all minimum weights match
Solution: KM, then backtracking, sweat, input of the two matrices actually is the reverse

POJ 2516-minimum Cost (medium)
http://acm.pku.edu.cn/JudgeOnline/problem?id=2516
Test instructions: Minimum weight matching or minimum cost flow
Solution: Split + km algorithm (only right to get over), cost flow (MS Error may also be too)

POJ 3686-the Windy ' s (more difficult)
http://acm.pku.edu.cn/JudgeOnline/problem?id=3686
Test instructions: Minimum weight matching
Solution: Split, and then despite the KM algorithm to go to the water bar, the data is actually very weak O (* * 2500) 16ms
Related: http://hi.baidu.com/kevin0602/blog/item/2829dc01d7143b087bec2c97.html

Spoj 412-k-path cover (more difficult)
https://www.spoj.pl/problems/COVER/
Test instructions: Slightly
Solution: A match of a bull's fork
Related: http://hi.baidu.com/roba/blog/item/c842fdfac10d24dcb48f31d7.html

SGU 206. Roads (more difficult)
http://acm.sgu.ru/problem.php?contest=0&problem=206
Solution: Classic topic, can also use SPOJ 412 the optimization of the problem

NP problem
is usually a search or DP solution.

POJ 1419-graph Coloring (Basic)
http://acm.pku.edu.cn/JudgeOnline/problem?id=1419
Test instructions: Coloring of graphs
Solution: Search, unfortunately the data of the problem is too weak

POJ 2989-all Friends (difficult)
http://acm.pku.edu.cn/JudgeOnline/problem?id=2989
Test instructions: Maximum number of groups
Solution: Began the mad Tle, and later found the paper: finding all cliques of an undirected Graph (Coen Bron & Joep Kerboscht)

ZOJ 1492-maximum Clique (Basic)
http://acm.zju.edu.cn/show_problem.php?pid=1492
Test instructions: The largest group of graphs
Solution: Search, if required speed, can refer to the corresponding paper

Other
Can't be a big class.

POJ 1470-closest Common Ancestors (Basic)
http://acm.pku.edu.cn/JudgeOnline/problem?id=1470
Test instructions: LCA issues
Solution: Tarjan or RMQ, the other input is disgusting

POJ 1985-cow Marathon (Basic)
http://acm.pku.edu.cn/JudgeOnline/problem?id=1985
Test instructions: Longest path on a tree
Solution: DP

POJ 1986-distance Queries (medium)
http://acm.pku.edu.cn/JudgeOnline/problem?id=1986
Test instructions: LCA
Solution: Tarjan or RMQ

Hoj 11192-justice League (interesting graph theory)
http://acm.hnu.cn:8080/online/?action=problem&type=show&id=11192&courseid=99

Hoj 11277-new Island (interesting graph theory)
http://acm.hnu.cn:8080/online/?action=problem&type=show&id=11277&courseid=109

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.