1. Introduction to Algorithms

1. Introduction to Algorithms - ENGR 101 Fall 2010(Section...

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

View Full Document Right Arrow Icon
ENGR 101 Fall 2010 (Section 100) 1 ENGR 101 : Intro to Computers and Programming Prof. Michael Wellman What is ENGR 101? Engineering 101 introduces first-year students to the concept of an algorithm: a well-defined set of instructions that achieve a particular goal. Constructing an algorithm for a given purpose is a fundamental form of engineering design task, and developing computer programs is part of almost every modern engineering project. Students in ENGR 101 learn how to conceptualize algorithms for solving engineering problems and express them in the programming languages C++ and MATLAB. What Will You Get from this Course? You will learn what an algorithm is, …how to design algorithms …how to express them in programming languages C++ and MATLAB …how to think algorithmically …understand role of computation in engineering And we hope… You will have fun! Introduction to Algorithms ENGR 101, Lecture 1: 8 Sep 10
Image of page 1

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

View Full Document Right Arrow Icon
ENGR 101 Fall 2010 (Section 100) 2 What is an Algorithm? A precise specification of a computational process . what computers do involves calculation operates over time result: solve a problem perform a task unambiguous can be executed mechanically structured set of instructions Textbook Definition (from Holloway, Intro to Engineering Programming ) Algorithm A list of instructions that, when executed, transform information from input to output . The instructions are a finite set of steps that can be executed, in a definite order, by a deterministic mechanism. When these steps are actually executed, the execution must terminate after a finite time. specifies computational process mechanically executable produces result “Algorithm” Etymology Muhammad ibn M ū s ā al-Khw ā rizm ī 9 th Century Persian mathematician Some Algorithms in Your Life Web search: (e.g., PageRank) Recommendations: (products, friends…) Mp3 encoding/decoding: Pathfinding
Image of page 2
ENGR 101 Fall 2010 (Section 100) 3 More (Industrial Strength) Algorithms Air Traffic Control Magnetic Resonance Imaging Computer Numerical Control Supply Chain Management Question 1 – What does this Algorithm Do? 1. Request a value for a . 2. Request a value for b . 3. Request a value for c . 4. Calculate b 2 – 4 ac . 5. Return the value calculated in step 4. a) Nothing, it is not an algorithm b) It returns a solution to the quadratic equation a x 2 + b x + c = 0. c) It returns the discriminant of the quadratic equation a x 2 + b x + c = 0. Question 2 – Is it an algorithm? 1. Request a value for a 2. While a > 0 3. Assign a /2 to a [ a a /2 ] 4. Return a a) No, it is not an algorithm b) Yes, it returns a value of one-half the original a . c) Yes, it returns the smallest even divisor of a . The procedure will never terminate.
Image of page 3

Info iconThis 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