Finding Counterexamples

Exercise 1-1

Show that can be less than .

This occurs if . For example, take and . This gives us

and

Exercise 1-2

Show that can be less than .

This occurs if and . For example, and gives:

and

Exercise 1-3

Design/draw a road network with two points and such that the fastest route between and is not the shortest route.

We can have:

  • Path 1: to directly is short but slow
  • Path 2: to through some other point is longer but faster.

For example, Path 1 can be 30 km with a speed limit of 30 km/h. Then, the travel time would be:

Path 2 is longer at 60km but with a speed limit of 120 km/h. Then, the travel time would be:

Exercise 1-4

Design/draw a road network with two points and such that the shortest route between and is not the route with the fewest turns.

Just a short route with a lot of turns.

Proofs of Correctness

Induction

Estimation

Implementation Projects

Interview Problems

LeetCode

HackerRank

Programming Challenges