Part II:About algorithms
Part II: About algorithms
Roadmap of Part II. What is computation. What is an algorithm. Algorithmic issues are everywhere
Roadmap of Part II. ◼ What is computation. ◼ What is an algorithm. ◼ Algorithmic issues are everywhere
Computation Input Output Example:Integer multiplication. Say,at most 4 digits. Calculate①234*5678? 7006652
Computation Input Output ◼ Example: Integer multiplication. ❑ Say, at most 4 digits. ◼ Calculate 1234 * 5678 = ? 7006652
Set of all pairs of two 4-digit integers (1234,5678) (1234,5678) (4582,3573) 7006652 (0836,7945) (9458,8249) Input set Input Instance We have a set of integer pairs ---input set Each pair:(input)instance What do we require for computation?
◼ We have a set of integer pairs --- input set ❑ Each pair: (input) instance ◼ What do we require for computation? (1234, 5678) (4582, 3573) (0836, 7945) (9458, 8249) ... … Set of all pairs of two 4-digit integers 7006652 (1234, 5678) Input set Input Instance
Who can multi Yes,you can two number sometimes. 2*3=? 1 3*4=? 235*652 206553 ? We want the computation to be correct for all (4-digit)integer pairs
2*3 = ? 6 3*4 = ? 12 235*652 = ? 206553 ◼ We want the computation to be correct for all (4-digit) integer pairs. Who can multiply two numbers? Yes, you can … I can! sometimes