Tikalon Header Blog Logo

ALGOL and Algol

May 8, 2012

Most computer scientists are familiar with the ALGOL programming language. Introduced in 1958, ALGOL (an acronym for algorithmic language), was one of the first programming languages. Like COBOL and Fortran, ALGOL is a compiled language. Fortran was introduced in the mid-1950s, just a few years before ALGOL.

ALGOL was designed to be a more versatile language than the Fortran of the time. ALGOL is important in the history of computing mainly because its syntax acted as the inspiration for many other languages, including C and Pascal. BEGIN... END designators for code blocks were part of ALGOL, a feature found in Pascal. The ALGOL syntax was specified using Backus–Naur Form.

Backus-Nauer Form definition example

A BNF definition for a U.S. postal address. Note the assignment operator, ::=, and the "or" symbol, |. (Example found on Wikipedia))


One feature of ALGOL is lexical scoping. This essentially means that variables can be local to a function. This bane of novice programmers, who scratch their heads wondering why their code gives the wrong results, is a very effective feature. It allows easy reuse of code and the calling of external functions without data collisions.

Long before ALGOL, there was Algol. Algol is the second-brightest star in the constellation, Perseus. Algol is a variable star about 93 light years from Earth. It's magnitude changes with a regular period of 2.87 days. Superimposed on this periodicity is another, smaller period of 680.05 days.

Map of the constellation Perseus

Algol in the constellation, Perseus. Algol is also known as β-Persei, since it's the second brightest star of the constellation.

The brightest star, Mirfak, is also known as α-Persei.

(Modified Wikimedia Commons image))


Algol's brightness changes not because the star itself changes. Algol has a dimmer companion star that orbits it and obscures some of its light as seen from Earth. It's an eclipsing_binary system. There's a third star that adds its own contribution to the brightness change on a longer period. As can be seen from the figure, the brightness change is considerable. Figure caption

Light curve of Algol in the vicinity of its magnitude dip.

Stellar apparent magnitude is a logarithmic scale in which each magnitude corresponds to a brightness change of 2-1/2 times.

(Fig. 6h of ref. 1 (modified), via ArXiv Preprint Server))


The discovery of Algol's variable brightness was made by Geminiano Montanari, an Italian astronomer, in 1667. Its periodicity wasn't determined until 1783 by English astronomer John Goodricke, who even proposed the eclipsing binary mechanism. A century later, spectroscopic studies showed a Doppler shift in Algol's spectrum, which confirmed that it and some companion were orbiting about a common center.

Lest modern astronomers congratulate themselves too heartily, Algol's name in several languages translates to "demon." The idea of a dragon devouring celestial bodies has appeared in ancient cultures for quite a while, so there's the idea that Algol's variability was known to at least a few of the ancients. Now a thorough analysis (the paper is 35 pages long) of an ancient Egyptian manuscript, the Cairo Calendar, appears to contain a quantitative record of Algol's variability.[1-2]

Egyptian astronomers looked to the stars for omens, so they were more like astrologers. In true astrological fashion, they would rate days as "lucky" or "unlucky" based on what was happening in the stars above. The Cairo Calendar contains a nearly complete record of a single year's time, around the time 1271–1163 B.C., for which each day is divided into three parts, and each part is rated to be either "good" or "bad."

The synodic period of the Moon, about 29.5 days, was detected in the Cairo Calendar in 2008, and a few other periods were found. Now, team of physicists, and one historian, from the University of Helsinki, Finland, have done a reanalysis of the Cairo Calendar, and they've identified one of these periods as that of Algol. The interesting thing is that the period they obtained, 2.85 days is a bit smaller than today's value of 2.87 days. The authors propose that this is evidence of a change in Algol's period over the three millennia since the Cairo Calendar's publication.

One argument that this might be true is that John Goodricke's observations were done, also, by the unaided eye, and his period was 2.867 days. The Egyptian value should have been at least as accurate; perhaps, more accurate because the atmosphere was likely to be clearer. Another is that modern astronomers have detected changes in Algol's period.

One possible explanation of a changing period would be a transfer of mass between the two closest stars. 2.87 days is a very short period that's indicative of a close spacing of these stars. The motions of the three stars in the Algol system is a "three body" problem, so no direct solution is possible, even if all the variables were known to more precision. In this case, observation trumps theory.

Not surprisingly, Algol has appeared in many science fiction books and films.

References:

  1. L. Jetsu, S. Porceddu, J. Lyytinen, P. Kajatkari, J. Lehtinen, T. Markkanen and J. Toivari-Viitala, "Did the ancient Egyptians record the period of the eclipsing binary Algol - the Raging one?" arXiv Preprint Server, April 27, 2012
  2. Ancient Egyptians Recorded Algol's Variable Magnitude 3000 Years Before Western Astronomers, Physics arXiv Blog, May 1, 2012.
  3. The American Association of Variable Star Observers (AAVSO) Web Site.

Permanent Link to this article

Linked Keywords: Computer scientist; ALGOL; programming language; COBOL; Fortran; compiler; compiled; syntax; C; Pascal; Backus–Naur Form; Wikipedia; lexical scoping; variable; subroutine; function; neophyte; novice; programmer; code reuse; static library; external function; Algol; constellation; Perseus; variable star; light year; Earth; apparent magnitude; period; Mirfak; Wikimedia Commons; star; eclipsing binary; Stellar apparent magnitude; logarithmic scale; ArXiv Preprint Server; Geminiano Montanari; Italian; astronomer; English; John Goodricke; Doppler shift; electromagnetic spectrum; orbit; dragon; celestial body; analysis; ancient Egypt; manuscript; Cairo; Calendar; omen; astrologer; B.C.; lunation; synodic period of the Moon; physicist; historian; University of Helsinki; Finland; millennia; mass; "three body" problem; theory; science fiction.