# Add footnote right after the algorithm environment

I have the following minimal example. I would like to add a footnote right after the end of the algorithm. Could you please guide me on how I can add a footnote to the bottom of this algorithm?

Thank you very much for your time.

\documentclass[a4paper,11pt]{article}

\usepackage[fleqn]{amsmath}
\usepackage{graphicx}
\usepackage{subcaption}
\usepackage{geometry}
\newgeometry{vmargin={30mm}, hmargin={25mm,25mm}}
\usepackage{algpseudocode}
\usepackage{algorithm}
\usepackage{amssymb}

\begin{document}

\begin{algorithm}
\caption{The pseudo code of the proposed accelerated BDA}\label{Alg2}
\begin{algorithmic}[1]
\Statex Initiate the algorithm
\State $nPop \gets$ Size of population
\For {$n = 1:nPop$}
\State $x_{ijk}$ and $l_{ijk} \gets 0$ \: \: $\forall i,j \in \mathcal{N}; k \in \mathcal{V}$
\State $PC \gets$ All possible combinations of manufacturers and distributors
\While {further retailer can be possibly assigned to vehicles}
\State Randomly select a combination of manufacturer and distributor from $PC$
\State $i \gets$ the selected manufacturer, $j \gets$ the selected distributor and
\Statex $k \gets$ the first available vehicle of manufacturer $i$
\If {}
\EndIf
\EndWhile
\EndFor
\end{algorithmic}
\end{algorithm}

\end{document}

• Where is the footnote mark supposed to appear? – campa Sep 30 at 14:53
• I just want to add the footnote at the bottom of the algorithm. – Moosavi_69 Oct 1 at 0:22

I'm not sure if I understood you're question correct but a possible solution would be the following:

\documentclass[a4paper,11pt]{article}

\usepackage[fleqn]{amsmath}
\usepackage{graphicx}
\usepackage{subcaption}
\usepackage{geometry}
\newgeometry{vmargin={30mm}, hmargin={25mm,25mm}}
\usepackage{algpseudocode}
\usepackage{algorithm}
\usepackage{amssymb}

\begin{document}

\begin{algorithm}
\caption{The pseudo code of the proposed accelerated BDA}\label{Alg2}
\begin{algorithmic}[1]
\Statex Initiate the algorithm
\State $nPop \gets$ Size of population
\For {$n = 1:nPop$}
\State $x_{ijk}$ and $l_{ijk} \gets 0$ \: \: $\forall i,j \in \mathcal{N}; k \in \mathcal{V}$
\State $PC \gets$ All possible combinations of manufacturers and distributors
\While {further retailer can be possibly assigned to vehicles}
\State Randomly select a combination of manufacturer and distributor from $PC$
\State $i \gets$ the selected manufacturer, $j \gets$ the selected distributor and
\Statex $k \gets$ the first available vehicle of manufacturer $i$
\If {}
\EndIf
\EndWhile
\EndFor \footnotemark
\end{algorithmic}
\end{algorithm}
\footnotetext{Here you can write your text}
\end{document}