GithubHelp home page GithubHelp logo

niklasmohrin / lean-seminar-2023 Goto Github PK

View Code? Open in Web Editor NEW
1.0 3.0 0.0 336 KB

Construction of a flow equivalent forest from a flow matrix in Lean 4

License: MIT License

Lean 99.55% Nix 0.45%

lean-seminar-2023's Introduction

Construction of a Flow Equivalent Forest in Lean 4

Setup

  1. Install elan.
  2. Run lake exe cache get to not compile mathlib4 yourself.
  3. Run lake build to check the project.

Theorem

For an undirected flow network $G$, we define its flow matrix to be the matrix $M$ such that for all vertices $u$, $v$, the value $M[u, v]$ is the max flow in $G$ from $u$ to $v$ (and $M$ is undefined along the diagonal).

For all $M$, it holds that $$M \text{ is the flow matrix of some undirected network } G \iff M \text{ is symmetrical and } \forall u, v, w: \min(M[u, v], M[v, w]) \le M[u, w].$$

In particular, given a matrix $M$ with the conditions of the right side, we can construct an undirected network $G$ with flow matrix $M$ whose underlying graph of all non-zero capacity edges is acyclic. This implies that for any undirected flow network, there is a flow network based on a forest that has the same maximum flow between any two vertices.

The main result of our project is the construction of the acyclic network for a given matrix, see FlowEquivalentForest/Flow/Matrix.lean.

Bibliography

  • Gomory, Ralph E., and Tien Chung Hu. "Multi-terminal network flows." Journal of the Society for Industrial and Applied Mathematics 9.4 (1961): 551-570.

lean-seminar-2023's People

Contributors

niklasmohrin avatar franzsw avatar postmartem avatar schmidtjonas avatar

Stargazers

Junyan Xu avatar

Watchers

Junyan Xu avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.