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

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

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

Post by answerhappygod »

Question 4 You Are Given A Flow Network G With N Vertices Including A Source S And Sink T And M Directed Edges With In 1
Question 4 You Are Given A Flow Network G With N Vertices Including A Source S And Sink T And M Directed Edges With In 1 (55.7 KiB) Viewed 30 times
Question 4 You are given a flow network G with n vertices, including a source s and sink t, and m directed edges with integer capacities. Your friend will ask you several queries of the form: "If an edge were to be added to G, going from vertex a to vertex b with capacity c, what would the maximum flow of the modified network be?" Note that each query considers adding an edge to the original flow network, so the modified network has m+1 edges. Before asking any queries, your friend gives you some time to prepare, which you can spend on precomputation. Design an algorithm which performs any required precomputation and then answers each query in constant time, subject to the following restrictions: 4.2 [6 marks ]O(nm2) precomputation; c=1 in all 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