text:
% !TEX root = ../lectures_olympics.tex

\chapter{功和动能，机械能守恒}
\section{功，动能定理}

我们知道力是改变物体速度的原因，在外力的作用下物体的速度会发生变化。
之前学过的牛顿第二定律就是这一现象的集中表现，另外在第二定律的基础上我们还发展出了动量定理，它告诉我们力对时间的积累，也就是所谓的作用于物体的冲量会使该物体的动量发生变化。
除了动量还有一个物理量可以用来描写物体运动的性质，它称之为运动物体的动能，今天就来学习和它有关的物理。

\begin{figure}[htbp]
\begin{center}
\includegraphics{images/energy-1.pdf}

\caption{在外力作用下的速度变化}
\label{fig: 动能定理：外力作用下的速度变化}
\end{center}
\end{figure}

如图\ref{fig: 动能定理：外力作用下的速度变化}所示，假设一个质量为$m$的物体有时刻$t$位于图中的$A$点，此时它的速度为$v(t)$，在外力作用下经过很小的$\Delta t$时间间隔到达了图中的$B$点，此时速度变为$v(t+\Delta t)$。
在曲线运动的讨论中我们知道对于极小的$\Delta t$物体在$B$点速度的大小，也就是速率$v_B$与在$A$点的速率$v_A$的差别由加速度的切线分量$a\cos\theta$所决定：
\begin{equation}
v_B^2 = v_A^2 + 2av_A\Delta t  \cos\theta
\end{equation}
进一步根据牛顿第二定律可以得到加速度和所受外力的关系为$a=F/m$，将它代入上式可得
\begin{equation}
v_B^2 = v_A^2 + 2\frac{F}{m}v_A\Delta t  \cos\theta
\end{equation}
右边最后一项当中的$v_A\Delta t$实际上就是在$\Delta t $时间里该物体运动位移的大小。
进一步整理就变成了
\begin{equation}\label{eqn: 动能定理}
F\Delta x\cos\theta = \frac{1}{2}mv_B^2-\frac{1}{2}mv_A^2.
\end{equation}

这就是动力学中的动能定理。
左边为力$F$与在力作用下的位移$\Delta x$以及力与位移的夹角$\theta$的余弦的乘积，也就是力在位移方向上的投影与位移的乘积，将它称之为力的\emph{功}，因为上式是对一个小的时间间隔所给出的，此时功也是一个小量
\begin{equation}\label{eqn: 动能定理-功的微分}
\Delta W = F \Delta x \cos\theta,
\end{equation}
从中可以看出，功是一个标量，只有大小没有方向。对于一个有限时间内发生的物理过程来说，外
力的功就是其中每个微小间隔内的功的代数和。
\begin{equation}
W = \sum \Delta W = \sum F\cdot \Delta x\cdot\cos\theta.
\end{equation}

式\ref{eqn: 动能定理}右边为两个量的差，每一个量正比于运动物体的质量和速度平方，称之为物体的动能
\begin{equation}
E_k = \frac{1}{2}mv^2,
\end{equation}
和动量一样，动能也是描写运动物体性质的物理量，但与动量不同的是动能是一个标量，只有大小没有方向。

将应用于微小时间间隔的动能定理\ref{eqn: 动能定理}对于一段有限的时间做累积，可以很明显地发现中间状态的动能项被两两抵消，而外力的功则不段累积，最终我们得到一般的动能定理：对于从任意点$A$出发到$B$点结束的力学过程，运动物体动能的变化量等于在该过程中外力功的代数合：
\begin{equation}
W(A\rightarrow B) =  \frac{1}{2}mv_B^2-\frac{1}{2}mv_A^2.
\end{equation}
其中$W(A\rightarrow B) $为合外力在该过程中的功，但是从牛顿定律出发可以清楚地看到它与在该过程中的每个分力所做的功的代数和完全一致。
对于一个具体的过程力的功可以是一个正数，也可以是一个负数。

当功为正时，从动能定理可以看出物体的动能，也就是速率会增加，反之动能会减小。
一个形象的理解就是当我们向着物体前进方向推它的时候它的运动速率会增加，反之逆着运动方向对它用力时自然它的速率会减小。

\subsection{功和动能的确定}

应用动能定理可以使很多物理问题极大地简化，但是务必要清楚动能定理的适用范围以及在具体情况下力的功和动能的表达式。

\begin{example}
以下几幅图中$A$、$B$点的高度均为$h$，试求沿各个路径由$A$到$B$的过程中重力做功各为多少?
\begin{center}
\includegraphics{images/energy-2.pdf}
\end{center}
\tagged{student}{\vspace*{3cm}}
\begin{taggedblock}{teacher}
\noindent
解析：$mgh$
\end{taggedblock}
\end{example}

\begin{example}
质量为$m$的物体在与水平方向夹角为$\theta$的恒力$F$作用下沿着摩擦系数为$\mu$的平面上前进距离为$L$，求在此过程中恒力$F$、摩擦力$f$、重力$mg$以及平面的支持力$N$所做的功。
如果初始速度为$v_0$，指向右侧，求最后该物体的速度。
\includegraphics{images/energy-3.pdf}
\tagged{student}{\vspace*{3cm}}
\begin{taggedblock}{teacher}
\noindent
解析：$F:F\cos\theta L$   $f:fL$     $mg: 0$   $N:0$
\newline
$\frac{1}{2}mv^2=\frac{1}{2}mv_0^2+F\cos\theta L-fL$

\end{taggedblock}
\end{example}

\begin{example}
如图，质量为$m$的小球系在倔强系数为$k$、原长为$l_0$的轻弹簧一端，弹簧的另一端固定在$O$点。
开始时小球位于水平位置$A$点，此时弹簧处于原长。
当小球由位置$A$自由释放，下落到$O$点正下方位置$B$时，弹簧的伸长量为$l_0/n$，求小球到达B点时的速度。
	\begin{flushright}
		\includegraphics[width = 0.3\textwidth]{images/momentum-7.pdf}
	\end{flushright}
\tagged{student}{\vspace*{3cm}}
\begin{taggedblock}{teacher}
\noindent
解析：$mg+\frac{mv^2}{l_0+l_0/n}=k*\frac{l_0}{n}$
\end{taggedblock}
\end{example}

\subsection{多个物体的情况}
动能定理不但可以应用到单个质点，对于由多个质点构成的力学系统同样适用，这时系统的动能被定义为内部所有质点动能的代数合。
在动量定理中我们知道，力学系统的总动量变化只由所受的外力所决定，与内力的所有性质均无关。
但在应用动能定理时内力所做的功一般来说不为零，所以在确定系统在某一物理过程前后总动能的变化时，不但要计算所有外力的功，内力做功同样不能忽略。
这样的例子不胜枚举，手枪和子弹构成的系统在子弹发射的瞬间动量毫无疑问是守恒的，但是由于火药的冲击在发射前后很明显总动能发生了明显的变化。
应用动能定理可以使我们在已知内力的功时知道始末状态各个物体的动能，反过来同样在已知始末状态后可以知道内力所做功的大小。

\begin{example}

如图所示，把弹簧的一端固定在墙上，另一端系一物体$A$，当把弹簧压缩$x_1$后，在它的右边再放一物体$B$，然后除去外力，设物体$A$和$B$均被放置在光滑的水平面上，质量分别为$m_A$和$m_B$，弹簧的劲度系数为$k$，求物体$A$移动的最大距离是多少？
	\begin{flushright}
		\includegraphics[width = 0.3\textwidth]{images/momentum-8.pdf}
	\end{flushright}
\tagged{student}{\vspace*{3cm}}
\begin{taggedblock}{teacher}
\noindent
解析：$\sqrt{\frac{m_A}{m_A+m_B}}x_1+x_1$
\end{taggedblock}
\end{example}

\begin{example}
在光滑水平面上有一个足够长，质量为$M$，静止的板$B$。
设某一时刻有一个质量为$m$，速度为$v_0$的物体$A$冲入板$B$的上表面，它们之间的摩擦系数为$\mu$。
求在此后直到两者相对速度为零的过程中，两者之间的摩擦力对两个物体所做的功各是多少？
运动前后整个系统的动能变化量？
\tagged{student}{\vspace*{3cm}}
\begin{taggedblock}{teacher}
\newline
解析：对m做负功$W=\frac{mv_0^2*(M^2+2Mm)}{2(m+M)^2}$
\newline
对M做正功$W=\frac{m^2Mv_0^2}{2(m+M)^2}$
\newline
总变化量$\frac{mMv_0^2}{m+M}$
\end{taggedblock}
\end{example}

\subsection{不同参考系中的动能定理}
从运动学中我们知道描写质点的运动是需要指定参考系的，因为功的定义与力作用的距离有关而动能则依赖于运动物体的速度，这两者都与参考系的选择有关。
和所有动力学过程一样，只有在惯性(或近似)参考系中牛顿定律才能够成立，动能定理也只有在惯性参考系中才成立。

\begin{example}
在一列以速度$v_0$做均速直线运动的火车上，根据相对性原理动能定理成立。
设想火车上的一个人在光滑平面上用常力$F$拉动一个物体前进了$L$的距离，根据动能定理可以计算出该物体最终的速度。
试在相对地面静止的参考系描写同样的过程，并列出动能定理所给出的方程。
\tagged{student}{\vspace*{3cm}}
\begin{taggedblock}{teacher}
\newline
解析：略
\end{taggedblock}
\end{example}

\begin{example}
同上，但火车做加速度为$a$的匀加速过程。
以火车的参考系中分别使用动能定理能否得到正确的结果？相对地面呢？
如果想在火车的参考系中动能定理也成立，需要怎样操作呢？
\tagged{student}{\vspace*{3cm}}
\begin{taggedblock}{teacher}
\newline
解析：加入惯性力
\end{taggedblock}
\end{example}

\subsection{功与力的关系：虚功原理初步}
人与动物最大的区别就是能够使用工具，人类创造出各种各样的工作以完成各种目标。
初中已经学过了一些简单的机械：杠杆、轮轴、齿轮、滑轮等等，复杂的机械装置都是由这些基本的结构组成的。
利用机械装置可以将动力转化成所需要的形式，这其中有一个极其重要的物理原理：机械只能够传递能量，但不能创造能量。
机械一头连着动力源，可以是人力也可能是蒸气机或电动机，另一头连着输出端，用来抬起重物或者其它运动形式，但即使是最理想的，无摩擦或其它形式损耗的机械也只能够传递由动力源产生的“力”。
也就是说动力源所做的功在经过理想的机械转化后在输出端所做的功完全一样，不会变多也不会变少。

\begin{wrapfigure}{4}{50pt}\includegraphics{images/energy-wheal.pdf}\end{wrapfigure}
右图表示一个动滑轮，下方挂上质量为$m$的重物，在力$F$作用下匀速上升。
由于滑轮的构造，当$F$的作用点上升距离为$L$时，重物只会上升一半的高度，也就是$L/2$。
由于在拉动过程中外力$F$完全用来抵抗重力，这样对于理想的滑轮，拉力的功刚好等于重力在该过程中所做的负功
\begin{equation}
F\cdot L = mg\cdot\frac{L}{2}
\end{equation}
消去所运行的距离$L$，我们得到一个拉力和重物重力的关系
\begin{equation}
F = \frac{1}{2}mg
\end{equation}
这时有意思的事情出来了，从拉力的功需要等于重力的功这样一个原理出发，我们得到了一个拉力与重力的关系，而这样的关系在过去只能通过受力分析而导出。

像这样一个能够通过做功的关系而得到作用力的关系的办法在物理上叫做\emph{虚功原理}。
利用虚功原理我们可以得到受约束的物理系统各部分之间受力的关系，在有的情况下通过静力学的办法并不容易得到。

\subsection{变力作功}
之前处理的大部分情况下都是恒力的功，其实当作用力不是恒力的时候也可以运用动能定理，只要我们能够计算在任意情况下力的功即可。
这时，在力作用下前进一段距离后该力的功\ref{eqn: 动能定理-功的微分}的表达并不是特别合适，因为它需要在每一个微小的位移上计算力与位移的夹角，这样的计算有的时候并不容易。
其实功还有另外一种描写方法。
为此建立一个任意的直角坐标系，这样外力$F$可以用它在三个坐标轴上的投影$(F_x,F_y,F_z)$来描写，与此同时在该力作用下的质点的位移同样可以用它在三个轴的投影$(\Delta x, \Delta y, \Delta z)$给出，而力在该位移下的功则可表达成

