Lecture 29 CSE 331 Nov 11, 2009. To be strictly enforced For the rest of the semester on Fridays SUBMIT your HOMEWORKS by 1:10 PM.

Slides:



Advertisements
Similar presentations
September 12, Algorithms and Data Structures Lecture III Simonas Šaltenis Nykredit Center for Database Research Aalborg University
Advertisements

Lecture 30 CSE 331 Nov 8, HW 7 due today Place Q1, Q2 and Q3 in separate piles I will not accept HWs after 1:15pm DO NOT FORGET TO WRITE DOWN YOUR.
Recursion & Merge Sort Introduction to Algorithms Recursion & Merge Sort CSE 680 Prof. Roger Crawfis.
MergeSort (Example) - 1. MergeSort (Example) - 2.
Lecture 30 CSE 331 Nov 13, To be strictly enforced For the rest of the semester on Fridays SUBMIT your HOMEWORKS by 1:10 PM.
Lecture 38 CSE 331 Dec 7, The last few days Today: Solutions to HW 9 (end of lecture) Wednesday: Graded HW 9 (?), Sample final, Blog post on the.
Lecture 37 CSE 331 Nov 4, Homework stuff (Last!) HW 10 at the end of the lecture Solutions to HW 9 on Monday Graded HW 9 on.
Lecture 26 CSE 331 Nov 4, The week of Nov 16 Jeff will be out of town for a conference Recitations and office hour cancelled for that week Two extra.
Lecture 13 CSE 331 Oct 2, Announcements Please turn in your HW 3 Graded HW2, solutions to HW 3, HW 4 at the END of the class Maybe extra lectures.
CSE 421 Algorithms Richard Anderson Lecture 12 Recurrences.
Lecture 32 CSE 331 Nov 18, HW 8 solutions Friday.
Lecture 31 CSE 331 Nov 16, Jeff is out of town this week No regular recitation or Jeff’s normal office hours I’ll hold extra Question sessions Mon,
Lecture 34 CSE 331 Nov 19, HW 9 due today Q1 in one pile and Q 2+3 in another I will not take any HW after 1:15pm.
Lecture 33 CSE 331 Nov 20, Homeworks Submit HW 9 by 1:10PM HW 8 solutions at the end of the lecture.
CS2420: Lecture 10 Vladimir Kulyukin Computer Science Department Utah State University.
Lecture 5 CSE 331 Sep 11, HW 1 out today Will be handed out at the END of the lecture Read the homework policy document carefully START EARLY! ©ehow.com.
Lecture 34 CSE 331 Nov 23, Homework related stuff Graded HW 8+9, solutions to HW 9 the week after Thanksgiving.
Lecture 37 CSE 331 Dec 1, A new grading proposal Towards your final score in the course MAX ( mid-term as 25%+ finals as 40%, finals as 65%) .
Lecture 33 CSE 331 Nov 17, Online office hours Alex will host the office hours.
CSE 421 Algorithms Richard Anderson Lecture 11 Recurrences.
Lecture 28 CSE 331 Nov 5, HW 7 due today Q1 in one pile and Q 2+3 in another I will not take any HW after 1:15pm.
Lecture 30 CSE 331 Nov 10, Online Office Hours
Unit 1. Sorting and Divide and Conquer. Lecture 1 Introduction to Algorithm and Sorting.
October 1, Algorithms and Data Structures Lecture III Simonas Šaltenis Nykredit Center for Database Research Aalborg University
Solve Exponential and Logarithmic Equations Lesson 7.6 Algebra II.
Merge Sort Solving Recurrences The Master Theorem
CompSci 102 Discrete Math for Computer Science April 17, 2012 Prof. Rodger.
Lecture 38 CSE 331 Dec 2, Review Sessions etc. Atri: (at least ½ of) class next Friday Jiun-Jie: Extra office hour next Friday Jesse: Review Session.
Lecture 28 CSE 331 Nov 9, Mini project report due WED.
7 th Grade Language Arts Monday, October 5, 2015 No DOL this week Harris and Me Begin writing assessment- “Seventh Grade” Must be submitted by Friday at.
Foundations II: Data Structures and Algorithms
Lecture 8 CSE 331. Main Steps in Algorithm Design Problem Statement Algorithm Problem Definition “Implementation” Analysis n! Correctness+Runtime Analysis.
Data Structures and Algorithms in Parallel Computing Lecture 8.
Sorting Algorithms Merge Sort Quick Sort Hairong Zhao New Jersey Institute of Technology.
1 Algorithms CSCI 235, Fall 2015 Lecture 7 Recurrences II.
Lecture 18 CSE 331 Oct 12, HW 5 due today Q1, Q2 and Q3 in different piles I will not take any HW after 1:15pm.
Lecture 18 CSE 331 Oct 6, Group/Algo registration deadline BOTH DUE WED by 11:59pm!
Daily Math Review September 2-6, Monday Solve the following problems with strategies and/or algorithms 5, = 9, = 3, =
1 Overview Divide and Conquer Merge Sort Quick Sort.
8 th Grade Language Arts Monday, October 5, 2015 No DOL this week Far North Begin essay assessment- “Charles” Must be submitted by Friday at 9 P.M.
Unit 1. Sorting and Divide and Conquer
Lecture 26 CSE 331 Nov 2, 2016.
Chapter 2: Getting Started
Algorithm Lecture #09 Dr.Sohail Aslam.
Lecture 30 CSE 331 Nov 11, 2016.
Lecture 26 CSE 331 Nov 1, 2017.
Richard Anderson Lecture 11 Recurrences
Lecture 27 CSE 331 Nov 3, 2017.
Lecture 32 CSE 331 Nov 14, 2011.
Lecture 29 CSE 331 Nov 8, 2017.
CSE 2010: Algorithms and Data Structures
Lecture 30 CSE 331 Nov 10, 2017.
Lecture 27 CSE 331 Oct 31, 2014.
Recurrence Equation Masters Theorem
Lecture 28 CSE 331 Nov 7, 2012.
Lecture 18 CSE 331 Oct 9, 2017.
Lecture 31 CSE 331 Nov 14, 2012.
Lecture 31 CSE 331 Nov 12, 2010.
Lecture 36 CSE 331 Nov 30, 2012.
Lecture 30 CSE 331 Nov 12, 2012.
Algorithms CSCI 235, Spring 2019 Lecture 7 Recurrences II
Application: Efficiency of Algorithms II
Lecture 31 CSE 331 Nov 11, 2011.
Application: Efficiency of Algorithms II
Lecture 30 CSE 331 Nov 9, 2011.
Lecture 19 CSE 331 Oct 10, 2016.
Richard Anderson Lecture 12, Winter 2019 Recurrences
Lecture 27 CSE 331 Nov 4, 2016.
Richard Anderson Lecture 12 Recurrences
Lecture 27 CSE 331 Nov 1, 2013.
Presentation transcript:

