File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -38,8 +38,8 @@ unfortunately is still too large for an exponential time solution. But it is
38
38
39
39
### Further Analysis
40
40
41
- To limit the maximum number of nodes to 20, we have to prove that a game can * always *
42
- end in $k$ moves if $k^2 \geq n$.
41
+ To limit the maximum number of steps to a point where bitwise DP is feasible,
42
+ we have to prove that a game can * always * end in $k$ moves if $k^2 \geq n$.
43
43
44
44
Since each move results in breaking a tree down into a bunch of smaller trees,
45
45
we can do a [ proof by induction] ( https://en.wikipedia.org/wiki/Mathematical_induction ) .
@@ -98,7 +98,7 @@ n_{r+1} \leq (k-r)^2-2(k-r)=(k-r-1)^2
98
98
$$
99
99
100
100
And we're done! Since we've shown that any case where $k^2 \geq n$ will result in a win, we just
101
- have to handle the case where $N \leq 20$, for which
101
+ have to handle the case where $k \lt 20$, for which
102
102
[ bitmask DP] ( /gold/dp-bitmasks ) will suffice.
103
103
104
104
### Bitmask DP
@@ -125,7 +125,7 @@ yields a configuration that can cover up to the fifth leaf.
125
125
126
126
## Implementation
127
127
128
- ** Time Complexity:** $\mathcal{ O } (2^{ \sqrt {N }} \cdot N )$
128
+ ** Time Complexity:** $\mathcal{ O } (2^{ \sqrt {n }} \cdot n )$
129
129
130
130
<LanguageSection >
131
131
<CPPSection >
You can’t perform that action at this time.
0 commit comments