\begin{equation}
\Delta W = F_x\Delta x +F_y\Delta y+F_z\Delta z = \vec{F}\cdot\vec{\Delta r}
\end{equation}
功这样的表达方式可以帮助我们更容易地计算。
从中可以看出对于任意过程力的功可以看做三个独立方向上力的分量与位移分量的乘积的累加。

\begin{example}
假设两个物体间的相互吸引力与它们之间距离成反比，现固定其中的一个点，求另一个点由相距$r_A$到$r_B$的运动过程中上述引力所做功的大小。
\tagged{student}{\vspace*{3cm}}
\begin{taggedblock}{teacher}
\newline
解析：$F=\frac{a}{r}$   $\Delta W=F*\Delta r=\frac{a}{r}\Delta r$ 求和：$W=a*\ln\frac{r2}{r1}$
\end{taggedblock}
\end{example}

\begin{example}
假设两个物体间的相互吸引力与它们之间距离平方成反比，现固定其中的一个点，求另一个点由相距$r_A$到$r_B$的运动过程中上述引力所做功的大小。
\tagged{student}{\vspace*{3cm}}
\begin{taggedblock}{teacher}
\newline
解析：$F=\frac{a}{r^2}$   $\Delta W=F*\Delta r=\frac{a}{r}\Delta r$ 求和：$W=a*(\frac{1}{r_2}-\frac{1}{r_1})$
\end{taggedblock}
\end{example}

\section{势能、能量守恒定律}
前面学习了动能定理以及运动物体动能和外力对它做功的关系，并且能够发现不同的外力所做的功有很大的不同。
根据做功性质的不同，可以将力分为两大类。
第一种就是像重力、弹簧弹力，它们所做的功只与始末位置有关，与在力作用下物体运动轨迹无关；另一种就是像滑动摩擦力一样的各种阻力，它们做的功很明显与在阻力作用下物体所行进的距离有关，这种力比较讨厌，是工程中所极力避免的，但是又无处不在。
当一个物体在无阻力的空间中运动，或者阻力很小可以忽略不计时，它的运动具有很明显的特点，这就是本章要学习的内容--机械能守恒。

\subsection{重力作用下物体的运动}
如图\ref{fig: 从A到B沿不同光滑轨道下落的物体，将其放入某一任意的坐标系当中}所示，地球表面附近有两个给定点$A$，$B$，它们之间的高度差为$h$。
假设我们在两点之间安装多个形状不同的光滑轨道，令一个物体沿着不同的轨道从$A$点出发沿轨道下落。
\begin{figure}
\begin{center}
\includegraphics{images/energy-4.pdf}
\caption{从A到B沿不同光滑轨道下落的物体，将其放入某一任意的坐标系当中}
\label{fig: 从A到B沿不同光滑轨道下落的物体，将其放入某一任意的坐标系当中}
\end{center}
\end{figure}
轨道具有这样的性质，它的作用仅仅是把物体限制在轨道上，每一时刻它们之间有相互压力作用，但是压力与轨道切线永远垂直，根据功的性质，这样的压力在物体运动过程当中对运动物体的功恒为零。
这样在下落过程中仅有重力会作功，而且由于重力作功仅与始末点的高度差有关，所以在沿不同轨道下落时重力做功都相等：
\begin{equation}
W_G = mgh
\end{equation}
其中$m$为物体的质量，$h$为A、B两点间的高度差。
假设所有的物体在A点都以相同的初速率$v_A$滑向轨道，根据动能定理
\begin{equation}
mgh  = \frac{1}{2}mv_B^2-\frac{1}{2}mv_A^2
\end{equation}
很明显可以看出沿着不同轨道到达B点虽然速度的方向被轨道所限制，但是它们的动能都相同：
\begin{equation}\label{eqn: energy-B点的动能}
\frac{1}{2}mv_B^2 = \frac{1}{2}mv_A^2 + mgh
\end{equation}
它们都等于A点的动能与从A到B的过程中重力做功之和，并且与运行的轨道无关！

更进一步，建立如图所示竖直向上的坐标系，在该坐标系中A、B两点的坐标分别为$y_{A,B}$，这样我们有
\begin{equation}
h = y_A-y_B
\end{equation}
将它代入式\ref{eqn: energy-B点的动能}可得
\begin{equation}
\frac{1}{2}mv_B^2 = \frac{1}{2}mv_A^2 + mg(y_A-y_B),
\end{equation}
进一步将其变形有
\begin{equation}\label{eqn: energy重力场中能量守恒}
\frac{1}{2}mv_B^2 + mgy_B= \frac{1}{2}mv_A^2 + mgy_A.
\end{equation}
从中可以看出，该物体在B点的动能与$mgy_B$的和与在A点的动能和$mgy_A$的和相同。
如果我们将一个物体所受的重力$mg$与它所处位置的竖直坐标$y$的乘积称为它在重力场中的\emph{势能}，或者\emph{重力势能}
\begin{equation}\label{eqn: energy重力势能}
E_P(y) = mgy
\end{equation}
的话，上式可以表达为此时在A、B两点处动能与重力势能的和相同。
需要指出的是前面的推理与A、B两点所处的具体位置无关，也就是说无论它们的高度如何式\ref{eqn: energy重力场中能量守恒}均成立。
基于这个性质我们可以定义该物体的机械能为动能与重力势能的和，并且当仅存在如图\ref{fig: 从A到B沿不同光滑轨道下落的物体，将其放入某一任意的坐标系当中}所示的光滑轨道时，无论它处于何处，机械能
\begin{equation}
E = E_k+E_p = \frac{1}{2}mv^2+mgy
\end{equation}
都相同，或者说机械能为常数，该常数的大小由任意一点处动能和势能的和决定。

\begin{example}
求下列各种情况下物体所能够达到的最大高度，每种情况下都是质量为$m$，初速度为$v$
\begin{center}
\includegraphics{images/energy-5.pdf}
\end{center}
\begin{enumerate}
\item 冲向一条无限高的弯曲的光滑轨道
\item 以与水平面夹角为$\theta$抛出
\item 套在半径为$R$的光滑圆环上运动
\item 在半径为$R$的光滑圆柱体内部运动
\end{enumerate}
\tagged{student}{\vspace*{3cm}}
\begin{taggedblock}{teacher}
\noindent
解析：$h=\frac{v^2}{2g}$
\end{taggedblock}
\end{example}

%%%%%%%%%%%%%
\begin{example}
	一个质量为$m$的质点从固定在水平面上，半径为$R$的半圆柱形表面的顶端由静止开始下落，求它脱离圆柱体的位置和圆心的连线与竖直方向的夹角$\theta$，以及它落地点与圆心的距离。
		\begin{flushright}
			\includegraphics[width = 0.3\textwidth]{images/energy-8.pdf}
		\end{flushright}
	\tagged{student}{\vspace*{4cm}}
	\begin{taggedblock}{teacher}
		\noindent
		解析：$mgR(1-\cos\theta)=\frac{1}{2}mv^2$   \\ $m\frac{v^2}{R}=mg\cos\theta$
	\end{taggedblock}
\end{example}
%%%%%%%%%%%%%%%%%%%%

\begin{example}

如图所示，光滑的水平面上有一个质量为$m$以初速度$v$运动的物体，冲向一个半径为$R$的光滑圆形表面，求使得它能够击中圆心$O$的初速度$v$.
\begin{flushright}
\includegraphics[width = 0.2\textwidth]{images/energy-6.pdf}
\end{flushright}
	\tagged{student}{\vspace*{4cm}}
	\begin{taggedblock}{teacher}
		\noindent
		解析：设离开轨道时物块的位置与水平面夹角为$\theta$，速度为u，则有：
		\[mgR(1+\sin\theta)=\frac{1}{2}m(v^2-u^2)\]
		\[m\frac{v^2}{R}=mg\sin\theta\]
		\[ut\sin\theta=R\cos\theta\]
		\[\frac{1}{2}gt^2-vt\cos\theta=R\sin\theta\]
		解出$v=\sqrt{2gR(1+\frac{3\sqrt{5}}{10})}$
	\end{taggedblock}
\end{example}

\subsection{保守力、势能}
从上面的例子可以看出，重力做功仅与始末位置的高度差有关，此时可以定义重力势能，当物体的运动过程中只有重力做功时它的动能与重力势能的和，并且在运动的任意时刻机械能都保持不变。

具有和重力相同性质的力称之为\emph{保守力}，保守力的共同特点是
\begin{enumerate}
\item
保守力的大小和方向仅与位置有关。
重力就是一种保守力，在地表附近它的大小和方向均不变；除重力以外一端固定的弹簧弹力也是保守力的一种，它的大小与弹簧伸长量成正比，方向永远指向弹簧的固定端；除了它们以外将来会学到的万有引力，带电粒子在静电场中的电场力等也具有相同的特征。
\item
保守力做功只与起始位置有关，与在保守力作用下物体运行的轨迹无关。
重力的情况我们已经看到了，在上一讲中我们也看到弹簧力做功也仅与始末状态的伸长量有关。
\item 一个直接推论就是沿着任意闭合路径运行的物体过程中保守力做功一定为零。
\item 对于保守力可以定义势能。
势能仅是位置的函数，与在保守力作用下物体的速度、时间等其它物理量无关。
势能由保守力的形式决定，重力势能已由式\ref{eqn: energy重力势能}给出；弹性力的势能为
\begin{equation}
E_p(x) = \frac{1}{2}kx^2
\end{equation}
其中$k$为弹性系数，$\Delta l$为弹簧的伸长量。
在反比于距离平方的吸引力作用下的势能则是

\begin{equation}
E_p(r) = -\frac{GMm}{r}
\end{equation}
其它形式的势能也可由保守力做功所确定，需要注意的是势能的定义有相对性，对于物体运动真正有意义的是始末两点的势能的差，而不是势能的大小。
这样可以将保守力作用下物体任意位置取做势能的零点，但为了方便起见我们通常会做一些约定。
\item 当已知保守力随位置的关系以后在约定了势能零点以后可以求出其它各点势能，反过来当已知势能的形式也同样可以求出力的大小和方向。
当给定各点的势能以后，通过任何一个空间中的给定点会有一个确定的曲面(或平面)，该平面上各点的势能与给定点相以，这样的曲面称做\emph{等势面}。
各个点保守力的方向与等势面垂直，大小与势能变化快慢有关。
\item 如果一个物体仅受保守力作用，可以定义它的机械能为动能和势能的和。
而且在运动过程中机械能保持不变，或机械能守恒，不变的机械能可以由任意一点的机械能给出。
\end{enumerate}

%%%%%%%%%%%%%
\begin{example}
	判断以下各种力是否为保守力，如果是，试着分析它的势函数的性质
	\begin{enumerate}
		\item
		正比于时间的拉力 $f=a\cdot t$
		\item  正比于速度的阻力 $f = -\alpha v$
		\item  正比于坐标三次方的吸引力 $f = - k x^3$
		\item  随距离具有复杂形式的吸引力$f(r) = -k\frac{e^{-\alpha\cdot r} }{r^2}$
	\end{enumerate}
	\tagged{student}{\vspace*{4cm}}
	\begin{taggedblock}{teacher}
		\noindent
		解析：3和4是
	\end{taggedblock}
\end{example}
%%%%%%%%%%%%%%%%%%%%

\begin{example}
一个弹性系数为$k$，自然长度为$l_0$的弹簧一端固定在给定点A处，一端连着一个质量为$m$的物体，求以下各种情况弹簧的最大伸长量。
\begin{enumerate}
\item
物体在与A处于同样水平面的光滑平面运动，初始时刻弹簧位于原长，且物体具有初速度$v_1$
\item 物体在与A处于同样水平面的光滑平面运动，初始时刻弹簧压缩量为$\delta l$，初速度$v_2$，方向指向平衡位置。初速度方向背向平衡位置又如何？
\item 物体在通过A的垂线上运动，初始时刻位于原长以下$h$处，速度$v_3$竖直向上。初速度方向向下又如何？
\end{enumerate}
	\tagged{student}{\vspace*{4cm}}
	\begin{taggedblock}{teacher}
		\noindent
		解析：用能量守恒求解。最大伸长量和速度是正是反没关系。
	\end{taggedblock}
