Algorithms_and_Data_Structures_04

# Algorithms_and_Data_Structures_04 - Lecture 4 Computer...

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

Computer Science Algorithms and Data Structures Prof. Dr. Andreas Nüchter Research I, Room 105 Jacobs University Bremen http://www.nuechti.de [email protected] Lecture 4

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

View Full Document
Algorithms and Data Structures Dr. Andreas Nüchter September 15, 2009 91 Last Lectures First attempt to define the central word “algorithm” Definition of algorithm used in this lecture 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 a finite sequence of instructions that can be carried out by a real machine. The sequence of instructions causes a defined input/output behavior on the machine. A deterministic algorithm is described by a partial function from the set of possible inputs to the set of possible outputs.
Algorithms and Data Structures Dr. Andreas Nüchter September 15, 2009 92 The Algorithms Man

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

View Full Document
Algorithms and Data Structures Dr. Andreas Nüchter September 15, 2009 93 Donald E. Knuth Beware of bugs in the above code; I have only proved it correct, not tried it. Donald Knuth His program TeX is considered as error free. I use the version 3.1415926 (frozen in March 2008) Donald Knuth offers monetary awards to people who find and report a bug in TeX. The award per bug started at \$2.56 (one "hexadecimal dollar") and doubled every year until it was frozen at its current value of \$327.68. Knuth, however, has lost relatively little money as there have been very few bugs claimed. In addition, recipients have been known to frame their check as proof that they found a bug in TeX rather than cashing it. ” [wikipedia]
Algorithms and Data Structures Dr. Andreas Nüchter September 15, 2009 94 Last Lecture Induction examples Important properties of greatest common divisors are: 1. 2. 3. 4. Note: gcd = ggT

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

View Full Document
Algorithms and Data Structures Dr. Andreas Nüchter September 15, 2009 95 Last lecture – GCD Now we are able to create a fast algorithm for computing the greatest common divisor of two int s. 1. comment 2. comment 3. comment Note: gcd = ggT
Algorithms and Data Structures Dr. Andreas Nüchter September 15, 2009 96 An Algorithm for GCD How good this algorithm really is, we will discuss later! The comments are used to verify the correctness of

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 05/04/2010 for the course CS 320251 taught by Professor Nuechter during the Fall '09 term at Jacobs University Bremen.

### Page1 / 29

Algorithms_and_Data_Structures_04 - Lecture 4 Computer...

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

View Full Document
Ask a homework question - tutors are online