bounded distance calculation for tractability