CST 370 Week 3

WELCOME TO WEEK 3 Learning Journal - CST 370 This week, we learned a lot. We started with Brute-Force String Matching , an algorithm that aligns the pattern against the first characters of the text and begins to match pairs of characters from left to right. It continues this process until there is either a match or, in the worst case, the pattern is not found in the text at all. The best case occurs when the first characters in the text immediately match the pattern. Next, we learned about Exhaustive Search and its application to three important problems. Exhaustive Search is simply a brute-force approach to combinatorial problems such as permutations, combinations, and subsets of a given set. The first problem we covered was the Traveling Salesman Problem , which involves finding the shortest path through a set of cities (visiting each city exactly once) and returning to the starting city. It is also described as the problem of finding the shortest Hamiltonian cycle. The...