Batcher Sorting Network, n = 4

Slides:



Advertisements
Similar presentations
A complete tripartite graph is a graph with three sets of vertices, such that the vertices in each set are connected to all of the other vertices in all.
Advertisements

Distributed Computing 1. Lower bound for leader election on a complete graph Shmuel Zaks ©
Splash Screen Inequalities Involving Absolute Values Lesson5-5.
Batcher’s merging network Efficient Parallel Algorithms COMP308.
CS223 Advanced Data Structures and Algorithms 1 Divide and Conquer Neil Tang 4/15/2010.
What is the next line of the proof? a). 2q = 6p. b). 2q = 6r c). 2q  6pd). 2q  6r e). 2q  6pf). 2q  6r.
Permutations and Inverses. Definition Let A be a set. If f : A  A is a 1-1 correspondence then f is called a permutation of A. Notation: S(A): the set.
Shuffle Exchange Network and de Bruijn’s Graph Shuffle Exchange graph Merge exchange into a single node De Bruijn.
Bitonic and Merging sorting networks Efficient Parallel Algorithms COMP308.
Selection Sort
Sorting Networks Uri Zwick Tel Aviv University May 2015.
(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)

I can solve and graph inequalities containing the words and and or. 3.6 Compound Inequalities.
Lecture 6 Algorithm Analysis Arne Kutzner Hanyang University / Seoul Korea.
Comparison Networks Sorting Sorting binary values
3.3-2 Step, Piecewise, Absolute Value Functions. Outside of linear and non-linear, we have a special set of functions whose properties do not fall into.
Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall.
Odd one out Can you give a reason for which one you think is the odd one out in each row? You need to give a reason for your answer. A: y = 2x + 2B: y.
Lesson 6.8A: The Binomial Theorem OBJECTIVES:  To evaluate a binomial coefficient  To expand a binomial raised to a power.
Introduction to Real Analysis Dr. Weihu Hong Clayton State University 9/18/2008.
Graph.
HOMEWORK REVIEW. SOLVE ABSOLUTE VALUE INEQUALITIES 5.6.
Selection Sort
Lecture 4 Sorting Networks. Comparator comparator.
Chapter 4 Lesson 1 Inequalities and their Graphs.
Number Line: Comparing and Ordering Integers LESSON 1.
Comparison Networks Sorting Sorting binary values Sorting arbitrary numbers Implementing symmetric functions.
Inequalities Inequality- tells us that two values are not equal. Ex: v > 2h < -4.
1 Sorting Networks Sorting.
+ Even Odd Sort & Even-Odd Merge Sort Wolfie Herwald Pengfei Wang Rachel Celestine.
Inequalities Objective: To solve and graph all types of inequalities.
Chapter 11: Graphing. Bar Charts Pie Charts Line Graphs.
Algebra 1. A = 0 B = 8.99 C = 1 D. 1(7.99) = 7.99.
Merge Sort Comparison Left Half Data Movement Right Half Sorted.
Lecture 6COMPSCI.220.FS.T Data Sorting Ordering relation: places each pair ,  of countable items in a fixed order denoted as (  ) or 
Sorting: Parallel Compare Exchange Operation A parallel compare-exchange operation. Processes P i and P j send their elements to each other. Process P.
EXAMPLE 1 Graph simple inequalities a. Graph x < 2.
Graphing Linear Inequations y > y is greater than  all points above the line are a solution y < y is less than  all points below the line are a solution.
Prove that: odd + odd = even even + even = even odd + even = odd even + odd = odd.
Appendix A.6 Solving Inequalities. Introduction Solve an inequality  Finding all values of x for which the inequality is true. The set of all real numbers.
10.2 Logarithms and Logarithmic functions. Graphs of a Logarithmic function verse Exponential functions In RED y = 10 x.
Set & Interval Notation
8.1 Sequences.
Lecture 4 Sorting Networks
the intended height of a function
Unit 3: Coordinate Geometry
Discrete Mathematics Lecture#14.
Selection Selection 1 Quick-Sort Quick-Sort 10/30/16 13:52
Points of Intersection
A crossing lemma for the pair-crossing number
The Integral Test; p-Series
Counting & Comparing Money 2 $ $ $ $.
Counting & Comparing Money $ $ $ $.
Divide and Conquer (Merge Sort)
4.2 Inverse Functions There are only four words in the English language that end in “-dous”. Name one.
Comparison Networks Sorting Sorting binary values
14.3: One-Sided Limits and Continuity
75 Has 7 in the tens place Odd Number Less than 100
Bitonic and Merging sorting networks
The Limit of a Function.
(Assignment due: Wed. Feb. 04, 2004)
Notes Over 1.7 Solving Inequalities
Every number has its place!
Notes Over 1.7 Solving Inequalities
12 Has 1 in the tens place Even Number Less than 20
Solving inequalities Chapter 3.
Line Graphs.
Inequalities x > a Means x is greater than a
RANDOM NUMBERS SET # 1:
Presentation transcript:

Batcher Sorting Network, n = 4

Batcher Sorting Network, n = 8

Lemma 1 Any subsequence of a sorted sequence is a sorted sequence. sorted sorted 1 1 1 1 1 1 1 1

Lemma 2 For a sorted sequence, the number of 0’s in the even subsequence is either equal to, or one greater than, the number of 0’s in the odd subsequence. sorted 1 1 1 1 1 1 even odd

Lemma 3 For two sorted sequences and : denotes the the number of 0’s in denotes the even subsequence of denotes the odd subsequence of

Lemma 3 1 1 1 x ¢ 1 E x ¢ 1 1 O x ¢

Lemma 3 For two sorted sequences and : (by Lemma 2) (by Lemma 2)

Merge Network Merge[4] sorted sorted sorted

Merge Network (pf.) sorted sorted sorted sorted Merge[4] (by Lemma 1)

Merge Network (pf.) sorted sorted Merge[4] By Lemma 3 and differ by at most 1 By Lemma 3 sorted

Merge Network (pf.) Merge[4] sorted and differ by at most 1 By Lemma 3

Merge Network (pf.) 1 1 1 1 1 1 Merge[4] By Lemma 3 and Merge[4] 1 1 and differ by at most 1 By Lemma 3 1 1 1 1

Batcher Sorting Network Merge[8] sorted Sort[4]

Batcher Sorting Network, n = 4 Merge[4]

Batcher Sorting Network, n = 8 Merge[8] Sort[4]

Sorting Networks AKS (Ajtai, Komlós, Szemerédi) Network: based on expander graphs. AKS (Chvátal) Batcher AKS better for