text:
Numerical algorithms

Description
Numerical Algorithms is a set of courses in the Department of Scientific Computing in the School of Computer Science.

As a topic of study, it has a lot of overlap with Topic:Numerical analysis.

Introduction
What are numerical algorithms?

Short history?

Scope
In these courses, students learn the basic tools and language of Scientific Computing.

Prequisites
Students willing to follow the courses in Numerical Algorithms should have taken the following courses or equivalents thereof:
 * Basic Analysis
 * Basic Linear Algebra
 * Introduction to Programming with some knowledge of either Matlab, C or Pascal.

Courses
The courses in Numerical Algorithms are designed to be followed in the order presented here.

 * Finite Arithmetic
 * Floating point
 * Interpolation and Extrapolation
 * Least-Squares Method
 * Root Finding in one Dimension
 * Bisection Method
 * Newton's Method
 * Secant Method
 * Root Finding in many Dimensions
 * Numerical Integration and Differentiation
 * Monte Carlo Integration
 * Numerical Integration of ODEs

Active Participants
The histories of Wikiversity pages indicate who the active participants are. If you are an active participant in this department, you can list your name here (this can help small departments grow and the participants communicate better; for large departments a list of active participants is not needed).
 * Pedro.Gonnet 08:22, 9 October 2006 (UTC)

title: Numerical algorithms


text:
Finite Arithmetic

This course is still very much in the rough!

Summary
This course belongs to the track Numerical Algorithms in the Department of Scientific Computing in the School of Computer Science.

In this course, students will learn how numbers are represented on modern-day computers, where the limits and problems of such numbers are and how they may be overcome.

Representation
On binary computers, whole numbers (Integers) are stored in bit arrays of fixed size. These arrays contain the binary representation of the decimal number.

The decimal number 37, for instance, can be converted to binary and stored in an 8-bit variable

 * $$37_{10} \rightarrow 100101_2 \rightarrow$$ [[Image:Binary_37.png]]

The range of numbers that can be stored in $$n$$ bits is $$0 \dots 2^n-1$$.

This trivial scheme works rather well, since binary arrays are integer by nature. However, mathematics is usually not restricted to integer arithmetic, so a different representation has to be found for real-valued numbers, such as $$0.1$$, $$\sqrt{2}$$, $$\pi$$ and the like.

The most trivial approach for real-valued numbers would be to pack them into two integers, one representing the integer part, the other the fraction.

 * $$3.7_{10} \rightarrow a.b \rightarrow 11_2 . 10110011_2 \rightarrow$$ [[Image:fixed-point.png]]

Notice that the fractional part is not $$1101_2 = 7_{10}$$, yet $$0.10110011_2 = 0.7_{10}$$. The $$k$$th digit to the right of the "." in binary is $$2^{-k}$$

Using such a representation -- generally called a fixed-point representation -- results in very simple operations (addition, multiplication, division, etc...) yet it's range would be limited from

 * $$2^{-B_b} \dots 2^{B_a}-2^{-B_b}$$

where $$B_a$$ and $$B_b$$ are the number of bits in the integer and fractional parts respectively. This is not a very wide range.

Furthermore, for large numbers, we are carrying around a lot of lower-order bits which we probably don't need since, as we will see later, we are usually interested in relative accuracy (i.e. the first few digits of a number) as opposed to the absolute accuracy of the last digits of the fractional part. Likewise, for small numbers of the order of $$2^{-B_b}$$, we are only precise up to a few digits although we are carrying around a bunch of zeros we don't really need.

Instead of using two number additively, as in the example above, we could represent our real numbers as the product of a fixed precision number and a factor of 2

 * $$ a \times 2^b $$

This is equivalent to shifting $$a$$ by $$b$$ bits. The "." in $$a$$ can therefore be set arbitrarily. for all practical purposes, we set it after the first digit.

 * $$3.7_{10} \rightarrow 1.110110011_2 \times 2^{1_b} = 11.10110011_2$$

This is the concept of modern floating-point numbers as described in IEEE 754. The range of numbers that can be represented is from $$1 \times 2^{-2^{B_b}}$$ to $$(2 - 2^{-(B_a-1)}) \times 2^{2^{B_b}}$$.

TODO: Show how sum, multiplication and division are computed.

Exercises

 * The smallest and biggest numbers representable by $$a \times 2^{b}$$ are given as $$1 \times 2^{-2^{B_b}}$$ and $$(2 - 2^{-(B_a-1)}) \times 2^{2^{B_b}}$$ respectively. Show what these numbers would look like for $$B_a = B_b = 8$$.

 * Addition in Finite Arithmetic Modulo 5 The addition tables in this arithmetic can be written as a bordered square too, tough addition can be performed by adding in the ordinary way and then subtracting an appropriate, multiple of 5; e.g to find 4+3+4+2 we add as in ordinary arithmetic, which results in 13, and then subtract 10, giving

4+3+4+2=3 (mod 5)

IEEE 754 Floating Point Numbers
Show representation for single and double precision, sizes of mantissa and exponent

First bit of mantissa is always 1, normalized numbers, exponent is biased for easier arithmetic.

 * Special values, such as 0, Nan and Inf have special representations.

Explain different rounding modes.

Useful/Important Values
Concept of $$\varepsilon$$. Definition as $$\min_\varepsilon 1 + \varepsilon > 1$$ and spacing between numbers 1.0 and 2.0.

Realmin and Realmax

Show how these values can be computed in Matlab, C and Pascal

Note on problem with extra bits (90 bits) on Intel Pentiums.

Truncation
Basic explanation of the problem with an example, preferrably with a figure.

Explain how it can be avoided by sorting or with Kahan summation.

Cancellation
Give an example illustrating the problem.

No trick, problems need to be re-formulated to avoid subtracting numbers of similar magnitude.

Show some examples how this can be done.

Exercises

 * Compute eps for some special representation, realmax, realmin.
 * how could a*2^n be implemented efficiently?
 * re-write some equation to avoid truncation and/or cancellation.

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

title: Finite Arithmetic


text:
Talk:Finite Arithmetic

''This page is just a skelleton. I will add content as time permits. The main purpose of putting this up is to define what goes where in the track Numerical Algorithms.''

Goals
After finishing this course, students should:
 * Know how floating-point numbers are represented, specifically as defined by IEEE 754.
 * Know what eps, realmin, realmax and denormalized numbers are.
 * Know the common problems in using finite-precision arithmetic and know how to avoid them when possible.

Take-Home Message

 * Numbers have a finite relative precision.
 * Floating-Point numbers may cause avoidable errors.
 * Special care has to be taken to avoid such errors.

title: Talk:Finite Arithmetic


text:
Interpolation and Extrapolation

This course belongs to the track Numerical Algorithms in the Department of Scientific Computing in the School of Computer Science.

In this course, students will learn how to approximate discrete data. Different representations and techniques for the approximation are discussed.

Discrete Data
Discrete data arises from measurements of $$f(x)$$ or when $$f(x)$$ is difficult or expensive to evaluate.

In general, discrete data is given by a set of nodes $$x_i$$, $$i=1 \dots n$$ and the function $$f(x)$$ evaluated at these points: $$f_i = f(x_i)$$, $$i=1 \dots n$$.

In the following, we will refer to the individual nodes and function values as $$x_i$$ and $$f_i$$ respectively. The vectors of the $$n$$ nodes or function values are written as $$\underline{\mathbf x}$$ and $$\underline{\mathbf f}$$ respectively.

We will also always assume that the $$x_i$$ are distinct.

Polynomial Interpolation
Although there are many ways of representing a function $$f(x)$$, polynomials are the tool of choice for interpolation. As the Taylor series expansion of a function $$f(x)$$ around $$0$$ shows, every continuous, differentiable function has a polynomial representation

 * {|border=0

 * $$f(x)$$
 * $$f(0) + f'(0)x + \frac{1}{2}f(0)x^2 + \frac{1}{6}f'(0)x^3 + \dots$$
 * $$\sum_{n=0}^\infty \underbrace{\frac{1}{n!}f^{(n)}(0)}_{=a_n}x^n$$
 * $$\sum_{n=0}^\infty a_n x^n$$
 * }
 * $$\sum_{n=0}^\infty \underbrace{\frac{1}{n!}f^{(n)}(0)}_{=a_n}x^n$$
 * $$\sum_{n=0}^\infty a_n x^n$$
 * }
 * $$\sum_{n=0}^\infty a_n x^n$$
 * }
 * $$\sum_{n=0}^\infty a_n x^n$$
 * }

in which the $$a_n = \frac{1}{n!}f^{(n)}(0)$$ are the exact weights.

If a function $$f(x)$$ is assumed to be continuous and differentiable and we assume that it's derivatives $$f^{(n)}(0)$$ are zero or of negligible magnitude for increasing $$n$$, it is a good idea to approximate the function with a polynomial.

Given $$n$$ distinct nodes $$x_i$$, $$i=1 \dots n$$ at which the function values $$f_i = f(x_i)$$ are known, we can construct an interpolating polynomial $$g(x)$$ such that $$g(x_i) = f_i$$ for all $$i=1 \dots n$$. Such an interpolating polynomial with degree $$\le n$$ is unique. However infinitely many such polynomials can be found with degree $$>n\;$$.

 * Any nice way of deriving the interpolation error?

The Vandermonde Matrix
By definition as given above, our polynomial

 * $$g(x) = \sum_{i=0}^{n-1} a_i x^i$$

must interpolate the function $$f(x)$$ at the $$n$$ nodes $$x_i$$. This leads to the following system of $$n$$ linear equations in the coefficients $$a_i$$:

 * $$f(x_1)$$
 * $$a_0 + a_1x_1 + a_2 x_1^2 + \dots + a_{n-1} x_1^{n-1}$$
 * $$f(x_2)$$
 * $$a_0 + a_1x_2 + a_2 x_2^2 + \dots + a_{n-1} x_2^{n-1}$$
 * $$\vdots$$
 * $$f(x_n)$$
 * $$a_0 + a_1x_n + a_2 x_n^2 + \dots + a_{n-1} x_n^{n-1}$$
 * }
 * $$\vdots$$
 * $$f(x_n)$$
 * $$a_0 + a_1x_n + a_2 x_n^2 + \dots + a_{n-1} x_n^{n-1}$$
 * }
 * $$f(x_n)$$
 * $$a_0 + a_1x_n + a_2 x_n^2 + \dots + a_{n-1} x_n^{n-1}$$
 * }
 * }

We can re-write this system of linear equation in matrix notation as

 * $$\mathbf M \mathbf a = \mathbf f$$

