Youtube content identification technology?

Pedro Moreno and others at Google/Youtube work on it. They use finite-state transducers to recognize sequences of music phone units, similar to phonemes in automatic speech recognition. Check out this article: Eugene Weinstein, Pedro J. Moreno; Music Identification with Weighted Finite-State Transducers, Proceedings of the International Conference in Acoustics, Speech and Signal Processing (ICASSP), 2007. … Read more

Stable topological sort

One possibility is to compute the lexicographically least topological order. The algorithm is to maintain a priority queue containing the nodes whose effective in-degree (over nodes not yet processed) is zero. Repeatedly dequeue the node with the least label, append it to the order, decrement the effective in-degrees of its successors, enqueue the ones that … Read more

How do you know where to perform rotations in an AVL tree?

The pseudocode that you’ve posted will correctly balance a tree. That said, it is too inefficient to be practical – notice that you’re recursively exploring the entire tree trying to do rebalancing operations, which will make all insertions and deletions take O(n) time, eating away all the efficiency gains of having a balanced tree. The … Read more

Box stacking problem

I think you can solve this using the dynamic programming longest increasing subsequence algorithm: http://www.algorithmist.com/index.php/Longest_Increasing_Subsequence Accounting for the rotations is easy enough: for every tower all you have to check is what happens if you use its height as the length of the base and its width as the height and what happens if you … Read more

Teacher time schedule algorithm

I am one of the developer that works on the scheduler part of a student information system. During our original approach of the scheduling problem, we researched genetic algorithms to solve constraint satisfaction problems, and even though we were successful initially, we realized that there was a less complicated solution to the problem (after attending … Read more