Skip to content
Snippets Groups Projects
Commit ae8f9650 authored by zarron's avatar zarron
Browse files

lecture 8

parent 159d998c
No related branches found
No related tags found
No related merge requests found
......@@ -85,4 +85,44 @@ Like in arrow, but read requests do not move the object, they only copy it and t
## Ivy And Friends
Ivy works similar to the arrow algorithm, but every time a __find by u__ message traverses an edge, its parent is directly set to u. This lets new edges become part of the tree, and connects everybody as close as possible to the new root.
\ No newline at end of file
Ivy works similar to the arrow algorithm, but every time a _find by u_ message traverses an edge, its parent is directly set to u. This lets new edges become part of the tree, and connects everybody as close as possible to the new root.
# 8. Lecture
## 0-1 Sorting Lemma
To prove correctness and time complexity, it is enough to just prove it for sorting lists/arrays with values 0 and 1. This holds for oblivious networks.
## Oblivious
Whether you exchange two values must only depend on the
relative order of the two values, and not on anything else.
## Odd/Even Sort
Compare and swap two neighbors, where the left one is even, then where the right one is even. Repeat.
It takes $`n`$ steps, if performed on an array
## Shearsort
In a grid, take turns to sort all columns and then all rows, repeat. In odd rows smaller values go left, in even rows they go right. This means that clean (sorted) rows start to appear on the top and the bottom. Each round cleans one half of the rows.
It takes $`2\log m = \log n`$ rounds, i.e. it has also time complexity of $`\mathcal{O}(n\log n)`$, like non distributed sorting algorithms.
## Bitonic Sequence
A sequence of values that is first monotonically growing and then monotonically shrinking, or the other way round.
## Half Cleaner
A sorting network, that compares the $`i`$th input with the $`i+n/2`$th input. If feed a bitonic sequence, it outputs one clean (sorted) half, and a half that is sorted in a bitonic sequence way.
## Merging Network
A sorting network, that sorts two sorted lists into one sorted list.
## Batcher’s “Bitonic” Sorting Network
A recursive sorting network that starts with single values ($`n`$ sorted lists) and merges two sorted lists to one in each step with a merging network
It has dept of $`\mathcal{O}({\log^2 n})`$
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment