  In this paper, we address the problem of finding the best ergodic or Birkhoff
averages in the ergodic theorem to ensure rapid convergence to a desired value,
using graph filters. Our approach begins by representing a function on the
state space as a graph signal, where the (directed) graph is formed by the
transition probabilities of a reversible Markov chain. We introduce a concept
of graph variation, enabling the definition of the graph Fourier transform for
graph signals on this directed graph. Viewing the iteration in the ergodic
theorem as a graph filter, we recognize its non-optimality and propose three
optimization problems aimed at determining optimal graph filters. These
optimization problems yield the Bernstein, Chebyshev, and Legendre filters.
Numerical testing reveals that while the Bernstein filter performs slightly
better than the traditional ergodic average, the Chebyshev and Legendre filters
significantly outperform the ergodic average, demonstrating rapid convergence
to the desired value.
