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
259 views

Will interns and entry level positions care more about algorithms or projects/experience [closed]

I am 3 months into learning java, read head first java and made 4 things on my github + many small things. I also started learning android this month, but now am tossing and turning not knowing my ...
2
votes
1answer
154 views

Fully Stable, In-Place Unique Algorithm in O(n)

Is there an algorithm that, given a sorted array, swaps all the first unique elements to the beginning of the array and the duplicates to the end, while remaining stable for both the unique subarray ...
4
votes
3answers
337 views

Optimal “if-else” tree algorithm to minimize duplicate code

I'm having trouble formulating this problem as an algorithm: I have a set of conditionals (combined with &&) and operations, for example: if (A && B) execute C else if (D ...
5
votes
1answer
423 views

Using std::sort et al. with user-defined comparison routine

In the evaluator of a custom language, I would like to replace our own sort routines with std::sort or other routines, possibly tbb::parallel_sort. The problem is that we allow users of the language ...
2
votes
1answer
151 views

Implementation of chess endgame engine without Endgame Tablebases

I'm interested in creating an chess endgame solving engine. The endgames in chess are usually solved using the endgame table-bases generated by retrograde algorithm. I have found that Artificial ...
0
votes
0answers
43 views

Designing online exam [duplicate]

I need to design an online exam server for an exam like GRE in which question difficulty increases if you answer correctly and decreases if you answer wrong. Questions are multiple choice ...
0
votes
1answer
168 views

Designing online exam

I need to design an online exam server for an exam like GRE in which question difficulty increases if you answer correctly and decreases if you answer wrong. Questions are multiple choice ...
4
votes
4answers
243 views

Implementation of algorithm to generate chess positions

I am interested in developing a program that generates an endgame table-base for the chess. I have gone through the technical papers of the greats like Shannon and Ken Thompson. I have found that ...
1
vote
1answer
114 views

Minimax in a bayesian game with multiple players who do not play in order

Premise: I know that such a game would be better solved by MCTS, however, from a theoretical point of view, would it be possible to apply minimax to a bayesian multiplayer game where the order of ...
1
vote
1answer
72 views

What HTTP status codes need to be checked for this network task to perform smoothly?

My office department logs in to the ISP Server through a keep-alive-browser login page. This, for better performance, is encapsulated in to a small python script. This is what it does (Pseudo code) ...
3
votes
1answer
82 views

Algorithm that determines relevant attributes in ordered list

Suppose I have a list of objects sorted by a person based on that person's subjective taste. Let's assume that this person is being somewhat consistent in their sorting and that there are quantifiable ...
2
votes
2answers
183 views

Algorithm to find times when resources are available

I'm writing a semi-automatic scheduling application. Given some existing bookings and some resource requirements, it needs to find the times at which a new event can be scheduled. A human user will ...
-2
votes
2answers
93 views

Should I get a patent before asking for help in development [closed]

Should I get a patent before asking for help in development? I think I have a great idea but don't have the technical know-how to proceed. Simply don't wish to give away my idea
2
votes
1answer
102 views

How to know, with good performance, which areas a certain point is in? [duplicate]

I'm interested in build a prototype that needs this sort of thing: Point A (xa, ya) with a radius of 500 meters. Point B (xb, yb) with a radius of 700 meters. Point C (xc, yc) with a radius of 1200 ...
2
votes
2answers
206 views

What kind of transform is this?

I have a function that linearly "remaps" a value from a given interval to an other interval? The function remaps a value from a given interval [oldMin, oldMax] to another interval [newMin, newMax] ...
15
votes
2answers
466 views

Algorithm for fast tag search

The problem is the following. There's a set of simple entities E, each one having a set of tags T attached. Each entity might have an arbitrary number of tags. Total number of entities is near 100 ...
2
votes
2answers
177 views

Graph traversal and filtering in indoor navigation and path finding

Which of the following options take less processing time/is less expensive in a graph traversal algorithm for a (indoor)navigation system? a) To produce all possible paths between start and ...
0
votes
1answer
95 views

fill containers with blocks of different sizes to have containers of “similar” sizes [closed]

I have a sorted list of blocks L that I want to put in 4 containers C, the containers have a size limit S. I want to have similar containers height, by similar I mean the size variance should be as ...
0
votes
1answer
515 views

Guidance on Excel VBA resource scheduling algorithm?

This was posted originally at StackOverflow though suggested to post here instead. I am looking to create an Excel VBA solution that will create a rota/schedule allocating staff to service users ...
2
votes
4answers
322 views

Is there any sorting algorithm which is not inherently sequential and is task distributable?

After googling for a couple hours, I came to a conclusion that all sorting algorithms are inherently sequential which can be data distributed but not task distributable. Is there any algorithm which ...
6
votes
3answers
229 views

Unit (regression) testing scientific algorithms given floating point behavior

I have been working on a project and running into a very difficult problem. The problem can be stated simply as how to unit-test numerical algorithms. However if you just took this simple statement ...
2
votes
1answer
136 views

Cohen–Sutherland algorithm

