Chengwei LEI, Ph.D.    Associate Professor

Department of Computer and Electrical Engineering and Computer Science
California State University, Bakersfield

 

Brute Force and Exhaustive Search

 


 

Brute Force is a straightforward approach, usually based directly on the problem’s statement and definitions of the concepts involved.


pattern: a string of m characters to search for
text: a (long) string of n characters to search in
matching: a fully match for all the characters
comparison: compare 2 characters (positive or negative result)

 

Answer



A brute force solution to a problem involving search for an element with a special property, usually among combinatorial objects such as permutations, combinations, or subsets of a set.


 

 

Examples

 

 


Examples