CS 312: Algorithm Analysis Lecture #1: Algorithms and Efficiency This work is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported License.Creative.

Slides:



Advertisements
Similar presentations
CSci 107 Introduction to Computer Science Lecture 1.
Advertisements

Theory of Computing Lecture 1 MAS 714 Hartmut Klauck.
Lecture 1: Overview CMSC 201 Computer Science 1 (Prof. Chang version)
CS150 Introduction to Computer Science 1 Professor: Chadd Williams.
COMS W1004 Introduction to Computer Science May 28, 2008.
CS /29/2004 (Recitation Objectives) and Computer Science and Objects and Algorithms.
CSC 160 Computer Programming for Non-Majors Introduction Prof. Adam M. Wittenstein
EECS 395/495 Algorithmic Techniques for Bioinformatics General Introduction 9/27/2012 Ming-Yang Kao 19/27/2012.
Adapted from slides by Marie desJardins
CS Algorithm Analysis1 Algorithm Analysis - CS 312 Professor Tony Martinez.
CS 312: Algorithm Analysis Lecture #3: Algorithms for Modular Arithmetic, Modular Exponentiation This work is licensed under a Creative Commons Attribution-Share.
MA/CSSE 473 Day 01 Course Intro Algorithms Intro Pick up a handout from the back table.
BIT 115: Introduction To Programming1 Sit in front of a computer Log in –Username: 230class –password: –domain: student Bring up the course web.
CS 312: Algorithm Analysis
Welcome to CS 3260 Dennis A. Fairclough. Overview Course Canvas Web Site Course Materials Lab Assignments Homework Grading Exams Withdrawing from Class.
COMP Introduction to Programming Yi Hong May 13, 2015.
CS 103 Discrete Structures Lecture 01 Introduction to the Course
CS 312: Algorithm Design & Analysis Lecture #34: Branch and Bound Design Options for Solving the TSP: Tight Bounds This work is licensed under a Creative.
Lecture 1 Page 1 CS 111 Summer 2015 Introduction CS 111 Operating System Principles.
COMP 200 Elements of Computer Science COMP 130 Elements of Algorithms & Computation John Greiner Stephen Wong.
Making Connections Through the Grades in Mathematics
Algorithmic Problem Solving CMSC 201 Adapted from slides by Marie desJardins (Spring 2015 Prof Chang version)
Chapter Eight Academic Survival Skills. Study Skills  For most students time is the greatest issue.  The first rule to follow is to allow two or three.
CS 312: Algorithm Analysis Lecture #4: Primality Testing, GCD This work is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported License.Creative.
Processing & Java An Introduction to Computing. © Calvin College, Computer Science is no more about computers than astronomy is about telescopes.
About Me Jesse Hartloff, PhD Office: 203 Davis (may change) Office hours: TBD.
Instructor Cate O’dahl. Orientation  This class consists of all online Lecture with 11 hours of Lab required  See the Course Syllabus for details 
MA/CSSE 473 Day 02 Some Numeric Algorithms and their Analysis.
Introduction Algorithms and Conventions The design and analysis of algorithms is the core subject matter of Computer Science. Given a problem, we want.
CS 312: Algorithm Analysis Lecture #8: Non-Homogeneous Recurrence Relations This work is licensed under a Creative Commons Attribution-Share Alike 3.0.
1 8/29/05CS150 Introduction to Computer Science 1 Professor: Shereen Khoja
CS 140 Computer Programming (I) Second semester (3 credits) Imam Mohammad bin Saud Islamic University College of Computer Science and Information.
CS 312: Algorithm Analysis Lecture #32: Intro. to State-Space Search This work is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported.
CS 6961: Structured Prediction Fall 2014 Course Information.
CS 312: Algorithm Design & Analysis Lecture #23: Making Optimal Change with Dynamic Programming Slides by: Eric Ringger, with contributions from Mike Jones,
CS 312: Algorithm Design & Analysis Lecture #12: Average Case Analysis of Quicksort This work is licensed under a Creative Commons Attribution-Share Alike.
Mrs. Susan Ahrensdorf Room Welcome to CC6 Math.
Data Structures and Algorithms Introduction to Algorithms M. B. Fayek CUFE 2006.
CS 312: Algorithm Design & Analysis Lecture #24: Optimality, Gene Sequence Alignment This work is licensed under a Creative Commons Attribution-Share Alike.
ENGR Welcome to ENGR Excellence – Impact - Innovation.
CS 312: Algorithm Design & Analysis Lecture #2: Asymptotic Notation This work is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported.
CS 312: Algorithm Analysis Lecture #4: Primality Testing, GCD This work is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported License.Creative.
MA/CSSE 473 Day 02 Some Numeric Algorithms and their Analysis.
CSE 1105 Week 1 CSE 1105 Course Title: Introduction to Computer Science & Engineering Classroom Lecture Times: Section 001 W 4:00 – 4:50, 202 NH Section.
Copyright © 2007 Pearson Addison-Wesley. All rights reserved. Chapter 1 Introduction.
ICS202 Data Structures King Fahd University of Petroleum & Minerals College of Computer Science & Engineering Information & Computer Science Department.
CS 312: Algorithm Analysis Lecture #1: Algorithms and Efficiency This work is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported License.Creative.
CSE 1105 Week 1 CSE 1105 Introduction to Computer Science & Engineering Time: Wed 4:00 – 4:50 Thurs 9:30 – 10:20 Thurs 4:00 – 4:50 Place: 100 Nedderman.
CS 312: Algorithm Analysis Lecture #7: Recurrence Relations a.k.a. Difference Equations Slides by: Eric Ringger, with contributions from Mike Jones, Eric.
CS 312: Algorithm Analysis Lecture #8: Non-Homogeneous Recurrence Relations This work is licensed under a Creative Commons Attribution-Share Alike 3.0.
CS 312: Algorithm Analysis Lecture #33: Branch and Bound, Job Assignment This work is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported.
CS 312: Algorithm Analysis
CS 312: Algorithm Analysis Lecture #31: Linear Programming: the Simplex Algorithm, part 2 This work is licensed under a Creative Commons Attribution-Share.
CS 312: Algorithm Analysis Lecture #35: Branch and Bound Design Options - State Spaces Slides by: Eric Ringger, with contributions from Mike Jones, Eric.
CS 312: Algorithm Analysis Lecture #31: Linear Programming: the Simplex Algorithm, part 2 This work is licensed under a Creative Commons Attribution-Share.
CS 312: Algorithm Analysis Lecture #4: Primality Testing, GCD This work is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported License.Creative.
Why do we study algorithms?. 2 First results are about bats and dolphins.
CS 312: Algorithm Analysis Lecture #9: Recurrence Relations - Change of Variable Slides by: Eric Ringger, with contributions from Mike Jones, Eric Mercer,
CS 312: Algorithm Design & Analysis Lecture #26: 0/1 Knapsack This work is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported License.Creative.
CS 312: Algorithm Design & Analysis Lecture #29: Network Flow and Cuts This work is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported.
CS 312: Algorithm Analysis Lecture #30: Linear Programming: Intro. to the Simplex Algorithm This work is licensed under a Creative Commons Attribution-Share.
1.  A step by step process to solve any problem is called algorithm.  Algorithm is a process which take some values as input and provide us output.
Introduction to CSCI 1311 Dr. Mark C. Lewis
RAIK 283 Data Structures and Algorithms
CSIS 104 –Intro. To Computer Science
Data Structures and Algorithms CSE 465
Algorithms Algorithm. [webster.com] A procedure for solving a mathematical problem (as of finding the greatest common divisor) in a finite number of steps.
Design and Analysis of Algorithms
CSCI 203: Introduction to Computer Science I
Welcome to the most Amazing course there is 
Presentation transcript:

