Difference between revisions of "Brute forcing"
(Replace) |
|||
Line 9: | Line 9: | ||
== See also == | == See also == | ||
− | + | * [[Casework]] | |
− | * [[ |
Revision as of 17:37, 28 September 2007
Brute forcing is generally accepted as the term for solving a problem in a roundabout, time-consuming, 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 . 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).