  We start with formulation of the generalized Fermat's principle for light
propagation in a curved spacetime. We apply Pontryagin's minimum principle of
the optimal control theory and obtain an effective Hamiltonian for null
geodesics in a curved spacetime. We explicitly demonstrate that dynamical
equations for this Hamiltonian correctly reproduce null geodesic equations.
Other forms of the action for light rays in a curved spacetime are also
discussed.