where $$\mathbf a$$ is the vector of the $$a_i$$, $$i=0\dots n-1$$ coefficients and $$\mathbf M$$ is the so-called moment matrix or Vandermonde matrix with

 * $$\mathbf M = \begin{bmatrix}

1 & x_1 & x_1^2 & \dots & x_1^{n-1} \\ 1 & x_2 & x_2^2 & \dots & x_2^{n-1} \\ \vdots & \vdots & \vdots & \ddots & \vdots \\ 1 & x_n & x_n^2 & \dots & x_n^{n-1} \end{bmatrix}$$

or

 * $$\mathbf M_{i,j} = x_i^{j-1}$$

This linear system of equations can be solved for $$\mathbf a$$ using Gauss elimination or other methods.

The following shows how this can be done in Matlab or GNU Octave.

% declare our function f f = inline('sin(pi*2*x)','x')

% order of the interpolation? n = 5

% declare the nodes x_i as random in [0,1] x = rand(n,1)

% create the moment matrix M = zeros(n) for i=1:n M(:,i) = x.^(i-1); end

% solve for the coefficients a a = M \ f(x)

% compute g(x) g = ones(n,1) * a(1) for i=2:n g = g + x.^(i-1)*a(i); end;

% how good was the approximation? g - f(x)

However practical it may seem, the Vandermonde matrix is not especially suited for more than just a few nodes. Due to it's special structure, the Condition Number of the Vandermode matrix increases with $$n$$.

If in the above example we set $$n=10$$ and compute $$\mathbf a$$ with

% solve for the coefficients a a = inv(M) * f(x)

the approximation is only good up to 10 digits. For $$n=20$$ it is accurate only to one digit.

We must therefore consider other means of computing and/or representing $$g(x)$$.

Lagrange Interpolation
Given a set of $$n$$ nodes $$x_i$$, $$i=1 \dots n$$, we define the $$k$$th Lagrange Polynomial as the polynomial of degree $$n-1$$ that satisifies

 * $$\ell_k(x_i) = \begin{cases}0\quad & i \neq k \\ 1 & i = k\end{cases}$$

Maybe add a nice plot of a Lagrange polynomial over a few nodes?

The first condition, namely that $$\ell_k(x_i)=0$$ for $$i \neq k$$ can be satisfied by construction. Since every polynomial of degree $$n-1$$ can be represented as the product

 * $$g(x) = c\prod_{i=1}^{n-1}(x - \xi_i)$$

where the $$\xi_i$$ are the roots of $$g(x)$$ and $$c$$ is some constant, we can construct $$\ell_k^\star(x)$$ as

 * $$\ell_k^\star(x) = \prod_{i=1,i \neq k}^{n}(x - x_i)$$.

The polynomial $$\ell_k^\star(x)$$ is of order $$n-1$$ and satisifies the first condition, namely that $$\ell_k^\star(x_i)=0$$ for $$i \neq k$$.

Since, by construction, the $$n-1$$ roots of $$\ell_k^\star(x)$$ are at the nodes $$x_i$$, $$i \neq k$$, we know that the value of $$\ell_k^\star(x_k)$$ cannot be zero. This value, however, should be $$1$$ by definition. We can enforce this by scaling $$\ell_k^\star(x)$$ by $$\ell_k^\star(x_k)^{-1}$$:

 * {|cellpadding=2

 * $$\ell_k(x)$$
 * $$\frac{\ell_k^\star(x)}{\ell_k^\star(x_k)}$$
 * $$\frac{\prod_{i=1,i \neq k}^{n}(x - x_i)}{\prod_{i=1,i \neq k}^{n}(x_k - x_i)}$$
 * }
 * $$\frac{\prod_{i=1,i \neq k}^{n}(x - x_i)}{\prod_{i=1,i \neq k}^{n}(x_k - x_i)}$$
 * }
 * $$\frac{\prod_{i=1,i \neq k}^{n}(x - x_i)}{\prod_{i=1,i \neq k}^{n}(x_k - x_i)}$$
 * }

If we insert any $$x_i$$, $$i \neq k$$ into the above equation, the nominator becomes $$0$$ and the first condition is satisified. If we insert $$x_k$$, the nominator and the denominator are the same and we get $$1$$, which means that the second condition is also satisfied.

We can now use the Lagrange polynomials $$\ell_k(x)$$ to construct a polynomial $$g(x)$$ of degree $$n-1$$ which interpolates the $$n$$ function values $$f_i$$ at the points $$x_i$$.

Consider that, given the definition of $$\ell_k(x)$$,

 * $$f_k\ell_k(x_i) = \begin{cases}f_k\quad & i = k \\ 0 & i \neq k\end{cases}$$.

Therefore, if we define $$g(x)$$ as

 * $$g(x) = \sum_{k=1}^{n} f_k\ell_k(x)$$

then $$g(x_i) = f_i$$ for all $$i=1 \dots n$$. Since the $$\ell_k(x)$$ are all of degree $$n-1$$, the weighted sum of these polynomials is also of degree $$n-1$$.

Therefore, $$g(x)$$ is the polynomial of degree $$n-1$$ which interpolates the $$n$$ values $$f_i$$ at the nodes $$x_i$$.

The representation with Lagrange polynomials has some advantages over the monomial representation $$g(x)=\sum_{i=0}^{n-1}a_ix^i$$ described in the previous section.

First of all, once the Lagrange polynomials have been computed over a set of nodes $$x_i$$, computing the interpolating polynomial for a new set of function values $$f_i$$ is trivial, since these only need to be multiplied with the Lagrange polynomials, which are independent of the $$f_i$$.

Another advantage is that the representation can easily be extended if additional points are added. The Lagrange polynomial $$\ell_k^+(x)$$, obtained by adding a point $$x_{n+1}$$ to the interpolation, is

 * $$\ell_k^+(x) = \ell_k(x) \frac{x - x_{n+1}}{x_k - x_{n+1}}$$.

Only the new polynomial $$\ell_{n+1}^+(x)$$ would need to be re-computed from scratch.

In the monomial representation, adding a point would involve adding an extra line and column to the Vandermonde matrix and re-computing the solution.

 * Add a word on Barycentric interpolation to facilitate adding points.

Newton Interpolation
Given a set of $$n$$ function values $$f_i$$ evaluated at the nodes $$x_i$$, the Newton polynomial is defined as the sum

 * $$g(x) = \sum_{i=1}^{n} a_in_i(x)$$

where the $$n_i(x)$$ are the $$n$$ Newton basis polynomials defined by

 * {|cellpadding=2

An interpolation polynomial of degree n+1 can be easily obtained from that of degree n by just adding one more node point $$x_{n+1}$$ and adding a polynomial of degree n+1 to $$g(x)$$.
 * $$n_1(x)$$
 * $$1$$
 * $$n_i(x)$$
 * $$\prod_{k=1}^{i-1} (x - x_k)\quad \mbox{for } i > 1$$.
 * }
 * $$\prod_{k=1}^{i-1} (x - x_k)\quad \mbox{for } i > 1$$.
 * }
 * }

The Newton form of the interpolating polynomial is particularly suited to computations by hand, and underlies Neville's algorithm for polynomial interpolation. It is also directly related to the exact formula for the error term $$f_i - g(x_i)$$. Any good text in numerical analysis will prove this formula and fully specify Neville's algorithm, usually doing both via divided differences.

(Should link to error formula, divided differences and Neville's algorithm, adding articles where they don't exist)

Interpolation error
When interpolating a given function f by a polynomial of degree n at the nodes x0,...,xn we get the error

 * $$f(x) - p_n(x) = f[x_0,\ldots,x_n,x] \prod_{i=0}^n (x-x_i) $$

where
 * $$f[x_0,\ldots,x_n,x]$$

is the notation for divided differences.

If f is n + 1 times continuously differentiable on a closed interval I and $$p_n(x)$$ be a polynomial of degree at most n that interpolates f at n + 1 distinct points {xi} (i=0,1,...,n) in that interval. Then for each x in the interval there exists $$\xi$$ in that interval such that

 * $$ f(x) - p_n(x) = \frac{f^{(n+1)}(\xi)}{(n+1)!} \prod_{i=0}^n (x-x_i) $$

The above error bound suggests choosing the interpolation points xi such that the product | Π (x − xi) | is as small as possible.

Proof
Let's set the error term is

$$ R_n(x) = f(x) - p_n(x) $$

and set up a auxiliary function $$Y(t)$$ and the function is

$$ Y(t) = R_n(t) - \frac{R_n(x)}{W(x)} \ W(t) $$

where $$ W(t) = \prod_{i=0}^n (t-x_i) $$ and

$$ W(x) = \prod_{i=0}^n (x-x_i) $$

Since $$ x_i $$ are roots of function f and $$ p_n(x) $$, so we will have

$$ Y(x) = R_n(x) - \frac{R_n(x)}{W(x)} \ W(x) = 0 $$

and

$$ Y(x_i) = R_n(x_i) - \frac{R_n(x)}{W(x)} \ W(x_i) = 0 $$

Then $$Y(t)$$ has n+2 roots. From Rolle's theorem, $$Y^\prime(t)$$ has n+1 roots, then $$Y^{(n+1)}(t)$$ has one root $$\xi$$, where $$\xi$$ is in the interval I.

So we can get

$$ Y^{(n+1)}(t) = R_n^{(n+1)}(t) - \frac{R_n(x)}{W(x)} \ (n+1)! $$

Since $$p_n(x)$$ is a polynomial of degree at most n, then

$$ R_n^{(n+1)}(t) = f^{(n+1)}(t) $$

Thus

$$ Y^{(n+1)}(t) = f^{(n+1)}(t) - \frac{R_n(x)}{W(x)} \ (n+1)! $$

Since $$\xi$$ is the root of $$Y^{(n+1)}(t)$$, so

$$ Y^{(n+1)}(\xi) = f^{(n+1)}(\xi) - \frac{R_n(x)}{W(x)} \ (n+1)! = 0 $$

Therefore

$$ R_n(x) = f(x) - p_n(x) = \frac{f^{(n+1)}(\xi)}{(n+1)!} \prod_{i=0}^n (x-x_i) $$.

Piecewise Interpolation / Splines
B Splines

Extrapolation
Interpolation is the technique of estimating the value of a function for any intermediate value of the independent variable while the process of computing the value of the function outside the given range is called extrapolation.

Caution must be used when extrapolating, as assumptions outside the data region (linearization, general shape and slope) may breakdown.

title: Interpolation and Extrapolation


text:
Talk:Interpolation and Extrapolation

''This page is just a skelleton. I will add content as time permits. The main purpose of putting this up is to define what goes where in the track Numerical Algorithms.''

