Compsci 100, Fall 2009 17.1 What is Computing? Informatics? l What is computer science, what is its potential?  What can we do with computers in our lives?

Slides:



Advertisements
Similar presentations
Lecture 19. Reduction: More Undecidable problems
Advertisements

Computability & Complexity. Scenario I can’t write this program because I’m too dumb.
Introductory Lecture. What is Discrete Mathematics? Discrete mathematics is the part of mathematics devoted to the study of discrete (as opposed to continuous)
Computational problems, algorithms, runtime, hardness
CSE332: Data Abstractions Lecture 27: A Few Words on NP Dan Grossman Spring 2010.
Humans, Computers, and Computational Complexity J. Winters Brock Nathan Kaplan Jason Thompson.
The Theory of NP-Completeness
CSE 326: Data Structures NP Completeness Ben Lerner Summer 2007.
Analysis of Algorithms CS 477/677
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
Chapter 11 Limitations of Algorithm Power. Lower Bounds Lower bound: an estimate on a minimum amount of work needed to solve a given problem Examples:
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.
Tonga Institute of Higher Education Design and Analysis of Algorithms IT 254 Lecture 8: Complexity Theory.
MIT and James Orlin1 NP-completeness in 2005.
Compsci 06/101, Spring What is Computing? Informatics? l What is computer science, what is its potential?  What can we do with computers in.
Discrete Structures for Computing
CSC 413/513: Intro to Algorithms NP Completeness.
CSC 172 P, NP, Etc. “Computer Science is a science of abstraction – creating the right model for thinking about a problem and devising the appropriate.
CSE 024: Design & Analysis of Algorithms Chapter 9: NP Completeness Sedgewick Chp:40 David Luebke’s Course Notes / University of Virginia, Computer Science.
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?
Halting Problem Introduction to Computing Science and Programming I.
COMPSCI 102 Introduction to Discrete Mathematics.
CompSci What can be computed l What class of problems can be solved? ä Google Datacenter, Desktop computer, Cell phone, pencil? ä Alan Turing proved.
NP-COMPLETE PROBLEMS. Admin  Two more assignments…  No office hours on tomorrow.
Compsci 06/101, Spring What is Computing? Informatics? l What is computer science, what is its potential?  What can we do with computers in.
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.
NP-Complete problems.
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.
CSE 589 Part V One of the symptoms of an approaching nervous breakdown is the belief that one’s work is terribly important. Bertrand Russell.
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.
“One ring to rule them all” Analogy (sort of) Lord of The Rings Computational Complexity “One problem to solve them all” “my preciousss…”
Week 13 - Monday.  What did we talk about last time?  B-trees  Hamiltonian tour  Traveling Salesman Problem.
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.
Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Computer Science: An Overview Eleventh Edition by J. Glenn Brookshear Chapter.
Compsci 101, Fall LWoC l Review Recommender, dictionaries, files  How to create recommendations in order? food.txt  Toward a Duke eatery-recommender.
Chapter 11 Introduction to Computational Complexity Copyright © 2011 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1.
CS216: Program and Data Representation University of Virginia Computer Science Spring 2006 David Evans Lecture 8: Crash Course in Computational Complexity.
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 101.2, Fall Plan for LDO101 l Ethical webpage scraping  Illustrate power of regular expressions  Python makes trying things relatively.
Introductory Lecture. What is Discrete Mathematics? Discrete mathematics is the part of mathematics devoted to the study of discrete (as opposed to continuous)
CompSci Today’s Topics Computer Science Noncomputability Upcoming Special Topic: Enabled by Computer -- Decoding the Human Genome Reading Great.
CSE 332: NP Completeness, Part II Richard Anderson Spring 2016.
CS10: The Beauty and Joy of Computing Lecture #21 Limits of Computing Instructor: Sean Morris UCB announces The Turing Test Tournament.
CSC 172 P, NP, Etc.
Introduction to Computing Science and Programming I
Chapter 12: Theory of Computation
What is Computing? Informatics?
Unsolvable Problems December 4, 2017.
Discrete Mathematics and Its Applications
Halting Problem.
Discrete Mathematics in the Real World
What is Computer Science at Duke?
Presentation transcript:

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?  What can we do with computing for society?  Will networks transform thinking/knowing/doing?  Society affecting and affected by computing?  Changes in science: biology, physics, chemistry, … l Privileges and opportunities available if you know code  Writing and reading code, understanding algorithms  Majestic, magical, mathematical, mysterious, …

