cs607p
cs607p
Bc123456789
Question:
Breath First Search (BFS) algorithm requires massive memory space whiling
processing a problem even though it has promising time complexity. It is only
because of the branching factor that increase the expansion to search for the
target node. Consider, we have a graph/tree with the branching factor of 5
(each node has 5 neighbor nodes) nodes and depth (or height) 15. Moreover,
each node requires 25 bytes memory space. If the BFS is applied on this
graph/tree, calculate the memory space needed for this algorithm.
Note: You are required to show the memory space in Bytes (B), Kilo Bytes
(KB), Mega Bytes (MB) and Giga Bytes (GB).
Solution:
Given:
Depth/Height (d) = 15
515 = 30,517,578,125
Kilobytes (KB):
762,939,453,125/1024 ~ 744,172,410.77 KB
Megabytes (MB):
744,172,410.77/1024~ 726,924.62 MB
Gigabytes (GB):
{726,924.62/1024~ 709.3 GB
Final Answer:
Bytes: 762,939,453,125 B
Kilobytes: ~744,172,410.77 KB
Megabytes: ~726,924.62 MB
Gigabytes: ~709.3 GB