Design and Algorithm Analysis Overview
Edited by TheGuyLoveNY, Jen Moreau
- 1 Overview:
- 2 Significance:
- 3 Logic:
- 4 Algorithms:
- 5 Computer Memory:
- 6 Algorithm Analysis:
- 7 This article is part of a series on 'Design and Algorithm Analysis'. Read the full series here:
- 8 Referencing this Article
- 9 Comments
In this subject we start off by making an Algorithm of any problem. An algorithm is nothing but a step by step procedure to solve a specific problem. These problems are any real world problems that are solved by a computer using a software. After the algorithm has been designed we start analyzing the algorithm. The analyzing phase is where we make our algorithm more efficient and better. Not only we make it better but also we find quality attributes in our algorithms. We test our algorithm's performance by two aspects : Performance by space, Performance by time. Performance by space refers to the speed gained in terms of Memory. In Software designing, Memory is crucial. On the flip side, Performance by time signifies how much time a software takes to execute in terms of milliseconds.
From user's perspective, software may look very easy and user-friendly but from the developer's perspective it actually is very intricate and complex. Algorithm plays a very critical role of designing these intricate software in very efficient and smart manner. Without algorithms it becomes extremely difficult to keep track of your programs which ultimately slows down the software development process. Algorithms are the backbones of the software. Once this algorithm is built, the developers analyse this algorithm to make it even better. Then finally they move on to the actual designing of the software.
A logic in computer science is a technique applied to solve problems. An algorithm and a logic are two different things even though they both are used to solve a problem. A logic is used to solve only one particular problem. However, an algorithm is a collection of logics that together solves a big problem. Think of any problem as a collection of sub-problem. Any problem that we have in our daily life can be a collection of problems. For example: Buying a pizza. Here the main problem or task is buying a pizza. This problem can be broken into many subproblems such as
- 1Go to the pizza shopAdvertisement
- 2Choose from various pizza.
- 3Order a pizza and wait.
- 4Eat the pizza.
A computer breaks down any problem into subproblems like above and then it uses bunch of logics to solve these problems. The better the logic the faster the software would be. So if we recall the example above, The other or more efficient way of buying a pizza is to order the pizza online. That way anyone can save extra bucks which would be otherwise wasted on travelling or gas if one has a car. So the better the logic the better and efficient the program will be.
The world "Algorithm" was originated from the name of 9th-century Persian Muslim mathematician Abu Abdullah Muhammad ibn Musa Al-Khwarizmi. Originally, the word "Algorism" referred to the rules of performing arithmetic using Hindu-Arabic numerals but the translation of Al-Khwarizmi's name into Algorithm by the 18th Century. Later, the use of the word evolved to include definite procedures to solve problems or tasks.
An algorithm is any well-defined computational procedure that takes a value or a set of values an input, perform various operations on those input values and produces the out value or set of values.
An algorithm is thus a sequence of computational steps that processes set of input values by performing various arithmetic or logical operations on these inputs. Hence, producing the output. Any algorithm is independent of any programming language, meaning the algorithm that was designed for a program will work regardless of any programming language. Basically, an algorithm is just a planned steps that are to be taken. Whereas, programming languages are the tools that help developer accomplish those steps. So the algorithm does not depend on either programming language or a compiler. Performance of the algorithm is high if and when the algorithm is independent in any case, i.e: it is not dependent on any external criteria. However, the following criteria play a huge role in deciding the performance of any algorithm:
- 1Running Time.
- 2Memory Allocation.
Running Time: A Run time is a threshold that indicates how much time a program is taking to execute. Today's computer is faster than ever before, they can run almost any program in a matter of seconds. But it is very important for embedded systems which have very low processing speed. Running speed plays such an important role that it can make or break a software. Running time should be as low as possible.
Memory Allocation: This is yet another key factor that decides how fast an algorithm is. Memory Allocation is the process of taking computer memory to perform some operations. These memory are used by computer to remember things much like a human. Back in the old days computer use to have way low memory around 512KB and designing a software for take type of computer was a big deal and this "Memory Allocation" factor was the most considered factor. Even today it is an issue for any device with low memory. Hence the lesser the memory allocated by application, the better.
Computer memory is a huge block of cells that are used by computers to save information. This information is then retrieved from the computer memory whenever the computer needs it. Each cell in a computer memory holds a unique address that a computer uses to access information from the memory. We as a programmer have access to memories so that we can instruct computer where to save data and how to smartly use those data. The computer memory is categorized into volatile memory and nonvolatile memory. Once the designed algorithm is converted a program by coding it is actually stored in the computer memory and when this program is executed, the program is brought forth to primary memory also known as RAM. All the processes that are to be executed are moved from secondary memory known as the Hard drive to the main memory i.e RAM. All the variables that are to be used in the program are stored in Cache memory.
RAM Model: RAM which stands for Random Access Memory is a volatile memory meaning the information stored in that memory section remains there even after the computer is turned off. RAM is used when CPU starts executing a particular program. CPU first transfer the program to the RAM and then it starts executing. RAM is further classified into types such as SRAM, DRAM.
Cache Memory: Cache memory is the fastest memory in a computer system and it is now available to the software. It is relatively smaller in size and it is used for faster operations when a task with higher priorities have to be dealt with. Each process has it's own logical address. This logical address is generated by CPU and It is assigned to the processes. Each processes have unique address. These unique address is stored in a page table which not only stores the address location of a process and also stores a lot of useful information.
Random Access Machine:
A RAM or Random Access Machine is an Idealized machine. This Idealized machine has a very large amount of Random Access Memory (RAM). It is very similar to the counter machine. A counter machine is an abstract machine that is used to model computation by forming logic and it is used along with theoretical computer science. Random access machine should not be confused with Random access memory. One is an abstract machine with a very large random access memory while the latter is a computer memory that is used to store information by the computer. Once the algorithm is created it can be tested on RAM to get the idea of how the algorithm performs and make changes accordingly. Each Instruction is executed one by one. Instructions involve operations that include two basic values.
Memory Management Unit (MMU):
A memory management unit is a Hardware unit which is sometimes also called as Paged Memory Management Unit (PMMU). This hardware unit is used to convert Logical Addresses to Physical Addresses. MMU primarily performs Virtual Memory Management at the same time Protecting memory for misuse, Controlling cache memory, Bus control and Bus arbitration. MMU is one of the vital Hardware unit that is used along with CPU. Sometimes it can also work separately.
Random Access Memory (RAM):
Random Access Memory or RAM is a computer memory which is used to store active or frequently active software, programs or even data. When a program is being executed, CPU brings that program from secondary memory to primary memory (RAM) to perform various operation on the program. CPU also uses RAM to store frequent program so that whenever user tries to open an application it quickly opens up than most rarely used programs. RAM is further categorized into two class: SRAM or Static Random Access Memory and DRAM or Dynamic Random Access Memory. The RAM size a computer has the faster the computer will handle multiple applications.
Program Counter (PC):
Program Counter (PC) is a special register that indicates where the computer is at in the address space. Since there are loads of programs that are executed at the same time, it is difficult to keep track of the CPU. The Program counter is a very small memory (Register) which holds the address of the instruction which is currently being executed. Whenever a CPU jumps from one program to another, PC keep track of all the address location the CPU is at. When the program is being executed, after each line of instruction the program counter increments itself. Hence the name Counter.
Different Instructions : x = y; z=a+b; z=a-b; z=w;
Here, All the Instruction are Arithmetic instructions followed by assignment instruction. Meaning, The compiler will first perform addition (2nd Example), and then will assign the result of those to values to the third variable name z.
This article is part of a series on 'Design and Algorithm Analysis'. Read the full series here:
Referencing this Article
If you need to reference this article in your work, you can copy-paste the following depending on your required format:
APA (American Psychological Association)
Design and Algorithm Analysis Overview. (2017). In ScienceAid. Retrieved Jul 22, 2018, from https://scienceaid.net/Design_and_Algorithm_Analysis_Overview
MLA (Modern Language Association) "Design and Algorithm Analysis Overview." ScienceAid, scienceaid.net/Design_and_Algorithm_Analysis_Overview Accessed 22 Jul 2018.
Chicago / Turabian ScienceAid.net. "Design and Algorithm Analysis Overview." Accessed Jul 22, 2018. https://scienceaid.net/Design_and_Algorithm_Analysis_Overview.
Categories : Design and Algorithm Analysis
Recent edits by: TheGuyLoveNY