1-Brute Force Algorithm
What is it: A brute force algorithm solves a problem through exhaustion: it goes through all possible choices until a solution is found.
Who Invented:1977: First major publication about a brute-force attack on DES by Whitfield Diffie (Special Feature Exhaustive Cryptanalysis of the NBS Data Encryption Standard)
Time Complexity:The time complexity of a brute force algorithm is often proportional to the input size. Brute force algorithms are simple and consistent, but very slow.
Where to used:Brute-force search is typically used when the problem size is limited, or when there are problem-specific heuristics that can be used to reduce the set of candidate solutions to a manageable size.
Application of Brute Force Algorithm:The most common applications for brute force attacks are cracking passwords and cracking encryption keys (keep reading to learn more about encryption keys).
Pros:
- The brute force approach is a guaranteed way to find the correct solution by listing all the possible candidate solutions for the problem.
- It is a generic method and not limited to any specific domain of problems.
- The brute force method is ideal for solving small and simpler problems.
- It is known for its simplicity and can serve as a comparison benchmark.
Cons:
The brute force approach is inefficient. For real-time problems, algorithm analysis often goes above the O(N!) order of growth.
This method relies more on compromising the power of a computer system for solving a problem than on a good algorithm design.
Brute force algorithms are slow.
Brute force algorithms are not constructive or creative compared to algorithms that are constructed using some other design paradigms.
No comments:
Post a Comment