=CSC151 2007S, Class 01: An Introduction to Algorithms= Admin: * TWO HANDOUTS BY FRONT DOOR! * Sam will not be available during office hours today. * Homework for tomorrow: * Introductory survey (distributed in class) * Reading on Linux (available on the Web; URL in survey) Overview: * Preliminaries * Introduction: What is CS? * Exercise: Drawing smileys. ==Preliminaries== * Get a sticker and handouts * Hi, I'm Sam * That's your class mentor, Max * Attendance ==What is computer science?== * STUDENT RESPONSES FOLLOW * CS = Programming * Also knowing hardware and the inside of computers * Also knowing language * CS = Ways to make a computer do what you want * Science = the study of the world around us * Including modeling it with mathematical equations [maybe not] * Study includes investigation * Scientists study the world using "the scientific method" * Ask a question * Prove or disprove it * Experimentation! * Observe + Notice patterns + Form hypothesis + Design experiment + Conduct the experiment + Analyze the data + UPDATE HYPOTHESIS * Perhaps CS is not a science * But we can form some hypotheses: "If I press an A key, an A will appear on the screen" * That's not a very interesting hypothesis * Although some aspects of CS use the scientific method, the scientific method is not our primary approach * Programming is also not the primary approach (or goal) of CS Sam's common definition of CS: Computer science is the study of algorithms and data structures Algorithms = instructions for solving a problem Data structures = techniques for organizing data/information In the end, most algorithms end up being expressed as programs In this class: * Design and analyze algorithms * Express algorithms on the computer * In a language called Scheme ==Laboratory Exercise== (Note: Drawings take place on the physical whiteboard, and are not reproduced here.) Why are we doing this exercise? * To give you experience writing instructions * To give us a starting point for discussions of writing instructions * To reveal an important point: The kinds of instructions you write depend strongly on the basic operations you can rely on Some observations * Specificity helps * Sometimes you have to improvise * It helps to watch what's happening and update your instructions as you go * And don't always expect to write correct instructions the first time (or the second time) (or the third time) (or the six hundred and twenty third time) * Working with others helps!