Goals
After finishing this course, students should:
 * Know that discrete data can be approximated/interpolated by a polynomial.
 * Know different representations of the interpolating polynomial as well as how to compute them.
 * Know that functions can also be represented with different bases
 * Know what piecewise interpolation and splines are and know how to compute them.
 * Know how to efficiently extrapolate a point in the different representations.

Take-Home Message

 * Discrete data can be interpolated with a number of methods.
 * Different representations of the interpolated function fit different needs.

title: Talk:Interpolation and Extrapolation


text:
User:MichaelBillington

 /Scripts /Blog /Sandbox Home wiki  I'm a Wikiversity contributor from Melbourne, Australia. I'm a custodian here as of 2006, so if you'd like me to help you with anything, you can ask on my talk page. I can be found on  as Mike42. Come and join us in #wikiversity-en!

Information wants to be free. You will assimilate into our free information. Resistance is futile.

it:Utente:MichaelBillington

title: User:MichaelBillington


text:
The Art of Computer Programming

The Art of Computer Programming (sometimes known by its initials TAOCP) is a comprehensive monograph written by Donald Knuth that covers many kinds of programming algorithms and their analysis.

This learning project is intended to provide a place for the discussion of Donald Knuth's the Art of Computer Programming. Discussions also take place on the mailing list at taocprg@lists.ibiblio.org

Please feel free to add notes to this page or (better) make a link to your notes/exercise/questions from the appropriate section of the book below.

Table of Contents
'''Chapter 1 - Basic Concepts ..................................... 1'''   1.1. /Algorithms/ (exercises) .................................... 1   1.2. /Mathematical Preliminaries/ ............................... 10       1.2.1. Mathematical Induction ............................. 11       1.2.2. /Numbers, Powers, and Logarithms/ External Solutions(exercises)......... 21       1.2.3. Sums and Products .................................. 27       1.2.4. Integer Functions and Elementary Number Theory ..... 39       1.2.5. Permutations and Factorials ........................ 45       1.2.6. Binomial Coefficients .............................. 52       1.2.7. Harmonic Numbers ................................... 75       1.2.8. Fibonacci Numbers .................................. 79       1.2.9. Generating Functions ............................... 87       1.2.10. Analysis of an Algorithm .......................... 96      *1.2.11. Asymptotic Representations ....................... 107          *1.2.11.1. The O-notation ............................. 107          *1.2.11.2. Euler's summation formula .................. 111          *1.2.11.3. Some asymptotic calculations ............... 116   1.3. MIX ..................................................... 124       1.3.1. Description of MIX ................................ 124       1.3.2. The MIX Assembly Language ......................... 144       1.3.3. Applications to Permutations ...................... 164   1.4. Some Fundamental Programming Techniques ................. 186       1.4.1. Subroutines ....................................... 186       1.4.2. Goroutines ........................................ 193       1.4.3. Interpretive Routines ............................. 200           1.4.3.1. A MIX simulator ............................. 202          *1.4.3.2. Trace routines .............................. 212       1.4.4. Input and Output .................................. 215       1.4.5. History and Bibliography .......................... 229

'''Chapter 2 - Information Structures ........................... 232'''   2.1. Introduction ............................................ 232   2.2. Linear Lists ............................................ 238       2.2.1. Stacks, Queues, and Deques ........................ 238       2.2.2. Sequential Allocation ............................. 244       2.2.3. Linked Allocation ................................. 254       2.2.4. Circular Lists .................................... 273       2.2.5. Doubly Linked Lists ............................... 280       2.2.6. Arrays and Orthogonal Lists ....................... 298   2.3. Trees ................................................... 308       2.3.1. Traversing Binary Trees ........................... 318       2.3.2. Binary Tree Representation of Trees ............... 334       2.3.3. Other Representations of Trees .................... 348       2.3.4. Basic Mathematical Properties of Trees ............ 362           2.3.4.1. Free trees .................................. 363           2.3.4.2. Oriented trees .............................. 372          *2.3.4.3. The "infinity lemma" ........................ 382          *2.3.4.4. Enumeration of trees ........................ 386           2.3.4.5. Path length ................................. 399          *2.3.4.6. History and bibliography .................... 406       2.3.5. Lists and Garbage Collection ...................... 408   2.4. Multilinked Structures .................................. 424   2.5. Dynamic Storage Allocation .............................. 425

'''History and Bibliography ..................................... 457'''

'''Answers to Exercises ......................................... 466'''

'''Appendix A--Tables of Numerical Quantities ................ 619'''   1. Fundamental Constants (decimal) ........................... 619   2. Fundamental Constants (octal) ............................. 620   3. Harmonic Numbers, Bernoulli Numbers, Fibonacci Numbers .... 621

'''Appendix B--Index to Notations ............................... 623'''

'''Index and Glossary ........................................... 628'''

Related Helpful Material
Greek letters

title: The Art of Computer Programming


text: File:Binary 37.png

title: File:Binary 37.png


text: File:Fixed-point.png

title: File:Fixed-point.png


text:
Portal talk:Film and television

Message from Robert Elliott

 * 7 New Sections
 * Under the Institute of Film and Television, I have created separate sections for Narrative Motion Picture Production (which includes film and video) and for 6 other areas.  If this is not enough, please let me know.  (Tell me what classes you will be offering in your proposed section.)  I will be adding 30 educational lessons for begining film students in Narrative Film Production.  Most lessons will be high school level or first-year college film student level. Robert Elliott 14:56, 9 October 2006 (UTC)

Television Studio Production
I'm thinking of starting a course for Television Studio production (either live, live-to-tape with B-roll added later, or live-to-tape). If anyone is interested in helping, please contact me via my talk page. I cannot do this on my own as I am currently a full time student while working at a TV station and simply do not have the time. Also, I think we should create a section for 'getting to know your equipment' or something similar (maybe one for TV, one for film and have some objects crossreferenced) so that students understand just what difference devices do and how they would be chained together in a typical studio. --Tonsofpcs 20:36, 23 January 2007 (UTC)

Virtual Wikimania
The Wikiversity School of Media Studies is planning to get Wikiversity involved in producing a "Virtual Wikimania" from Taipei via a "Wikiversity kiosk" located at the main event. Some of the participating content development groups are:
 * Topic:Wikimania - Wikimania, Wikimania 2007 etc.
 * Topic:Internet Audio and Video - Setting up the Sandbox Server (or equivalent) with Icecast and and other Internet Audio/Video services.
 * Topic:VoIP - Setting up the Sandbox Server (or equivalent) with Asterisk Voice over Internet Protocol hub linked to something like an OpenMoko/Internet Kiosk
 * Topic:Server administration - Setting up the Sandbox Server (or equivalent) in general
 * Topic:Internet Audio - Wiki Campus Radio, Hypatia, etc. to work on Topic:Audio Engineering learning projects for the "Sound of Wikiversity" Internet radio project
 * ...several others... just follow the breadcrumbs...

If you know of people, companies or groups that could help out, please let us know at Talk:Wikimania 2007. Thanks in advance for your input! CQ 17:45, 22 April 2007 (UTC)

title: Portal talk:Film and television


text:
User:Bakert

http://bluebones.net/ is my main site. I'm trying to help start a group discussing The Art of Computer Programming by Donald E. Knuth. I'll never get through it alone!

title: User:Bakert


text:
Talk:Introduction to Likelihood Theory/The Basic Definitions

May I suggest that this page be named by something more specific? When I saw this page in recent changes, I had no idea what it was about (still don't, but that's another matter ;-)). I think it would be better off named "Basic definitions of ". Cheers. Cormaggio 17:07, 9 October 2006 (UTC)

Basic?
I can see that this is the core of maths, but it is not "basic" in the way I would use the word.

 * No, it is not. It is however an excellent example of bad teaching. Jcwf (discuss • contribs) 18:14, 17 May 2013 (UTC)

Making sure there are definitions for all terms
I am going through and creating wiki-links (brackets ) around all the words whose definitions are pre-requisites to understanding this content. For example: set.

I have a question though: Should I use set or should I use something else, like /set/ (with slashes "/")? In the interest of quick content creation, I believe that set should go to a disambiguation page that lists all uses of the term "set": later editors (or later revisions by the same editor) can change the link to go to the specific, disambiguated page.

Some things that I do to try to minimize the amount of redundancy can include re-directs from plurals ("sets" would redirect to the "set" disambiguation page).

In order to do this, a list of pages that direct to the disambiguation page would be useful. . . I think we can track this via "incoming links" - so, people that change the link from set to a specific definition of "set" would need to add that possibility to the Disambiguation page. I think Wikipedia does this by naming things like, "set_(Mathematics)" (set_(mathematics))

In an encyclopedia like Wikidedia, definitions are meant to be as inclusive as possible: give people the whole view of a given topic. However, for our uses in education at Wikiversity, definitions should be the minimum amount necessary to understand the term in its specific context. When this is built up, people with little knowledge could make their way to greater knowledge.

Joshp (discuss • contribs) 00:20, 1 April 2014 (UTC)
 * 1) It could function as a reverse-lookup: take, for example NPr = N! / (N-r)!:
 * 2) Unfortunately, you can't make the whole thing a link by putting brackets around it: (it comes out like this: NPr = N! / (N-r)!) If


text:
Sun Tzu

part of the School of Strategic Studies

=Online Reading Material=

Wikimedia Articles

 * Wikipedia: Sun Tzu
 * Wikipedia: The Art of War
 * Wikisource: Sun Tzu
 * Wikiquote: Sun Tzu

Primary Texts

 * The Art of War translated by Lionel Giles (1910), Project Gutenberg edition with considerable (but dated) text on Sun Tzu
 * The Art of War translated by Lionel Giles (1910), Project Gutenberg edition without the translator's annotations, and including an HTML version.
 * The Art of War, Chinese original at Project Gutenberg
 * Sun Tzu The Art of War by Sonshi Translation, message board, author interviews
 *  translated by Lionel Giles (1910)

Dissonance: The Art of War Commentators

The Art of War has been translated many times and published in many commentaries, the bulk of which have been militaristic in whole or in part. The commentary makes much of the assumption that Art of War was written as an “experience of war that was often savage, cruel and deadly serious” in the “vastly different context” of “military operations in China during the period of the Warring States” (Teck and Grinyer 1994, 289). An element of this tale is that Art of War was a commissioned work, written by a general for one of the warring lords. There is no reliable evidence supporting these notions. Nevertheless, a brilliant treatise that played a key role in establishing the Chinese empire, and published in millions of copies, is thought by most to be instructions on how to start a fire and kill enemies crossing a river. The first translation done in a European language was published in Paris in 1772, under the title “L’art de la guerre.” Its author was a Jesuit missionary to China, Jean-Jacques Amiot who was not pleased with the translation work done to that time. Following Amiot were Captain E. F. Calthrop and Lionel Giles. More recently, the field has been dominated by General Samuel B. Griffith and Thomas Cleary. For a good many years, there has been a raging battle between the miltarists and those who believe there is more to Bing-fa than war. Griffith dismissed Amiot’s work because he saw it as overly focused on moral and humanitarian issues, causing him to “misinterpret” Bing-fa. He didn’t like what Lionel Giles achieved either. It was