\end{example}

\section{质点系统的机械能守恒}
前面我们看到的都是单个质点在保守力作用下的机械能守恒，现在考察由多个质点构成的力学系统的机械能。
一个系统内的所有质点除了受到外力作用以外还会有相互之间满足牛顿第三定律的内力作用。
在动能定理的学习中已经发现，和动量不同，内力有可能改变系统的总动能的。
但是和一般的力一样，内力作功也有两种截然不同的情况：或者像保守力一样两个质点间的内力做功仅与两质点的相对位置有关，或者像摩擦力一样内力做功与相对运动的方式有关。
对于前一种情况虽然在内力作用下改变了系统的动能，但是实际上是动能转化为质点位置的变化，以随后的运动过程中还能够随着各个质点相对位置的改变重新释放出来而转化为各个质点的动能；而对于后一种情况，内力的作用永久地消耗了力学系统的机械能，这种消耗再也没有机会再次转化为质点的动能。

对于内力和外力都是保守力的情况，可以定义整个力学系统的总机械能为全部质点的动能、外力的势能以及系统内部质点两两之间可能的势能的和，并且我们知道系统总的机械能是守恒的。

\begin{example}
光滑水平面上有一根无质量的弹簧，劲度系数为$k$，原长为$l_0$。
它的两端分别连接质量分别为$m_1$，$m_2$的两个物体。
初始时刻两物体的速度均为零，相距$l<l_0$，求把该系统释放以后两物体之间的最大距离。
取向右为正方向，若最初时刻两物体的速度分别为$v_1$，$v_2$时，此后的运动过程中两物体最近和最远距离分别为多少。
\tagged{student}{\vspace*{4cm}}
	\begin{taggedblock}{teacher}
		\newline
		解析：最长为$2l_0-l$，若有速度，最长与最短为$l_0\pm\sqrt{\frac{m_1m_2g}{(m_1+m_2)k}(v_2-v_1)^2+(l_0-l)^2}$
	\end{taggedblock}
\end{example}

\begin{example}
两个质量分别为$m_1$，$m_2$的两个物体用原长为$l_0$，劲度系数为$k$的轻弹簧连接，
初始时刻A放在B的上方且均为静止，将弹簧压缩至$l<l_0$，求将系统释放以后B能够离开地面的条件。
	\tagged{student}{\vspace*{4cm}}
	\begin{taggedblock}{teacher}
		\newline
		解析：离开地面条件为$l_0-l\geq\frac{(2m_1+m_2)g}{k}$
	\end{taggedblock}
\end{example}

\begin{example}
在光滑的平面上两个球A，B，质量分别为$m_A$、$m_B$。
开始时刻B球静止，A球以速度$v_0$撞向B。
如果碰撞之后两球运动速度均与A的初速度方向相同，且碰撞过程极短，无机械能损失，求碰后两个物体的速度分别为多少？
	\tagged{student}{\vspace*{4cm}}
	\begin{taggedblock}{teacher}
		\newline
		解析：设碰后A的速度为$v_1$，B的速度为$v_2$，
		\[m_Av_1+m_Bv_2=m_Av_0\]
		\[\frac{1}{2}m_Av_1^2+\frac{1}{2}m_Bv_2^2=\frac{1}{2}m_Av_0^2\]
		解出\[v_1=\frac{m_A-m_B}{m_A+m_B}v_0\]\[v_2=\frac{2m_A}{m_A+m_B}v_0\]
	\end{taggedblock}
\end{example}

\begin{example}
光滑平面上有两个质量相同的球A、B。
A球以某一初速度$v_0$撞向B，求证无论A球以何种方式弹开，B球的速度方向永远与A球弹开的方向垂直，假设碰撞时间极短，无机械能损失。
\tagged{student}{\vspace*{4cm}}
	\begin{taggedblock}{teacher}
		\newline
		解析：略
	\end{taggedblock}
\end{example}

\subsection{机械能的损失：摩擦}
当一个物体所受的力中包含有非保守力时，机械能将不再守恒，熟知的滑动摩擦力就是这样的一种力，它会使得机械能永久消失。
对于单个质点，将它所受的外力分为保守力和非保守力，那么在一个由A点到B点的运动过程前后根据动能定理
\begin{equation}
\frac{1}{2}mv_B^2-\frac{1}{2}mv_A^2 = W_C+W_{NC}
\end{equation}
其中$W_C$和$W_{NC}$分别表示保守力和非保守力的功，根据保守力的性质可知
\begin{equation}
W_C =  -E_p(B)+E_p(A)
\end{equation}
其中$E_p(B)$、$E_p(A)$分别代表A、B两点的势能。
这样将上式整理可得
\begin{equation}\label{eqn: energy非保守力的能量定理}
W_{NC} = \left(\frac{1}{2}mv_B^2+E_p(B)\right)-\left(\frac{1}{2}mv_A^2+E_p(A)\right) = E(B)-E(A)
\end{equation}
也就是说，非保守力的功等于运动前后总机械能的变化量。
摩擦力一般情况下会做负功，使得总的机械能减小，当然还有其它形式的非保守力有可能增加物体的机械能。

\begin{example}
在一个沿着粗糙斜面下滑的物体验证式\ref{eqn: energy非保守力的能量定理}。
一个由静止出发沿着摩擦系数为$\mu$，倾角为$\theta$的粗糙斜面下滑，求当滑下距离为$L$时它的速度。
	\tagged{student}{\vspace*{4cm}}
	\begin{taggedblock}{teacher}
		\newline
		解析：略
	\end{taggedblock}
\end{example}

\begin{example}

如图所示，一轻弹簧，一端固定在墙上，另一端连一小物块。
小物块放在摩擦系数为$\mu$的水平面上，弹簧处在自然状态，小物块位于O处。
现用手将小物块向右移到a处，然后从静止释放小物块，发现小物块开始向左移动。
\begin{flushright}
\includegraphics{images/energy-7.pdf}
\end{flushright}

\begin{description}
\item[ A]小物块可能停在O点
\item[B] 小物块停止以后所受的摩擦力必不为0
\item[C] 小物块无论停在O点左边还是右边，停前所受的摩擦力的方向和停止后所受摩擦力的方向两者既可能相同也可能相反
\item[D] 小物块在通过O点后向右运动直到最远处的过程中，速度的大小总是减小；小物块在由右边最远处回到O点的过程中，速度大小总是增大。
\end{description}
	\tagged{student}{\vspace*{4cm}}
	\begin{taggedblock}{teacher}
		\noindent
		解析：AC
	\end{taggedblock}
\end{example}
对于更复杂过程中的机械能的变化也可以通过类似的物理分析得出结论。

\section{能量的转化与守恒定律}
由摩擦力或其它非保守力作用下的物体虽然会损失或增加机械能。
从更大的视角看待这个问题时我们会发现，实际上机械能并不是所有的能量，仅仅是更普遍意义下能量的一种表现形式。
由于非保守力做功而损失掉的机械能并没有从自然界消失，而是转化成了其它的形式。
无数的经验告诉我们，自然界中的能量并不会增加，也不会减少，而是在不同物体，不同运动形式之间不段地转化。
物理学研究的对象可以没有质量、可以没有速度、甚至连确定的位置都没有，但是它们无一例外地具有能量，一个没有能量或其能量无法与转化为我们可感知形式的对象根本无法和我们发生相互作用，被我们所感知和研究。

能量存在的形式有很多，在力学中我们已经见过了由于物体运动而具有的动能，由于所处位置不同而具有的势能，除此以外还有很多其它形式。
从某种意义上讲物理就是一个研究能量的不同存在形式以及在这些不同存在形式之间相如何相互转化的学科。
在认识能量的过程中人们走过了很多的弯路，甚至一些非常具有影响力的科学家在面对新的实验现象时也曾经怀疑过自然界的能量是否真的守恒，但事实一次次地证明，能量的守恒定律是自然界运行的最基本的定律，在任何时候，对于任何物理过程，无论简单或复杂、无论能否被直接观测，都无一例外是守恒的。


text:
\Paragraph{Понятие тестирования по методу белого ящика}
%
Как уже было упомянуто выше, для тестирования \RussianAbbreviation{ПО} по методу ``белого ящика'' необходимо \Emphasis{наличие исходного кода} тестируемого \RussianAbbreviation{ПО}.
%
Методы тестирования, использующие исходный код, наиболее полезны и популярны на \Emphasis{этапе разработки \RussianAbbreviation{ПО}}.
%
К таким методам относятся статический анализ исходного кода и тестирование, основанное на свойствах \Reference{Winograd2008}.

\Paragraph{Достоинства и недостатки}
%
Тестирование по методу белого ящика имеет свои \Important{достоинства} и \Important{недостатки} \Reference{Sutton2007}.
%
Основным \Emphasis{достоинством} тестирования по методу белого ящика является высокая степень покрытия исходного кода благодаря его доступности.
%
Анализируются все возможные пути выполнения программы с целью поиска потенциальных уязвимостей.
%
Основным же \Emphasis{недостатком} является сложность проведения такого анализа.
%
Не редким является ложное срабатывание статического анализатора, что особенно актуально при большом размере тестируемого \RussianAbbreviation{ПО}.

% -------------------------------------------------------------------------------------------------

\SubSubSectionTitle{Статический анализ кода}
	{software_security_analysis_blackbox_testing_techniques_static_code_analysis}

\Paragraph{Проблема защитного программирования}
%
Осуществляя безопасность входных данных на всех уровнях разрабатываемого \RussianAbbreviation{ПО}, применяется \Emphasis{техника защитного программирования}.
%
Она способствует более быстрому обнаружению ошибок и повышению безопасности \RussianAbbreviation{ПО} в целом.
%
Но её применение является недостаточным \Reference{Chess2007}.
%
Оно направлено лишь на проверку соблюдения контракта вызывающей стороной.
%
Безопасность передаваемых данных зачастую не учитывается.

\Paragraph{Пример проблемы защитного программирования}
%
В листинге ниже представлен код функции \SourceCode{log()}, осуществляющей запись сообщений в файл.
%
Специально сформированное злоумышленником значение аргумента функции \SourceCode{msg} может являться корректным, но приводящим к уязвимости форматной строки \SourceCode{fprintf()} в теле функции (см. \ReferenceToSection{software_security_vulnerabilities_format_strings}).
%
Уязвимости такого вида могут быть найдены при помощи средств статического анализа.

\Listing{Пример небезопасной программы}{C}
	{listings/software_security_analysis/static_analysis.c}

\Paragraph{Понятие}
%
Проведение статического анализа \Important{направлено} на поиск различного рода проблем, таких как ошибок, допущенных по случайности или недосмотру со стороны программиста, общих ошибок программирования, в том числе и уязвимостей безопасности \Reference{Chess2007}.
%
Статический анализ кода помогает снизить общее количество ошибок ещё на этапе разработки
\RussianAbbreviation{ПО}.

\Paragraph{Статический анализ и ревизия кода}
%
Проведение статического анализа кода очень часто используется в процесе \Emphasis{ревизии кода}.
%
В этом случае процесс ревизии кода выполняется последовательно.
%
Он состоит из следующих шагов \Reference{Chess2007}:
\begin{itemize}
	\item устанавливаются цели ревизии
	\item используются средства статического анализа
	\item затем по отчётам их работы проводится сама ревизия кода с последующем устранением найденных ошибок
\end{itemize}

\Paragraph{Недостатки статического анализа}
%
Проведение статического анализа имеет ряд \Important{недостатков} \Reference{Winograd2008} \Reference{Chess2007}.
%
Статический анализ может использоваться лишь в роли вспомогательного средства поиска ошибок, так как отсутствие ошибок в отчёте не может говорить о том, что их нет в тестируемом приложении.
%
Например, к таким ошибкам относятся ошибки, которые явно не присутствуют в коде и проявляются лишь во время выполнения приложения.
%
К тому же отчёт, полученный инструментом статического анализа, зачастую содержит большое количество ложных срабатываний.
%
Поэтому его анализ должен выполнять специалист, компетентный в области безопасности \RussianAbbreviation{ПО}.

