# Understanding polyline in AI

Solution for Understanding polyline in AI
is Given Below:

While using a computer display, polylines are used. You want to use an algorithm which will reduce points in the polyline. The polyline should be decimated within a specified tolerance. Which of the following algorithm would you use?

A) Flood fill Algorithm

B) Lee Algorithm

C) Floyd’s Cycle Detection Algorithm

D) Vertex Reduction

First of all this has nothing to do with artificial intelligence. All of the mentioned algorithms are algorithms that solve some sort of graph related problem. Simplified they can be describes as follows:

• Flood fill is an algorithm that “colors” an arbitrarily shaped region in a “maze” together
• Lee’s algorithm finds the best path between two points through a “maze” with obstacles
• Cycle Detection algorithms find cycles (a non-trivial path where the start is also the end)
• Vertex reduction algorithms remove vertices from a graph such that the graph still stays in it’s original shape but with fewer features.

The answer to the problem should therefore be obvious 😉