Relationship between Distance and Cost