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)

2
votes
0answers
30 views

Merge directed acyclic graphs minimizing number of nodes

I have some DAGs (directed acylic graphs) and I want to merge them in order to minimize the number of nodes (we could say that every node has a cost, while edges are free). These four different DAGs ...
2
votes
0answers
72 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 ...
2
votes
0answers
111 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
204 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
123 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
116 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
202 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
67 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 ...
1
vote
0answers
52 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 ...
1
vote
0answers
84 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 ...
1
vote
0answers
53 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 ...
1
vote
0answers
114 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 ...
1
vote
0answers
149 views

How to extract the active code path from a complex algorithm

I have been puzzled lately by an intruiging idea. I wonder if there is a (known) method to extract the executed source code from a large complex algorithm. I will try to elaborate this question: ...
1
vote
0answers
47 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 ...
1
vote
0answers
178 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 ...
1
vote
0answers
163 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
258 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
97 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 ...
0
votes
0answers
30 views

Algorithm for intersection of two convex polygons among set of m convex polygons in a plane

There are set of m convex polygons(p1, p2, p3…pm) in a plane. Pi contains ni number of vertices. All total n1+n2+…+nm=n vertices. Two convex polygons intersect if either their boundaries intersect or ...
0
votes
0answers
50 views

Test if a point is inside or outside a 3D polygon

I'm wondering if there is an algorithm (or a code written in FORTRAN) that gives whether a 3D point is inside or outside a polygon having triangles as faces (an .stl file from gmsh for example). Most ...
0
votes
0answers
47 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 ...
0
votes
0answers
51 views

Find 'Connected Components' in undirected, unweighted graph coded as a 2d array

Given an undirected, unweighted graph coded as a 2d array, how can I find the number of different connected components? Example There is the following 2d array (I'm not putting any brackets to ...
0
votes
0answers
57 views

Does multiple Bloom filters make sense?

In order to decrease the number of false positives, I came up with a couple of possible solutions. Create two different types of Bloom filters; eg. filter1 using 3 different hash algorithms, filter2 ...
0
votes
0answers
32 views

Arduino ADC value and practices to store data to buffer

I'm writing Arduino application which has timer interrupt to acquire ADC value. Main loop has serial transmission procedure to send data from buffer. I'm not sure how to store data in buffer. Best ...
0
votes
0answers
16 views

A heuristic approach to Clique problem over undirected Graph

I'm trying to get all complete subgraph given a graph G. Needless to say it is an NP-problem complete: Clique_problem. I understand getting the full set is not possible in real time(since it'll take ...
0
votes
0answers
84 views

Similar problem to word break

I have a list of strings say L and an array of words say A. I want to find a string from the list L that is a best match to a string created from the permutations of the words in the array. The ...
0
votes
0answers
58 views

How to improve A* Algorithm where each child node costs marginally different

I have an A* algorithm with a heuristic to best guide the best path. The problem is that each node can have up to 240 children and each subsequent child also... So doing a breadth first approach is ...
0
votes
0answers
22 views

selecting area in array and expanding it to surroundings

I'm currently solving an algorithmic problem, but english is not my native language and I'm running into the limits of my language abilities when searching for reasonable solution. The problem: I ...
0
votes
0answers
43 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 ...
0
votes
0answers
151 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 ...
0
votes
0answers
37 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 ...
0
votes
0answers
208 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 ...
0
votes
0answers
79 views

What Algorithm can be use for task allocation based on location?

What algorithm can be use for task scheduling based on location? For example there are 100 students and 5 lecturers available. Each lecturer must get same amount of student using location allocation ...
0
votes
0answers
86 views

Approach for packing 2D shapes while minimizing total enclosing area

Not sure on my tags for this question, but in short .... I need to solve a problem of packing industrial parts into crates while minimizing total containing area. These parts are motors, or pumps, ...
0
votes
0answers
44 views

Stable, Hash Based Symmetrical Difference

A lot of thought went into the implementation of the set algorithms in LINQ: Distinct, Except, Intersect and Union. They guarantee that the items are returned in the same order that they appear in ...
0
votes
0answers
135 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, ...
0
votes
0answers
122 views

GSP Algorithm explanation

I've been trying to implement the GSC algorithm in C++, however I need help with clarifying the definition: http://en.wikipedia.org/wiki/GSP_Algorithm GSP Algorithm makes multiple database ...
0
votes
0answers
66 views

Can sequence alignment algorithms be used for search implementation?

Hi I want to implement a search on a website which includes imperfect search results. Meaning, if the search term is misspelled or slightly different from a 100% match, the function should still ...
0
votes
0answers
405 views

Multidimensional multiple-choice knapsack problem: find a feasible solution

My assignment is to use local search heuristics to solve the Multidimensional multiple-choice knapsack problem, but to do so I first need to find a feasible solution to start with. Here is an example ...
0
votes
0answers
62 views

Search substring using suffix array (and LCP)

I'm searching for a best way to improve suffix array run time using LCP. My text (about 2 500 000 chars) seems like: 0ricco0eric0america0polo0.... My thoughs: SA=suffixArray char=firstChar(input) s ...
0
votes
0answers
39 views

Algorithm for inserting into sorted subset

A is a sorted list. B is a sorted list, and a subset of A. If an element is inserted into A at index i what's the most efficient way to determine the correct index i' for it's position in B? Given ...
0
votes
0answers
50 views

Algorithm to Select Sequential Subarrays from an Array

I solved my problem by using simple nested loops and comparisons but I'm wondering if there is a well known Selection Algorithm to solve my problem. Let's say I have an array such as [1, 10, 250, 9, ...
0
votes
0answers
90 views

Algorithm / working approach to get a random list of data

I am working on a android schedule app but that isn't matter , the problem is a algorithm / methodology so you are welcome to just write the pusedo code to answer. The data is like this Place ...
0
votes
0answers
40 views

Maximize the visibility of an ad to a maximum of people in an automatic advertising system

I have N different ads that I want to display at the same time to M people in an automatic advertising system. Some people will never see some ads because they only check some specific criteria on the ...
0
votes
0answers
24 views

Calculating combinations from categories

I'm trying to calculate every possible selection from different categories. 1 choice must be made from every category and the categories are always in the same order. I save a string where each ...
0
votes
0answers
32 views

Readers Writers algorithm help - starvation and no starvation

I found this link, as an explanation of r/w problem - http://pages.cs.wisc.edu/~bart/537/lecturenotes/s7.html But, I'm having problems realizing is there any starvation present here and why? Also, if ...
0
votes
0answers
43 views

Algorithm for HIghest Local Alignment Score with a specific character match between two subsequences

I'm writing a code that identifies the highest-scoring local alignment between a substring X' of X and a substring Y' of Y that has at least one column in which a C from X' is aligned to a W from Y'. ...
0
votes
0answers
70 views

Looking for a Treemap tiling algorithm

I'm looking for an algorithm to convert a tree of data into a 2 dimensional treemap view. http://en.wikipedia.org/wiki/Treemapping I can do all the coloring in and drawing myself, but if there was ...
0
votes
0answers
53 views

Algorithm for Testing interoperability

I am writing a php script that carries out a task. One input is a list of options that I need to test for interoperability. If the options are A B C then I need to test every combination, but I only ...
0
votes
0answers
105 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 ...