Hi,
I'm just doing a self-study of Algorithms & Data structures and I'd like to know if anyone has a C# (or C++) implementation of Strassen's Algorithm for Matrix Multiplication?
I'd just like to run it and see what it does and get more of an idea of how it goes to work.
...
Anyone know of any open source libraries for particle based large scale smooth particle hydrodynamics. I am looking for a easier way of simulating large scale planetary body impacts with rotation.
I was also wondering if you had any ideas on how to visualize the output from said simulation. I have tried using IBM graphviz, but it is ver...
Hi,
I saw this question in a forum about how an application can be developed that can keep track of the installation date and show trail period expired after 30 days of usage. The only constraint is not to use the external storage of any kind.
Question: How to achieve this?
Thanks
Bala
--Edit
I think its easy to figure out the place ...
Hi,
What is the best algorithm to find if any three points are collinear in a set of points say n. Please also explain the complexity if it is not trivial.
Thanks
Bala
...
Hi,
I was wondering what the complexity of the algorithm is that is used to find the smallest snippet that contains all the search key words.
Please explain the complexity, if non-trivial.
Thanks
Bala
...
What is the algorithm to create a x-ray image using ray-tracing from a 3-d volume?
...
Hi,
I have seen many questions on stackoverflow where dynamic programming technique can be used to make a exponential algorithm, a polynomial one. I have seen standard problems on dynamic programming. Is there a website or book that contains practice problems and solutions?
Thanks
Bala
...
Hi,
I am looking for an algorithm to create a linked list from a set of nodes. For example, let's assume a node is an airline ticket from a source point to destination. (e.g., Chicago to Detroit) and there are several airline tickets. Assuming all these airline tickets are jumbled, what is the best way to determine the entire journey pat...
I'm trying to use Bresenham's line algorithm to compute Field of View on a grid. The code I'm using calculates the lines without a problem but I'm having problems getting it to always return the line running from start point to endpoint. What do I need to do so that all lines returned run from (x0,y0) to (x1,y1)
def bresenham_line(sel...
I have a 3D grid of size AxBxC with equal distance, d, between the points in the grid. Given a number of points, what is the best way of finding the distance to the closest point for each grid point (Every grid point should contain the distance to the closest point in the point cloud) given the assumptions below?
Assume that A, B and C ...
This is a question that I was asked on a job interview some time ago. And I still can't figure out sensible answer.
Question is:
you are given set of points (x,y). Find 2 most distant points. Distant from each other.
For example, for points: (0,0), (1,1), (-8, 5) - the most distant are: (1,1) and (-8,5) because the distance between th...
I have a graph of components and relations between them. User start navigation with a root component. He click expand button on component to reveal new component that are related to current component.
The problem is when user decide to collapse a node. I have to choose a sub-tree to hide and at same time leave graph in consistent state...
Although I have Java in the title, this could be for any OO language.
I'd like to know a few new ideas to improve the performance of something I'm trying to do.
I have a method that is constantly receiving an Object[] array. I need to split the Objects in this array through multiple arrays (List or something), so that I have an independ...
I was give a problem to express any number as sum of 4 prime numbers.
Conditions:
Not allowed to use any kind of database.
Maximum execution time : 3 seconds
Numbers only till 100,000
If the splitting is NOT possible, then return -1
What i did :
using the sieve of eratosthenes, i calculated all prime numbers till the specified n...
Hello all.
Problem:
I have to design an algorithm, which does the following for me:
Say that I have a line (e.g.)
alert tcp 192.168.1.1 (caret is currently here)
The algorithm should process this line, and return a value of 4.
I coded something for it, I know it's sloppy, but it works, partly.
private int counter = 0;
public ...
I am looking for an approach that will let me assign ordinal numbers 0..(N-1) to N O/S threads, such that the threads are in numeric order. That is, the thread that gets will have a lower O/S thread ID than the thread with ordinal 1.
In order to carry this out, the threads communicate via a shared memory space.
The memory ordering m...
Given integer values x and y, C and C++ both return as the quotient q = x/y the floor of the floating point equivalent. I'm interestd in a method of returning the ceiling instead. For example, ceil(10/5) = 2 and ceil(11/5) = 3.
The obvious approach involves something like:
q = x / y;
if (q * y < x) ++q;
This requires an extra compar...
hello.
I know I can do this y[i] += f(x[i]) using transform with two input iterators.
however it seems somewhat counterintuitive and more complicated than for loop.
Is there a more natural way to do so using existing algorithm in boost or Stl. I could not find clean equivalent.
here is transform (y = y + a*x):
using boost::lambda;
t...
I have a small contest problem in which is given a set of points, in 2D, that form a triangle. This triangle may be subject to an arbitrary rotation, may be subject to an arbitrary translation (both in the 2D plane) and may be subject to a reflection on a mirror, but its dimensions were kept unchanged.
Then, they give me a set of points ...
I'm doing a scene using openGL (a house). I want to do some collision detection, mainly with the walls in the house.
I have tried the following code:
// a plane is represented with a normal and a position in space
Vector planeNor(0,0,1);
Vector position(0,0,-10);
Plane p(planeNor,position);
Vector vel(0,0,-1);
double lamda; // this is...