Answering a question raised by Dudek and Pra\l{ }at, we show that if $pn\rightarrow \infty$, w.h.p.,~whenever $G=G(n,p)$ is $2$-coloured, there exists a monochromatic path of length $n(2/3+o(1))$. This result is optimal in the sense that $2/3$ cannot be replaced by a larger constant. As part of the proof we obtain the following result which may be of independent interest. We show that given a graph $G$ on $n$ vertices with at least $(1-\epsilon)\binom{ n}{ 2}$ edges, whenever $G$ is $2$-edge-coloured, there is a monochromatic path of length at least $(2/3-100\sqrt{ \epsilon})n$. This is an extension of the classical result by Gerencs\'er and Gy\'arf\'as which says that whenever $K_n$ is $2$-coloured there is a monochromatic path of length at least $2n/3$.
Categories: math.CO