Brute Force

Refers to a programming style that does not include any shortcuts to improve performance, but instead relies on sheer computing power to try all possibilities until the solution to a problem is found. A classic example is the traveling salesman problem (TSP). Suppose a salesman needs to visit 10 cities across the country. How does one determine the order in which cities should be visited such that the total distance traveled is minimized? The brute force solution is simply to calculate the total distance for every possible route and then select the shortest one. This is not particularly efficient because it is possible to eliminate many possible routes through clever algorithms.

Although brute force programming is not particularly elegant, it does have a legitimate place in software engineering. Since brute force methods always return the correct result — albeit slowly — they are useful for testing the accuracy of faster algorithms. In addition, sometimes a particular problem can be solved so quickly with a brute force method that it doesn’t make sense to waste time devising a more elegant solution.

Webopedia Staff
Webopedia Staff
Since 1995, more than 100 tech experts and researchers have kept Webopedia’s definitions, articles, and study guides up to date. For more information on current editorial staff, please visit our About page.

Related Articles

ScalaHosting

ScalaHosting is a leading managed hosting provider that offers secure, scalable, and affordable cloud VPS solutions for businesses. It claims to change the status...

Data Visualization

Data visualization is the graphic representation of data so that analysts, readers, clients, and stakeholders can more easily see the implications of the raw...

RSA SecurID

RSA SecurID is multi-factor authentication (MFA) technology used to protect network resources, such as applications and websites. Its purpose is to mitigate risk and...

Logo

A logo is a symbol, mark, or other visual element that a company uses in place of or in conjunction with its business title....

ScalaHosting

ScalaHosting is a leading managed hosting provider that offers secure, scalable, and affordable...

HRIS

Human resources information system (HRIS) solutions help businesses manage multiple facets of their...

Best Managed Service Providers...

In today's business world, managed services are more critical than ever. They can...