https://github.com/onkolahmet/hop_distance_using_bfs_algorithm
calculating hop-distance between devices using adjacency list and BFS algorithm
https://github.com/onkolahmet/hop_distance_using_bfs_algorithm
bfs-algorithm
Last synced: 3 months ago
JSON representation
calculating hop-distance between devices using adjacency list and BFS algorithm
- Host: GitHub
- URL: https://github.com/onkolahmet/hop_distance_using_bfs_algorithm
- Owner: onkolahmet
- Created: 2020-04-07T18:34:13.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-10-23T22:48:35.000Z (over 4 years ago)
- Last Synced: 2025-02-05T13:24:44.655Z (4 months ago)
- Topics: bfs-algorithm
- Language: Java
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# hop_distance_using_BFS_algorithm
calculating hop-distance between devices using adjacency list and BFS algorithm.Suppose that there are n laptops each containing a wireless transmitter. For each laptop i,
following information are known:
- Position, (xi
, yi),- Wireless transmission range, ri
That is, we can imagine that the wireless range of laptop i is a circle centered at (xi
, yi) with radius ri . We say that the laptops i and j can communicate if their wireless ranges overlap.
Of course, not every laptop can communicate with every other laptop, but laptops can send
messages by using intermediate laptops as routers. Hop distance h(i, j) is defined as the
minimum number of intermediate laptops used to send a message from laptop i to laptop j.
For example, if two laptops can communicate directly, the hop distance between them is 1.