SlideShare ist ein Scribd-Unternehmen logo
1 von 26
Downloaden Sie, um offline zu lesen
Approximative
                                                       Algorithmen

                                                         Robert B.

                                                      Inhalt

                                                      Einleitung

Approximative Algorithmen                             Grundlegende
                                                      Eigenschaften
                                                      G¨ te/Performance
                                                       u
                         ¨
     ”Wie genau ist ungefahr?”                        Approximationsklass

                                                      Beispiel
                                                      JS Algorithmus
                                                      Analyse
               Robert Bahmann                         Ergebnis

                                                      Fragen
Hochschule RheinMain University of Applied Sciences
        Wiesbaden R¨sselsheim Geisenheim
                   u


                 July 23, 2009




                                                                 1 / 20
Approximative
                                  Algorithmen

                                    Robert B.

1   Einleitung                   Inhalt

                                 Einleitung

2   Grundlegende Eigenschaften   Grundlegende
                                 Eigenschaften
     G¨te/Performance
      u                          G¨ te/Performance
                                  u
                                 Approximationsklass
     Approximationsklassen       Beispiel
                                 JS Algorithmus
                                 Analyse
                                 Ergebnis
3   Beispiel                     Fragen
     JS Algorithmus
     Analyse
     Ergebnis

4   Fragen



                                            2 / 20
Approximative
                                                  Algorithmen

                                                    Robert B.

                                                 Inhalt

                                                 Einleitung

                                                 Grundlegende
                                                 Eigenschaften
                                                 G¨ te/Performance
                                                  u

Viele Probleme sind nicht effizient exakt l¨sbar
                                         o
                                                 Approximationsklass

                                                 Beispiel
solange P = NP                                   JS Algorithmus
                                                 Analyse
                                                 Ergebnis

                                                 Fragen




                                                            3 / 20
Approximative
Approximationsalgorithmen                        Algorithmen

                                                   Robert B.

                                                Inhalt

                                                Einleitung

                                                Grundlegende
                                                Eigenschaften
                                                G¨ te/Performance
                                                 u
                                                Approximationsklass

Warum Approximationsalgorithmen?                Beispiel
                                                JS Algorithmus
                                                Analyse
   arbeiten in polynomieller Zeit               Ergebnis


   produzieren L¨sungen mit garantierter G¨te
                o                         u     Fragen




                                                           4 / 20
Approximative
 ¨
Gute/Performance                               Algorithmen

                                                 Robert B.

                                              Inhalt

                                              Einleitung

                                              Grundlegende
                                              Eigenschaften
                                              G¨ te/Performance
                                               u
                                              Approximationsklass
 ¨
Gute/Performance                              Beispiel
                                              JS Algorithmus

 Absolut AG A (I) = |A(I) − OPT(I)|           Analyse
                                              Ergebnis

                            A(I)    OPT (I)   Fragen
  Relativ RG A (I) = max   OPT (I) , A(I)




                                                         5 / 20
Approximative
Approximationsklassen                           Algorithmen

                                                  Robert B.

                                               Inhalt

                                               Einleitung

                                               Grundlegende
                                               Eigenschaften
                                               G¨ te/Performance
                                                u
                                               Approximationsklass

                                               Beispiel
APX                                            JS Algorithmus
                                               Analyse
Approximable - Gut approximierbare Probleme.   Ergebnis

                                               Fragen




                                                          6 / 20
Approximative
                                                       Algorithmen

                                                         Robert B.

                                                      Inhalt

                                                      Einleitung

                                                      Grundlegende
                                                      Eigenschaften
                                                      G¨ te/Performance
                                                       u

PTAS                                                  Approximationsklass

                                                      Beispiel
Polynomial Time Approximation Scheme                  JS Algorithmus

Beliebig gut Approximierbar auf Kosten des Fehlers.   Analyse
                                                      Ergebnis

                                                      Fragen




                                                                 7 / 20
Approximative
                                                          Algorithmen

                                                            Robert B.

                                                         Inhalt

                                                         Einleitung

                                                         Grundlegende
                                                         Eigenschaften
                                                         G¨ te/Performance
                                                          u