marred throughout by tasteless criticisms. Had this eminent orientalist devoted to his own effort the energy he wasted in denigration of Captain Calthrop’s, one may surmise that his would have been somewhat better than it is. (Griffith 1963, 181)

D. C. Lau has little good to say about Griffith. Roger Ames (1993, 8) said Giles made a “vitriolic and undignified assault” with “unrelenting unkindnesses to poor pioneering Calthrop.” Though Ames commends the “invaluable insights” of Griffith, he can’t find an equal reason to praise Giles and Cleary. Griffith’s work “is superior to Giles’s [sic] and to recent popular attempts such as the Thomas Cleary translation, informed as the latter is by neither practical military wisdom nor scholarship.” Cleary got his turn with Wilhelm’s translation of The Secret of the Golden Flower. He accuses Wilhelm of “reading weird and superstitious ideas into the text,” and in a burst of indignation, refers to him in the space of three sentences as having published a work that was confused, misconstrued, unreliable, flawed, and dysfunctional (1991). Says Handel (1992, 158),

None of the currently available translations of Sun Tzu is entirely accurate. Each translator has employed some modern Western phrases or words that do not exist in the original and has inevitably, even if unintentionally, contributed some of his own ideas. This is particularly true of General Griffith’s readable translation, and less so of the Giles translation.

Tang Zi-Chang (1969, 175) says Griffith’s work has “chapter headings [that] do not correspond with the accurate Chinese meanings nor are they proper English military terminology.” A good example of this never-ending debate can be seen in Wee et al. (1996, 296). In the latter years of the twentieth century, Bing-fa became the darling of martial artists, militarists, and writers enamored with the wars and warriors of ancient Asia. James Clavell enthusiastically proposed that military officers should be required to write examinations on Bing-fa, which, if they fail, would lead to dismissal or demotion.

I truly believe that if our military and political leaders had studied [Sun Tzu], Vietnam could not have happened, we would not have lost the war in Korea; the Bay of Pigs could not have occurred; the hostage fiasco in Iran could not have come to pass; the British Empire would not have been dismembered; and in all probability, World Wars I and II would have been avoided—certainly they would have not been waged as they were waged, and the millions of youths obliterated unnecessarily and stupidly by monsters calling themselves generals would have lived out their lives. (Clavell 1993, 1–2)

Clavell never does explain just how Bing-fa could influence or prevent all these events, but he tells us he “believe[s] The Art of War shows quite clearly how to take the initiative and combat the enemy—any enemy.” This is not Bing-fa but Clausewitz, who said there is really only one key decisive element in war: “sheer overwhelming force. Rudnicki says Art of War is simply “Thirteen Chapters about war.” Lau and Ames (1996, 59) say it is “an important classical text on the subject of warfare [which explains] why it has come down to us through an unbroken transmission.” Ames (1993, 7) tells us he consulted exclusively with “China’s leading scholars in military affairs” to write his “definitive Sun Tzu.” Forcing Bing-fa into the military genre with Machiavelli, Clausewitz, and Antoine Henri, Baron de Jomini has led to bizarre interpretations and conclusions. Is it reasonable that a manual on military tactics has gained Bing-fa “a place in the world’s literature,” philosophical or not? Manuals do not as a rule make great literature, and as a war manual Bing-fa just doesn’t cut it. It is in fact often discredited in the military canon. Considerable pain has been taken at times to maintain the militaristic charade. The commentary achieves this by the insertion of new material or by an extravagant and convoluted interpretation of what Bing-fa must have meant. When the practical matters of the conduct of war cannot be found, the commentators become apologists for Bing-fa’s inadequacy, or they simply add in the missing bits. To date, no commentator has seen that Bing-fa is focused on conflict free organizational and engagement management. Stefan Rudnicki’s Art of War contains material from General Colin Powell, Marshal Turenne, and Stonewall Jackson. He even arranges to have “Sun Tzu the warrior” commenting on Sun Tzu. Like General Tao Hanzhang, Rudnicki does not favor us with references, but he does tell us unhelpfully that his “version is mostly derived” from the Giles translation. In Art of War there is nothing on how to conduct a siege, how to treat sickness and wounds, and how to set up and maintain supply lines. We must look elsewhere for instructions on the care of horses and other beasts of burden. Lau and Ames say Art of War mentions crossbows only twice because they weren’t popular at that time (1996, 43). Griffith provides reams of information on weaponry gathered from other sources, because in his view there just isn’t enough in Art of War. He adds to this misdemeanor with strange extrapolations that have no foundation in the text:

The organization described by Sun Tzu permitted considerable flexibility in march formations, while articulation made possible rapid deployment into those suitable for battle. The five man squad or section could obviously march either in rank or file. (1963, 37)

The commentary, frustrated at its inability to see what Bing-fa is really all about, blames it and never themselves. Vaughan Yarwood reviewed Krause’s work in July 1996 in Management and was favorably impressed. But Art of War did not fare so well. Yarwood noted that Krause “included nuggets of the original’s sketchy and disordered text for flavor.” But Handel (1992, 22, 54) disagrees with that take to a point. “Many strategists are more comfortable reading Sun Tzu rather than Clausewitz’s On War, whose methodology and style are not as easy to follow. On War lends itself to facile, hence erroneous, comparisons because it is seldom read in its entirety.” But, says Handel, one gets real value by taking the time to read all of Clausewitz. “The concepts for which Clausewitz is most renowned are all set forth by Sun Tzu in The Art of War, although Clausewitz analyzes them in more detail and may express them in more elegantly worded aphorisms.” General Tao Hanzhang (1987, 90) says, “The main shortcomings of Sun Tzu’s Art of War are that it does not discuss the nature of war.” Michael Handel is unsure what you can use Art of War for, unless you want to study how a prince sees things from a lofty perch.

Unlike On War, The Art of War does not offer the reader a systematic explanation or step-by-step reconstruction of the logical process through which concepts are developed. From this point of view, The Art of War reads more like a manual written as a compact guide for the ‘prince’ or higher ranking military commander. Thus, while Clausewitz leads the reader through a tortuous - though educationally rewarding—reasoning process, Sun Tzu, for the most part presents the reader with his conclusions. (1992, 22)

In 1929, Tang Zi-Chang said that his military science mentor told him that while “Sun Zi wrote a very profound book, it is not well organized.” In Zi-Chang’s view, Art of War is in disorder because of the effects of time and deterioration of writing materials (1969, 13). Though Giles calls Ts’ao Ts’ao (155–220 CE) a military genius and a great writer, he also says his commentary was “scarcely intelligible” and as much in need of analysis as Art of War itself. Much of the commentator argument has focused on specific passages. Griffith translates III.4 this way: “Thus what is of supreme importance in war is to attack the enemy’s strategy.” Giles, he says, not only translates the passage incorrectly, but (predictably) is being too soft, as usual, in imagining Art of War had in mind “to balk the enemy’s plans.” Griffith apparently missed Giles’s definition of “balking.” To him it meant “an active policy of counter-attack.” There is, however, a continuing line of analysts who have veered from the established militarist path. Tu Mu was isolated for his pacific views about Bing-fa. Cheng Hou dared suggest that Bing-fa might have been a work of philosophy that simply used military tactics for illustration. In reaction, Chu His expressed his astonishment and resentment to this, audacious comparison with the venerated classical works of a document that encourages a ruler’s bent towards unrelenting warfare and reckless militarism. (Giles 1910)

Ou-yang Hsiu, a thousand years after Bing-fa was created, praised Mei Sheng-yu and offered his reaction to those who imagined that Bing-fa was not a manual for the conduct of war:

Later scholars have misread Sun Tzu, distorting his words and trying to make them square with their own one-sided views. Thus, though commentators have not been lacking, only a few have proved equal to the task. My friend Sheng-yu has not fallen into this mistake. In attempting to provide a critical commentary for Sun Tzu’s work, he does not lose sight of the fact that these sayings were intended for states engaged in internecine warfare; that the author is not concerned with the military conditions prevailing under the sovereigns of the three ancient dynasties, nor with the nine punitive measures prescribed to the Minister of War. In his own commentary, Mei Sheng-yu has brushed aside all the obstinate prejudices of these critics, and has tried to bring out the true meaning of Sun Tzu himself. In this way, the clouds of confusion have been dispersed and the sayings made clear. I am convinced that the present work deserves to be handed down side by side with the three great commentaries; and for a great deal that they find in the sayings, coming generations will have constant reason to thank my friend Sheng-yu. Making some allowance for the exuberance of friendship, I am inclined to endorse this favorable judgment, and would certainly place him above Ch’en Hao in order of merit.

Lau and Ames (1996, 41) suggest Bing-fa’s imagery “naturalizes the military culture, by bringing together military detail and philosophical ideas.”

Contemporary scholars who work on classical Chinese military thought [consider Sun Tzu to be] a philosophical text. In a highly conceptual and even philosophical way, Sun-tzu addresses the issues of warfare, the operations of the military, its strategy, tactics, and so on. It is, in their view, the fact that Sun Tzu is philosophical, that has assured it a place in the world’s literature, while the Sun Pin has been ‘lost to posterity.’ (ibid., 57)

Roger Ames (1993, 35, 40-41, 73) shows insight when he tells us that “military strategy can be used as a source of metaphors to shape philosophical distinctions and categories.” He says teaching practices at the time Bing-fa was created “grounded” theory and philosophy in experiences and “evocative metaphors.” These devices were intended to aid learning and the development of knowledge, not through rote but through cognitive processes. This is all very good. But he then says, “The place of [Bing-fa] as the fundamental work in classical military literature is unassailable.” Mark McNeilly is one of the modern commentators who has helped move Bing-fa from the battlefield to the boardroom. But he confesses that it has not been easy.

Because business, like warfare, is dynamic, fast-paced, and requires an effective and efficient use of scarce resources, modern executives have found value in Sun Tzu’s teachings. But The Art of War is arranged for the military leader and not the CEO, so making connections between ancient warfare and today’s corporate world is not always easy.

