# Disable algorithm numbers for only certain algorithms in a document

I have the following MWE

\documentclass[runningheads]{llncs}

\usepackage{algorithm}
\usepackage{algorithmic}

\begin{document}

\begin{algorithm}[H]
\caption{BLAH}
\begin{algorithmic}[1]
\REQUIRE $Input$
\ENSURE $A$.
\STATE Set $A$
\end{algorithmic}
\end{algorithm}

\begin{algorithm}[H]
\renewcommand{\thealgorithm}{}
\floatname{algorithm}{Not an algorithm but want the layout}
\caption{BLEH}
\begin{algorithmic}[1]
\REQUIRE $Input$
\STATE Compute $B$
\end{algorithmic}
\end{algorithm}

\begin{algorithm}[H]
\caption{BLAH}
\begin{algorithmic}[1]
\REQUIRE $Input$
\STATE Compute $B$
\end{algorithmic}
\end{algorithm}

\end{document}


which produces this where the third entity is titled Algorithm 3 but I want it to be titled Algorithm 2. How do I achieve this?

EDIT I don't want to use any other algorithm environment.

Step down the counter:

\documentclass{article}

\usepackage{algorithm}
\usepackage{algorithmic}

\newcommand{\altcaption}[1]{%
\renewcommand\thealgorithm{\unskip}%
\floatname{algorithm}{#1}%
\caption
}

\begin{document}

\begin{algorithm}[H]
\caption{BLAH}
\begin{algorithmic}[1]
\REQUIRE $Input$
\ENSURE $A$.
\STATE Set $A$
\end{algorithmic}
\end{algorithm}

\begin{algorithm}[H]
\altcaption{Not an algorithm but want the layout}{BLEH}
\begin{algorithmic}[1]
\REQUIRE $Input$
\STATE Compute $B$
\end{algorithmic}
\end{algorithm}

\begin{algorithm}[H]
\caption{BLAH}
\begin{algorithmic}[1]
\REQUIRE $Input$
\STATE Compute $B$
\end{algorithmic}
\end{algorithm}

\end{document}


• @User525412790 I made a small change to remove the added space. – egreg Nov 27 '18 at 18:29
• What's the change? I don't see anything different. – Rudra Nov 27 '18 at 18:33
• @User525412790 \renewcommand\thealgorithm{\unskip} – egreg Nov 27 '18 at 18:36
• Oh I guess I saw the modified version directly. – Rudra Nov 27 '18 at 18:37