Code Monkey home page Code Monkey logo

distributedalgorithms's Introduction

Floodmax implementation (with built-in negative acknowledgement)

Members:

  • Gunjan Munjal - gxm171430
  • Sumit Patel - sxp171330
  • Keith Nguyen - kxn161730 The working branches are "master" and "gunjan". keith and keith-globalQueue are experimental.

Assumptions:

  • Unweighted bidrectional graph.
  • Each vertex has a unique integer ID.

Input:

  • The input graph is stored in graph.txt.
  • Input format:
    • First line is the number of vertices. (n)
    • Second line contains an array of size n with ID of each vertex.
    • n +1 lines containing the adjacency matrix. The first row and first column represents the master vertex/node. This node is connected to all other nodes. All the edges on the first column and row have to be 1.

To run this project, follow these steps:

  • If you run with eclipse, just clone the two branches above.
  • If you have the tar file, do the steps below:
  • Open Eclipse -> File -> Import -> Projects from Folder or Archive -> Archive option -> navigate to the tar.gz file
  • Pick the second option (submission.tar_expended/floodMax) -> Finish
  • Go to Main.java and run it. If the program throws FileNotFoundException, copy graph.txt into bin file. (this sometimes happens when eclipse doesn't look in the right folder for input).
  • It will take a while to run. Once finished, this will output:
    • leader
    • the tree
    • "Stopping execution" message.
  • The threads will shutdown once the program finishes. If they are still running, it means the program is not finished.

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.