# "Algorithm Analysis" Please respond to the following:

label Mathematics
account_circle Unassigned
schedule 1 Day
account_balance_wallet \$5

Analyze the most important concept or method of discrete mathematics used to analyze algorithms. Provide a rationale with your response.

Nov 22nd, 2017

It is very common for beginning computer science students to compare their programs with one another. You may also have noticed that it is common for computer programs to look very similar, especially the simple ones. An interesting question often arises. When two programs solve the same problem but look different, is one program better than the other?

In order to answer this question, we need to remember that there is an important difference between a program and the underlying algorithm that the program is representing. As we stated in Chapter 1, an algorithm is a generic, step-by-step list of instructions for solving a problem. It is a method for solving any instance of the problem such that given a particular input, the algorithm produces the desired result. A program, on the other hand, is an algorithm that has been encoded into some programming language. There may be many programs for the same algorithm, depending on the programmer and the programming language being used.

To explore this difference further, consider the function shown in ActiveCode1. This function solves a familiar problem, computing the sum of the first n integers. The algorithm uses the idea of an accumulator variable that is initialized to 0. The solution then iterates through the n integers, adding each to the accumulator.

Jun 13th, 2015

...
Nov 22nd, 2017
...
Nov 22nd, 2017
Nov 22nd, 2017
check_circle