CS 312: Algorithm Analysis Lecture #1: Algorithms and Efficiency This work is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported License.Creative Commons Attribution-Share Alike 3.0 Unported License Slides by: Eric Ringger, with contributions from Mike Jones, Eric Mercer, Sean Warnick

Introduction  Prayer  Spiritual/interesting thought

Thought “Education is not the filling of a bucket but the lighting of a fire.” W. B. Yeats

Objectives for Today  Introduce course objectives  Quickly cover course info.  Define Problems, Solutions, and Algorithms  Introduce 3 Questions  Motivate the need for Analysis

Course Objectives  Develop your general problem solving skills!  Learn to perform theoretical analysis of algorithms  Learn to perform empirical analysis of algorithms  Compare theoretical and empirical analysis  Become familiar with several families of algorithms suitable for solving many kinds of problems  Use Visual Studio and C#

Course Info.  Office Hours: TBD & By appointment  Web page:  Syllabus – read today!  Regularly updated schedule  Due dates  Reading assignments  Homework assignments  Project guidelines  Lecture notes  paul_felt AT byu DOT edu

More Course Info.  Google Group: “BYU CS 312 Summer”  Announcements  Forum for discussion  Subscribe and participate!  Gradebook:

Work Load  6 hours/week in class  12 hours/week out of class  Weekly projects  Daily Reading and Homework

