  A Lax-Oleinik type explicit formula for 1D scalar balance laws has been
recently obtained for the pure initial value problem by Adimurthi et al. in
[1]. In this article, by introducing a suitable boundary functional, we
establish a Lax-Oleinik type formula for the initial boundary value problem.
For the pure initial value problem, the solution for the corresponding
Hamilton-Jacobi equation turns out to be the minimizer of a functional on the
set of curves known as h-curves. In the present situation, part of the h-curve
joining any two points in the quarter plane may cross the boundary $x = 0.$
This phenomenon breaks the simplicity of the minimization process through the
boundary functional compared to the case of conservation laws. Moreover, this
complicates the verification of the boundary condition in the sense of Bardos,
le Roux, and Nedelec [2]. To verify the boundary condition, the boundary points
are classified into three types depending on the structure of the minimizers at
those points. Finally, by introducing characteristic triangles, we construct
generalized characteristics and show that the explicit solution is entropy
admissible.
