1. Computing
Send to a Friend via Email

Definition of Brute Force

By

Definition:

Brute force is a crude algorithm which works through every possible answer until the correct one is found. Some problems can be solved this way but others- for instance obtaining the prime factors of large numbers or picking the best chess move, have far too many possibilities to be solved that way except in simple cases.

For example, searching an unsorted array to find the location of a value can be done in an average of n/2 searches if there are n elements in the array, That's linear in Big-O Notation. But if you sort the array first and use a binary chop algorithm, then the search shortens to an average of Log2(n ) comparisons. An array of 1024 sorted values can be found in 10 comparisons or less.

Glossary:

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Examples:
Many entries in the Programming challenge #1 use a brute force approach.

©2014 About.com. All rights reserved.