Course Policies  Grades  Early  Late  Other See syllabus for details

Another Thought “Computer Science is no more about computers than Astronomy is about telescopes.” -- Michael R. Fellows and Ian Parberry * * often misattributed to Edsger Dijkstra!

Definitions  What is a problem?  What is a solution?

Problems and Their Solutions Domain Input SetOutput Set Range Solution: Algorithm Computing Device Problem Instances Problem:

Properties of an Algorithm algorithm  “A finite sequence of well-defined steps for solving a problem.” (like a recipe)  Also Interested in Efficiency (as a function of inputs)

A Little History Abu Jafar Mu ḥ ammad ibn Mūsā  ca. 780 – ca. 850  “al-Khwārizmī”  “the (man) of Khwarizm”, his place of origin  Khiva in present-day Uzbekistan and Turkmenistan  Persian astronomer and mathematician  Worked in Baghdad  Authored many texts on arithmetic and algebra  Methods for  Adding  Multiplying  Dividing  Extracting square roots  Calculating digits of   Properties:  Precise  Unambiguous  Mechanical  Efficient  Correct Leonardo of Pisa, “Fibonacci”  ca – ca  Coined “algorithms” in his honor.  Also imported Hindu-Arabic numeral system

Fibonacci 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, … Problem: compute the nth Fibonacci number, described here as mathematical recurrence relation

Solution: Algorithm

Three Questions 1.Is it correct? 2.How much time does it take, as a function of n? 3.Can we do better?

Is it Correct? function fib1(n) if n=0: return 0 if n=1: return 1 return fib1(n-1) + fib1(n-2)

How much time does it take as a function of n?

Can we do better?  Key idea: Store the intermediate results function fib2(n) if n=0: return 0 create an array f[0..n] f[0] = 0, f[1] = 1 for i = 2.. n: f[i] = f[i-1] + f[i-2] return f[n]

Our Problem Solving Strategy  For a given problem,  Pick a computational platform (with associated elementary operations)  Write an algorithm to solve the problem  Ask the three questions:  Make sure that it is correct  Analyze the efficiency of the algorithm  Look for opportunities for improvement

Why Rigorous Analysis? “A person well trained in computer science knows how to deal with algorithms: how to construct them, manipulate them, understand them, analyze them. This knowledge is preparation for much more than writing good computer programs; it is a general-purpose mental tool that will be a definite aid to the understanding of other subjects, whether they be chemistry, linguistics, or music, etc. The reason for this may be understood in the following way: It has often been said that a person does not really understand something until after teaching it to someone else. Actually, a person does not really understand something until after teaching it to a computer, i.e. expressing it as an algorithm… An attempt to formalize things as algorithms leads to a much deeper understanding than if we simply try to comprehend things in the traditional way.” Donald Knuth from Selected Papers on Computer Science,1996

Assignment  Submit your schedule constraints on whenisgood calendar  Join Google Group   Visual Studio  Install Visual Studio (follow directions in syllabus) or use an open lab machine  Try out C# using tutorials (see links in syllabus)