Thursday, November 3, 2016

Graph Theory Push Relabel Algorithm Implementation in JavaScript

Introduction

When a Graph Represent a Flow Network where every edge has a capacity. Also given that two vertices, source 's' and sink 't' in the graph, we can find the maximum possible flow from s to t with having following constraints:
  1. Flow on an edge doesn't exceed the given edge capacity
  2. Incoming flow is equal to Outgoing flow for every vertex excluding sink and source

Wednesday, November 2, 2016

Ford Fulkerson Algorithm for Maximum Flow Problem


Introduction

When a Graph Represent a Flow Network where every edge has a capacity. Also given that two vertices, source 's' and sink 't' in the graph, we can find the maximum possible flow from s to t with having following constraints:
  1. Flow on an edge doesn't exceed the given edge capacity
  2. Incoming flow is equal to Outgoing flow for every vertex excluding sink and source