Presentation is loading. Please wait.

Presentation is loading. Please wait.

Mathematical Foundations of AI

Similar presentations


Presentation on theme: "Mathematical Foundations of AI"— Presentation transcript:

1 Mathematical Foundations of AI
Lecture 1- Robotic Coverage

2 Robotic Coverage Motivation: Automatic Lawn-mowers Vacuum cleaners
Security robots

3 Lecture content The single-robot coverage problem
A simple multi-robot algorithm Where does it fail? Multi-robot coverage is hard An efficient approximation algorithm

4 Problem definition A 2D grid of large square cells
Some of the cells may be blocked Each open cell is divided to 4 small cells We want our robot to cover all cells in the minimal possible time

5 An optimal algorithm for a single robot
Define a graph G as follows: The center of each large cell is a vertex There is an edge between every two adjacent cells 2. Find a spanning tree T for the graph. 3. The robot walks clockwise around the tree, stopping right before the starting point. Spanning Tree Coverage

6 Running the STC algorithm
The graph G The tree T

7 Analysis of STC Theorem 1: The STC algorithm covers every small cell that is accessible from the starting cell. Theorem 2: The STC algorithm is optimal, i.e. it covers every cell at most once.

8 Multi-robot coverage Suppose we have r robots
We would like them to complete the work in about 1/r of the time, if possible.

9 The M-STC algorithm Find a spanning tree, as in the STC algorithm
Let all robots walk clockwise, until all cells are covered Claim: for some spanning trees, the coverage time will be much worse than optimal.

10 When does M-STC fail? Tree 1: steps Tree 2: 15 steps An open question: is there an efficient algorithm to find the optimal tree?

11 The multi-robot cover problem is hard
Theorem 3: It is NP-hard to find the minimal number of steps required to cover a terrain with r robots. This means that there is no efficient algorithm that finds the optimal paths (unless P=NP).

12 Proof (1) We first reformulate our optimization problem as a decision problem: Given a board with m cells, the starting locations of r robots, and a number K, are there r paths such that: 1) All cells are covered; 2) All paths are of size at most K; 3) All robots are back in their starting location

13 Proof (2) We prove the theorem using a polynomial-time reduction from the 3-partition problem. The 3-partition problem: Given a set S containing 3n integers S = {a1, a2, ..., a3n}, whose sum is B.n, is there a partition of S into n disjoint sets (S1, S2, ..., Sn), such that the sum of the elements in each set is equal to B? The 3-partition problem is a known NP-complete problem

14 Proof (3) Let (n,S,B) an instance of 3-partition. We construct an instance of multi-robot-cover: A column of 3n empty cells For every odd i, the i’th row has 6*n*ai open cells to the left of the central column. For every even i,the i’th row has 6*n*ai open cells to the right of the central column. We add n robots, all of them start in the bottom-left sub-cell of the central column. K := 24*Bn + 12*n

15 Proof - example The constructed instance for the input: n=4, B=10
The red cells are blocked Sub-cells are not shown The size of the instance is polynomial in the input size*.

16 Proof (4) “” suppose that there is a valid solution
(S1, S2, ..., Sn) to the 3-partition problem. Each robot j travels corridor i iff ai in Sj. The number of his steps is: “” suppose that the robots can cover the grid in K steps. Let Sj contain the indices of all corridors that j travels. Since j needs to go all the way and back:

17 Proof (5) “” (cont.) For each robot j,
Since ai are all integers, we get that: If the inequality is strict, then: In contradiction to the problem definition. Therefore: , and we have a 3-partition.

18 Approximation algorithms
Definition: (for minimization problems) Denote by OPT(I) the optimal (minimal) solution for Input I. Algorithm L is ρ-approximating, if: for any input I, it holds that L(I) ≤ ρ.OPT(I) L runs in polynomial time. Example: vertex cover

19 Rooted Tree Cover In the RTC problem, we get an input a graph G and a subset of root vertices R={a1,...,ar}. The output is a set of trees T= {T1,..,Tr} such that: All nodes of G are covered by some tree Each tree Ti contains the root ai The quality of the coverage is the size of the biggest tree

20 RTC - example Theorem 4 [Even et al. ’04] :
There is a 4-approximation algorithm A for the RTC problem (even for the weighted version).

21 MFC: an approximation algorithm for the multi-robot-cover problem
We will use algorithm A to provide an approximate solution to the Multi-robot Cover Problem. The Multi-robot Forest Cover algorithm [Zheng et al. ‘05] works as follows: Given an instance of the Multi-robot Cover Problem, create an instance (G,R) of RTC, where G is the graph we used for STC, R is the set of starting locations. Use algorithm A on the new instance to get an R-Rooted Tree Cover T. 3. Assign to each robot the tree that is rooted to its starting point. 4. Let each robot walk around its tree, just like in STC.

22 MFC – example

23 MFC Theorem 5: The MFC algorithm is an 8-approximation algorithm for the Multi-robot Cover problem

24 Is MFC better than MSTC? We will see a case where MSTC is very inefficient.


Download ppt "Mathematical Foundations of AI"

Similar presentations


Ads by Google