In the "Your own adventure" books, the reader starts at page 1, and every page either (1) ends the story, or (2) sends him to another page, or (3) offers a choice among two possible pages.
Knowing that:
each page can be reached from only one other page  except for the 1st page, that cannot be reached from any page;
that all pages can eventually be reached by picking an appropriate path from page 1;
that if a book can be converted into another just by reordering choices and renumbering pages, they are considered to be the same;and that these books are always 100 pages long...How many essentially different books can be published?
I arrived at the following number of different books for 1 through 12 pages:
1, 1, 2, 3, 6, 11, 24, 47, 103, 214, 481, 1030
As given in previous posts f(1) = 1, f(2) = 1, f(3) = 2, f(4) = 3
When adding another page, add it at the begining. This new first page can send the reader to the first page of a book one page shorter, or to the first pages of two books whose total is one page shorter.
Thus f(n) = f(n1) + f(n2)*f(1) + f(n3)*f(2) + . . . f(nm)*f(m1) while (nm) >= (m1)
My calculations were getting cumbersome, and I ask those who program to give the calculation a go.
Edited on November 20, 2006, 1:48 pm

Posted by Leming
on 20061120 13:44:06 