  This paper studies a planning problem for supplying hot water in domestic
environment. Hereby, boilers (e.g. gas or electric boilers, heat pumps or
microCHPs) are used to heat water and store it for domestic demands. We
consider a simple boiler which is either turned on or turned off and is
connected to a buffer of limited capacity. The energy needed to run the boiler
has to be bought e.g. on a day-ahead market, so we are interested in a planning
which minimizes the cost to supply the boiler with energy in order to fulfill
the given heat demand. We present a greedy algorithm for this heating problem
whose time complexity is O(T {\alpha}(T )) where T is the number of time
intervals and {\alpha} is the inverse of Ackermann function.
