{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

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

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

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?

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

View Full Document
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
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### 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
Ask a homework question - tutors are online