1 / 16

Batcher Sorting Network, n = 4

Batcher Sorting Network, n = 4. Batcher Sorting Network, n = 8. n = 4. n = 4. sorted. sorted. Lemma 1. Any subsequence of a sorted sequence is a sorted sequence. 0. 0. 0. 0. 0. 1. 1. 1. 1. 1. 1. 1. 1. sorted. Lemma 2.

selma
Download Presentation

Batcher Sorting Network, n = 4

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Batcher Sorting Network, n = 4

  2. Batcher Sorting Network, n = 8 n = 4 n = 4

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

  4. sorted 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. 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 even odd

  5. 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

  6. 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 1 1 0 0 1 1 1 1 1 1 1 1 1 1 1 1 ¢ ¢ ¢ x x x O E Lemma 3

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

  8. Merge[4] sorted sorted Merge[4] sorted Merge Network

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

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

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

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

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

  14. Merge[4] Batcher Sorting Network, n = 4 Sort[2] Sort[2]

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

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

More Related