• Keine Ergebnisse gefunden

Algorithm Engineering „Parallele Algorithmen“

N/A
N/A
Protected

Academic year: 2021

Aktie "Algorithm Engineering „Parallele Algorithmen“"

Copied!
75
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

Algorithm Engineering

„Parallele Algorithmen“

Stefan Edelkamp

(2)

Übersicht

Parallele Musterdatenbanken

Parallele Strukturierte Duplikatselimination

Disjunkte Duplikatserkennungsbereiche

”Schlösser”

Parallele Algorithmen

Matrix-Multiplikation

List Ranking

Euler Tour

P-Vollständigkeitstheorie

(3)

Übersicht

Parallele Musterdatenbanken

Parallele Strukturierte Duplikatselimination

Disjunkte Duplikatserkennungsbereiche

”Schlösser”

Parallele Algorithmen

Matrix-Multiplikation

List Ranking

Euler Tour

P-Vollständigkeitstheorie

(4)

Parallele Musterdatenbanken

Only pattern databases that include the client tile need to be loaded on the client

Because multiple tiles in pattern, from birds eye PDB loaded multiple times

In 15-Puzzle with corner and fringe PDB this saves RAM in the order of factor 2 on each machine, compared to loading all

In 36-Puzzle with 6-tile pattern databases this saves RAM in the order of factor 6 on each machine, compared to loading all

Extends to additive pattern databases

(5)

Distributed Heuristic Evaluation

Assume one child processor for each tile one master processor

B3 B1 B2

B8

B4 B5 B6 B7 B9 B10 B11 B12 B13 B14 B15

B0 B3

B1 B2

B8

B4 B5 B6 B7 B9 B10 B11 B12 B13 B14 B15

B0

(6)

Parallele Evaluation

35-Puzzle

(7)

Same bottleneck in external-memory search

Bottleneck: Duplicate detection

Duplicate paths cause parallelization overhead A

C D

BB

C DDDD

Internal memory External memory vs.

fast slow

A

(8)

Disjoint duplicate-detection scopes

B1

B0 B4

B0 B1 B2 B3

B8

B4 B5 B6 B7 B9 B10 B11 B12 B13 B14 B15

B0 B1 B4

B3 B2

B7

B2

B3 B7

B12 B8

B13 B14 B15 B11 B8

B12 B13 B15 B11 B14

(9)

Finding disjoint duplicate-detection scopes

B1

B0 B4

0 0 0 0

0

0 0 0 0

0 0 1

0 0 0 0

0 1 1

0 2

1

B2

B3 B7

0 1 0

B8

B12 B13 B15 B11 B14

1

2 2

0 1 2

2 2

2 1 2

2

2 2

2

0 1

1 1

0

1 0

2

3 3

2 B1

B5 B6 B4 B9

2

3

3

4 3

3

(10)

Implementation of Parallel SDD

Hierarchical organization of hash tables

One hash table for each abstract node

Top-level hash func. = state-space projection func.

Shared-memory management

Minimum memory-allocation size m

Memory wasted is bounded by O(m#processors)

External-memory version

I/O-efficient order of node expansions

I/O-efficient replacement strategy

Benötigt nur ein Mutex “Schloss”

B3 B1 B2

B8

B4 B5 B6 B7 B9 B10 B11 B12 B13 B14 B15

B0

(11)

Übersicht

Parallele Musterdatenbanken

Parallele Strukturierte Duplikatselimination

Disjunkte Duplikatserkennungsbereiche

”Schlösser”

Parallele Algorithmen

Matrix-Multiplikation

List Ranking

Euler Tour

P-Vollständigkeitstheorie

(12)

Parallelle Matrix-

Multiplication

(13)
(14)

Parallele Matrix

Multiplication

(15)

Exklusives Schreiben

(16)

Parallele Kopien

(17)

Fazit Matrix

Multiplication

(18)

Paralleles List Ranking

(19)

List

Ranking

(20)

Erster Algorithmus

(21)

Prinzip

(22)

Komplexität

(23)

Verbesserungen

(24)

Strategie

(25)

Unabhängige Mengen

(26)

2-Färbung

(27)

Reduktion

(28)

Restauration

(29)

Beispiel

(30)

Variablen

(31)

Beispiel (ctd.)

(32)

Pseudo Code

(33)

Nächster Schritt

(34)

Analyse

(35)

Backup

(36)

Algo

(37)

Algo

(38)

Speicher

(39)

Analyse

(40)

Ausblick:

Randomisiert in O(n) whp?

(41)

Ein optimaler randomisierter Algorithmus

(42)

Ein optimaler randomisierter Algorithmus

(43)

Ein optimaler randomisierter Algorithmus

(44)

Ein optimaler randomisierter Algorithmus

(45)

Ein optimaler randomisierter Algorithmus

(46)

Ein optimaler randomisierter Algorithmus

(47)

Ein optimaler randomisierter Algorithmus

(48)

Analyse

(49)

Analyse

(50)

Analyse

(51)

Probleme mit DFS

(52)

Idee Euler Tour

(53)

Parallel DFS

(54)

DFS

Nummern

(55)

Allgemein

(56)

Allgemein

(57)

Allgemein

(58)

Beispiel

(59)

Ein Zyklus oder

mehrere?

(60)

Korrektheit

(61)

Korrektheit

(62)

Beispiel

(63)

Konstruktion Euler

Tour

(64)

Fazit Euler Touren

(65)

Wann ist ein Algorithmus parallelisierbar?

(66)

NC

(67)

P and NC

(68)

P and NC

(69)

Reduction

(70)

P-Vollständigkeit

(71)

Circuit Value

Problem (CVP)

(72)

Beispiel

(73)

CVP is

P-complete

(74)

CVP is

P-complete

(75)

Encoding a

Turing

Machine

in a Circuit

Referenzen

ÄHNLICHE DOKUMENTE

Define the back-prop learning rule for a multilayer perceptron that also allows connec- tions (edges between neurons) between non-adjacent layers. The multilayer perceptron consists

pos($str): Position des Zeichens nach aktuellem match length($str ): L¨ ange von $str. $&:

This study posits that governments will be more likely to repress challenges when they use violence, occur in urban areas, target the government, make political demands, or

The following two patterns describe combinations of pattern transitions among several subspaces and open the space for attributes that can be considered as being redundant; that

Strategy: A decorator lets you change the skin of an object; a strategy lets you change the guts. These are two alternative ways of changing

between Colleague objects. It is aware of all the  Colleagues and their purpose with regards to inter Colleagues and their purpose with regards to inter 

The Walkabout class has just one method, visit, which takes an argument of type Object.. Replacing the reflection code with pseudo-code yields the informal description of the class

More precisely, the field of pattern formation focuses on systems where the nonlinearities conspire to form spatial patterns that sometimes are stationary, travelling or