SlideShare uma empresa Scribd logo
1 de 34
Quantum Algorithms for
   Evaluating MIN-MAX Trees
Richard Cleve      Dmitry Gavinsky           D. L. Yonge-Mallo

                Institute for Quantum Computing,
                       University of Waterloo


                    January 30, 2008
                   TQC – Tokyo, Japan
Motivation
●   Why do we care about algorithms for MIN-
    MAX trees, anyway?
        trees

●   What is so special about the quantum
    algorithms for MIN-MAX trees that I'm
    about to present?
    –   The ideas behind them don't work in a
        classical setting!
    –   Conversely, the classical ideas don't work in
        a quantum setting!
                                                        2
Why do we care about MIN-MAX trees?

   MIN-MAX trees arise in the analysis
    of deterministic games of perfect
 information between two players who
          alternate taking turns




                                         3
Why do we care about MIN-MAX trees?

   MIN-MAX trees arise in the analysis
    of deterministic games of perfect
 information between two players who
          alternate taking turns
                                     MIN




                       MAX           MAX           MAX




                   4    1    2   5    7    8   6    9    3
                                                             4
What is a MIN-MAX tree?
●   internal nodes are MIN and MAX gates at alternating levels;
●   leaves x1,...,xN take on values from some ordered set;

●   value is value of root as a function of x1,...,xN.



                                                      MIN




                                        MAX           MAX           MAX




                                    4    1    2   5    7    8   6    9    3
                                                                              5
Evaluating a MIN-MAX tree
                         4
                   MIN




           4             8             9
     MAX           MAX           MAX




 4    1    2   5    7    8   6   9     3

                                           6
Alpha-beta pruning
                        4
                  MIN




          4             ⩾5             ⩾6
    MAX           MAX            MAX




4    1    2   5    7    8    6   9     3

                                            7
MIN-MAX trees and AND-OR trees
●   An AND-OR tree is just a MIN-MAX tree
    restricted to the values {0,1}!
                             {0,1}
●   So MIN-MAX is at least as hard as AND-OR.
                                     0
                               MIN




                       0             1             1
                 MAX           MAX           MAX




             0    0    0   1    1    1   1    1    0
                                                       8
MIN-MAX trees and AND-OR trees
●   An AND-OR tree is just a MIN-MAX tree
    restricted to the values {0,1}!
                             {0,1}
●   So MIN-MAX is at least as hard as AND-OR.
                                    0
                              AND




                      0             1            1
                 OR           OR            OR




             0   0    0   1    1    1   1   1    0
                                                     9
You can also turn MIN-MAX
 trees into AND-OR trees
             root                                 root ⩾ v?
     MIN                                   AND
                    threshold v



           MAX                                   OR




xk                                xk ⩾ v



                                                          10
You can also turn MIN-MAX
      trees into AND-OR trees
                        4   root                                    0
                                                                        root ⩾ 5?
                  MIN                                         AND
                                   threshold 5


          4             8             9               0             1             1
    MAX           MAX           MAX              OR           OR             OR




4    1    2   5    7    8   6    9    3      0   0    0   1    1    1    1   1    0



              This immediately suggests binary search...

                                                                                      11
Combining AND-OR and binary search

                        4   root                                          0
                                                                              root ⩾ 5?
                  MIN                                               AND
                                   threshold 5


          4             8             9                     0             1             1
    MAX           MAX           MAX                    OR           OR             OR




4    1    2   5    7    8   6    9    3            0   0    0   1    1    1    1   1    0
                            ●   Is root ⩾ 5? No.



                                                                                            12
Combining AND-OR and binary search

                        4   root                                          1
                                                                              root ⩾ 3?
                  MIN                                               AND
                                   threshold 3


          4             8             9                     1             1             1
    MAX           MAX           MAX                    OR           OR             OR




4    1    2   5    7    8   6    9    3            1   0    0   1    1    1    1   1    1
                            ●   Is root ⩾ 5? No.
                            ●   Is root ⩾ 3? Yes.


                                                                                            13
Combining AND-OR and binary search

                        4   root                                           1
                                                                               root ⩾ 4?
                  MIN                                                AND
                                   threshold 4


          4             8             9                     1              1             1
    MAX           MAX           MAX                    OR            OR             OR




