An algorithm is a sequence of well-defined steps that defines an abstract solution to a problem. Use this tag when your issue is related to algorithm design.
1
vote
0answers
11 views
Files, Months, Modules and Pseudocode
I am on the final question of a test exam paper and I have become lost in the creation of the algorithm. My defining diagram looks fine however I Just can't work out the order in which to calculate ...
1
vote
1answer
13 views
Difference between ShortestJobFirst and OptimalScheduling
I am reading Algorithm design manual 2nd edition.Can some one explain me the difference between ShortestJobFirst and OptimalScheduling algorithm.The algorithm given are as follows
ShortestJobFirst(I)
...
0
votes
0answers
9 views
Optimizing network bandwidth over federated database aggregation jobs
I have a federated database structured as follows:
The databases are spread across three geographic locations
Multiple databases are clustered at each geographic location
Hibernate is running on top ...
1
vote
2answers
39 views
What algorithm use to find the intersection area between polygon and circle?
I have map. On the top of map layer have a polygon A and circle B. They are intersected each others. Any algorithm can calculate the area of intersection C ?
0
votes
1answer
14 views
Query on the soln for agorithm for N-way merge
I have a query with regard to one of the soln proposed for
Algorithm for N-way merge
The soln proposed by member aioobe is as follows:
1.Create a priority queue
2.Iterate through each file f
...
0
votes
2answers
16 views
algorithm - DFS extremely slow when keeping the visisted nodes
i might be missing something about DFS/DLS, wikipedia doesn’t say visited nodes should be concatenated with the current depth...
problem: you have this 2x4 map S=start E=exit
____
E |
|
|
...
2
votes
2answers
33 views
Online Algorithm for Standard Deviation Proof
I saw this algorithm in an answer to this question.
Does this correctly calculate standard deviation? Can someone walk me through why this works mathematically? Preferably working back from this ...
0
votes
0answers
58 views
Algorithm for loading a subway car NYC [closed]
I was standing on the subway the other day and noticed that the area by the doors is always packed as people are less likely to want to go to the middle of the subway car and as this is the entry and ...
0
votes
1answer
27 views
Articulation Points In a Graph
I was going through the algorithm explained to find all the Articulation Points in a Graph , given Here.
This is the function which calculates the Art points :
// A recursive function that find ...
1
vote
1answer
41 views
Finding points with minimum connectivity distance from room
I am implementing an algorithm to find the minimum spanning corridor in a set of rooms. Currently I have the algorithm figured out, I am just trying to implement it. Part of it involves finding so ...
-3
votes
0answers
19 views
Total subtrees under given restrictions
I have a given tree with n nodes. The task is to find the number of subtrees of the given tree with outgoing edges to its complement less than or equal to a given number K.
for example: If n=3 and ...
0
votes
3answers
45 views
Code for Longest Common Subsequence is not showing result properly [closed]
I am working for a program that solves the problem of finding the maximum length of Longest common subsequence in given two strings, I've observed it doesn't show me the first character of my 2 ...
-3
votes
1answer
41 views
Creating Movie for each Generation of Data
I have the following code:
figure;
contour(X1,X2,f);
hold on
plot(top(1:size(top,1)), 'rx');
EDIT
figure;
for i = 1: G
contour(X1,X2,f);
hold on
plot(top(1:size(top,1)), 'rx');
...
1
vote
0answers
27 views
Given a Flow Network and an Edge e, Describe an Algorithm that Determines Whether e Crosses Some Minimum Cut
Given a flow network G = (V,E) with a source s, a sink t and and edge e = (u,v), describe an algorithm that determines whether the edge e crosses some minimum cut (S,T).
My first idea was to ...
1
vote
1answer
43 views
get the i-th combination of arrays of numbers
I know there are many similar questions, and I have read them for hours. But none of them seems to meet my requirement.
My problem:
given n int arrays, and each of them has the form
array_i[] = ...