CST 370 Week 3 Learning Journal Entry

Brute Force Design Techniques and Divide-and-Conquer This week, we learned about different exhaustive search algorithms that used a Brute-Force design technique. Exhaustive search algorithms consider every possible case before coming to a conclusion. The first algorithm discussed was the sequential search and matching algorithm. This algorithm was presented in the form of searching a string to find a pattern, such as the one below. In this algorithm, every character in a string is checked for the pattern until the end of the pattern is reached. The efficiency of this algorithm is dependent on the text and pattern. In the example below, there are 16 characters in the text and 4 characters in the pattern that we are looking for. Since we are considering all comparisons and cases, we should have 13 shifts and 52 comparisons. Another exhaustive search was conducted for combinatorics problems. An exhaustive search can be used to solve problems such as the Traveling Sa...