A group of hikers (1≤N≤200) going to a remote mountainous area where there is no cellular service want to organize an emergency communication system for broadcasting important messages among themselves. The hikers equip themselves with walkie-talkies, one for each hiker. These walkie-talkies each have a limited transmission radius -- a walkie-talkie of transmission power W units can only transmit to other hikers less than or equal to W away. Due to the power difference of each walkie-talkie, hiker A might be able to transmit to hiker B even though hiker B may not transmit back to reach A. However, hikers can relay messages to one-another along a path consisting of several hops (multi-hop communication using intermediate hikers as relays). Therefore, it is not necessary for every hiker to be able to transmit directly to every other hiker. We can see the asymmetrical nature of the walkie-talkie transmission in this application. Hence, some hikers may be more effective in reaching larger number of other hikers than other hikers using multi-hop relay. In this part, you are asked to design an algorithm and write a program that implements the algorithm to determine the maximum number of hikers that can be reached by a transmission originating from a single hiker.
1. A group of hikers (1≤N≤200) going to a remote mountainous area where there is no cellular service want to organize an emergency communication system for broadcasting important messages among themselves.
The hikers equip themselves with walkie-talkies, one for each hiker. These walkie-talkies each have a limited transmission radius -- a walkie-talkie of transmission power W units can only transmit to other hikers less than or equal to W away. Due to the power difference of each walkie-talkie, hiker A might be able to transmit to hiker B even though hiker B may not transmit back to reach A. However, hikers can relay messages to one-another along a path consisting of several hops (multi-hop communication using intermediate hikers as relays). Therefore, it is not necessary for every hiker to be able to transmit directly to every other hiker. We can see the asymmetrical nature of the walkie-talkie transmission in this application. Hence, some hikers may be more effective in reaching larger number of other hikers than other hikers using multi-hop relay.
In this part, you are asked to design an
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images