An Analytical Approach to the BFS vs. DFS Algorithm Selection Problem 1

Similar documents
ATTEND Analytical Tools To Evaluate Negotiation Difficulty

Validation of Runway Capacity Models

Integrated Optimization of Arrival, Departure, and Surface Operations

American Airlines Next Top Model

Activity Template. Drexel-SDP GK-12 ACTIVITY. Subject Area(s): Sound Associated Unit: Associated Lesson: None

A Study of Tradeoffs in Airport Coordinated Surface Operations

ATM Seminar 2015 OPTIMIZING INTEGRATED ARRIVAL, DEPARTURE AND SURFACE OPERATIONS UNDER UNCERTAINTY. Wednesday, June 24 nd 2015

AQME 10 System Description

DMAN-SMAN-AMAN Optimisation at Milano Linate Airport

Todsanai Chumwatana, and Ichayaporn Chuaychoo Rangsit University, Thailand, {todsanai.c;

MAT 115: Precalculus Mathematics Homework Exercises Textbook: A Graphical Approach to Precalculus with Limits: A Unit Circle Approach, Sixth Edition

Construction of Conflict Free Routes for Aircraft in Case of Free Routing with Genetic Algorithms.

CHAPTER 5 SIMULATION MODEL TO DETERMINE FREQUENCY OF A SINGLE BUS ROUTE WITH SINGLE AND MULTIPLE HEADWAYS

HOW TO IMPROVE HIGH-FREQUENCY BUS SERVICE RELIABILITY THROUGH SCHEDULING

Real-Time Control Strategies for Rail Transit

Predicting Flight Delays Using Data Mining Techniques

Authentic Assessment in Algebra NCCTM Undersea Treasure. Jeffrey Williams. Wake Forest University.

Analysis of Air Transportation Systems. Airport Capacity

Scalability in GBML, Accuracy-Based Michigan Fuzzy LCS, and New Trends

A hybrid genetic algorithm for multi-depot and periodic vehicle routing problems

Pre-Calculus AB: Topics and Assignments Weeks 1 and 2

Airport Flight Departure Delay Model on Improved BN Structure Learning

MIT ICAT. MIT ICAT M I T I n t e r n a t i o n a l C e n t e r f o r A i r T r a n s p o r t a t i o n

Solid waste generation and disposal by Hotels in Coimbatore City

A Statistical Method for Eliminating False Counts Due to Debris, Using Automated Visual Inspection for Probe Marks

A GRASP for Aircraft Routing in Response to Groundings and Delays

A Review of Airport Runway Scheduling

Digital twin for life predictions in civil aerospace

Cross-sectional time-series analysis of airspace capacity in Europe

Unit 4: Location-Scale-Based Parametric Distributions

PRAJWAL KHADGI Department of Industrial and Systems Engineering Northern Illinois University DeKalb, Illinois, USA

FLIGHT TRANSPORTATION LABORATORY REPORT R87-5 AN AIR TRAFFIC CONTROL SIMULATOR FOR THE EVALUATION OF FLOW MANAGEMENT STRATEGIES JAMES FRANKLIN BUTLER

Decision aid methodologies in transportation

Fleet Assignment Problem Study Based on Branch-and-bound Algorithm

= Coordination with Direct Communication

Today: using MATLAB to model LTI systems

The Case of the Stolen CD Players

Handling CFMU slots in busy airports

Revenue Management in a Volatile Marketplace. Tom Bacon Revenue Optimization. Lessons from the field. (with a thank you to Himanshu Jain, ICFI)

Using Ant Algorithm to Arrange Taxiway Sequencing in Airport

Market Insights & Salary Guide 2018 Data & Analytics

Decentralized Path Planning For Air Traffic Management Wei Zhang

Proceedings of the 54th Annual Transportation Research Forum

AIS DATA ANALYSIS FOR REALISTIC SHIP TRAFFIC SIMULATION MODEL

ASPASIA Project. ASPASIA Overall Summary. ASPASIA Project

CS229: AUTUMN Application of Machine Learning Algorithms to Predict Flight Arrival Delays

A Primer on Fatigue Damage Spectrum for Accelerated and Reliability Testing

J. Oerlemans - SIMPLE GLACIER MODELS

Blending Methods and Other Improvements for Exemplar-based Image Inpainting Techniques

Arash Yousefi George L. Donohue, Ph.D. Chun-Hung Chen, Ph.D.

EA-12 Coupled Harmonic Oscillators

The range of a rotor walk and recurrence of directed lattices

Available online at ScienceDirect. Transportation Research Procedia 5 (2015 ) SIDT Scientific Seminar 2013

Analysis of Operational Impacts of Continuous Descent Arrivals (CDA) using runwaysimulator

Two Major Problems Problems Crew Pairing Problem (CPP) Find a set of legal pairin Find gs (each pairing

Natural Language Processing. Dependency Parsing

A Multilayer and Time-varying Structural Analysis of the Brazilian Air Transportation Network

Tour route planning problem with consideration of the attraction congestion

Abstract. Introduction

Transfer Scheduling and Control to Reduce Passenger Waiting Time

Nav Specs and Procedure Design Module 12 Activities 8 and 10. European Airspace Concept Workshops for PBN Implementation

ANALYSIS OF THE CONTRIUBTION OF FLIGHTPLAN ROUTE SELECTION ON ENROUTE DELAYS USING RAMS

Index. Springer International Publishing AG 2018 I. Schagaev, B.R. Kirk, Active System Control, DOI /

Genetic Algorithms Applied to Airport Ground Traffic Optimization

Influence of the constructive features of rocket stoves in their overall efficiency

Modeling Visitor Movement in Theme Parks

The Development and Analysis of a Wind Turbine Blade

Mathcad Prime 3.0. Curriculum Guide

ELSA. Empirically grounded agent based models for the future ATM scenario. ELSA Project. Toward a complex network approach to ATM delays analysis

Attract, Reach & Convert

Don t Sit on the Fence

"Free at Last" Cage-based Living Geometry

Genetic Algorithm in Python. Data mining lab 6

Clustering radar tracks to evaluate efficiency indicators Roland Winkler Annette Temme, Christoph Bösel, Rudolf Kruse

RECEDING HORIZON CONTROL FOR AIRPORT CAPACITY MANAGEMENT

AUTONOMOUS FLIGHT CONTROL AND GUIDANCE SYSTEM OF ACCIDENT AIRCRAFT

Automatic Aircraft Cargo Load Planning with Pick-up and Delivery

Ensemble methods for ice sheet init.

QUEUEING MODELS FOR 4D AIRCRAFT OPERATIONS. Tasos Nikoleris and Mark Hansen EIWAC 2010

Chapter 9 Validation Experiments

Anomaly Detection in airlines schedules. Asmaa Fillatre Data Scientist, Amadeus

Bioinformatics of Protein Domains: New Computational Approach for the Detection of Protein Domains

Pricing Challenges: epods and Reality

Predicting flight routes with a Deep Neural Network in the operational Air Traffic Flow and Capacity Management system

EN-024 A Simulation Study on a Method of Departure Taxi Scheduling at Haneda Airport

A Pickup and Delivery Problem for Ridesharing Considering Congestion

Transportation Timetabling

ONLINE DELAY MANAGEMENT IN RAILWAYS - SIMULATION OF A TRAIN TIMETABLE

Airport Gate Assignment A Hybrid Model and Implementation

The Best Rest, Revisited

Predicting a Dramatic Contraction in the 10-Year Passenger Demand

Aircraft and Gate Scheduling Optimization at Airports

PERFORMANCE MEASURE INFORMATION SHEET #16

Overview of PODS Consortium Research

Schedule Compression by Fair Allocation Methods

A RECURSION EVENT-DRIVEN MODEL TO SOLVE THE SINGLE AIRPORT GROUND-HOLDING PROBLEM

PRESENTATION OVERVIEW

A GEOGRAPHIC ANALYSIS OF OPTIMAL SIGNAGE LOCATION SELECTION IN SCENIC AREA

You Must Be At Least This Tall To Ride This Paper. Control 27

Metrics and Representations

Transcription:

An Analytical Approach to the BFS vs. DFS Algorithm Selection Problem 1 Tom Everitt Marcus Hutter Australian National University September 3, 2015 Everitt, T. and Hutter, M. (2015a). Analytical Results on the BFS vs. DFS Algorithm Selection Problem. Part I: Tree Search. In 28th Australian Joint Conference on Artificial Intelligence Everitt, T. and Hutter, M. (2015b). Analytical Results on the BFS vs. DFS Algorithm Selection Problem. Part II: Graph Search. In 28th Australian Joint Conference on Artificial Intelligence 1 BFS=Breadth-first search, DFS=Depth-first search Tom Everitt, Marcus Hutter (ANU) BFS vs. DFS September 3, 2015 1 / 21

Outline 1 Motivation and Background 2 Simple model Expected Runtimes Decision Boundary 3 More General Models 4 Experimental Results 5 Conclusions Tom Everitt, Marcus Hutter (ANU) BFS vs. DFS September 3, 2015 2 / 21

Motivation (Graph) search is a fundamental AI problem: planning, learning, problem solving Hundreds of algorithms have been developed, including metaheuristics such as simulated annealing, genetic algorithms. These are often heuristically motivated, lacking solid theoretical footing. For theoretical approach, return to basics: BFS and DFS. So far, mainly worst-case results have been available (we focus on average/expected runtime). Tom Everitt, Marcus Hutter (ANU) BFS vs. DFS September 3, 2015 3 / 21

Breadth-first Search (BFS) Korf et al. (2001) found a clever way to analyse IDA*, which essentially is a generalisation of BFS. Later generalised by Zahavi et al. (2010). Both are essentially worst-case results. Tom Everitt, Marcus Hutter (ANU) BFS vs. DFS September 3, 2015 4 / 21

Depth-first Search (DFS) Knuth (1975) developed a way to estimate search tree size and DFS worst-case performance. s 0 Assume the same number of children in other branches. Estimate 2 3 3 2 = 36 leaves. Refinements and applications Purdom (1978): Use several branches instead of one Chen (1992): Use stratified sampling Kilby et al. (2006): The estimates can be used to select best SAT algorithm Tom Everitt, Marcus Hutter (ANU) BFS vs. DFS September 3, 2015 5 / 21

Potential gains We focus on average or expected runtime of BFS and DFS rather than worst-case. Selling points: Good to have an idea how long a search might take Useful for algorithm selection (Rice, 1975) May be used for constructing meta-heuristics Precise understanding of basics often useful Tom Everitt, Marcus Hutter (ANU) BFS vs. DFS September 3, 2015 6 / 21

BFS and DFS BFS and DFS are opposites. BFS 1 DFS 1 2 3 2 9 4 5 6 7 3 6 10 13 8 9 10 11 12 13 14 15 focuses near the start node 4 5 7 8 11 12 14 15 focuses far from the start node Tom Everitt, Marcus Hutter (ANU) BFS vs. DFS September 3, 2015 7 / 21

Formal setups We analyse BFS and DFS expected runtime in a sequence of increasingly general models. 1 Tree with a single level of goals 2 Tree with multiple levels of goals 3 General graph Increasingly coarse approximations are required Tom Everitt, Marcus Hutter (ANU) BFS vs. DFS September 3, 2015 8 / 21

Simplest model - Tree with Single Goal Level Our simplest model assumes a complete tree with: D = 3, g = 2, p = 1/3 A max search depth D N, A goal level g {0,..., D} Nodes on level g are goals with goal probability p [0, 1] (iid). Tom Everitt, Marcus Hutter (ANU) BFS vs. DFS September 3, 2015 9 / 21

BFS Runtime 1 Expected BFS search time is 2 3 E[t BFS ] = 2 g 1 + 1/p 4 8 9 5 10 11 6 12 13 7 14 15 Proof. The position Y of the first goal is geometrically distributed with E[Y ] = 1/p. Tom Everitt, Marcus Hutter (ANU) BFS vs. DFS September 3, 2015 10 / 21

DFS Runtime 1 Expected DFS search time is 2 9 E[t DFS ] (1/p 1) }{{}} 2 D g+1 {{} number of size of subtrees subtrees 3 4 5 6 7 8 10 11 12 13 14 15 Proof. There are (1/p 1) red minitrees of size 2 D g+1. It turns out that the blue nodes do not substantially affect the count in most cases. Tom Everitt, Marcus Hutter (ANU) BFS vs. DFS September 3, 2015 11 / 21

expected search time 10 4 10 3 10 2 DFS BFS 4 6 8 10 12 14 16 g Expected BFS and DFS search time as a function of goal depth in a tree of depth D = 15, and goal probability p = 0.07. The initially high expectation of BFS is because likely no goal exists whole tree searched (artefact of model). Tom Everitt, Marcus Hutter (ANU) BFS vs. DFS September 3, 2015 12 / 21

BFS vs. DFS Combining the runtime estimates yields an elegant decision boundary for when BFS is better: E[t BFS ] E[t DFS ] < 0 }{{} BFS Better g < D/2 + γ where γ = log 2 ( 1 p p )/2 is inversely related to p (γ small when p not very close to 0 or 1). Observations: BFS is better when goal near start node (expected) DFS benefits when p is large Tom Everitt, Marcus Hutter (ANU) BFS vs. DFS September 3, 2015 13 / 21

BFS vs. DFS 16 14 12 DFS wins BFS wins BFS=DFS E[t BFS ] = E[t DFS ] 10 g 8 6 4 2 4 6 8 10 12 14 16 D Plot of BFS vs. DFS decision boundary with goal level g and goal probability p = 0.07. The decision boundary gets 79% of the winners correct. Time to generalise. Tom Everitt, Marcus Hutter (ANU) BFS vs. DFS September 3, 2015 14 / 21

Tree with Multiple Goal Levels As before, assume a complete tree with: D = 3, p = [0, 1 3, 1 3, 1 3 ] A maximum search depth D Instead of goal level g and goal probability p: Use a goal probability vector p = [p 0,..., p D ]. Nodes on level k are goals with iid probability p k. This is arguably much more realistic :) ways to estimate the goal probabilities is an important future question. Both BFS and DFS analysis can be carried back to the single goal level case with some hacks. BFS analysis is fairly straightforward DFS requires approximation of geometric distribution with exponential distribution Tom Everitt, Marcus Hutter (ANU) BFS vs. DFS September 3, 2015 15 / 21

Decision Boundary 14 12 DFS wins BFS wins t BFS DFS MGL = t MGL 10 µ 8 6 10 2 10 1 10 0 10 1 10 2 σ 2 The goal probabilities are highest at a peak level µ, and decays around it depending on σ 2. Some takeaways: BFS still likes goals close to the root BFS likes larger spread more than DFS does (increases probability of really easy goal) Tom Everitt, Marcus Hutter (ANU) BFS vs. DFS September 3, 2015 16 / 21

General graphs BFS 1 DFS 1 2 3 2 13 4 5 6 7 3 7 9 14 8 9 10 11 12 13 14 15 4 5 6 8 10 11 12 15 We capture the various topological properties of graphs in a collection of parameters called the descendant counter. Similarly to before, we get approximate expressions for BFS and DFS expected runtime given a goal probability vector. We analytically derive the descendant counter for two concrete grammar problems (it could potentially be inferred empirically in other cases). Tom Everitt, Marcus Hutter (ANU) BFS vs. DFS September 3, 2015 17 / 21

One observation is that DFS can spend an even greater fraction of the initial search time far away from the root. Complete Binary Tree Binary Grammar 10 6 10 6 10 4 10 2 t BFS SGL t DFS SGL 10 4 10 2 t BFS BG t DFS BG t DFS BGL t DFS BGU 5 10 15 20 g 5 10 15 20 g So BFS will be better for a wider range of goal levels in graph search than in tree search. Tom Everitt, Marcus Hutter (ANU) BFS vs. DFS September 3, 2015 18 / 21

Experimental results We randomly generate graphs according to a wide range of parameter settings. BFS always accurate. DFS in trees: Usually within 10% error; in some corner cases up to 50% error. DFS in binary grammar problem (non-tree graph): Mostly within 20% error; 35% at worst. More detailed results in paper. Tom Everitt, Marcus Hutter (ANU) BFS vs. DFS September 3, 2015 19 / 21

Conclusions With our model of goal distribution, we can predict expected search time of BFS and DFS (instead of only worst-case), given goal probabilities for all distances. Further work needed to automatically infer parameters. This theoretical understanding can hopefully be useful when: Choosing search method Constructing meta-heuristics Analysing performance of more complex search algorithms (for example, A* is a generalisation of BFS, and Beam Search is a generalisation of DFS). Choosing graph representation of search problem. Tom Everitt, Marcus Hutter (ANU) BFS vs. DFS September 3, 2015 20 / 21

References Chen, P. C. (1992). Heuristic Sampling: A Method for Predicting the Performance of Tree Searching Programs. SIAM Journal on Computing, 21(2):295 315. Everitt, T. and Hutter, M. (2015a). Analytical Results on the BFS vs. DFS Algorithm Selection Problem. Part I: Tree Search. In 28th Australian Joint Conference on Artificial Intelligence. Everitt, T. and Hutter, M. (2015b). Analytical Results on the BFS vs. DFS Algorithm Selection Problem. Part II: Graph Search. In 28th Australian Joint Conference on Artificial Intelligence. Kilby, P., Slaney, J., Thiébaux, S., and Walsh, T. (2006). Estimating Search Tree Size. In Proc. of the 21st National Conf. of Artificial Intelligence, AAAI, Menlo Park. Knuth, D. E. (1975). Estimating the efficiency of backtrack programs. Mathematics of Computation, 29(129):122 122. Korf, R. E., Reid, M., and Edelkamp, S. (2001). Time complexity of iterative-deepening-a*. Artificial Intelligence, 129(1-2):199 218. Purdom, P. W. (1978). Tree Size by Partial Backtracking. SIAM Journal on Computing, 7(4):481 491. Rice, J. R. (1975). The algorithm selection problem. Advances in Computers, 15:65 117. Zahavi, U., Felner, A., Burch, N., and Holte, R. C. (2010). Predicting the performance of IDA* using conditional distributions. Journal of Artificial Intelligence Research, 37:41 83. Tom Everitt, Marcus Hutter (ANU) BFS vs. DFS September 3, 2015 21 / 21