search for more declarativity
play

Search for More Declarativity Backward Reasoning for Rule Languages - PowerPoint PPT Presentation

Motivation D&B-search Search & Partial Ordering Conclusion Search for More Declarativity Backward Reasoning for Rule Languages Reconsidered Simon Brodt Franois Bry Norbert Eisinger Institute for Informatics, University of Munich,


  1. Motivation Rule Languages & Declarativity D&B-search Rule Languages & Search Search & Partial Ordering Desiderata for Search Methods Conclusion Search & Declarativity Not Much Choice Depth-First-Search (D-search) Breadth-First-Search (B-search) Iterative Deepening Iterative Broadening Simon Brodt, François Bry, Norbert Eisinger Search for More Declarativity 5/34

  2. Motivation Rule Languages & Declarativity D&B-search Rule Languages & Search Search & Partial Ordering Desiderata for Search Methods Conclusion Search & Declarativity Not Much Choice Depth-First-Search (D-search) Breadth-First-Search (B-search) Iterative Deepening Iterative Broadening Simon Brodt, François Bry, Norbert Eisinger Search for More Declarativity 5/34

  3. Motivation Rule Languages & Declarativity D&B-search Rule Languages & Search Search & Partial Ordering Desiderata for Search Methods Conclusion Search & Declarativity Not Much Choice Depth-First-Search (D-search) Breadth-First-Search (B-search) Iterative Deepening Iterative Broadening Simon Brodt, François Bry, Norbert Eisinger Search for More Declarativity 5/34

  4. Motivation Rule Languages & Declarativity D&B-search Rule Languages & Search Search & Partial Ordering Desiderata for Search Methods Conclusion Search & Declarativity Not Much Choice Depth-First-Search (D-search) Breadth-First-Search (B-search) Iterative Deepening Iterative Broadening Simon Brodt, François Bry, Norbert Eisinger Search for More Declarativity 5/34

  5. Motivation Rule Languages & Declarativity D&B-search Rule Languages & Search Search & Partial Ordering Desiderata for Search Methods Conclusion Search & Declarativity Not Much Choice Depth-First-Search (D-search) Breadth-First-Search (B-search) Iterative Deepening Iterative Broadening Simon Brodt, François Bry, Norbert Eisinger Search for More Declarativity 5/34

  6. Motivation Rule Languages & Declarativity D&B-search Rule Languages & Search Search & Partial Ordering Desiderata for Search Methods Conclusion Search & Declarativity Not Much Choice Depth-First-Search (D-search) Breadth-First-Search (B-search) Iterative Deepening Iterative Broadening Only uninformed search methods can be used Simon Brodt, François Bry, Norbert Eisinger Search for More Declarativity 5/34

  7. Motivation Rule Languages & Declarativity D&B-search Rule Languages & Search Search & Partial Ordering Desiderata for Search Methods Conclusion Search & Declarativity Not Much Choice Depth-First-Search (D-search) Breadth-First-Search (B-search) Iterative Deepening Iterative Broadening Only uninformed search methods can be used Simon Brodt, François Bry, Norbert Eisinger Search for More Declarativity 5/34

  8. Motivation Rule Languages & Declarativity D&B-search Rule Languages & Search Search & Partial Ordering Desiderata for Search Methods Conclusion Search & Declarativity Desiderata for Search Methods Completeness on finite and infinite search trees. Every node in the search space is visited after a finite number of steps. Polynomial space complexity O ( d c ) c = constant d = maximum depth reached so far (or of the entire tree, if it is finite) Linear time complexity O ( n ) n = number of nodes visited at least once (or of the entire tree, if it is finite) Simon Brodt, François Bry, Norbert Eisinger Search for More Declarativity 6/34

  9. Motivation Rule Languages & Declarativity D&B-search Rule Languages & Search Search & Partial Ordering Desiderata for Search Methods Conclusion Search & Declarativity Desiderata for Search Methods Completeness on finite and infinite search trees. Every node in the search space is visited after a finite number of steps. Polynomial space complexity O ( d c ) c = constant d = maximum depth reached so far (or of the entire tree, if it is finite) Linear time complexity O ( n ) n = number of nodes visited at least once (or of the entire tree, if it is finite) Simon Brodt, François Bry, Norbert Eisinger Search for More Declarativity 6/34

  10. Motivation Rule Languages & Declarativity D&B-search Rule Languages & Search Search & Partial Ordering Desiderata for Search Methods Conclusion Search & Declarativity Desiderata for Search Methods Completeness on finite and infinite search trees. Every node in the search space is visited after a finite number of steps. Polynomial space complexity O ( d c ) c = constant d = maximum depth reached so far (or of the entire tree, if it is finite) Linear time complexity O ( n ) n = number of nodes visited at least once (or of the entire tree, if it is finite) Simon Brodt, François Bry, Norbert Eisinger Search for More Declarativity 6/34

  11. Motivation Rule Languages & Declarativity D&B-search Rule Languages & Search Search & Partial Ordering Desiderata for Search Methods Conclusion Search & Declarativity Traditional Methods Fail D-search Incomplete on infinite trees B-search Exponential space-complexity in the depth of the tree Iterative Deepening Frequent re-evaluation Iterative Broadening Incomplete on infinite trees Frequent re-evaluation Simon Brodt, François Bry, Norbert Eisinger Search for More Declarativity 7/34

  12. Motivation Rule Languages & Declarativity D&B-search Rule Languages & Search Search & Partial Ordering Desiderata for Search Methods Conclusion Search & Declarativity Traditional Methods Fail D-search Incomplete on infinite trees B-search Exponential space-complexity in the depth of the tree Iterative Deepening Frequent re-evaluation Iterative Broadening Incomplete on infinite trees Frequent re-evaluation Simon Brodt, François Bry, Norbert Eisinger Search for More Declarativity 7/34

  13. Motivation Rule Languages & Declarativity D&B-search Rule Languages & Search Search & Partial Ordering Desiderata for Search Methods Conclusion Search & Declarativity Traditional Methods Fail D-search Incomplete on infinite trees B-search Exponential space-complexity in the depth of the tree Iterative Deepening Frequent re-evaluation Iterative Broadening Incomplete on infinite trees Frequent re-evaluation Simon Brodt, François Bry, Norbert Eisinger Search for More Declarativity 7/34

  14. Motivation Rule Languages & Declarativity D&B-search Rule Languages & Search Search & Partial Ordering Desiderata for Search Methods Conclusion Search & Declarativity Traditional Methods Fail D-search Incomplete on infinite trees B-search Exponential space-complexity in the depth of the tree Iterative Deepening Frequent re-evaluation Iterative Broadening Incomplete on infinite trees Frequent re-evaluation Simon Brodt, François Bry, Norbert Eisinger Search for More Declarativity 7/34

  15. Motivation Rule Languages & Declarativity D&B-search Rule Languages & Search Search & Partial Ordering Desiderata for Search Methods Conclusion Search & Declarativity Sensible Compromise? (Prolog) Use D-search Give rule authors some control to avoid infinite dead ends (e.g. ordering of the rules, . . . ) Declarativity gets lost Simon Brodt, François Bry, Norbert Eisinger Search for More Declarativity 8/34

  16. Motivation Rule Languages & Declarativity D&B-search Rule Languages & Search Search & Partial Ordering Desiderata for Search Methods Conclusion Search & Declarativity Sensible Compromise? (Prolog) Use D-search Give rule authors some control to avoid infinite dead ends (e.g. ordering of the rules, . . . ) Declarativity gets lost Simon Brodt, François Bry, Norbert Eisinger Search for More Declarativity 8/34

  17. Motivation Rule Languages & Declarativity D&B-search Rule Languages & Search Search & Partial Ordering Desiderata for Search Methods Conclusion Search & Declarativity Search & Declarativity Term Representation for Natural Numbers zero represents 0 succ(X,Y) can provide the predecessor X to any Y representing a nonzero natural number Program nat(zero) ← nat(Y) ← succ(X,Y) ∧ nat(X) ← nat(X) ∧ nat(Y) nat 2 (X,Y) less(X,Y) ← "reasonably defined" Simon Brodt, François Bry, Norbert Eisinger Search for More Declarativity 9/34

  18. Motivation Rule Languages & Declarativity D&B-search Rule Languages & Search Search & Partial Ordering Desiderata for Search Methods Conclusion Search & Declarativity Problem 1 – Incomplete Enumerations Program nat(zero) ← ← succ(X,Y) ∧ nat(X) nat(Y) nat 2 (X,Y) ← nat(X) ∧ nat(Y) less(X,Y) ← "reasonably defined" Queries ← nat(X) 1 ← nat 2 (X,Y) 2 Prolog’s Results Expected Results 1 Enumeration of ◆ 1 Enumeration of ◆ 2 Enumeration of { 0 } × ◆ 2 Enumeration of ◆ × ◆ Simon Brodt, François Bry, Norbert Eisinger Search for More Declarativity 10/34

  19. Motivation Rule Languages & Declarativity D&B-search Rule Languages & Search Search & Partial Ordering Desiderata for Search Methods Conclusion Search & Declarativity Problem 1 – Incomplete Enumerations Program nat(zero) ← ← succ(X,Y) ∧ nat(X) nat(Y) nat 2 (X,Y) ← nat(X) ∧ nat(Y) less(X,Y) ← "reasonably defined" Queries ← nat(X) 1 ← nat 2 (X,Y) 2 Prolog’s Results Expected Results 1 Enumeration of ◆ 1 Enumeration of ◆ 2 Enumeration of { 0 } × ◆ 2 Enumeration of ◆ × ◆ Simon Brodt, François Bry, Norbert Eisinger Search for More Declarativity 10/34

  20. Motivation Rule Languages & Declarativity D&B-search Rule Languages & Search Search & Partial Ordering Desiderata for Search Methods Conclusion Search & Declarativity Problem 1 – Incomplete Enumerations Program nat(zero) ← ← succ(X,Y) ∧ nat(X) nat(Y) nat 2 (X,Y) ← nat(X) ∧ nat(Y) less(X,Y) ← "reasonably defined" Queries ← nat(X) 1 ← nat 2 (X,Y) 2 Prolog’s Results Expected Results 1 Enumeration of ◆ 1 Enumeration of ◆ 2 Enumeration of { 0 } × ◆ 2 Enumeration of ◆ × ◆ Simon Brodt, François Bry, Norbert Eisinger Search for More Declarativity 10/34

  21. Motivation Rule Languages & Declarativity D&B-search Rule Languages & Search Search & Partial Ordering Desiderata for Search Methods Conclusion Search & Declarativity Problem 2 – Non-Commutativity Program nat(zero) ← nat(Y) ← succ(X,Y) ∧ nat(X) nat 2 (X,Y) ← nat(X) ∧ nat(Y) less(X,Y) ← "reasonably defined" Queries (Assume Single-Answer-Mode) ← less(zero ,X) ∧ nat 2 (X,Y) 1 ← nat 2 (X,Y) ∧ less(zero ,X) 2 Prolog’s Results Expected Results 1 Yes 1 Yes 2 No answer (does not terminate) 2 Yes Simon Brodt, François Bry, Norbert Eisinger Search for More Declarativity 11/34

  22. Motivation Rule Languages & Declarativity D&B-search Rule Languages & Search Search & Partial Ordering Desiderata for Search Methods Conclusion Search & Declarativity Problem 2 – Non-Commutativity Program nat(zero) ← nat(Y) ← succ(X,Y) ∧ nat(X) nat 2 (X,Y) ← nat(X) ∧ nat(Y) less(X,Y) ← "reasonably defined" Queries (Assume Single-Answer-Mode) ← less(zero ,X) ∧ nat 2 (X,Y) 1 ← nat 2 (X,Y) ∧ less(zero ,X) 2 Prolog’s Results Expected Results 1 Yes 1 Yes 2 No answer (does not terminate) 2 Yes Simon Brodt, François Bry, Norbert Eisinger Search for More Declarativity 11/34

  23. Motivation Rule Languages & Declarativity D&B-search Rule Languages & Search Search & Partial Ordering Desiderata for Search Methods Conclusion Search & Declarativity Problem 2 – Non-Commutativity Program nat(zero) ← nat(Y) ← succ(X,Y) ∧ nat(X) nat 2 (X,Y) ← nat(X) ∧ nat(Y) less(X,Y) ← "reasonably defined" Queries (Assume Single-Answer-Mode) ← less(zero ,X) ∧ nat 2 (X,Y) 1 ← nat 2 (X,Y) ∧ less(zero ,X) 2 Prolog’s Results Expected Results 1 Yes 1 Yes 2 No answer (does not terminate) 2 Yes Simon Brodt, François Bry, Norbert Eisinger Search for More Declarativity 11/34

  24. Motivation Rule Languages & Declarativity D&B-search Rule Languages & Search Search & Partial Ordering Desiderata for Search Methods Conclusion Search & Declarativity Reason – Incomplete Search SLD-resolution is fine Perfectly sound and complete with any literal selection function. Problem: Incompleteness of D-search The problems would not arise with a complete search method Choose iterative deepening? Simon Brodt, François Bry, Norbert Eisinger Search for More Declarativity 12/34

  25. Motivation Rule Languages & Declarativity D&B-search Rule Languages & Search Search & Partial Ordering Desiderata for Search Methods Conclusion Search & Declarativity Reason – Incomplete Search SLD-resolution is fine Perfectly sound and complete with any literal selection function. Problem: Incompleteness of D-search The problems would not arise with a complete search method Choose iterative deepening? Simon Brodt, François Bry, Norbert Eisinger Search for More Declarativity 12/34

  26. Motivation Rule Languages & Declarativity D&B-search Rule Languages & Search Search & Partial Ordering Desiderata for Search Methods Conclusion Search & Declarativity Reason – Incomplete Search SLD-resolution is fine Perfectly sound and complete with any literal selection function. Problem: Incompleteness of D-search The problems would not arise with a complete search method Choose iterative deepening? Simon Brodt, François Bry, Norbert Eisinger Search for More Declarativity 12/34

  27. Motivation Rule Languages & Declarativity D&B-search Rule Languages & Search Search & Partial Ordering Desiderata for Search Methods Conclusion Search & Declarativity Problem 3 – Inefficiency on Functional Rule Sets Program even(zero) ← ← succ(X,Y) ∧ odd(X) even(Y) ← succ(X,Y) ∧ even(X) odd(Y) Query ← constant(X) ∧ even(X) constant(X) binds X to some fixed, large number n ∈ ◆ . Expected Runtime Runtime with Iterative-Deepening O ( n 2 ) O ( n ) Search should not slow down the evaluation of functional rules Simon Brodt, François Bry, Norbert Eisinger Search for More Declarativity 13/34

  28. Motivation Rule Languages & Declarativity D&B-search Rule Languages & Search Search & Partial Ordering Desiderata for Search Methods Conclusion Search & Declarativity Problem 3 – Inefficiency on Functional Rule Sets Program even(zero) ← ← succ(X,Y) ∧ odd(X) even(Y) ← succ(X,Y) ∧ even(X) odd(Y) Query ← constant(X) ∧ even(X) constant(X) binds X to some fixed, large number n ∈ ◆ . Expected Runtime Runtime with Iterative-Deepening O ( n 2 ) O ( n ) Search should not slow down the evaluation of functional rules Simon Brodt, François Bry, Norbert Eisinger Search for More Declarativity 13/34

  29. Motivation Rule Languages & Declarativity D&B-search Rule Languages & Search Search & Partial Ordering Desiderata for Search Methods Conclusion Search & Declarativity Problem 3 – Inefficiency on Functional Rule Sets Program even(zero) ← ← succ(X,Y) ∧ odd(X) even(Y) ← succ(X,Y) ∧ even(X) odd(Y) Query ← constant(X) ∧ even(X) constant(X) binds X to some fixed, large number n ∈ ◆ . Expected Runtime Runtime with Iterative-Deepening O ( n 2 ) O ( n ) Search should not slow down the evaluation of functional rules Simon Brodt, François Bry, Norbert Eisinger Search for More Declarativity 13/34

  30. Motivation Rule Languages & Declarativity D&B-search Rule Languages & Search Search & Partial Ordering Desiderata for Search Methods Conclusion Search & Declarativity Problem 3 – Inefficiency on Functional Rule Sets Program even(zero) ← ← succ(X,Y) ∧ odd(X) even(Y) ← succ(X,Y) ∧ even(X) odd(Y) Query ← constant(X) ∧ even(X) constant(X) binds X to some fixed, large number n ∈ ◆ . Expected Runtime Runtime with Iterative-Deepening O ( n 2 ) O ( n ) Search should not slow down the evaluation of functional rules Simon Brodt, François Bry, Norbert Eisinger Search for More Declarativity 13/34

  31. Motivation Rule Languages & Declarativity D&B-search Rule Languages & Search Search & Partial Ordering Desiderata for Search Methods Conclusion Search & Declarativity A New Algorithm – D&B-search Integrates D-search and B-search Complete on finite and infinite trees Linear space complexity in depth for basic algorithm Non-repetitive Family of algorithms in parameter c with Complete for c > 0 Polynomial space-requirement O ( d c ) in depth for c < ∞ D-search and B-search as extreme cases Only simple datastructures needed Properties are proved Simon Brodt, François Bry, Norbert Eisinger Search for More Declarativity 14/34

  32. Motivation Rule Languages & Declarativity D&B-search Rule Languages & Search Search & Partial Ordering Desiderata for Search Methods Conclusion Search & Declarativity A New Algorithm – D&B-search Integrates D-search and B-search Complete on finite and infinite trees Linear space complexity in depth for basic algorithm Non-repetitive Family of algorithms in parameter c with Complete for c > 0 Polynomial space-requirement O ( d c ) in depth for c < ∞ D-search and B-search as extreme cases Only simple datastructures needed Properties are proved Simon Brodt, François Bry, Norbert Eisinger Search for More Declarativity 14/34

  33. Motivation Rule Languages & Declarativity D&B-search Rule Languages & Search Search & Partial Ordering Desiderata for Search Methods Conclusion Search & Declarativity Overview D&B-search 1 Search & Partial Ordering 2 Conclusion 3 Simon Brodt, François Bry, Norbert Eisinger Search for More Declarativity 15/34

  34. Motivation D&B-search The Basic Algorithm Search & Partial Ordering The D&B-Family Conclusion D&B-search D&B-search 1 The Basic Algorithm The D&B-Family Search & Partial Ordering 2 Conclusion 3 Simon Brodt, François Bry, Norbert Eisinger Search for More Declarativity 16/34

  35. Motivation D&B-search The Basic Algorithm Search & Partial Ordering The D&B-Family Conclusion 0 D-search starts 1 f 0 2 f 1 D-search passes depth bound f 0 3 B-search completes level 0 4 f 2 (no work to do) 5 D-search passes depth bound f 1 6 B-search completes level 1 7 D-search passes depth bound f 2 8 B-search completes level 2 Simon Brodt, François Bry, Norbert Eisinger Search for More Declarativity 17/34

  36. Motivation D&B-search The Basic Algorithm Search & Partial Ordering The D&B-Family Conclusion 0 D-search starts 1 f 0 2 f 1 D-search passes depth bound f 0 3 B-search completes level 0 4 f 2 (no work to do) 5 D-search passes depth bound f 1 6 B-search completes level 1 7 D-search passes depth bound f 2 8 B-search completes level 2 Simon Brodt, François Bry, Norbert Eisinger Search for More Declarativity 17/34

  37. Motivation D&B-search The Basic Algorithm Search & Partial Ordering The D&B-Family Conclusion 0 D-search starts 1 f 0 2 f 1 D-search passes depth bound f 0 3 B-search completes level 0 4 f 2 (no work to do) 5 D-search passes depth bound f 1 6 B-search completes level 1 7 D-search passes depth bound f 2 8 B-search completes level 2 Simon Brodt, François Bry, Norbert Eisinger Search for More Declarativity 17/34

  38. Motivation D&B-search The Basic Algorithm Search & Partial Ordering The D&B-Family Conclusion 0 D-search starts 1 f 0 2 f 1 D-search passes depth bound f 0 3 B-search completes level 0 4 f 2 (no work to do) 5 D-search passes depth bound f 1 6 B-search completes level 1 7 D-search passes depth bound f 2 8 B-search completes level 2 Simon Brodt, François Bry, Norbert Eisinger Search for More Declarativity 17/34

  39. Motivation D&B-search The Basic Algorithm Search & Partial Ordering The D&B-Family Conclusion 0 D-search starts 1 f 0 2 f 1 D-search passes depth bound f 0 3 B-search completes level 0 4 f 2 (no work to do) 5 D-search passes depth bound f 1 6 B-search completes level 1 7 D-search passes depth bound f 2 8 B-search completes level 2 Simon Brodt, François Bry, Norbert Eisinger Search for More Declarativity 17/34

  40. Motivation D&B-search The Basic Algorithm Search & Partial Ordering The D&B-Family Conclusion 0 D-search starts 1 f 0 2 f 1 D-search passes depth bound f 0 3 B-search completes level 0 4 f 2 (no work to do) 5 D-search passes depth bound f 1 6 B-search completes level 1 7 D-search passes depth bound f 2 8 B-search completes level 2 Simon Brodt, François Bry, Norbert Eisinger Search for More Declarativity 17/34

  41. Motivation D&B-search The Basic Algorithm Search & Partial Ordering The D&B-Family Conclusion 0 D-search starts 1 f 0 2 f 1 D-search passes depth bound f 0 3 B-search completes level 0 4 f 2 (no work to do) 5 D-search passes depth bound f 1 6 B-search completes level 1 7 D-search passes depth bound f 2 8 B-search completes level 2 Simon Brodt, François Bry, Norbert Eisinger Search for More Declarativity 17/34

  42. Motivation D&B-search The Basic Algorithm Search & Partial Ordering The D&B-Family Conclusion 0 D-search starts 1 f 0 2 f 1 D-search passes depth bound f 0 3 B-search completes level 0 4 f 2 (no work to do) 5 D-search passes depth bound f 1 6 B-search completes level 1 7 D-search passes depth bound f 2 8 B-search completes level 2 Generally D-search passes depth bound f i + 1 only if the level i has been completed B-search completes the level i only if depth bound f i has been passed Simon Brodt, François Bry, Norbert Eisinger Search for More Declarativity 17/34

  43. Motivation D&B-search The Basic Algorithm Search & Partial Ordering The D&B-Family Conclusion 0 D-search starts 1 f 0 2 f 1 D-search passes depth bound f 0 3 B-search completes level 0 4 f 2 (no work to do) 5 D-search passes depth bound f 1 6 B-search completes level 1 7 D-search passes depth bound f 2 8 B-search completes level 2 Generally D-search passes depth bound f i + 1 only if the level i has been completed B-search completes the level i only if depth bound f i has been passed Simon Brodt, François Bry, Norbert Eisinger Search for More Declarativity 17/34

  44. Motivation D&B-search The Basic Algorithm Search & Partial Ordering The D&B-Family Conclusion 0 D-search starts 1 f 0 2 f 1 D-search passes depth bound f 0 3 B-search completes level 0 4 f 2 (no work to do) 5 D-search passes depth bound f 1 6 B-search completes level 1 7 D-search passes depth bound f 2 8 B-search completes level 2 Generally D-search passes depth bound f i + 1 only if the level i has been completed B-search completes the level i only if depth bound f i has been passed Simon Brodt, François Bry, Norbert Eisinger Search for More Declarativity 17/34

  45. Motivation D&B-search The Basic Algorithm Search & Partial Ordering The D&B-Family Conclusion 0 D-search starts 1 f 0 2 f 1 D-search passes depth bound f 0 3 B-search completes level 0 4 f 2 (no work to do) 5 D-search passes depth bound f 1 6 B-search completes level 1 7 D-search passes depth bound f 2 8 B-search completes level 2 Observations D-search advances exponentially faster than B-search The number of nodes to be stored is only polynomial in the maximum depth (if f i is exponential in i ) Simon Brodt, François Bry, Norbert Eisinger Search for More Declarativity 17/34

  46. Motivation D&B-search The Basic Algorithm Search & Partial Ordering The D&B-Family Conclusion 0 D-search starts 1 f 0 2 f 1 D-search passes depth bound f 0 3 B-search completes level 0 4 f 2 (no work to do) 5 D-search passes depth bound f 1 6 B-search completes level 1 7 D-search passes depth bound f 2 8 B-search completes level 2 Observations D-search advances exponentially faster than B-search The number of nodes to be stored is only polynomial in the maximum depth (if f i is exponential in i ) Simon Brodt, François Bry, Norbert Eisinger Search for More Declarativity 17/34

  47. Motivation D&B-search The Basic Algorithm Search & Partial Ordering The D&B-Family Conclusion 0 D-search starts 1 f 0 2 f 1 D-search passes depth bound f 0 3 B-search completes level 0 4 f 2 (no work to do) 5 D-search passes depth bound f 1 6 B-search completes level 1 7 D-search passes depth bound f 2 8 B-search completes level 2 Observations D-search advances exponentially faster than B-search The number of nodes to be stored is only polynomial in the maximum depth (if f i is exponential in i ) Simon Brodt, François Bry, Norbert Eisinger Search for More Declarativity 17/34

  48. Motivation D&B-search The Basic Algorithm Search & Partial Ordering The D&B-Family Conclusion D&B-search – Idea Alternate D-search with B-search Rotation is controlled by a sequence f 0 , f 1 , f 2 , . . . of depth bounds Defined by a function ◆ → ◆ , i �→ f i i < f i < f i + 1 f i = 2 i for the examples Simon Brodt, François Bry, Norbert Eisinger Search for More Declarativity 18/34

  49. Motivation D&B-search The Basic Algorithm Search & Partial Ordering The D&B-Family Conclusion D&B-search – Pivot-Nodes and Pivot-Sets A node is “earlier” than another if 0 (unrestricted) D-search would expand it first 1 f 0 Pivot-node s i : earliest node at depth f i 2 f 1 Pre-pivot-set S 0 : nodes earlier than s 0 3 f 2 4 D i : nodes earlier than s i + 1 5 B i : nodes at depth i 6 Inter-pivot-set S i + 1 = ( D i ∪ B i ) \ X i 7 is expanded in-between s i and s i + 1 8 X i = S 0 ∪ s 0 ∪ . . . ∪ S i ∪ s i Post-pivot-set R : the rest of the nodes Simon Brodt, François Bry, Norbert Eisinger Search for More Declarativity 19/34

  50. Motivation D&B-search The Basic Algorithm Search & Partial Ordering The D&B-Family Conclusion D&B-search – Pivot-Nodes and Pivot-Sets A node is “earlier” than another if s 0 0 (unrestricted) D-search would expand it first 1 f 0 Pivot-node s i : earliest node at depth f i 2 f 1 Pre-pivot-set S 0 : nodes earlier than s 0 3 s 1 D i : nodes earlier than s i + 1 4 f 2 5 B i : nodes at depth i s 2 6 Inter-pivot-set S i + 1 = ( D i ∪ B i ) \ X i 7 is expanded in-between s i and s i + 1 8 X i = S 0 ∪ s 0 ∪ . . . ∪ S i ∪ s i Post-pivot-set R : the rest of the nodes Simon Brodt, François Bry, Norbert Eisinger Search for More Declarativity 19/34

  51. Motivation D&B-search The Basic Algorithm Search & Partial Ordering The D&B-Family Conclusion D&B-search – Pivot-Nodes and Pivot-Sets A node is “earlier” than another if s 0 0 (unrestricted) D-search would expand it first S 0 1 f 0 Pivot-node s i : earliest node at depth f i 2 f 1 Pre-pivot-set S 0 : nodes earlier than s 0 3 s 1 D i : nodes earlier than s i + 1 4 f 2 5 B i : nodes at depth i s 2 6 Inter-pivot-set S i + 1 = ( D i ∪ B i ) \ X i 7 is expanded in-between s i and s i + 1 8 X i = S 0 ∪ s 0 ∪ . . . ∪ S i ∪ s i Post-pivot-set R : the rest of the nodes Simon Brodt, François Bry, Norbert Eisinger Search for More Declarativity 19/34

  52. Motivation D&B-search The Basic Algorithm Search & Partial Ordering The D&B-Family Conclusion D&B-search – Pivot-Nodes and Pivot-Sets A node is “earlier” than another if s 0 0 (unrestricted) D-search would expand it first 1 f 0 D 1 Pivot-node s i : earliest node at depth f i 2 f 1 Pre-pivot-set S 0 : nodes earlier than s 0 3 s 1 D i : nodes earlier than s i + 1 4 f 2 5 B i : nodes at depth i s 2 6 Inter-pivot-set S i + 1 = ( D i ∪ B i ) \ X i 7 is expanded in-between s i and s i + 1 8 X i = S 0 ∪ s 0 ∪ . . . ∪ S i ∪ s i Post-pivot-set R : the rest of the nodes Simon Brodt, François Bry, Norbert Eisinger Search for More Declarativity 19/34

  53. Motivation D&B-search The Basic Algorithm Search & Partial Ordering The D&B-Family Conclusion D&B-search – Pivot-Nodes and Pivot-Sets A node is “earlier” than another if s 0 0 (unrestricted) D-search would expand it first B 1 1 f 0 Pivot-node s i : earliest node at depth f i 2 f 1 Pre-pivot-set S 0 : nodes earlier than s 0 3 s 1 D i : nodes earlier than s i + 1 4 f 2 5 B i : nodes at depth i s 2 6 Inter-pivot-set S i + 1 = ( D i ∪ B i ) \ X i 7 is expanded in-between s i and s i + 1 8 X i = S 0 ∪ s 0 ∪ . . . ∪ S i ∪ s i Post-pivot-set R : the rest of the nodes Simon Brodt, François Bry, Norbert Eisinger Search for More Declarativity 19/34

  54. Motivation D&B-search The Basic Algorithm Search & Partial Ordering The D&B-Family Conclusion D&B-search – Pivot-Nodes and Pivot-Sets A node is “earlier” than another if 0 (unrestricted) D-search would expand it first 1 f 0 X 1 Pivot-node s i : earliest node at depth f i 2 f 1 Pre-pivot-set S 0 : nodes earlier than s 0 3 S 2 f 2 4 D i : nodes earlier than s i + 1 5 s 2 B i : nodes at depth i 6 Inter-pivot-set S i + 1 = ( D i ∪ B i ) \ X i 7 is expanded in-between s i and s i + 1 8 X i = S 0 ∪ s 0 ∪ . . . ∪ S i ∪ s i Post-pivot-set R : the rest of the nodes Simon Brodt, François Bry, Norbert Eisinger Search for More Declarativity 19/34

  55. Motivation D&B-search The Basic Algorithm Search & Partial Ordering The D&B-Family Conclusion D&B-search – Pivot-Nodes and Pivot-Sets A node is “earlier” than another if 0 (unrestricted) D-search would expand it first f 0 1 Pivot-node s i : earliest node at depth f i 2 f 1 s 2 Pre-pivot-set S 0 : nodes earlier than s 0 3 R 4 f 2 D i : nodes earlier than s i + 1 5 B i : nodes at depth i 6 Inter-pivot-set S i + 1 = ( D i ∪ B i ) \ X i 7 is expanded in-between s i and s i + 1 8 X i = S 0 ∪ s 0 ∪ . . . ∪ S i ∪ s i Post-pivot-set R : the rest of the nodes Simon Brodt, François Bry, Norbert Eisinger Search for More Declarativity 19/34

  56. Motivation D&B-search The Basic Algorithm Search & Partial Ordering The D&B-Family Conclusion D&B-search – Complete Infinite Tree 0 D-search expands all nodes in S 0 1 S 0 D-search passes s 0 2 s 0 S 1 is finished 3 D-search passes s 1 4 B-search expands the rest of B 1 5 6 S 2 is finished 7 D-search passes s 2 8 B-search expands the rest of B 2 S 3 is finished Simon Brodt, François Bry, Norbert Eisinger Search for More Declarativity 20/34

  57. Motivation D&B-search The Basic Algorithm Search & Partial Ordering The D&B-Family Conclusion D&B-search – Complete Infinite Tree 0 D-search expands all nodes in S 0 1 D-search passes s 0 2 s 0 S 1 is finished 3 s 1 D-search passes s 1 4 B-search expands the rest of B 1 5 6 S 2 is finished 7 D-search passes s 2 8 B-search expands the rest of B 2 S 3 is finished Simon Brodt, François Bry, Norbert Eisinger Search for More Declarativity 20/34

  58. Motivation D&B-search The Basic Algorithm Search & Partial Ordering The D&B-Family Conclusion D&B-search – Complete Infinite Tree 0 D-search expands all nodes in S 0 1 { s 0 } ∪ S 1 D-search passes s 0 2 s 0 S 1 is finished 3 s 1 D-search passes s 1 4 B-search expands the rest of B 1 5 6 S 2 is finished 7 D-search passes s 2 8 B-search expands the rest of B 2 S 3 is finished Simon Brodt, François Bry, Norbert Eisinger Search for More Declarativity 20/34

  59. Motivation D&B-search The Basic Algorithm Search & Partial Ordering The D&B-Family Conclusion D&B-search – Complete Infinite Tree 0 D-search expands all nodes in S 0 1 D-search passes s 0 2 S 1 is finished 3 s 1 D-search passes s 1 4 B-search expands the rest of B 1 5 s 2 6 S 2 is finished 7 D-search passes s 2 8 B-search expands the rest of B 2 S 3 is finished Simon Brodt, François Bry, Norbert Eisinger Search for More Declarativity 20/34

  60. Motivation D&B-search The Basic Algorithm Search & Partial Ordering The D&B-Family Conclusion D&B-search – Complete Infinite Tree 0 D-search expands all nodes in S 0 1 D-search passes s 0 { s 1 } ∪ S 2 2 S 1 is finished 3 s 1 D-search passes s 1 4 B-search expands the rest of B 1 5 s 2 6 S 2 is finished 7 D-search passes s 2 8 B-search expands the rest of B 2 S 3 is finished Simon Brodt, François Bry, Norbert Eisinger Search for More Declarativity 20/34

  61. Motivation D&B-search The Basic Algorithm Search & Partial Ordering The D&B-Family Conclusion D&B-search – Complete Infinite Tree 0 D-search expands all nodes in S 0 1 D-search passes s 0 { s 1 } ∪ S 2 2 S 1 is finished 3 s 1 D-search passes s 1 4 B-search expands the rest of B 1 5 s 2 6 S 2 is finished 7 D-search passes s 2 8 B-search expands the rest of B 2 S 3 is finished Simon Brodt, François Bry, Norbert Eisinger Search for More Declarativity 20/34

  62. Motivation D&B-search The Basic Algorithm Search & Partial Ordering The D&B-Family Conclusion D&B-search – Complete Infinite Tree 0 D-search expands all nodes in S 0 1 D-search passes s 0 2 S 1 is finished 3 4 D-search passes s 1 5 s 2 B-search expands the rest of B 1 6 S 2 is finished 7 D-search passes s 2 8 B-search expands the rest of B 2 s 3 S 3 is finished Simon Brodt, François Bry, Norbert Eisinger Search for More Declarativity 20/34

  63. Motivation D&B-search The Basic Algorithm Search & Partial Ordering The D&B-Family Conclusion D&B-search – Complete Infinite Tree 0 D-search expands all nodes in S 0 1 D-search passes s 0 { s 2 } ∪ S 3 2 S 1 is finished 3 4 D-search passes s 1 5 s 2 B-search expands the rest of B 1 6 S 2 is finished 7 D-search passes s 2 8 B-search expands the rest of B 2 s 3 S 3 is finished Simon Brodt, François Bry, Norbert Eisinger Search for More Declarativity 20/34

  64. Motivation D&B-search The Basic Algorithm Search & Partial Ordering The D&B-Family Conclusion D&B-search – Complete Infinite Tree 0 D-search expands all nodes in S 0 1 D-search passes s 0 { s 2 } ∪ S 3 2 S 1 is finished 3 4 D-search passes s 1 5 s 2 B-search expands the rest of B 1 6 S 2 is finished 7 D-search passes s 2 8 B-search expands the rest of B 2 s 3 S 3 is finished Simon Brodt, François Bry, Norbert Eisinger Search for More Declarativity 20/34

  65. Motivation D&B-search The Basic Algorithm Search & Partial Ordering The D&B-Family Conclusion D&B-search – Complete Infinite Tree 0 D-search expands all nodes in S 0 1 D-search passes s 0 { s 2 } ∪ S 3 2 S 1 is finished 3 4 D-search passes s 1 5 s 2 B-search expands the rest of B 1 6 S 2 is finished 7 D-search passes s 2 8 B-search expands the rest of B 2 s 3 S 3 is finished Observation D&B-search expands the nodes in the order S 0 , s 0 , S 1 , s 1 , . . . , S i , s i , . . . , R Simon Brodt, François Bry, Norbert Eisinger Search for More Declarativity 20/34

  66. Motivation D&B-search The Basic Algorithm Search & Partial Ordering The D&B-Family Conclusion D&B-search – Finite Tree 0 S 2 is finished 1 D-search expands s 2 2 D-search reaches the max. depth in R s 2 3 (no s 3 in this tree) 4 R B-search may complete B 2 5 D-search continues R 6 7 D-search continues R 8 D-search finishes R Search is finished Simon Brodt, François Bry, Norbert Eisinger Search for More Declarativity 21/34

  67. Motivation D&B-search The Basic Algorithm Search & Partial Ordering The D&B-Family Conclusion D&B-search – Finite Tree 0 S 2 is finished 1 D-search expands s 2 2 s 2 D-search reaches the max. depth in R 3 (no s 3 in this tree) 4 R B-search may complete B 2 5 6 D-search continues R 7 D-search continues R 8 D-search finishes R Search is finished Simon Brodt, François Bry, Norbert Eisinger Search for More Declarativity 21/34

  68. Motivation D&B-search The Basic Algorithm Search & Partial Ordering The D&B-Family Conclusion D&B-search – Finite Tree 0 S 2 is finished 1 D-search expands s 2 2 s 2 D-search reaches the max. depth in R 3 (no s 3 in this tree) 4 R B-search may complete B 2 5 6 D-search continues R 7 D-search continues R 8 D-search finishes R Search is finished Simon Brodt, François Bry, Norbert Eisinger Search for More Declarativity 21/34

  69. Motivation D&B-search The Basic Algorithm Search & Partial Ordering The D&B-Family Conclusion D&B-search – Finite Tree 0 S 2 is finished 1 D-search expands s 2 2 s 2 D-search reaches the max. depth in R 3 (no s 3 in this tree) 4 R B-search may complete B 2 5 6 D-search continues R 7 D-search continues R 8 D-search finishes R Search is finished Simon Brodt, François Bry, Norbert Eisinger Search for More Declarativity 21/34

  70. Motivation D&B-search The Basic Algorithm Search & Partial Ordering The D&B-Family Conclusion D&B-search – Finite Tree 0 S 2 is finished 1 D-search expands s 2 2 s 2 D-search reaches the max. depth in R 3 (no s 3 in this tree) 4 R B-search may complete B 2 5 6 D-search continues R 7 D-search continues R 8 D-search finishes R Search is finished Simon Brodt, François Bry, Norbert Eisinger Search for More Declarativity 21/34

  71. Motivation D&B-search The Basic Algorithm Search & Partial Ordering The D&B-Family Conclusion D&B-search – Finite Tree 0 S 2 is finished 1 D-search expands s 2 2 D-search reaches the max. depth in R s 2 3 (no s 3 in this tree) 4 R B-search may complete B 2 5 D-search continues R 6 D-search continues R 7 8 D-search finishes R Search is finished Simon Brodt, François Bry, Norbert Eisinger Search for More Declarativity 21/34

  72. Motivation D&B-search The Basic Algorithm Search & Partial Ordering The D&B-Family Conclusion D&B-search – Finite Tree S 2 is finished 0 1 D-search expands s 2 2 D-search reaches the max. depth in R s 2 3 (no s 3 in this tree) 4 R B-search may complete B 2 5 D-search continues R 6 D-search continues R 7 D-search finishes R 8 Search is finished Observation B-search stops shortly after D-search reaches the max. depth Most of the tree is expanded by D-search Simon Brodt, François Bry, Norbert Eisinger Search for More Declarativity 21/34

  73. Motivation D&B-search The Basic Algorithm Search & Partial Ordering The D&B-Family Conclusion D&B-search – Finite Tree S 2 is finished 0 1 D-search expands s 2 2 D-search reaches the max. depth in R s 2 3 (no s 3 in this tree) 4 R B-search may complete B 2 5 D-search continues R 6 D-search continues R 7 D-search finishes R 8 Search is finished Observation B-search stops shortly after D-search reaches the max. depth Most of the tree is expanded by D-search Simon Brodt, François Bry, Norbert Eisinger Search for More Declarativity 21/34

  74. Motivation D&B-search The Basic Algorithm Search & Partial Ordering The D&B-Family Conclusion D&B-search – Finite Tree S 2 is finished 0 1 D-search expands s 2 2 D-search reaches the max. depth in R s 2 3 (no s 3 in this tree) 4 R B-search may complete B 2 5 D-search continues R 6 D-search continues R 7 D-search finishes R 8 Search is finished Observation B-search stops shortly after D-search reaches the max. depth Most of the tree is expanded by D-search Simon Brodt, François Bry, Norbert Eisinger Search for More Declarativity 21/34

  75. Motivation D&B-search The Basic Algorithm Search & Partial Ordering The D&B-Family Conclusion D&B-search – Non-Complete Infinite Tree 0 S 1 is finished 1 D-search passes s 1 2 B-search may complete B 1 3 s 1 D-search finishes S 2 4 D-search passes s 2 5 6 B-search completes B 2 7 S 3 is finished 8 D-search passes s 3 B-search completes B 3 Simon Brodt, François Bry, Norbert Eisinger Search for More Declarativity 22/34

  76. Motivation D&B-search The Basic Algorithm Search & Partial Ordering The D&B-Family Conclusion D&B-search – Non-Complete Infinite Tree 0 S 1 is finished 1 D-search passes s 1 2 B-search may complete B 1 3 s 1 D-search finishes S 2 4 D-search passes s 2 5 6 B-search completes B 2 7 S 3 is finished 8 D-search passes s 3 B-search completes B 3 Simon Brodt, François Bry, Norbert Eisinger Search for More Declarativity 22/34

  77. Motivation D&B-search The Basic Algorithm Search & Partial Ordering The D&B-Family Conclusion D&B-search – Non-Complete Infinite Tree 0 S 1 is finished 1 D-search passes s 1 { s 1 } ∪ S 2 2 B-search may complete B 1 3 s 1 D-search finishes S 2 4 D-search passes s 2 5 s 2 6 B-search completes B 2 7 S 3 is finished 8 D-search passes s 3 B-search completes B 3 Simon Brodt, François Bry, Norbert Eisinger Search for More Declarativity 22/34

  78. Motivation D&B-search The Basic Algorithm Search & Partial Ordering The D&B-Family Conclusion D&B-search – Non-Complete Infinite Tree 0 S 1 is finished 1 D-search passes s 1 2 B-search may complete B 1 3 D-search finishes S 2 4 D-search passes s 2 5 s 2 6 B-search completes B 2 s 3 7 S 3 is finished 8 D-search passes s 3 B-search completes B 3 Simon Brodt, François Bry, Norbert Eisinger Search for More Declarativity 22/34

  79. Motivation D&B-search The Basic Algorithm Search & Partial Ordering The D&B-Family Conclusion D&B-search – Non-Complete Infinite Tree 0 S 1 is finished 1 D-search passes s 1 { s 2 } ∪ S 3 2 B-search may complete B 1 3 D-search finishes S 2 4 D-search passes s 2 5 s 2 6 B-search completes B 2 s 3 7 S 3 is finished 8 D-search passes s 3 B-search completes B 3 Simon Brodt, François Bry, Norbert Eisinger Search for More Declarativity 22/34

  80. Motivation D&B-search The Basic Algorithm Search & Partial Ordering The D&B-Family Conclusion D&B-search – Non-Complete Infinite Tree 0 S 1 is finished 1 D-search passes s 1 2 B-search may complete B 1 3 D-search finishes S 2 4 D-search passes s 2 5 6 B-search completes B 2 s 3 7 S 3 is finished 8 D-search passes s 3 B-search completes B 3 Simon Brodt, François Bry, Norbert Eisinger Search for More Declarativity 22/34

  81. Motivation D&B-search The Basic Algorithm Search & Partial Ordering The D&B-Family Conclusion D&B-search – Non-Complete Infinite Tree 0 S 1 is finished 1 D-search passes s 1 2 B-search may complete B 1 3 { s 3 } ∪ S 3 D-search finishes S 2 4 D-search passes s 2 5 6 B-search completes B 2 s 3 7 S 3 is finished 8 D-search passes s 3 B-search completes B 3 Simon Brodt, François Bry, Norbert Eisinger Search for More Declarativity 22/34

  82. Motivation D&B-search The Basic Algorithm Search & Partial Ordering The D&B-Family Conclusion D&B-search – Non-Complete Infinite Tree 0 S 1 is finished 1 D-search passes s 1 2 B-search may complete B 1 3 { s 3 } ∪ S 3 D-search finishes S 2 4 D-search passes s 2 5 6 B-search completes B 2 s 3 7 S 3 is finished 8 D-search passes s 3 B-search completes B 3 Observation D-search “vanishes” in the earliest infinite branch Most of the tree is expanded by B-search Simon Brodt, François Bry, Norbert Eisinger Search for More Declarativity 22/34

  83. Motivation D&B-search The Basic Algorithm Search & Partial Ordering The D&B-Family Conclusion D&B-search – Non-Complete Infinite Tree 0 S 1 is finished 1 D-search passes s 1 2 B-search may complete B 1 3 { s 3 } ∪ S 3 D-search finishes S 2 4 D-search passes s 2 5 6 B-search completes B 2 s 3 7 S 3 is finished 8 D-search passes s 3 B-search completes B 3 Observation D-search “vanishes” in the earliest infinite branch Most of the tree is expanded by B-search Simon Brodt, François Bry, Norbert Eisinger Search for More Declarativity 22/34

  84. Motivation D&B-search The Basic Algorithm Search & Partial Ordering The D&B-Family Conclusion D&B-search – Non-Complete Infinite Tree 0 S 1 is finished 1 D-search passes s 1 2 B-search may complete B 1 3 { s 3 } ∪ S 3 D-search finishes S 2 4 D-search passes s 2 5 6 B-search completes B 2 s 3 7 S 3 is finished 8 D-search passes s 3 B-search completes B 3 Observation D-search “vanishes” in the earliest infinite branch Most of the tree is expanded by B-search Simon Brodt, François Bry, Norbert Eisinger Search for More Declarativity 22/34

  85. Motivation D&B-search The Basic Algorithm Search & Partial Ordering The D&B-Family Conclusion D&B-search – Adaptivity D&B-Search behaves almost like D-search on finite trees behaves almost like B-search on infinite trees ⇒ has a kind of built-in adaptivity behaves like the “best” uninformed search method for the tree Similar effect when D-search and iterative-deepening are combined Simon Brodt, François Bry, Norbert Eisinger Search for More Declarativity 23/34

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend