Wednesday, January 8, 2025

CST370 - Week 1

 

CST370 - Design & Analysis of Algorithms

We are back from winter break and almost halfway into the program. I had the chance to rest and take care of some personal business.

The first module of this class is a review of discrete math and an introduction to Algorithms. Each lecture this week provides an example of a challenging puzzle and a strategy to solve the problem at hand. Each problem is presented with sets of input requiring specific outcomes. The idea here is to find the steps or instructions that satisfy the desired result. To calculate the Greatest Common Divisor (GCD) of two positive integers, we followed Euclid’s Algorithms by applying the following equation till the second number is zero.

gcd(m, n) = gcd(n, m mod n)

By definition, all steps of an algorithm must be unambiguous to provide a clear path to the solution. Pseudocode is used as a method to describe algorithms represented by selected notations.

The class covers several types of problems such as sorting, searching, geometric, and numerical. It is worth noting that I have learned from previous courses that sorting plays a vital role in efficiency, especially for searching large data structures. Additionally, a Graph is one type of problem that represents scenarios and applications like networks, delivery paths, navigation, and project management. A graph is mathematically expressed by two sets of vertices V and directed or undirected edges E (i.e., V = {a, b, c, d}, E = {(a, b), (b, c), (c, d), (d, a)}). The adjacency matrix and adjacency list are used to represent unweighted and weighted graphs.

Moreover, we touched on the fundamental data structure trees as a connected graph. Trees are structured to optimize search and sort data efficiently. BST or Binary Search Trees are useful for querying data efficiently and solving various computational problems.

The module introduces an analysis of algorithms represented by order of growth. We learned the eight categories to identify the efficiency of algorithms. The textbook refers to an analytical framework primarily focused on analyzing the time complexity of algorithms. The measuring unit of time relies on the basic operation, which is determined by the most time-consuming operation to the running time. In other words, we count how many times a basic operation ran for input n.

Finally, I have submitted the work of two simple programs written in Java and am waiting for any feedback on them. So far, is an excellent week, and I am excited to return to the usual routine.

 

No comments:

Post a Comment

CST462S - Final Week

Service Learning Journal Reflections This marks the final week of our Service Learning experience. Our team successfully completed the final...