4    1    2   5    7    8   6    9    3            1   0    0    1    1    1    1   1    0




                                                       }
                            ●   Is root ⩾ 5? No.
                            ●   Is root ⩾ 3? Yes.               root = 4
                            ●   Is root ⩾ 4? Yes.
                                                                                             14
Combining AND-OR and binary search

We can consider two models of ordered
non-binary data...

●   in the input value query model, we have direct
    access to x1,...,xN through a black box;
●   in the comparison query model, we are
    restricted to making comparisons of the form
    [xj < xk].


                                                     15
Problems with combining AND-OR
        and binary search
We need to find the midpoint of subintervals
of the form [α, β].

In the comparison query model, the midpoint
of an interval cannot be directly computed.

In the input query model, if the numerical
range is too large, the binary search may
not converge in a logarithmic number of
steps.
                                             16
Saks-Wigderson algorithm
Saks and Wigderson [SW86] showed that...
●   the optimal classical randomized
    algorithm for AND-OR tree evaluation
    makes Θ(N0.7537...) queries;
●   there is an algorithm for MIN-MAX tree
    evaluation which makes this number of
    queries, using AND-OR tree evaluation as
    a subroutine.


                                               17
Saks-Wigderson algorithm
            MAX




       v
 MIN                    MIN                AND




                          MAX                   OR



                   xk                  xk ⩾ v

           TN = 3/2 TN/2 + O(N0.7537...)

  This implies a Θ(N0.7537...) algorithm.            18
Quantum algorithm for AND-OR trees
●
    There is a lower bound of Ω(N1/2) [BS04]
●   There is a “more-or-less” matching
                              1/2+ε
    algorithm that makes O(N        ) queries
    [FGG07, CCJY07, A07+CRŠZ07]




                                                19
Quantum algorithm for AND-OR trees
●
    There is a lower bound of Ω(N1/2) [BS04]
●   There is a “more-or-less” matching
                              1/2+ε
    algorithm that makes O(N        ) queries
    [FGG07, CCJY07, A07+CRŠZ07]


       The “obvious question”...
Do these results generalize to
  MIN-MAX tree evaluation?
                                                20
“Quantum Saks-Wigderson”
            MAX




       v
 MIN                   MIN                     AND




                         MAX                        OR



                  xk                       xk ⩾ v
                               0.5
                               0.7537...
           TN = 3/2 TN/2 + O(N             )

  This implies an O(N0.5850...) algorithm.               21
Can we do better?
●   We could try to analyze the AND-OR tree algorithm
    and try to apply it directly to MIN-MAX trees...
●   A better idea:
             idea
       perform a binary search...
                        search

                     root                        root ⩾ v?
               MIN                         AND
                            pivot v


                 MAX                           OR




          xk                          xk ⩾ v                 22
Can we do better?
                                   But haven't we already
●   We could try to analyze the Aestablished that this
                                    ND-OR tree algorithm
    and try to apply it directlyapproach isAX trees...
                                 to MIN-M full of problems?
●   A better idea:
             idea
       perform a binary search...
                        search

                      root                        root ⩾ v?
                MIN                         AND
                             pivot v


                  MAX                           OR




           xk                          xk ⩾ v                 23
Solution: use random pivots
●   A better idea:
             idea
       perform a binary search using random pivots.
                                            pivots


●   Classically, finding a random pivot is as
    hard as searching, which can take Ω(N)
    queries to do even once!
●   We have a quantum algorithm to find a
    pivot with cost O(√N): Grover's search!
                                    search


                                                      24
Quantum algorithm for
       evaluating MIN-MAX trees
●   A better idea:
             idea
       perform a binary search using random pivots.
                                            pivots


                     root                     root ⩾ v?
               MIN                      AND

                       random pivot v


                 MAX                        OR




          xk                       xk ⩾ v
                                                          25
Quantum algorithm for
       evaluating MIN-MAX trees
●   The algorithm runs for O(log N) stages.
●   Each stage costs O(√N loglog N).


               To amplify the subroutines to lower
              the error probability to O(1/log(N))...




                                                        26
Quantum algorithm for
       evaluating MIN-MAX trees
