Graph Theory
The core step of the Prime algorithm is that V is a set of all vertices in a weighted connectivity graph, U is already a node in the smallest spanning tree, starting from any vertex v in the graph, and the set U={v} repeats the following operations: Find an edge with the smallest weight in all UTF-8...
Posted by svgk01 on Thu, 27 May 2021 02:29:27 +0930
1. Maximum network flow Logu P3376 Title Description Gives a network diagram, its source and sink points, and finds the maximum flow of its network. analysis The idea of network flow is to continuously expand on the original basis Based on a greedy idea, first bfs judges if there is an augmentUTF-8...
Posted by Hepp on Sun, 06 Jun 2021 02:39:58 +0930
dijkstra labeling method for single source shortest path If you only need the code, please move to the following 1, dijkstra algorithm introduction complete version 1. Definition overview Dijkstra algorithm is a typical single source shortest path algorithm, which is used to calculate the shortUTF-8...
Posted by oakld on Wed, 23 Jun 2021 04:40:16 +0930
Shortest path algorithm knowledge structure diagram /* Shortest path problem { Single source shortest path { 1.All edge weights are positive { 1.Naive Dijkstra algorithm O(n^2) for dense graphs 2.Dijkstra O(mlog(n)) for heap optimization is suitable for sparse graphs } 2.There is a negative edgUTF-8...
Posted by Elliott on Sat, 10 Jul 2021 02:19:29 +0930
[APIO2018] Duathlon Triathlon Luogu portal If you haven't studied the round square tree, you can enter my blog Learning records and examples of square tree Thinking of solving problems First of all, this is an undirected graph counting problem, so we consider computing on a square tree After buUTF-8...
Posted by AceE on Mon, 12 Jul 2021 08:10:26 +0930
Description There are n cities in Byteland, labeled by 1 to n. The Transport Construction Authority of Byteland is planning to construct n−1 bidirectional roads among these cities such that every pair of different cities are connected by these roads directly or indirectly. The engineering compaUTF-8...
Posted by jainsy on Thu, 05 Aug 2021 02:15:57 +0930
Introduction to AOV network In a directed graph representing engineering, vertices are used to represent activities and arcs are used to represent the priority relationship between activities. Such a directed graph is a network in which vertices represent activities, which is called AOV networUTF-8...
Posted by AShain on Sun, 12 Dec 2021 12:50:32 +1030
subject Give you an integer matrix grid of size m x n, representing a grid. I'll give you three integers, row, col and color. Each value in the grid represents the color of the grid block at that location. Two grid blocks belong to the same connected component, and all the following conditions UTF-8...
Posted by opalelement on Sat, 18 Dec 2021 21:53:17 +1030
The book goes back to the last time. What we study this time is the maximum flow generation problem of the network. 1. What is the maximum network flow? It is a general solution to logistics, oil transportation, water transportation and other problems. How can I maximize the hourly transportatiUTF-8...
Posted by Asperon on Tue, 21 Dec 2021 22:37:33 +1030
Hungarian algorithm + chained forward star This algorithm is used to find the maximum matching number of bipartite graph. Bipartite graph is a graph that can divide the point set into two parts and is not connected to each other. There are many principles on the Internet, such as https://zhuanlUTF-8...
Posted by True`Logic on Sun, 26 Dec 2021 06:18:22 +1030