Solving Related Two-and Three-Dimensional Linear Programming Problems in Logarithmic Time