●   The algorithm runs for O(log N) stages.
●   Each stage costs O(√N loglog N).


              It turns out that this is unnecessary!
                (Using a trick involving a stack...)




                                                       27
Quantum algorithm for
       evaluating MIN-MAX trees
●   The algorithm runs for O(log N) stages.
●   Each stage costs O(√N).

      This gives a quantum algorithm for
          evaluating MIN-MAX trees...

          Total cost: O(√N log N)
     This is O(N1/2+ε) for an arbitrarily small constant ε.
                                                              28
Obtaining the optimal move
●   If the values of the leaves x1,...,xN are distinct,
    this is easy.
●   Otherwise, we can use the quantum
    minimum/maximum finding algorithm [DH96].

                                              MIN




                                MAX           MAX           MAX




                            4    1    2   5    7    8   6    9    3
                                                                      29
Summary
●   Classically, the Saks-Wigderson reduction
    Classically
    from MIN-MAX to AND-OR uses ϴ(N0.7537...)
    queries.

●   Calling the quantum AND-OR subroutine
    results in an O(N0.5850...) algorithm, which is
    not optimal!

●   The classical algorithms are based on
    examining the subtrees of the tree.
                                                  30
Summary
●   Our quantum algorithm performs a binary
    search using random pivots and requires
        1/2+ε
    O(N      ) queries, which is (close to)
    optimal.
    optimal

●   Conversely, binary search is too costly for
    a classical algorithm.
    –   The ideas behind the quantum algorithm
        don't work in the classical setting!

                                                 31
Summary (chart)
Classical: ϴ(N0.7537...)       Quantum: O(N1/2+ε)
 ●   Binary search is too       ●   Uses binary search
     costly
 ●   Based on evaluating        ●   Based on evaluating
     subtrees of the MIN-MAX        the entire tree as an
     tree                           AND-OR tree, with
                                    different thresholds
 ●   Doesn't get full           ●   Gets full speedup from
     speedup from quantum           quantum AND-OR and
     AND-OR subroutine              Grover's search
                                    subroutines
                                                            32
The Moral of the Story

What works in the classical setting may fail
     to work in the quantum setting.

 What fails to work in the classical setting
may work very well in the quantum setting.

To develop quantum algorithms, one must
 be willing to abandon classical intuitions!

                                           33
Thanks!
References:
●   [CGY07] Quantum Algorithms for Evaluating
    MIN-MAX Trees.
                  arXiv:quant-ph/0710.5794

●   [FGG07] A Quantum Algorithm for the
    Hamiltonian NAND Tree.
                  arXiv:quant-ph/0702144

●   [A+CRŠZ07] Every NAND formula on N
    variables can be evaluated in time O(N1/2+ε).
                   arXiv:quant-ph/0703015
                                                    34

Mais conteúdo relacionado

Último

1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 

Último (20)

Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
Third Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptxThird Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptx
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptx
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 

Destaque

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
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
Kurio // The Social Media Age(ncy)
 

Destaque (20)

Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
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
 

