In mathematics and computer science, an algorithm is an effective method expressed as a finite list of well-defined instructions for calculating a function. Algorithms are used for calculation, data processing, and automated reasoning.
1
vote
1answer
68 views
How to compute a signature of a matrix
We know some signature/checksum methods for text, like md5,sha.
Now, I want to compute a checksum for a matrix, to represent the exact matrix. Say, two matrixes with different sizes, or with ...
-1
votes
2answers
24 views
Store a tree with near next neighbours
I would to find an efficient structure (speed and volume) to store nodes and their neighbourhood.
My input is build out of stings in the following format
./X/Y.log
where X ∈ [0,359] and Y ...
0
votes
0answers
7 views
What is a solution in keyword trend analysis with a FreeText field in SQL Server 2008R2?
I am currently using a SQL Server 2008 db, where in a table, I have a freetext field defined.
I would like to perform some trend analysis on one field, where I would provide the base for the trend, ...
-3
votes
0answers
85 views
How can I learn how to write a programm for a turing machine? [closed]
I would like, to write a simple programm that will work on a turing machine but I don't know how to do it. I understand very clearly how the machine works, but I have no idea what command to write in ...
-1
votes
2answers
135 views
Just in time prize winning algorithm [closed]
I'm building a contest where you can win prizes by opening boxes. Whatever the box is open, i just send a request to the server to test if the user won something. Since this contest is not a "Register ...
0
votes
0answers
96 views
Development of algorithmical concept for scheduling and allocation problem
I have to solve a problem in the field of operations research. I want to gather some general approaches to evaluate them to pick the most promising to design a problem-related program.
Problem ...
0
votes
0answers
64 views
Algorithm for generating hyperexponential distribution
I need to generate a hyperexponential distribution for my project. I have already implemented a poisson generating algorithm given by Donald Knuth, but I couldn't find an algorithm for generating a ...
-5
votes
0answers
123 views
What algorithm to be use for Skin Disease Recognition [closed]
Hi I'm trying to accomplish an android application that will recognize particular skin disease, I just want to ask if what algorithm is best for Skin Disease Recognition considering the size and depth ...
2
votes
1answer
99 views
Algorithm in undirected BFS graph
I'm trying to put together an algorithm that will display the node degree for every node in a breadth first tree graph (assume BFS was called). Assume it's an undirected graph. I'm not sure how to ...
0
votes
1answer
74 views
How can I reduce my problem into Max flow problem?
I am trying to reduce my problem to a max flow problem so I can run the max flow algorithm on this problem. But there are some things that I am missing while transforming my problem.
My problem is:
...
4
votes
2answers
82 views
Placing elements in graph with a streaming/online algorthm
We have a stream of points with about 1000 points per second. For each point, we have a complex vector (hundreds of dimensions). Our goal, for each point is to link it to the 5 closest points that ...
0
votes
1answer
79 views
Does the ray tracing algorithm involves rasterization of image?
I am constructing a ray tracing algorithm , i know that the first step is to develop camera and view plane specifications.
Now is the next step performing rasterization algorithm on image before a BVH ...
-4
votes
2answers
163 views
Sorting algorithms already present [closed]
Is there any algorithm which sorts in ascending by picking any element from the unsorted list one at a time and placing it on the top
until it is finally sorted?
For Example unsorted list is 1,3,2
...
8
votes
3answers
355 views
What the correct algorithm to invert italics in a mixed text?
The question motivations was depicted in the section below.
There are many ways to make text italic,
so, perhaps, there are more than one good
"swap italics algorithm".
The problem reveals some ...
-1
votes
0answers
36 views
Prediction Analysis (Time series model) in UNIX [closed]
I know its not a code level question but wanted your views.
I need to perform “Prediction Analysis” in UNIX level using Time series model (like ARIMA).
We have implemented the same using R , but my ...
0
votes
0answers
60 views
How does indirection work in this code? [migrated]
I was reading the answer to Merging two sorted linked list.
The code:
#define SWAP_PTRS(a, b) do { void *t = (a); (a) = (b); (b) = t; } while (0)
Node* MergeLists(Node* list1, Node* list2)
{
...
4
votes
1answer
142 views
Where to learn graph theory applications [closed]
I am completely new to designing algorithms with graphs. I am following CLRS and other video lectures in Youtube, notably from IIT/MIT. They are pretty good, and I currently have decent idea about ...
2
votes
1answer
128 views
Which algorithms typify Lisp's power? [closed]
Similar question here (but not the same) because I am interested in which specific algorithms work particularly well in Lisp.
Lisp tutorials always give the example of finding factorials, but wanting ...
1
vote
2answers
57 views
Radix exchange sort implementation?
I need a little help understanding the implementation of radix exchange sort algorithm.
Radix exchange (i don't know if it's the exact name in english based literature) is a lot similar to quicksort, ...
-2
votes
0answers
46 views
Bundle of Algorithms by Sedgewick, refresh and learn DS and algorithms [closed]
I want to refresh/learn DS and algorithms. I am considering buying Sedgewick's Bundle of Algorithms.
The reason is that Sedgewick's might be easier to read (with code examples), and takes less time ...
0
votes
2answers
95 views
Algorithm to increase odds of matching when randomly selecting
I am building a mobile game loosely based on dual n-back http://brainworkshop.sourceforge.net/tutorial.html
Now with the game I have 9 squares (numbered 1 through 9) and 9 letters (A through K)
In ...
6
votes
2answers
197 views
How can degree of order in a list be measured?
The following questions gave me food for thought:
Efficient way to shuffle objects
I'd like to write an "ultimate shuffle" algorithm to sort my mp3 collection
When you sort a list - ...
1
vote
1answer
152 views
Is there a time bomb in sequential process id allocation when the `unsigned` wraps?
I'm designing and implementing a multiprocessing postscript interpreter ("lightweight" processes simulated by a single OS-thread), and I need to generate a unique identifier for each process in the ...
2
votes
0answers
109 views
Proof of the Strassen's matrix multiplication method
The famous Strassen's matrix is a real treat for us,as it reduces the time complexity from the traditional O(n^3) to O(n^2.8).Of all the resources,I have gone through,even Cormen and Steven Skienna's ...
3
votes
3answers
183 views
How to rotate an array of bits
I currently have a PIL Image object which I store as an array of bits (1's and 0's). However I now would like to be able to rotate that image 45 degrees. One way to do it is take the original PIL ...
3
votes
1answer
110 views
Finding maximum number of congruent numbers
Let's say we have a multiset (set with possible duplicates) of integers. We would like to find the size of the largest subset of the multiset such that all numbers in the subset are congruent to each ...
6
votes
3answers
271 views
Change of the complexity class through compiler optimization?
I am looking for an example where an algorithm is apparently changing its complexity class due to compiler and/or processor optimization strategies.
1
vote
0answers
104 views
Algorithm to find last allocated job for each worker
Let's say we have n jobs numbered from 1 upto n and k workers numbered from 1 upto k.
All the jobs are equally difficult, but some workers are more efficient than others, so we are given the time it ...
0
votes
0answers
61 views
Efficient Copy While Sorting
I have an algorithms library called NDex. I am in the process of upgrading it to a new version. Part of this upgrade involves providing two versions of many algorithms: an in-place version and a ...
3
votes
1answer
99 views
Algorithm, AI, or intelligent agent suggestions for ingesting poorly-formatted & variable data from different document types
Thanks for looking!
Background
I have been tasked with writing a program to normalize and ingest data from various sources to a common database.
For the sake of simplicity, let's say that the ...
0
votes
0answers
107 views
Matrix Pattern Recognition Algorithm for a 2D space
I have a picture that I elaborate with my program to obtain a list of coordinates.
There is a matrix represented in the image.
In an ideal test I would get only the sixteen central points of each ...
-4
votes
3answers
159 views
Is there something which can write the function for me given the pattern?
For example I have the following.
The inputs are on the left. The outputs are on the right. The second term in the input which is the number 3 is the number of output numbers I want.
It would be ...
2
votes
1answer
63 views
Algorithm for Cyclical Sequence Alignment
Let's say we have 3 cyclic sequences, each of them of length n and containing every number from the interval 1..n once.
The goal is to align the sequences in order to maximize the number of matches ...
-6
votes
1answer
91 views
Separating signal chunks, better algorithm desired [closed]
This is my current challenge. I am looking for a good algorithm.
http://i.stack.imgur.com/Q6b9z.gif
from 0 to about 1480 you have values below 100. My goal is to separate those two big areas of ...
1
vote
1answer
76 views
Name of this algorithm (Create binary image)
Some days ago I saw in this site the algorithm below to convert color images to binary images and I used it in my application (with some small changes). However, I need to know what is the name of the ...
2
votes
4answers
243 views
Find the count of each word in a string
I am in a search of a better performant algorithm to implement a program, to find the count of each word in a sentence i.e.., a String in the programming sense.
I know my algorithm is too basic and ...
6
votes
3answers
280 views
simple 'defrag' logic that minimizes changes?
edit:
so clearly I didn't explain this well, so let me try again with examples. I have a 'pipe' of a given size with signals routed through it at given offsets. The pipe can get fragmented with ...
16
votes
1answer
350 views
What algorithms are there for picking colors for plot lines on graphs?
I'm interested in what algorithms or rules I can programmatically implement to generate RGB or HSV colors for plotlines to keep them visually distinct from the neighbors.
I know that in professional ...
-3
votes
2answers
123 views
How would you approach this Domino problem? [closed]
This is a problem from an algorithmic competition from a few years back. It has a very simple description, but I don't see any algorithm to solve it efficiently. I am not looking for an ...
3
votes
1answer
809 views
How does Jump Point Search algorithm work and why is it so efficient?
While trying out the below applet, I saw that this path finding algorithm called Jump Point Search yields significantly faster result than A* and Dijkstra.
...
1
vote
0answers
171 views
Optimization algorithm, how to develop this problem
I have a situation where I would like your input and think over / solve algorithm.
The specs
There are inventories with a specified amount of capacity. 'X
(width) and Y (time)' creates ...
0
votes
1answer
74 views
Defining a status between last check and now
I have sets of probing data from an internal monitoring tool which represent the availability of different services (databases, webservices and so on).
Now my task is to visualize this data and I ...
3
votes
1answer
143 views
Suitable algorithm for joining records from multiple databases
I am in the process of writing a library that is used to be able to access data from a database. The library requires the initial definition of all the tables that the application will be using in the ...
5
votes
4answers
195 views
Find the peak of each islands in sparse matrix
I have a sparse matrix that contains several islands of unknown size. I would like to find the highest peak of each islands. Consider this matrix as an example:
0 0 1 0 0 0 0
0 0 1 2 1 0 0
0 0 0 3 2 ...
1
vote
1answer
211 views
What is the time complexity of the algorithm to check if a number is prime?
What is the time complexity of the algorithm to check if a number is prime?
This is the algorithm :
bool isPrime(int number){
if(number < 2) return false;
if(number == 2) return true;
if(number ...
0
votes
1answer
142 views
Priority queue for Kruskal's algorithm with running time O(E lg V)
I'm reviewing my notes on Kruskal's algorithm and have a question about getting the runtime down to O(E lg V). By using a PQ with edges and a boolean array of which vertices we have added to our tree ...
0
votes
0answers
112 views
What data structure is suitable for implementing dynamic huffman encoding and decoding on a piece of text?
Some pseudo code or resources will be appreciated.I was thinking if implementing it in form of a BST stored in an array. However,not all operations can be performed easily using this approach. I am ...
20
votes
3answers
2k views
Divide and Conquer algorithms – Why not split in more parts than two?
In divide and conquer algorithms such as quicksort and mergesort, the input is usually (at least in introductory texts) split in two, and the two smaller data sets are then dealt with recursively. It ...
1
vote
1answer
180 views
Why are there non-decidable languages? Can anyone explain me my book's solution?
Well in my book it is says that "there are non-decidable languages" And the proof is:
Every algorithm is a word. Then there are only countable algorithms. But there are uncountable languages and ...
2
votes
1answer
110 views
Given a situation, and some conditions, verify is that situation is possible
Well it's a problem me and my friend had thought of, and well, haven't come up with anything to solve the following problem(I'll try to phrase it in the best way I can):
Given that there are n ...