CSC151.01 2006S, Class 54: What is Computer Science, Revisited? Admin: * EC: The final Thursday Extra of the semester is Thursday at noon. * Topic: Using Scheme to write a ray tracer * Pizza * I anticipate distributing grades tomorrow. Overview: * What is CS? * Subfields of CS. * Related Disciplines. /What is CS?/ * Computer Science is the study of Algorithms and Data * An algorithm is a set of instructions that do something * Data, by example, can be numbers, lists, vectors, files, ... * How did we study algorithms? * Looked at building blocks * Reading: Compared different algorithms for the same problem * E.g., kernels or not * E.g., How do humans think about it * Designed algorithms * Implemented algorithms in Scheme * Wrote algorithms in English * Observed in action * To better understand * To check for correctness * For cost/efficiency * Found general techniques for writing algorithms How do computer scientists study algorithms? * Design algorithms * Implement those designs * Analyze for efficiency * Experimentally * Mathematically: Through proof * Analyze for correctness * Experimentally * Mathematically: Through proof * Find ways to design algorithms * And domains What kinds of subfields are there? * Architecture and organization - The hardware * How do I represent data? * How do I efficiently provide the basic operations? Example * Most modern computers represent all data as a sequence of 0's and 1's. * Represent positive integers using binary numbers. * Addition: Use things that are easy to build * And gates, (and 1 1) = 1 (and anything else) = 0 * Or gates are 1 when either input is 1 * Not gates Convert 1 to 0 or 0 to 1. * Given a = (a8 a4 a2 a1) and b = (b8 b4 b2 b1), compute the sum of a and b * Worry about the 1's position (not (or (and a1 b1) (not (and b1 b2)))) * CSC211 * Operating Systems - Supporting Programs * Access to mouse, keyboard, hard drive, etc. * Interesting problems that come up * Famous OS problem: Dining philosophers * CSC213 * Software Design - Building Programs * Technical: How do you structure large programs * Social: How do you structure teams * Process: Waterfall vs. Agile * CSC223 - CSC152 is prereq * Algorithms * Design (typical designs) * New, general algorithms * Prove aspects of algorithms * Interesting variants * Proof: If your basic operations are comparison and swapping in a vector, you can't do better than c*nlogn * CSC301 * A bit in CSC152 * MAT218, but not really Programming Languages: * The design of the languages in which we write algorithms * Taught in CSC302 Theory * What does it mean to be computable? * Church-Turing Thesis: All sufficiently powerful models are equivalent * What things are and are not computable? * The Halting problem: Given a procedure and an input to that procedure, determine whether or not it produces a value (alternately, recurses forever) * What things are difficult to compute? * The travelling salesperson problem - Given a set of cities, find the shortest path through those cities