The Beauty and Joy of Computing

Similar documents
The Beauty and Joy of Computing

CS10: The Beauty and Joy of Computing Lecture #6: Algorithms

CS10 The Beauty and Joy of Computing

The Beauty and Joy of Computing

The Beauty and Joy of Computing

The Beauty and Joy of Computing

CS10 The Beauty and Joy of Computing

150 Students Can t Be Wrong! GamesCrafters,, a Computational Game Theory Undergraduate Research and Development Group at UC Berkeley

CS10 : The Beauty and Joy of Computing

CS 188: Artificial Intelligence Spring Game Playing in Practice

The Beauty and Joy of Computing

CS10 The Beauty and Joy of Computing

Why Affiliate Marketing Doesn t Work for You

CS10 Final Exam Review. August 5, 2012

Announcements. CS 188: Artificial Intelligence Fall Today. Tree-Structured CSPs. Nearly Tree-Structured CSPs. Tree Decompositions*

CS 188: Artificial Intelligence Spring 2007

Name: Exam 01 (Midterm Part 2 take home, open everything)


Programmable self-assembly in a thousandrobot

Instructor: Teaching Assistants: Justin Hsia Anupam Gupta, Cheng Ni, Eugene Oh, Sam Wolfson, Sophie Tian, Teagan Horkan

COS 402 Machine Learning and Artificial Intelligence Fall Lecture 1: Intro

HUMAN COMPUTER INTERACTION 0. PREFACE. I-Chen Lin, National Chiao Tung University, Taiwan

CSci 1113: Introduction to C/C++ Programming for Scientists and Engineers Homework 2 Spring 2018

Announcements. CS 188: Artificial Intelligence Spring Game Playing State-of-the-Art. Overview. Game Playing. GamesCrafters

CS 188: Artificial Intelligence Spring Announcements

Advanced Data Visualization

Practice Midterm Exam 5

Elements of Artificial Intelligence and Expert Systems

CS101 Lecture 28: Sorting Algorithms. What You ll Learn Today

Montessori Rationale. study and materials. She brought us the phrase follow the child, as that is how we might all

Computer Science as a Discipline

CS10 : The Beauty and Joy of Computing

A Balanced Introduction to Computer Science, 3/E

CS 380: ARTIFICIAL INTELLIGENCE INTRODUCTION. Santiago Ontañón

CS 591 S1 Midterm Exam Solution

Comp551: Advanced Robotics Lab Lecture 7: Consensus CSE481C wi09 - Robotics Capstone, Lec3: Consensus

Introduction to cognitive science Session 3: Cognitivism

CSE 355: Human-aware Robo.cs Introduction to Theoretical Computer Science

Markov Chains in Pop Culture

Previous Lecture. How can computation sort data faster for you? Sorting Algorithms: Speed Comparison. Recursive Algorithms 10/31/11

Set BIG goals! Dream BOLD dreams!

School of Computer Science McGill University

Computability. What can be computed?

Unit 12: Artificial Intelligence CS 101, Fall 2018

PREPARING FOR A JOB INTERVIEW GENERAL INTERVIEW PREP SPECIFIC INTERVIEW PREP

2 Smart Cities. Big Data, Real Time Transport, Social Media, and Urban Simulation Michael

Tech is Here to Stay and Changing Everyday: Here s How Those Changes Can Help You With excerpts from an interview with Jean Robichaud, CTO, of

CS 188: Artificial Intelligence. Overview

The game of poker. Gambling and probability. Poker probability: royal flush. Poker probability: four of a kind

How To Make Money With CPALead

Administrivia. CS 188: Artificial Intelligence Spring Agents and Environments. Today. Vacuum-Cleaner World. A Reflex Vacuum-Cleaner

Ants vs SomeBees (Object-Oriented Tower Defense Game) John DeNero, Tom Magrino, and Eric Tzeng

The Principles Of A.I Alphago

Grad school. Much material taken from or inspired by Matt Might and Dianne O'Leary; see last page for credits

FORGING PYTHON BEST PRACTICES AND LIFE LESSONS DEVELOPING PYTHON

Writing Equations from Word Problems Dominoes

Math Fundamentals for Statistics (Math 52) Unit 2:Number Line and Ordering. By Scott Fallstrom and Brent Pickett The How and Whys Guys.

