CSCI 1112 Lecture Notes - Lecture 2: Pseudocode, List Of Algorithms, Bubble Sort

51 views3 pages
26 Jan 2017
School
Course

Document Summary

Expressing algorithms: we express algorithms in whatever way is the clearest and most concise. English is sometimes the best way: to make algorithms perfectly clear, we will use pseudocode. In the lab, you will transform pseudocode into java. Analyzing algorithms: we want to predict the resources that any algorithm requires. In order to predict resource requirements, we need a computational model. In our case is the ram computational model. Ram (random access machine) model: any data in memory can be accessed at any time. No concurrent operations: we"ll use i(cid:374)st(cid:396)u(cid:272)tio(cid:374)s (cid:272)o(cid:373)(cid:373)o(cid:374)ly fou(cid:374)d i(cid:374) (cid:396)eal computers: Control: conditional/unconditional branch: each of these instructions take a constant amount of time. Does not depend on how big the numbers are: the ram model uses both integer and floating-point types. Running time: the time taken by an algorithm depends on the input. Sorting 1000 numbers takes longer than soring 3 numbers.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents