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)

5
votes
1answer
517 views

Algorithm for perfect non-binary graph layout

I have a complex non-binary graph model. Each tree node can have multiple children&parents (a node can also have a connection to it's "brother"). A node is represented as square on screen with ...
2
votes
4answers
1k views

Resources for learning common algorithms by Lisp [closed]

Many books about algorithms and data structures are coded by imperative languages. Is there any book that can show functional programming languages can do the same thing or do them better? In ...
1
vote
1answer
2k views

Web Development Algorithms

While searching for jobs online I noticed that most PHP web developer jobs ask you to know about algorithms and data structures.While I don't know PHP yet I have started to learn it in order to obtain ...
14
votes
6answers
3k views

It takes me hours to completely understand solutions to 1000-pt problems on TopCoder. Should I get discouraged? [closed]

Sometimes this applies to the 500-pt ones too. I sometimes start feeling I will never improve enough to code them with ease like the others. Should I just quit? If not, why? It is extremely annoying, ...
1
vote
3answers
288 views

When checking for transposed day and month values between two Dates - should comparing 11/11/2000 and 11/11/2000 return true or false?

Assuming a function with a signature of boolean isTransposed(Date date1, Date date2); Example outcomes: date1 date2 Outcome 06/02/2000 02/06/2000 true 02/06/2000 06/02/2000 true ...
1
vote
2answers
694 views

In order traversal of M way Trees

If we have a 4 way tree such as the one shown below, and we do an in order traversal, what would the output of the in-order traversal be for an M-way tree? In which order would the nodes be visited? ...
2
votes
2answers
532 views

What maths should I learn to become a better computer scientist? [closed]

I'm a self taught programmer, and although I know many people feel math isn't necessary, I find that in many examples of algorithms I come across talk about (what sounds to be) some pretty complex ...
3
votes
2answers
193 views

Do Databases Optimize Queries with Sum/Average or Other Aggregates?

Imagine a database that has billions of rows with, say, payments. You need to calculate an average payment sum. That will be SELECT avg(amount) FROM payments; Now, if you need to re-calculate this ...
7
votes
11answers
2k views

Is Object Oriented stuff really that important? [closed]

For years, I have been doing Algorithmic stuff, writing scalable data structures for internet search, for example Randomized Binary Search Trees for Auto Recommendation, BitMaps, Wisdom of Crowd based ...
7
votes
12answers
1k views

How close have we gotten to automating code writing? [closed]

And I don't mean Autocomplete or automatic code snippets as inserted by modern day editors, or polymorphic code. But what is the state-of-the-art in programs that can go through given inputs and types ...
0
votes
1answer
242 views

How important is maths depending on what your coding? [duplicate]

Possible Duplicate: What does mathematics have to do with programming? How often do you have to solve pure mathematical or algorithmical problems? I heard that math can be very important in ...
0
votes
1answer
533 views

Why can't an AVL tree be recreated using pre-order traversal?

Given a binary search tree, I understand why I can use breadth-first and pre-order traversal to list the entries of the tree in such a way as to reconstruct the tree in the order in which its ...
5
votes
1answer
166 views

Use of a profiler tool to aid in the analysis of a brute force algorithm in Java

I was asked to profile (using some tool, such as YourKit or JVisualVM) a couple of implementations of the Traveling Salesman Problem (find the minimum path that visits all the given set of cities), in ...
0
votes
3answers
821 views

Program/library to match string patterns [closed]

I've city names, like Newyork. Somebody may misspell it and write it as Newyoork. I want an algorithm or library which can match such patterns with some confidence level. Any idea how to do it or if ...
31
votes
2answers
14k views

Best practice/Patterns for two way data synchronisation

Quite often in my work the idea of 2-way data synchronisation between database systems crops up. The classic example is two slightly different CRM systems (say, Raiser's Edge and Salesforce) and the ...
1
vote
2answers
999 views

What are the most known arbitrary precision arithmetic implementation approaches?

I'm going to write a class library for .NET which provide an implementation of arbitrary precision arithmetic for integer, rational and maybe complex numbers. What best known approaches should I ...
13
votes
10answers
834 views

In what areas of programming is algorithm run time actually an important issue?

Sometimes I hear people say that because of the speed of processors and the amount of memory available, algorithm efficiency and runtime aren't, in practice, of major concern. But I imagine there ...
4
votes
1answer
330 views

Website with test data files for specific algorithms/data structures?

Is there any website, like SPOJ and Project Euler, with the test data files available for specific algorithms/data structures? I know it's a fun challenge to solve those problems on your own, but I ...
3
votes
2answers
864 views

Product classifying algorithm - text classification - C# - algorithm suggestions

Alright people. Finally with the help of stackoverflow community i have gathered 20 commercial product selling websites product pages with the following features Product URL Product Price Product ...
4
votes
3answers
961 views

What function or method can I use to equally distribute a workload

This is more of mathematical question than an algorithmic one; nevertheless it will be implemented in php. I have an array of N tasks. Each task has taken t time to complete(e.g. task 1 has taken 5 ...
1
vote
1answer
323 views

Need suggestion for Mutiple Windows application design

This was previously posted in StackOverflow, I just moved to here... I am using VS2008, MVVM, WPF, Prism to make a mutiple window CRM Application. I am using MidWinow in my MainWindow, I want Any ...
8
votes
5answers
6k views

How can I extract words from a sentence and determine what part of speech each is? [closed]

I want to write something that takes a sentence and identifies each word it contains and defines what part of speech each word is. For example Hello World, I am a sentence would return this ...
7
votes
1answer
419 views

How do I efficiently store all OpenStreetMap data in an indexed way?

I have a PBF file that contains the following information about a country: Nodes, each with their own longitude, latitude and properties; used to store points in a 2D space. Ways, each with their ...
1
vote
1answer
345 views

Need help with algorithm for sorting list

The answer is probably obvious but not to me at this moment, so I was wondering if somebody who is better with sorting algorithms can help lead me in the right direction. This is not homework, I am ...
34
votes
13answers
4k 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 ...
2
votes
1answer
438 views

Is the Leptonica implementation of 'Modified Median Cut' not using the median at all?

I'm playing around a bit with image processing and decided to read up on how color quantization worked and after a bit of reading I found the Modified Median Cut Quantization algorithm. I've been ...
2
votes
1answer
367 views

What is O(…) and how do I calculate it? [closed]

Possible Duplicate: Plain English explanation of Big O I've seen some questions here and on SO talking about the most efficient way to find or sort this or that. The questions usually talk ...
3
votes
2answers
2k views

Drawing Ellipse from a bounding box?

Does anyone know a good algorithm for drawing an ellipse from a bounding box? draw_ellipse(int s1, int s2, int s3, int s4, color c); I don't need something optimized to incomprehendable , ...
3
votes
4answers
516 views

Search algorithm with co-ordinate (x,y) hints?

I am about to start writing a UI view where many small text items are laid-out over the view and when the user hovers over a text item a dynamically-generated image is displayed (like a tooltip), ...
2
votes
5answers
446 views

Website Country Detection

I have a web crawler, and I'm looking for hints that will help me automatically detect a website country of origin. And by country of origin I generally mean the country the website is targeting. For ...
8
votes
1answer
801 views

What's the best way to learn nature-inspired algorithms? [closed]

I completed the Machine Learning course (Stanford) and got very interested, also after some research, I decided that I'd like to learn nature-inspired algorithms. I've found some resources like: ...
13
votes
3answers
7k views

Efficient graph clustering algorithm

I'm looking for an efficient algorithm to find clusters on a large graph (It has approximately 5000 vertices and 10000 edges). So far I am using the Girvan–Newman algorithm implemented in the JUNG ...
8
votes
1answer
359 views

Why is a Bayes classifier used for spam filtering?

I've been reading about Bayesian spam filtering and I think I understand the theory, but I just don't see why this approach is needed in order to calculate the likelihood of a message being spam, ...
8
votes
3answers
3k views

what techniques can be used to implement Facebook's People You May Know feature? [closed]

I'm curious to learn from a technical perspective what techniques can be used to make recommendations for e.g. Facebook's "People You May Know" (what algorithm do they use, etc.)? One of the things ...
8
votes
3answers
655 views

Is there a general method to evaluate the optimality of an optimization algorithm?

is there a general method to evaluate the optimality of an optimization algorithm, for example an algorithm solving an otherwise NP-hard or NP-complete problem? The only method I came up so far is ...
4
votes
6answers
3k views

Find all points within a certain distance of each other?

Let's say, we have... 50k points randomly allocated in 3D space, according to some volumetric function, so that in some parts of the space, points are closer together, but in other parts, they are ...
3
votes
2answers
357 views

Help on a Dynamic Programming definition in Cormen

I am reading about Dynamic Programming from Cormen. In the beginning of the chapter it says (relating to the term Dynamic Programming): "Programming” in this context refers to a tabular method, ...
4
votes
4answers
258 views

Simulating/developing_a_testing_strategy for factors that might cause the same algorithm to produce different results in Distributed Systems

This is a Purely Academic Question Context: I am working with some algorithms which are meant to arrive at a consensus in distributed systems. I intended to tackle Byzantine faults with these ...
5
votes
1answer
1k views

How to find Sub-trees in non-binary tree

I have a non-binary tree. I want to find all "sub-trees" that are connected to root. Sub-tree is a a link group of tree nodes. every group is colored in it's own color. What would be be the ...
2
votes
3answers
873 views

Algorithmic problem: Picking Cards

The problem below appeared on the last Code Sprint 2 programming competition (it's over already). The base cases are clear, but developing an algorithm that solves all possible cases has been a ...
7
votes
5answers
10k views

How to handle large numbers?

Well, I've just started doing puzzles and it's so annoying to see puzzles which are easy to do but also need to handle very large numbers. That's the problem. Say I have to deal with numbers like 10 ...
12
votes
7answers
15k views

Sort algorithms that work on large amount of data

I am looking for sorting algorithms that can work on a large amount of data, i.e. that can work even when the whole data set cannot be held in main memory at once. The only candidate that I have ...
6
votes
4answers
3k views

Smallest lexicographical rotation of a string using suffix arrays in O(n)

I will quote the problem from ACM 2003: Consider a string of length n (1 <= n <= 100000). Determine its minimum lexicographic rotation. For example, the rotations of the string “alabala” ...
0
votes
1answer
2k views

How Find operation works in a Binary Tree?

I am having a confusion in this Binary Tree Coding. I know the concept of binary tree and I know how those work and all, but in this source code i am confused with "Find" operation. I cannot ...
9
votes
6answers
603 views

Examples of general purpose algorithms that have benefited from running on a GPU? [closed]

I am looking for examples of general purpose algorithms (meaning non-graphics related) that have been proven to run an order of magnitude faster on a GPU than on a CPU. I will use these examples to ...
6
votes
3answers
1k views

Work load balance/Task distribution algorithm

I'm looking for an algorithm to either use or as a jump point for load balancing. Environment: We have ~7 job types that can be scheduled at any time by our users. Some jobs are fast, others are ...
2
votes
2answers
333 views

Concurrent Data Processing by Multiple People

Let's say I have a page, accessible by several people concurrently, that lists information that must be processed in some way by the user, after which it is either marked as "completed" and ...
4
votes
2answers
2k views

InterviewStreet (Vertical Sticks) just a tip where to get started

Having a lot of trouble with this question in interviewstreet.com: Given array of integers Y=y1,...,yn, we have n line segments such that endpoints of segment i are (i, 0) and (i, yi). Imagine that ...
1
vote
3answers
1k views

What visualization method would you recommend for event driven programs?

What visualization method would you recommend for event driven programs? Are there industry standard diagrams, such as flowcharts?
4
votes
4answers
433 views

Building a route creator

Ok, already up front, I'm going to tell you, that this is a bonus task for Data structure course I'm taking. That should take care of all the questions whether or not this is for a homework. Route ...