# Algorithm Caption

I want algorithm to NOT show the number in caption. How can i do that? Below is the code:

\begin{algorithm}
\begin{algorithmic}
\caption{ My Algorithm}
\IF
\ELSE
\end{algorithmic}
\end{algorithm}


-
Since you have some responses below that seem to answer your question, please consider marking one of them as ‘Accepted’ by clicking on the tickmark below their vote count (see How do you accept an answer?). This shows which answer helped you most, and it assigns reputation points to the author of the answer (and to you!). It's part of this site's idea to identify good questions and answers through upvotes and acceptance of answers. –  Jubobs Apr 2 at 22:14

If this is for just one algorithm environment, you can locally redefine \thealgorithm:

\documentclass{article}
\usepackage{algorithmic,algorithm}

\begin{document}

\begin{algorithm}
\renewcommand\thealgorithm{}
\caption{A numberless algorithm}
\begin{algorithmic}
\STATE do something
\end{algorithmic}
\end{algorithm}

\end{document}


If you want this to be the global behaviour, you can add

\renewcommand\thealgorithm{}


to the preamble.

Another option is to use the caption package and declare a new label format for algorithms, suppressing the numbering:

\documentclass{article}
\usepackage{algorithmic,algorithm}
\usepackage{caption}

\makeatletter
\DeclareCaptionLabelFormat{numberless}{\ALG@name#1}
\captionsetup[algorithm]{labelformat=numberless}
\makeatother

\begin{document}

\begin{algorithm}
\caption{A numberless algorithm}
\begin{algorithmic}
\STATE do something
\end{algorithmic}
\end{algorithm}

\end{document}


-