chapter1 - Chapter 1 The Role of Algorithms in Computing...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
1 Chapter 1 The Role of Algorithms in Computing What are algorithms ? Why is the study of algorithms worthwhile ? What is the role of algorithms relative to other technologies used in computers?
Background image of page 1

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

View Full DocumentRight Arrow Icon
2 1.1 Algorithms z An algorithm is any well-defined computational procedure that takes some value, or set of values, as input and produces some value, or set of values, as output . An algorithm is thus a sequence of computational steps that transform the input into the output . z Consider the sorting problem . Given the input sequence 31, 41, 59, 26, 41, 58 , a sorting algorithm returns as output the sequence 26, 31, 41, 41, 58, 59 . Such an input sequence is called an instance of the sorting problem . In general, an instance of a problem consists of the input (satisfying whatever constraints are imposed in the problem statement) needed to compute a solution to the problem. z An algorithm is said to be correct if, for every input instance , it halts with the correct output . z
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 04/26/2011 for the course COMPUTER S 1 taught by Professor Thomas during the Spring '11 term at Universitas Katolik Parahyangan.

Page1 / 5

chapter1 - Chapter 1 The Role of Algorithms in Computing...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online