Course Form for PKU Summer School International 2019

The Roller-Coaster History of Artificial Intelligence and its Impact on the Practice of Law

Artificial Intelligence and Deep Learning

Intro to AI. AI is a huge field. AI is a huge field 2/19/15. What is AI. One definition:

20 ONLINE BUSINESS IDEAS

CS103 Handout 25 Spring 2017 May 5, 2017 Problem Set 5

Lab 11: GoFirst and Nim 12:00 PM, Nov 19, 2017

THE USE OF ARTIFICIAL INTELLIGENCE AND MACHINE LEARNING IN SPEECH RECOGNITION. A CS Approach By Uniphore Software Systems

Lecture 1 What is AI?

THE ULTIMATE GUIDE TO FACEBOOK MARKETING

CS101 Lecture 19: Digital Images. John Magee 18 July 2013 Some material copyright Jones and Bartlett. Overview/Questions

First Tutorial Orange Group

Announcements. CS 188: Artificial Intelligence Fall Local Search. Hill Climbing. Simulated Annealing. Hill Climbing Diagram

Lecture Overview. Artificial Intelligence Part I. Lab Exam Results. Evaluations

Meta Scientific Discovery Beyond Search CHAN ZUCKERBERG INITIATIVE

Creating a Poker Playing Program Using Evolutionary Computation

Kwill Gold Deal - $3999

The Nature of Informatics

INTRODUCTION TO COMPUTER GRAPHICS

Lydia B. Chilton Curriculum Vitae

MITOCW watch?v=krzi60lkpek

ENGINEERING OPTIMIZATION S RAO

Algorithms and Data Structures CS 372. The Sorting Problem. Insertion Sort - Summary. Merge Sort. Input: Output:

Lydia B. Chilton Curriculum Vitae

User Research in Fractal Spaces:

Introduction. Lecture 0 ICOM 4075

Open Data How Companies and Society may benefit

SlideShare Traffic Rush

Overview. Pre AI developments. Birth of AI, early successes. Overwhelming optimism underwhelming results

The Internet, Social Media and Your Online Reputation

January 11, 2017 Administrative notes

Solving All 164,604,041,664 Symmetric Positions of the Rubik s Cube in the Quarter Turn Metric

Welcome to CSC384: Intro to Artificial MAN.

Stamp Price Guide 2015 READ ONLINE

Artificial Intelligence

Billionaire Vs. Bieber

Texas Hold em Inference Bot Proposal. By: Brian Mihok & Michael Terry Date Due: Monday, April 11, 2005

Copyright 2015 Silicon Valley Digital Marketing Institute, All Rights Reserved

Hierarchical Controller for Robotic Soccer

What is Tableau and Why Should I Care? Karen Rahmeier and Melissa Perry, Codecinella Madison WI, June 26, 2018

Recommendations Worth a Million

Intro to AI. AI is a huge field. AI is a huge field 2/26/16. What is AI (artificial intelligence) What is AI. One definition:

Copyright Ellen Finkelstein, Inc. All Rights Reserved. For coaching and consulting, contact

Transcription:

UC Berkeley EECS Sr Lecturer SOE Dan Garcia The Beauty and Joy of Computing Lecture #6 Algorithms Quest REVIEW in 8 days! Quest (first exam) in in 9 days! PREDICTING THE FUTURE? MIT researchers recently created an algorithm which they say will be able to predict what topics will trend or go viral on Twitter hours before they do. Its accuracy expected to get better with time. They are using Aritifical Intelligence (Machine Learning) to get better results. UC Berkeley CS CS10 TA Michael Ball http://web.mit.edu/newsoffice/2012/predicting-twitter-trending-topics-1101.html!

World record for solving a 3x3x3 Rubik's cube? a) 12 minutes, 3 seconds b) 58.1 seconds c) 7.96 seconds d) 5.66 seconds e) 3.31 seconds UC Berkeley The Beauty and Joy of Computing : Algorithms (2)

Rubik's Cube Champion www.youtube.com/watch?v=3v_km6cv6du Feliks Zemdegs (b 1995) 5.66 seconds, Melbourne Winter Open UC Berkeley The Beauty and Joy of Computing : Algorithms (3)