\Paragraph{Известные инструменты статического анализа}
%
Наиболее известными \Important{инструментами} статического анализа являются \IT{Splint} \WebSite{Splint}, \IT{Cppcheck} \WebSite{Cppcheck}, \IT{RATS} \WebSite{RATS}, \IT{ITS4} \WebSite{ITS4}, \IT{PVS Studio} \WebSite{PVSStudio} и другие.
%
\IT{RATS} и \IT{PVS Studio} могут быть использованы в качестве инструментов поиска ошибок параллелизма, в том числе состояние гонки.
%
\IT{ITS4} и \IT{Splint} направлены на поиск распространённых уязвимостей, специфичных для языков \IT{C} и \IT{C++}, например, переполнение буфера, уязвимости форматной строки и другие (см. \ReferenceToSection{software_security_vulnerabilities_format_strings}).

% -------------------------------------------------------------------------------------------------

\SubSubSectionTitle{Тестирование, основанное на свойствах}
	{software_security_analysis_blackbox_testing_techniques_property_based_testing}

\Paragraph{Описание}
%
\Important{Целью} любого вида тестирования безопасности является проверка приложений на надёжность и обеспечение его функций.
%
Другими словами, происходит проверка семантических свойств поведения приложения.
%
Данный вид тестирования является разновидностью техники формального анализа, поэтому применяется уже после того, как реализована функциональность приложения \Reference{Winograd2008}.

\Paragraph{Как оно проводится}
%
Для проведения тестирования, основанного на свойствах, выполняются \Important{следующие шаги}
\Reference{Fink1997}.
%
Сначала анализируется \Emphasis{спецификация} тестируемого приложения.
%
На основе спецификации тестируемого приложения составляется \Emphasis{список свойств приложения}, которые необходимо проверить.
%
Например, корректность аутентификации пользователя.
%
Далее формализуется проверка данного свойства, и составляется тест, который её выполняет.
%
Проверка выполняется с использованием исходного кода.

\Paragraph{Недостатки}
%
Основным \Important{недостатком} тестирования, основанного на свойствах, является то, что его проведение может занимать большое количество времени \Reference{Winograd2008}.
%
Особенно, если анализируемое \RussianAbbreviation{ПО} имеет большой размер.
%
Причиной этого является требование к строгой формализации тестов.

domain: tex


text:
\documentclass[12pt]{article}
\usepackage[latin1]{inputenc}
\usepackage{calc}
\usepackage{setspace}
\usepackage{graphicx}
\usepackage{multicol}
\usepackage[normalem]{ulem}
\usepackage[english]{babel}
\usepackage{color}
\usepackage{hyperref}
\usepackage[parfill]{parskip}
\usepackage[letterpaper,right=1in,left=1in,top=1in,bottom=1in]{geometry}

\begin{document}

\noindent \textbf{Ms. Ref. No.:  JELS-D-07-00004}

\noindent Partisanship in Non-Partisan Electoral Agencies and Democratic Compliance: Evidence from Mexico's Federal Electoral Institute
\bigskip

In responding to concerns raised by anonymous reviewers at
\emph{Electoral Studies}, we have revised our original manuscript
substantially.  Following editorial suggestions, we have removed
about one fifth of all footnotes and trimmed some others, as a
result of which the text is shorter but has gained in readability.
Thanks to detailed reviews of the previous version, we believe that
the current draft has also gained in scholarly significance.  Both
reviewers agreed that the ``party watchdog'' theoretical framework
within which we understand IFE was well articulated overall, but
both pushed us to clarify and point out the limits of our arguments.
We have endeavored to incorporate their criticisms and suggestions
in the revised version. We take this opportunity to thank the
reviewers, and to relate in detail the substantial changes in the
manuscript that have been prompted by their comments.