Lecture 29 CSE 331 Nov 11, 2009

To be strictly enforced For the rest of the semester on Fridays SUBMIT your HOMEWORKS by 1:10 PM

Extra Q sessions next week Monday and Tuesday 4-6pm CSE 242

Mergesort algorithm Input: a 1, a 2, …, a n Output: Numbers in sorted order MergeSort( a, n ) If n = 2 return the order min(a 1,a 2 ); max(a 1,a 2 ) a L = a 1,…, a n/2 a R = a n/2+1,…, a n return MERGE ( MergeSort(a L, n/2), MergeSort(a R, n/2) )

An example run MergeSort( a, n ) If n = 2 return the order min(a 1,a 2 ); max(a 1,a 2 ) a L = a 1,…, a n/2 a R = a n/2+1,…, a n return MERGE ( MergeSort(a L, n/2), MergeSort(a R, n/2) )

Correctness Input: a 1, a 2, …, a n Output: Numbers in sorted order MergeSort( a, n ) If n = 2 return the order min(a 1,a 2 ); max(a 1,a 2 ) a L = a 1,…, a n/2 a R = a n/2+1,…, a n return MERGE ( MergeSort(a L, n/2), MergeSort(a R, n/2) ) By induction on n Inductive step follows from correctness of MERGE

Today’s agenda Show that Mergesort runs in O(n log n) time Solve recurrences

To be strictly enforced For the rest of the semester on Fridays SUBMIT your HOMEWORKS by 1:10 PM