Cleaning Tunnel Problem Phuoc Le ICS 311 [email protected] Graph Formulation • Edges as tunnel • Vertices u and v are two end points of the edg e = (u, v) • The cleaning machine moving along the edge Graph Formulation Tunnel with 1 edge • Tunnel • End point u and v • Cleaning machine • Contaminated Number of edge: 1 Clean Number of machine: 1 Graph Formulation Tunnel with 3 edges • Tunnel • End point u and v • Cleaning machine guarded Number of edges: 3 New machine Graph Formulation Tunnel with 3 edges • Tunnel • End point u and v • Cleaning machine terminated Contaminated tunnel Number of edges: 3 Number of machines: 2 Cleaned tunnel Graph Formulation Tunnel with 4 edges • Tunnel • End point u and v • Cleaning machine Number of edges: 4 Graph Formulation Tunnel with 4 edges • Tunnel • End point u and v • Cleaning machine Machine 1 Guarded machine 2 Number of edges: 4 Graph Formulation Tunnel with 4 edges • Tunnel • End point u and v • Cleaning machine guarded Number of edges: 4 New location of machine 1 Graph Formulation Tunnel with 4 edges • Tunnel • End point u and v • Cleaning machine Guarded machine 2 Number of edges: 4 New machine 3 Guarded machine 1 Graph Formulation Tunnel with 4 edges • Tunnel • End point u and v • Cleaning machine Guarded machine 2 Guarded machine 1 Terminated machine 3 Number of edges: 4 Number of machines: 3 Graph Formulation Tunnel with 5 edges • Tunnel • End point u and v • Cleaning machine Guarded machine 2 Guarded machine 1 machine 3 guarded Number of edges: 5 Graph Formulation Tunnel with 5 edges • Tunnel • End point u and v • Cleaning machine machine 2 moved here machine 1 moved here machine 3 guarded Number of edges: 5 Graph Formulation Tunnel with 5 edges • Tunnel • End point u and v • Cleaning machine New machine 4 machine 2 guarded machine 1 guarded machine 3 guarded Number of edges: 5 Graph Formulation Tunnel with 5 edges • Tunnel • End point u and v • Cleaning machine machine 2 guarded machine 1 guarded Number of edges: 5 Graph (G) = 10 edges machine 3 guarded Number of machine: 4 machine 4 terminated Input • A graph G = (V, E) • A set of edges E where E is tunnel • A set of vertices Vs where Vs is starting vertex and Vd where Vd is destination vertex Input • A set of machines m where mi (1 ≤ i ≤ km) • A function max(ei) to return maximum number of edges at intersection where ei ( 1 ≤ i ≤ ne) Input • A function fm(fi) to return the number of free machines where (0 ≤ i ≤ km) • A function mg(Vi) to return the number of guraded machines where (0 ≤ i ≤ km ) Output • A function Min_m(G) = max(ei)-1 Constraint • • • • Connected graph The machine must clean the tunnel from one end point u to v. The machine can move to the new location if that machine is in the clean area The adjacent edge such that e = (x, y) and f =(y, z)
© Copyright 2026 Paperzz