If only he had shown that Bing-fa’s messages and benefits were all about careful observation, evaluation, and settlement with the least possible disturbance. Bing-fa is the stuff of strategic planning and management, and both military and civilian organizations are in woeful need of help along these lines. The military commentary has no room for alternate methods of inter-organization management and dispute resolution. Some even dismiss the value of intelligence gathering in situations leading to, or in the midst of, conflict. They never challenge the notion of inherent value in competition and the inevitability of conflict. Some imagine conflict to be beneficial. “Strategic management” to these folks is all about the economics of loss prevention. The competent general, in this view, achieves the objective, without completely destroying the objective or his own forces. But if subduing the enemy takes destruction, then so be it. Some are able to articulate war as a beneficial activity. James Clavell says, “Since ancient times, it has been known that the true object of war is peace” (1983, 7). R. L. Wing says the purpose of Bing-fa was “to outline specific strategies to overcome conflicts while viewing the world as a complete and interdependent system that must be preserved” (1988, 13). Now consider an example of missing information—in this case, what the militarist really needs to know about types of warfare. About “mountain warfare,” Art of War says you should camp high up, but don’t climb to fight. On the subject of “river warfare,” it says to moor your craft higher up than the enemy’s and not to move upstream to meet him. Instructions for campaigning in salt marshes and in dry level country total three lines.

James Clavell adds what he imagines is helpful content about river navigation when he reviews chapter IX. “Do not move upstream to meet the enemy. Our fleet must not be anchored below that of the enemy, for then they would be able to take advantage of the current and make short work of you.” In another invention he says, “In crossing salt marshes … get over them quickly because of the lack of fresh water, and poor quality of the herbage.” And again, Art of War's “dispersive ground” means that “soldiers, being near to their homes and anxious to see their wives and children, are likely to seize the opportunity afforded by a battle and scatter in every direction” (1983, 42–43, 56). He may have borrowed this fascinating idea from Calthrop, who describes “distracting ground” this way (1908, 58). When commentators read in IX.14 about waiting until the river subsides before crossing it, they understand only that it is foolish to cross a swollen river. They take an equally literal meaning from IX.3–5, where Art of War discusses “getting away from rivers” and “meeting enemies at, or in rivers.” Chapter IX illustrates how one can derive facts from appearances though careful observation and interpretation. Using wood lore metaphors, Art of War speaks of forests and dust clouds. Oblivious to the metaphor, commentators debate the details. This has been taken to an absurd level by Machell-Cox, who discusses the tactical uses of trees and shrubs. He suggests that in the upcoming (1940s) Japanese campaign, “the Services” would benefit if data were assembled on such matters (Machell-Cox 1943, 43). Zi-Chang (1969, 54) says that when the army is in “disturbed country … help the rulers to unite.” Krause (1995, 2) says, “Sun Tzu’s central idea is that battles or competitions are won by the organization or person who, first has the greatest competitive advantage and who, second, makes the fewest mistakes.” Speaking of “the army on the march,” Art of War says, “Camp in high places, facing the sun. Do not climb heights in order to fight. So much for mountain warfare.” Moving from mountains to streams, Art of War says, “After crossing a river, you should get far away from it.” Sawyer (1996, 26) says the lines on “terrain” were the first systematic study of the subject. But Art of War, when it suggested “camp[ing] in high places, facing the sun,” was not suggesting where the army should pitch its tents. Sawyer (1993, 172 note 118) says that armies shouldn’t camp downstream from their enemies because of the possibility of “suddenly released flood waters.” That might well be a threat if the army was encamped under the “enemy’s” dam. The Art of War instructions on fighting with fire and water are, from a literal view, plainly absurd. Art of War is not written in “very specific and operational terms,” as one (better) commentator has it (Teck and Grinyer 1994, 289). But such an analysis is up against powerful forces. “Really sound knowledge of topography, movement and supply are the foundations of military knowledge, not tactics and strategy as most people think” (Machell-Cox 1943, 6). Where Bing-fa says ensure you will be victorious before you engage, they see an admonition to pick on weaklings. Wee et al. (1996, 110) say it is essential that you “find the right victim [as] the chosen target must be an easy prey.” This represents a serious misunderstanding of Bing-fa’s strength management methodology. It also is in direct conflict with the ethical standards set out in both Bing-fa and the Tao Te Ching. General Griffith (1963, 87) shows some minor advance over Wee et al. when he tells us, “Anciently those called skilled in war conquered an enemy easily conquered.” Nevertheless, it is still a long journey to achieve compliance (or even resonance) with the admonitions of the Tao Te Ching:

If actions are approached, and carried out in the natural way, the power of evil is reduced, and so the ruler and the ruled are equally protected. They will not contrive to harm each other, for the virtue of one refreshes the other. (60)

The commentators agree that chapter X describes six types of “ground,” but then imagine that chapter XI defines nine types of “situations” or “grounds.” The evident redundancy escapes them. Chapter X is about engagement situations, and as Krause and Tang Zi-Chang have seen, chapter XI is about engagement dynamics. But there are other problems with the commentary. Over the last 2300 years, it is possible that modifications may have been made to the text. It could well be that elements, including the tone of Sun Pin could have been blended into Bing-fa. The 1972 the oldest known Bing-fa manuscript was recovered from an ancient tomb near Linyi in Shandong. It differs from all the known militarist Bing-fa versions used by the commentary. J. H. Huang has made a very significant contribution to linking today’s “Art of War” with Qin’s Bing-fa. His first challenge was to the accepted meaning of the word “war” in “Art of War.” “Art of War,” he feels, may be no more than a later added mistranslation. Huang’s knowledge of the Bing-fa epoch, culture, language, philosophy, and writing style, and his focus on the Linyi text have enabled him to examine Bing-fa from a fresh perspective. He followed the same linguistic analysis process Paul Lin used with the Tao Te Ching, and achieved a high level of coherence as a result. His conclusion: the persistent war context and application of Bing-fa is highly suspect. But it is more than “suspect." The Bing-fa thesis is crystal clear: conflict free management and engagement are critically important. Ensure control. Ensure minimal loss and costs - to all parties. With great clarity and even stridency, Bing-fa says that if relations have dissolved into conflict, then the cause and consequence is failure. Organizations – and perhaps the wider community - will suffer.

D.G. Jones, author of The School of Sun Tzu, available from iuniverse.

Biographical Works
=Offline Reading Material=

Primary Texts

 * Sun Tzu - The Art of War, Samuel B. Griffith, translation & commentary, forward by B.H. Liddell Hart, (NY: Oxford University Press, 1971), ISBN 0-19-501476-6
 * Sun Tzu on the Art of War, Lionel Giles, translation & commentary, (Singapore: Graham Brash (Pte) Ltd., 1993), ISBN 9971-49-107-9
 * Sun-Tzu The Art of Warfare, Roger T. Ames, translation & commentary, (NY: Ballentine, 1993), ISBN 0-345-36239-X (first English translation incorporating the recently discovered Yin-ch’üeh-shan texts)
 * Art of War, Ralph D. Sawyer, translation & commentary, (CO: Westview, 1994), ISBN 0-8133-1951-X
 * Sun Tzu: The Art of War, Thomas Cleary, translation & commentary, (Boston: Shambhala Publications, 1988), ISBN 0-87773-452-6
 * Sun Tzu: The New Translation, J.H. Huang, translation & commentary, (NY: William Morrow, 1993), ISBN 0-688-12400-3
 * "The School of Sun Tzu: Winning Empires without War." David G. Jones (iuniverse)(ISBN 978-1-4697-6911-0; 978-1-4697-6912-7)
 * Sun Tzu’s Art of War, Yuan Shibang, translator; commentary by General Tao Hanshang, (NY: Sterling Publishing Co., 1990), ISBN 0-8069-6639-4
 * Sun Zi: The Art of War, Zhang Huimin, translator, Maj. Gen. Xie Guoliang, commentary, (Beijing, Panda Books, n.d.), ISBN 0-8351-3176-9
 * Sun Zi Speaks: The Art of War, illustrator, Tsai Chih Chung; translated by Brian Bruya, (NY: Doubleday, 1994 ), ISBN 0-385-47258-7
 * The Essentials of War, Zhong Qin, transcription & translation, (Beijing: New World Press, 1996), ISBN 7-80005-331-8
 * Sun Tzu: The Technology of War, C. Thorne, Translation and Commentary, (2010) ISBN 978-0-9858806-9-9

Commentaries and Articles

 * Sun Zi’s Art of War: A Picture Story Book, 6 vols., Ma Shouliang, et alia, editorial committee, (Hangzhou: Zhejiang People’s Fine Arts Publishing House, 1995), ISBN 7-5340-0312-1/G-38
 * Mastering the Art of War: Zhuge Liang & Liu Ji, Thomas Cleary, translation & commentary, (Boston: Shambhala, 1988), ISBN 0-87773-513-1
 * Emerson M. S. Niou & Peter C. Ordeshook, “A game-theoretic interpretation of Sun Tzu's Art of War,” Journal of Peace Research. 1994 May; 31(2):161-174.
 * Edward O'Dowd & Arthur Waldron, “Sun Tzu for strategists,” Comparative Strategy. 1991; 10:25-36.
 * Laure Paquette, “Strategy and time in Clausewitz's On War and in Sun Tzu's The Art of War.” Comparative Strategy. 1991; 10:37-51.
 * Christopher C. Rand, “Chinese military thought and philosophical Taoism.” Monumenta Serica. 1979; 34:171-218.
 * Benjamin E. Wallacker, “Two concepts in early Chinese military thought,” Language. 1966; 42(2):295-299.

title: Sun Tzu


text:
Carl von Clausewitz

Part of the Strategic Studies curriculum

Wikimedia Articles

 * Carl von Clausewitz - Wikipedia entry.
 * Carl von Clausewitz, On War, 1873.

Primary Texts

 * Clausewitz, Carl von. Col. J. J. Graham, translator. Vom Kriege. On War, Complete eBook posted on Clausewitz Homepage.
 * Clausewitz, Carl von., Ed. & Translated by Peter Paret & Daniel Moran, Two Letters on Strategy. Ft. Leavenworth: Combat Studies Institute, U.S. Army Command and General Staff College, 1984 (Also available in PDF format).
 * Bassford, Christopher. Clausewitz in English: The Reception of Clausewitz in Britain and America, 1815-1945. New York: Oxford University Press, 1994. Full text on-line here.