Both reviewers suggested that the original draft overstated our main
theoretical claim and exaggerated our ability to substantiate it. In
particular, Reviewer \#2 pointed out that we provided no evidence
that ``election arbiters that embrace partisan strife, rather than
those that expunge party politics...are better able to organize free
and fair elections'' (this point was echoed in comments by Reviewer
\#3).  Indeed, substantiating such a claim would require a different
research design, one that we cannot execute competently within the
limits of our paper.  We have toned down our over-reaching
statements wherever they appeared implicity or explicitly in the
paper, particularly in the abstract, introduction, and conclusion.

We do make an a priori claim that principals may find a partisan
checks-and-balances arrangement preferable to the ``ombudsman
model''.  We then show that the institutional setup of IFE
incorporates, to a large extent, partisan checks-and-balances.  Our
main purpose, though, is to furnish evidence that partisan strife
characterizes IFE.  This evidence comes predominantly from the
arrangement of ideal points that we have uncovered, which is
consistent with what we call the party sponsorship hypothesis (we
also refer to this, more circumspectly, as the party ``influence''
hypothesis).

Regarding this evidence, we acknowledge that the inferred ideal
points of Councilors are not always connected, as noted by Reviewer
\#3. But this is no impediment to reject the party influence
hypothesis in all three Councils. The reviewer's observations pushed
us to revisit nonparametric statistics manuals (Peter Sprent,
\emph{Applied Nonparametric Statistical Methods}, 1989, pp. 114-5
and Daniel 1990, now cited in the paper), leading us to realize that
the ANOVA one-way test we performed in the previous version was not
entirely appropriate given the nature of our data. Sprent (pp.
114-5) and Daniel (section 6.3) both agree that the ranks
Kruskal-Wallis test is preferable for data like ours: Kruskal-Wallis
is more robust than one-way ANOVA in the presence of non-normality,
heteroscedasticity, and outliers. Reasonable doubts can be raised
about the assumptions of homoscedasticity and no outliers implicit
in the ANOVA test.   ANOVA tests differences in means between
groups; Kruskal-Wallis differences in medians between groups. For
this reason, the latter is robust to the presence of outliers. The
Kruskal-Wallis test we perform in the revised manuscript now allows
us to reject the null hypothesis that councilors sponsored by PAN,
PRI, and PRD all come from the same population (Table 7).  Along
these lines, we have also added a straightforward exercise in basic
probability (p. 26):  We ask ourselves how likely it is that the
ideological positions of Councilors sponsored by the same party
would turn out to be adjacent to one another, given an assumption
that ideological positions are independent of party labels.   We
find that this event is quite unlikely under the assumption of
independence, with a probability that we estimate in about three in
a thousand.  Yet, we find that this event occurs in all three
councils, leading us to doubt the assumption that ideological
positions are not related to party sponsors.

As for the high proportion of consensual voting at IFE that Reviewer
\#3 notes, we do face a classic case of an equilibrium with
non-observable consequences.  This is because the electoral law that
gave rise to IFE in 1996 (still in force) is very detailed and
establishes many procedural constraints that the Council-General
must obey, as we relate in Section 2.  These constraints reflect the
three-party consensus over electoral regulation that existed in
1996.  IFE's Council General operates in the limited discretionary
range allowed by this law. The large amount of observed consensus
mostly corresponds to votes in areas where there is no space for
discretion (cf. McCubbins, Noll, and Weingast 1987).  Therefore, the
high proportion of consensual votes does not contradict the
hypothesis of partisanship, it merely complicates the analysis.

Reviewer \#3 raises some further issues about the statistical
analysis in Section 3.  First, we admit that our presentation of the
relevant data in the previous draft was uneven, given that we moved
from tacitly considering abstentions as dissenting votes in Section
2 to implicitly assuming they were missing at random in Section 3.
We have added prose that smooths over this inconsistency (for
example, referring to votes where at least one Councilor voted
against the majority or abstained as ``non-unanimous'', rather than
``contested''; see also fn. 11).  For the purpose of documenting
consensus in the Council-General we deem it appropriate to count
abstentions as votes that are not aligned with the majority, which
is why abstentions appear as one category of non-unanimous votes in
our aggregate description of the roll-call data.  \emph{But we have
no grounds to argue that abstentions always represent explicit
denouncements of the majority's position}.  Therefore, we are
satisfied with the MAR assumption that underlies our analysis, and
we now make it explicit that this is our building assumption.  In
other words, we assume that the pattern of missingness is random
conditional on item and location parameters; this assumption cannot
generally be verified, but it is a common one in the study of
roll-calls (Clinton et al. 2004).  Incidentally, one of the major
strengths of the Bayesian approach to item response models is that
it handles missing values not by dropping them from the analysis,
but by treating them as parameters to be estimated.  By imputing
missing values in the Gibbs sampling procedure, we appropriately
acknowledge the larger degree of uncertainty that we have about the
ideal points of Councilors who abstain disproportionately.  Such
added uncertainty would not be considered by methods that drop
missing values.

Reviewer \#3 raises another important theoretical issue, namely, the
sustainability of a party watchdog arrangement in view of the
temptation to shut one (or more) of the original principals out of
the electoral agency.  Indeed, this observation was prompted by the
decision by PRI and PAN to exclude PRD nominees from the 2003
Council-General.  We agree with the reviewer that our theory does
not specify the conditions under which we might expect exclusions in
what students of government formation may call the protocoalition
stage (Strom 1990).  We did not set out to do so originally, but
only (1) to suggest that successful electoral competition in a new
democracy can be (and has been) organized in such a way that parties
in the enacting coalition check one another in order to generate
trust and (2) that such a body behaves in a manner consistent with a
party watchdog setup.  In any case, the PRI-PAN decision to shut out
the PRD had more to do with this party's recalcitrant position
during the negotiations to name the 2003 Council-General than with a
preconceived plan by PRI and PAN to capture the Council.  We have
added a comment to this effect in the conclusion.

Regarding the parallels noted by Reviewer \#2 between our paper and
some themes raised in the literature on Judicial Politics in the US,
we have included relevant references and some discussion in Section
2.  First, we have added references to work on courts and their
influence in systems of separation of powers.  We do so in the
context of our discussion about ``non-statutory factors'' that may
limit the discretion of Councilors in Section 2.2.2 (p. 16). Second,
we provide citations to scholarly work that considers the
possibility of consensual opinions in lower courts as a strategy to
preempt revision by a higher court (fn. 12).  In the context of US
judicial politics, this theme appears most prominently in the
analysis of district courts decisions.  Since these decisions can be
overturned by the Supreme Court (an event that may cause
professional embarrassment), some claim that district courts may
have an incentive to seek consensus in order to diminish the
probability that the higher court may vote to overturn (Cameron et
al. 2000, Lax 2003, Songer et al. 1994).  This mechanism is
identical to the one we believe may explain the high degree of
consensual voting in Mexico's IFE.  However, where the literature on
US judicial politics concludes that incentives for strategic
consensus-building are low (the Supreme Court, after all, only
reviews a very small percentage of all cases decided by lower
courts), we believe that exploring this mechanism in the context of
Mexican politics would yield considerable theoretical payoff given
the relatively high proportion of decisions that are reviewed by
TRIFE and given that so many actors can start the review process.
This is indeed an opportunity for further research that we seek to
explore in another paper.

Finally, the reviewers also showed concern about the universality of
our claim, namely, that a party watchdog arrangement such as the one
we see in Mexico may be able to engender support.  Indeed, the
original draft was parochial in its inability to point to realms
outside of Mexico's electoral politics where this claim could be
explored.  To remedy this situation, we have rewritten the
conclusion to reflect our conjecture that party-watchdog schemes may
be superior forms of electoral organization and to point to other
(non-electoral) realms where agencies that embody strife have been
created to deal with lack of trust.

\end{document}


text:
The previous section demonstrated how to write the abstract semnatics from
section~\ref{section:AAMByExample:AbstractSemantics} in monadic style.
%
In this section we generalize the monad, allowing us to instantiate to
different monad stacks so long as they meet an interface.

%--%

The generalized interface will have parameters \p|d|, \p|aam| and \p|m| such
that:
%
\begin{itemize}
\item \h|Delta d| implements a value space primitive operations
\item \h|AAM aam| implements abstract address and time operations
\item \p|m| is a \h|Monad|, \h|MonadPlus| and \h|MonadState| for environment,
      store and time types.
\end{itemize}
%
This interface is encoded in full by the type class constraint
\h|Semantics d aam m|.
%
\haskell{sections/04MonadicAAM/01Generalizing/00Semantics.hs}

%--%

We next manipulate the semantics into a form generic to parameters \p|d|,
\p|aam| and \p|m| such that \h|Semantics d aam m| holds.
%
\haskell{sections/04MonadicAAM/01Generalizing/01Atom.hs}
%
\haskell{sections/04MonadicAAM/01Generalizing/02Call.hs}
%
The code is omitted because it is identical to the code for the concrete \h|M|
in section~\ref{section:MonadicAAM:MonadicStyle}

%--%

Now we're in some trouble.
%
How do we implement \h|step| when we don't know what monad we're using?
%
The answer is to require the monad to come with an implementation of \h|step|.
%
Fortunately \h|step| can be implemented at the \textit{monad transformer}
level, so the implementation can be derived for an arbitrary monad transformer
stack.

%--%

We capture the ability for a monad to convert monadic actions to state space
transitions in another type class: \h|MonadStep|.
%
\haskell{sections/04MonadicAAM/01Generalizing/03MonadStep.hs}
%
\h|MonadStep| has associated type \h|SS m| for describing the type of step
functions \h|step :: SS m a -> SS m b|.
%
In our framework, we will always be instantiating step to
\h|step :: SS m Call -> SS m Call|.
%
However this polymorphism is crucial to building state space transitions for
monad transformers, as they may instantiate the polymorphic type \p|a| to
something else.

%--%

We further require that the associated state space \h|SS m| be \h|Pointed| so
that we can inject pure values into the state space.
%
\haskell{sections/04MonadicAAM/01Generalizing/04Pointed.hs}

%--%

The only monad thus far, nondeterminism, is a \h|MonadStep| with its state
space \h|SS| being list and \h|step| being simply monadic bind.
%
\haskell{sections/04MonadicAAM/01Generalizing/05NondetMonadStep.hs}
%
The only monad transformer thus far, state, is a \h|MonadStep| transformer as
well, taking \h|MonadStep| things to \h|MonadStep| things.
%
\haskell{sections/04MonadicAAM/01Generalizing/06StateTMonadStep.hs}
%
Note that in order for the state space associated with \h|StateT| to be
\h|Pointed| we require \h|Cell s| to be a \h|JoinLattice|, meaning it has a
bottom element.

%--%

Executing the semantics can be achieved by injecting the initial \h|Call| value
into the state space and iterating the collecting function as before.
%
\haskell{sections/04MonadicAAM/01Generalizing/07Exec.hs}


text:
%% License: BSD style (Berkley) (i.e. Put the Copyright owner's name always)
%% Writer and Copyright (to): Bewketu(Bilal) Tadilo (2016-17)
\shadowbox{\section{\LR{\textamharic{ሱራቱ አልቀድር -}  \RL{سوره  القدر}}}}

\nopagebreak
  بِسمِ ٱللَّهِ ٱلرَّحمَـٰنِ ٱلرَّحِيمِ
 بِّسمِ ٱللَّهِ ٱلرَّحمَـٰنِ ٱلرَّحِيمِ إِنَّآ أَنزَلنَـٰهُ فِى لَيلَةِ ٱلقَدرِ ﴿١﴾
 وَمَآ أَدرَىٰكَ مَا لَيلَةُ ٱلقَدرِ ﴿٢﴾
 لَيلَةُ ٱلقَدرِ خَيرٌۭ مِّن أَلفِ شَهرٍۢ ﴿٣﴾
 تَنَزَّلُ ٱلمَلَـٰٓئِكَةُ وَٱلرُّوحُ فِيهَا بِإِذنِ رَبِّهِم مِّن كُلِّ أَمرٍۢ ﴿٤﴾
 سَلَـٰمٌ هِىَ حَتَّىٰ مَطلَعِ ٱلفَجرِ ﴿٥﴾


text:
Natural language generation (NLG) is the task of producing text that feels natural to the reader.
The goal of this diploma thesis is to study to which level natural language generation can be achieved using statistical models -- specifically hidden Markov models.
The diploma thesis covers probability and information theories that allow the definition of hidden Markov models and describes how such models can be used for the purpose of text generation.
Available tools for working with hidden markov models are reviewed, compared, and assesed for their suitability for generating text.
A library for hidden Markov models is implemented in Elixir.
Two of the reviewed tools and the implemented library are used to generate text from a corpus of written slovenian language.
A criterion for comparing generated texts is chosen and used to compare the models as well as comparing the generated texts to the corpus.


text:
\subsection{doxyxml.\+generated.\+compoundsuper.\+write Class Reference}
\label{classdoxyxml_1_1generated_1_1compoundsuper_1_1write}\index{doxyxml.\+generated.\+compoundsuper.\+write@{doxyxml.\+generated.\+compoundsuper.\+write}}

Inheritance diagram for doxyxml.\+generated.\+compoundsuper.\+write\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=275pt]{d9/d8d/classdoxyxml_1_1generated_1_1compoundsuper_1_1write__inherit__graph}
\end{center}
\end{figure}

Collaboration diagram for doxyxml.\+generated.\+compoundsuper.\+write\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=275pt]{d5/d71/classdoxyxml_1_1generated_1_1compoundsuper_1_1write__coll__graph}
\end{center}
\end{figure}
\subsubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item
def {\bf \+\_\+\+\_\+init\+\_\+\+\_\+} (self, {\bf value\+Of\+\_\+}=\textquotesingle{}\textquotesingle{})
\item
def {\bf factory} (args\+\_\+, kwargs\+\_\+)
\item
def {\bf get\+Value\+Of\+\_\+} (self)
\item
def {\bf set\+Value\+Of\+\_\+} (self, {\bf value\+Of\+\_\+})
\item
def {\bf export} (self, outfile, level, namespace\+\_\+=\textquotesingle{}\textquotesingle{}, name\+\_\+=\textquotesingle{}{\bf write}\textquotesingle{}, namespacedef\+\_\+=\textquotesingle{}\textquotesingle{})
\item
def {\bf export\+Attributes} (self, outfile, level, namespace\+\_\+=\textquotesingle{}\textquotesingle{}, name\+\_\+=\textquotesingle{}{\bf write}\textquotesingle{})
\item
def {\bf export\+Children} (self, outfile, level, namespace\+\_\+=\textquotesingle{}\textquotesingle{}, name\+\_\+=\textquotesingle{}{\bf write}\textquotesingle{})
\item
def {\bf has\+Content\+\_\+} (self)
\item
def {\bf export\+Literal} (self, outfile, level, name\+\_\+=\textquotesingle{}{\bf write}\textquotesingle{})
\item
def {\bf export\+Literal\+Attributes} (self, outfile, level, name\+\_\+)
\item
def {\bf export\+Literal\+Children} (self, outfile, level, name\+\_\+)
\item
def {\bf build} (self, node\+\_\+)
\item
def {\bf build\+Attributes} (self, attrs)
\item
def {\bf build\+Children} (self, child\+\_\+, node\+Name\+\_\+)
\end{DoxyCompactItemize}
\subsubsection*{Public Attributes}
\begin{DoxyCompactItemize}
\item
{\bf value\+Of\+\_\+}
\end{DoxyCompactItemize}
\subsubsection*{Static Public Attributes}
\begin{DoxyCompactItemize}
\item
{\bf subclass} = None
\item
{\bf superclass} = None
\item
{\bf factory} = staticmethod(factory)
\end{DoxyCompactItemize}

\subsubsection{Detailed Description}

Definition at line {\bf 2620} of file {\bf compoundsuper.\+py}.

\subsubsection{Constructor \& Destructor Documentation}
\index{doxyxml\+::generated\+::compoundsuper\+::write@{doxyxml\+::generated\+::compoundsuper\+::write}!\+\_\+\+\_\+init\+\_\+\+\_\+@{\+\_\+\+\_\+init\+\_\+\+\_\+}}
\index{\+\_\+\+\_\+init\+\_\+\+\_\+@{\+\_\+\+\_\+init\+\_\+\+\_\+}!doxyxml\+::generated\+::compoundsuper\+::write@{doxyxml\+::generated\+::compoundsuper\+::write}}
\paragraph[{\+\_\+\+\_\+init\+\_\+\+\_\+(self, value\+Of\+\_\+=\textquotesingle{}\textquotesingle{})}]{\setlength{\rightskip}{0pt plus 5cm}def doxyxml.\+generated.\+compoundsuper.\+write.\+\_\+\+\_\+init\+\_\+\+\_\+ (
\begin{DoxyParamCaption}
\item[{}]{self, }
\item[{}]{value\+Of\+\_\+ = {\ttfamily \textquotesingle{}\textquotesingle{}}}
\end{DoxyParamCaption}
)}\label{classdoxyxml_1_1generated_1_1compoundsuper_1_1write_addc24ca64f9e4b0e5e15ccbffa0b0190}

Definition at line {\bf 2623} of file {\bf compoundsuper.\+py}.

\subsubsection{Member Function Documentation}
\index{doxyxml\+::generated\+::compoundsuper\+::write@{doxyxml\+::generated\+::compoundsuper\+::write}!build@{build}}
\index{build@{build}!doxyxml\+::generated\+::compoundsuper\+::write@{doxyxml\+::generated\+::compoundsuper\+::write}}
\paragraph[{build(self, node\+\_\+)}]{\setlength{\rightskip}{0pt plus 5cm}def doxyxml.\+generated.\+compoundsuper.\+write.\+build (
\begin{DoxyParamCaption}
\item[{}]{self, }
\item[{}]{node\+\_\+}
\end{DoxyParamCaption}
)}\label{classdoxyxml_1_1generated_1_1compoundsuper_1_1write_abc71ce7918e149a90495c5f048b243e8}

Definition at line {\bf 2671} of file {\bf compoundsuper.\+py}.

References {\bf doxyxml.\+generated.\+compoundsuper.\+Doxygen\+Type.\+build\+Attributes()}, {\bf doxyxml.\+generated.\+compoundsuper.\+compounddef\+Type.\+build\+Attributes()}, {\bf doxyxml.\+generated.\+compoundsuper.\+listofallmembers\+Type.\+build\+Attributes()}, {\bf doxyxml.\+generated.\+compoundsuper.\+member\+Ref\+Type.\+build\+Attributes()}, {\bf doxyxml.\+generated.\+compoundsuper.\+scope.\+build\+Attributes()}, {\bf doxyxml.\+generated.\+compoundsuper.\+name.\+build\+Attributes()}, {\bf doxyxml.\+generated.\+compoundsuper.\+compound\+Ref\+Type.\+build\+Attributes()}, {\bf doxyxml.\+generated.\+compoundsuper.\+reimplement\+Type.\+build\+Attributes()}, {\bf doxyxml.\+generated.\+compoundsuper.\+inc\+Type.\+build\+Attributes()}, {\bf doxyxml.\+generated.\+compoundsuper.\+ref\+Type.\+build\+Attributes()}, {\bf doxyxml.\+generated.\+compoundsuper.\+ref\+Text\+Type.\+build\+Attributes()}, {\bf doxyxml.\+generated.\+compoundsuper.\+sectiondef\+Type.\+build\+Attributes()}, {\bf doxyxml.\+generated.\+compoundsuper.\+memberdef\+Type.\+build\+Attributes()}, {\bf doxyxml.\+generated.\+compoundsuper.\+definition.\+build\+Attributes()}, {\bf doxyxml.\+generated.\+compoundsuper.\+argsstring.\+build\+Attributes()}, {\bf doxyxml.\+generated.\+compoundsuper.\+read.\+build\+Attributes()}, {\bf doxyxml.\+generated.\+compoundsuper.\+write.\+build\+Attributes()}, {\bf doxyxml.\+generated.\+compoundsuper.\+Doxygen\+Type.\+build\+Children()}, {\bf doxyxml.\+generated.\+compound.\+doc\+Para\+Type\+Sub.\+build\+Children()}, {\bf doxyxml.\+generated.\+compoundsuper.\+compounddef\+Type.\+build\+Children()}, {\bf doxyxml.\+generated.\+compoundsuper.\+listofallmembers\+Type.\+build\+Children()}, {\bf doxyxml.\+generated.\+compoundsuper.\+member\+Ref\+Type.\+build\+Children()}, {\bf doxyxml.\+generated.\+compoundsuper.\+scope.\+build\+Children()}, {\bf doxyxml.\+generated.\+compoundsuper.\+name.\+build\+Children()}, {\bf doxyxml.\+generated.\+compoundsuper.\+compound\+Ref\+Type.\+build\+Children()}, {\bf doxyxml.\+generated.\+compoundsuper.\+reimplement\+Type.\+build\+Children()}, {\bf doxyxml.\+generated.\+compoundsuper.\+inc\+Type.\+build\+Children()}, {\bf doxyxml.\+generated.\+compoundsuper.\+ref\+Type.\+build\+Children()}, {\bf doxyxml.\+generated.\+compoundsuper.\+ref\+Text\+Type.\+build\+Children()}, {\bf doxyxml.\+generated.\+compoundsuper.\+sectiondef\+Type.\+build\+Children()}, {\bf doxyxml.\+generated.\+compoundsuper.\+memberdef\+Type.\+build\+Children()}, {\bf doxyxml.\+generated.\+compoundsuper.\+definition.\+build\+Children()}, {\bf doxyxml.\+generated.\+compoundsuper.\+argsstring.\+build\+Children()}, {\bf doxyxml.\+generated.\+compoundsuper.\+read.\+build\+Children()}, {\bf doxyxml.\+generated.\+compoundsuper.\+write.\+build\+Children()}, {\bf doxyxml.\+generated.\+compoundsuper.\+scope.\+value\+Of\+\_\+}, {\bf doxyxml.\+generated.\+compoundsuper.\+name.\+value\+Of\+\_\+}, {\bf doxyxml.\+generated.\+compoundsuper.\+compound\+Ref\+Type.\+value\+Of\+\_\+}, {\bf doxyxml.\+generated.\+compoundsuper.\+reimplement\+Type.\+value\+Of\+\_\+}, {\bf doxyxml.\+generated.\+compoundsuper.\+inc\+Type.\+value\+Of\+\_\+}, {\bf doxyxml.\+generated.\+compoundsuper.\+ref\+Type.\+value\+Of\+\_\+}, {\bf doxyxml.\+generated.\+compoundsuper.\+ref\+Text\+Type.\+value\+Of\+\_\+}, {\bf doxyxml.\+generated.\+compoundsuper.\+definition.\+value\+Of\+\_\+}, {\bf doxyxml.\+generated.\+compoundsuper.\+argsstring.\+value\+Of\+\_\+}, {\bf doxyxml.\+generated.\+compoundsuper.\+read.\+value\+Of\+\_\+}, and {\bf doxyxml.\+generated.\+compoundsuper.\+write.\+value\+Of\+\_\+}.

Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=550pt]{d6/dcb/classdoxyxml_1_1generated_1_1compoundsuper_1_1write_abc71ce7918e149a90495c5f048b243e8_cgraph}
\end{center}
\end{figure}

