CSI 4140 Lecture 1: Algorithm
Document Summary
An algorithm is a step-by-step procedure for solving a problem in a finite amount of time. Execution time : memory , quality of the result , simplicity . The running time depends on the input size. It also depends on the input data: different inputs can have different running times. Worst case running time of an algorithm: finding the average case can be very difficult, knowing the worst-case time complexity can be important. We focus on the worst case running time. Crucial to applications such as games and robotics. How should we measure the running time of an algorithm. Write a program which implement the algorithm. Run the program with all possible input sets of data of various size and contents use a method (system. currenttimemillis()) to measure exact running time. The measurement of the experiment can be like this . Is independent of implementation: uses a high-level description of the algorithm.