One-page sliding nav home page design Tutorial HTML CSS is a tutorial on designing a one-page sliding nav. The tutorial is for web designers, web developers, and designers.

Design Tutorial – free project source code Download. *Free One page sliding navbar home page design*

**Hands-on Graph Theory 12 – Maximum Flow (1)**

In this article we will learn the algorithm to find the maximum flow in a graph. Many interesting problems can be solved using the concept of max flow, so it is important to learn it. Before reading this text, you should know the basic algorithms of graph theory, especially shortest path algorithms.

First we look at a very simple max flow problem:

You are given a graph like Figure-1. Think of each edge of the graph as a water pipe. There is a limit to how many liters of water per second can flow through each pipe, which is called the pipe capacity. And the amount of water passing through a pipe in a second is the flow of the pipe. “Flow/Capacity” is specified with each edge. For example, through A->B edge, a maximum of 2 liters of water per second can flow and at the moment water is flowing at 0 liters per second. Only node A allows water to enter and only node F leaves water. A is called the source and F is the sink. What is the maximum number of liters of water per second that can be flowed from A to F? That is, what can be the maximum “flow” of water?

Before solving the main problem we solve a small problem. A->C->D->F How many liters of water can flow from source to sink using this route? The image shows A->C edge capacity 5, C->D edge capacity 3, D->F edge capacity 4. The minimum capacity here is 3, so we can never send more than 3 liters of water this way.

## Free One page sliding navbar home page design

The minimum capacity edge of a path controls the flow of that path. Compared to the narrow mouth of a bottle, this is called a bottleneck. For example, suppose you have a 5MBps internet connection at home, now you want to download a movie. Now the data packet from the movie server goes through many networks before reaching your home, some network speed is only 1MBps. Now you can’t download more than 1MBps no matter how fast the rest of the network is, the slowest part of the network will control your download speed.

Now let’s see how to solve the problem of getting maximum water flow. The solution is very simple, we will continue to send water through either route each time as long as there is capacity in the pipe. But this way we will get the maximum flow? I will get it, but for that I have to use some wisdom. First we send a flow of water in one direction and see what happens. Either way can be chosen, I chose A->B->D->F for ease of explanation. The minimum capacity on this route is 2. Then after sending a flow of 2 liters of water through this path the graph should look like this:

## Before Download

## You must Join our Facebook Group and Subscribe YouTube Channel

**All Links in Below:**

We increase the flow of each edge in the path A->B->D->F by 2. Note that A->B edge has original capacity of 2 and flow sent is 2, so no more flow can be sent through this edge. Similarly B->D edge capacity is 3 but flow sent is 2, so it is possible to send 3-2=1 more flow through this edge. We can say residual capacity of B->D edge = 1, the word residual means the part that is left after using something.

Residual Capacity = Edge Capacity – Amount of used capacity or flow.

Now select the path A->C->D->F in the same way. In this path the original capacity of D->F edge is 4 but 2 flows have already been sent, so the current capacity or residual capacity is 4-2=2. It is possible to send 2 flows through this path.

Now we get a total flow of 2+2=4, ie the water flow rate is now 4 liters per second. Is it possible to send more water flow in this graph? A->B and D->F edges have already reached maximum capacity, there is no path in the graph to sync without taking either of these 2 edges. So it may seem that it is no longer possible to send the flow. But we will send more flow now with intelligence!

*Free One page sliding navbar home page design*

*Free One page sliding navbar home page design*

We now need to draw a residual graph using the residual capacity of each edge to understand how to send more flows. The residual graph size rule is:

1. The capacity of each edge (u,v) of the graph is equal to the residual capacity of the edge.

2. For each edge (u,v) the residual capacity of the opposite edge (v,u) will be equal to the flow at edge (u,v).

That means the amount of flow sent by an edge will be the residual capacity of the opposite edge. Then the sum of the residual capacity of the original edge and the opposite edge in the residual graph will be equal to the total capacity of the original edge edge. The residual graph of the graph in figure-4 will be like this:

The reverse edge and their residual capacity are shown in green. 0 The edges of the capacity are not shown in the graph. As the A->C edge sent 2 flows earlier, the residual capacity of the opposite edge is 2, and the edge has the capacity to send 3 more flows, so the residual capacity of the original edge is 3. This is how the other edges are drawn, you can check it yourself if you got it right or if there is a mistake in my picture.

Now what does it mean to send a flow to the reverse edge? We cannot send water on the opposite side of the pipe or drive on the opposite side of the road. Sending flow in the opposite direction means canceling the original flow! If we send 2flow through D->B edge that means we are canceling 2L water flow coming through B->D edge. Then the residual capacity of the original edge in the residual graph will increase, and the residual capacity of the reverse edge will decrease, the sum will be the same as before!

## Before Download

## You must Join our Facebook Group and Subscribe YouTube Channel

**All Links in Below:**

**Join Our FreeWebsiteCreate Facebook Group to get an instant update for projects, templates, design resources, and solutions.**

**Join Our YouTube Channel & Subscribe with Bell Icon for New Video:**

## Join Our Official Facebook Page For the Latest updates All Code Projects are Free:

## Visit our service page to get **premium services.**

Free Website Create – HTML CSS, PHP, JavaScript Programming Projects For Free

**Follow Us**

**Thank You,**

## Before Download

## You must Join our Facebook Group and Subscribe YouTube Channel

FreeWebsiteCreate.net tries to provide HTML, CSS, SCSS, JavaScript, React, Android Studio, Java, PHP, Laravel, Python, Django, C#(C Sharp), and ASP.net-related projects 100% free. We try to make learning easier. Free Website Create always tries to give free projects to those who are new learners. Free projects and source code will help to learn easily. They can save time and learn more. In this post, we share a free portfolio project website code with HTML and CSS. This free code portfolio contains a single landing page with a responsive design. In this post, we get a free best carpenter and craftsman service website designed by FreeWebsiteCreate with HTML, CSS, Bootstrap, and JavaScript.