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)

0
votes
5answers
172 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 ...
-2
votes
0answers
53 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 ...
0
votes
1answer
98 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 ...
0
votes
1answer
38 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 ...
-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
63 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 ...
8
votes
1answer
476 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 ...
3
votes
2answers
57 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 ...
-2
votes
2answers
196 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
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
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
votes
1answer
49 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 ...
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 ...
-2
votes
0answers
42 views

How can I evaluate a mathematical expression? [closed]

What's the best or common way to evaluate an arbitrary mathematical expression? E.g. 2 + (4 - 16) × 33.
0
votes
0answers
61 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 ...
10
votes
5answers
634 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. ...
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 ...
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 ...
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, ...
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
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 ...
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 ...
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 ...
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 ...
4
votes
3answers
490 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 ...
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 ...
0
votes
1answer
86 views

Calculate reachability of one point from another

I have an array which stores a set of positive x coordinates in sorted way, say arr={1, 4, 5, 9, 12, 45} etc. And I have a maximum distance k which I can go from one point to another point let ...
8
votes
1answer
123 views

An algorithm for reconstructing a graph from its shortest path information?

I have some shortest path data for a graph. Can I reconstruct the graph itself from this data? More precisely, I have a boolean (0/1) matrix for each vertex v in graph (V, E). Matrix element [s,d] is ...
-1
votes
0answers
31 views

What are some of the efficient ways to test your algorithms ? [duplicate]

I have just started with competitive programming and must tell you that, I don't have a lot of experience with solving these type of problems. As a result , I started by solving the easiest problems ...
3
votes
1answer
66 views

Does parallel mergesort run differently on mesh vs linear array of processors?

I'm currently taking course on introduction to algorithm and I came across the parallel mergesort algorithm. My question is: Is there any differences in the algorithm plan if it runs on a 2d mesh ...
3
votes
1answer
214 views

Which algorithms do I need to look into?

First things first: I need to apologize in advance about the bad choice of title for this question, but I really couldn't come up with something meaningful. I'm actually looking for suggestions as to ...
0
votes
1answer
48 views

An algorithm for finding converse duplicates of ordered pairs

Given an array of ordered pairs of values, is there a well-known algorithm to find converse duplicates? [Converse meaning the same values, but in the opposite order.] That is, given ...
2
votes
0answers
25 views

Find the smallest summed distances by uniquely pairing elements of one set to elements of another set [migrated]

As input I have two sets of points in RN, typically for large N, for example N=40. Supose both sets have m elements: S = s1 ... sm T = t1 ... tm Semantically both sets are equal, but due to noise ...
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 ...
-1
votes
1answer
74 views

get all the combination of a given set of numbers [duplicate]

I m trying to get the possible combinations of a given set of numbers say for example 123 The possible combinations would be 123 132 213 231 312 321 For this i have written a code as below - ...
10
votes
5answers
714 views

Algorithm for percentage without knowing total number

Suppose there are n lines for a hotline. Whenever a customer calls the hotline, the call is forwarded to one of the n lines. And I want to assign percentage of calling to each of the n lines. ...
-2
votes
0answers
71 views

How can I improve the following code in terms of faster execution? [migrated]

The problem is described here - Aaah!. My source code for the problem is below. I one of the fast running codes, but not the best. What changes can I make so as to improve the efficiency of the code. ...
0
votes
1answer
178 views

Is Microsoft Solver capable of solving such complex scheduling problems

I'm writing a application that will decide the scheduling plan for a few dozen people according to their occupation (role) and availability (week day and hours). I've used a excel spreadsheet to help ...
3
votes
2answers
64 views

Trivially Sortable Encoding for Arbitrary-Precision Decimals

I'm looking for a reasonably(*) space-efficient way to encode arbitrary-precision decimals (e.g. BigDecimal), such that when sorting the bit-pattern of the encodings lexicographically, the numbers ...
0
votes
0answers
39 views

Generating all the words accepted by a deterministic finite automaton [duplicate]

Imagine you've got a finite deterministic automaton A defining some finite regular language L, consisting of N words. The first question is: how would you determine the number of words N? Then, I ...
3
votes
1answer
84 views

Defining a random “safe” path for a game character

I am writing a game in Java and it can be likened to the recently popular game "Flappy Bird" in the sense that the character moves up and down and the users touch and must avoid the obstacles. The ...
1
vote
0answers
102 views

Algorithmic approach for text analysis of ingredients and instructions [closed]

Background Looking to separate lists of ingredients from instructions. Users scan recipes from 3x5 cards, magazines, cookbooks, etc. OCR software converts scanned images into plain text--typically a ...
0
votes
1answer
119 views

problem on calculating Big O complexity

i have this function on which i have to calculate the time complexity with the Big O notation: public void print(ArrayList<String> operations, ArrayList<LinkedHashSet<String>> ...
2
votes
1answer
66 views

Random forest ML algorithm suitable for use on cluster based HPC?

I need help in identifying a better algorithm. I have developed a script using pythons scipy package to analyse a rather large model that I wish to solve. The model contains over 12GB of data ...
1
vote
1answer
90 views

Taxonomy / Classification of real world objects. Development suggestions [closed]

I have to develop a taxonomy/classification program based on classification algorithms and i would like to have some suggestions. The aim is to help the one using the program to categorize an object ...
1
vote
2answers
57 views

Adding a minimum rectangle overlap threshold

I have a function that works perfectly for detecting whether or not r1 overlaps with r2: boolean overlaps( Rectangle r1, Rectangle r2 ) { return r1.x < r2.x + r2.width && r1.x + ...