I am not sure whether this is what you had in mind, I can delete this post otherwise.
\documentclass[]{article}
\usepackage{hyperref}
% https://tex.stackexchange.com/questions/78579/labelled-in-line-equation
\makeatletter
\newcommand*{\inlineequation}[2][]{%
\begingroup
% Put \refstepcounter at the beginning, because
% package `hyperref' sets the anchor here.
\refstepcounter{equation}%
\ifx\\#1\\%
\else
\label{#1}%
\fi
% prevent line breaks inside equation
\relpenalty=10000 %
\binoppenalty=10000 %
\ensuremath{%
% \displaystyle % larger fractions, ...
#2%
}%
~\@eqnnum
\endgroup
}
\makeatother
\begin{document}
A shortest $u_0-u_i$ path is $P_1:u_0,v_0,v_3,v_6,\cdots,v_i,u_i$ containing $i/3$
edges from $C_1$ and two edges from $M$. Length of $P_1$ is $(i+6)/2$ and maximum
of $P_1$ is for $i=3m/2$, i.e., \inlineequation[eq:inline]{\max\{|P_4|\} = (m+2)/2}\\
Now a reference to Eq.~(\ref{eq:inline}), which states that
\end{document}
eqnarray
, see tex.stackexchange.com/a/197/3929, (2) it will probably be very bad for the reader if the (1) is hidden as a part of the text, they will see it as a reference to an equation number they cannot find.