Jeff Ericsion

Total Page:16

File Type:pdf, Size:1020Kb

Jeff Ericsion 2011‐10‐20 What is an Algorithm [Recall 2010]? • [Algorith m]: AllA well-orddlltifdered collection of Intro. to the Alg. World unambiguous and effectively computable operations that, when executed, produces a result and halts in a finite amount of time. Yang Wang • You may think Algorithm as abstract computation that is language independent. Writing It Down [Jeff Ericsion]: Writing It Down [Jeff Ericsion]: • [Pseudo code] uses the structure of formal programming languages to break algorithms • The syntax is a personal choice, but the into primitive steps. goalil is c lar ity an d prec is ion. • The primitive steps themselves may be written using mathematics, pure English, or a • Any programmer can implement quickly, mixture. without understanding why the algorithm works. • Question: Why not Natural Language or Programming Language? 1 2011‐10‐20 Practice Time Complexity • 1. Give a group of numbers, find the index • Best, Worst and Average Case fthfor the num bthtber that equa ltA?ls to A? Easy Hard • Should be: • 2. Give a group of sorted numbers, find – Independent of the specific machine the index for the number that equals to A? – Independent of the detailed implementation – Independent of the input size • Q: Which one is less complex? Q: How? Complexity Class Optimality • [Time Optimal] ‐ An algorithm for a given problem is time optimal if its time complexity reaches the lower bound over all the algorithms solving this problem. • [Objective Optimal]- e.g., minimize the number of money spend 2 2011‐10‐20 Solvability Tractability • [Tractable Problem, P]: a problem that can • Can algorithms solve all problems? . – NO. be solved in ppyolynomial time • [NP]: problems whose positive solutions [Turing halting problem] can be verified in polynomial time. – The problem has the description of a Turing • [NP-Complete]: the most difficult problem machine (Temporary analogy: a computer in NP, a quick algorithm to solve it can be program) as an input. used to solve all other NP problems quickly. – It asks whether this Turing machine will halt (whether the computer program will terminate • [NP-Hard]: at least as hard as the hardest after running for some time, or run forever). problems in NP. Heroes of Today • Stephen Cook • One of the seven Millennium Prize Problems selected by the Clay Mathematics Institute to carry a US$ 1,000,000. • Richard M. Karp 3 2011‐10‐20 Design Pattern Ultimate Dual Goal • • [Greedy Algorithm] I. Ability to analyze an algorithm: – Correct ? • [Divide & Conquer] (with [Recursion]) – Optimal? • [Dynamic Programming] – Complexity? • [Approximation Algorithm] – … • [Heuristic] and [Meta-heuristic] • II. Ability to solve a problem: • [Reduction] (e.g. [ILP], [Network Flow]) – Toolkits 4.
Recommended publications
  • Efficient Algorithms with Asymmetric Read and Write Costs
    Efficient Algorithms with Asymmetric Read and Write Costs Guy E. Blelloch1, Jeremy T. Fineman2, Phillip B. Gibbons1, Yan Gu1, and Julian Shun3 1 Carnegie Mellon University 2 Georgetown University 3 University of California, Berkeley Abstract In several emerging technologies for computer memory (main memory), the cost of reading is significantly cheaper than the cost of writing. Such asymmetry in memory costs poses a fun- damentally different model from the RAM for algorithm design. In this paper we study lower and upper bounds for various problems under such asymmetric read and write costs. We con- sider both the case in which all but O(1) memory has asymmetric cost, and the case of a small cache of symmetric memory. We model both cases using the (M, ω)-ARAM, in which there is a small (symmetric) memory of size M and a large unbounded (asymmetric) memory, both random access, and where reading from the large memory has unit cost, but writing has cost ω 1. For FFT and sorting networks we show a lower bound cost of Ω(ωn logωM n), which indicates that it is not possible to achieve asymptotic improvements with cheaper reads when ω is bounded by a polynomial in M. Moreover, there is an asymptotic gap (of min(ω, log n)/ log(ωM)) between the cost of sorting networks and comparison sorting in the model. This contrasts with the RAM, and most other models, in which the asymptotic costs are the same. We also show a lower bound for computations on an n × n diamond DAG of Ω(ωn2/M) cost, which indicates no asymptotic improvement is achievable with fast reads.
    [Show full text]
  • Great Ideas in Computing
    Great Ideas in Computing University of Toronto CSC196 Winter/Spring 2019 Week 6: October 19-23 (2020) 1 / 17 Announcements I added one final question to Assignment 2. It concerns search engines. The question may need a little clarification. I have also clarified question 1 where I have defined (in a non standard way) the meaning of a strict binary search tree which is what I had in mind. Please answer the question for a strict binary search tree. If you answered the quiz question for a non strict binary search tree withn a proper explanation you will get full credit. Quick poll: how many students feel that Q1 was a fair quiz? A1 has now been graded by Marta. I will scan over the assignments and hope to release the grades later today. If you plan to make a regrading request, you have up to one week to submit your request. You must specify clearly why you feel that a question may not have been graded fairly. In general, students did well which is what I expected. 2 / 17 Agenda for the week We will continue to discuss search engines. We ended on what is slide 10 (in Week 5) on Friday and we will continue with where we left off. I was surprised that in our poll, most students felt that the people advocating the \AI view" of search \won the debate" whereas today I will try to argue that the people (e.g., Salton and others) advocating the \combinatorial, algebraic, statistical view" won the debate as to current search engines.
    [Show full text]
  • Efficient Algorithms with Asymmetric Read and Write Costs
    Efficient Algorithms with Asymmetric Read and Write Costs Guy E. Blelloch1, Jeremy T. Fineman2, Phillip B. Gibbons1, Yan Gu1, and Julian Shun3 1 Carnegie Mellon University 2 Georgetown University 3 University of California, Berkeley Abstract In several emerging technologies for computer memory (main memory), the cost of reading is significantly cheaper than the cost of writing. Such asymmetry in memory costs poses a fun- damentally different model from the RAM for algorithm design. In this paper we study lower and upper bounds for various problems under such asymmetric read and write costs. We con- sider both the case in which all but O(1) memory has asymmetric cost, and the case of a small cache of symmetric memory. We model both cases using the (M, ω)-ARAM, in which there is a small (symmetric) memory of size M and a large unbounded (asymmetric) memory, both random access, and where reading from the large memory has unit cost, but writing has cost ω 1. For FFT and sorting networks we show a lower bound cost of Ω(ωn logωM n), which indicates that it is not possible to achieve asymptotic improvements with cheaper reads when ω is bounded by a polynomial in M. Moreover, there is an asymptotic gap (of min(ω, log n)/ log(ωM)) between the cost of sorting networks and comparison sorting in the model. This contrasts with the RAM, and most other models, in which the asymptotic costs are the same. We also show a lower bound for computations on an n × n diamond DAG of Ω(ωn2/M) cost, which indicates no asymptotic improvement is achievable with fast reads.
    [Show full text]
  • P Versus NP Richard M. Karp
    P Versus NP Computational complexity theory is the branch of theoretical computer science concerned with the fundamental limits on the efficiency of automatic computation. It focuses on problems that appear to Richard M. Karp require a very large number of computation steps for their solution. The inputs and outputs to a problem are sequences of symbols drawn from a finite alphabet; there is no limit on the length of the input, and the fundamental question about a problem is the rate of growth of the number of required computation steps as a function of the length of the input. Some problems seem to require a very rapidly growing number of steps. One such problem is the inde- pendent set problem: given a graph, consisting of points called vertices and lines called edges connect- ing pairs of vertices, a set of vertices is called independent if no two vertices in the set are connected by a line. Given a graph and a positive integer n, the problem is to decide whether the graph contains an independent set of size n. Every known algorithm to solve the independent set problem encounters a combinatorial explosion, in which the number of required computation steps grows exponentially as a function of the size of the graph. On the other hand, the problem of deciding whether a given set of vertices is an independent set in a given graph is solvable by inspection. There are many such dichotomies, in which it is hard to decide whether a given type of structure exists within an input object (the existence problem), but it is easy to decide whether a given structure is of the required type (the verification problem).
    [Show full text]
  • The P Versus Np Problem
    THE P VERSUS NP PROBLEM STEPHEN COOK 1. Statement of the Problem The P versus NP problem is to determine whether every language accepted by some nondeterministic algorithm in polynomial time is also accepted by some (deterministic) algorithm in polynomial time. To define the problem precisely it is necessary to give a formal model of a computer. The standard computer model in computability theory is the Turing machine, introduced by Alan Turing in 1936 [37]. Although the model was introduced before physical computers were built, it nevertheless continues to be accepted as the proper computer model for the purpose of defining the notion of computable function. Informally the class P is the class of decision problems solvable by some algorithm within a number of steps bounded by some fixed polynomial in the length of the input. Turing was not concerned with the efficiency of his machines, rather his concern was whether they can simulate arbitrary algorithms given sufficient time. It turns out, however, Turing machines can generally simulate more efficient computer models (for example, machines equipped with many tapes or an unbounded random access memory) by at most squaring or cubing the computation time. Thus P is a robust class and has equivalent definitions over a large class of computer models. Here we follow standard practice and define the class P in terms of Turing machines. Formally the elements of the class P are languages. Let Σ be a finite alphabet (that is, a finite nonempty set) with at least two elements, and let Σ∗ be the set of finite strings over Σ.
    [Show full text]
  • A Memorable Trip Abhisekh Sankaran Research Scholar, IIT Bombay
    A Memorable Trip Abhisekh Sankaran Research Scholar, IIT Bombay It was my first trip to the US. It had not yet sunk in that I had been chosen by ACM India as one of two Ph.D. students from India to attend the big ACM Turing Centenary Celebration in San Francisco until I saw the familiar face of Stephen Cook enter a room in the hotel a short distance from mine; later, Moshe Vardi recognized me from his trip to IITB during FSTTCS, 2011. I recognized Nitin Saurabh from IMSc Chennai, the other student chosen by ACM-India; 11 ACM SIG©s had sponsored students and there were about 75 from all over the world. Registration started at 8am on 15th June, along with breakfast. Collecting my ©Student Scholar© badge and stuffing in some food, I entered a large hall with several hundred seats, a brightly lit podium with a large screen in the middle flanked by two others. The program began with a video giving a brief biography of Alan Turing from his boyhood to the dynamic young man who was to change the world forever. There were inaugural speeches by John White, CEO of ACM, and Vint Cerf, the 2004 Turing Award winner and incoming ACM President. The MC for the event, Paul Saffo, took over and the panel discussions and speeches commenced. A live Twitter feed made it possible for people in the audience and elsewhere to post questions/comments which were actually taken up in the discussions. Of the many sessions that took place in the next two days, I will describe three that I found most interesting.
    [Show full text]
  • Alan Mathison Turing and the Turing Award Winners
    Alan Turing and the Turing Award Winners A Short Journey Through the History of Computer TítuloScience do capítulo Luis Lamb, 22 June 2012 Slides by Luis C. Lamb Alan Mathison Turing A.M. Turing, 1951 Turing by Stephen Kettle, 2007 by Slides by Luis C. Lamb Assumptions • I assume knowlege of Computing as a Science. • I shall not talk about computing before Turing: Leibniz, Babbage, Boole, Gödel... • I shall not detail theorems or algorithms. • I shall apologize for omissions at the end of this presentation. • Comprehensive information about Turing can be found at http://www.mathcomp.leeds.ac.uk/turing2012/ • The full version of this talk is available upon request. Slides by Luis C. Lamb Alan Mathison Turing § Born 23 June 1912: 2 Warrington Crescent, Maida Vale, London W9 Google maps Slides by Luis C. Lamb Alan Mathison Turing: short biography • 1922: Attends Hazlehurst Preparatory School • ’26: Sherborne School Dorset • ’31: King’s College Cambridge, Maths (graduates in ‘34). • ’35: Elected to Fellowship of King’s College Cambridge • ’36: Publishes “On Computable Numbers, with an Application to the Entscheindungsproblem”, Journal of the London Math. Soc. • ’38: PhD Princeton (viva on 21 June) : “Systems of Logic Based on Ordinals”, supervised by Alonzo Church. • Letter to Philipp Hall: “I hope Hitler will not have invaded England before I come back.” • ’39 Joins Bletchley Park: designs the “Bombe”. • ’40: First Bombes are fully operational • ’41: Breaks the German Naval Enigma. • ’42-44: Several contibutions to war effort on codebreaking; secure speech devices; computing. • ’45: Automatic Computing Engine (ACE) Computer. Slides by Luis C.
    [Show full text]
  • Computability and Complexity
    Computability and Complexity Wolfgang Schreiner [email protected] Research Institute for Symbolic Computation (RISC) Johannes Kepler University, Linz, Austria http://www.risc.jku.at Wolfgang Schreiner http://www.risc.jku.at 1/11 Computability and Complexity Theoretical computer science: Eternal truths established by means of mathematics/logic. Independent of future technological advances. Core questions: Computability: what is computable and what not? Complexity: how efficiently can something be computed? Clarifies limits of the field. Physics: build a perpetual motion machine. Impossible: violates second law of thermodynamics. Mathematics: square a circle with compass and straightedge. Impossible: p is not an algebraic number. Computer science: write a reliable halting checker. Impossible: the language of the halting problem is not recursive. Fundamental knowledge for every decent computer scientist. Wolfgang Schreiner http://www.risc.jku.at 2/11 The Big Picture (Wikipedia) We will cover selected points of this picture. Wolfgang Schreiner http://www.risc.jku.at 3/11 Theoretical Skeleton Die Theoretische Informatik . bietet Grundlagen für die Definition, Verifikation und Ausführung der Programme von Programmiersprachen, den Bau der Compiler von Programmiersprachen – den Compilerbau – und die mathematische Formalisierung und Untersuchung von meist diskreten Problemstellungen und deren Modellen. Mit Hilfe mathematischer Abstraktion der Eigenschaften von gewonnenen Modellen ergaben sich nützliche Definitionen, Sätze, Beweise, Algorithmen, Anwendungen und Lösungen von bzw. zu Problemen. Die Theoretische Informatik bildet mit ihren zeitlosen, mathematischen Wahrheiten und Methoden ein formales Skelett, das die Informatik in der Praxis mit konkreten Implementierungen durchdringt. Die Theoretische Informatik identifizierte viele unlösbare Problemstellungen mittels der Berechenbarkeitstheorie und erlaubt, häufig mit konstruktiver Beweisführung der Komplexitätstheorie, die Abgrenzung der praktisch effizient lösbaren Probleme von denen, für die das Gegenteil gilt.
    [Show full text]
  • The Psychology of Invention in Computer Science
    In P. Romero, J. Good, E. Acosta Chaparro & S. Bryant (Eds). Proc. PPIG 17 Pages 131 - 144 The Psychology of Invention in Computer Science Ronald J. Leach, Caprice A. Ayers Department of Systems and Computer Science Howard University Washington, DC 20059 [email protected], [email protected] Abstract. Much of the existing work on the psychology of programmers has been experimental. The purpose of this initial study is to help provide some avenues for future experimental research by addressing creativity in computer scientists. We studied several writings and published interviews with a number of prominent computer scientists in an effort to understand the nature of creativity in computer science and to develop a set of research questions to be answered about the thought processes of programmers. The intent was to identify similar factors of their experiences that may have contributed to their success. Parallels to some existing work on the nature of creativity in mathematics and architecture are also made. The paper concludes with a discussion of how the study of common experiences of creative research computer scientists can be extended to study the creative processes of programmers. Introduction Creativity in fields such as astronomy, music, mathematics, and engineering has long been studied. In the nineteenth and early twentieth centuries, it was common for scientists and mathematicians to publish expository papers, educating the masses and discussing creativity in their domains. Computer science derived initially from a combination of mathematical and electrical engineering principles, so one might expect similar patterns of creativity. While the majority of computer scientists have devoted their attention to solving complex problems and introducing new technology, few have written on the thought process behind their creations.
    [Show full text]
  • Laureates Meet Young Researchers in Heidelberg
    Editorial Editorial: Laureates Meet Young Researchers In Heidelberg Helge Holden (Norwegian University of Science and Technology, Trondheim, Norway), Hans Munthe-Kaas (Uni- versity of Bergen, Norway) and Dierk Schleicher (Jacobs University Bremen, Germany) Young scientists have a chance to meet some of the and Adi Shamir (the “RS” from the “RSA algorithm”), most successful mathematicians and computer scientists as well as Stephen Cook and Richard Karp, pioneers of at the newly established “Heidelberg Laureate Forum” complexity theory. (HLF), a week-long event that brings together Abel lau- The plenary talks covered a broad range of themes. reates, Fields medallists and Turing awardees with “lead- Sir Michael Atiyah gave his advice to young mathemati- ing scientists of the next generation”, that is, university cians based on his experiences of a long life in mathemat- students, doctoral students and postdocs. We all know ics and continued his enthusiastic interaction with the that personal encounters can have a decisive impact on younger generation in the informal parts of the forum our personal lives – and what can be more exciting for a and the social events. young and aspiring scientist than a face-to-face meeting Curtis McMullen discussed new connections between with the most prominent scientists in their area? This is motions of billiard balls, Riemann surfaces and moduli the idea of the forum. It was launched in September 2013 spaces. Blogger Dana Mackenzie summarised his im- and will take place annually. pressions of McMullen’s talk in his Scientific American The highly successful Lindau Nobel Laureate Meet- blog Dances, Billiards and Pretzels: “When I came to the ings have taken place for more than 60 years, providing Heidelberg Laureate Forum, I expected a feast for my a forum where young researchers and Nobel Laureates mind.
    [Show full text]
  • DEPARTMENT of COMPUTER SCIENCE, University of Toronto
    DEPARTMENT OF COMPUTER SCIENCE, University of Toronto Natural Science and Engineering Research Council of Canada (NSERC) 2012-2013 AWARDS Discovery Accelerator Supplement (DAS) Craig Boutilier This annual listing includes awards received between May 1, 2012 and Renée Miller April 30, 2013 by: Department of Computer Science faculty across the Google Focused Research Award 2012 St. George, Mississauga, and Scarborough campuses; departmental graduate Geoffrey Hinton students; undergraduate students in the computer science program on the Ruslan Salakhutdinov (cross-appointed to Statistics) St. George campus; and alumni engaged in startup activities. Richard Zemel RESEARCH & SERVICE AWARDS AND HONOURS Genome Canada and the Ontario Genomics Institute 2012 Gary Bader (Cross-appointed to Molecular Genetics) Gerhard Herzberg Canada Gold Medal for Science and Engineering (NSERC) 2013 Michael Brudno Stephen Cook Connaught New Researcher Awards, University of Toronto 2012 Fellow, Association for Computing Machinery (ACM) 2012 Azadeh Farzan Craig Boutilier Ruslan Salakhutdinov (Cross-appointed to Statistics) Bianca Schroeder Alfred P. Sloan Research Fellowship 2013 Bianca Schroeder Inventor of the Year Award, University of Toronto's Office of Research and Ruslan Salakhutdinov (cross-appointed to Statistics) Innovation 2013 Vinod Vaikuntanathan Daniel Wigdor Ricardo Jota (Postdoctoral Fellow) Outstanding Contribution to ACM Award 2012 C.C. (Kelly) Gotlieb Bell University Laboratories Chair in Information Systems 2012 Renée Miller Order of Ontario 2012
    [Show full text]
  • On Polynomial Time Approximation Bounded Solution for TSP and NP
    On Polynomial Time Absolute Approximation-bounded Solution of TSP and NP Complete Problems Wenhong Tiana aSchool of Information and Software Engineering, University of Electronic Science and Technology of China (UESTC) Abstract The question of whether all problems in NP class are also in P class is generally considered one of the most important open questions in mathematics and theoretical computer science as it has far-reaching conse- quences to other problems in mathematics, computer science, biology, philosophy and cryptography. There are intensive research on proving `NP not equal to P' and `NP equals to P'. However, none of the `proved' results is commonly accepted by the research community up to date. In this paper, motived by approx- imability of traveling salesman problem (TSP) in polynomial time, we provide a polynomial time absolute approximation-bounded solution of TSP in Euclidean space. It may shine light on solving other NP complete problems in similar way. Keywords: NP problems, P Problems, P versus NP, TSP, Polynomial Time Absolute Approximation Bounded Solutions 1. Introduction P versus NP problem is one of seven Millennium Prize Problems in mathematics that were stated by the Clay Mathematics Institute [1] in 2000. As of Dec 2016, six of the problems remain unsolved. The official statement of P versus NP problem was given by Stephen Cook [2]. In computational complexity theory, Karp's 21 NP-complete problems are a set of computational problems which are NP-complete. In his 1972 paper [9], Richard Karp used Stephen Cook's 1971 theorem that the Boolean satisfiability problem is NP-complete (also called the Cook-Levin theorem) to show that there is a polynomial time many-one reduc- tion from the Boolean satisfiability problem (BSP) to each of 21 combinatorial problems, thereby showing that they are all NP-complete.
    [Show full text]