I need to compare the DNA sequences of X and Y chromosomes, and find patterns (composed of around 50-75 base pairs) that are unique to the Y chromosome. Note that these sequence parts can repeat in the chromosome. This needs to be done quickly (BLAST takes 47 days, need a few hours or less). Are there any algorithms or programs in partic...
Hello
i am developing an Algorithm Simulator(Virtual Lab),first let me describe it briefly:
DESCRIPTION
There are so many different type of algorithms in Data Structures like Searching
algorithms,Sorting algorithms,Tree traversal algorithms etc.
So i am developing a desktop application in which a user can input the elements and wh...
Hi, i try to find the complexity of this algorithm:
m=0;
i=1;
while (i<=n)
{
i=i*2;
for (j=1;j<=(long int)(log10(i)/log10(2));j++)
for (k=1;k<=j;k++)
m++;
}
I think it is O(log(n)*log(log(n))*log(log(n))):
The 'i' loop runs until i=log(n)
the 'j' loop runs until log(i) means log(log(n))
the 'k' loop runs until k...
I've got a number which is less than 500,000,000 and I want to factorize it in an efficient way. What algorithm do you suggest? Note: I have a time limit of 0.01 sec!
I've just written this C++ code but it's absolutely awful!
void factorize(int x,vector<doubly> &factors)
{
for(int i=2;i<=x;i++)
{
if(x%i==0)
{
dou...
Hi,
while working on betfair api getMarketPricesCompressed and getMarketPrices return the real price and real amount of money for each odd in the market but not the virtual values showed by betfair.
Have someone written such algorithm in php to calculate virtual values shown on betfair wesite.
Betfair did not provided the code or algor...
Hey,
I came across the task to find all occurences of a substring in another string and was wondering what will be the best algorithm to solve this problem.
For demonstration purposes I used the string "The cat sat on the mat" and search for all occurences of the substring "at". This should ultimately result in an occurence count of 3....
for(i=0;i< m; i++)
{
for(j=i+1; j < m; j++)
{
for(k=0; k < n;k++)
{
for(l=0;l< n;l++)
{if(condition) do something}
}
}
}
...
I need some recommendations of books/links that discuss design on multi-threaded data structures for an intermediate level C++ developer who knows STL/Boost and pthreads individually but would now like to blend these 2 knowledge streams.
Any help appreciated.
...
My desktop application asks a user for proxy-server credentials to use it later. But what is the best way to store this secure information for further usage?
...
I wish to generate psuedo-random numbers/permutations that 'occupy' a full period or full cycle within a range. Usually an 'Linear Congruential Generator' (LCG) can be used to generate such sequences, using a formula such as:
X = (a*Xs+c) Mod R
Where Xs is the seed, X is the result, a and c are relatively prime constants and R is the ...
I need to read a large space-seperated text file and count the number of instances of each code in the file. Essentially, these are the results of running some experiments hundreds of thousands of times. The system spits out a text file that looks kind of like this:
A7PS A8PN A6PP23 ...
And there are literally hundreds of thousands of...
Hello buddies!
I wanna implement a fast algorithm for a homework, but using parallel processing for this task. I heard that the parallel version of Quicksort is the best choice, but I'm not sure of this... maybe Heapsort is a good idea. Which algorithm do you think is the best one for a parallelized environment, and why?
Regards.
...
Consider the problem of circuit evaluation, where the input is a boolean circuit C and an input string x and you want to compute C(x). (Assume fan-in 2 if you like.)
This is a 'trivial' problem algorithmically, however it appears non-trivial to implement when C can be huge (think several million gates) and memory management becomes an i...
My objective is to [semi]automatically assign texts to different categories. There's a set of user defined categories and a set of texts for each category. The ideal algorithm should be able to learn from a human-defined classification and then classify new texts automatically.
Can anybody suggest such an algorithm and perhaps .NET libr...
Hi stackoverflow, I would like to know some solutions to such a problem.
It is given a number lets say 16 and you have to arange a matrix this way
1 2 3 4
12 13 14 5
11 16 15 6
10 9 8 7
the language doesn't matter, (prefferably PHP);
...
This is an updated follow-up from my last question: http://stackoverflow.com/questions/3494178/fatal-error-from-incrementing-loop
I've finished the sorting algorithm, which seems to work fine. Now my problem is trying to calculate the health for each fighter(in the getHealth() function) based on levels in my vector to calculate correctly...
There is a rectangular grid of coins, with heads being represented by the value 1 and tails being represented by the value 0. You represent this using a 2D integer array table (between 1 to 10 rows/columns, inclusive).
In each move, you choose any single cell (R, C) in the grid (R-th row, C-th column) and flip the coins in all cells (r,...
Hey folks,
PHP / MySQL backend. I've got a database full of movies YouTube-style. Each video has a name and category. Videos and categories have a m:n relationship.
I'd like for my visitors to be able to search for videos and have them enter the search terms in one search field. I can't figure out how to return the best search results ...
Intel Core2Duo, for example is supposed to have a single die but two cores.
So, it should be possible to control what is processed on which core, which means that it is possible to instruct my algorithm to use the two cores in parallel.
The question is how?
Do I need to go down at the kernel level to do this, or is there a simpler wa...
I was just looking at Eric Lippert's simple implementation of an immutable binary tree, and I have a question about it. After showing the implementation, Eric states that
Note that another nice feature of
immutable data structures is that it
is impossible to accidentally (or
deliberately!) create a tree which
contains a cycl...