Skip to main content

Applying Algorithmic Design & Data Structure Techniques

   This week's resource article describes an algorithm as, "a procedure that you can write as a C function or program, or any other language. An algorithm states explicitly how the data will be manipulated." (Complexity Analysis, n.d.). 

  The length of time a program takes to complete a given task depends on its algorithm. The algorithm deals with how data is organized and how it is accessed. The biggest considerations for creating applications are time complexity and space complexity. 

   With time complexity, this refers to the number of operations needed and the time it takes it takes for them to run. This is typically measured in milliseconds. Operations are typically: 'compare', 'swap', 'fetch from memory' and 'send to memory'. While each operation takes only a small amount of time; the number of operations that are necessary grow exponentially. As the list of operations grows, so too does the time it takes for them to be enacted. 

   Space complexity refers to the space or memory an algorithm uses to solve a problem. Exponential growth doesn't occur with space complexity, as it does with time complexity.  As an algorithm uses more data, space may be freed up with each computer cycle or keep growing. Running out of memory is something that may occur and must be accounted for. 

   "Big O notations" or algebraic calculations ultimately determine if time grows by a number equal to the input or if there is an exponential growth in time as input increases. This can also be used to determine if memory usage remains constant or continues to grow with data input.

Are some algorithms and data structure designs better than others? 

   Algorithms should be selected based on the type of input that is being received. Selecting the appropriate algorithm will have varying effects on performance. With the example of a binary search algorithm, this is an algorithm that should only be used on data that is, or can be, sorted. This refers to when we have a list of sorted numbers and are looking for a specific number. In this scenario, a binary search is more beneficial and faster than a linear search or sequential search. 

Developing The Application

   When software developers are building a structured program, it is important to scope the project. To know exactly what the purpose will be. Once we clearly define the problem, we can then measure the constraints such as input size, output format and whether or not there are limitations. When that is known, we can then choose an algorithm that best suits this need. Trail and error is the next phase of the process. Testing the algorithm with different inputs will ensure that it works as predicted.  


Michael Streat 

Works Cited:

Complexity analysisLinks to an external site.. (n.d.). Retrieved from http://www.cs.utexas.edu/users/djimenez/utsa/cs1723/lecture2.html


Comments

Popular posts from this blog

Tech Topic Connection

                 The tech topic I chose was the fascinating and growing world of mobile applications. The biggest reason behind this is because of the vast potential mobile applications, or apps, possess. The website emizentech.com reviewed a Statista report indicating “there are about 7.1 billion app users worldwide,” and that, “global revenue is expected to reach $808 billion in 2022,” (EmizenTech, 2022). This is a burgeoning industry that is only expected to grow in the coming years.     Apps translate, “communication efforts into interactive customer experiences heightening cognitive, emotional, emotional, and behavioral responses,” (Kim & Yu, 2016). The world is now more connected than ever before. Through certain apps, individuals have the capabilities of crossing geographical boundaries and allows us to communicate with anyone who also uses the app and has an internet connection.    I use my smartphone ever...

Network Security

    With the advent of computers and the internet, so too came the invention of harmful scams. These malicious entities have become more and more prevalent since the turn of the century and exist in various forms. From existing in different types of computer viruses, spam emails, phishing, and Denial of Service (DoS) attacks there are a multitude of ways for user’s personal information to be accessed and disseminated without knowledge or consent.               During week 3 of our course we learned about ping commands and even practiced using these to access different websites. This week’s venture into security took the concept even further by revealing how one can use ping commands in a negative and harmful way in the form of Denial of Service (DoS) attacks. These types of security breaches require no hacking of any kind, nor does it involve the installation of any type of malicious software which is also known ...

Traveling Through a Network

  Hi World,        Ping Command Activity – This was a great exercise that highlighted how ping commands work in a hands-on way. I enjoy being able to play around with topics we are learning about. Here are the screenshots of my ping results. The two other websites beyond google was the official Australian government response website: Australian.gov.au and the official website of the government of Japan: Japan.go.jp         I was rather shocked to see that the ping to Japan was the quickest when compared to google and the Australian website! The average speed for Japan was 24.025 ms (milliseconds). Google’s average speed was 24.474 ms and the Australian site’s average was 188.582 ms. Given how far away those countries were I expected them to take longer because there is so much more distance that needs to be traversed. Given that the Australian ping took the longest was expected, but the fact google sits in the middle is a surpr...