Quantum Algorithms for Evaluating MIN-MAX Trees

  • 1. Quantum Algorithms for Evaluating MIN-MAX Trees Richard Cleve Dmitry Gavinsky D. L. Yonge-Mallo Institute for Quantum Computing, University of Waterloo January 30, 2008 TQC – Tokyo, Japan
  • 2. Motivation ● Why do we care about algorithms for MIN- MAX trees, anyway? trees ● What is so special about the quantum algorithms for MIN-MAX trees that I'm about to present? – The ideas behind them don't work in a classical setting! – Conversely, the classical ideas don't work in a quantum setting! 2
  • 3. Why do we care about MIN-MAX trees? MIN-MAX trees arise in the analysis of deterministic games of perfect information between two players who alternate taking turns 3
  • 4. Why do we care about MIN-MAX trees? MIN-MAX trees arise in the analysis of deterministic games of perfect information between two players who alternate taking turns MIN MAX MAX MAX 4 1 2 5 7 8 6 9 3 4
  • 5. What is a MIN-MAX tree? ● internal nodes are MIN and MAX gates at alternating levels; ● leaves x1,...,xN take on values from some ordered set; ● value is value of root as a function of x1,...,xN. MIN MAX MAX MAX 4 1 2 5 7 8 6 9 3 5
  • 6. Evaluating a MIN-MAX tree 4 MIN 4 8 9 MAX MAX MAX 4 1 2 5 7 8 6 9 3 6
  • 7. Alpha-beta pruning 4 MIN 4 ⩾5 ⩾6 MAX MAX MAX 4 1 2 5 7 8 6 9 3 7
  • 8. MIN-MAX trees and AND-OR trees ● An AND-OR tree is just a MIN-MAX tree restricted to the values {0,1}! {0,1} ● So MIN-MAX is at least as hard as AND-OR. 0 MIN 0 1 1 MAX MAX MAX 0 0 0 1 1 1 1 1 0 8
  • 9. MIN-MAX trees and AND-OR trees ● An AND-OR tree is just a MIN-MAX tree restricted to the values {0,1}! {0,1} ● So MIN-MAX is at least as hard as AND-OR. 0 AND 0 1 1 OR OR OR 0 0 0 1 1 1 1 1 0 9
  • 10. You can also turn MIN-MAX trees into AND-OR trees root root ⩾ v? MIN AND threshold v MAX OR xk xk ⩾ v 10
  • 11. You can also turn MIN-MAX trees into AND-OR trees 4 root 0 root ⩾ 5? MIN AND threshold 5 4 8 9 0 1 1 MAX MAX MAX OR OR OR 4 1 2 5 7 8 6 9 3 0 0 0 1 1 1 1 1 0 This immediately suggests binary search... 11
  • 12. Combining AND-OR and binary search 4 root 0 root ⩾ 5? MIN AND threshold 5 4 8 9 0 1 1 MAX MAX MAX OR OR OR 4 1 2 5 7 8 6 9 3 0 0 0 1 1 1 1 1 0 ● Is root ⩾ 5? No. 12
  • 13. Combining AND-OR and binary search 4 root 1 root ⩾ 3? MIN AND threshold 3 4 8 9 1 1 1 MAX MAX MAX OR OR OR 4 1 2 5 7 8 6 9 3 1 0 0 1 1 1 1 1 1 ● Is root ⩾ 5? No. ● Is root ⩾ 3? Yes. 13
  • 14. Combining AND-OR and binary search 4 root 1 root ⩾ 4? MIN AND threshold 4 4 8 9 1 1 1 MAX MAX MAX OR OR OR 4 1 2 5 7 8 6 9 3 1 0 0 1 1 1 1 1 0 } ● Is root ⩾ 5? No. ● Is root ⩾ 3? Yes. root = 4 ● Is root ⩾ 4? Yes. 14
  • 15. Combining AND-OR and binary search We can consider two models of ordered non-binary data... ● in the input value query model, we have direct access to x1,...,xN through a black box; ● in the comparison query model, we are restricted to making comparisons of the form [xj < xk]. 15
  • 16. Problems with combining AND-OR and binary search We need to find the midpoint of subintervals of the form [α, β]. In the comparison query model, the midpoint of an interval cannot be directly computed. In the input query model, if the numerical range is too large, the binary search may not converge in a logarithmic number of steps. 16
  • 17. Saks-Wigderson algorithm Saks and Wigderson [SW86] showed that... ● the optimal classical randomized algorithm for AND-OR tree evaluation makes Θ(N0.7537...) queries; ● there is an algorithm for MIN-MAX tree evaluation which makes this number of queries, using AND-OR tree evaluation as a subroutine. 17
  • 18. Saks-Wigderson algorithm MAX v MIN MIN AND MAX OR xk xk ⩾ v TN = 3/2 TN/2 + O(N0.7537...) This implies a Θ(N0.7537...) algorithm. 18
  • 19. Quantum algorithm for AND-OR trees ● There is a lower bound of Ω(N1/2) [BS04] ● There is a “more-or-less” matching 1/2+ε algorithm that makes O(N ) queries [FGG07, CCJY07, A07+CRŠZ07] 19
  • 20. Quantum algorithm for AND-OR trees ● There is a lower bound of Ω(N1/2) [BS04] ● There is a “more-or-less” matching 1/2+ε algorithm that makes O(N ) queries [FGG07, CCJY07, A07+CRŠZ07] The “obvious question”... Do these results generalize to MIN-MAX tree evaluation? 20
  • 21. “Quantum Saks-Wigderson” MAX v MIN MIN AND MAX OR xk xk ⩾ v 0.5 0.7537... TN = 3/2 TN/2 + O(N ) This implies an O(N0.5850...) algorithm. 21
  • 22. Can we do better? ● We could try to analyze the AND-OR tree algorithm and try to apply it directly to MIN-MAX trees... ● A better idea: idea perform a binary search... search root root ⩾ v? MIN AND pivot v MAX OR xk xk ⩾ v 22
  • 23. Can we do better? But haven't we already ● We could try to analyze the Aestablished that this ND-OR tree algorithm and try to apply it directlyapproach isAX trees... to MIN-M full of problems? ● A better idea: idea perform a binary search... search root root ⩾ v? MIN AND pivot v MAX OR xk xk ⩾ v 23
  • 24. Solution: use random pivots ● A better idea: idea perform a binary search using random pivots. pivots ● Classically, finding a random pivot is as hard as searching, which can take Ω(N) queries to do even once! ● We have a quantum algorithm to find a pivot with cost O(√N): Grover's search! search 24
  • 25. Quantum algorithm for evaluating MIN-MAX trees ● A better idea: idea perform a binary search using random pivots. pivots root root ⩾ v? MIN AND random pivot v MAX OR xk xk ⩾ v 25
  • 26. Quantum algorithm for evaluating MIN-MAX trees ● The algorithm runs for O(log N) stages. ● Each stage costs O(√N loglog N). To amplify the subroutines to lower the error probability to O(1/log(N))... 26
  • 27. Quantum algorithm for evaluating MIN-MAX trees ● The algorithm runs for O(log N) stages. ● Each stage costs O(√N loglog N). It turns out that this is unnecessary! (Using a trick involving a stack...) 27
  • 28. Quantum algorithm for evaluating MIN-MAX trees ● The algorithm runs for O(log N) stages. ● Each stage costs O(√N). This gives a quantum algorithm for evaluating MIN-MAX trees... Total cost: O(√N log N) This is O(N1/2+ε) for an arbitrarily small constant ε. 28
  • 29. Obtaining the optimal move ● If the values of the leaves x1,...,xN are distinct, this is easy. ● Otherwise, we can use the quantum minimum/maximum finding algorithm [DH96]. MIN MAX MAX MAX 4 1 2 5 7 8 6 9 3 29
  • 30. Summary ● Classically, the Saks-Wigderson reduction Classically from MIN-MAX to AND-OR uses ϴ(N0.7537...) queries. ● Calling the quantum AND-OR subroutine results in an O(N0.5850...) algorithm, which is not optimal! ● The classical algorithms are based on examining the subtrees of the tree. 30
  • 31. Summary ● Our quantum algorithm performs a binary search using random pivots and requires 1/2+ε O(N ) queries, which is (close to) optimal. optimal ● Conversely, binary search is too costly for a classical algorithm. – The ideas behind the quantum algorithm don't work in the classical setting! 31
  • 32. Summary (chart) Classical: ϴ(N0.7537...) Quantum: O(N1/2+ε) ● Binary search is too ● Uses binary search costly ● Based on evaluating ● Based on evaluating subtrees of the MIN-MAX the entire tree as an tree AND-OR tree, with different thresholds ● Doesn't get full ● Gets full speedup from speedup from quantum quantum AND-OR and AND-OR subroutine Grover's search subroutines 32
  • 33. The Moral of the Story What works in the classical setting may fail to work in the quantum setting. What fails to work in the classical setting may work very well in the quantum setting. To develop quantum algorithms, one must be willing to abandon classical intuitions! 33
  • 34. Thanks! References: ● [CGY07] Quantum Algorithms for Evaluating MIN-MAX Trees. arXiv:quant-ph/0710.5794 ● [FGG07] A Quantum Algorithm for the Hamiltonian NAND Tree. arXiv:quant-ph/0702144 ● [A+CRŠZ07] Every NAND formula on N variables can be evaluated in time O(N1/2+ε). arXiv:quant-ph/0703015 34