Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I just purchased the book 'Pearls of Functional Algorithm Design' by Richard Bird. Unfortunately, the book doesn't have any section that describes the notation that is used.

You can view the contents of the book by going to Amazon's page, and clicking on the book cover to get a sneak peak inside.

http://www.amazon.com/Pearls-Functional-Algorithm-Design-Richard/dp/0521513383

If someone could give me a name, and/or reference to understand the notation used. That way I could actually read and understand the algorithms.

share|improve this question
add comment

1 Answer 1

up vote 9 down vote accepted

He mentions in the preface that the reference programs are in Haskell. The formatting is LaTeX so it looks a bit odd.

I did some more digging and it turns out that the Mathematical notation used is called "Z Notation" after the Zermelo–Fraenkel set theory notation. Here is a guide, PDF is the second link in the list. The notation is part of a broader type of notation called Pidgin Code:

In computer programming, pidgin code is a mixture of several programming languages in the same program, or pseudocode that is a mixture of a programming language with natural language descriptions. Hence the name: the mixture is a programming language analogous to a pidgin in natural languages.

In numerical computation, mathematical style pseudocode is sometimes called pidgin code, for example pidgin ALGOL (the origin of the concept), pidgin Fortran, pidgin BASIC, pidgin Pascal, and pidgin C. It is a compact and often informal notation that blends syntax taken from a conventional programming language with mathematical notation, typically using set theory and matrix operations, and perhaps also natural language descriptions.

It can be understood by a wide range of mathematically trained people, and is used as a way to describe algorithms where the control structure is made explicit at a rather high level of detail, while some data structures are still left at an abstract level, independent of any specific programming language.

Normally non-ASCII typesetting is used for the mathematical equations, for example by means of TeX or MathML markup, or proprietary Formula editor formats.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.