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
3answers
783 views

Architecture strategies for a complex competition scoring system

Competition description: There are about 10 teams competing against each other over a 6-week period. Each team's total score (out of a 1000 total available points) is based on the total of its ...
1
vote
1answer
66 views

Efficient algorithm for Virtual Machine(VM) Consolidation in Cloud

PROBLEM: We have N physical machines(PMs) each with ram Ri, cpu Ci and a set of currently scheduled VMs each with ram requirement ri and ci respectively Moving(Migrating) any VM from one PM to ...
0
votes
5answers
177 views

learning algorithms or learning a new language [on hold]

So I've been self studdiing two things. Algorithms/data structures using java and learning c++. I have books for both. But I'm slowly finding out that learning these two and doing CRUD programming in ...
0
votes
1answer
56 views

Algorithm to match timestamped events from two sources

I have two different physical devices (one is camera, one is other device) that observe the same scene and mark when a specified event occures. (record timestamp) So they each produce a serie of ...
-2
votes
0answers
54 views

Evenly Distribute students into rooms based on student study subjects and room capacity limitations [on hold]

The problem is that I need an algorithm (preferably in PHP) to solve the following problem. Students need to be placed into dorm rooms of varying capacities based on the subjects the student is ...
1
vote
1answer
87 views

What algorithms would suit image colour summarization?

I would like to analyse a set of hundreds of thousands of product images (clothing, electronic goods etc) and retrieve the dominant colours in each. I'm only interested in the top 3 or 4 colours. The ...
0
votes
1answer
40 views

Sequentially/parallel algorithm for extracting blob outer perimeter/contour length

I have labelled the connected components in a binary image and found their areas and bounding boxes. The components are not necessarily filled, and may contain holes. I wish to identify the component ...
0
votes
1answer
100 views

Programming a promotions engine

I am trying to implement a promotions engine for an e-commerce application and I want to figure out how such engines work especially in situations like the following. Buy X Items from Category A ...
-2
votes
2answers
197 views

Which algorithm is faster? [on hold]

I'm creating a small game, where the computer generate pseudo random number in give range, and the user have to guess it. I also made the option to play computer vs computer. I mean the computer ...
-1
votes
0answers
39 views

List of common task to make programs? [on hold]

I wonder if is already defined/know what task as generic to any programing task. For example, is very common the need to sort & search, not matter if is about arrays, list, files or tables. ...
-6
votes
0answers
64 views

How this problem has been solved? [on hold]

Little Jhool solves huge mathematical questions, for which people usually use super-computers, and everything - but hey, this is Little Jhool we are talking about. This time it's not Little Jhool who ...
3
votes
2answers
59 views

An algorithm for finding subset matching criteria?

I recently came up with a problem which I would like to share some thoughts about with someone on this forum. This relates to finding a subset. In reality it is more complicated, but I tried to ...
-1
votes
1answer
105 views

Optimal movie schedule

Let's say Mr. A goes to cinema and he gets a movie schedule. There are N movies on the program today (1 < N < 50) and for every movie the time of the start and the time of the end are given in ...
1
vote
2answers
199 views

An algorithm for a synchronization

I want to make a synchronization. What's the algorithm for it in a nutshell? 1) A client reads a local data and sends them to a server afterwards. The server compares them with its actual data, ...
8
votes
1answer
480 views

I know JavaScript really well, but i bomb coding interviews [on hold]

So I'm currently on a hunt for a new position as a Front-End Developer. I know JavaScript very well and can wax poetically about Closures, Currying, Prototypal Inheritance, Design Patterns, App ...
-1
votes
1answer
50 views

Long running tasks scheduling algorithms [on hold]

So, I am working on a project where tasks are scheduled on a cluster. Once the task is assigned and a node accepts it it cannot be stopped (So is not the same as scheduling processes in a CPU). While ...
4
votes
3answers
203 views

Accurate calculation of a raster image's boundary length

I have a rasterized image that contains two colors: white and black. The black portion is entirely connected and looks like a big blob. Is there a good way to estimate the length of the boundary ...
1
vote
2answers
79 views

Algorithm to reverse engineer permutation [on hold]

I have a sequence of permutations formed using these strings: "A", "BC" and "D". The permutations are: BCAD ABCD BCDA DABC ADBC DBCA Now I need to reverse engineer this; i.e. I have a text file ...
0
votes
3answers
228 views

Application qos involving priority and bandwidth

Our manager wants us to do applicaiton qos which is quite different from the well-known system qos. We have many services of three types, they have priorites, the manager wants to suspend low priority ...
0
votes
1answer
58 views

Analysis and design of algorithms final project [closed]

I'm searching a final project for my course of "analysis and design of algorithms" but I do not know what I can do. Let me explain it a bit: In this course we have learned 3 fundamental concepts: ...
1
vote
2answers
422 views

The physical implementation of quantum annealing algorithm

