3.5 Breadth First Seasrch (BFS)
Time and Space complexity
Branching factor
b
Depth
d
If solution is a level
d
nodes expanded will be:
1 + b + b
2
+ b
3
+ ... + b
d
For
b
=10, 1000 nodes/sec, and 100 bytes/node
Depth
Nodes
Time
Memory
0
1
1 millisecond
100 bytes
2
111
1 second
11 kilobytes
4
11,111
11 seconds
1 megabyte
6
10
6
18 minutes
111 megabytes
8
10
8
31 hours
11 gigabytes
10
10
10
128 days
1 terabyte
12
10
12
35 years
111 terabytes
14
10
14
3500 years
11,111 terabytes
Copyright © 1999. Department of Computer Science, RMIT University.
Last Modified: 20th June, 1999.