当前位置:网站首页>Differential constrained SPFA
Differential constrained SPFA
2022-07-03 18:52:00 【A sensible pigeon】
Bellman-Ford Algorithm and Dijkstra The algorithm is the same as the algorithm for solving the shortest path of single source
Bellman-Ford The algorithm uses DP thought , The time complexity is O(V*E),Dijkstra The algorithm adopts greedy strategy , The time complexity of ordinary implementation is O(V2) among V Is the number of vertices ,E For the number of sides .
Dijkstra There is a feature : Once a vertex is added to S In the after , Its shortest path length will not change , Therefore, it is not suitable for weighted graphs with non negative weights to find the shortest path of a single source
For weighted digraphs G = (V, E),Dijkstra Algorithm requirements diagram G The weights of the middle edges are non negative , and Bellman-Ford The algorithm can adapt to the general situation ( That is, there is a negative weight edge )
SPFA
Shortest Path Faster Algorithm)( Queue optimization ) Algorithm is an algorithm for finding the shortest path of a single source , It also has an important function of judging negative rings ( It will be reflected in the differential constraint system )
边栏推荐
- How to disable the clear button of ie10 insert text box- How can I disable the clear button that IE10 inserts into textboxes?
- Reading a line from ifstream into a string variable
- How many convolution methods does deep learning have? (including drawings)
- [Yu Yue education] world reference materials of Microbiology in Shanghai Jiaotong University
- Sustainable service business models
- 042. (2.11) do it when it's time to do it
- Caddy server agent
- Record: solve the problem that MySQL is not an internal or external command environment variable
- Chisel tutorial - 06 Phased summary: implement an FIR filter (chisel implements 4-bit FIR filter and parameterized FIR filter)
- Processing of user input parameters in shell script
猜你喜欢
Web3 credential network project galaxy is better than nym?
22.2.14 -- station B login with code -for circular list form - 'no attribute' - 'needs to be in path selenium screenshot deviation -crop clipping error -bytesio(), etc
Mysql45 lecture learning notes (II)
2022-2028 global marking ink industry research and trend analysis report
2022-2028 global solid phase extraction column industry research and trend analysis report
多媒体NFT聚合平台OKALEIDO即将上线,全新的NFT时代或将来临
Smart wax therapy machine based on STM32 and smart cloud
VLAN experiment
知其然,而知其所以然,JS 对象创建与继承【汇总梳理】
虚拟机和开发板互Ping问题
随机推荐
Leetcode: 11. Récipient contenant le plus d'eau [double pointeur + cupidité + enlèvement de la plaque la plus courte]
Kratos微服务框架下实现CQRS架构模式
Recent learning experience
199. Right view of binary tree - breadth search
4. Load balancing and dynamic static separation
my. INI file not found
[combinatorics] exponential generating function (proving that the exponential generating function solves the arrangement of multiple sets)
PyTorch中在反向传播前为什么要手动将梯度清零?
CTO and programmer were both sentenced for losing control of the crawler
VLAN experiment
多媒体NFT聚合平台OKALEIDO即将上线,全新的NFT时代或将来临
Typescript official website tutorial
Max of PHP FPM_ Some misunderstandings of children
[combinatorics] exponential generating function (properties of exponential generating function | exponential generating function solving multiple set arrangement)
Dynamic planning -- expansion topics
SQL: special update operation
Does SQL always report foreign key errors when creating tables?
User identity used by startup script and login script in group policy
Boost.Asio Library
Install apache+php+mysql+phpmyadmin xampp and its error resolution