%%%%%%%%%%%%%%%%%%%%%%% file template.tex %%%%%%%%%%%%%%%%%%%%%%%%%
%
% This is a general template file for the LaTeX package SVJour3
% for Springer journals.          Springer Heidelberg 2010/09/16
%
% Copy it to a new file with a new name and use it as the basis
% for your article. Delete % signs as needed.
%
% This template includes a few options for different layouts and
% content for various journals. Please consult a previous issue of
% your journal as needed.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% First comes an example EPS file -- just ignore it and
% proceed on the \documentclass line
% your LaTeX will extract the file if required
\begin{filecontents*}{example.eps}
%!PS-Adobe-3.0 EPSF-3.0
%%BoundingBox: 19 19 221 221
%%CreationDate: Mon Sep 29 1997
%%Creator: programmed by hand (JK)
%%EndComments
gsave
newpath
  20 20 moveto
  20 220 lineto
  220 220 lineto
  220 20 lineto
closepath
2 setlinewidth
gsave
  .4 setgray fill
grestore
stroke
grestore
\end{filecontents*}

%%%%%%%%%%%%%%%%%%%%%

\def\I{\mathcal{I}}
\def\kk{\mathbb{K}}
\def\R{\mathcal{R}}
\def\S{\mathcal{S}}
\def\F{F}
\def\L{L}
%%%%%%%%%%%%%%%%%%%%%%%%

\RequirePackage{fix-cm}
%
%\documentclass{svjour3}                     % onecolumn (standard format)
%\documentclass[smallcondensed]{svjour3}     % onecolumn (ditto)
\documentclass[smallextended]{svjour3}       % onecolumn (second format)
%\documentclass[twocolumn]{svjour3}          % twocolumn
%
\smartqed  % flush right qed marks, e.g. at end of proof
%
\usepackage{graphicx}
%
% \usepackage{mathptmx}      % use Times fonts if available on your TeX system
%
% insert here the call for the packages your document requires
\usepackage{amsmath}
\usepackage{amssymb}
%\usepackage{algorithm}
\usepackage{algorithmic}
\usepackage[linesnumbered,boxed]{algorithm2e}
\newtheorem{notation}[theorem]{Notation}

%
% please place your own definitions here and don't use \def but
% \newcommand{}{}
%
\begin{document}

%\SetAlCapSkip{12pt}
\begin{algorithm}[H]
\caption{{\sc Buchberger}}
\label{al1}
%\begin{algorithmic}[1]
    {\bf Input}: {$\F=\{f_{1},\dots, f_{t}\}$; a finite set of polynomials and $ \prec $; a monomial ordering}\;
    {\bf Output}: $ G$; a Gr\"obner basis for $ \langle F\rangle $\;
    $ G\leftarrow F,\; T\leftarrow\emptyset, \; B\leftarrow\lbrace \lbrace f_{i},f_{j}\rbrace : f_{i}, f_{j}\in F,\ i\neq j\rbrace $\;
    \While{$B\neq \emptyset$}{
        select and remove $\lbrace f_{i},f_{j}\rbrace$ from $B$\;
        %\STATE {let $\mathrm{Spoly}(f_{i},f_{j}):=m_{ji}f_{i}-m_{ij}f_{j}$}
        $S(f_{i},f_{j})\leftarrow \sum_{i=1}^{t} q_i f_i +r $ using the division algorithm\;
        \If{$r\neq 0$}{
            $ f_{t+1}\leftarrow r,\; G\leftarrow G \cup \lbrace f_{t+1} \rbrace $\;
            $ B\leftarrow B\cup \lbrace \lbrace f_{i},f_{t+1}\rbrace : i=1, \ldots, t \rbrace, \; t\leftarrow t+1$\;
        }
    }
    {\bf Return} $(G)$
%\end{algorithmic}
\end{algorithm}

\end{document}