FPTAS                                                    Approximationsklass

Fully Polynomial Time Approximation Scheme               Beispiel
                                                         JS Algorithmus
Beliebig gut und schnell Approximierbar auf Kosten des   Analyse
                                                         Ergebnis
Fehlers un der Laufzeit.                                 Fragen




                                                                    8 / 20
Approximative
Job Scheduling                                                      Algorithmen

                                                                      Robert B.

                                                                   Inhalt

                                                                   Einleitung

                                                                   Grundlegende
                                                                   Eigenschaften
                                                                   G¨ te/Performance
                                                                    u
                                                                   Approximationsklass
Job Scheduling
                                                                   Beispiel
Auf p Prozessoren (P1 , P2 , ..., Pn ) sollen t Tasks              JS Algorithmus
                                                                   Analyse
(T1 , T2 , ..., Ti ) verteilt werden. Dabei hat jeder Tasks eine   Ergebnis

                                                                   Fragen
Laufzeit li die der Prozessor ben¨tigt, um diesen
                                      o
abzuarbeiten.




                                                                              9 / 20
Approximative
Job Scheduling - Beispiel                                Algorithmen

                                                           Robert B.

                                                        Inhalt

                                                        Einleitung

Auf einem Rechner mit einem Dual-Core m¨ssen folgende
                                       u                Grundlegende
                                                        Eigenschaften
Tasks abgearbeitet werden:                              G¨ te/Performance
                                                         u
                                                        Approximationsklass

                                                        Beispiel
                     Task    Zeit                       JS Algorithmus
                                                        Analyse
                     1       1                          Ergebnis

                     2       2                          Fragen

                     3       2
                     4       4
                     5       1




                                                                   10 / 20
Approximative
Job Scheduling - Beispiel                  Algorithmen

                                             Robert B.

                                          Inhalt

                                          Einleitung

                                          Grundlegende
                                          Eigenschaften
   Core 1: (0, P1 ), (1, P3 ), (3, P2 )   G¨ te/Performance
                                           u
                                          Approximationsklass

   Core 2: (0, P4 ), (4, P5 )             Beispiel
                                          JS Algorithmus
                                          Analyse
                                          Ergebnis

                                          Fragen




                                                     11 / 20
Approximative
Job Scheduling - Algorithmus                                     Algorithmen

                                                                   Robert B.


Algorithmus 1 : Job Schedule                                    Inhalt

Input : p Prozessoren,t Taks und die Laufzeiten li f¨r jeden
                                                      u         Einleitung

        Task                                                    Grundlegende
                                                                Eigenschaften
Output : Eine Prozessorbelegung S mit minimalen                 G¨ te/Performance
                                                                 u
                                                                Approximationsklass
           Makespan                                             Beispiel
S = null ;                                                      JS Algorithmus
                                                                Analyse

for i = 1 to m do                                               Ergebnis


    ai = null;                                                  Fragen


for k = 1 to n do
    Berechne das kleinste i mit ai = min{aj ; j ∈ {1..., m}};
    Sk = ai ;
    ai = ai + pk ;
    S = S ∪ {(Sk , Mi )}
return S;


                                                                           12 / 20
Approximative
Job Scheduling - Ausgabe                   Algorithmen

                                             Robert B.

                                          Inhalt

                                          Einleitung

                                          Grundlegende
Algorithmusausgabe                        Eigenschaften
                                          G¨ te/Performance
                                           u
   Core 1: (0, P1 ), (1, P3 ), (4, P5 )   Approximationsklass

                                          Beispiel
   Core 2: (0, P2 ), (2, P4 )             JS Algorithmus
                                          Analyse
                                          Ergebnis

                                          Fragen




                                                     13 / 20
Approximative
Job Scheduling - Ausgabe                   Algorithmen

                                             Robert B.

                                          Inhalt

                                          Einleitung

                                          Grundlegende
