Cañete Discussion 1
Cañete Discussion 1
GRADUATE PROGRAM
MCSCC 123-MSCS12G1 - Advanced Data Structures and Algorithms
Prelim Period
Name: Date:
Program/Section: Instructor: Asst. Prof. Karren V. de Lara
Activity Title: Algorithm Concepts
Data structures can be categorized into two main types: Linear and Non Linear
Data Structures. In linear data structures, the elements are arranged in sequence one
after the other. Since elements are arranged in particular order, they are easy to
implement. However, when the complexity of the program increases, the linear data
structures might not be the best choice because of operational complexities. Examples
include array, stack, queue, and linked list.
Unlike linear data structures, elements in nonlinear data structures are not in any
sequence. They are arranged in a hierarchical manner where one element will be
connected to one or more elements instead. Some of the popular and best examples of
nonlinear data structures are binary search trees and graphs.
Linear and nonlinear data structures can also be differentiated by their time
complexities and how the items are arranged in layer/s. With regards to the time
complexities, linear data structures’ time complexity increases with data size, while
nonlinear data structures’ time complexity remains the same. In addition, all items are
presented on a single layer in linear data structures, while in nonlinear data structures,
the data items are presented at different layers.
1. Brute Force Algorithm - in this algorithm, all possible solutions are systematically
checked to find the correct one. While easy to implement, brute force algorithms can be
inefficient for large data sets. Example: Linear Search, where an element is searched by
checking each item one by one. This algorithm is also considered as the simplest
approach to problem-solving.
2. Recursive Algorithm - This algorithm is purely based on recursion. In this, a problem is
solved by breaking it into subproblems of the same type and calling own self again until
the problem is solved. This includes some well known algorithms like Divide and
Conquer Algorithms and Greedy Algorithms.
3. Randomized Algorithm - In this algorithm, random numbers are utilized to decide the
expected outcome. These algorithms are particularly useful when deterministic solutions
are slow or infeasible. Some common problems that can be solved through the
Randomized Algorithm are Quicksort: In Quicksort we use the random number for
selecting the pivot.
5. Searching Algorithm - This is used for searching the specific key in a particular sorted
or unsorted data. This is also an essential tool used to locate specific items within a
collection of data. These algorithms are designed to efficiently navigate through data
structures to find the desired information. Binary search or linear search are examples of
this algorithm.
6. Hashing Algorithm - This algorithm works the same as the Searching algorithm but it
contains an index with a key ID or a key-value pair. In hashing, we assign a key to
specific data. Some common problems can be solved through the Hashing Algorithm in
password verification.
Algorithms play a big role in different areas of computing by making tasks faster,
more efficient, and automated. In data processing, algorithms help sort, search, and
analyze large amounts of information quickly, which is important for businesses and
research. In artificial intelligence and machine learning, algorithms help computers learn
from data and make smart decisions.
In cybersecurity, encryption algorithms protect sensitive information from
hackers. Computer graphics use algorithms to create realistic images and animations in
video games and movies. In networking, algorithms help manage internet traffic,
ensuring smooth communication between devices. Even in everyday applications like
online shopping and social media, algorithms personalize content and improve user
experience. Without algorithms, computers would struggle to perform complex tasks
efficiently.
4. Can you provide an example of a well-known algorithm?
There are a lot of well-known and commonly used algorithms out there but I will
be choosing Dijkstra’s Algorithm which is used to find the shortest path between points
in a graph. This algorithm has so many real world applications like in GPS navigation
systems, network routing, and even in video games to help characters find the fastest
route.