Commentaries and Articles

 * The Clausewitz Homepage (http://www.clausewitz.com) - Excellent website maintained by Pr. Christopher Bassford of the National War College. Contains texts from & on C. von Clausewitz, exhaustive bibliographies on Clausewitz in english, german, french...
 * Gerhard Muhm, "German Tactics in the Italian Campaign", (tr. from "La tattica tedesca nella campagna d'Italia", in Linea gotica avamposto dei Balcani, a cura di Amedeo Montemaggi. Roma: Edizioni Civitas, 1993) http://www.larchivio.org/xoom/gerhardmuhm2.htm

Primary Texts

 * Clausewitz, Carl Von, tr. Graham, JJ (2004) On War (New York: Barnes and Noble) ISBN 0-7607-5597-3 - Oldest English translation
 * Clausewitz, Carl Von, edited and translated by Michael Howard and Peter Paret. On War, Princeton, Princeton University Press, 1976, rev.1984, ISBN 0-691-05657-9 - Modern translation

For a note on the differences in the translations, see this topic's discussion page.

Commentaries and Articles

 * Aron, Raymond, translated by Christine Booker and Norman Stone, Clausewitz: Philosopher of War. London: Routledge and Kegan Paul, 1983.
 * Handel, Michael I. (ed.), Clausewitz and Modern Strategy. London: Frank Cass, 1986. ISBN 0-7146-4053-0
 * Handel, Michael I., Masters of War. Classical Strategic Thought. London: Routledge, 2001 (third ed.; 1992, 1996). ISBN 071468132-6
 * Heuser, Beatrice, Reading Clausewitz. London: Pimlico, 2002. ISBN 0-7126-6484-X
 * Nooy, Gert de, The Clausewitzian Dictum and The Future of Western Military Strategy. The Hague: Kluwer Law International, 1997. ISBN 90-411-0455-0
 * Paret, Peter. Clausewitz and the State: The Man, His Theories, and His Times. Princeton: Princeton University Press, 1976.
 * Rothfels, Hans “Clausewitz” pages 93-113 from The Makers of Modern Strategy edited by Edward Mead Earle, Gordon A. Craig & Felix Gilbert, Princeton, N.J.: Princeton University Press, 1943.
 * Smith, Hugh, On Clausewitz: A Study of Military and Political Ideas. London: Palgrave, 2005. ISBN 1-4039-3587-4

Biographical Works

 * Parkinson, Roger. Clausewitz: A Biography. New York: Stein and Day, 1971.

title: Carl von Clausewitz


text:
Niccolò Machiavelli

Niccolò di Bernardo dei Machiavelli (3 May 1469 – 21 June 1527) was an Italian historian, politician, diplomat, philosopher, humanist, and writer based in Florence during the Renaissance. He was a founder of modern political science, and more specifically political ethics.

Wikimedia Articles

 * Niccolò Machiavelli

Primary Texts
The main primary text which will be used in this unit is The Prince by Niccolò Machiavelli. The Prince is a political treatise, and follows the International Relations doctrine of Classical Realism. First published in c. 1516, The Prince has since become one of the foremost historical pieces on politics and statecraft during the Renaissance Period in Italy. The edition used in this unit is the Penguin edition (rev. ed. 2003) translated by George Bull.

title: Niccolò Machiavelli


text:
Sir Julian Stafford Corbett

part of the School of Strategic Studies

Readings

 * Julian Corbett
 * Corbett, Julian S., Some Principles of Maritime Strategy. London, 1911.

title: Sir Julian Stafford Corbett


text:
Motion in one dimension

Motion in One Dimension is among the earliest lessons in Classical Mechanics. This page first introduces the terms and then shows how they are applied to different forms of motion in one dimension.

Definition
Motion is defined as change in position of a body over time with respect to the surrounding. For the concept of motion in one direction, consider a motion of a body along a straight track. The subject of motion in physics is called a, "body".

Displacement
Displacement is defined as the shortest distance (x) a one-dimensional object is from a center point, or an origin. Displacement is plotted against time in a curved graph. A body, in motion in one dimension, can only move left and right.

Picture a train that travels along a straight track. The origin is a point on that track, and as the body moves, the distance between the body and the origin is its displacement. If displacement of our train, given the variable (x), is worked out to be negative, then the train is |x| meters on the left hand side of the origin. If (x) is worked out to be positive, then the train is x meters on the right hand side of the origin.

Now consider a train moving along a curved path from A to B. when the train reaches B, its distance travelled will be the total length of the curve. But the displacement of the train will be the shortest distance from A to B i.e the length of the straight path from A to B

Velocity
Velocity is defined as the rate at which displacement changes over time. The higher the velocity, the faster a body is moving. It is a vector quantity i.e. it requires both magnitude and direction.Velocity can be zero also if the total displacement is zero, and this is only when the body after travelling a certain distance in any direction comes to rest at the same point where it started. The instantaneous velocity can also be zero when the sign of its magnitude changes; for example, a body experiencing constant acceleration against its direction of travel will eventually switch directions and move in the direction of the acceleration, and at that instant, its velocity is zero.

In terms of mathematics, the most general definition of velocity is: $${v} = \frac{dx}{dt}$$

What this means is that velocity is the derivative of displacement with respect to time.

Acceleration
Acceleration is the rate of change of velocity with time. A body with a positive acceleration is gaining velocity over time. A body with a negative acceleration is losing velocity over time. The mathematical definition is: $$a = \frac{dv}{dt} = \frac {d^2x}{dt^2}$$

Motion with Constant Velocity
This is the simplest type of motion in one dimension. A body will have motion with constant velocity if it is sliding over a horizontal surface with minimal friction. A puck sliding across a hockey rink, or a square block of ice traveling along a flat kitchen floor are two examples of bodies, which have motion of constant velocity. Motion with constant velocity is plotted on a graph of displacement vs. time.

The equation for the line is: x = x0 + vt, where (x0) is the displacement, (v) is the velocity, and (t) is the time.

The slope of the line in the graph, or dx/dt calculates the velocity, which is constant. Obviously the acceleration (a) in the equation is equal to d²x/dt², and "0", because the velocity of the body is constant, and therefore not increasing, or decreasing.

title: Motion in one dimension


text:
C Programming/Introduction

Objective

 * Understand and differentiate between hardware and software.
 * Understand how the computer executes software.
 * Understand the concept of compiling and compiler
 * Set up and compile a C program
 * Gain a small taste of C: Create your very first C program and run it

Hardware & Software

A computer's system unit, also commonly known as the computer case, contains a CPU (Central Processing Unit) while it usually has a monitor, keyboard, and a mouse connected to it. The CPU does all of the the processing and is an important part of the computer. Without it, the computer wouldn't even be able to run. The monitor displays graphics on a screen, which is easy for the user to see. The monitor acts as visual output. The keyboard and the mouse act as user input. The computer uses this input for many things and you'll most likely get some kind of response because of it.

The computer uses all of this equipment to do its job. This equipment, called hardware, isn't the only thing that makes a computer run. With all of the hardware something else is still needed to bring the computer to life. The stuff that actually makes the computer do something is called software. Unlike hardware, software cannot be manipulated directly by the user. Usually, the user needs to use the computer to interact with the software.

The CPU processes the software and executes it appropriately. Software is made up of a lot of instructions which the CPU executes. We don't need to go in depth about the instructions, since they vary between CPU's. The important thing is that we know that there are instructions.

It is now understood that, if we want the computer to perform a task, we must first get the instructions first. How? We simply write them down and then turn them into executable code that the CPU can use. Just remember this, a computer program is a set of instructions (a "recipe") that defines the task to be performed.

Programming and programming language
Programming is the method we use to make the computer do what we want. Contrary to common belief, computers are not smart as they need to be told how to do even the simplest things down to the tiniest detail. Programming is the act of instructing the computer how to do something.

A programming language is the way we communicate with the computer. It's the same concept as a spoken language. When you talk to another person, you use a set of symbols (words) with a meaning you both know. When programming, you use a set of symbols that a program called a compiler knows. The compiler then translates it into a series of instructions for the processor.

Program Execution
Machine code is the computer's true language. Some would call it unreadable by human standards. However, it is digital poetry to the trained. Back when computer science was still in its infancy, all programs were written in machine language. Before screens and printers existed, the programmer laboriously entered into the computer the machine code for the program and then fed each instruction via some external device, such as punch cards or switches. This task of writing programs was extremely slow and prone to errors.

When a program is executed, the computer reads each instruction and performs the task associated with that instruction. Since each computer can vary in the type and amount of instructions it has, we won't focus too much on this topic. The important thing to know is C's ability to be cross-platform when creating code. This portability was the key to C's success.

Compiling and compiler
Machine code is basically a set of instructions that the computer can execute. Computers use binary as the format for storing information. Each number can either be a 1 or a 0; which could be represented as on and off. Thankfully, a new method of writing programs has replaced machine code; this is called assembly. Although this is pretty consistent to writing binary, assembly still gives the program some edge, leading to less wasted time. Still, coding in assembly was slow and error-prone. Higher-level programming languages started to appear. These made it easier for the programmer to write programs, efficiently and quickly. Some of these languages convert their code to assembly, which will come in handy later in the course. C, unlike a lot of new programming languages, converts its code to assembly where a new executable file is created.

A compiler is a piece of software which takes a number of files of source code (C code in this case) and converts into an executable file which you can run on your computer. Note that not every language is compiled - some are "interpreted" (read line-by-line as the code is executed), and some are a mix, using something called "bitcode" or "bytecode". The executable file produced by a compiler is in a language called machine code - normally a compiler also converts the code into assembly in-between, while trying to "optimize" it (make it faster and take up less RAM).

Understanding C
C is widely considered the lowest-level programming language, after assembly language and machine code. What this means is that C focuses much more on operations that work out exactly as they look - the logic used in the language is very similar to what the computer does. This differs from higher-level languages where list manipulation might be an option, whereas in C, you specify exact operations over a range of computer memory addresses to manipulate data in a specific way, which is known as memory management. This can either make things more or less intuitive for a person - sometimes you get weird results due to data types, and other times it can make processes easier. Since resource acquisition is one of the most common tasks in programming, any programmer with knowledge of memory management has an advantage.

Generally, however, C is viewed as being more difficult as you puzzle through the correct way to do certain things, and make sure you avoid dangerous syntax errors. However, knowing C is reward enough for the effort of learning the language - it is useful, flexible, and above all - very, very fast.

Most modern languages have a C-like syntax, even if they aren't based on C.

C compiler
Linux or Macintosh computer has a built-in C compiler with them. Linux comes with GCC (GNU Compiler Collection - previously named GNU C Compiler), whereas MacOSX comes with Clang, a compiler that acts as a frontend to the LLVM compiler. For this course, we will use the GNU compiler.

Apple provides for MacOS the Xcode software, but it takes up a lot of disk space, so if you don't have a lot to spare, consider alternatives. Students working with MacOS for this course can use their built-in compiler Clang instead or install GCC on their Macintosh systems. To install GCC on a Macintosh system, all you need to do is download and install Xcode.

If you use Windows, installing a compiler can be a hassle. It is a good idea to install a development environment on Windows too - and it may come with a compiler attached to it!

For both OSes, I would recommend using Sublime Text (Sublime Text 3) (note that Sublime Text doesn't allow compilation within the application itself). Emacs is also a good choice, as this is one of the world's most flexible and universally compatible text editor.

The terminal
The terminal is the main way a programmer interacts with a computer. On MacOSX, it is an app under the name "Terminal", and is also called "Terminal" on many Linux distros. On Windows, you can use "Command Prompt". Upon opening, you will see a prompt to enter a command. To enter a command, type in to the command and hit the Enter key. An important thing to take note of is the filesystem. Your computer only normally looks in the current directory for needed files. To change the current directory, you can use the cd command on MacOSX or Linux. You can use cd --help to get more info on doing this.

We will go over the commands that we will be using in the first lesson. For the moment, simply open a terminal and enter "gcc" and press return. You should get a message that says "no input files" at the end. If so, your system have correctly been installed the gcc compiler.

Compiling programs
The way this is done will depend on how you are developing. If you are using a development environment then it may offer a way to compile within the app. However, it is impossible to cover all of this - just note that the option will normally fall under "Build" or "Compile". The command for compiling from the command line on MacOSX or Linux, however, can be covered. On Linux, simply use the gcc command, with the names of source files that are to be compiled into a single executable, and specify an output with the -o option (you should probably use a .o ending for this file on MacOSX, or .elf or .o on Linux). On MacOSX, you can use either gcc or clang to use the Clang compiler, as gcc is automatically symlinked to clang - meaning that both will actually execute Clang. The options are almost exactly the same for the two compilers, and the differences irrelevant for most purposes. It is a good idea to run the command gcc --help so that you can see a list of compiler options. You can also look online for more information.

C IDE
Beside using a C compiler like GCC to compile your program on the terminal, you can use an IDE, which is basically a text editor with one or several compilers built-into it, along with other GUI setup which helps you build your program easier, instead of typing the command like in the terminal. One candidate IDE for C starter is Dev-C++. However, using an IDE for a new starter is not recommended as it's better for any new commer to approach a new programming language from the CLI level, which is also the target of this course.

Beside installing C compiler along with its tool on your local machine, you can use the online C IDE which are totally free. Some famous free online C IDE are:
 * CodeChef
 * GDB Online
 * Ideone
 * InterviewBit
 * paiza.IO
 * PythonTutor
 * repl.it
 * TutorialsPoint

Syntax in C
The syntax of a programming language is a set of rules specifying the way(s) in which operations may be specified to be carried out by a computer. They restrict the ways in which one may specify calculation, and make sure that there can be no ambiguities in the way to interpret a given snippet of code.

Just like other programming languages, C defines a set of syntax to be followed so that the program and be compiled and executed successfully. The "must-have" syntax in every C program is ";" (the semicolon). Each block of any set of operations to be performed MUST end with a semicolon. Normally what happens is you will have some declaration or initialization or function call or assignment, and then before you can do your next set of calculations to reach an end effect upon whatever you want to change next, you will use a semicolon to break up the blocks. This may sound confusing, but when to use one is quite intuitive if you think about it as going after any chunk of grouped operations.

Let's head to the very first C program to have the first impression of their syntax.

A Taste of C
Here is the classic Hello World program written in C.

All C programs have the  macro, the most common being. What this macro really does is to tell the compiler, "Hey! Before you compile my program, just copy and paste the contents of stdio.h where I am!". This is used to include the contents of standard C libraries.

In C, code is cut up into little blocks of code called functions. Unless declared otherwise, the function  will be called first when the program starts. The center of any C program is the function main. It is where the CPU first starts executing. Anything that needs to be executed by the program must be called/done by main, or one of the functions it calls.

Don't worry about the words  and , they are special sizes that will be discussed in the later lesson.

Next thing to be noticed from this program is the curly brackets, as a function starts and ends with them.

The printf function, which is arguably the most used function in C, is used to display formatted text.

At the heart of our program is an instruction to write "Hello, World!" (followed by a newline character ) to standard out, which is usually the console. So what exactly is happening here ? First, we call, or invoke, the function. We put the arguments we wish to pass to  within the parenthesis. In the code above, we only pass a single argument, the string. What's a string? Don't worry, that and more will be explained in the following lessons.

On the next line, we have. When the computer encounters, it immediately exits the function, meaning nothing past it will be executed, and returns the integer 0 to the caller of the function (in this case, the OS). When a non-zero integer is returned to the OS, it is usually a sign that an error has occurred somewhere in the program.

You may have noticed the semi-colon at the end of   and. These lines of code are called statements, and in C, statements are always terminated with a. If you do not terminate your statements, the computer will not know where the statement ends and the next one begins.

Try writing the source code above to a file. Save the file (remember to save it with the extension  if you're using a plain-text editor) then compile it.

Now we can compile the program using gcc within a terminal. Navigate to the directory where your file is saved and enter "gcc hello.c" (As we use GCC in this course). If all went well, you should see no messages at all. If you do, the compiler will tell you what type of error it encountered or what line the error is located in your program.

Assuming that all went well, you should see a new file called "a.out" in your working directory. This file is your first application binary! To run the program, simply type "./a.out". You should see "Hello World" printed into the command line.

You can now use standard UNIX commands to re-name your binary to something like "hello" instead of "a.out".

Congratulations! You've now just executed your first program that you wrote!

Comments
Comments, which places an important part of the C program, gives details, explanation for the program reader about the purpose of that part. Developer can gives comments for functions, variables as well as a block of code. (We will discuss on functions and variables in the later lessons).

Two forward-slashes next to each other (and outside a string literal - explained later with the char data type) specify a line comment. A line comment tells the compiler to ignore the rest of the line. This allows a programmer to write little notes about their code. It is recommended that you comment your code as MUCH as possible. There are also multi-line comments. These start at any forward-slash-then-asterisk ("/*") and last until the next asterisk-then-forward-slash ("*/").

Assignments

 * Name one piece of hardware that acts as user input.
 * Name one piece of hardware that acts as user output.
 * What is a computer program made up of?
 * What is the computer's true language?
 * What is the lowest-level, platform-dependent language called?
 * Is C compiled or assembled?
 * Were you able to compile the example in this lesson? If so, what happened?

title: C Programming/Introduction


text:
Poststructuralism

The following works give useful outlines of poststructuralism:
 * Davis, C. After Poststructuralism: Reading, Stories and Theory, Routledge, London, 2004
 * Williams, J, Understanding Poststructuralism, Acumen, Chesham, 2005

The following works give useful outlines of poststructuralism as it relates to education:
 * Martausewicz, R. Seeking Passage: Post-Structuralism, Pedagogy and Ethics, Teachers College
 * Press, Columbia University 2001
 * Peters, M (ed.), Naming the Multiple: Poststructuralism and Education, Bergin and Garvey,
 * Westport, CN, 1998
 * St.Pierre, E & Pillow, W, Working the Ruins: Feminist Poststructural Theory and Methods in
 * Education, Routledge, New York, 2000

The following works give a general overview of poststructuralism and postmodernism from a literary theory perspective:

 * Barry, P. Beginning theory: an introduction to literary and cultural theory. Manchester
 * University Press, Manchester, 2002.
 * Barthes, Roland. Elements of Semiology. New York: Hill and Wang, 1967.
 * Cuddon, J. A. Dictionary of Literary Terms & Literary Theory. London: Penguin, 1998.
 * Eagleton, T. Literary theory: an introduction Basil Blackwell, Oxford,1983.
 * Foucault, Michel. Society Must be Defended. (Trans. David Macey). Bertani, Mauro & Fontana,
 * Alessandro (eds.). Picador, NY 2003.
 * Lévinas, Emmanuel. Humanism of the Other. Chicago: University of Illinois Press, 2003. p. 11-:12.
 * Ryan, M. Literary theory: a practical introduction Blackwell Publishers Inc,
 * Massachusetts,1999.
 * Wolfreys, J & Baker, W (eds). Literary theories: a case study in critical performance.
 * Macmillan Press, Hong Kong,1996.

Discussion questions and essay ideas

 * How can poststructuralism be defined?
 * What are some practical applications for ideas related to poststructuralism?

title: Poststructuralism


text:
Talk:C++/Introduction

Good job

Suggestions
Someone familiar with Thinking In C (available for free online) might want to include some references to the material,. it provides very clear explanations for a great deal of C++ for people of all expireince levels.

Additionally, the definitions of what constitutes a line of code might be moved to above the code itself. Some description about directives vrs code or how code is compiled might be appropriate there as well. I know partial descriptions of all of these are scattered about, I'm just suggesting collecting it in one place and clarifying ^.^

Perhaps namespaces should be abbreviated? A lesson explaining the use of namespaces and the creation of them could exist further in the course, allowing a great deal of expansion on the subject. Thoughts about body text:

One of the biggest fundamental problems in old programming languages was the use of identifiers (needs explanation of what consitututes an identifier). With only global variables available, programmers often found themselves having to use cryptic names for any stored data. Even something as simple as a loop counter could be accedently mistaken with other variables.

Two main approaches have been developed to solve this problem. First, in object oriented languages, the members (def) of any class could only be accessed via an instance (def) of that class, preventing naming collisions. Second, groups of identifiers can be lumped into a category called a "namespace". When accessing a member of a namespace (how to)... This prevents collisions of like-named identifiers.

Namespaces were terribly confusing for me initially before anyone explained why and how they were created. I think that we need to avoid the use of them in the code until they are explained. Perhaps a section briefly explaining identifiers and datatypes should be before this lesson?

Food for everyone's thought! feel free to do what you will with it.

 * I think that a thorough discussion and list of compilers should be included before the first section of code. That way, readers will not sit there wondering what to do. Also, a description of and IDE, and mention of Xcode (and its free-ness with the OS) should be included.

just my thoughts.

Line 36 - mispelled word
Hello, I noticed "namesapce" in line 36 was not spelled correctly. Just thought I would report it.

Thanks for all of your hard work, Russell

Concepts
I don't think some concepts were introduced clearly to begginers, if I'm allowed to I'd like to rewrite part of it.

- Vitor 14:11, 18 August 2007 (UTC)

A question regarding Identifiers

 * I'm currently taking an Introduction to Programming course and thought I'd look here for additional information. Many of the identifiers we use in class are used here differently (such as using cout<<Text<<endl rather than printf("text")). And so I am wondering, which would be better to use if any and why? Zulu Inuoe 22:36, 3 October 2007 (UTC)

Answer
printf, scanf, etc are all part of the stdio. They are C code, and not C++ code. For this article to be on C++ the authors chose the use the C++ equivalents of printf, scanf, etc.

Namespace
I'm a beginner and the concept of namespace is a little confusing to me. This lesson introduces the idea, shows how to use the using namespace std;, but then includes a comment in the code example saying that it's not a good practice. ???? --12.150.181.20 17:40, 12 December 2007 (UTC)

Yeah, me too. I'm three paragraphs deep reading about "namespaces" and "identifiers" and since I still haven't been informed as to what these things are (or what their purposes are), all that I read is just words on a page. None of it means anything to me.

Answer
A namespace is an container wrapping identifiers. using namespace std; makes everything in namespace std available without typing std:: every time. Miklcct 12:28, 10 April 2009 (UTC)

About Namespaces
You can think of namespaces as packages that contain code that you may find useful. Lots of people have written lots of code over the years. Now imagine if someone wrote a piece of code called FFT, which returned some sort of data. Then another person wrote another piece of code called FFT, which returned some different data. You've run into a problem of there being two methods called FFT that do different things. This is bad news, because the compiler doesn't know which to use. It can also be confusing to the programmer because they aren't sure which one the compiler is going to pick, or the compiler may just throw an error.

To fix this problem (and to organize code a bit better) programmers can put all of their code into a package. In C++ this package is called a namespace. The namespace called std contains many useful functions, containers, etc that programmers use often. cout, cin, etc are all part of the std namespace. So are strings, vectors and other containers. To use all of this code in the std namespace you could call them with std::indentifier, where identifier is the name of the method, object, or whatever you want to use. It can become tiresome, however, to use std:: over and over again. For example:

std::cout << "Hello" << std::endl;

So you can tell the compiler to look in a particular namespace if it can't find the method or objects in your own code. The same code above with the 'using namespace std'

using namespace std;

cout << "Hello" << endl;

Color Coding
Wikipedia Provides c++ color coding through the tag. That shoud be used instead of the pre tag all over the book. There is also a need to define the guidelines or standards for the usage of material over the book so that constancy is maintained.Atishay811 18:57, 13 July 2009 (UTC)

Exercises
I think that adding a section of exercises at the end of the lessons would help cement the ideas more firmly. In this lesson, I don't know if there are a lot of things we could ask, but I know that writing and changing code is the best way for me to learn. So, if I'm not going to rain on anybody's parade, I would like to help with that. I would also welcome exercise ideas. It's looking great, and I want to help make it better! Gilbrilthor (talk) 12:43, 6 October 2012 (UTC)

Exercises
I am a rank beginner to all this. In Exercise 1 it says to copy the following, but it doesn't say to what it should be copied. Then it says to edit it so it compiles. Where? Maybe some instructions like the making toast example used elsewhere would help, because I'm lost and can't go any further than where I'm at now, which so far is click-drag copy.

title: Talk:C++/Introduction


text:
User:Highthroat

Kristen Gabrielle Mitchell + James William Ogle = LOVE

title: User:Highthroat


text:
Wikiversity:Candidates for Custodianship/Sebmol

This is an archive of community discussion related to the nomination for full custodianship of User:Sebmol.

The period for comments on this nomination starts on October 10, 2006, at 1:00 UTC and ends on October 15, 2006, at 1:00 UTC. I've been a temporary custodian since the beginning of Wikiversity and bureaucrat as of October 9. I joined mostly to get things started and help in any technical and other fashion I can. I'm mostly active on German Wikipedia but have contributed some to other projects as well. My technical experience comes mostly from tinkering with a MediaWiki installation at home, maintaining a MediaWiki-turned-Bug tracking system at my workplace and writing a few bots for some mindless tasks like archiving talk pages and renaming categories.

As a custodian, I see it as a primary duty to serve Wikiversity participants. I want to help them accomplish what they strive for while also keeping an eye on the goal and purpose of Wikiversity. I firmly believe that projects like Wikiversity live from the quality of content its participants produce and the community that builds around it. Out of that respect for our ambitious yet still small community, I want to ask for your support of my custodianship and bureaucratship at this time. -- sebmol ? 20:58, 9 October 2006 (UTC)

Nomination for Bureaucrat

 * For reference, here's the original nomination for bureaucrat.

Fantastic new contributor to Wikiversity. Full support. Cormaggio 17:05, 19 August 2006 (UTC)
 * I accept the nomination. About myself, I'm most active on German Wikipedia with about 9,100 edits, about a quarter of which in Wikipedia namespace. I started originally on English Wikipedia about two years ago but moved over to the German in March, where I'm also a mediator. I'm a software developer by profession, one of my tasks was writing extensions for the Mediawiki software to turn it into a bug tracking system. As a result, I have a lot of experience with the internal workings of the software.
 * To me, a bureaucrat, like a custodian and really every user, has to have the goals of the project and the development of the community as the highest priority. He's a servant of the project who should decide based on consensus and what is best for the project.
 * The most important goal for us right now is to create and maintain high quality content. To make that happen, our second most important goal has to be building a community of Wikiversity enthusiasts that can carry the content, attract more users, and further develop the project. We have a host of sister projects whose experience with community building we can use for Wikiversity, both the good and the bad. So, let's use that experience to do things right and well. -- sebmol ? 14:02, 20 August 2006 (UTC)

Discussion

 * I figured that Sebmol was already a full custodian (he was my mentor, as a matter of fact), but he of course has my full support as a great contributor and custodian.-- digital  _  me   23:57, 9 October 2006 (UTC)
 * In the beginning, a number of users were made custodians just to get things started (especially to import pages from Wikibooks and Meta). Naturally, there was no community decision at the time since there was no community. We're basically now making up for that. sebmol ? 19:12, 10 October 2006 (UTC)
 * I'm confused. Is this a for custodianship or bureaucratship? --HappyCamper 03:17, 10 October 2006 (UTC)
 * both. sebmol ? 19:09, 10 October 2006 (UTC)
 * Obviously. This is just a confirmation process. guillom 17:07, 10 October 2006 (UTC)
 * Thanks for all of your contributions to the project, sebmol. I hate to think what the past two months would have been like without sebmol's contributions to the project. I support the idea that the Wikiversity community should formally confirm sebmol as a custodian. Wikiversity does not have much need for bureaucrat action, but I think Wikiversity should have more than one bureaucrat and sebmol is an obvious choice so that Wikiversity can get started on a long future of taking full advantage of sebmol's talents. --JWSchmidt 23:55, 10 October 2006 (UTC)
 * At the moment, I'm very cautious about supporting bureaucratships - hear me out please, but if you have the time, also read into the subtle nuances I am using. From my native Wiki, there is a tremendous amount of Unspoken WikiPolitics surrounding bureaucratships, and at times, it can be very suffocating to witness and deal with. For the record, I don't want to see Wikiversity inherit this negativity. To address this (being just another regular contributor here), the best way is to be less uptight about the post. In a sense, there are two types of trustworthy bureaucrats - the first, is the WikiGnome type. This, we are generally familiar with, so I will not elaborate too much. The second, is the more public type - human, and gracious when dealing with malfeasance, and with an excellent sense of how to engage the community positively. The special bureaucratic bit is in some sense symbolic of a special sort of competence, and - if used properly - can work wonders when perceived authority is needed in the community. I wonder privately at times, how do smart thinking and community subservience work hand in hand? On another note, a new bureaucrat should be healthy for the community - bureaucratic functions should also be enjoyable for the account holder. I think this can help keep the poor soap operas dry. Taken all together, perhaps a cursory and minority idea, and admittingly, a fluid one - Sebmol, I trust that if promoted, you will make very wise use the post, and for that matter this applies to any such future candidates. So, with this writeup - full support - and may this help bring out the best there is on Wikiversity! :-) --HappyCamper 00:58, 11 October 2006 (UTC)
 * "He's a servant of the project who should decide based on consensus and what is best for the project." <-- I think that as long as Wikiversity functionaries have this attitude, it is hard for them to go far wrong. The community might go in one direction and a conflict arise between the views of a custodian or a bureaucrat and community consensus. Maybe sebmol can describe what he would do if he found his own views in conflict with community consensus. A side question for HappyCamper..... "when perceived authority is needed in the community".....can you provide a specific example of such a situation? --JWSchmidt 02:17, 11 October 2006 (UTC)
 * I think as a custodian or bureaucrat or really any position of responsibility, one has to be able to separate one's private from one's professional position. This gets complicated by the fact that others don't necessarily see the distinction, i.e. they will see what one says either as a view of TPTB or as a view of a "regular user". At least, that's what has happened a lot on Wikipedia, both German and English. The best way to counter that is in my opinion not to take sides in conflicts but offer to mediate when necessary and appropriate. From my experience as a mediator on German Wikipedia, I've seen that many conflicts wouldn't even arise if all parties involved actually listened to the others and assumed their perspectives for a second. That's the capacity in which I'm willing to work in at Wikiversity as well if needed and wanted. sebmol ? 09:18, 11 October 2006 (UTC)
 * I think Wikiversity will benefit immensely from Sebmol's bureaucratship. He has both the technical competence and the interpersonal skills to warrant the post, as well as a proven deep commitment to the project. Once again, my full support. Cormaggio 16:41, 11 October 2006 (UTC)

Closing comments
Sebmol was made an "acting custodian" at the launch of Wikiversity (15 August 2006). Cormaggio made Sebmol an "acting bureaucrat" on 9 October 2006. The custodianship and bureaucratship of Sebmol was open for community discussion from October 10 to October 15. All community comments supported full custodianship and bureaucratship for Sebmol. Sebmol became a community-approved custodian and bureaucrat on 16 October 2006. The full community discussion is at Candidates for Custodianship/Sebmol. --JWSchmidt 13:51, 16


text:
User talk:Highthroat

Empty pages
Please don't create pages that are empty, or have non-educational content, as they will be deleted. If you continue to create these pages, you may be blocked from editing.-- digital  _  me   23:56, 9 October 2006 (UTC)

title: User talk:Highthroat


text:
Wikiversity talk:Learning goals

Should this page be merged with Page creation requests? There are two links on the main page that use the word "Request" to link to these two different pages. The Jade Knight 01:23, 10 October 2006 (UTC)

Biology
Biology cell specialization Jennifer Lawn (discuss • contribs) 08:36, 3 April 2016 (UTC)

title: Wikiversity talk:Learning goals