Statement
带标号仙人掌计数问题.((n le 131071))
Solution
设(x)个点的仙人掌个数的生成函数为(C(x))
-
对于与根相邻的块, 还是仙人掌, 生成函数为(C(x))
-
包含根的环, 生成函数为(sum_{i ge 2}frac{C(x)^i}{2})
组合起来:
[C(x) = x exp{frac{2C(x)-C(x)^2}{2-2C(x)}}
]
设(G(C(x)) = xexp{frac{2C(x)-C(x)^2}{2-2C(x)}}-C(x)), 那么:
[small{
egin{aligned}
G'(C(x)) &= xleft(exp{frac{2C(x)-C(x)^2}{2-2C(x)}}
ight)'-1 \
&= x expleft(frac{2C(x)-C(x)^2}{2-2C(x)}
ight)left(frac{2C(x)-C(x)^2}{2-2C(x)}
ight)' - 1 \
&= x expleft(frac{2C(x)-C(x)^2}{2-2C(x)}
ight)
left(frac{left(2-2C(x)
ight)^2-left(2C(x) - C(x)^2
ight)(-2)}{(2-2C(x))^2}
ight)
- 1\
&= x expleft(frac{2C(x)-C(x)^2}{2-2C(x)}
ight)
left(1+frac{4C(x) - 2C(x)^2}{(2-2C(x))^2}
ight)
- 1
end{aligned}
}
]
牛顿迭代:
[egin{aligned}
C_1(x) &= C(x) - frac{G(C(x))}{G'(C(x))} \
&= C(x) - frac{2xexpleft(frac{2C(x)-C(x)^2}{2-2C(x)}
ight)-2C(x)}
{x expleft(frac{2C(x)-C(x)^2}{2-2C(x)}
ight)
left(1+frac{1}{(C(x)-1)^2}
ight)
- 2}
end{aligned}
]