1 / 43

CPSC 171 Introduction to Computer Science

CPSC 171 Introduction to Computer Science. Lecture: MWF 1:15pm-2:35pm, Colton 103 Lab 1: TH 9:40am-11:40am, Colton 106 Lab2: TH 2pm-4pm, Colton 106. Course Description.

noble-kidd
Télécharger la présentation

CPSC 171 Introduction to 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. CPSC 171 Introduction to Computer Science Lecture: MWF 1:15pm-2:35pm, Colton 103 Lab 1: TH 9:40am-11:40am, Colton 106 Lab2: TH 2pm-4pm, Colton 106

  2. Course Description The introduction to the computer science discipline which establishes a scientific foundation for a variety of topics, including computer programming, computer design, information processing, the algorithmic solution of problems, and the study of the algorithmic process itself. Prerequisites: Computer Science 172 or 170 (co-requisite) or permission.

  3. Stefan Maurer maurersr@my.hiram.edu Christian Ebinger ebingerce@my.hiram.edu Matt Young youngm@my.hiram.edu Dan Gavazzi gavazzida@my.hiram.edu Cody Depew depewcm@my.hiram.edu Instructor & TAs Louis Oliphant Office:111 Colton Office Hours: MWF 2:35pm-4:35pm TH 4pm-5pm Open Door Policy Email: oliphantLT@hiram.edu

  4. Invitation to Computer Science: Java Version (Paperback) Third Edition G. Michael Schneider & Judith L. Gersting Textbook

  5. Reading Assignment Chapter 1 in Textbook Homework Assignment page 34 of Textbook Problems 5,7,8,9,13 Due Sept 4 at beginning of class

  6. Invitation to Computer Science Lab Manual: C++ and Java(Paperback) Kenneth Lambert & Thomas Whaley Lab Book • Be sure you do NOT buy a manual with any handwriting in it. In the first lab session, your manual will be checked for writing. You must have the original copy of the disk in the manual for the labs as this will meet licensing agreements.

  7. Lecture Portion 70% 1st Midterm 20% 2nd Midterm 20% Final Exam 20% Assignments 10% Grading Lab Portion 30% One lab report each week Lab reports due one week after assigned late labs lose 10% per day. Late lab reports may only be handed in up to 3 days late. To pass the course you must pass each part independently

  8. Academic Integrity All examinations and labs must be done individually. Cheating or plagiarizing will result in a zero. You are encouraged to work together on homework assignments. Please discuss problems in a general manner to understand concepts and ideas. Do not copy or allow others to copy your work.

  9. Class Web Site www.cs.hiram.edu/~oliphantLT/cpsc171

  10. Who Are You? • Name (and how to pronounce it) • What you would like to be called • Year in College • Major (declared or considering) • Reason for taking course • Fullfils some requirement (which one?) • Considering computer science

  11. What is Computer Science? What is Biology? What is Astronomy? The branch of physics that studies celestial bodies and the universe as a whole The science that studies living organisms www.wordnetweb.princeton.edu

  12. Computer Science is NOT Computer science is NOT the study of computers. Computer science is NOT the study of how to write computer programs. Computer science is NOT the study of the uses and applications of computers and software

  13. Computer Science is Computer science: The study of algorithms, including • Their formal and mathematical properties • Their hardware realizations • Their linguistic realizations • Their applications Textbook definition

  14. An Algorithm is A well-ordered collection of Unambiguous and Effectively computable operations that, when executed Produces a result and Halts in a finite amount of time Textbook definition

  15. A VERY SIMPLE ALGORITHM Observe: Operations need not be executed by a computer only by an entity capable of carrying out the operations listed. • Wet your hair. • Lather your hair. • Rinse your hair. • Stop. We assume that The algorithm begins executing at the top of the list of operations. The "Stop" can be omitted if we assume the last line is an implied "Stop" operation.

  16. Well-Ordered Collection of Operations The question that must be answered is: At any point in the execution of the algorithm, do you know what operation is to be performed next? Not well-ordered operations: 1. Either wet your hair or lather your hair. 2. Rinse your hair. Well-ordered operations: 1. Wet your hair. 2. Lather your hair. 3. Rinse your hair.

  17. Well-Ordered Collection of Operations Don't assume that you can't make choices: Well-ordered operations: 1. If your hair is dirty, then a. Wet your hair. b. Lather your hair. c. Rinse your hair. 2. Else a. Go to bed. Well-ordered operations: If your hair is dirty, then Wet your hair. Lather your hair. Rinse your hair. Else Go to bed. Note: We will often omit the numbers and the letters and assume a "top-down" reading of the operations.

  18. Unambiguous Operations The question that must be answered is: Does the computing entity understand what the operation is to do? This implies that the knowledge of the computing entity must be considered. For example, is the following ambiguous? Make the pie crusts.

  19. Unambiguous Operations To an experienced cook, Make the pie crusts. is not ambiguous. But, a less experienced cook may need: Take 1 1/3 cups of flour. Sift the flour. Mix the sifted flour with 1/2 cup of butter and 1/4 cup of water to make dough. Roll the dough into two 9-inch pie crusts. or even more detail!

  20. Definition: An operation that is unambiguous is called a primitive operation (or just a primitive) Unambiguous Operations One question we will be exploring in the course is what are the primitives of a computer. Note that a given collection of operations may be an algorithm with respect to one computing agent, but not with respect to another computing agent!!

  21. Effectively Computable Operations The question that must be answered is: Is the computing entity capable of doing the operation? This assumes that the operationmust first be unambiguous, i.e. the computing agent understands what is to be done. Not effectively computable operations: Write all the fractions between 0 and 1. Set A to (S/N). Add 1 to the current value of X.

  22. …Produces a Result The question that must be answered is: Can the user of the algorithm observe a result produced by the algorithm? The result need not be a number or piece of text viewed as "an answer". It could be an alarm, signaling something is wrong. It could be an approximation to an answer. It could be an error message.

  23. Halts in a Finite Amount of Time The question that must be answered is: Will the computing entity complete the operations in a finite number of steps and stop? Do not confuse "not finite" with "very, very large". A failure to halt usually implies there is an infinite loop in the collection of operations: • Write the number 1 on a piece of paper. • Add 1 to the number and writeit on a piece of paper. • Repeat 2. • Stop.

  24. An Algorithm is A well-ordered collection of Unambiguous and Effectively computable operations that, when executed Produces a result and Halts in a finite amount of time Note: Although I have tried to give clean cut examples to illustrate what these new words mean, in some cases, a collection of operations can fail for more than one reason. Textbook definition

  25. Computer Science is Computer science: The study of algorithms, including • Their formal and mathematical properties • Their hardware realizations • Their linguistic realizations • Their applications Textbook definition

  26. Formal and Mathematical Properties • It is not enough to develop any old algorithm to solve a problem. • We must worry about some additional properties of an algorithm: • How efficient is it? • What kinds of resources must be used to execute it? • How does it compare to other algorithms that solve the same problem.

  27. Hardware Realizations • Algorithms need not execute on machines. All we really need are computing entities. • Anything that can compute – e.g., a human. • But, ultimately, most of our interest will lie with algorithms that execute on computing entities called "computers". • How are these entities constructed? • The emphasis will be on the logical construction of a computer, not the physical construction.

  28. Linguistic Realizations How do we represent algorithms? We will start with one linguistic realization, called pseudocode and later will look at many different realizations in various programming languages.

  29. Applications What are some applications of computers in current use: • Modeling and Simulation • Information Retrieval • Numerical Problem Solving • Telecommunications • Artificial Intelligence • Networking • Graphics

  30. ENIAC – (Electrical Numerical Integrator And Calculator), built by Presper Eckert and John Mauchly at Moore School of Engineering, University of Pennsylvania, 1941-46 History of Computers Often called the first computer (that was electronic, programmable, general purpose and digital).

  31. ENIAC • 18,000 vacuum tubes and weighed 30 tons • Duration of an average run without some failure was only a few hours, although it was predicted to not run at all! • When it ran, the lights in Philadelphia dimmed! • ENIAC Stored a maximum of twenty 10-digit decimal numbers. • Input: IBM card reader • Output: Punched cards, lights

  32. ENIAC Programming required rewiring of the machine Source: http://ftp.arl.army.mil/ftp/historic-computers/

  33. Eniac’s Vacuum Tubes Photo taken at Computer Science History Museum, San Jose, CA, by Dr. Robert Walker on VLSI Trip to Silicon Valley.

  34. Vacuum Tubes A vacuum tube similar to those used in the earliest computers. Stored a single on/off value called a bit Source: http://www.cs.virginia.edu/brochure/images/mus_024.jpg

  35. Second Generation Hardware (1959-1965) - Characteristics Transistor Replaced vacuum tube, fast, small, durable, cheap Magnetic Cores Replaced magnetic drums, information available instantly Magnetic Disks Replaced magnetic tape, data can be accessed directly 9

  36. Third Generation Hardware (1965-1971) Integrated Circuits Replaced circuit boards, smaller, cheaper,faster, more reliable. Transistors Now used for memory construction Terminal An input/output device with a keyboard and screen Charles Falco/Photo Researchers By 1968 you could buy a 1.3 MHz CPU with half a megabyte of RAM and 100 megabyte hard drive for a mere US$1.6 million. 10

  37. Smaller and Smaller

  38. My Laptop Faster and Faster

  39. Great Job Prospects What field has… • …the best-rated job, and 5 of the top 10 highest paid, highest growth jobs? • …shown strong job growth in the face of outsourcing? • …a looming severe shortage in college graduates? Computer Science!

  40. 5 computing jobs are in the top 10 salary jobsfrom the Bureau of Labor Statistics’ list of the 30 fastest growing jobs through 2014. (Morsch, Laura. CareerBuilders.com, Jan. 27, 2006.) 1. Computer systems software engineer: $81,140 2. Computer applications software engineer: $76,310 6. Computer systems analyst: $67,520 7. Database administrator: $61,950 9. Network systems and data communication analyst: $61,250 Salaries are given as mean annual salaries over all regions. Great Job Prospects

  41. Summary • Course Overview • Definitions of Computer Science and Algorithms • Brief History of Computers • Great Job Prospects

  42. Reading Assignment Chapter 1 in Textbook Homework Assignment page 34 of Textbook Problems 5,7,8,9,13 Due Sept 4 at beginning of class

More Related