{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

MIT1_204S10_lec05

MIT1_204S10_lec05 - 1.204 Lecture 5 Algorithms analysis...

Info icon This preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
1.204 Lecture 5 Algorithms: analysis, complexity Algorithms Alg orithm: Finite set of instructions that solves a given problem. Characteristics: Input. Zero or more quantities are supplied. Output. At least one quantity is computed. Definiteness. Each instruction is computable. Finiteness. The algorithm terminates with the answer or by telling us no answer exists. We will study common algorithms in engineering design d d i ki and decision-making We focus on problem modeling and algorithm usage Variations in problem formulation lead to greatly different algorithms E.g., capital budgeting can be greedy (simple) or mixed integer programming (complex) 1
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
t t t t Algorithms: forms of analysis How to devise an alg orithm How to validate the algorithm is correct Correctness proofs How to analyze running time and space of algorithm Complexity analysis: asymptotic, empirical, others How to choose or modify an algorithm to solve a problem How to implement and test an algorithm in a program Keep program code short and correspond closely to algorith i hm steps Analysis of algorithms Time com plexity of a given alg orithm How does time depend on problem size? Does time depend on problem instance or details? Is this the fastest algorithm? How much does speed matter for this problem? Space complexity How much memory is required for a given problem size? Assumptions on computer word size, processor Fi d d/ i i Fixed word/register size Single or multi (grid, hypercube) processor Solution quality Exact or approximate/bounded Guaranteed optimal or heuristic 2
Image of page 2
Methods of complexity analysis Asymptotic analysis Create recurrence relation and solve This relates problem size of original problem to number and size of sub-problems solved Different performance measures are of interest Worst case (often easiest to analyze; need one ‘bad’ example) Best case (often easy for same reason) Data-specific case (usually difficult, but most useful) Write implementation of algorithm (on paper) Create table (on paper) of frequency and cost of steps Sum u p the step s ; relate them to p roblem size Implement algorithm in Java Count steps executed with counter variables, or use timer Vary problem size and analyze the performance These methods are all used They vary in accuracy, generality, usefulness and ‘correctness’ Similar approaches for probabilistic algorithms, parallel, etc.
Image of page 3

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern