Giter Site home page Giter Site logo

thinkphp / basic-graph-algorithms Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 58 KB

An abstract way of representing connectivity using Nodes(also called vertices) and Edges.

Home Page: https://web.stanford.edu/class/cs97si/

C 29.19% Python 41.14% C++ 29.67%

basic-graph-algorithms's Introduction

Basic Graph Algorithms

    1. Introduction and history
    1. Why Study Graphs
    1. Storing Graphs (Adjcency Matrix and ADjcency List)
    1. Graph Traversal
    1. Special Graphs
    1. Topological Sort
    1. Eulerian Circuit
    1. Minimum Spaning Tree
    1. Strongly Connected Components
  1. An abstract way of representing connectivity using nodes (also called vertices) and edges. We will label the nodes from 1 to n. m edges connect some pairs of nodes. Edges can be either one-directional or bidirectional. Nodes and Edges can have some auxiliary information.

    A graph is a collection of pairs-pairs integers, pairs of people, pairs of cities, pairs of stars, pairs of countries pairs of scientific papers, pairs of web pages, pairs of game positions, pairs of recursive subproblems, even pairs of graphs.

  2. Lots of problems formulated and solved in terms of Graphs

    * Shortest path problems.
    * Network flow problems.
    * Matching problems.
    * 2-SAT problem.
    * Graph coloring problem.
    * Traveling salesman problem ( still unsolved)
    * and many more.
    
  3. Need to store both the set of nodes V and the set of edges E

    * nodes can be store in an array.
    * edges must be stored in some other way.    
     
    Want to support operations such as:
     
    * retrieving all edges incident to a particular node.
    * testing if given two nodes are directy connected.
    
      Use either Adjacency Matrix or adjacency list to store the edges.
      
      Adjacency Matrix: An easy way to store connectivity information.
      
       
      
      Adjacency List
    
  4. Graph Traversal

    • The most basic graph algorithm that visits the nodes of a graph in a certain order.
    • Used as a subroutine in many other algorithms.

    We will cover two algorithms:

    • Depth First Search: uses recursion Stack.
    • Breadth First Search: uses queue.

References

https://web.stanford.edu/class/cs97si/

basic-graph-algorithms's People

Contributors

thinkphp avatar

Stargazers

 avatar

Watchers

 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.