Computer Science and Everything 1 Big Ideas in Computer Science l “Mathematics is the Queen of the Sciences” Carl Friedrich Gauss l What is Computer Science?

Slides:



Advertisements
Similar presentations
Computability & Complexity. Scenario I can’t write this program because I’m too dumb.
Advertisements

1 The Limits of Computation Intractable and Non-computable functions.
CS420 lecture one Problems, algorithms, decidability, tractability.
Introductory Lecture. What is Discrete Mathematics? Discrete mathematics is the part of mathematics devoted to the study of discrete (as opposed to continuous)
Easy, Hard, and Impossible. Easy Tic Tac Toe Hard.
CSE332: Data Abstractions Lecture 27: A Few Words on NP Dan Grossman Spring 2010.
Math 308 Discrete Mathematics Discrete Mathematics deals with “Separated” or discrete sets of objects (rather than continuous sets) Processes with a sequence.
© 2006 Pearson Addison-Wesley. All rights reserved14 A-1 Chapter 14 Graphs.
Humans, Computers, and Computational Complexity J. Winters Brock Nathan Kaplan Jason Thompson.
The Theory of NP-Completeness
Analysis of Algorithms CS 477/677
CIS 197 Computers in Society Professor John Peterson Philosophy Week!
CS /29/2004 (Recitation Objectives) and Computer Science and Objects and Algorithms.
Public Key Cryptography Topical Lecture Week 10. PUBLIC AB Public Key Cryptography A: Hey B, send me an encoded message. This is how you encode a message.
Chapter 11: Limitations of Algorithmic Power
CS10 The Beauty and Joy of Computing Lecture #23 : Limits of Computing Thanks to the success of the Kinect, researchers all over the world believe.
Halting Problem. Background - Halting Problem Common error: Program goes into an infinite loop. Wouldn’t it be nice to have a tool that would warn us.
CPS Today’s topics l Computability ä Great Ideas Ch. 14 l Artificial Intelligence ä Great Ideas Ch. 15 l Reading up to this point ä Course Pack.
CPS What is Computer Science? What is it that distinguishes it from the separate subjects with which it is related? What is the linking thread.
Duke University Computer Science 1 Why Computer Science is Uglier and Prettier than Mathematics Owen Astrachan Duke University
Scott Perryman Jordan Williams.  NP-completeness is a class of unsolved decision problems in Computer Science.  A decision problem is a YES or NO answer.
Complexity Classes (Ch. 34) The class P: class of problems that can be solved in time that is polynomial in the size of the input, n. if input size is.
ICAPRG301A Week 4Buggy Programming ICAPRG301A Apply introductory programming techniques Program Bugs US Navy Admiral Grace Hopper is often credited with.
Stochastic Algorithms Some of the fastest known algorithms for certain tasks rely on chance Stochastic/Randomized Algorithms Two common variations – Monte.
David Evans Turing Machines, Busy Beavers, and Big Questions about Computing.
1 Ethics of Computing MONT 113G, Spring 2012 Session 13 Limits of Computer Science.
Tonga Institute of Higher Education Design and Analysis of Algorithms IT 254 Lecture 8: Complexity Theory.
Easy, Hard, and Impossible Elaine Rich. Easy Tic Tac Toe.
Unsolvability and Infeasibility. Computability (Solvable) A problem is computable if it is possible to write a computer program to solve it. Can all problems.
CSE 326: Data Structures NP Completeness Ben Lerner Summer 2007.
Problems you shouldn’t tackle. Problem Complexity.
Genome Revolution: COMPSCI 006G 1.1 FOCUS COMPSCI 006G Genome Revolution Owen Astrachan
CompSci CompSci 6 Programming Design and Analysis I Dietolf (Dee) Ramm
Halting Problem Introduction to Computing Science and Programming I.
Compsci 100, Fall What is Computing? Informatics? l What is computer science, what is its potential?  What can we do with computers in our lives?
CompSci What can be computed l What class of problems can be solved? ä Google Datacenter, Desktop computer, Cell phone, pencil? ä Alan Turing proved.
Compsci 06/101, Spring What is Computing? Informatics? l What is computer science, what is its potential?  What can we do with computers in.
Software Design 14.1 CPS 108 l Object oriented design and programming of medium-sized projects in groups using modern tools and practices in meaningful.
Halting Problem and TSP Wednesday, Week 8. Background - Halting Problem Common error: Program goes into an infinite loop. Wouldn’t it be nice to have.
Beauty and Joy of Computing Limits of Computing Ivona Bezáková CS10: UC Berkeley, April 14, 2014 (Slides inspired by Dan Garcia’s slides.)
CPS 100, Fall What is Computing? Informatics? l What is computer science, what is its potential?  What can we do with computers in our lives?
CPS What is Computer Science? What is it that distinguishes it from the separate subjects with which it is related? What is the linking thread.
CS10: The Beauty and Joy of Computing Lecture #22 Limits of Computing Warning sign posted at Stern Hall. Also, Apple releases new operating.
Limits to Computation How do you analyze a new algorithm? –Put it in the form of existing algorithms that you know the analysis. –For example, given 2.
Computability Heap exercise. The class P. The class NP. Verifiers. Homework: Review RELPRIME proof. Find examples of problems in NP.
David Evans Class 16: NP-Completeness / The Story so Far CS150: Computer Science University of Virginia Computer Science.
Complexity & Computability. Limitations of computer science  Major reasons useful calculations cannot be done:  execution time of program is too long.
2101INT – Principles of Intelligence Systems Lecture 3.
David Evans CS200: Computer Science University of Virginia Computer Science Lecture 15: Intractable Problems (Smiley.
Easy, Hard, and Impossible Elaine Rich. Easy Tic Tac Toe.
CS6045: Advanced Algorithms NP Completeness. NP-Completeness Some problems are intractable: as they grow large, we are unable to solve them in reasonable.
The Beauty and Joy of Computing Lecture #23 Limits of Computing Researchers at Facebook and the University of Milan found that the avg # of “friends” separating.
CSE 311 Foundations of Computing I Lecture 28 Computability: Other Undecidable Problems Autumn 2011 CSE 3111.
CompSci On the Limits of Computing  Reasons for Failure 1. Runs too long o Real time requirements o Predicting yesterday's weather 2. Non-computable.
Compsci 101, Fall LWoC l Review Recommender, dictionaries, files  How to create recommendations in order? food.txt  Toward a Duke eatery-recommender.
CS216: Program and Data Representation University of Virginia Computer Science Spring 2006 David Evans Lecture 8: Crash Course in Computational Complexity.
Fundamentals of Informatics Lecture 12 The Halting Problem Bas Luttik.
Compsci 06/101, Fall What is Computing? Informatics? l What is computer science, what is its potential?  What can we do with computers in our.
Chapter 12 Theory of Computation Introduction to CS 1 st Semester, 2014 Sanghyun Park.
1 1. Which of these sequences correspond to Hamilton cycles in the graph? (a) (b) (c) (d) (e)
The NP class. NP-completeness Lecture2. The NP-class The NP class is a class that contains all the problems that can be decided by a Non-Deterministic.
CompSci Today’s Topics Computer Science Noncomputability Upcoming Special Topic: Enabled by Computer -- Decoding the Human Genome Reading Great.
CS10: The Beauty and Joy of Computing Lecture #21 Limits of Computing Instructor: Sean Morris UCB announces The Turing Test Tournament.
Introduction to Computing Science and Programming I
Chapter 12: Theory of Computation
CompSci 6 Introduction to Computer Science
What is Computing? Informatics?
Unsolvable Problems December 4, 2017.
Discrete Mathematics and Its Applications
What is Computer Science at Duke?
Presentation transcript:

Computer Science and Everything 1 Big Ideas in Computer Science l “Mathematics is the Queen of the Sciences” Carl Friedrich Gauss l What is Computer Science?  Why study it, what is it, why is it interesting (or not)? l Historically  What can we program, what can we program efficiently l Present  Lots of data, lots of connectivity, lots of inferences l Future  Where do we go from here?

Computer Science and Everything 2 What is Computer Science at Duke? l What we tell you it is  A bunch of courses useful in some majors l What you want it to be or imagine it to be  Independent study, new courses, interdepartmental major l What will it be in one year or two?  New courses, new professors, new majors, … l What is it outside of Duke?  Similar but different!

Computer Science and Everything 3 Scientists and Engineers l Scientists build to learn, engineers learn to build –Fred Brooks Why is Programming Fun? First is the sheer joy of making things Second is the pleasure of making things that are useful Third is the fascination of fashioning complex puzzle- like objects of interlocking moving parts Fourth is the joy of always learning Finally, there is the delight of working in such a tractable medium. The programmer, like the poet, works only slightly removed from pure thought-stuff.

Computer Science and Everything 4 What is Computer Science? What is it that distinguishes it from the separate subjects with which it is related? What is the linking thread which gathers these disparate branches into a single discipline? My answer to these questions is simple --- it is the art of programming a computer. It is the art of designing efficient and elegant methods of getting a computer to solve problems, theoretical or practical, small or large, simple or complex. C.A.R. (Tony) Hoare

Computer Science and Everything 5 What is Computer Science? l Computer science is no more about computers than astronomy is about telescopes. Edsger Dijkstra l Computer science is not as old as physics; it lags by a couple of hundred years. However, this does not mean that there is significantly less on the computer scientist's plate than on the physicist's: younger it may be, but it has had a far more intense upbringing! Richard Feyneman

Computer Science and Everything 6 What is Computer Science? l What does a computer scientist do? l What does a programmer do? l What does a systems administrator do? l What do you want to do?

Computer Science and Everything 7 What can be programmed? l What class of problems can be solved ?  G5, 1000Mhz Pentium III, Cray, pencil?  Alan Turing proved some things, hypothesized others Halting problem, Church-Turing thesis l What class of problems can be solved efficiently ?  Problems with no practical solution What does practical mean?  Problems for which we can’t find a practical solution Solving one solves them all Would you rather be rich or famous?

Computer Science and Everything 8 Classes of Problems Easy Hard Impossible Unknown Approximable

Computer Science and Everything 9 What Computers Can’t Do? l Algorithms, Distributed Systems, Networks, Bioinformatics, Graphics, Software Design, Probability, Modeling, Artificial Intelligence, Architecture, Programming, Statistics, Databases, Linear Algebra, Scientific Computing

Computer Science and Everything 10 Schedule students, minimize conflicts l Given student requests, available teachers  write a program that schedules classes  Minimize conflicts l Add a GUI too  Web interface  … I can’t write this program because I’m too dumb

Computer Science and Everything 11 One better scenario I can’t write this program because it’s provably impossible

Computer Science and Everything 12 Another possible scenario I can’t write this program but neither can all these famous people

Computer Science and Everything 13 Entscheidungsproblem l What can we program? l What can't we program? l Can we write a program that will determine if any program P will halt when run on input S ?  Input to halt: P and S  Output: yes/no halts

Computer Science and Everything 14 The halting problem: writing doesHalt def doesHalt(progName, progInput): #if progName halts on progInput return true #else return false #real login hidden (patented or trade-secret?) l Python IDE is a program that reads other programs  Can a word counting program count its own words? The doesHalt method might simulate, analyze, …  One program/function that works for any program/input

Computer Science and Everything 15 How to tell if Foo stops on def easy(progName, progInput): if doesHalt(“Foo”, “ ”): print "halts" else: print "does NOT halt” l Can user enter name of program? Enter the input?  Is there a problem with this program?

Computer Science and Everything 16 Consider the program confuse.py def confuse(progName, progInput): if doesHalt(progName, progInput): while(true): # loop forever else: return "does not halt!" We want to show writing doesHalt is impossible  Proof by contradiction:  Assume possible, show impossible situation results l Can a program read a program? Itself?

Computer Science and Everything 17 Can we write confuse.py? l Legal if doesHalt exists  What have we assumed? l What are consequences of running confuse on itself?  Trouble? programinput doesHalt confuse if doesHalt(..,..) loop else exit confuse

Computer Science and Everything 18 What's a meta catalog? Top 10 sites? l Consider a website of interesting sites  Does the website list itself? Is this a problem? l Consider a website that lists every useless website  Would this be a useful resource?  Does the website list itself? JuicyCampus? l What about a site of all the sites that list themselves?  Site of all sites that don't list themselves? nolist.com 

Computer Science and Everything 19

Computer Science and Everything 20 Not impossible, but impractical l Towers of Hanoi  How long to move n disks? l What combination of switches turns the light on?  Try all combinations, how many are there?  Is there a better way?

Computer Science and Everything 21 Travelling Salesperson l Visit every city exactly once l Minimize cost of travel or distance l Is there a tour for under $2,000 ? less than 6,000 miles? l Is close good enough?  Within 10% of optimal  Within 50% of optimal  … Try all paths, from every starting point -- how long does this take? a, b, c, d, e, f, g b, a, c, d, e, f, g...

Computer Science and Everything 22

Computer Science and Everything 23 Are hard problems easy? l P = easy problems, NP = “hard” problems  P means solvable in polynomial time Difference between N, N 2, N 10 ?  NP means non-deterministic, polynomial time guess a solution and verify it efficiently l Question: P = NP ?  if yes, a whole class of difficult problems, the NP- complete problems, can be solved efficiently  if no, none of the hard problems can be solved efficiently  showing the first problem was NP complete was an exercise in intellectual bootstrapping, satisfiability/Cook/(1971)

Computer Science and Everything 24 Theory and Practice l Number theory: pure mathematics  What’s a prime number?  How many are there?  How many numbers? l Computer Science  Primality is “easy” Yes or no  Factoring is “hard” What are the factors?  Encryption is possible top secret public-key cryptography randomized primality testing

Computer Science and Everything 25 In Re Boucher 2007 WL

Computer Science and Everything 26 US Patent 5,990,495 l What’s a patent for? l How long does it last? l What can you do if patent violated? l Do you play guitar hero?

Computer Science and Everything 27 Photomosaic, us patent 6,137,498 l l l Drug patents? l Gene patents?

Computer Science and Everything 28 Issues in Voting ender: Smith, Ed [address To: Subject: Sequoia Advantage voting machines from New Jersey Date: Fri, Mar 14, 2008 at 6:16 PM Dear Professors Felten and Appel: As you have likely read in the news media, certain New Jersey election officials have stated that they plan to send to you one or more Sequoia Advantage voting machines for analysis. I want to make you aware that if the County does so, it violates their established Sequoia licensing Agreement for use of the voting system. Sequoia has also retained counsel to stop any infringement of our intellectual properties, including any non-compliant analysis. We will also take appropriate steps to protect against any publication of Sequoia software, its behavior, reports regarding same or any other infringement of our intellectual property. Very truly yours, Edwin Smith VP, Compliance/Quality/Certification Sequoia Voting Systems As you have likely read in the news media, certain New Jersey election officials have stated that they plan to send to you one or more Sequoia Advantage voting machines for analysis. I want to make you aware that if the County does so, it violates their established Sequoia licensing Agreement for use of the voting system. We will also take appropriate steps to protect against any publication of Sequoia software, its behavior, reports regarding same or any other infringement of our intellectual property.

Computer Science and Everything 29 Computer Science in a Nutshell