\batchmode
\input href
\catcode`\@=11 % open access to private macros
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Page size and output program
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\hsize=17cm
\hoffset=-0.54cm
\voffset=-0.54cm
\vsize=9.9in
\footline={}
\def\rhead{}
\def\leftheadline{
 \hbox to \hsize{\vbox to 10 pt {}%
   \llap{\tenbf\folio\kern 1pc}\tenit\rhead\hfil
 }
}
\def\rightheadline{
 \hbox to \hsize{\vbox to 10 pt {}%
   \tenit\hfil\rhead\rlap{\kern 1pc\tenbf\folio}
 }
}
\def\makeheadline{
 \vbox to 0pt{\vskip-22.5pt\ifodd\pageno\rightheadline\else\leftheadline\fi\vss}
 \nointerlineskip
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Page output parameters
%%%%%%%%%%%%%%%%%%%%%%%%%%%
\widowpenalty=10000
\clubpenalty=10000
%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Sections
%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\heading#1{
 { \bf\let\nl=\par
%  \tolerance=10000
  \bigskip
  \hyphenpenalty=10000
  \advance\leftskip by 0pt plus 1fill
  \advance\rightskip by 0pt plus 1fill
  \narrower
  \uppercase{#1}
  \par
  \nobreak\bigskip
 }
}
\newif\ifchapno
\chapnofalse
\newcount\chapno
\chapno=0
\newcount\subchno
\newcount\subsubchno
\newcount\subsubsubchno
\newcount\footno
\newcount\excerno
\footno=1
\excerno=0
\def\chapter#1{\penalty-250
  \advance\chapno by 1
  \subchno=0
  \footno=1
  \excerno=1
  \bigskip\noindent
  \centerline{\bf\ifchapno\the\chapno.~\fi#1}\nobreak\medskip\nobreak
}
\def\subchap#1{\medskip
\advance\subchno by 1
\subsubchno=0
\centerline{{\bf\ifchapno\the\chapno.\the\subchno.~\fi#1}}\nobreak\smallskip\nobreak
}
\def\subsubchap#1{\medskip
\advance\subsubchno by 1
\ifchapno\centerline{{\bf\the\chapno.\the\subchno.\the\subsubchno.~#1}}\nobreak\smallskip%
\else{\bf#1 }\fi%
}
\def\subsubsubchap#1{\medskip
\advance\subsubsubchno by 1
\ifchapno{\bf\the\chapno.\the\subchno.\the\subsubchno.\the\subsubsubchno.~#1. }%
\else{\bf#1. }\fi%
}
\def\section#1.{\smallskip{\bf#1.}}
\def\qsection#1?{\smallskip{\bf#1?}}
\def\boxit#1{\vbox{\hrule\hbox{\vrule\kern 1pt
               \vbox{\kern 1pt #1 \kern 1pt}\kern 1pt\vrule}\hrule}}
\def\bskip{\hskip 0.5em}
\def\frac#1/#2{\leavevmode\kern.1em
\raise.5ex\hbox{\the\scriptfont0 #1}\kern-.1em
/\kern-.15em\lower.25ex\hbox{\the\scriptfont0 #2}}
\def\N{\char252\relax}
\def\emph#1{{\it #1\/}}
\def\dfn#1{{\it#1\/}}
\def\cP{{\cal P}}
\def\cJ{{\cal J}}
\def\cR{{\cal R}}
\def\cS{{\cal S}}
\def\cM{{\cal M}}
\def\nvec#1{({#1}_1,{#1}_2, \ldots, {#1}_n)}
\def\fmod#1{\;({\rm mod}\,\,#1)}
%% "mod" sign in ellipse
\def\ellmod#1{\;({\rm mod}\,\,#1)}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Mathematical functions
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\perm#1#2{{\left(#1\atop#2\right)}}
\def\stir#1#2{{\left[#1\atop#2\right]}}
\def\Stir#1#2{{\left\{#1\atop#2\right\}}}
\def\stirstir#1#2{{\left[\left[#1\atop#2\right]\right]}}
\def\eul#1#2{{\left\langle#1\atop#2\right\rangle}}
\def\Eul#1#2{{\left\langle\left\langle#1\atop#2\right\rangle\right\rangle}}
\def\floor#1{{\left\lfloor#1\right\rfloor}}
\def\ceil#1{{\left\lceil#1\right\rceil}}
\def\entier#1{{\left[#1\right]}}
\def\abs#1{{\left\vert #1\right\vert}}
\def\Abs#1{{\left\Vert #1\right\Vert}}
\def\dlp{\left(\left(}
\def\drp{\right)\right)}
\def\Prsup{\overline{\Pr}}
\def\Prsub{\underline{\Pr}}
\def\fsup{\overline{f}}
\def\fsub{\underline{f}}
%%
\def\simlt{\mathrel{\mathpalette\@versim{<}}} % "<" over \sim
\def\@versim#1#2{\lower.5\p@\vbox{\baselineskip\z@skip\lineskip-.5\p@
    \ialign{$\m@th#1\hfil##\hfil$\crcr#2\crcr\sim\crcr}}}
%%
\def\{{\ifmmode\lbrace\else{\tt\char"7B\relax}\fi}
\def\}{\ifmmode\rbrace\else{\tt\char"7D\relax}\fi}
\def\true{{\it true}}
\def\GE{$\ge$}
\def\LE{$\le$}
\def\NE{\ifmmode\not=\else$\not=$\fi}
\def\TO{\ifmmode\to\else$\to$\fi}
\def\NULL{\ifmmode\Lambda\else$\Lambda$\fi}
\def\note#1#2{\footnote{\ifmmode^{\the\footno}\else$^{\the\footno}$\fi}{#2}\global\advance\footno by 1}
\def\cite{\bgroup\medskip\narrower}
\def\endcite{\par\medskip\egroup}
\def\epigraph#1\signed#2\par{{\parindent=0pt\let\nl=\par\hbox to \hsize{\hfill\vbox{{\divide\hsize by 2#1\par}}}%
\hbox to \hsize{\hfill\vbox{{\divide\hsize by 2#2\par}}}}\bigskip}
\def\bsl{\ifmmode\backslash\else{\tt\char`\\}\fi}
\def\DIV{\mathbin{{\rm DIV}}}
\def\MOD{\mathbin{{\rm MOD}}}
\def\ror{\mathbin{{\hbox{\rm ���}}}}
\def\rand{\mathbin{{\hbox{\rm �}}}}
\def\mean{\mathop{\rm mean}\nolimits}
\def\var{\mathop{\rm var}\nolimits}
\def\covar{\mathop{\rm covar}\nolimits}
\def\ave{\mathop{\rm ave}\nolimits}
\def\dev{\mathop{\rm dev}\nolimits}
\def\ctg{\mathop{\rm ctg}\nolimits}
\def\sign{\mathop{\rm sign}\nolimits}
\def\adj{\mathop{\rm adj}\nolimits}
\def\round{\mathop{\rm round}\nolimits}
\def\trunc{\mathop{\rm trunc}\nolimits}
\def\���{\mathop{\rm ���}\nolimits}
\def\���{\mathop{\rm ���}\nolimits}
\def\T{\mathbin{\top}}
\def\set#1{\{\, #1\,\}}
\def\oct#1{{\it #1}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Ordered and unordered list
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcount\itemcnt
\def\enumerate{%
\bgroup\itemcnt=1\medskip\narrower
\def\li{\item{\the\itemcnt)~}\advance\itemcnt by 1}
}
\def\enumend{\medskip\egroup}
\def\itemize{%
\bgroup\medskip\narrower
\def\li{\item{$\bullet$}}
}
\def\itemend{\medskip\egroup}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Table autoformatting
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\ctable#1{$$\vbox{\halign{#1}}$$}
\newbox\tbox
\newbox\ttbox
\newdimen\tdim
\newif\ifhtablepassone
\def\embedpar#1{\ifhtablepassone\relax\else{\hsize=\tdim #1\par}\fi} 
\def\htable#1#2#3{{\let\nl=\par
\htablepassonetrue
\setbox\tbox\vbox{\halign{#3}}\tdim=\wd\tbox
\htablepassonefalse
\setbox\tbox\vbox{\halign{#3}}\setbox\ttbox\hbox{#2}
\ifdim\wd\tbox>\wd\ttbox\tdim=\wd\tbox\else\tdim=\wd\ttbox\fi
$$\vbox{\hbox to\tdim{\hfill#1}\hbox to\tdim{\hfill#2\hfill}
\hbox to\tdim{\hfill\box\tbox\hfill}}$$%
}}
\def\UDC#1{\leftline{��� #1}}
\def\btable#1{{\offinterlineskip$$\boxit{\vbox{\halign{#1}}}$$}}
\def\rrq{"}
\def\rlq{"}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Excercise formatting macros
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\excercises{\bigskip\centerline{����������}\medskip\global\excerno=1}
\def\ex[#1]#2\par{\item{\the\excerno.}[#1]#2\par\global\advance\excerno by 1}
\def\rex[#1]#2\par{\item{\btr\the\excerno.}[#1]#2\par\global\advance\excerno by 1}
\def\exhead(#1){{\sl(#1)\/}}
\def\btr{{\tt >}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\rem#1{\qquad\hbox{#1}}
\def\MIX{{\tt MIX}}
\def\MIXAL{{\tt MIXAL}}
\def\MIXTEC{{\tt MIXTEC}}
\def\MIXT{{\tt MIXT}}
\def\hslogo{$\bigtriangleup\atop\bigtriangledown$}
\def\strong#1{{\bf #1}}
\def\endmark{\vrule depth 0pt height 10 pt width 0.5em}
\def\hiddenpar{\par}
%%%%%%%%%%%%%%%%%%%%%%%%
%% algorithm definition
%%%%%%%%%%%%%%%%%%%%%%%%
\newcount\stepno
\def\alg #1.(#2){\medskip\gdef\alglettr{#1}{\bf �������� #1. }{\sl(#2)\/ }%
\global\stepno=1}
\def\st{\item{\alglettr\the\stepno\global\advance\stepno by 1}}
\def\asg{\ifmmode\leftarrow\else$\leftarrow$\fi}
\def\rasg{\ifmmode\rightarrow\else$\rightarrow$\fi}
\def\xchg{\ifmmode\leftrightarrow\else$\leftrightarrow$\fi}
\def\Asg{\ifmmode\Leftarrow\else$\Leftarrow$\fi}
\def\Rasg{\ifmmode\Rightarrow\else$\Rightarrow$\fi}
\def\To{\ifmmode\Rightarrow\else$\Rightarrow$\fi}
\def\stp#1{{\bf\alglettr#1}}
\def\algend{\endmark\medskip}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% program definition
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcount\prgstepno
\def\prog #1.(#2){\medskip\gdef\prglettr{#1}{\bf ��������� #1. }{\sl(#2)\/ }%
\global\prgstepno=1}
\def\pst{\item{\prglettr\the\stepno\global\advance\prgstepno by 1}}
\def\progend{\endmark\medskip}
%%
{\obeyspaces\gdef {\ }}
\catcode`\|=\active
\def\code{\nobreak\medskip\bgroup\let\par=\cr\obeylines%
% --- \def|{{\tt\char`\|}}%
\halign\bgroup\tt##\bskip&\tt##\bskip&\tt##\bskip&\hfill$##$\hfill&\bskip##\hfill\cr}
\def\endcode{\egroup\egroup\medbreak\noindent}
\def\twocols{\noalign\bgroup%
\halign\bgroup\tt##\bskip&\tt##\bskip&\tt##\bskip&\tt##\bskip&\tt##\bskip&\tt##\bskip&\hfill$##$\hfill&\bskip##\hfill\cr}
\def\endtwocols{\egroup\egroup}
\def|{\bgroup\tt\def|{\egroup}}
\def\bdispl{\bgroup$$\vbox\bgroup\obeylines}
\def\edispl{\egroup$$\egroup}
%% MIX code
\newcount\pcntr
\def\condcr{\ifnum\pcntr>0\cr\else\relax\fi}
\def\mixcode{\bgroup\let\par=\condcr\obeylines\pcntr=0%
\vtop\bgroup\halign\bgroup%
\global\advance\pcntr by 1%
\ifnum\pcntr<10{}0\else\relax\fi%
\the\pcntr~%
\tt##\hfil\bskip&\tt##\hfil\bskip&\bskip##\hfill\cr}
\def\endmixcode{\egroup\egroup\egroup}
%%

%%
\def\picture#1{$${\hbox{{Picture:\hskip4ex\vtop{\hsize=13cm\noindent\ignorespaces#1}\par}}}$$}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% tricky macros borrowed from LaTeX 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\long\def\@ifnextchar#1#2#3{%
  \let\reserved@d=#1%
  \def\reserved@a{#2}%
  \def\reserved@b{#3}%
  \futurelet\@let@token\@ifnch}
\def\@ifnch{%
  \ifx\@let@token\@sptoken
    \let\reserved@c\@xifnch
  \else
    \ifx\@let@token\reserved@d
      \let\reserved@c\reserved@a
    \else
      \let\reserved@c\reserved@b
    \fi
  \fi
  \reserved@c}
\def\:{\let\@sptoken= } \:  % this makes \@sptoken a space token
\def\:{\@xifnch} \expandafter\def\: {\futurelet\@let@token\@ifnch}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Displayed equations wrapper
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\@labEQ[#1]#2{\anchor{#1}$$#2\eqno(#1)$$\ignorespaces}
\def\@nonumEQ#1{$$#1$$\ignorespaces}%
\def\EQ{\@ifnextchar[{\@labEQ}{\@nonumEQ}}%
\def\eqref[#1]{\link[#1]{(#1)}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Proof
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\hproof[#1]{\medskip{\sl �������������� #1. }\ignorespaces}
\def\hlproof{\medskip{\sl ��������������. }\ignorespaces}%
\def\proof{\@ifnextchar[{\hproof}{\hlproof}}%
\def\proofend{\endmark\medskip}
\def\eproofend{\medskip}
%
\def\solution{\medskip{\sl �������. }\ignorespaces}
%
\def\leaf#1{\hbox{\vbox{\hrule\hbox{\vrule\kern1pt\vbox{\kern1pt\hbox{#1}\kern1pt}\kern1pt\vrule}\hrule}}}
\def\node#1{\hbox{$(#1)$}}
\def\elnode#1{\hbox{$<#1>$}}
\def\]{\leavevmode\hbox{\tt\char`\ }}
\def\roundit#1{(#1)}
\def\<#1>{\left\langle#1\right\rangle}
\def\upup{\mathop{\rm upup}\nolimits}
\def\dndn{\mathop{\rm dndn}\nolimits}
\def\lflf{\mathop{\rm lflf}\nolimits}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Special alignment for equations
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\eqalignrem#1{\null\,\vcenter{\openup1\jot
 \halign{\strut\hfil$\displaystyle{##}$&$\displaystyle{{}##}$\hfil&$\displaystyle{{}\rem{##}}$\hfil
      \crcr#1\crcr}}\,}
\def\displaynarrow#1{\null\,\vcenter{\openup1\jot
  \halign{$\hfil\displaystyle##\hfil$\crcr
    #1\crcr}}}
\def\eqalignter#1{\null\,\vcenter{\openup1\jot
 \halign{\strut\hfil$\displaystyle{##}$&$\displaystyle{{}##}$\hfil&$\displaystyle{{}##}$\hfil
      \crcr#1\crcr}}\,}
\def\twocoleqalign#1{\null\,\vcenter{\openup1\jot
 \halign{\strut\hfil$\displaystyle{##}$&$\displaystyle{{}##}\qquad$\hfil&\hfil$\displaystyle{##}$&$\displaystyle{{}##}$\hfil
      \crcr#1\crcr}}\,}
\def\displaylinesno#1{\displ@y \tabskip\centering
  \halign to\displaywidth{\hfil$\@lign\displaystyle{{}##}$\hfil\tabskip\centering
    &\llap{$\@lign##$}\tabskip\z@skip\crcr
    #1\crcr}}
%%%
\def\descrtable#1{
\setbox\tbox\vbox{\halign{##\bskip&\hbox to 0pt{\hss ## \hss}\cr#1}}
$$\vbox{\halign{##\bskip\hfil&\vtop{\advance\hsize by -\wd\tbox\noindent ##}\cr #1}}$$
}
\def\descralign#1{
\setbox\tbox\vbox{\halign{$\displaystyle{##{}}$&\hbox to 0pt{\hss ## \hss}\cr#1}}
\vbox{\halign{\strut\hfil$\displaystyle{##{}}$&\vtop{\advance\hsize by -\wd\tbox\noindent ##}\cr #1}}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Tableau
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newbox\cellbox
\newdimen\cellwd
\def\cell#1{\strut\bskip#1\hfil\bskip}
\def\measurecell#1{\setbox\cellbox=\hbox{\cell{#1}}\ifnum\wd\cellbox>\cellwd\global\cellwd=\wd\cellbox\else\relax\fi}
\def\tblout#1{\vcenter{\halign{\vrule\vbox{\hbox to\cellwd{\cell{##}}\hrule}\vrule&&\vbox{\hbox to\cellwd{\cell{##}}\hrule}\vrule\cr
\noalign{\hrule}
#1%
}}}
\def\tableau#1{
\offinterlineskip\cellwd=0pt
\setbox\tbox=\vbox{\halign{\vrule\measurecell{##}\vrule&&\measurecell{##}\vrule\cr#1}}
\ifmmode\tblout{#1}\else$\displaystyle\tblout{#1}$\fi
}
%
\def\revtblout#1{\vcenter{\halign{\vrule\vbox{\hrule\hbox to\cellwd{\cell{##}}}\vrule&&\vbox{\hrule\hbox to\cellwd{\cell{##}}}\vrule\cr
#1%
\noalign{\hrule}
}}}
\def\revtableau#1{
\offinterlineskip\cellwd=0pt
\setbox\tbox=\vbox{\halign{\vrule\measurecell{##}\vrule&&\measurecell{##}\vrule\cr#1}}
\ifmmode\revtblout{#1}\else$\displaystyle\revtblout{#1}$\fi
}
%%%
\def\fpaligncell#1#2#3{
 \vbox{\halign{
    \strut $##{}$&\hfil$##$&&\hfil$##$\hfil\cr
    U=&#1\cr
    V=&#2\cr
   \noalign{\hrule}
    W=&#3\cr
 }}
}

\def\fpalignex(#1)#2#3#4{{
 \boxit{
  \vbox{
    \halign{
     \hskip 0.5em ## \hskip 0.5em\cr
     \fpaligncell{#2}{#3}{#4}\cr
     \hfill\hbox{(#1)}\hfill\cr
    }
  }
 }
}}
%%%%%%%%%%%%%%%%%%%%%%
%%  TV scripts
%%%%%%%%%%%%%%%%%%%%%%
\def\tvscript#1.#2\body#3\endtvscript{{\bf #1.}#2\descrtable{#3}\par}
%\def\endtvscript{\egroup}
%% hide private macros
\catcode`\@=12