Algorithmusausgabe                        Eigenschaften
                                          G¨ te/Performance
                                           u
   Core 1: (0, P1 ), (1, P3 ), (4, P5 )   Approximationsklass

                                          Beispiel
   Core 2: (0, P2 ), (2, P4 )             JS Algorithmus
                                          Analyse
                                          Ergebnis

                                          Fragen




                                                     13 / 20
Approximative
Analyse                                                     Algorithmen

                                                              Robert B.

                                                           Inhalt

                                                           Einleitung

                                                           Grundlegende
   Sei Zk = sk + lk die Zeit in der der k-te Task endet.   Eigenschaften
                                                           G¨ te/Performance
                                                            u
                                                           Approximationsklass

                                                           Beispiel
                                                           JS Algorithmus
                                                           Analyse
                                                           Ergebnis

                                                           Fragen




                                                                      14 / 20
Approximative
Analyse                                                     Algorithmen

                                                              Robert B.

                                                           Inhalt

                                                           Einleitung

                                                           Grundlegende
   Sei Zk = sk + lk die Zeit in der der k-te Task endet.   Eigenschaften
                                                           G¨ te/Performance
                                                            u
   Sei Tlast der Task der als letztes beendet wird.        Approximationsklass

                                                           Beispiel
                                                           JS Algorithmus
                                                           Analyse
                                                           Ergebnis

                                                           Fragen




                                                                      14 / 20
Approximative
Analyse                                                     Algorithmen

                                                              Robert B.

                                                           Inhalt

                                                           Einleitung

                                                           Grundlegende
   Sei Zk = sk + lk die Zeit in der der k-te Task endet.   Eigenschaften
                                                           G¨ te/Performance
                                                            u
   Sei Tlast der Task der als letztes beendet wird.        Approximationsklass

                                                           Beispiel
   Dann ist die Gesamtlaufzeit Zgesamt = slast + llast     JS Algorithmus
                                                           Analyse
                                                           Ergebnis

                                                           Fragen




                                                                      14 / 20
Approximative
Analyse                                                     Algorithmen

                                                              Robert B.

                                                           Inhalt

                                                           Einleitung

                                                           Grundlegende
   Sei Zk = sk + lk die Zeit in der der k-te Task endet.   Eigenschaften
                                                           G¨ te/Performance
                                                            u
   Sei Tlast der Task der als letztes beendet wird.        Approximationsklass

                                                           Beispiel
   Dann ist die Gesamtlaufzeit Zgesamt = slast + llast     JS Algorithmus
                                                           Analyse
                                                           Ergebnis

                                                           Fragen




                                                                      14 / 20
Approximative
Analyse                                                     Algorithmen

                                                              Robert B.

                                                           Inhalt

                                                           Einleitung

                                                           Grundlegende
   Sei Zk = sk + lk die Zeit in der der k-te Task endet.   Eigenschaften
                                                           G¨ te/Performance
                                                            u
   Sei Tlast der Task der als letztes beendet wird.        Approximationsklass

                                                           Beispiel
   Dann ist die Gesamtlaufzeit Zgesamt = slast + llast     JS Algorithmus
                                                           Analyse
                                                           Ergebnis

                                                           Fragen




                                                                      14 / 20
Approximative
Analyse                                                        Algorithmen

                                                                 Robert B.

                                                              Inhalt

                                                              Einleitung

                                                              Grundlegende
 1   Sei Zk = sk + lk die Zeit in der der k-te Task endet.    Eigenschaften
                                                              G¨ te/Performance
                                                               u
 2   Sei Tlast der Task der als letztes beendet wird.         Approximationsklass

                                                              Beispiel
 3   Dann ist die Gesamtlaufzeit Zgesamt = slast + llast      JS Algorithmus
                                                              Analyse
 4   Damit ist die durchschnittliche Laufzeit bis zum Start   Ergebnis

                                  1
     des letzten Jobs h¨chstens: n k∈{1,..,i}{last} lk
                       o                                      Fragen




                                                                         15 / 20
