DOC PREVIEW
UCSD CSE 101 - Introduction

This preview shows page 1-2-3-4-30-31-32-33-34-61-62-63-64 out of 64 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 64 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 64 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 64 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 64 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 64 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 64 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 64 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 64 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 64 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 64 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 64 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 64 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 64 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 64 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

CSE 101, Winter 2002 Design and Analysis of Algorithms Instructor: Andrew B. Kahng, http://vlsicad.ucsd.edu Email: [email protected] Telephone: 858-822-4884 office, 858-353-0550 cell Office Hours: MW noon-2pm, TuTh 8:30-9:30pm Office: 3802 AP&M Class webpage: http://vlsicad.ucsd.edu/courses/cse101/Goals of CourseCourse LogisticsCourse BehaviorIntroduction to LectureIntroduction: What Is This Course About ?Undirected s-t ConnectivityCourse OverviewCourse Overview (cont.)Slide 10What is a Problem?Problem-Solving First ExampleProblem-Solving First Example (cont.)Slide 14Question: What Makes One Algorithm Better (or Worse) Than Another?Problem-Solving Second ExampleProblem-Solving Second Example (cont.)Slide 18Slide 19Proving That the Algorithm is “Good”Slide 21Slide 22Do You Remember Recurrences?Do You Remember Recurrences? (cont.)Useful and Challenging QuestionsChoosing Between SolutionsDo You Remember Data Structures?Do You Remember Data Structures? (cont.)Slide 29Quantifying “Better”, “Worse”Using “Big-Oh” NotationMotivation for a Resource ModelThe RAM (Random-Access Machine) ModelThe RAM Model (cont.)What Do We Measure?Can Characterize Problem ComplexitySorting (With Comparisons)Comparison-based LB Arguments - SortingSorting Lower Bound (cont.)Average-Case Complexity of SortingAverage-Case Complexity of Sorting (cont.)A Sorting ExcursionPractical IssuesInsertion SortInsertion Sort Execution ExampleInsertion Sort ComplexitySelection Sort(Fun/Useful) Questions to Think AboutDivide and Conquer for Sorting (2.3/1.3)Merging Two SubsequencesMerge Sort Execution ExampleRecursion TreeQuicksort (7.1-7.2/8.1-8.2)Divide = PartitionHow It WorksRuntime of QuicksortSlide 57Dynamic Sets (III, Introduction)Operations (III, Introduction)Elementary DS (10.1/11.1 )Priority Queues (6.5/7.5)Heaps (6.1/7.1)Heap Operations (6.2-5/7.2-5)Heapsort (6.4/7.4)CSE 101, Winter 2002Design and Analysis of AlgorithmsInstructor: Andrew B. Kahng, http://vlsicad.ucsd.eduEmail: [email protected]: 858-822-4884 office, 858-353-0550 cellOffice Hours: MW noon-2pm, TuTh 8:30-9:30pm Office: 3802 AP&MClass webpage: http://vlsicad.ucsd.edu/courses/cse101/Goals of Course•Introduction to design and analysis of algorithms•“Problem-solving”•Classic Problems–Sorting, Path-Finding, String-Matching, Arithmetic, …•Tools–Recurrence Relations, Some Counting Techniques, Reduction, Probabilistic Analysis, NP-Completeness, …•Frameworks–Divide-and-Conquer, Greed, Dynamic Programming, Branch-and-Bound, Heuristics, …•Classic dilemmas–Ordering of material ? We’ll see a reasonable choice–“Execution” or “Innovation” ? More emphasis on latter–Scope: Very broad – may feel like drinking from a firehose, but the material is coherent You need to keep up – and I assume you are keeping up (notes, extra questions, readings, HW…)Course Logistics•Textbook: Cormen et al., 2nd edition (2001)•Lecture Room: likely to change ( Center 101?)•Discussion – 3 sections have been added:•Wed 09:05 A 09:55 A WLH 2204 (76 seats)•Fri 10:10 A 11:00 A CSB 002 (120 seats)•Wed 11:15 A 12:05 P CENTR 212 (146 seats)•May develop material that is not covered in lecture (e.g., solution of recurrence relations, structure of induction proofs, etc.)•Four TAs: Joe Drish, Victor Gidofalvi, Eric Hall, Cynthia Sheng •Homework: ~ 6 assignments with 7-10 day lead times–First assignment posted on Thursday, January 10 – check website!–Hard due dates (solutions posted on the web); zero credit if late–THERE WILL BE IN-CLASS QUIZZES (2-3) + EC Problems•Grading–40% HW AND QUIZZES (do not violate academic conduct rules), 25% in-class midterm (Feb 7), 35% final (March 22, 7pm)Course Behavior•Basic Courtesy–Cell phones and other distractions must be turned OFF•Range of abilities–This is a required course–Everyone should learn something from it–If you are bored or know material already, realize that not everyone else may be in the same positionIntroduction to Lecture•Assigned reading: –Chapters 1-4 (background, asymptotic growth rates, recurrences)–Chapters 6, 7 (heapsort, quicksort)•This week–Criteria for algorithms (correctness, efficiency, …) and some example analyses–Asymptotic growth of functions (“Big-O notation”)–Examples of recurrences–A Sorting Excursion•Lower Bounds (worst- and average-case)•Practical issues•Simple methods•Closing the Gap (Heapsort, and D/Q Framework (Mergesort, Quicksort))•Example of Randomized Analysis•Next week–Selection–The D/Q FrameworkIntroduction: What Is This Course About ?•An algorithm is a method for solving a problem (on a computer)•Problem: “Given fraction m/n, reduce to lowest terms.”•An algorithm must be effective–In particular: give correct answer, halt•Problem: “Given undirected graph G = (V,E) and vertices s,t  V, is there a path in G from s to t ?”•State an algorithm for this problem•Other problem examples:•Given a set of points in the plane, find the closest pair•Given a set of points in the plane, find the shortest tour that visits each point exactly once (“Traveling Salesman Problem”)Undirected s-t Connectivity•A1: BFS, DFS from s.•A2: Take a random walk in G, starting at s.–Is this an algorithm? (Does it halt?)•A3: Take a random walk in G for 5n3 steps starting at s (n = |V|); return NO iff we don’t visit t.–Is this an algorithm? –Does it “almost always” return the correct answer?•Do A3, A1 differ in terms of resources used?–A3 “trades” time for space, is “memoryless”.–A3: probabilistic effectiveness.G = (V,E)stt’Course Overview•Themes: Problem solving, “Spirit of Computing”, real-world necessity •Examples of “real-world necessity”–DNA Sequencing•Evolutionary Trees (edit distance, Steiner trees...)•Finding homologues, evolutionary significance (string-match)–Conformational Analysis (min-energy state)–Autonomous Robots, Vehicles•(managing smart highways, collision avoidance / path planning, …)–Logistics (scheduling, resource allocation, …)–Design of VLSI circuits (placement, routing, partitioning, floorplanning, clock distribution, logic synthesis, …)Course Overview (cont.)•What buys more, hardware or software?–FFT, Quicksort, etc.–Throwing hardware at a problem is usually not the right answer•Patterns of problem-solving –e.g., Polya, How to


View Full Document

UCSD CSE 101 - Introduction

Download Introduction
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Introduction and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Introduction 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?