How to Apply Algorithmic Design and Data Structure Techniques in Developing Structured Programs

     


An 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. Output. Algorithms are generally created independent of underlying languages, i.e., an algorithm can be implemented in more than one programming language. From the data structure point of view, the following are some important categories of algorithms. 

  • Search − Algorithm to search an item in a data structure. 
  • Sort − Algorithm to sort items in a certain order.
  • Insert − Algorithm to insert an item in a data structure.
  • Update − Algorithm to update an existing item in a data structure. 
  • Delete − Algorithm to delete an existing item from a data structure. Characteristics of an Algorithm

Not all procedures can be called an algorithm. Algorithm. An algorithm should have the following characteristics. –

  • Unambiguous − The algorithm Algorithm should be clear and unambiguous. Unambiguous. Each step (or phase) and their inputs/outputs should be clear and lead to only one meaning.
  • Input − An algorithm should have 0 or more well-defined inputs.
  • Output − An algorithm should have 1 or more well-defined outputs, outputs and should match the desired output.
  • Finiteness − Algorithms must terminate after a finite number of steps.
  • Feasibility − Should be feasible with the available resources.
  • Independent − An algorithm should have step-by-step p-by-step directions, directions, which should be independent of any programming code.




    How to Write an Algorithm? There are no well-defined l-defined standard standards for writing algorithms. Algorithms. Rather, it is a problem and resource resource-dependent. Algorithms are never written to support a particular programming code. As we know that all programming languages share basic code construct constructs like loops (do, for, while), while), flow-control (if-else), etc. These common constructs can be used to write an algorithm. We write algorithm algorithms in a step-by-step manner, but it is not always the case. Algorithm writing is a process and is executed after the problem domain is well-defined. Well-defined. That is, we should know the problem domain for which we are designing a solution.


Example Let's try to learn algorithm-writing by using an example. 
Problem − Design an algorithm to add two numbers and display the result. 
  1. − START 
  2. − declare three integers a, b & c 
  3. − define values of a & b 
  4. − add values of a & b 
  5. − store output of step 4 to c 
  6. − print c 
  7. − STOP 
Algorithms tell the programmers how to code the program. Program. Alternatively, Alternatively, the algorithm can be written as
  1. − START ADD 
  2. − get values of a & b 
  3. − c ← a + b 
  4. − display c 
  5. − STOP 
In the design and analysis of algorithms, algorithms, usually, the second method is used to describe an algorithm. Algorithm. It makes it easy for the analyst to analyze the algorithm ignoring all unwanted definitions. Definitions. He can observe what operations are being used and how the process is flowing.



We design an algorithm to get a solution to a given problem. Problem. A problem can be solved in more than one .way
Hence, many solution algorithms can be derived for a given problem. Problem. The next step is to analyze analyze those proposed solution algorithms and implement the best suitable solution.




Are some algorithms and data structure designs better than others?

Most geometric data structures designed to manipulate data sets in dimensional space use linear, almost linear, or O(n log n) words of space. Asymptotically, O(n) - space structure occupies less space than other solutions, but the constants hidden in the asymptotic space bounds are usually large. Succinct data structures have been used to design more space-efficient solutions to geometric query problems.

Initially proposed by Jacobson to represent a combinational object such as bit Vectors, trees, and graphs, the research in succinct data structures aims at designing data structures that can represent the given data using space close to the information-theoretic lower bound and support efficient navigational operations in them.

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

As I mentioned early, all computers rely on fundamental data structure and algorithms, so understanding them better makes you understand the computer better. Every program occupies some space and takes some time to execute. 

Points that can help us evaluate the proposed program designs:
  • As the design stage involves taking the specification and designing solutions to the problems, the designer needs to adopt a design strategy.
  • Also, while developing a solution strategy is that it should work correctly in all conditions.
  • The people who use the system are not aware of the program design you have adopted. Thus, there is a system manual which is a detailed guide to how the design was achieved.
  • A large program should be divided into small modules and submodules by following two decomposition approaches - the top-down or bottom-up approach.
  • Other important criteria by which a program can be judged are execution time or storage requirement.








References

Mehlhom, K. (2013). Data structures and algorithms 1: Sorting and searching. Retrieved from
 https://books.google.com/books?isbn=3642696724

Singhal, S. (2018). Analysis and design of algorithms. Retrieved from
 https://books.google.com/books?isbn=9386551896

Lysecky, R., Vahid, F., Lysecky, S., & Givargis, T. (2015). Data structures essentials. Retrieved from https://zybooks.zyante.com/#/zybook/DataStructuresEssentialsR25/chapter/1/section/3

Shaffer, C. A. (2013). Data structures and algorithm analysis (3.2 ed.). Retrieved from http://people.cs.vt.edu/~shaffer/Book/JAVA3elatest.pdf


Comments