Algorithms & Efficiency | AP CSP Daily Practice Day 14

Big Idea 3: Algorithms and Programming
Day 14 Practice - AP CSP Daily Question
[FOCUS] Algorithm Efficiency and Heuristics

Practice Question

A delivery company needs to find the shortest route to deliver packages to 15 different locations. Finding the optimal (best possible) route would require checking all possible orderings of the 15 locations.
Which of the following statements about this problem is TRUE?
What This Tests: Big Idea 3 covers algorithm efficiency, intractable problems, and when heuristic approaches are necessary.

Why B is Correct

This is the Traveling Salesperson Problem, a classic example of an intractable problem. With 15 locations, there are 15! (factorial) = over 1.3 trillion possible routes to check.

A heuristic is an approach that finds a "good enough" solution without guaranteeing the optimal answer. For this problem, heuristics like "nearest neighbor" (always go to the closest unvisited location) can find reasonable routes very quickly.

Why Other Answers Are Wrong

A is wrong: 15! is enormous

While 15 seems small, 15 factorial equals 1,307,674,368,000 routes. Even checking 1 million routes per second would take over 15 days.

C is wrong: Growth is factorial, not linear

Adding one location multiplies the possibilities by (n+1). Going from 15 to 16 locations increases routes by 16x, not by a fixed amount.

D is wrong: Parallel computing does not reduce the problem size

Parallel computing can check routes faster, but the total number of routes remains the same. You still need to check 1.3 trillion routes (just faster).

[TIP] AP Exam Strategy

Problems with factorial or exponential growth are called "intractable" - they cannot be solved optimally in reasonable time. The AP exam expects you to recognize when heuristics are the practical solution.

Completed the 14-Day Rotation!

Great job finishing all 14 practice questions. The rotation starts again tomorrow!

Book Tutoring View All Questions
Back to blog

Leave a comment

Please note, comments need to be approved before they are published.