https://github.com/mattdean1/erlang
An implentation of Tarry's algorithm in Erlang
https://github.com/mattdean1/erlang
distributed-algorithms erlang
Last synced: about 1 year ago
JSON representation
An implentation of Tarry's algorithm in Erlang
- Host: GitHub
- URL: https://github.com/mattdean1/erlang
- Owner: mattdean1
- Created: 2018-03-12T16:20:56.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-03-21T15:39:49.000Z (about 8 years ago)
- Last Synced: 2025-01-11T16:37:25.779Z (over 1 year ago)
- Topics: distributed-algorithms, erlang
- Language: Erlang
- Homepage:
- Size: 9.77 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# An implentation of Tarry's algorithm in Erlang
Compile: `erlc tarry.erl`
Run: `erl -noshell -run tarry -run init stop < input.txt`
## Tarry's Algorithm
### Assumption
An undirected network of processes.
### The Algorithm
Initially, an initiator sends out a token.
* Rule 1: A process never forwards the token through the same channel twice.
* Rule 2: A process only forwards the token to its parent when there is no other option.
The token travels through each channel both ways, and finally ends up at the
initiator.