1 / 12

CSE111: Great Ideas in Computer Science

CSE111: Great Ideas in Computer Science. Dr. Carl Alphonce 219 Bell Hall Office hours: M-F 11:00-11:50 645-4739 alphonce@buffalo.edu. cell phones off (please). Announcements. Exam 1 & 2 handback HW4 due April 2 Part 1 this week in recitation Part 2 next week in recitation

aldis
Download Presentation

CSE111: Great Ideas in Computer Science

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CSE111: Great Ideas in Computer Science Dr. Carl Alphonce 219 Bell Hall Office hours: M-F 11:00-11:50 645-4739 alphonce@buffalo.edu

  2. cell phones off (please)

  3. Announcements • Exam 1 & 2 handback • HW4 due April 2 • Part 1 this week in recitation • Part 2 next week in recitation • Third is exam is April 21 (last full week of classes) • We will be taking attendance • Does not count directly for grade • Just curious who is and is not attending

  4. Today’s Agenda • Algorithms (chapter 5 in text) • Concept • Exercise

  5. Algorithm • Figure 5.1 of text An algorithm is an ordered set of unambiguous, executable steps that defines a terminating process.

  6. ordered • Steps have an order • Parallelism is allowed

  7. executable • Must be able to carry out each step • Cannot have a step like “list all numbers” because there are infinitely many numbers • Cannot invoke magic (turn lead into gold) • etc.

  8. unambiguous • Steps must be clear • Cannot have more than one interpretation

  9. terminating • The overall process must stop at some point. • Non-terminating processes are useful (e.g. web server) • Termination is important in defining computability.

  10. Describing algorithms • Primitives – set of base elements, such as: • Sequencing • Selection • Repetition • Naming

  11. Exercise • Develop an algorithm for making a peanut butter and jelly sandwich. • Work in groups of about 3 • Write down ideas on paper • Put names on paper • Hand in at end of class

  12. What’s available? • New peanut butter jar • New jelly jar • Bag of sliced loaf bread • Knife • Spoon • Lots of paper towels

More Related