Explore >> Select a destination


You are here

blog.paulhankin.net
| | www.jeremykun.com
4.2 parsecs away

Travel
| | Problem: Compute the product of two polynomials efficiently. Solution: import numpy from numpy.fft import fft, ifft def poly_mul(p1, p2): """Multiply two polynomials. p1 and p2 are arrays of coefficients in degree-increasing order. """ deg1 = p1.shape[0] - 1 deg2 = p1.shape[0] - 1 # Would be 2*(deg1 + deg2) + 1, but the next-power-of-2 handles the +1 total_num_pts = 2 * (deg1 + deg2) next_power_of_2 = 1 << (total_num_pts - 1).
| | bayesianneuron.com
3.7 parsecs away

Travel
| | [AI summary] The user has shared a detailed exploration of optimizing the 0/1 Knapsack problem using dynamic programming with Python and NumPy. They discuss various optimization techniques, including reducing memory usage with a 2-row approach, vectorization using NumPy's `np.where` for faster computation, and the performance improvements achieved. The final implementation shows significant speedups, especially for large-scale problems, and the user highlights the importance of vectorization and efficient memory management in computational tasks.
| | xorshammer.com
8.3 parsecs away

Travel
| | There is a class of all cardinalities $latex \mathbf{Card}$, and it has elements $latex 0$, $latex 1$ and operations $latex +$, $latex \cdot$, and so forth defined on it. Furthermore, there is a map $latex \mathrm{card}\colon\mathbf{Set}\to\mathbf{Card}$ which takes sets to cardinalities such that $latex \mathrm{card}(A\times B)=\mathrm{card}(A)\cdot\mathrm{card}(B)$ (and so on). Ordinary generating functions can be thought...
| | arkadiusz-jadczyk.eu
37.9 parsecs away

Travel
| [AI summary] The blog post discusses the mathematical structure of anti-de Sitter (AdS) space, connecting it to the group SL(2,R) and exploring its geometric and algebraic properties through a pedagogical paper.