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)

-1
votes
1answer
64 views

Algorithm for solve combinatorics (clique search)

We have a group of animals: animals = {'dog', 'wolf', 'cat', 'lion', 'rabbit', 'bear'} And know a list of conflicts conflicts = ( {'dog','cat'}, {'dog','rabbit'}, {'wolf','rabbit'}, ...
0
votes
0answers
88 views

Interaction between code and user interface

I'm developing a desktop app that has many different algorithms implemented. Some algorithms require additional input from user, this info might not be known before algorithm has started. My ...
0
votes
1answer
91 views

Algorithm to get all possible forms of a word with varying suffixes

I'm writing an application in javascript where given a word, I need to get all the possible versions of the word with the suffix being the difference between each form. For example: "sponsor" should ...
2
votes
6answers
733 views

Find pattern in a string

How would one approach the following question: We have two strings: a normal alphanumeric string and a pattern string. the pattern string can be composed by alphanumeric chars plus the char "?" ...
3
votes
4answers
169 views

Selecting a CPU or microcontroller needed for a given software application?

Say I had a software algorithm (for example, an FFT), and I need it to process (n) amounts of data in (t) milliseconds. This is a real-time task written in C. There are a lot of CPUs out there, and ...
0
votes
0answers
14 views

Extract the main entity from a body of text for text categorisation?

I'm trying to categorise products based on various fields of data. I've had some success just matching search terms in the product names, but this naive approach doesn't work when it comes to larger ...
3
votes
3answers
189 views

Method for determining if a line segment is an external edge of a Delauney triangulation?

I've created a Delauney triangulation of a set of points. Now I want to iterate over the triangulation and remove any line segments/edges on the exterior for which the following are true: The ...
8
votes
2answers
2k views

Name of the Countdown Numbers round problem - and algorithmic solutions?

For the non-Brits in the audience, there's a segment of a daytime game-show where contestants have a set of 6 numbers and a randomly generated target number. They have to reach the target number using ...
0
votes
1answer
74 views

Create arithmetic expression from number using +-/* that equals target [duplicate]

For example, you are given the source 1234 and the target 24. The task is to use the standard arithmetic operators +-/* placed within source, without changing the order of the digits of source to ...
0
votes
1answer
23 views

Implementing CMA-ES

I am attempting to implement the CMA-ES optimization algorithm in my favorite language (using the example code here as a guideline), but I need help solving a problem I am having. To test the ...
-2
votes
1answer
33 views

Considerations when making data structure and algorithm choices [on hold]

What are some reasons you may choose a worse runtime algorithm? And what are some advantages of a linked list vs a hash table/array where access is constant time.
-4
votes
0answers
17 views

Getting directions using my own voice samples regarding a gpx track [on hold]

My goal is to create an app in android that loads a gpx track Compares my gps position to the track and gives me directions using my own voice (samples) as in Go to the right soon Go to the left ...
30
votes
8answers
20k views

What methods are there to avoid a stack overflow in a recursive algorithm?

Question What are the possible ways to solve a stack overflow caused by an recursive algorithm? Example I'm trying to solve Project Euler problem 14 and decided to try it with a recursive ...
2
votes
1answer
120 views

Word game algorithm

Back in the days of 8-bit machines there existed an educational word game. I have no idea what it was actually called but for the sake of this question (since it involves pyramids) let's call it ...
7
votes
3answers
240 views

Generate equally sized areas in polygon

I am looking for a pseudo code logic that would find n equally sized areas in a given polygon. No space should be between or outside the matched areas. First valid match of areas should be returned. ...
4
votes
1answer
153 views

Detecting surface faces of a huge 3D mesh/grid

I've written a module in my application that creates a mesh from existing coordinate and face data. The number of vertices in the mesh could easily exceed 10 million and the same goes for the faces. ...
3
votes
4answers
320 views

Which algorithm is performant for matrix multiplication of 4x4 matrices of affine transformations

I am wondering what is a good, performant algorithm for matrix multiplication of 4x4 matrices. I am implementing some affine transformations and I am aware that there are several algorithms for ...
13
votes
2answers
1k views

How did Strassen come up with his matrix multiplication method?

The famous Strassen's matrix multiplication algorithm is a real treat for us, as it reduces the time complexity from the traditional O(n3) to O(n2.8). But of all the resources I have gone through, ...
1
vote
0answers
41 views

Find minimum number of steps to a goal without estimator for how close intermediate steps are to the goal

I've been trying to find a good way of solving the following problem, but I'm not sure how to even frame it. I think there might be relatively well-known solutions I'm not familiar with, since I don't ...
5
votes
6answers
391 views

Algorithm for determining transactions among weekly data series?

I'm trying to develop a small reporting tool (with sqlite backend). I can best describe this tool as a "transaction" ledger. What I'm trying to do is keep track of "transactions" from weekly data ...
8
votes
2answers
2k views

What are algorithmic paradigms?

We generally talk about paradigms of programming as functional, procedural, object oriented, imperative etc but what should I reply when I am asked the paradigms of algorithms? For example are ...
-1
votes
0answers
40 views

How does Microsoft's Cortana or Apple's Siri map inputs to actions [closed]

I was wondering what method Cortana, Siri, and similar software use to map user input to an action (e.g. show the weather or create a remainder). I don't care about speech to text software, I don't ...
33
votes
8answers
13k views

When to use DAG (Directed Acyclic Graph) in programming?

I recently found a framework named ecto. In this framework, a basic component named "plasm", which is the ecto Directed Acyclic Graph.In ecto, plasm can be operated by ecto scheduler. I am ...
0
votes
1answer
104 views

Finite Element Shader

I am working on a geometric wrapper for a space jet exhaust impingement solver. A key part of the solution is determining what the jet can "see" and therefore hit. My model is grouped with nodes or ...
1
vote
1answer
272 views

Generating combinations algorithmically

Suppose I have an n-high pyramid of numbers like: 1 5 8 2 5 4 8 9 3 1 2 8 3 7 2 How can I algorithmically walk through every possible path from the top of the pyramid to the bottom? To ...
3
votes
1answer
228 views

Image segmentation - show or hide clusters

I'm trying to make a small program in c#, that will downsample image to specified amount of colors (using K-means). Then, user will be able to hide\show colored areas(clusters) in image. I've ...
20
votes
3answers
13k views

What does it mean to say an algorithm is Sound and Complete?

I heard different interpretations of sound and complete. I understand that completeness means finding a solution if there is one. What does it mean to say an algorithm is sound. What does it mean ...
6
votes
2answers
192 views

Efficient algorithm to merge n successive sorted arrays in place

I am developing an in-place sorting algorithm that leaves the array into a state where it is basically a succession of sorted subsequences of any size (most are bigger than log2(size(array))); then it ...
2
votes
0answers
34 views

Polygon simplification that encloses original set of points

I have been trying to implement an optimization for 2D sprite rendering to fight the problem of limited fillrate on mobile devices. The idea is to render textured polygons instead of quads that will ...
1
vote
1answer
50 views

Find all paths in a tree type of structure

The language I am using is C#, but I am looking more for help with the algorithm more than I am concerned with which language. I have been trying to develop this algorithm for a while now and I can't ...
31
votes
9answers
6k views

Is the algorithm more important than the programming language?

During the current (2013) Google Code Jam contest, there was a problem that took C++ and Java people 200+ lines of code as compared to Python people that solved the same problem only using 40 lines of ...
0
votes
2answers
107 views

How to approach hours forecasting

I have a django web app and I basically need to forecast budgeted hours for 2 departments to help them schedule staff as currently the best they can do is just wing it. When we receive a job proposal ...
-3
votes
1answer
70 views

How are things like lists allocated in memory? [closed]

When I read about amortized analysis it mentions how when a list is full it has to re-allocate a list of even bigger size and copy all the elements over. My questions: Where is the list stored in ...
1
vote
1answer
284 views

Split multiple overlapping intervals to non overlapping intervals

currently I try to build an algorithm to split an array of overlapping intervals to a new array with non overlapping intervals. For example: Array of overlapping intervals: [ {0,7}, {8,12}, ...
2
votes
1answer
66 views

Divide the world map into fixed sized blocks

I am developing an app where I need to divide the entire world map into fixed sized square blocks. For simplicity, think of it as a problem of dividing the google maps into a fixed sized block. I can ...
0
votes
3answers
134 views

Balanced folder increment

I want to map an integer (let's say 32bits) to a valid path. The integer is an autoincrement value stored in the database. I also don't want at any case any folder to have more than N subfolders. ...
2
votes
1answer
92 views

Burrows-Wheeler transform backward search: how to find suffix index?

BWT backward search algorithm is pretty straightforward if we only need the multiplicity of a pattern. However I also need to find the suffix indices (i.e. positions in the reference string where a ...
3
votes
1answer
85 views

Prorating a license (its expiry) dependent on feature add-ons

I've ran into a problem trying to calculate prorating of a service. Hoping to get some help/hint from the community. I apologize if this isn't the right place to ask this question - will appreciate ...
1
vote
1answer
190 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 ...
3
votes
2answers
787 views

What does 'upper bound' mean in context of BigO?

My computer science teacher says Big O has an upper bound but no lower bound. When I look at a graph of an algorithm mapped out using BigO though, there isn't an upper bound at all. The upper limit ...
-1
votes
2answers
222 views

Programming judge with versus system [closed]

I'm looking for a programming judge system which supports putting contestants programs against each other in "matches". The format could be either for example a tournament style or chess ranking, but ...
4
votes
1answer
53 views

Finding similar high dimensional vectors

I have two lists (sizes m and n) containing high dimensional bit-vectors. All vectors have the same number of dimensions and use Hamming distance as measure if distance. For each element in the first ...
15
votes
10answers
41k views

Difference between a pseudo code and algorithm?

Technically, Is there a difference between these two words or can we use them interchangeably? Both of them more or less describe the logical sequence of steps that follow in solving a problem. ain't ...
0
votes
2answers
146 views

Optimization problem where to start, what algorithms to use? [closed]

I have an optimization problem and I was wondering where to start from to be able resolve it. I think it can be solved with an NP-complete algorithm but I am not sure where to start from. The problem ...
2
votes
2answers
70 views

Retrieving an incorrectly stored tree data structure

Way back in the hazy origins of our platform it was decided that we were going to need some hierarchical data structures stored in the RDBMS. The relationships between nodes were stored via a ...
2
votes
1answer
105 views

Improving sampling algorithm

I am having a bit of trouble designing a new feature at the moment. It is part of a resource management system. I was wondering if anyone has experience doing anything similar. I'll try to explain: ...
4
votes
1answer
126 views

Name-Based Sorting Algorithms For Maximized Common Letters

I am attempting to write a program for a competition (we're allowed to consult Stack Exchange, as long as I'm not given physical code) that takes in a list of 5000 people's names (distributed fairly ...
-1
votes
2answers
319 views

Worth of Algorithm Challenges and event? [closed]

I'm interested in knowing whether it is advisable for computer science students to spend their major chunk of time on the online judges practising programming(like Topcoder and codeforces) or it's ...
4
votes
1answer
2k views

What types of programming contest problems are there? [closed]

Basically, I want to make a great reference for use with programming contests that would have all of the algorithms that I can put together that I would need during a contest as well as sample useage ...
0
votes
1answer
200 views

Laravel Algorithm for taxi app

I am trying to write a backend for a taxi service (university assignment) and I am stuck on the algorithm. whenever a new client posts a request, all the taxi drivers nearby get an email notification ...