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
1answer
68 views

Separating signal chunks, better algorithm desired

This is my current challenge. I am looking for a good algorithm. http://i.stack.imgur.com/Q6b9z.gif from 0 to about 1480 you have values below 100. My goal is to separate those two big areas of ...
1
vote
1answer
35 views

Name of this algorithm (Create binary image)

Some days ago I saw in this site the algorithm below to convert color images to binary images and I used it in my application (with some small changes). However, I need to know what is the name of the ...
2
votes
4answers
180 views

Find the count of each word in a string

I am in a search of a better performant algorithm to implement a program, to find the count of each word in a sentence i.e.., a String in the programming sense. I know my algorithm is too basic and ...
1
vote
0answers
78 views

simple 'defrag' logic that minimizes changes?

edit: so clearly I didn't explain this well, so let me try again with examples. I have a 'pipe' of a given size with signals routed through it at given offsets. The pipe can get fragmented with ...
9
votes
1answer
218 views

What algorithms are there for picking colors for plot lines on graphs?

I'm interested in what algorithms or rules I can programmatically implement to generate RGB or HSV colors for plotlines to keep them visually distinct from the neighbors. I know that in professional ...
-3
votes
2answers
103 views

How would you approach this Domino problem? [closed]

This is a problem from an algorithmic competition from a few years back. It has a very simple description, but I don't see any algorithm to solve it efficiently. I am not looking for an ...
-5
votes
0answers
64 views

Algorithm in Programming Languages [closed]

I just want to learn All the algorithms from the basic. So, Can anyone suggest me the link to get better understanding of the every algorithms.. and I also need clear some Mathematical terms in the ...
1
vote
1answer
151 views

How does Jump Point Search algorithm work and why is it so efficient?

While trying out the below applet, I saw that this path finding algorithm called Jump Point Search yields significantly faster result than A* and Dijkstra. ...
-6
votes
0answers
47 views

what is a possible algo used here? [closed]

An array whose result after two passes of the sorting is as given below: 5,6,7,12,11,10,19,20 which is the possible sorting algo? a)bubble sort b)selection sort c)insertion sort
1
vote
0answers
142 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 ...
0
votes
1answer
71 views

Defining a status between last check and now

I have sets of probing data from an internal monitoring tool which represent the availability of different services (databases, webservices and so on). Now my task is to visualize this data and I ...
3
votes
0answers
97 views

Suitable algorithm for joining records from multiple databases

I am in the process of writing a library that is used to be able to access data from a database. The library requires the initial definition of all the tables that the application will be using in the ...
-3
votes
0answers
23 views

best algorithm to retrieve relationship between each two XML consecutive elements

what's the best algorithm that identifies the relationship between each two consecutive elements throughout the reading of the XML file. and What's the suitable XML Java API to do this algorithm ...
-2
votes
0answers
59 views

Subset Sum Problem [closed]

I want to solve this problem about subset sum, but I can't solve it. The first number is the target value and the reminder of the numbers. For example, the following inputs should yield the ...
5
votes
4answers
174 views

Find the peak of each islands in sparse matrix

I have a sparse matrix that contains several islands of unknown size. I would like to find the highest peak of each islands. Consider this matrix as an example: 0 0 1 0 0 0 0 0 0 1 2 1 0 0 0 0 0 3 2 ...
1
vote
1answer
196 views

What is the time complexity of the algorithm to check if a number is prime?

