The Sturm-Liouville difference problem