Close

Optimizing Collatz Sequence with Dynamic Programming

Even though Kurtz and Simon proved that a natural generalization of the Collatz problem is algorithmically undecidable, it is still fairly easy to brute force the 3n+1 conjecture with large values of n and empirically see it converge. Project Euler's problem 14 queries about which starting number, under one million, produces the longest sequence? Since Premature optimization is often considered root…

Share

How to tweet (or blog) in Urdu

Gone are the days of inpage; now writing Urdu universally in unicode is rather easy on both mac and PC (and Linux). Yesterday I was asked by a friend regarding how to tweet in Urdu. Here is a short 3 step guide without reinventing the wheel. 1. If you are not familiar with Urdu phonetic…

Share