Can any finite bit string be found in pi within a reasonable amount of time? [closed]

Expanding on my comments. There’s a very important concept here that’s called information entropy. Out of full disclosure, I’m the current world record holder of the digits of Pi at 10 trillion digits (10^13). I have approximately 10,000 copies of everyone’s social security number. However that doesn’t mean I can just hack into everyone’s accounts … Read more

How does a ‘diff’ algorithm work, e.g. in VCDIFF and DiffMerge? [closed]

An O(ND) Difference Algorithm and its Variations (1986, Eugene W. Myers) is a fantastic paper and you may want to start there. It includes pseudo-code and a nice visualization of the graph traversals involved in doing the diff. Section 4 of the paper introduces some refinements to the algorithm that make it very effective. Successfully … Read more

Given two lines on a plane, how to find integer points closest to their intersection?

alt text http://imagebin.ca/img/yhFOHb.png Diagram After you find intersection of lines L1:Ax+By=C and L2:ax+by=c i.e. point A(x1,y1). Define two more lines y = ceil(y1) and y = floor(y1) parallel to X-axis and find their intersection with L1 and L2 i.e. Points B(x2,y2) and C(x3,y3). Then point you require is D or E whichever is closer to … Read more

Is (pure) functional programming antagonistic with “algorithm classics”?

With respect to data structures, Chris Okasaki has done substantial research into adopting classic data structures into a purely functional setting, as many of the standard data structures no longer work when using destructive updates. His book “Purely Functional Data Structures” shows how some structures, like binomial heaps and red/black trees, can be implemented quite … Read more

Use of indexes for multi-word queries in full-text search (e.g. web search)

As you said some-word -> [doc385, doc211, doc39977, …] (sorted by rank, descending), I think the search engine may not do this, the doc list should be sorted by doc ID, each doc has a rank according to the word. When a query comes, it contains several keywords. For each word, you can find a … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)