Approximative
Analyse                                                        Algorithmen

                                                                 Robert B.

                                                              Inhalt

                                                              Einleitung

                                                              Grundlegende
 1   Sei Zk = sk + lk die Zeit in der der k-te Task endet.    Eigenschaften
                                                              G¨ te/Performance
                                                               u
 2   Sei Tlast der Task der als letztes beendet wird.         Approximationsklass

                                                              Beispiel
 3   Dann ist die Gesamtlaufzeit Zgesamt = slast + llast      JS Algorithmus
                                                              Analyse
 4   Damit ist die durchschnittliche Laufzeit bis zum Start   Ergebnis

                                  1
     des letzten Jobs h¨chstens: n k∈{1,..,i}{last} lk
                       o                                      Fragen


 5   Es existiert also mindestens ein Prozessor dessen
     Gesamtlaufzeit h¨chstens von dieser Gr¨ße ist, also:
                       o                      o
             1
     slast ≤ n k∈{1,..,i}{last} lk




                                                                         15 / 20
Approximative
Analyse                                    Algorithmen

                                             Robert B.

                                          Inhalt

                                          Einleitung

                                          Grundlegende
                                          Eigenschaften
                                          G¨ te/Performance
                                           u
                                          Approximationsklass

               1
 1   slast ≤   n   k∈{1,..,i}{last} lk
                                          Beispiel
                                          JS Algorithmus

 2   offensichtlich gilt: OPT ≥ llast      Analyse
                                          Ergebnis

                          1    i
 3   ebenso: OPT ≥        n    k=1 lk
                                          Fragen




                                                     16 / 20
Approximative
Analyse                                                            Algorithmen

                                                                     Robert B.

                                                                  Inhalt

                                                                  Einleitung
          Zgesamt = Zlast                                   (1)   Grundlegende
                                                                  Eigenschaften
                  = slast + llast                           (2)   G¨ te/Performance
                                                                   u
                                                                  Approximationsklass
                    1
                  ≤                           lk + llast    (3)   Beispiel
                    n                                             JS Algorithmus
                          k∈{1,..,i}{last}                       Analyse
                                                                  Ergebnis
                           i                                      Fragen
                      1                        1
                  =             lk + 1 −            llast   (4)
                      n                        n
                          k=1
                                         1
                  ≤ OPT + 1 −                      ∗ OPT    (5)
                                         n
                                1
                  =       2−        ∗ OPT                   (6)
                                n


                                                                             17 / 20
Approximative
Ergebnis                                                      Algorithmen

                                                                Robert B.

                                                             Inhalt

                                                             Einleitung

                                                             Grundlegende
                                                             Eigenschaften
Und jetzt?                                                   G¨ te/Performance
                                                              u
                                                             Approximationsklass
   Wir haben gerade gezeigt das List Schedule eine           Beispiel
                          1
   relative G¨te von 2 − n hat. (juhu!)
             u                                               JS Algorithmus
                                                             Analyse

   Kann als Basis genutzt werden um List Schedule zu         Ergebnis


   verbessern                                                Fragen


       Eingabe komplett erfassen und Sortieren
       Alternativ nur vorhandene Eingabe sortieren und den
       rest nach altem Verfahren sortieren usw.




                                                                        18 / 20
Approximative
Fragen?              Algorithmen

                       Robert B.

                    Inhalt

                    Einleitung

                    Grundlegende
                    Eigenschaften
                    G¨ te/Performance
                     u
                    Approximationsklass

                    Beispiel
                    JS Algorithmus

          Fragen?   Analyse
                    Ergebnis

                    Fragen




                               19 / 20
Approximative
Ende                                                          Algorithmen

                                                                Robert B.

                                                             Inhalt

                                                             Einleitung

                                                             Grundlegende
                                                             Eigenschaften
                                                             G¨ te/Performance
                                                              u
                                                             Approximationsklass

                                                             Beispiel
Quellen                                                      JS Algorithmus
                                                             Analyse
Diese Pr¨sentation beruht auf der Ausarbeitung im Rahmen
         a                                                   Ergebnis

