Algorithm study notes: network flow #1-related content + algorithm navigation

Algorithm study notes: network flow #1-related content + algorithm navigation

1 Introduction

Network flow is a type of graph theory.

Network flow appears to be a new thing, in fact, is the new wine in old bottles, I believe you will find finished after some basic definitions of what this stuff now to the drawing there is nothing different.

Because there are a lot of network flow algorithms, this article provides algorithm navigation in addition to the basic definitions, and adds subsequent algorithm study notes to this blog.

2. Detailed

First of all, we need to understand one thing: what is a network stream?

In fact, the network flow is just an undirected graph, with just a different name for the things on the graph.

For example, take a look at the picture below.

Insert picture description here

(Drawing tool: Graph Editor )

Take a look at this directed graph, which is called "network" in the network flow.

Take a closer look and you will find that there are two special nodes in the graph: s, ts, ts,t

s s s is called "source point",ttt is called "meeting point".

The edge rights on the graph are called "flow".

It doesn’t matter if I don’t understand it. I didn’t understand it when I was a beginner. Next, let’s take an example to illustrate what network streaming is:

Assume sss is a reservoir, containing infinite water,ttt is the location of your home, there are 5 lakes on the way, labelled1, 2, 3, 4, 5 1,2,3,4,51,2,3,4,5. Suppose that the lake can store an infinite amount of water.

Of course, water needs to pass through some paths to flow to your home, but these paths are not for unlimited water delivery, such as from sss to1 11 can only give2 22 units of water, too much can not be sent.

Can you understand the network flow in this way?

This directed graph is the "network" in the network flow. In the network, the "source" is the reservoir, the "meeting point" is your home, and the "flow" is the maximum amount of water that can pass through each side.

These are the basic definitions of network flow.

3. Algorithm navigation

Before navigating, briefly give a few algorithms in the network flow:

  1. Maximum flow
    Maximum flow is to ask how much flow can pass from the source point to the sink point, that is, how much water is left at your home.
  2. Minimal cut
    Minimal cut is a bit abstract, mainly asking which edges are deleted so that the source and sink are no longer connected, and output the minimum edge weight.
    It can be proved that the maximum flow = the minimum cut.
  3. Minimum cost and maximum flow.
    For example, now that transportation costs money, transportation from one lake to another requires money. May I ask the minimum amount of money provided that the maximum water volume is met.
  4. Upper and lower bound network flow At
    this time, the flow of each side needs to be within a certain range [l, r] [l, r][l,r ] , no less thanlll cannot be more thanrrr .
    Or you can simply understand that there are some power stations on the path connecting the lake. In order to ensure the normal operation of the power stations, the flow of water passing through is at leastlll , but not too much so as not to damage the machine, at mostrrr

Algorithm navigation:

Some algorithms have not yet been learned, and no titles have been released, so let's wait.

Guess you like

Origin blog.csdn.net/BWzhuzehao/article/details/114949992