AoPSWiki
NEW! NEW! NEW!
Want to learn how to tackle those tough AMC/AIME/Olympiad algebra problems? Check out Art of Problem Solving's NEW Intermediate Algebra by Richard Rusczyk and Mathew Crawford. Over 1600 problems!
Personal tools

Brute forcing

From AoPSWiki

Brute forcing is generally accepted as the term for solving a problem in a roundabout, time-consuming, uncreative, and inconvenient method.


Given the problem "How many outfits can you create with thirteen hats and seven pairs of shoes?", a method involving brute force would be to list all 91 possibilities.

Another method of brute force is the Greedy Algorithm. As an example, given two sets and how can we maximize the sum of ? We sort the sets such that they are in increasing or decreasing order; then, the maximal sum is a_1b_1 + a_2b_2 + a_3b_3 + \ldots a_nb_n. The "greedy" part is when we maximize the sum each step by taking the largest possible term to add.

See the Rearrangement Inequality for consequences of the example (and a more formal proof).

See also

Want to learn how to tackle those tough AMC/AIME/Olympiad counting and probability problems? Check out Art of Problem Solving's NEW Intermediate Counting & Probability by David Patrick.
© Copyright 2008 AoPS Incorporated. All Rights Reserved. • FoundationPrivacyContact Us