scispace - formally typeset
Journal ArticleDOI

Algorithm 97: Shortest path

Robert W. Floyd
- 01 Jun 1962 - 
- Vol. 5, Iss: 6, pp 345
Reads0
Chats0
TLDR
The procedure was originally programmed in FORTRAN for the Control Data 160 desk-size computer and was limited to te t ra t ion because subroutine recursiveness in CONTROL Data 160 FORTRan has been held down to four levels in the interests of economy.
Abstract
procedure ari thmetic (a, b, c, op); in t eger a, b, c, op; ¢ o n l m e n t This procedure will perform different order ar i thmetic operations with b and c, put t ing the result in a. The order of the operation is given by op. For op = 1 addit ion is performed. For op = 2 multiplicaLion, repeated addition, is done. Beyond these the operations are non-commutat ive. For op = 3 exponentiat ion, repeated multiplication, is done, raising b to the power c. Beyond these the question of grouping is important . The innermost implied parentheses are at the right. The hyper-exponent is always c. For op = 4 te t ra t ion, repeated exponentiat ion, is done. For op = 5, 6, 7, etc., the procedure performs pentat ion, hexation, heptat ion, etc., respectively. The routine was originally programmed in FORTRAN for the Control Data 160 desk-size computer. The original program was limited to te t ra t ion because subroutine recursiveness in Control Data 160 FORTRAN has been held down to four levels in the interests of economy. The input parameter , b, c, and op, must be positive integers, not zero; b e g i n own i n t e g e r d, e, f, drop; i f o p = 1 t h e n b e g i n a := h-4c; go t o l e n d i f o p = 2 t h e n d := 0; else d := 1; e := c; drop := op 1; for f := I s t e p 1 u n t i l e do b e g i n ari thmetic (a, b, d, drop);

read more

Citations
More filters
Journal ArticleDOI

Shortest paths in stochastic networks with ARC lengths having discrete distributions

TL;DR: This work constructs a discrete time Markov chain with a single absorbing state and associate costs with each transition such that the total cost incurred by this chain until absorption has the same distribution as does L'.
Posted Content

Sparse Tensor Algebra as a Parallel Programming Model

TL;DR: This work extends the usual basic operations of tensor summation and contraction to arbitrary functions, and further operations such as reductions and mapping, and shows how key graph algorithms as well as common numerical kernels can be succinctly expressed using this interface and provide performance results of a general library implementation.
Journal ArticleDOI

NETSCAL: A Network Scaling Algorithm for Nonsymmetric Proximity Data.

TL;DR: A simple property of networks is used as the basis for a scaling algorithm that represents nonsymmetric proximities as network distances and the derived network structure is invariant across monotonic transformations of the data.
Journal ArticleDOI

Initialization strategies to enhancing the performance of genetic algorithms for the p-median problem

TL;DR: The initialization approach first produces a near optimal solution with low computational complexity, and then uses this solution as a seed to generate a set of solutions as the initial GA population, which is then used in an existing hybrid GA to test the performance of the proposed approach.
Journal ArticleDOI

Classical processing requirements for a topological quantum computing system

TL;DR: This paper analyzes the requirements for a classical processing system, designed specifically for the topological cluster state model, and demonstrates that via extensive parallelization, the construction of a classical "front-end" system capable of processing error correction data for a large topological computer is possible today.