0

My professor posed the following question and I really don't know how to start solving this problem. Any help is really welcomed.

Let the space of the tree be a tree with a uniform branching b (each node has exactly b children). We are exploring the space with iterative deepening, starting with the root of the tree. The program finds the first solution at a depth of 3, in 0.2 seconds, and the next solution at a depth of 5 in 10 seconds. We know that the third solution is at depth 9. Estimate approximately how much time we can expect the program to need in order to find the third solution.

Prune
  • 76,765
  • 14
  • 60
  • 81
majzmaj
  • 9
  • 2
  • If you don't know where to start with a homework problem, you should ask, in order: your teacher, the teaching assistant, a classmate, other people. Your teacher knows much better than us what background you have and what this exercise is meant to teach you, so they're able to provide much more appropriate assistance. This site also isn't really suited for mentorship type of guidance (as opposed to just giving an answer you may not understand or learn all that much from), which is really what would be the most beneficial in cases like these. – Bernhard Barker Aug 28 '18 at 09:41
  • I'm voting to close this question as off-topic because this is mathematical, not programming. – Prune Aug 28 '18 at 16:07

1 Answers1

1

Remember school math and sum of geometric progression.

Tree looks like (example for b=3 children)

         N
  N      N      N
N N N  N N N  N N N    

Number of nodes at K top levels is (1 + b + b^2 + b^3... + b^(k-1))

S(k) = (b^k - 1) / (b - 1)

We can see for k=3 and k=5

S(5) / S(3) = 10 / 0.2

(b^5 - 1) / (b^3 - 1) = 10 / 0.2 = 50

Approximation (neglecting -1 term for not so small powers)

b^5 / b^3 = b^2 ~ 50

To find result for k=9

b^9 / b^5 =  b^4 ~ 2500

So time is 10*2500 = 25000 seconds ~ 7 hours

MBo
  • 77,366
  • 5
  • 53
  • 86