Skip to content

Commit

Permalink
minor edits
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucas Roberts authored and Lucas Roberts committed Oct 14, 2024
1 parent ce81e67 commit a2471b6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions _posts/2024-10-14-blog-post.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ or DP.

Now this is all well known, but one thing that is less well known is that you
can do the DP in-place instead of using 2 adjacent rows of integers in separate
memory locations, one storing the values for $$n-1$$ and the other for $n$ that
memory locations, one storing the values for $$n-1$$ and the other for $$n$$ that
is being populated in the current iteration.

To do this in place you need to traverse the row of integers right to left, also
Expand Down Expand Up @@ -127,7 +127,7 @@ about numeric precision given how large the numbers become so quickly (in n).
Note that for the ordered Bell numbers of order $$k$$, you can still do the computation
in place similar to how you did the Stirling numbers of the second kind. The
primary difference beside what the numbers actually count is that for
ordered Bell numbers of order $k$ you can iterate over a row in either direction
ordered Bell numbers of order $$k$$ you can iterate over a row in either direction
and still do the computation in place.

Note: In the SciPy implementation the Stirling number computation is vectorized
Expand Down

0 comments on commit a2471b6

Please sign in to comment.