What is the time complexity of the algorithm to check if a number is prime? This is the algorithm : bool isPrime(int number){ if(number < 2) return false; if(number == 2) return true; if(number ...
-3
votes
0answers
166 views

Simple Algorithmic Interview questions? [closed]

I will be taking some interviews for an intern position. And it will be a telephonic phone screen for around 45 minutes. So I am looking for some simple algorithmic interview questions that I can ask ...
-1
votes
0answers
48 views

Downsides to locality-sensitive-hashing in machine learning applications

I have a large, running corpus of data (comprised of the positions of 10 objects in 2-dimensional space) that I would like to use for machine learning. To do this, I want to group those vectors into ...
0
votes
1answer
102 views

Priority queue for Kruskal's algorithm with running time O(E lg V)

I'm reviewing my notes on Kruskal's algorithm and have a question about getting the runtime down to O(E lg V). By using a PQ with edges and a boolean array of which vertices we have added to our tree ...
-3
votes
0answers
101 views

The best sequential algorithm may not be the best parallel algorithm [closed]

I have read somwhere : "The best sequential algorithm may not be the best parallel algorithm." Is this true? Examples?
0
votes
0answers
67 views

What data structure is suitable for implementing dynamic huffman encoding and decoding on a piece of text?

Some pseudo code or resources will be appreciated.I was thinking if implementing it in form of a BST stored in an array. However,not all operations can be performed easily using this approach. I am ...
18
votes
3answers
1k views

Divide and Conquer algorithms – Why not split in more parts than two?

In divide and conquer algorithms such as quicksort and mergesort, the input is usually (at least in introductory texts) split in two, and the two smaller data sets are then dealt with recursively. It ...
1
vote
1answer
173 views

Why are there non-decidable languages? Can anyone explain me my book's solution?

Well in my book it is says that "there are non-decidable languages" And the proof is: Every algorithm is a word. Then there are only countable algorithms. But there are uncountable languages and ...
2
votes
1answer
96 views

Given a situation, and some conditions, verify is that situation is possible

Well it's a problem me and my friend had thought of, and well, haven't come up with anything to solve the following problem(I'll try to phrase it in the best way I can): Given that there are n ...
3
votes
4answers
279 views

Retrieving maximum value from a range in unsorted array

I have an unsorted array. I have queries in which I give a range and then the maximum value from that range has to returned. For example: array[]={23,17,9,45,78,2,4,6,90,1}; query(both inclusive): 2 ...
-1
votes
1answer
41 views

Algorithm to evaluate/select best choice

I have a set of generic product features/attributes defining a set of functionality requirements (my “wants/needs"). Any number of available products potentially satisfy my requirements at some ...
2
votes
3answers
133 views

How can you prove an acyclic graph has n-1 edges? [closed]

I'm not so hot on the maths for this but for what I understand... A graph g exists with v vertices and edges. g = (V,E); The spanning graph for this is an acyclic copy of this where all the vertices ...
0
votes
0answers
50 views

does a modern software developer need to know algorithms really in deep? [duplicate]

Nowadays, we need to APPLY the knowledge to know the fastest algorithm for some particular problems. Devs don't have to know how algorithms work - they only know : 1.what task the algorithm is good ...
0
votes
0answers
69 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
1answer
116 views

Quicksort and middle pivot

I am having a head ache understanding quicksort with middle pivot. I found lot of explanations about using left most or right most, but not many about a middle one. Can I safely assume these?: If ...
2
votes
1answer
65 views

Algorithm/Strategy or Data structure to capture priorities sub priorities in an app

I am working on a CMS that is starting to evolve a bit. We started off with content that had the following priorities ( columnn in the db on the content table): HIGH MED LOW. Data was fetched by ...
0
votes
0answers
39 views

Using Magma programming language, how can we write (fxg)/40320 [closed]

R:=IntegerRing(9); S:=PolynomialRing(R,5); S:=PolynomialRing(R,5); f:=y-8; g:=x^2+z^2+t^2; I would like to write (fxg)/40320 I have already tried the following f*g/40320, f*g div 40320, ...
2
votes
3answers
99 views

What kind of algorithm could be used to produce an ordering which maximizes # of satisfied 'less than' constraints?

Let's say I have a set of items {e1, e2, ..., en}, and I also have a set of constraints {c1, c2, ..., cm}, with ci := ej appears before ek, for some j and k. I want to produce an ordering of my items ...
0
votes
2answers
229 views

Can an 81 digit number generator lead to copyright infringement? [closed]

I'm looking to write a program that will generate valid sudoku puzzles. Essentially, a sudoku puzzle is just an 81 digit number. (The blanks are zeroes.) I would then like to use these puzzles in an ...
-2
votes
2answers
103 views

Hard time implementing own merge sort [closed]

I'm a first year CS student and we recently were introduced to a few sorting algorithms and big O notation. The sorting algorithms we were specifically introduced to were insertion sort, selection ...
2
votes
2answers
174 views

Transform math formula into code (line-line intersection)

I'm having hard times transforming a math formula to code. I can solve it on the paper easily, but it's hard for me to bring it into code form. Is it generally possible to bring a math formula ...
23
votes
8answers
2k 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 ...
1
vote
1answer
175 views

Puzzle solving: Minimum number of steps to achieve a goal

I have been doing some programming contest problems, and I have noticed that many of them involve something along the lines of "get the minimum number of steps necessary to achieve a certain goal". ...
1
vote
4answers
263 views

Approach to simplifying an algorithm

For completely random reasons*, I wrote some code that calculates and displays the following expression: P=1*(2+2)(3+3+3)(4+4+4+4)..(n+n...… Which is equivalent to (n!)^2 The version I wrote ...
10
votes
7answers
556 views

Generating random math expression

I have this idea running around in my head, to generate and evaluate random mathematical expressions. So, I decided to give it a shot and elaborate an algorithm, before coding it to test it. Example: ...
0
votes
2answers
133 views

What is the best programming language to do crypto running time measurement? [closed]

I am trying to measure the running time of different crypto algorithm. e.g. how long it takes to encrypt/decrypt a block of plaintext. May I ask if C with OpenSSL is the best PL to do this?
0
votes
1answer
210 views

Creating alien symbols or signs that look natural [closed]

I was reading some Cthulhu Mythos stuff and started to think about those various signs and symbols that are used in the texts. Of course those are made by humans but point is that they look natural to ...
0
votes
2answers
105 views

How can I compute maximal area including only given integer pairs of (x,y) coordinates?

The values ​​of a function of two variables z = f (x, y), where x, y, z take integer values are stored in sql db. Calculate (appoint) the largest surface area of ​​the flat. By 'flat area' we mean an ...
8
votes
1answer
277 views

Does any know of a Algorithm that allows for a figure like this image?

Does anyone know how to create an algorithm capable of making the figure just like in the picture, when given a set of specific points (3D array)
1
vote
2answers
308 views

Can we create a program that writes out its source code?

Can we create a program that print out its source code what if we (or the program itself) compile than the new program would have the same exact functionality what the original program has? So somehow ...
0
votes
4answers
225 views

What does it mean to perform an operation “In Place” for Interpreted Languages?

Programming question: Reverse words in a string (words are separated by one or more spaces). Now do it in-place. What does "in-place" mean in the above context for an interpreted language ...
3
votes
4answers
300 views

How to determine most challenging test-cases to test any algorithm?

While solving any problem, we write algorithms. Some efficient, some not, some work, some fail. But sometimes we end up writing something which is mostly a success when we do a dry test run, perhaps, ...
0
votes
0answers
24 views

What is the formal name of the 'KeyTips' on ribbon framework and 'link-hints' mode in vimium? What are the algorithms used in it?

What is the formal name of the KeyTips on ribbon framework and link-hints mode in vimium? I sometimes assume that the key sequences are generated using some sort of brute-force algorithm. Are there ...
1
vote
1answer
93 views

finds all possible permutations of a certain numbers of distinct digits

I am stuck on the following problem. I want to find an algorithm that finds all possible permutations of a certain numbers of distinct digits and then put them in a large matrix for instance. For ...
0
votes
2answers
183 views

How to find local maxima in matrices?

I need to develop an algorithm for finding all the local maxima in a two-dimensional array: how to search for local maxima in the the most efficient way? Are there algorithms about it? Moreover, the ...

1 2 3 4 5 14