Anda di halaman 1dari 1

Solutions to Chapter One 1.

___________ is the process of executing a correct program on data sets and measuring the time and space it takes to compute the results? Ans. Profiling

2.Define algorithm? What are its properties? Ans.An algorithm is a set of instructions that provide step-by-step specifications to perform a task. The properties of an algorithm are: Input : Specifies the data set that is applied to the algorithm to check its validity. Output : Specifies the data set that is produced as a result of the algorithm execution. Definiteness : Specifies that the instructions described in the algorithm should be welldefined and should not create any ambiguity. Termination : Specifies that the instructions described in the algorithm must contain aproper termination condition. Effectiveness : Specifies that the algorithm take less time and less memory space duringits execution.

3. What is debugging and what is profiling? Ans. Debugging is the process of identifying and fixing the errors in a program. Errors in a program can be identified byexecuting the program with a sample dataset.Profiling is the process of measuring the performance of the program by executing it on different data sets. Performanceof a program is measured by recording the time and memory space that the program takes during its execution.

4.One of the properties of an algorithm is beauty (true/false) Ans. False

Anda mungkin juga menyukai