25.11.2014 Views

Algorithms and Data Structures

Algorithms and Data Structures

Algorithms and Data Structures

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

N.Wirth. <strong>Algorithms</strong> <strong>and</strong> <strong>Data</strong> <strong>Structures</strong>. Oberon version 9<br />

Notation<br />

The following notations, adopted from publications of E.W. Dijkstra, are used in this book.<br />

In logical expressions, the character & denotes conjunction <strong>and</strong> is pronounced as <strong>and</strong>. The character ~<br />

denotes negation <strong>and</strong> is pronounced as not. Boldface A <strong>and</strong> E are used to denote the universal <strong>and</strong><br />

existential quantifiers. In the following formulas, the left part is the notation used <strong>and</strong> defined here in terms<br />

of the right part. Note that the left parts avoid the use of the symbol "...", which appeals to the readers<br />

intuition.<br />

Ai: m ≤ i < n : P i P m & P m+1 & ... & P n-1<br />

The P i are predicates, <strong>and</strong> the formula asserts that for all indices i ranging from a given value m to, but<br />

excluding a value n P i holds.<br />

Ei: m ≤ i < n : P i P m or P m+1 or ... or P n-1<br />

The P i are predicates, <strong>and</strong> the formula asserts that for some indices i ranging from a given value m to, but<br />

excluding a value n P i holds.<br />

Si: m ≤ i < n : x i = x m + x m+1 + ... + x n-1<br />

MIN i: m ≤ i < n : x i = minimum(x m , ... , x n-1 )<br />

MAX i: m ≤ i < n : x i = maximum(x m , ... , x n-1 )

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!