## Javascript Union Pairs Union Find

I working on union finding. I want to group pairs of numbers based on whether one of the indices shares a number with an index of another pair. So: I have an array of pairs such as these: pairs: [[1,3], [6,8], [3,8], [2,7]] whats the best way to ...
more »

## Shortest path with a twist

I have n vertices and m undirected weighted edges between them (weights are representing minutes). Each vertex contains a number of minutes required to drink a coffee on that vertex. I want to determine the shortest amount of time (minutes) neccess...
more »

## Efficient algorithm to find 2-step neighbors for all vertices in a directed graph

I have a large directed graph in csv format (~14GB) of edges represented as integers in the following format: node1,node2 3213741,23521361 3213741,6532710 3213741,12340611 3213741,6457392 3213741,9682135 6567133,12956771 6567133,23860123 node1 is ...
more »

## Understanding Graph, Weighted method

Okay, so what does the SET stand for in the second line? Why is the second string in<>, ? public Weighted(In in, String delimiter) { st = new ST<String, SET<String>>(); while (!in.isEmpty()) { String line = in.readLi...
more »

## Algorithm for incomplete ranking with imprecise comparisons

SUMMARY I'm looking for an algorithm to rank objects. Two objects can be compared. However, the comparisons are real world comparisons that may be flawed. Also, I care more about finding out the very best object than which ones are the worst. TO MO...
more »

## Calculation of Dependent Values in Java

Using Java, I've got a source data set of integers, it's big but not huge - let's say it won't get bigger than 30,000 values. Using the source dataset I have some summary values I want to create (these are domain specific so not something you'll fin...
more »

## Computing a company's shareholders ownership percentage

I have a graph that contains two types of nodes: Companies and Persons. A Company node has a list of edges that represent Shareholders. A Shareholder has a percentage of shares and is either a Company or a Person. A Person node is always a leaf. He...
more »

## Algorithm: How to re-arrange a time-range event (interval) list based on wether time events overlap, faster than O(n^2)?

Let's say I have an array of time ranges like so: [ { name: 'A', startTime: '10:15', endTime: '11:15'}, { name: 'B', startTime: '10:45', endTime: '14:15'}, { name: 'C', startTime: '15:35', endTime: '16:15'}, { name: 'D', startTime: '11:30', ...
more »

## Accumulate values of "neigborhood" from edgelist with numpy

I have a undirected network where each node can be one of k types. For each node i, I need to calculate the number of neighbors that node i has of each type. Right now I am representing the edges with an edgelist where the columns are indexes of the...
more »