The least-action principle, one of the fundaments of Physics, has never been given a definition for computer science. APL is the best notation to try to reformulate it in modern terms.
The Least-Action-Principle was stated for the first time by Pierre-Louis Moreau de Maupertuis (1698-1759) as: Nature is thrifty in all its actions. In central Europe, Gottfried-Wilhelm Leibniz (1646-1716) is also considered as the LAPs father.
One century after, celestial mechanics was firmly established, but not much of present-time science was known apart from classical mechanics in general. In many Anglo-Saxon countries, the LAP is then known as the Hamilton Principle, named after Sir Rowan Hamilton (1788-1856) who tried to state it with more precise terms in mechanics. A stronger statement, like The action of a force is minimal... , however, necessitates the definition of a force, which is not so easy to define. Nowadays, everybody knows that a force is defined as the product of a mass by an acceleration. Then, what is a mass? Acceleration implies the definition of velocity, which, in turn, implies the definition of time (a vast program!). Then, before stating the LAP, one has to settle the whole of physics first... Many scientists (and not from the least ones) have spent hard time in order to work out the paradox, and, if possible to solve it with equations, namely Ernst Mach and Albert Einstein (1879-1955). The attempt of the latter to produce a Unitary Theory of Fields (1950) derives from Machs ideas about the LAP.
Until now, no definition has been given to the LAP for computer science, although informatics has become at least as important as mechanics was in the past centuries.
Before setting up the definition of an action, we think that the definition of a no-action is more fundamental:
In all programming languages in the world, the no-action is programmed by the no-statement, i.e. a void symbol-character string which has to be executed or not (a kind of no-coffee with no cream, a nowhere-man).
The definition is more subtle than it looks at first sight, since all computers use discrete time clocks.
Do nothing is different from wait for a clock quantum doing nothing.
In APL, for instance, one can write either nothing or : '' or ' ' .
Now, we can really define the least action as the action which changes a minimum of the memory content, i.e. which will replace either 1 by 0 or 0 by 1 in just one bit B. The least-action function is the monadic NOT function from binary logic. (With a number, one may see the least action as the action which changes the sign i.e. just one bit of the binary representation of the number. With an alphabet, something like a toggle for upper/lower case).
In APL, we may write either
'B~B'
or 'B1¬B'
Then, we can imagine less than that: an action which would be performed statistically in 50% of the cases, and which would not be performed in the remaining 50% of the cases, under the control of another bit A, the actor:
with an expression such as either
A/'B~B' or A/'B1¬B'
For people who do not know APL, one writes (in FORTRAN77) :
IF (A) B=.NOT.B
(or in PASCAL) :
IF A THEN B:=NOT B
where A and B are declared as logical (FORTRAN) or Boolean (PASCAL) scalars.
The advantage of knowing APL is great:
APL being the champion of algorithmic compression, one may see directly that the latter expression
A/'B1¬B' reduces to:
BA¬B
while in FORTRAN, this requires the knowledge of FORTRAN90 :
A = A.NEQV.B
(Pascal accepts B:=A XOR B)
The power of abstraction of APL, in addition, will allow to consider separate scalar entities as forming a couple (a vector) of objects belonging to the same class.
The value of A never changes while the least action is performed :
So, whatever the values of A and B may be (we have four permutations), if A,B is the initial state of the couple, then the final state of the couple is given, in all cases, by the general expression:
¬\A,B
No other standardised notation than ISO8485, ISO, Geneva (1989) allows to express in a simpler way the least least-action (this is not a typo! we name this the least-least-action because such an algorithm performs the least action on B - i.e. the NOT function - only when A is 1; otherwise, it performs the no-action).
For a vector of bits, the same APL expression remains valid.
If v contains binary items A,B,C, ... etc, an expression such as: ¬\v means, in classical structured programming (e.g. in PASCAL):
IF A THEN BEGIN
B:=NOT B;
IF B THEN BEGIN
C:=NOT C;
IF C THEN BEGIN
.
.
.
END;
END;
END;
When all items are 0, we have stability. If the first item A swaps to 1, the volcano wakes up: B swaps to 1, then C swaps to 1, ... etc... all the way.
If we imagine a branched ¬\, i.e., after the structured-programming model, something like:
...
IF B THEN BEGIN
C1:=NOT C1;
C2:=NOT C2;
IF C1 THEN BEGIN
D11:NOT D11
.
.
.
END;
IF C1 THEN BEGIN
D21:=NOT D21
.
.
.
END;
etc...
we obtain the model of an explosive process (e.g. when the yield in neutrons exceeds 1 in a nuclear-fission reaction).
The LAP, once expressed in APL, is extremely rich in applications. It was shown that it immendiately builds fractals when iterated (successive iterates of ¬\) [LAN92], [ZA95], it expresses Franklins law for electrostatics [LAN94] and may be used as a non-ad hoc genetic algorithm.
One of the most important mathematic properties of ¬\ is that it is Kurt Gödels-theorem-resisting, since ¬\ models an isentropic dynamic process.
(The subject was treated elsewhere - in Quote-Quad, 1994: With the axioms with which one builds ¬\, Gödels theorem cannot be proven anymore.)
No information appears or disappears while V¬\V is executed. When V has a finite length, iteration I so that I is 2*µ½V will reproduce initial V if the expression V¬\V is iterated I times.
¬\ plays the same role in integer modulo2 algebra [isomorphous with logical algebra: ¬, alias XOR, is isomorphous with plus modulo 2 (as well as with minus modulo 2), sometimes noted 2
in mathematics] as undefined integration in regular algebra. Then, for any V, expression ¬\¬\V produces the 2nd integral of V etc... The Boolean derivative of V will then correspond to the inverse function of ¬\. And since it is known that ¬\ is the reverse Gray code function, the sought-for inverse function is simply the Gray code function.
Several algorithms were published elsewhere in order to give directly the nth integral for any V. We now have the possibility of modelling in physics realistic spin models with exact solutions, thanks to APL and its ability to handle modulo 2 integer algebra directly, thanks to the isomorphism with Booles algebra.
During 4 years, the properties of ¬\ have been thoroughly explored. The author expresses his bests thanks to Dr. Michael Zaus, from the University of Oldenburg, Germany, who - as a mathematician - has made intelligible the notion of binary integral for non-APLers, and has devoted several years to the topic of Parity Logic in general.
LA92a Langlet, Gérard A., Towards the Ultimate APL-TOE, APL Quote-Quad, Vol. 22, N° 1 (APL92, St Petersburg, Russia, July 1992) p. 118-132.
LA92b Langlet, Gérard A., Le Principe de Moindre Action Généralisé, Colloque UITF, (F-Rennes, Dec. 1992) [in French].
LA94 Langlet, Gérard A., The Power of Boolean Computing in APL, SEAS94 (B-La Hulpe, IBM Conf. Centre, April 1994).
ZA94 Zaus, Michael, Theoretische und angewandte Paritätslogik, APL-CAM J. (Belgium), Vol. 16, N° 3 (July 1994) p. 447-469 [in German; also available in French in Les Nouvelles dAPL, AFAPL, Paris, N° 12-13 (Sept. 1994) p. 42-66].
ZA96 Zaus, Michael, Studies in the Foundations of Parity Logic, Berichte aus dem Institut für Kognitionsforschung N° 24 (Feb. 1996), Carl v. Ossietsky Univ. Oldenburg, Germany. [partly available in French in Les Nouvelles dAPL, AFAPL, Paris, N° 18 & N° 19 (March & June 1996)].
Gérard A. Langlet
CEA-Saclay/DSM/DRECAM/SCM/LIT
F-91191-GIF sur YVETTE
France
Cedex, Fax: 33 1 69 08 66 40