Along with all buzz talks about the wonderful Bumptop desktop environment, Im getting this question now. What is the relation with Physics and Bumptop techniques. Basically, I am interested in learning the techniques/algorithms followed in this desktop environment. For example,
Collision Detection -- is used when one icon is about to c...
Given a 1D array of values, what is the simplest way to figure out what the best fit bimodal distribution to it is, where each 'mode' is a normal distribution? Or in other words, how can you find the combination of two normal distributions that bests reproduces the 1D array of values?
Specifically, I'm interested in implementing this in...
Consider a sales department that sets a sales goal for each day. The total goal isn't important, but the overage or underage is. For example, if Monday of week 1 has a goal of 50 and we sell 60, that day gets a score of +10. On Tuesday, our goal is 48 and we sell 46 for a score of -2. At the end of the week, we score the week like this:
...
I have n elements. For the sake of an example, let's say, 7 elements, 1234567. I know there are 7! = 5040 permutations possible of these 7 elements.
I want a fast algorithm comprising two functions:
f(number) maps a number between 0 and 5039 to a unique permutation, and
f'(permutation) maps the permutation back to the number that it...
Is it possible to get strings, ints, etc in binary format? What I mean is that assume I have the string:
"Hello" and I want to store it in binary format, so assume "Hello" is
11110000110011001111111100000000 in binary (I know it not, I just typed something quickly).
Can I store the above binary not as a string, but in the actual form...
Hello,
Im working on a code challenge problem involving transforming a given binary matrix into another. I wrote the code in C++, and it works for the test cases i looked at, but it does not pass the online judge . The problem as well as my solution is at http://bit.ly/4SEoZ .
Can someone please tell me what could be going wrong ?
Than...
Hello,
Given a set of n numbers (1 <= n <= 100) where each number is an integer between 1 and 450,we need to distribute those set of numbers into two sets A and B, such that the following two cases hold true:
The total numbers in each set differ by at most 1.
The sum of all the numbers in A is as nearly equal as possible to the sum of...
I want to implement word document differ, what algorithms does it requires to implement?
...
I'm trying to generate a color that could highlight an item as "selected" based on the color of the current object. I've tried increasing some of the HSB values, but I can't come up with a generalized formula. Particularly, I have problems when working with white (a brighter white doesn't look much different than a regular white). There'...
Let's say I have a list of objects that are sorted by a specific field on that object. If one of the objects changes that property, its position in the sorted list would need to be updated.
What sorting algorithm or "tricks" could I use to very quickly sort this list, given that it falls out of sort only one item at a time?
The data st...
Problem: I have a large collection of points. Each of these points has a list with references to other points with the distance between them already calculated and stored. I need to determine the shortest route that begins from an origin and passes through a specific number of points to any destination.
Ex: I'm on vacation and I'm st...
I have a data set with attributes like this:
Marital_status = {M,S,W,D}
IsBlind = {Y,N}
IsDisabled = {Y,N}
IsVetaran = {Y,N}
etc. There are about 200 such variables.
I need an algorithm to generate combinations of the attributes, with one value at a time.
In other words, my first combination would be:
Marital_status = M, IsBlind = ...
I've noticed that old color movies have a certain look about them, a certain film effect that is hard to come across in modern video - the colors are kind of matted out, like seen through a canvas of some sort - (example - column on the left). Is there any filtering algorithm that could apply this effect to video? On a side note, an equa...
Hi All,
I have a small problem with some late additions to a project, mysql and PHP.
We have a table in mysql with 200,000 rows, each with an assigned category. Originally the select statement would just pull out the required items based on a where clause and order by an indexed id. Very quick.
However we had some users request the ab...
I have two algorithms written in C++. As far as I know, it is conventional to compile with
-O0 -NDEBUG (g++) while comparing the performance of two algorithms(asymptomatically they are same).
But I think the optimization level is unfair to one of them, because it uses STL in every case. The program which uses plain array outperforms the...
I am afraid that there might be a situation for which the "greedy choice property" might not hold.
For any problem, I can only check for small data-sets. What if, for large data-sets, the property fails?
Can we ever be sure?
...
I have list which is sorted using a specific string comparison function.
Now I have to re-sort this list using a different string comparison function.
This new comparsion is slightly different when comparing certain special characters, like Umlauts for example. In most cases the element has to be moved just one or two slots to get to ...
I'm looking for a way to reverse a CRC32 checksum. There are solutions around, but they are either badly written, extremely technical and/or in Assembly. Assembly is (currently) beyond my ken, so I'm hoping someone can piece together an implementation in a higher level language. Ruby is ideal, but I can parse PHP, Python, C, Java, etc.
...
Hi, I understand that Java associates a lock with every shared object to ensure mutual exclusion and condition sync. I am told to model a Java recursive lock as a FSP process.. but I'm stuck and below is the question and what I've written so far. HELP IS GREATLY GREATLY APPRECIATED.
QNS: Given the following declarations:
const N = 3
ra...
Hi,
I am willing to learn in detail about Data Structures and Algorithms. What freely available university courses are there that cover data structures and algorithms?
Thanks.
...