Compsci 100, Fall Computer Science: Duke Connection 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!

Compsci 100, Fall Computer Science: Duke Connection l Algorithms, Distributed Systems, Networks, Bioinformatics, Graphics, Software Design, Probability, Modeling, Artificial Intelligence, Architecture, Programming, Statistics, Databases, Linear Algebra, Scientific Computing

Compsci 100, Fall Computer Science: Duke Connection

Compsci 100, Fall Luis, Noam, Tom

Compsci 100, Fall Fundamental Compsci Concepts 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: at all, efficiently, optimally l Present  Lots of data, lots of connectivity, lots of inferences l Future  Where do we go from here?

Compsci 100, Fall What can be programmed? l What class of problems can be solved ?  G5, 1000Mhz Pentium III, Cray, pencil?  Alan Turing contributions Halting problem, Church-Turing thesis l What class of problems can be solved efficiently ?  Problems with no practical solution What does practical mean?  We can’t find a practical solution Solving one solves them all Would you rather be rich or famous?

Compsci 100, Fall 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

Compsci 100, Fall One better scenario I can’t write this program because it’s provably impossible I can’t write this program but neither can all these famous people Still another scenario, is this better?

Compsci 100, Fall Entscheidungsproblem l What can we program?  What kind of computer? l What can't we program?  Can’t we try harder? 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

Compsci 100, Fall Good sites: l What is social bookmarking?  Why is del.icio.us interesting?  Who posts, who visits? l What about a website of interesting websites?  What would you expect to find there?  Would the site list itself? l What about sites that list/link to themselves?  What about a site with all sites that list themselves?

Compsci 100, Fall Bad sites: l Sites listing bad sites (don’t visit them?)  Where would this be useful?  What about censorship (internationally?)  Is this a good site or a bad site? l What about sites that list/link themselves?  Is haz.ardo.us there? l Website of all the sites that don’t list themselves?  Is notlisted.com listed on notlisted.com ?

Compsci 100, Fall The halting problem: writing doesHalt public class ProgramUtils /** * Returns true if progname halts on input, * otherwise returns false (progname loops) */ public static boolean doesHalt(String progname, String input){ } l A compiler is a program that reads other programs as input  Can a word counting program count its own words? The doesHalt method might simulate, analyze, …  One program/function that works for any program/input

Compsci 100, Fall How to tell if Foo stops on public static void main(String[] args) { String prog = "Foo.java"; String input = " " if (ProgramUtils.doesHalt(prog,input)){ System.out.println(prog+" stops"); } else { System.out.println(prog+" 4ever"); } l Can user enter name of program? Input?  What's the problem with this program?

Compsci 100, Fall Consider the class Confuse.java public static void main(String[] args){ String prog = "Foo.java"; if (ProgramUtils.doesHalt(prog,prog)) { while (true) { // do nothing forever } 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?

Compsci 100, Fall 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?

Compsci 100, Fall 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...

Compsci 100, Fall Travelling Salesman: XKCD 399

Compsci 100, Fall Are hard problems easy? Clay PrizeClay Prize 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, no hard problems can be solved efficiently  showing the first problem was NP complete was an exercise in intellectual bootstrapping, satisfiability/Cook/(1971)

Compsci 100, Fall Theory and Practice l Number theory: pure mathematics  How many prime numbers are there?  How do we factor?  How do we determine primeness? l Computer Science  Primality is “easy”  Factoring is “hard”  Encryption is possible top secret public-key cryptography randomized primality testing

Compsci 100, Fall Useful Computer Science l a n+St,+Durham,+NC (Blue+Coffee+Express)&daddr=2324+Duk e +University+Road,+Durham,+NC+27708&hl=en&geocode=FcNJJQIdYw 5 M-yGT6vAZOfvdQg%3B&mra=ls&sll= , &sspn= , a n+St,+Durham,+NC (Blue+Coffee+Express)&daddr=2324+Duk e +University+Road,+Durham,+NC+27708&hl=en&geocode=FcNJJQIdYw 5 M-yGT6vAZOfvdQg%3B&mra=ls&sll= , &sspn= , Blue Express LSRC Research Dr 2324 Duke University Road

Compsci 100, Fall How does this work? l

Compsci 100, Fall In Re Boucher 2007 WL

Compsci 100, Fall Courses of Study l What do you take first? l What’s next? l In between? l Who teaches what?