As mentioned earlier, an algorithm is just a series of steps we use to solve a problem. What problem, well, it varies based upon the situation, but if we can break down a problem into small components that can be solved by a computer, then we can combine them into a larger complete algorithm.
Now there is often more than one way to solve a problem. We will pick, or derive, a solution based upon various factors such as our background and experience, limitations we’re working with, and the goals of the system.
Starting to Develop a Solution
When starting to build a program, it is often best to design backward. This is true not only in developing software, but in most situations.
Think: What is it that needs to be accomplished. By understanding the end goal, you can work backwards to see what is needed to create the process to generate the solution.
Benefit: This also allows you to compare the computed results with the intended results to determine if you got what you were wanting.
Process: By working backward you get to know what you expect, and then what you will need. If you don’t have what you need, you need to add those resources, or figure out how to compute them. If you cannot get them, then you know that you are working on something impossible and to stop.
Consider: A program to convert one temperature format into another format – like Celsius into Fahrenheit. However, if you convert it into Kelvin, even if it is correct, you are not doing what was intended.
Working within Limitations
Many algorithms need to work within limitations of the system. While we might think computer speed is a limitation, it still can be as the problems we work with are getting more and more complex.
However those are not the only potential limitations you can run into.
Processor
This includes both speed, and number of processors (core).
Bandwidth
This is typically data throughput. It can be network traffic, data coming to or going to a device (camera, printer, keyboard, etc). Long term storage is a big bandwidth issue. We’ve improved it immensely over the years, from tape, to hard drives (HDD), to solid state drives (SSD).
Storage
With long term storage, you not only have to worry about the speed of which you transfer data, but also how much data is
The largest (current) photo sits at 365 Gigapixels – this isn’t a normal file which can be easily processed. But neither can multi-gigabyte database files.
Memory (RAM)
Some algorithms work best by putting data into RAM. However, if RAM cannot hold the data, the system may not work, or may not work as well, and need to be broken into sections.
Accuracy
What if I told you not all algorithms are completely accurate.
Time
Now time isn’t a component that is a direct limitation you can take. However, an algorithm which takes too long to run, isn’t of value, and often we’ll need to come up with another way.
Could something have been done in the early 80s like the last video – no, because on those machines it wouldn’t be finished yet.
https://i.pinimg.com/originals/6f/71/52/6f71521475cbeff48885d713019c2f3b.jpg – Starship Trooper Bug Scene
We run into the same issue with encryption/decryption, compression tools, sorting tools, weather and other complex data modeling, and more.
Designing Algorithms – a High Level Overview was originally found on Access 2 Learn