From that question about differences between Quantum annealing and simulated annealing, we found (in comments to answer) that physical implementation of quantum annealing exists (D-Wave quantum ...
1
vote
1answer
80 views

Algorithm for rating books: Relative perception

So I am developing this application for rating books (think like IMDB for books) using relational database. Problem statement : Let's say book "A" deserves 8.5 in absolute sense. In case if A is ...
533
votes
9answers
163k views

Which hashing algorithm is best for uniqueness and speed?

Which hashing algorithm is best for uniqueness and speed? Example (good) uses include hash dictionaries. I know there are things like SHA-256 and such, but these algorithms are designed to be ...
3
votes
1answer
112 views

How to create an algorithm for determining Boolean Tautologies

So i am right now exploring some topics in a proof course and it occurred to me to try to create a boolean tautology solver. I would like an algorithm that is more efficient than brute force. Problem ...
10
votes
5answers
637 views

Print the next smallest from 2^i * 5^j where i,j >= 0

I was asked this question during a technical phone screening recently and didn't do well. The question is included verbatim below. Generate {2^i * 5^j | i,j >= 0} sorted collection. ...
0
votes
0answers
62 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 ...
0
votes
0answers
84 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
2answers
94 views

What's the shortest generating one-way hash algorithm?

I have a 24 character long id which is guaranteed to be unique. I would like to shorten that to 7-10 (or even shorter) characters long. If I generate an short id randomly then I would have to check ...
2
votes
3answers
84 views

Count unique visitors by group of visited places

I'm facing the problem of counting the unique visitors of groups of places. Here is the situation: I have visitors that can visit places. For example, that can be internet users visiting web pages, ...
51
votes
9answers
12k views

I'm a CS student, and honestly, I don't understand Knuth's books [closed]

I stumbled upon this quote from Bill Gates: "You should definitely send me a resume if you can read the whole thing." He was talking about The Art of Programming books. So I was pretty curious and ...
1
vote
1answer
120 views

How to canonise a road network

I am working on geographical data which represents the road network of some city and I need to automatically fix inaccuracies in the data. Data was manually produced by “drawing” the road network ...
2
votes
0answers
60 views

Team workload algorithm [closed]

TL;DR This questions is about which algorithm(s) can be used for a certain use-case explained below. Imagine this situation in a project management system (Agile-based): Developers - John - Suzy ...
1
vote
1answer
85 views

Ensuring submitted hiscores are not fake

I have a small game that I would like to keep track og global hiscores for. The basic is simple: username and score is submitted to a server for storage and later polling. However how do I ensure that ...
0
votes
1answer
68 views

Decrease probability of picking a list's item based on its index

I have a list of sounds that are to be played when the user presses a button. For now I just generate a random number within the range of the list and just pick the sound with that index. (I also ...
0
votes
1answer
40 views

Traverse a matrix using a linear index to get an evenly distributed values sample

I'm looking for an algorithm idea on how to traverse a matrix using a linear index while avoiding row/column based traversals to get a more diverse distribution of values. To understand this better, ...
0
votes
1answer
44 views

How can I rank teams based off of head to head wins/losses

I'm trying to write an algorithm (specifically in Ruby) that will rank teams based on their record against each other. If a team A and team B have won the same amount of games against each other, then ...
0
votes
0answers
77 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 ...
3
votes
1answer
94 views

Identify algorithm for my resource allocation needs

I'm trying to automate a task and I lack the right vocabulary to look up the correct algorithm. It really feels like a common problem that has likely been solved many times before. All I'm looking ...
0
votes
1answer
53 views

Weight based mapping algorithm

I am writing automatic assignment of tasks to the users. Every user has a weight (integer) and tasks should be distributed to the users according to their weights. For example I have 10 tasks and User ...
-1
votes
3answers
95 views

Given known inputs and outputs, can we generate candidate functions that will map the inputs to outputs? [closed]

I've run into a problem where I have a set of inputs, as well as a couple known input-output pairs. I am interested in the output, but in order to get that, I need to figure out how the input is used ...
1
vote
1answer
70 views

Even distribution through a chain of resources

I'm working on an algorithm which routes tasks through a chain of distributed resources based on a hash (or random number). For example, say you have 10 gateways into a service which distribute tasks ...
4
votes
3answers
491 views

What is a helper? Is it a design pattern? Is it an algorithm? [closed]

Maybe a little tongue-in-cheek, but as I can't find this answer anywhere through Google, so to ensure Programmers Stackexchange has the answer: What is a helper? I see the name being used everywhere ...
1
vote
1answer
35 views

Equidistant polygons

Consider these polygons: For reasons of simplicity I only consider triangles or polygons with 4 vertices. These shapes are specified by the vertices, the output of the program should be modified ...
0
votes
1answer
61 views

How can I approach creating an efficient algorithm for maximizing value with these specific constraints?

I'm having trouble coming up with an approach that isn't n^2 for this problem. Here's a contrived, simplified version I've come up with: Let's say you're a company that needs 4 employees to launch in ...
28
votes
11answers
3k views

Random number generation algorithm for human brains? [closed]

Are you aware of, or have you devised, any practical, simple-to-learn "in-head" algorithms that let humans generate (somewhat "true") random numbers? By "in-head" I mean.. preferably without any ...
5
votes
6answers
726 views

How meaningful is the Big-O time complexity of an algorithm?

Programmers often talk about the time complexity of an algorithm, e.g. O(log n) or O(n^2). Time complexity classifications are made as the input size goes to infinity, but ironically infinite input ...
32
votes
13answers
3k views

Unit-testing of inherently random/non-deterministic algorithms

My current project, succinctly, involves the creation of "constrainably-random events". I'm basically generating a schedule of inspections. Some of them are based on strict schedule constraints; you ...
24
votes
6answers
12k views

Can an algorithm be patented?

So can an algorithm be patented? I saw this statement which made me think: Everybody would abstain from patenting the improvements of contour dot algorithm for at least several years, say ...
0
votes
0answers
38 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 ...
1
vote
2answers
113 views

Reduce a list of IPv4 to lowest common CIDR

I have a long list of IP addresses that show some pattern of closeness Example: XX.249.91.16 XX.249.91.21 XX.249.91.32 XX.249.91.160 XX.249.91.165 XX.249.92.15 XX.249.92.25 ...