I was reading Cohen–Sutherland algorithm on Wikipedia and I am confused in these two parts, int ComputeOutCode(double x, double y) { ... if (x < xmin) code |= LEFT; else if (x ...
6
votes
3answers
1k views

Why Big Data Needs To Be Functional?

I started working on a new project lately related to Big Data for my internship. My managers recommended to start learning functional programming (They highly recommended Scala). I had a humbled ...
0
votes
2answers
119 views

finding patterns into logs

I am trying to put together a way to figure out if incidents occurred based on log content. Typically, on log (or db table) would contain a list of transactions composed as follow: {Timestamp} ...
5
votes
4answers
368 views

How are algorithms developed? [closed]

I'm impressed with the efficiency of some algorithms and I noticed the way the problem is solved can be and/or appear really unintuitive. It may sound dumb, but I would like to know: How do the ...
2
votes
3answers
727 views

Sorting an array of numbers with decimal places

Suppose I have an array of float values in the following format: { 1.34, 1.15, 1.1, 1.2, 1.26, 1.10, 1.20, 1.17 } Suppose they have been provided by user input (or some other mechanism), where the ...
0
votes
0answers
98 views

How to algorithmically add notes to an existing midi file relative to positions of existing notes in python

I have a midi file that I'd like to algorithmically add notes to relative to other notes that already exist in the midi file using python, or if it's easier using a different language I'm open to that ...
1
vote
1answer
371 views

When interviewing programmers, are algorithm problem solving skills relevant for a job were solving such algoritm problems isn't normally needed? [closed]

Software created for some business domains don't require heavy use of algorithm problem solving skills on the job from the programmers working there. For example, a JEE developer might most of the ...
0
votes
3answers
396 views

Algorithm for recursive evaluation of postfix expressions

I'm reading Sedgewick's book on algorithms in C and I'm looking for an algorithm to evaluate postfix expressions (addition and multiplication only) without using a stack. I tried to implement one but ...
1
vote
1answer
108 views

Search Substring in String collection

I have a big collection of strings a[1], …, a[N] where N is about several millions. I am provided a string m and I need to iterate over all the strings a[i] that contain m. In other words, I need to ...
3
votes
1answer
720 views

Database design/relationship for threading messages

What's the database design or business logic for creating an app for messaging between users? I am having difficulties with choosing how to approach the relationship between each Conversation of User ...
0
votes
1answer
97 views

Better way to create samples

I've done this piece of code for creating bernulli samples, but I think that it is a so heavy algorithm because every time I call this recursive function I create a new vector that is passed to it. Is ...
12
votes
4answers
820 views

How do you identify a problem as being suitable for dynamic programming?

I have been reading up on dynamic programming lately. Would like to hear from someone who started from scratch and now is pretty good at identifying and solving DP problems. I am struggling in ...
1
vote
0answers
164 views

Help/suggestions for Parallel assembly line scheduling (Dynamic programming)

I am working on a problem similar to the assembly line scheduling by dynamic programming.The issue is that unlike the classic problem where we have predefined stations now I only have information ...
2
votes
3answers
279 views

Evaluate all pair combinations in an array for a condition in n log n time complexity

Task - Consider an array of n elements. Count the number of pairs that satisfy condition X (sum of the two elements < an arbitrary number, k) . The basic approach I could think of would be O(n^2), ...
0
votes
0answers
58 views

Optimal group room division algorithm with weights

I hope someone can help me with this, as I'm thoroughly stuck. I'm working with a group at my university, on a first semester research report that should end up as a finished program, solving the ...
1
vote
2answers
176 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, ...
2
votes
3answers
188 views

Algorithm to calculate estimated future usage of a defined value

I am looking for the name of a computer algorithm. I'm fairly sure that one should exist which will help me, but I can't for the life of me figure out what to search for. If you have implementations ...
1
vote
1answer
118 views

How to calculate the worst-case runtime of this search-algorithm

I've written a special indexOf function for a list of unsorted unique values. I can search for one or multiple (unsorted) values, passed as array/list, and the function will return me an array/list ...
2
votes
1answer
116 views

Comparing strings against a pool of words

I am creating an app where the user enters 8 characters. After he enters the string I have to see if it is an eight letter word. If not, check if contains a seven letter word etc. I am checking ...
21
votes
3answers
2k views

What are the data structures behind a spreadsheet?

I would like to understand how a spreadsheet (a group of named or otherwise identified cells containing values or formulas referencing other cells) is solved. I have tried looking at existing ...
4
votes
3answers
100 views

Approach to algorithm for assignment of resources

We have a requirement to be able to match people with locations based on availability and certain conditions. Let's say I have a group of people each with 3 types of things they may need to park. A ...
0
votes
1answer
273 views

Can someone help me in creating a dynamic programming solution to this problem?

I have some function names which are assigned to some nodes. I have to decide which functions to move to other nodes to increase speed. Why do I have to move the functions to other nodes? If ...
0
votes
1answer
75 views

Deriving an algorithm from its neural network representation [closed]

I am not sure if this question is silly or not, or even nonsensical, but can a neural network be converted to a traditional algorithmic representation ? For eg. the NN for a pattern recognition ...
2
votes
1answer
59 views

computing whether service level times are met

For a ticket reporting tool, I want to compute whether certain service level times (slt) are met. That is (a bit simplified): Was the timespan between opening and closing of the ticket within a ...
2
votes
0answers
209 views

How to use simulated annealing to find lotto coverings?

I read from the Internet that simulated annealing is used to find some lotto design. How to do that? I mean, I tried to use that but I don't see how we can measure what is the best lotto row to add to ...
0
votes
1answer
44 views

Layered Manufacturing Contour Generation

I am currently working on software for layered manufacturing (3D printing), and have come to a point where I no longer know what to do. I am at the stage where I must take a bunch of lines, and order ...
1
vote
2answers
150 views

Making an algorithm more efficient

I have a question about the efficiency of an algorithm: You have a list of x,y points Now I want to get all the points that are up to 5 units away from a reference x,y point How do you calculate it ...
2
votes
1answer
206 views

Shuffling algorithm with no “self-mapping”?

To randomly shuffle an array, with no bias towards any particular permutation, there is the Knuth Fischer-Yeats algorithm. In Python: #!/usr/bin/env python import sys from random import randrange ...
12
votes
4answers
533 views

Searching integer sequences

I have a fairly complex search problem that I've managed to reduce to the following description. I've been googling but haven't been able to find an algorithm that seems to fit my problem cleanly. In ...