**PLEASE SOLVE IT ON YOUR OWN AND DON'T COPY FROM
ANOTHER answers ANSWER UNLESS IT'S IDENTICAL OR -1**
Water is very important to Kuwait. Given the large temperatures over the summer, the ministry has decided to analyse the existing water supply system. They have a directed graph with n nodes (corresponding to municipalities) and m edges (corresponding to water pipelines) modelling the supply of water in the region and they are interested to know whether the following two conditions are true: 1. (5 points) No particular municipality can experience lack of water, i.e. water can flow and reach any municipality from any other municipality in the network. Design an algorithm to test this condition in O(n + m) time. 2. (10 points) Unfortunately, due to the increased construction works in Kuwait, water pipelines can accidentally be destroyed and may take days to fix the problem. When this happens, no municipality should experience lack of water, i.e. it should still be able to receive water from the rest of the water network. Your goal is to come up with an algorithm that tests whether destruction of a single pipeline can make certain regions suffer from lack of water. Grading: In both cases argue about the correctness and the running time of your algorithms.
**PLEASE SOLVE IT ON YOUR OWN AND DON'T COPY FROM ANOTHER answers ANSWER UNLESS IT'S IDENTICAL OR -1**
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
**PLEASE SOLVE IT ON YOUR OWN AND DON'T COPY FROM ANOTHER answers ANSWER UNLESS IT'S IDENTICAL OR -1**
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!