What is an algorithm? An algorithm is any well-defined computational procedure that takes some value or set of values as input and produces some value or set of values as output. The concept of algorithms, however, is far older than computers. UC Berkeley The Beauty and Joy of Computing : Algorithms (4)

Early Algorithms Dances, ceremonies, recipes, and building instructions are all conceptually similar to algorithms. Babylonians defined some fundamental mathematical procedures ~3,600 years ago. Photo credit: Daniel Niles UC Berkeley The Beauty and Joy of Computing : Algorithms (5)

Algorithms You've Seen Multiplication algorithm (for humans) 2! 187! X 53! 187! X 53 1! 187! X 53 1! UC Berkeley The Beauty and Joy of Computing : Algorithms (6)

Algorithms You've Seen in CS10 Length of word Whether a word appears in a list Whether a list is sorted Greet a List of People (Last Lab) Word Comparisons (You wrote one for HW1!) Sort a List (Next lab!) UC Berkeley The Beauty and Joy of Computing : Algorithms (7)

http://xkcd.com/518/ How much money is an Algorithm worth? a) Nothing! b) $1000 or less c) $1 Million d) $1 Billion e) More than $1 Billion! UC Berkeley The Beauty and Joy of Computing : Algorithms (8)

Commonly-Used Algorithms Luhn algorithm Credit card number validation Deflate Lossless data compression PageRank Google s way of measuring reputation of web pages EdgeRank Facebook s method for determining what is highest up on your news feed UC Berkeley The Beauty and Joy of Computing : Algorithms (9)

Choosing a Technique Most problems can be solved in more than one way, i.e., multiple algorithms exist to describe how to find the solution. Not all of these algorithms are created equal. Very often we have to make some trade-offs when we select a particular one. We'll talk more about these next time. UC Berkeley The Beauty and Joy of Computing : Algorithms (10)

Ways to Attack Problems Many ways to approach an algorithm! Top-down Starting from the top, divide the full problem up into smaller subproblems, working your way down. You often write stubs for missing parts below to test your code before it s done Bottom-up Starting from the bottom (smallest thing you need to do), work your way up, building your way up. Your system always works as you build layers on top of working (smaller) pieces. UC Berkeley The Beauty and Joy of Computing : Algorithms (11)

Top-down vs Bottom-up example HTML5 front-end Server Database Solver Game UC Berkeley The Beauty and Joy of Computing : Algorithms (12)

Algorithms vs. Functions & Procedures Algorithms are conceptual definitions of how to accomplish a task and are language agnostic, usually written in pseudo-code. Find max value in list A function or procedure is an implementation of an algorithm, in a particular language. Find max value in list Set (a temporary variable) the max as the first element Go through every element, compare to max, and if it s bigger, replace the max Return the max UC Berkeley The Beauty and Joy of Computing : Algorithms (13)

Algorithm Correctness We don't only want algorithms to be fast and efficient; we also want them to be correct! TOTAL Correctness Always reports, and the answer is always correct. PARTIAL Correctness Sometimes reports, and the answer is always correct when it reports. We also have probabilistic algorithms that have a certain probability of returning the right answer. UC Berkeley The Beauty and Joy of Computing : Algorithms (14)

Summary The concept of an algorithm has been around forever, and is an integral topic in CS. Algorithms are welldefined procedures that can take inputs and produce output (or have side-effects). We're constantly dealing with trade-offs when selecting / building algorithms. Correctness is particularly important and testing is the most practical strategy to ensure it. Many write tests first! UC Berkeley The Beauty and Joy of Computing : Algorithms (15)

en.wikipedia.org/wiki/turing_completeness Turing Completeness ironphoenix.org/tril/tm/! A Turing Machine has an infinite tape of 1s and 0s and instructions that say whether to move the tape left, right, read, or write it ú Can simulate any computer algorithm! A Universal Turing Machine is one that can simulate a Turing machine on any input Turing Machine by Tom Dunne A language is considered Turing Complete if it can simulate a Universal Turing Machine ú A way to decide that one programming language or paradigm is just as powerful as another Xkcd comic Candy Button Paper UC Berkeley The Beauty and Joy of Computing : Algorithms (16)

Are Scratch & BYOB Turing Complete? a) Nope, not a chance! b) Scratch Only c) BYOB Only d) Of course! UC Berkeley The Beauty and Joy of Computing : Algorithms (17)