\index{doxyxml\+::generated\+::compoundsuper\+::write@{doxyxml\+::generated\+::compoundsuper\+::write}!build\+Attributes@{build\+Attributes}}
\index{build\+Attributes@{build\+Attributes}!doxyxml\+::generated\+::compoundsuper\+::write@{doxyxml\+::generated\+::compoundsuper\+::write}}
\paragraph[{build\+Attributes(self, attrs)}]{\setlength{\rightskip}{0pt plus 5cm}def doxyxml.\+generated.\+compoundsuper.\+write.\+build\+Attributes (
\begin{DoxyParamCaption}
\item[{}]{self, }
\item[{}]{attrs}
\end{DoxyParamCaption}
)}\label{classdoxyxml_1_1generated_1_1compoundsuper_1_1write_a70bb200ac55d35811e777d25c2153edf}

Definition at line {\bf 2678} of file {\bf compoundsuper.\+py}.

Referenced by {\bf doxyxml.\+generated.\+indexsuper.\+Doxygen\+Type.\+build()}, {\bf doxyxml.\+generated.\+indexsuper.\+Compound\+Type.\+build()}, {\bf doxyxml.\+generated.\+indexsuper.\+Member\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+write.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+bitfield.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+description\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+enumvalue\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+templateparamlist\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+param\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+declname.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+defname.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+array.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+linked\+Text\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+graph\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+node\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+label.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+childnode\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+edgelabel.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+link\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+listing\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+codeline\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+highlight\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+sp.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+reference\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+location\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+doc\+Sect1\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+doc\+Sect2\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+doc\+Sect3\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+doc\+Sect4\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+doc\+Internal\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+doc\+Internal\+S1\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+doc\+Internal\+S2\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+doc\+Internal\+S3\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+doc\+Internal\+S4\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+doc\+Title\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+doc\+Para\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+doc\+Markup\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+doc\+U\+R\+L\+Link.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+doc\+Anchor\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+doc\+Formula\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+doc\+Index\+Entry\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+doc\+List\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+doc\+List\+Item\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+doc\+Simple\+Sect\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+doc\+Var\+List\+Entry\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+doc\+Variable\+List\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+doc\+Ref\+Text\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+doc\+Table\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+doc\+Row\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+doc\+Entry\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+doc\+Caption\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+doc\+Heading\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+doc\+Image\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+doc\+Dot\+File\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+doc\+Toc\+Item\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+doc\+Toc\+List\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+doc\+Language\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+doc\+Param\+List\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+doc\+Param\+List\+Item.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+doc\+Param\+Name\+List.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+doc\+Param\+Name.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+doc\+X\+Ref\+Sect\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+doc\+Copy\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+doc\+Char\+Type.\+build()}, and {\bf doxyxml.\+generated.\+compoundsuper.\+doc\+Empty\+Type.\+build()}.

Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=550pt]{d6/dcb/classdoxyxml_1_1generated_1_1compoundsuper_1_1write_a70bb200ac55d35811e777d25c2153edf_icgraph}
\end{center}
\end{figure}

\index{doxyxml\+::generated\+::compoundsuper\+::write@{doxyxml\+::generated\+::compoundsuper\+::write}!build\+Children@{build\+Children}}
\index{build\+Children@{build\+Children}!doxyxml\+::generated\+::compoundsuper\+::write@{doxyxml\+::generated\+::compoundsuper\+::write}}
\paragraph[{build\+Children(self, child\+\_\+, node\+Name\+\_\+)}]{\setlength{\rightskip}{0pt plus 5cm}def doxyxml.\+generated.\+compoundsuper.\+write.\+build\+Children (
\begin{DoxyParamCaption}
\item[{}]{self, }
\item[{}]{child\+\_\+, }
\item[{}]{node\+Name\+\_\+}
\end{DoxyParamCaption}
)}\label{classdoxyxml_1_1generated_1_1compoundsuper_1_1write_a6967369d67e8b8e78a58872e131383ee}

Definition at line {\bf 2680} of file {\bf compoundsuper.\+py}.

Referenced by {\bf doxyxml.\+generated.\+indexsuper.\+Doxygen\+Type.\+build()}, {\bf doxyxml.\+generated.\+indexsuper.\+Compound\+Type.\+build()}, {\bf doxyxml.\+generated.\+indexsuper.\+Member\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+write.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+bitfield.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+description\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+enumvalue\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+templateparamlist\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+param\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+declname.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+defname.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+array.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+linked\+Text\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+graph\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+node\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+label.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+childnode\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+edgelabel.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+link\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+listing\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+codeline\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+highlight\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+sp.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+reference\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+location\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+doc\+Sect1\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+doc\+Sect2\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+doc\+Sect3\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+doc\+Sect4\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+doc\+Internal\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+doc\+Internal\+S1\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+doc\+Internal\+S2\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+doc\+Internal\+S3\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+doc\+Internal\+S4\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+doc\+Title\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+doc\+Para\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+doc\+Markup\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+doc\+U\+R\+L\+Link.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+doc\+Anchor\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+doc\+Formula\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+doc\+Index\+Entry\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+doc\+List\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+doc\+List\+Item\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+doc\+Simple\+Sect\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+doc\+Var\+List\+Entry\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+doc\+Variable\+List\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+doc\+Ref\+Text\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+doc\+Table\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+doc\+Row\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+doc\+Entry\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+doc\+Caption\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+doc\+Heading\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+doc\+Image\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+doc\+Dot\+File\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+doc\+Toc\+Item\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+doc\+Toc\+List\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+doc\+Language\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+doc\+Param\+List\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+doc\+Param\+List\+Item.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+doc\+Param\+Name\+List.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+doc\+Param\+Name.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+doc\+X\+Ref\+Sect\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+doc\+Copy\+Type.\+build()}, {\bf doxyxml.\+generated.\+compoundsuper.\+doc\+Char\+Type.\+build()}, and {\bf doxyxml.\+generated.\+compoundsuper.\+doc\+Empty\+Type.\+build()}.

Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=550pt]{d6/dcb/classdoxyxml_1_1generated_1_1compoundsuper_1_1write_a6967369d67e8b8e78a58872e131383ee_icgraph}
\end{center}
\end{figure}

