You are given a flow network G with n vertices, including a source s and sink t, and m directed edges with integer capac

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

You are given a flow network G with n vertices, including a source s and sink t, and m directed edges with integer capac

Post by answerhappygod »

You are given a flow network G with n vertices, including asource s and sink t, and m directed edges with integercapacities.
Your friend will ask you several queries of the form: “If anedge were to be added to G, going from vertex a to vertex b withcapacity c, what would the maximum flow of the modified networkbe?” Note that each query considers adding an edge to the originalflow network, so the modified network has m + 1 edges.
Before asking any queries, your friend gives you some time toprepare, which you can spend on precomputation.
Using maximum flow algorithms such as Ford- Fulkerson andEdmonds-Karp). Design an algorithm which performs any requiredprecomputation and then answers each query in constant time,subject to the following restrictions:
1) O(nm 2 ) precomputation; b = t and c = 1 inall queries.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply