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.

learn more… | top users | synonyms (1)

3
votes
0answers
92 views

In a mutual credit network, how would you program an automatic jubilee?

A little explanation might be needed. I mean mutual credit the way that it's defined here: a type of alternative currency in which the currency used in a transaction can be created at the time of ...
3
votes
0answers
109 views

Incorporating custom Algorithm in SOLR-LUCENE , before Indexing?

CURRENT FLOW: I am using a custom algorithm(presently in php) to rank the MYSQL records before INDEXING it to SOLR . WHAT I WANT : Is it possible implementing this ALGORITHM(may be in JAVA) inside ...
3
votes
0answers
224 views

Help/suggestions for Parallel assembly line scheduling (Dynamic programming)

I am working on a problem similar to the assembly line scheduling by dynamic programming.The issue is that unlike the classic problem where we have predefined stations now I only have information ...
3
votes
0answers
188 views

Automatic Appointment Conflict Resolution

I'm trying to figure out an algorithm for resolving appointment times. I currently have a naive algorithm that pushes down conflicting appointments repeatedly, until there are no more appointments. ...
2
votes
0answers
29 views

Project a piece of image cut by N-vertex shape to a different N-vertex shape

I have an N-vertex shape that I cut out from an image, and I want to project it onto another shape with the same amount of vertices, but different. So, the image will get changed inside the ...
2
votes
0answers
33 views

Optimizing trigram look ups with wildcards

I am working on creating a spell-checking service for Android (note: this is a platform- and language-neutral question) for Asturian, a minority Romance language. We're using hunspell as the base but ...
2
votes
0answers
100 views

Smallest number of rectangles covering marked parts of grid

I have an N by N grid of cells, and certain blocks are marked: +--+---+---+---+ | | | | | | | x | x | | | | x | x | | | | | | | | | | | x | +--+---+---+---+ I would like to ...
2
votes
0answers
98 views

Asking questions to the user based on results of previous questions

I have to select a question that would help me make me sure the user knows about a given subject. As an example, let's assume the user hasn't answered any question yet. Every question has a scope ...
2
votes
0answers
237 views

What algorithm is this?

I have some vague recollections from my algorithms courses, but nothing specific comes to mind. let S be a multiset of things we are interested in. As input, we get T, s1, s2, ... sn, all of which ...
2
votes
0answers
145 views

Design an algorithm with network flow

Given a matrix A with 0 and 1 entries. Neighbours of a[i,j] are a[i-1,j], a[i+1,j], a[i,j-1] and a[i,j+1] (if exists any). Tow neigbour entries are an Improper pair if they have not equal values. if ...
2
votes
0answers
108 views

Walk Tree vs Zhang and Sasha Algorithms

I need some help understanding how two tree comparing algorithms differ. I am working with Microsoft's XmlDiffPatch (http://msdn.microsoft.com/en-us/library/aa302294.aspx) which compares two xmls. The ...
2
votes
0answers
376 views

How to find minimum weighted vertex cover of a tree, and confused about a solution

Studying for my algorithms test by spamming Algorithm Design Manual exercises, but I'm stuck on this one. I know I have to keep score somehow. Let G = (V,E) be a tree with arbitrary weights ...
2
votes
0answers
59 views

Calculating “instability score” for connection quality, programmatically

First of all, apologies if this is posted in the wrong site. I thought it is more suitable here than SO because the question is quite generic, more an algorithm question than a specific programming ...
2
votes
0answers
394 views

how to use Sql query to search text in CSV file and avoid iteration

I have one A File and many input files ,All files have CSV format . I want to match text of one column of all input files with one of the column of A file . I have stored all column value of File A in ...
2
votes
0answers
218 views

Dynamic programming in Bin packing

Problem: Given a list L of objects of possible sizes from set S={1,2,4,8} and unlimited supply of bins of sizes 16 each and we have to use minimum possible numbers of bins to pack all objects of L. I ...
2
votes
0answers
120 views

Why isn't there parallel reduction in the Standard Template Library?

Alexander Stepanov stated in talks and interviews that his realization that eventually lead him to generic programming and the Standard Template Library, was from the case of the parallel reduction ...
2
votes
0answers
96 views

Colour curves tool for “value” channel

I'm trying to write a program to read GIMP curves files and apply them to an image. I have successfully implemented the curves for the red, green and blue channels, but I can't get it working for the ...
2
votes
0answers
231 views

Match buyers and sellers based on date ranges and quantity of shares

NOTE: This is in reference to the question I asked on Stack Overflow but was told to post this here I'm building a trading application that matches buyers/sellers that own subscription. Subscriptions ...
2
votes
0answers
154 views

Solving geometric constraints with Minion

I am doing research on squares, and I thought of using constraint-satisfaction-problems solvers for proving or disproving some conjectures. As a simple example problem, consider the following task: ...
2
votes
0answers
228 views

Generate complex (non-convex) polyhedron UV mapping

I need to find an approach to the problem of generating texture maps for non-convex polyhedrons without using a design tool like Maya. Specifically, I am mapping simulation results data onto a 3D ...
1
vote
0answers
38 views

Is there a better algorithm to uniformly distribute values from one source to X destinations?

Is there a better algorithm to uniformly distribute values from one source to X destinations? I have some source integer. I need to know how much of that value I need to distribute among other values ...
1
vote
0answers
44 views

clustering of strings with variable-length prefixes

I've got bunch of strings with variable-length prefixes (or postfixes - I can always revert them) as follows: 0155555555 523455555555 755555555 ... 87129999999999999 119999999999999 09119999999999999 ...
1
vote
0answers
154 views
+100

Fast fixed-size (256 bit) integer modulo/division

What is the fastest way to divide two 256-bit integers? They are represented as an array of 26-bit words, each stored in 32-bit integers. I have access to a 64-bit type if that's useful. It seems ...
1
vote
0answers
61 views

Efficient extensions of degree of separation

I'm trying to play around with the 6 degrees of separation problem, specifically the Kevin Bacon game to find alternative ways of playing the game. I want to eventually port it over to MapReduce, but ...
1
vote
0answers
75 views

Choose a number of arrays which have the smallest cardinal number when unified

Say we have multiple arrays: var a := [1, 2, 3] var b := [2, 3, 4, 5] var c := [1, 3, 4, 6] var d := [1, 2, 5] We want to find the three arrays with the smallest cardinal number when the three ...
1
vote
0answers
78 views

Reversing dithering algorithms?

I was trying to make an implementation of the Floyd-Steinberg dithering algorithm in Python, and I was wondering, since Bitmaps files store their data starting from the bottom-left corner, would it be ...
1
vote
0answers
63 views

Combining items from several lists with pagination

I am trying to come up with an algorithm for getting items for a news feed from several sources. There are multiple lists of data: S1, S2, ... Sn. Each of these lists has a certain known amount of ...
1
vote
0answers
43 views

Can't figure out how to parallelize the calculation of the amount of offspring expected for species in genetic algorithm

I developed a genetic algorithm in java 8 taking advantage of its reasonably free parallelism opportunities with Streams. As you are likely aware, running the epochs takes its time for even a test ...
1
vote
0answers
36 views

PSO – how Dimensions are set up?

I am coding a Particle Swarm Optimization in C++. I have been for days trying to understand the theory of how dimensions work in each different problem. In the many examples I have seen, all of them ...
1
vote
0answers
65 views

A fast algorithm for a simple multi-objective minimization?

I have a set of n (arbitrary) integer numbers S which I want to partition into k subsets S_i each of size n/k (you can assume that k divides n). Let A be the arithmetic mean of elements of the set S. ...
1
vote
0answers
35 views

Finding the largest bundle of flagged points

I am currently working to develop a program that takes in an array of 4 columns and around 200,000 rows. Each column represents x, y, z (coordinates), and a flag denoting whether or not this point is ...
1
vote
0answers
65 views

Dispatch Algorithm for logistics - Batch assignments

basically, I'm trying to implement an algorithm that dispatches drivers to deliver batches (a batch is a collection of orders). The algorithm takes all the batches and all the drivers available, then ...
1
vote
0answers
155 views

Algorithm for sweeping a 2d shape along a curve?

I am trying to create a graphics application where the user can use an arbitrary shape as a "brush", which will be swept along the drawing path. The shape may be transformed along the path (rotated, ...
1
vote
0answers
151 views

Algorithm for sport tournament bracket tree

I would like to develop a library that: receive n players in input response with the tournaments brackets in output. I would ask you what kind of algorithm I have to use to choose the correct tree ...
1
vote
0answers
87 views

An algorithm to implement SQL's ORDER BY with TOP/LIMIT or OFFSET/FETCH

Is there a general algorithm to implement SQL's ORDER BY with OFFSET/LIMIT more efficiently than sorting all the records? The algorithm for a simple TOP x is easy enough. It takes one full pass ...
1
vote
0answers
239 views

Tournament bracket customized algorithm

I'm in the making of a tournament for archery but i'm stuck because they want a specific match-matching for players. There is the usual 1-32,2-31,3-30 etc but the way they want the tree is a specific ...
1
vote
0answers
107 views

Is this synchronization required in service onCreate method?

Below is a sample code i captured from android doc Per service instance onCreate will be called only once. Ref: here and here The synchronization and singleton doesn't make any sense to me in this ...
1
vote
0answers
260 views

Dividing 2D grid to most efficient search

Requirements I have Grid of unlimited size (I don't and can't know what its size) There is Object that should be placed on the grid, every object have hes stream distance (in other words: range, ...
1
vote
0answers
130 views

Storing simple / flexible pricing logic in the database

I am working on a pricing algorithm where I want to generalize the calculation of certain components/charges. There are 3 components to the charges. 1 - a basic/core charge, 2- a handling charge ...
1
vote
0answers
215 views

Karger's algorithm for bin-packing?

I first came across that algorithm as the "Random minimum cut" algorithm. And recently a colleague was trying to pack a big quantity of small textures into one image file. Then it clicked - why not ...
1
vote
0answers
112 views

Algorithm to analyse and predict

I'm having a set of data's, say Question, Question's Main Category,Main Category followers, Question's Related Categories,Each Related Categories followers, Whether it got answer in 24hrs [Yes/No] ...
1
vote
0answers
213 views

Performance of a Skip-List algorithm

Here is a simple code for a randomized skip-list: Coin_Side flip() { if ( random() % 2 == 0 ) return HEADS; else return TAILS; } Note: random() returns an integer that uses ...
1
vote
0answers
102 views

data stored in dbase (application result dd.mm.yyyy)

I have a .dbf file (dbase) with data of type "date" to read directly via php. I have the application result (format: dd.mm.yyyy) and the stored hex code. I can't interpret the hex data to get the same ...
1
vote
0answers
197 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 ...
1
vote
0answers
209 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 ...
1
vote
0answers
165 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 ...
1
vote
0answers
77 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 ...
1
vote
0answers
263 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 ...
1
vote
0answers
124 views

Matching two lists of data with different conventions

I have two lists of data, A and B. These lists are themselves aggregated from multiple sources, and contain typos, abbreviations not found in the other, and also lack a 1-1 mapping, but will never ...
1
vote
0answers
102 views

josephus revisited - to get execution sequence

I was reading this Mathworld page on the Josephus problem: http://mathworld.wolfram.com/JosephusProblem.html from what I understood, once we get the place in execution sequence we can apply inverse ...