“MM – Median of Medians”

Slides:



Advertisements
Similar presentations
THE WELL ORDERING PROPERTY Definition: Let B be a set of integers. An integer m is called a least element of B if m is an element of B, and for every x.
Advertisements

Problem Set 1 15.If r is the rank and d is the determinant of the matrix what is r-d? Megan Grywalski.
CSC 421: Algorithm Design & Analysis
Central Tendency Mean – the average value of a data set. Add all the items in a data set then divide by the number of items in the data set.
Median/Order Statistics Algorithms
CS 206 Introduction to Computer Science II 04 / 28 / 2009 Instructor: Michael Eckmann.
Finding the Median Algorithm : Design & Analysis [11]
The Simplex Algorithm An Algorithm for solving Linear Programming Problems.
Updated QuickSort Problem From a given set of n integers, find the missing integer from 0 to n using O(n) queries of type: “what is bit[j]
CS38 Introduction to Algorithms Lecture 7 April 22, 2014.
The Selection Problem. The selection problem Input: A set S of n elements Output: The k-th smallest element of S The median problem: to find the -th smallest.
Median and Order Statistics Jeff Chastine. Medians and Order Statistics The i th order statistic of a set of n elements is the i th smallest element The.
(a) (b) (c) (d). What is (1,2,3)  (3,4,2)? (a) (1, 2, 3, 4) (b) (1,2)  (3,4) (c) (1,3,4,2) (d) (3,1)  (4,2)
Mean, Median, Mode Review ENGR 1181 Class 7. Mean.
A few leftover Decrease-and-conquer Algorithms
Tuesday, November 08, 2011 Instructor: Mr. Johnson.
Dividing Decimals; Average, Median, and Mode
Order Statistics. Order statistics Given an input of n values and an integer i, we wish to find the i’th largest value. There are i-1 elements smaller.
Mean, Median, Mode & Range. Mean A number that represents the centre, or average, of a set of numbers; to find the mean, add the numbers in the set, then.
MA/CSSE 473 Day 20 Questions before exam More decrease and Conquer.
Mean: The AVERAGE values of a set of numbers. The mean is found by ADDING all of the values, then DIVIDING by the number of values in the set of data.
Data Structure CS 322. What is an array? Initializing arrays Accessing the values of an array Multidimensional arrays LAB#1 : Arrays.
1 Algorithms CSCI 235, Fall 2015 Lecture 19 Order Statistics II.
Find the Kth largest number Special topics in Advanced Algorithms -Slides prepared by Raghu Srinivasan.
CS Lecture 14 Powerful Tools     !. Build your toolbox of abstract structures and concepts. Know the capacities and limits of each tool.
Young CS 331 D&A of Algo. Topic: Divide and Conquer1 Divide-and-Conquer General idea: Divide a problem into subprograms of the same kind; solve subprograms.
BELL-WORK Solve the system of equations using matrices:
Time Remaining 20:00.
Central Tendency Mean – the average value of a data set. Add all the items in a data set then divide by the number of items in the data set.
 Stem-and-leaf plots make it very easy to determine the least and greatest values in a set of data.  Stem-and-leaf plots also make it easy to determine.
Lecture 6 Sorting II Divide-and-Conquer Algorithms.
ПЕЧЕНЬ 9. Закладка печени в период эмбрионального развития.
The reading is 7.38 mm. The reading is 7.72 mm.
$200 $400 $600 $800 $1000 $200 $400 $600 $800 $1000 $200 $400 $600 $800 $1000 $200 $400 $600 $800 $1000 $200 $400 $600 $800 $1000 $200.
Some more Decrease-and-conquer Algorithms
CS479/679 Pattern Recognition Dr. George Bebis
CSC 421: Algorithm Design & Analysis
CSC 421: Algorithm Design & Analysis
Median Finding Algorithm
Gauss-Siedel Method.
Great Theoretical Ideas In Computer Science
CSC 421: Algorithm Design & Analysis
Arrays.
LOGISTIC REGRESSION 1.
Measures of Central Tendency & Range
Team 1: 32 responses Team 2: 55 responses Team 3: 29 responses
Notes: The Periodic Table.
Divide and Conquer Mergesort Quicksort Binary Search Selection
Linear-Time Selection
Dynamic Programming 2 Neil Tang 4/22/2010
“Human Sorting” It’s a “Problem Solving” game:
Matrices Elements, Adding and Subtracting
Topic: Divide and Conquer
Calendar like the Periodic Table
Core Chemistry Revision Questions
CSC 421: Algorithm Design & Analysis
Dynamic Programming 2 Neil Tang 4/22/2008
Median Statement problems.
Topic: Divide and Conquer
Algorithms CSCI 235, Spring 2019 Lecture 20 Order Statistics II
6 ages are listed from smallest to biggest
The Selection Problem.
Mean.
Simultaneous Linear Equations Gaussian Elimination with Partial Pivoting
GRAPHING LINEAR EQUATIONS
Algorithms CSCI 235, Spring 2019 Lecture 19 Order Statistics
CSC 421: Algorithm Design & Analysis
“Human Sorting” It’s a “Problem Solving” game:
“MM – Median of Medians”
THE WELL ORDERING PROPERTY
Presentation transcript:

“MM – Median of Medians” Game: There are n students in the class. Students are partitioned into n/r groups of size r (r is odd = 3, 5, or 7). Each team find its median using just any algorithm. Now we have n/r medians. Find MM (Median of Medians) using just any algorithms. . CS331 D. & A. of Algorithms

To show why MM ≥ ¼ of n & MM ≤ ¼ of n : Example: 35 (n) elements are partitioned into 7 (n/r) groups of size 5 (r) Elements  MM Non- decreasing Order (all columns) MM (Median of Medians) The middle row is in non-decreasing order Elements  MM . CS331 D. & A. of Algorithms

To show why MM ≥ ¼ of n & MM ≤ ¼ of n : Example: 21 (n) elements are partitioned into into 7 (n/r) groups of size 3 (r) Elements  MM Non- decreasing Order (all columns) MM (Median of Medians) The middle row is in non-decreasing order Elements  MM . CS331 D. & A. of Algorithms

To show why MM ≥ ¼ of n & MM ≤ ¼ of n : Example: 25 (n) elements are partitioned into into 5 (n/r) groups of size 5 (r) Elements  MM Non- decreasing Order (all columns) MM (Median of Medians) The middle row is in non-decreasing order Elements  MM . CS331 D. & A. of Algorithms

Selection Problem using MM (with r = 5) [ pp. 38-46, Divide&Conquer class notes ] Given a list of n elements, find the kth tallest one. Finding n/r medians takes linear time. Finding MM from n/5 medians is same as the orginal problem of finding the kth largest element. MM is at least ≥ and ≤ ¼ of n. Therefore the size of the remaining subproblem is no more than ¾ of n . CS331 D. & A. of Algorithms