\index{doxyxml\+::generated\+::compoundsuper\+::write@{doxyxml\+::generated\+::compoundsuper\+::write}!export@{export}}
\index{export@{export}!doxyxml\+::generated\+::compoundsuper\+::write@{doxyxml\+::generated\+::compoundsuper\+::write}}
\paragraph[{export(self, outfile, level, namespace\+\_\+=\textquotesingle{}\textquotesingle{}, name\+\_\+=\textquotesingle{}write\textquotesingle{}, namespacedef\+\_\+=\textquotesingle{}\textquotesingle{})}]{\setlength{\rightskip}{0pt plus 5cm}def doxyxml.\+generated.\+compoundsuper.\+write.\+export (
\begin{DoxyParamCaption}
\item[{}]{self, }
\item[{}]{outfile, }
\item[{}]{level, }
\item[{}]{namespace\+\_\+ = {\ttfamily \textquotesingle{}\textquotesingle{}}, }


text:
%Kingsland, S. [1985]: Modeling Nature, Chicago and London: The
%University of Chicago Press.
%Suárez, M. [2008]: Fictions in Science: Philosophical Essays on
%Modeling and Idealization, New York & London: Routledge.
%Wimsatt, W.C. (2007) Re-Engineering Philosophy for Limited Beings:
%Piecewise Approximations to Reality, Harvard University Press.
%Guala, F. (2005) The Methodology of Experimental Economics. Cambridge:
%Cambridge University Press.
%Küppers, G. & J. Lenhard (2005). Validation of simulation: Patterns in
%the social and natural sciences. Journal of Artificial Societies and
%Social Simulation, 8 (4).

\documentclass[12pt, english, a4paper]{article}
%\documentclass[12pt, onecollarge]{STJour}
\usepackage{microtype}
\usepackage[english, czech]{babel}
\usepackage[utf8x]{inputenc}
\usepackage{ucs} % unicode
\usepackage[T1]{fontenc}
%\usepackage[czech]{babel}
\usepackage{t1enc}
\usepackage{type1cm}
\usepackage{times}
\usepackage{setspace}
%\smartqed  % flush right qed marks, e.g. at end of proof
%\usepackage[square,sort&compress,comma,numbers]{natbib}
% fuer BibTeX
\usepackage[sort&compress]{natbib}
%\usepackage{epsfig}
%\usepackage{amssymb}
%\usepackage{amsmath}
%\usepackage{mathptmx}      % use Times fonts similar to Windows Office
%\usepackage{german}		% Apply if you wish to write in German
%\usepackage{exscale}
%\usepackage{psfrag}
%\usepackage{layout}
\usepackage{color}
\usepackage{eurosym}
%\usepackage{graphicx}
%\usepackage{rotating}

\usepackage{ifpdf}
\ifpdf
\usepackage{xmpincl}
\usepackage[pdftex]{hyperref}
\hypersetup{
    colorlinks,
    citecolor=black,
    filecolor=black,
    linkcolor=black,
    urlcolor=black,
    bookmarksopen=true,     % Gliederung öffnen im AR
    bookmarksnumbered=true, % Kapitel-Nummerierung im Inhaltsverzeichniss anzeigen
    bookmarksopenlevel=1,   % Tiefe der geöffneten Gliederung für den AR
    pdfstartview=FitV,       % Fit, FitH=breite, FitV=hoehe, FitBH
    pdfpagemode=UseOutlines % FullScreen, UseNone, UseOutlines, UseThumbs
}
\usepackage{bookmark}
\includexmp{Whats_wrong_with_social_simulations}
\pdfinfo{
  /Author (Eckhart Arnold)
  /Title (What's wrong with social simulations?)
  /Subject (A critique of the common practice to publish unvalidated simulations in the field of social simulations.)
  /Keywords (Social Simulations, Epistemology of Models, Philosophy of the Social Sciences, Economic Modeling)
}
\else
\usepackage{hyperref}
\fi

%\numberwithin{equation}{section}
%\sloppy

% Thanks to Daniel Ferrante
% http://olympus.het.brown.edu/~danieldf/latex/
%\usepackage{eso-pic}
%\usepackage{color}
%\makeatletter
%  \AddToShipoutPicture{%
% \setlength{\@tempdimb}{.5\paperwidth}%
% \setlength{\@tempdimc}{.5\paperheight}%
% \setlength{\unitlength}{1pt}%
% \put(\strip@pt\@tempdimb,\strip@pt\@tempdimc){%
%   \makebox(0,0){\rotatebox{45}{\textcolor[gray]{0.9}{\fontsize{5cm}{5cm}\selectfont{Draft}}}}
% }
%}
%\makeatother

\addto\captionsczech{
  \renewcommand{\contentsname}{Table of contents}
}

\begin{document}
%\onehalfspacing
%\setlanguage{english}

\unitlength1cm
%

\title{What's wrong with social simulations?}

%\title{Tools or Toys?}
%\footnote{Part of the research for this paper has been funded
%by the German Research Foundation (DFG) within the Cluster of
%Excellence in Simulation Technology (EXC 310/1) at the University of
%Stuttgart}
%\subtitle{On Specific Challenges for Modeling and the
%Epistemology of Models and Computer Simulations in the Social
%Sciences\\[0.2cm]
% - Paper for the Models \& Simulations 4 Conference, Toronto, May 2010
% -
%}

%
% Define if Title is too long for running head
%\titlerunning{Tools or Toys: Computer Simulations in the Social
%Sciences}
%
\author{Eckhart Arnold\\{\small Institute for Philosophy}\\{\small Heinrich Heine University of Düsseldorf}}
%
% \institute{% $^a$ ...
%   Institute of Philosophy, University of Stuttgart,\\
%   Seidenstraße 36, \\
%   70174 Stuttgart, Germany \\[2mm]
%   eckhart.arnold@philo.uni-stuttgart.de\\
%   www.eckhartarnold.de
%   http://www.uni-stuttgart.de/philo/index.php?id=1043\\[2mm]
% }
%
% Define if Authorlist is too long for running head
%\authorrunning{Eckhart Arnold}
%
% Convention: year  - issue in that year
%\SimTechIssue{2012-??}
\date{September 2013; last revision: March 2016}

\maketitle

\begin{abstract}
%\onehalfspacing
\singlespacing

This paper tries to answer the question why the epistemic value of so
many social simulations is questionable. I consider the epistemic
value of a social simulation as questionable if it contributes neither
directly nor indirectly to the understanding of empirical reality. In
order to justify this allegation I rely mostly but not entirely on the
survey by \citet{heath-et-al:2009} according to which 2/3 of all
agent-based-simulations are not properly empirically validated.  In
order to understand the reasons why so many social simulations are of
questionable epistemic value, two classical social simulations are
analyzed with respect to their possible epistemic justification:
Schelling’s neighborhood segregation model \citep{schelling:1971} and
Axelrod’s reiterated Prisoner’s Dilemma simulations of the evolution
of cooperation \citep{axelrod:1984}. It is argued that Schelling’s
simulation is useful, because it can be related to empirical reality,
while Axelrod’s simulations and those of his followers cannot be
related to empirical reality and therefore their scientific value
remains doubtful. Finally, I critically discuss some of the typical
epistemological background beliefs of modelers as expressed in Joshua
Epsteins’s keynote address ``Why model?''
\citep{epstein:2008}. Underestimating the importance of empirical
validation is identified as one major cause of failure for social
simulations.

\vspace{0.1cm}
\begin{flushleft}
{\bf Keywords}: Social Simulations, Epistemology of Models, Philosophy of the Social Sciences, Economic Modeling
\end{flushleft}
\begin{flushleft}
{\em Published in: The Monist 2014, Vol. 97, No.3, pp. 361-379.}
\end{flushleft}

\end{abstract}

\newpage

%\doublespacing

\tableofcontents

\onehalfspacing
\section{Introduction}

In this paper I will try to answer the question: Why is the epistemic
value of so many social simulations questionable? Under social
simulations I understand computer simulations of human interaction as
it is studied in the social sciences. The reason why I consider the
epistemic value of many social simulations as questionable is that
many simulation studies cannot give an answer to the most salient
question that any scientific study should be ready to answer: “How do
we know it’s true?” or, if specifically directed to simulation
studies: “How do we know that the simulation simulates the phenomenon
correctly that it simulates?” Answering this question requires some
kind of empirical validation of the simulation. The requirement of
empirical validation is in line with the widely accepted notion that
science is demarcated from non-science by its empirical testability or
falsifiability. Many simulation studies, however, do not offer any
suggestion how they could possibly be validated empirically.

A frequent reply by simulation scientists is that no simulation of
empirical phenomena was intended, but that the simulation only serves
a “theoretical” purpose. Then, however, another equally salient
question should be answered: “Why should we care about the results?”
It is my strong impression that many social simulation studies cannot
answer either this or the first question. This is not to say that the
use of computer programs for answering purely theoretical questions is
generally or necessarily devoid of value. The computer assisted proofs
of the four color theorem \citep{wilson:2002} are an important
counterexample. But in the social sciences it is hard to find
similarly useful examples of the use of computers for purely
theoretical purposes. In any case, the social sciences are empirical
sciences. Therefore, social simulations should contribute either
directly or indirectly to our understanding of social phenomena in the
empirical world.

There exist many different types of simulations but I will restrict
myself to agent-based and game theoretical simulations.  I do not make
a sharp difference between models and simulations. For the purpose of
this paper I identify computer simulations just with programmed
models. Most of my criticism of the practice of these simulation types
can probably be generalized to other types of simulations or models in
the social sciences and maybe also to some instances of the simulation
practice in the natural sciences. It would lead too far afield to
examine these connections here, but it should be easy to determine in
other cases whether the particulars of bad simulation practice against
which my criticism is directed are present or not.

In order to bring my point home, I rely on the survey by
\citet{heath-et-al:2009} on agent-based modeling practice for a
general overview and on two example cases that I examine in detail. I
start by discussing the survey which reveals that in an important
sub-field of social simulations, namely, agent based simulations,
empirical validation is commonly lacking. After that I first discuss
Thomas Schelling’s well-known neighborhood segregation model. This is
a model that I do not consider as being devoid of epistemic
value. For, unlike most social simulations, it can be empirically
falsified. The discussion of the particular features that make this
model scientifically valuable will help us to understand why the
simulation models discussed in the following fail to be so.

The simulation models that I discuss in the following are simulations
in the tradition of Robert Axelrod’s “Evolution of Cooperation”
\citep{axelrod:1984}. Although the modeling tradition initiated by
Axelrod has delivered hardly any tenable and empirically applicable
results, it still continues to thrive today. By some, Axelrod’s
approach is still taken as a role model
\citep[208-209]{rendell-et-al:2010a}, although there has been severe
criticism by others \citep{arnold:2008, binmore:1994, binmore:1998}.

Finally, the question remains why scientists continue to produce such
an abundance of simulation studies that fail to be empirically
applicable. Leaving possible sociological explanations like the
momentum of scientific traditions, the cohesion of peer groups, the
necessity of justifying the investment in acquiring particular skills
(e.g. math and programming) aside, I confine myself to the ideological
background of simulation scientists. In my opinion the failure to
produce useful results has a lot to do with the positivist attitude
prevailing in this field of the social sciences. This attitude
includes the dogmatic belief in the superiority of the methods of
natural sciences like physics in any area of science. Therefore,
despite frequent failure, many scientists continue to believe that
formal modeling is just the right method for the social sciences. The
attitude is well described in \citet{shapiro:2005}. Such attitudes are
less often expressed explicitly in the scientific papers. Rather they
form a background of shared convictions that, if not simply taken for
granted as “unspoken assumptions”, find their expression in informal
texts, conversations, blogs, keynote speeches. I discuss Joshua
Epstein’s keynote lecture “Why Model?” \citep{epstein:2008} as an
example.

\section{Simulation without validation in agent-based models}

In this section I give my interpretation of a survey by
\citet{heath-et-al:2009} on agent-based-simulations. I do so with the
intention of substantiating my claim that many social simulations are
indeed useless. This is neither the aim nor the precise conclusion
that \citet{heath-et-al:2009} draw, but their study does reveal that
two thirds of the surveyed simulation studies are not completely
validated and the authors of the study consider this state of affairs
as ``not acceptable'' \citep[4.11]{heath-et-al:2009}. Thus my reading
does not run counter the results of the survey. And it follows as a
natural conclusion, if one accepts that a) an unvalidated simulation
is - in most of the cases - a useless one and b) agent-based
simulations make up a substantial part of social simulations.

The survey by \citet{heath-et-al:2009} examines agent-based mode- ling
practices between 1998 and 2008. It encompasses “279 articles from 92
unique publication outlets in which the authors had constructed and
analyzed an agent-based model” (Heath, Hill and Ciarallo, 2009,
abstract). The articles stem from different fields of the social
sciences including, business, economics, public policy, social
science, traffic, military and also biology. The authors are not only
interested in verification and validation practices, but the results
concerning these are the results that I am interested in
here. Verification and validation concern two separate aspects of
securing the correctness of a simulation model.  Verification,
as the term is used in the social simualtions community, roughly
concerns the question whether the simulation software is bug-free and
correctly implements the intended simulation model. Validation
concerns the question whether the simulation model represents the
simulated empirical target system adequately (for the intended
purpose).

Regarding verification, Heath, Hill and Ciarallo notice that ``Only 44
(15.8\%) of the articles surveyed gave a reference for the reader to
access or replicate the model. This indicates that the majority of the
authors, publication outlets and reviewers did not deem it necessary
to allow independent access to the models.  This trend appears
consistently over the last 10 years''
\citep[3.6]{heath-et-al:2009}. This astonishingly low figure can in
part be explained by the fact that as long as the model is described
with sufficient detail in the paper, it can also be replicated by
re-programming it from the model description. It must not be forgotten
that the replication of computer simulation results does not have the
same epistemological importance as the replication of experimental
results. While the replication of experiments adds additional
inductive support to the experimental results, the replication of
simulation results is merely a means for checking the simulation
software for programming errors (“bugs”). Hence the possibility of
precise replication is not an advantage that simulations enjoy over
material experiments, as for example \citet[248]{reiss:2011}
argues. Obviously, if the same simulation software is run in the same
system environment the same results will be produced, no matter
whether this is done by a different team of researchers at a different
time and place with different computers. Even if the model is
re-implemented the results must necessarily be the same provided that
both the model and the system environment are fully specified and no
programming errors have been made in the original implementation or
the re-implementation.\footnote{A possible exception concerns the
  frequent use of random numbers. As long as only pseudo random
  numbers with the same random number generator and the same “seed”
  are used, the simulation is still completely deterministic. This not
  to say that sticking to the same “seeds” is good practice other than
  for debugging.} Replication or reimplementation can, however, help
to reveal such errors.\footnote{I am indebted to Paul Humphreys for
  pointing this out to me.} It can therefore be considered as one of
several possible means for the verification (but not validation) of a
computer simulation. Error detection becomes much more laborious if no
reference to the source code is provided. And it does happen that
simulation models are not specified with sufficient detail to
replicate them \citep{will-hegselmann:2008}. Therefore, the rather low
proportion of articles that provide a reference to access or replicate
the simulation is worrisome.

More important than the results concerning verification is what Heath,
Hill and Ciarallo find out about validation or, rather, the lack of
validation:

\begin{quote}
  Without validation a model cannot be said to be representative of
  anything real. However, 65\% of the surveyed articles were not
  completely validated.  This is a practice that is not acceptable in
  other sciences and should no longer be acceptable in ABM practice
  and in publications associated with
  ABM. \citep[4.11]{heath-et-al:2009}
\end{quote}

This conclusion needs a little further commentary. The figure of 65\%
of not completely validated simulations is an average value over the
whole period of study. In the earlier years that are covered by the
survey hardly any simulation was completely validated. Later this
figure decreases, but a ratio of less than 45\% of completely
validated simulation studies remains constant during the last 4 yours
of the period covered \citep[3.10]{heath-et-al:2009}.

Furthermore it needs to be qualified what Heath, Hill and Ciarallo
mean when they speak of complete validation.  The authors make a
distinction between conceptual validation and operational validation.
Conceptual validation concerns the question whether the mechanisms
built into the model represent the mechanisms that drive the modeled
real system. An “invalid conceptual model indicates the model may not
be an appropriate representation of reality.” Operational validation
then “validates results of the simulation against results from the
real system.” \citep[2.13]{heath-et-al:2009}. The demand for complete
validation is well motivated: “If a model is only conceptually
validated, then it [is] unknown if that model will produce correct
output results.” \citep[4.12]{heath-et-al:2009}. For even if the
driving mechanisms of the real system are represented in the model, it
remains – without operational validation – unclear whether the
representation is good enough to produce correct output results. On
the other hand, a model that has been operationally validated only,
may be based on a false or unrealistic mechanism and thus fail to
explain the simulated phenomenon, even if the data matches. Heath,
Hill and Ciarallo do not go into much detail concerning how exactly
conceptual and operational validation are done in practice and under
what conditions a validation attempt is to be considered as successful
or as a failure.

But do really all simulations need to be validated both conceptually
and operationally as Heath, Hill and Ciarallo demand? After all, some
simulations may – just like thought experiments – have been intended
to merely prove conceptual possibilities.  One would usually not
demand an empirical (i.e. operational) validation from a thought
experiment. Heath, Hill and Ciarallo themselves make a distinction
between the generator, mediator and predictor role of a simulation
\citep[2.16]{heath-et-al:2009}. In the generator role simulations are
merely meant to generate hypotheses. Simulations in the mediator role
“capture certain behaviors of the system and [..] characterize how the
system may behave under certain scenarios” (3.4) and only simulations
in the predictor role are actually calculating a real system. All of
the surveyed studies fall into the first two categories. Obviously,
the authors require complete validation even from these types of
simulations.

This can be disputed. As stated in the introduction, in order to be
useful, a simulation study should make a contribution to answering
some relevant question of empirical science. This contribution can be
direct or indirect. The contribution is direct if the model can be
applied to some empirical process and if it can be tested empirically
whether the model is correct. The model’s contribution is indirect, if
the model cannot be applied empirically, but if we can learn something
from the model which helps us to answer an empirical question, the
answer to which we would not have known otherwise. The latter kind of


text:
%%%%%%%%% espcrc2.tex %%%%%%%%%%
\documentstyle[twoside,fleqn,espcrc2]{article}

% put your own definitions here:
%   \newcommand{\cZ}{\cal{Z}}
%   \newtheorem{def}{Definition}[section]
%   ...
\newcommand{\ttbs}{\char'134}
\newcommand{\AmS}{{\protect\the\textfont2
  A\kern-.1667em\lower.5ex\hbox{M}\kern-.125emS}}

% add words to TeX's hyphenation exception list
\hyphenation{author another created financial paper re-commend-ed}

% declarations for front matter
\title{Elsevier instructions for the preparation of a
       2-column format camera-ready paper in \LaTeX}

\author{P. de Groot\address{Mathematics and Computer Science Division,
        Elsevier Science Publishers B.V., \\
        P.O. Box 103, 1000 AC Amsterdam, The Netherlands}%
        \thanks{Footnotes should appear on the first page only to
                indicate your present address (if different from your
                normal address), research grant, sponsoring agency, etc.
                These are obtained with the {\tt\ttbs thanks} command.}
        and
        X.-Y. Wang\address{Economics Department, University of Winchester, \\
        2 Finch Road, Winchester, Hampshire P3L T19, United Kingdom}}

\begin{document}

\begin{abstract}
These pages provide you with an example of the layout and style for
100\% reproduction which we wish you to adopt during the preparation of
your paper. This is the output from the \LaTeX{} document style you
requested.
\end{abstract}

% typeset front matter (including abstract)
\maketitle

\section{FORMAT}

Text should be produced within the dimensions shown on these pages:
each column 7.5 cm wide with 1 cm middle margin, total width of 16 cm
and a maximum length of 20.2 cm on first pages and 21 cm on second and
following pages. The \LaTeX{} document style uses the maximal stipulated
length apart from the following two exceptions (i) \LaTeX{} does not
begin a new section directly at the bottom of a page, but transfers the
heading to the top of the next page; (ii) \LaTeX{} never (well, hardly
ever) exceeds the length of the text area in order to complete a
section of text or a paragraph.

\subsection{Spacing}

We normally recommend the use of 1.0 (single) line spacing. However,
when typing complicated mathematical text \LaTeX{} automatically
increases the space between text lines in order to prevent sub- and
superscript fonts overlapping one another and making your printed
matter illegible.

\subsection{Fonts}

These instructions have been produced using a 10 point Computer Modern
Roman. Other recommended fonts are 10 point Times Roman, New Century
Schoolbook, Bookman Light and Palatino.

\section{PRINTOUT}

The most suitable printer is a laser printer. A dot matrix printer
should only be used if it possesses an 18 or 24 pin printhead
(``letter-quality'').

The printout submitted should be an original; a photocopy is not
acceptable. Please make use of good quality plain white A4 (or US
Letter) paper size. {\em The dimensions shown here should be strictly
adhered to: do not make changes to these dimensions, which are
determined by the document style}. The document style leaves at least
3~cm at the top of the page before the head, which contains the page
number.

Printers sometimes produce text which contains light and dark streaks,
or has considerable lighting variation either between left-hand and
right-hand margins or between text heads and bottoms. To achieve
optimal reproduction quality, the contrast of text lettering must be
uniform, sharp and dark over the whole page and throughout the article.

If corrections are made to the text, print completely new replacement
pages. The contrast on these pages should be consistent with the rest
of the paper as should text dimensions and font sizes.

\begin{table*}[hbt]
% space before first and after last column: 1.5pc
% space between columns: 3.0pc (twice the above)
\setlength{\tabcolsep}{1.5pc}
% -----------------------------------------------------
% adapted from TeX book, p. 241
\newlength{\digitwidth} \settowidth{\digitwidth}{\rm 0}
\catcode`?=\active \def?{\kern\digitwidth}
% -----------------------------------------------------
\caption{Biologically treated effluents (mg/l)}
\label{tab:effluents}
\begin{tabular*}{\textwidth}{@{}l@{\extracolsep{\fill}}rrrr}
\hline
                 & \multicolumn{2}{l}{Pilot plant}
                 & \multicolumn{2}{l}{Full scale plant} \\
\cline{2-3} \cline{4-5}
                 & \multicolumn{1}{r}{Influent}
                 & \multicolumn{1}{r}{Effluent}
                 & \multicolumn{1}{r}{Influent}
                 & \multicolumn{1}{r}{Effluent}         \\
\hline
Total cyanide    & $ 6.5$ & $0.35$ & $  2.0$ & $  0.30$ \\
Method-C cyanide & $ 4.1$ & $0.05$ &         & $  0.02$ \\
Thiocyanide      & $60.0$ & $1.0?$ & $ 50.0$ & $ <0.10$ \\
Ammonia          & $ 6.0$ & $0.50$ &         & $  0.10$ \\
Copper           & $ 1.0$ & $0.04$ & $  1.0$ & $  0.05$ \\
Suspended solids &        &        &         & $<10.0?$ \\
\hline
\multicolumn{5}{@{}p{120mm}}{Reprinted from: G.M. Ritcey,
                             Tailings Management,
                             Elsevier, Amsterdam, 1989, p. 635.}
\end{tabular*}
\end{table*}

\section{TABLES AND ILLUSTRATIONS}

Tables should be made with \LaTeX; illustrations should be originals or
sharp prints. They should be arranged throughout the text and
preferably be included {\em on the same page as they are first
discussed}. They should have a self-contained caption and be positioned
in flush-left alignment with the text margin within the column. If they
do not fit into one column they may be placed across both columns
(using \verb-\begin{table*}- or \verb-\begin{figure*}- so that they
appear at the top of a page).

\subsection{Tables}

Tables should be presented in the form shown in
Table~\ref{tab:effluents}.  Their layout should be consistent
throughout.

Horizontal lines should be placed above and below table headings, above
the subheadings and at the end of the table above any notes. Vertical
lines should be avoided.

If a table is too long to fit onto one page, the table number and
headings should be repeated above the continuation of the table. For
this you have to reset the table counter with
\verb|\addtocounter{table}{-1}|. Alternatively, the table can be turned
by $90^\circ$ (`landscape mode') and spread over two consecutive pages
(first an even-numbered, then an odd-numbered one) created by means of
\verb|\begin{table}[h]| without a caption. To do this, you prepare the
table as a separate \LaTeX{} document and attach the tables to the
empty pages with a few spots of suitable glue.

\subsection{Line drawings}

Line drawings should be drawn in India ink on tracing paper with the
aid of a stencil or should be glossy prints of the same; computer
prepared drawings are also acceptable. They should be attached to your
manuscript page, correctly aligned, using suitable glue and {\em not
transparent tape}. When placing a figure at the top of a page, the top
of the figure should be at the same level as the bottom of the first
text line.

All notations and lettering should be no less than 2\,mm high. The use
of heavy black, bold lettering should be avoided as this will look
unpleasantly dark when printed.

\subsection{Black and white photographs}

Photographs must always be sharp originals ({\em not screened
versions\/}) and rich in contrast. They will undergo the same reduction
as the text and should be pasted on your page in the same way as line
drawings.

\subsection{Colour photographs}

Sharp originals ({\em not transparencies or slides\/}) should be
submitted close to the size expected in publication. Charges for the
processing and printing of colour will be passed on to the author(s) of
the paper. As costs involved are per page, care should be taken in the
selection of size and shape so that two or more illustrations may be
fitted together on one page. Please contact the Technical Editor in the
Camera-Ready Publications Department at Elsevier for a price quotation
and layout instructions before producing your paper in its final form.

\begin{figure}[htb]
\vspace{9pt}
\framebox[55mm]{\rule[-21mm]{0mm}{43mm}}
\caption{Good sharp prints should be used and not (distorted) photocopies.}
\label{fig:largenenough}
\end{figure}
%
\begin{figure}[htb]
\framebox[55mm]{\rule[-21mm]{0mm}{43mm}}
\caption{Remember to keep details clear and large enough.}
\label{fig:toosmall}
\end{figure}

\section{EQUATIONS}

Equations should be flush-left with the text margin; \LaTeX{} ensures
that the equation is preceded and followed by one line of white space.
\LaTeX{} provides the document-style option {\tt fleqn} to get the
flush-left effect.

\begin{equation}
H_{\alpha\beta}(\omega) = E_\alpha^{(0)}(\omega) \delta_{\alpha\beta} +
                          \langle \alpha | W_\pi | \beta \rangle
\end{equation}

You need not put in equation numbers, since this is taken care of
automatically. The equation numbers are always consecutive and are
printed in parentheses flush with the right-hand margin of the text and
level with the last line of the equation. For multi-line equations, use
the {\tt eqnarray} environment. For complex mathematics, use the
\AmS-\LaTeX{} package.

\begin{thebibliography}{9}
\bibitem{Scho70} S. Scholes, Discuss. Faraday Soc. No. 50 (1970) 222.
\bibitem{Mazu84} O.V. Mazurin and E.A. Porai-Koshits (eds.),
                 Phase Separation in Glass, North-Holland, Amsterdam, 1984.
\bibitem{Dimi75} Y. Dimitriev and E. Kashchieva,
                 J. Mater. Sci. 10 (1975) 1419.
\bibitem{Eato75} D.L. Eaton, Porous Glass Support Material,
                 US Patent No. 3 904 422 (1975).
\end{thebibliography}

References should be collected at the end of your paper. Do not begin
them on a new page unless this is absolutely necessary. They should be
prepared according to the sequential numeric system making sure that
all material mentioned is generally available to the reader. Use
\verb+\cite+ to refer to the entries in the bibliography so that your
accumulated list corresponds to the citations made in the text body.

Above we have listed some references according to the
sequential numeric system \cite{Scho70,Mazu84,Dimi75,Eato75}.
\end{document}