Tuesday, July 21, 2020

Data Structures and Algorithmic Design

How does one apply algorithmic design and data structure techniques in developing structured programs anyway?

      Let’s start off here with a definition, “Algorithm is a step-by-step procedure, which defines a set of instructions to be executed in a certain order to get the desired output. Algorithms are generally created independent of underlying languages, i.e. an algorithm can be implemented in more than one programming language” (n.d.).  With that being said there are a few steps or categories to follow here while working on an algorithm design.  First there is search, sort, insert, update and delete.  In search we are “searching” for a particular item within the data structure.  Sort is when we want to sort items in a particular way, insert is simply inserting an item in that data structure, update is when we update an item within that data structure and obviously delete is when we remove an existing item(s) within the same data structure. 

     Once we work through all of that we then have certain characteristics of an algorithm.  Those characteristics are the following: Unambiguous, input, output, finiteness, feasibility and independence.  The algorithm should first be clear and unambiguous, the input is when it should have zero or more input types, the output is when it should have one or more well defined outputs and at least one should match.  Finiteness refers to an algorithm terminating after a finite number, feasibility is where they should be feasible with all available resources and independence referring to step by step directions and should be independent of any other programming code.   

     Now that we are clear on an algorithm let's look at the data structures side, “In the most general sense, a data structure is any data representation and its associated operations. Even an integer or floating-point number stored on the computer can be viewed as a simple data structure. More commonly, people use the term “data structure” to mean an organization or structuring for a collection of data items. A sorted list of integers stored in an array is an example of such a structuring” (Shaffer, 2013).  There are a few simple steps you can follow here as well.
  1. Analyze the problem to determine the basic operations 2.  Quantify the resource constraints for each operation 
    3.  Select the data structure that best meets these requirements  

Are some algorithms and data structure designs better than others? 

      No I don’t think that some algorithms and data structure designs are better than others really because I would say that it depends on your use case.  Right because if you need to work on a binary tree than you might also utilize an algorithm as well.  I would really say here that it depends on the project that you are doing and that no algorithm is any better to use than any other and the same goes for the data structures as well. 
  

Discuss in the post how you would apply algorithmic design and data structure techniques in developing structured programs. 

     Applying algorithmic design and data structure techniques would be that we could first start with the algorithmic design as far as the techniques we can look at in three ways: Implementation method, design method as well as some other Classifications.  Implementation, “Recursion or Iteration: A recursive algorithm is an algorithm which calls itself again and again until a base condition is achieved whereas iterative algorithms use loops and/or data structures like stacks, queues to solve any problem. Every recursive solution can be implemented as an iterative solution and vice versa” (2020).  Serial or parallel or distributed algorithms and exact or appropriateness.  Classifications are the greedy method, divide and conquer and dynamic programming.  Lastly the others are randomizers and classification by complexities.   
  
     Data structures can be defined as, “Data Structures are a specialized means of organizing and storing data in computers in such a way that we can perform operations on the stored data more efficiently” (Mallawaarachchi, 2020).  Some of the common data structures are arrays, linked lists, stacks, the queue, hash tables, trees, heaps and finally graphs.  With that being said I’ve also included a few videos as well. 

References 

(2020, April 14). Algorithms Design Techniques. Retrieved July 21, 2020, from https://www.geeksforgeeks.org/algorithms-design-techniques/ 

Data Structures - Algorithms Basics. (n.d.). Retrieved July 21, 2020, from https://www.tutorialspoint.com/data_structures_algorithms/algorithms_basics.htm 

Mallawaarachchi, V. (2020, May 07). 8 Common Data Structures every Programmer must know. Retrieved July 21, 2020, from https://towardsdatascience.com/8-common-data-structures-every-programmer-must-know-171acf6a1a42