dieses Fachseminars. S¨mtliche Quellen sind dort zu finden.
                      a                                      Fragen




                                                                        20 / 20

Weitere ähnliche Inhalte

Empfohlen

Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...DevGAMM Conference
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationErica Santiago
 
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellGood Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellSaba Software
 

Empfohlen (20)

Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy Presentation
 
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellGood Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
 

Approximations Algorithmen

  • 1. Approximative Algorithmen Robert B. Inhalt Einleitung Approximative Algorithmen Grundlegende Eigenschaften G¨ te/Performance u ¨ ”Wie genau ist ungefahr?” Approximationsklass Beispiel JS Algorithmus Analyse Robert Bahmann Ergebnis Fragen Hochschule RheinMain University of Applied Sciences Wiesbaden R¨sselsheim Geisenheim u July 23, 2009 1 / 20
  • 2. Approximative Algorithmen Robert B. 1 Einleitung Inhalt Einleitung 2 Grundlegende Eigenschaften Grundlegende Eigenschaften G¨te/Performance u G¨ te/Performance u Approximationsklass Approximationsklassen Beispiel JS Algorithmus Analyse Ergebnis 3 Beispiel Fragen JS Algorithmus Analyse Ergebnis 4 Fragen 2 / 20
  • 3. Approximative Algorithmen Robert B. Inhalt Einleitung Grundlegende Eigenschaften G¨ te/Performance u Viele Probleme sind nicht effizient exakt l¨sbar o Approximationsklass Beispiel solange P = NP JS Algorithmus Analyse Ergebnis Fragen 3 / 20
  • 4. Approximative Approximationsalgorithmen Algorithmen Robert B. Inhalt Einleitung Grundlegende Eigenschaften G¨ te/Performance u Approximationsklass Warum Approximationsalgorithmen? Beispiel JS Algorithmus Analyse arbeiten in polynomieller Zeit Ergebnis produzieren L¨sungen mit garantierter G¨te o u Fragen 4 / 20
  • 5. Approximative ¨ Gute/Performance Algorithmen Robert B. Inhalt Einleitung Grundlegende Eigenschaften G¨ te/Performance u Approximationsklass ¨ Gute/Performance Beispiel JS Algorithmus Absolut AG A (I) = |A(I) − OPT(I)| Analyse Ergebnis A(I) OPT (I) Fragen Relativ RG A (I) = max OPT (I) , A(I) 5 / 20
  • 6. Approximative Approximationsklassen Algorithmen Robert B. Inhalt Einleitung Grundlegende Eigenschaften G¨ te/Performance u Approximationsklass Beispiel APX JS Algorithmus Analyse Approximable - Gut approximierbare Probleme. Ergebnis Fragen 6 / 20
  • 7. Approximative Algorithmen Robert B. Inhalt Einleitung Grundlegende Eigenschaften G¨ te/Performance u PTAS Approximationsklass Beispiel Polynomial Time Approximation Scheme JS Algorithmus Beliebig gut Approximierbar auf Kosten des Fehlers. Analyse Ergebnis Fragen 7 / 20
  • 8. Approximative Algorithmen Robert B. Inhalt Einleitung Grundlegende Eigenschaften G¨ te/Performance u FPTAS Approximationsklass Fully Polynomial Time Approximation Scheme Beispiel JS Algorithmus Beliebig gut und schnell Approximierbar auf Kosten des Analyse Ergebnis Fehlers un der Laufzeit. Fragen 8 / 20
  • 9. Approximative Job Scheduling Algorithmen Robert B. Inhalt Einleitung Grundlegende Eigenschaften G¨ te/Performance u Approximationsklass Job Scheduling Beispiel Auf p Prozessoren (P1 , P2 , ..., Pn ) sollen t Tasks JS Algorithmus Analyse (T1 , T2 , ..., Ti ) verteilt werden. Dabei hat jeder Tasks eine Ergebnis Fragen Laufzeit li die der Prozessor ben¨tigt, um diesen o abzuarbeiten. 9 / 20
  • 10. Approximative Job Scheduling - Beispiel Algorithmen Robert B. Inhalt Einleitung Auf einem Rechner mit einem Dual-Core m¨ssen folgende u Grundlegende Eigenschaften Tasks abgearbeitet werden: G¨ te/Performance u Approximationsklass Beispiel Task Zeit JS Algorithmus Analyse 1 1 Ergebnis 2 2 Fragen 3 2 4 4 5 1 10 / 20
  • 11. Approximative Job Scheduling - Beispiel Algorithmen Robert B. Inhalt Einleitung Grundlegende Eigenschaften Core 1: (0, P1 ), (1, P3 ), (3, P2 ) G¨ te/Performance u Approximationsklass Core 2: (0, P4 ), (4, P5 ) Beispiel JS Algorithmus Analyse Ergebnis Fragen 11 / 20
  • 12. Approximative Job Scheduling - Algorithmus Algorithmen Robert B. Algorithmus 1 : Job Schedule Inhalt Input : p Prozessoren,t Taks und die Laufzeiten li f¨r jeden u Einleitung Task Grundlegende Eigenschaften Output : Eine Prozessorbelegung S mit minimalen G¨ te/Performance u Approximationsklass Makespan Beispiel S = null ; JS Algorithmus Analyse for i = 1 to m do Ergebnis ai = null; Fragen for k = 1 to n do Berechne das kleinste i mit ai = min{aj ; j ∈ {1..., m}}; Sk = ai ; ai = ai + pk ; S = S ∪ {(Sk , Mi )} return S; 12 / 20
  • 13. Approximative Job Scheduling - Ausgabe Algorithmen Robert B. Inhalt Einleitung Grundlegende Algorithmusausgabe Eigenschaften G¨ te/Performance u Core 1: (0, P1 ), (1, P3 ), (4, P5 ) Approximationsklass Beispiel Core 2: (0, P2 ), (2, P4 ) JS Algorithmus Analyse Ergebnis Fragen 13 / 20
  • 14. Approximative Job Scheduling - Ausgabe Algorithmen Robert B. Inhalt Einleitung Grundlegende Algorithmusausgabe Eigenschaften G¨ te/Performance u Core 1: (0, P1 ), (1, P3 ), (4, P5 ) Approximationsklass Beispiel Core 2: (0, P2 ), (2, P4 ) JS Algorithmus Analyse Ergebnis Fragen 13 / 20
  • 15. Approximative Analyse Algorithmen Robert B. Inhalt Einleitung Grundlegende Sei Zk = sk + lk die Zeit in der der k-te Task endet. Eigenschaften G¨ te/Performance u Approximationsklass Beispiel JS Algorithmus Analyse Ergebnis Fragen 14 / 20
  • 16. Approximative Analyse Algorithmen Robert B. Inhalt Einleitung Grundlegende Sei Zk = sk + lk die Zeit in der der k-te Task endet. Eigenschaften G¨ te/Performance u Sei Tlast der Task der als letztes beendet wird. Approximationsklass Beispiel JS Algorithmus Analyse Ergebnis Fragen 14 / 20
  • 17. Approximative Analyse Algorithmen Robert B. Inhalt Einleitung Grundlegende Sei Zk = sk + lk die Zeit in der der k-te Task endet. Eigenschaften G¨ te/Performance u Sei Tlast der Task der als letztes beendet wird. Approximationsklass Beispiel Dann ist die Gesamtlaufzeit Zgesamt = slast + llast JS Algorithmus Analyse Ergebnis Fragen 14 / 20
  • 18. Approximative Analyse Algorithmen Robert B. Inhalt Einleitung Grundlegende Sei Zk = sk + lk die Zeit in der der k-te Task endet. Eigenschaften G¨ te/Performance u Sei Tlast der Task der als letztes beendet wird. Approximationsklass Beispiel Dann ist die Gesamtlaufzeit Zgesamt = slast + llast JS Algorithmus Analyse Ergebnis Fragen 14 / 20
  • 19. Approximative Analyse Algorithmen Robert B. Inhalt Einleitung Grundlegende Sei Zk = sk + lk die Zeit in der der k-te Task endet. Eigenschaften G¨ te/Performance u Sei Tlast der Task der als letztes beendet wird. Approximationsklass Beispiel Dann ist die Gesamtlaufzeit Zgesamt = slast + llast JS Algorithmus Analyse Ergebnis Fragen 14 / 20
  • 20. Approximative Analyse Algorithmen Robert B. Inhalt Einleitung Grundlegende 1 Sei Zk = sk + lk die Zeit in der der k-te Task endet. Eigenschaften G¨ te/Performance u 2 Sei Tlast der Task der als letztes beendet wird. Approximationsklass Beispiel 3 Dann ist die Gesamtlaufzeit Zgesamt = slast + llast JS Algorithmus Analyse 4 Damit ist die durchschnittliche Laufzeit bis zum Start Ergebnis 1 des letzten Jobs h¨chstens: n k∈{1,..,i}{last} lk o Fragen 15 / 20
  • 21. Approximative Analyse Algorithmen Robert B. Inhalt Einleitung Grundlegende 1 Sei Zk = sk + lk die Zeit in der der k-te Task endet. Eigenschaften G¨ te/Performance u 2 Sei Tlast der Task der als letztes beendet wird. Approximationsklass Beispiel 3 Dann ist die Gesamtlaufzeit Zgesamt = slast + llast JS Algorithmus Analyse 4 Damit ist die durchschnittliche Laufzeit bis zum Start Ergebnis 1 des letzten Jobs h¨chstens: n k∈{1,..,i}{last} lk o Fragen 5 Es existiert also mindestens ein Prozessor dessen Gesamtlaufzeit h¨chstens von dieser Gr¨ße ist, also: o o 1 slast ≤ n k∈{1,..,i}{last} lk 15 / 20
  • 22. Approximative Analyse Algorithmen Robert B. Inhalt Einleitung Grundlegende Eigenschaften G¨ te/Performance u Approximationsklass 1 1 slast ≤ n k∈{1,..,i}{last} lk Beispiel JS Algorithmus 2 offensichtlich gilt: OPT ≥ llast Analyse Ergebnis 1 i 3 ebenso: OPT ≥ n k=1 lk Fragen 16 / 20
  • 23. Approximative Analyse Algorithmen Robert B. Inhalt Einleitung Zgesamt = Zlast (1) Grundlegende Eigenschaften = slast + llast (2) G¨ te/Performance u Approximationsklass 1 ≤ lk + llast (3) Beispiel n JS Algorithmus k∈{1,..,i}{last} Analyse Ergebnis i Fragen 1 1 = lk + 1 − llast (4) n n k=1 1 ≤ OPT + 1 − ∗ OPT (5) n 1 = 2− ∗ OPT (6) n 17 / 20
  • 24. Approximative Ergebnis Algorithmen Robert B. Inhalt Einleitung Grundlegende Eigenschaften Und jetzt? G¨ te/Performance u Approximationsklass Wir haben gerade gezeigt das List Schedule eine Beispiel 1 relative G¨te von 2 − n hat. (juhu!) u JS Algorithmus Analyse Kann als Basis genutzt werden um List Schedule zu Ergebnis verbessern Fragen Eingabe komplett erfassen und Sortieren Alternativ nur vorhandene Eingabe sortieren und den rest nach altem Verfahren sortieren usw. 18 / 20
  • 25. Approximative Fragen? Algorithmen Robert B. Inhalt Einleitung Grundlegende Eigenschaften G¨ te/Performance u Approximationsklass Beispiel JS Algorithmus Fragen? Analyse Ergebnis Fragen 19 / 20
  • 26. Approximative Ende Algorithmen Robert B. Inhalt Einleitung Grundlegende Eigenschaften G¨ te/Performance u Approximationsklass Beispiel Quellen JS Algorithmus Analyse Diese Pr¨sentation beruht auf der Ausarbeitung im Rahmen a Ergebnis dieses Fachseminars. S¨mtliche Quellen sind dort zu finden. a Fragen 20 / 20