• Keine Ergebnisse gefunden

Task2:Sorry,buttheyjustalllookaliketome! Task1:HowtheColorsGetintotheTrees Exercise1:It’saColorfulLife

N/A
N/A
Protected

Academic year: 2021

Aktie "Task2:Sorry,buttheyjustalllookaliketome! Task1:HowtheColorsGetintotheTrees Exercise1:It’saColorfulLife"

Copied!
2
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

If you have questions regarding the exercises, please ask them on the mailing list.

Follow the hand-in instructions listed on the course website.

Exercises marked with a star are not mandatory and solutions to them will not be discussed in the tutorials.

Exercise 1: It’s a Colorful Life

Task 1: How the Colors Get into the Trees

Before you start this task, you may want to look at the chapter “Notation and Prelim- inaries” again, especially the section “Trees and Forests”.

a) Change the Cole-Vishkin algorithm from the lecture so that it requires only 1/2 · log

n + O(1) rounds. The result should still be a message passing algorithm, so don’t use pointer jumping!

Hint: Compare what information can be gathered locally in T rounds to what the Cole-Vishkin algorithm actually relies on.

b) Find a message passing algorithm that 3-colors a rooted tree, i.e., a tree in which each non-root node initially knows which neighbor is its parent, in log

n + O(1) rounds.

Hint: Leverage the same observation as for part a).

c) Show how to (∆ + 1)-color a graph of maximum degree ∆ ∈ O(1) in log

n + O(1) rounds.

Hint: Decompose the graph into a collection of ∆-many rooted forests.

Task 2: Sorry, but they just all look alike to me!

Given a graph G = (V, E), an independent set I ⊆ V satisfies that there is no edge e ∈ E so that e ⊆ I, i.e., I contains no pair of neighbors in the graph. A maximal independent set (MIS) is an independent set I ⊆ V such that I ∪ {v} is not independent for any v ∈ V \ I. Note that this is more general than a maximum independent set.

Suppose that in the doubly linked list, we want to join nodes to sublists of 2 or 3 nodes under control of the same processor. For simplicity we will assume that the list is large enough (at least 5 elements) and cyclic.

a) Show that an MIS algorithm (i.e., one that computes an MIS) can be used to con- struct such sublists using O(1) additional rounds!

b) Show that an algorithm computing such sublists can be used to compute a 3-coloring of the list in O(1) additional rounds!

c) Show that an algorithm computing a 3-coloring can be used to compute an MIS in O(1) additional rounds!

d) What can you infer about the time complexity of optimal algorithms for these tasks?

e)* Show that an algorithm computing an MIS on arbitrary graphs can be used to compute a (∆ + 1)-coloring of a graph of maximum degree ∆!

Hint: Replace each node by a clique (a.k.a. complete graph) of ∆+1 nodes. Interpret

each clique node as one of the possible colors of the original node. Add edges so that

no adjacent cliques (original nodes) will have the same color if you compute an MIS

of the new graph. Let each node simulate its entire clique in the MIS algorithm.

(2)

Task 3*: Theory and practice

Astrophysics

1

gives us the estimate that the evolution of the observable universe until now is equivalent to a computation on at most 10

90

bits

2

. We will use this vast number as an upper bound on n, the initial amount of colors.

a) Argue that 5 rounds of Cole-Vishkin are practically always sufficient.

b) Execute 2 rounds of Cole-Vishkin with the following initial colors, written in decimal, appearing in this order:

1, 1337, 10

90

, 23, 42

Each processor has the predecessor on the left. So the processor with color 1337 has the predecessor 1, and the processor with color 1 has the predecessor 42.

Hint: How is the least significant bit and evenness related? If this exercise seems laborous, make sure you use little-endian, and not big-endian.

Also, note that 1337 = 0b1001110010100000000... in little endian.

c) Christoph likes to call log

a “slow-growing constant”. Can you come up with an even slower-growing “constant” that is actually unbounded?

1

a science known for its reasonably-sized numbers

2

https://arxiv.org/pdf/quant-ph/0110141.pdf

Referenzen

ÄHNLICHE DOKUMENTE

b) Use this to construct an asynchronous BFS tree construction algorithm of time com- plexity O(D) that uses O(|E|D) messages and terminates. You may assume that D is known here..

A concise reference card, which contains information on how to use the Altos implementation of XENIX, describes the XENIX commands, and lists the Business Shell

In order to prove correctness, we first instrument the concrete semantics with extra information which records where a.. block has

• The effects of edges for truely live variables are more complicated than for live variables :-).. • Nonetheless, they are distributive

Compared to older American jets, to say nothing of the latest Russian and Chinese fighter designs, the F-35 is looking worse and worse.. "Can't turn, can't climb, can't run,"

The landscape of conflicts in the Caucasus is changing, and while the high-resonance con- frontation between Russia and Georgia is calming down, other conflicts,

The idea behind the algorithm FastCut(G) is to include the repetitions into the algo- rithm instead of simply repeating Karger’s Contract(G) algorithm as a whole.. This makes

At a boundary point the assigned matrix line has to be substituted through a null line with a 1 on the diagonal entry, the solution u has to be set in this case to 0 as well as