Algorithm to find disconnected graph from sets

Goal: Want to efficiently find all the disconnected graphs from a large collection of sets For example, I have a data file like the following: A, B, C C, D, E A, F, Z G, J ... each entry represents a set of element. First entries A, B, C = {A, B,...
more »

2017-06-16 21:06 (3) Answers

Using A* search algorithm

I am working in graph mining, and for my current research, I am trying to fund the proximity between non-adjacent nodes in the graph. However, since non-adjacent nodes are ubiquitous, so I want to narrow-down the number of non-adjacent nodes that ar...
more »

2017-06-09 18:06 (1) Answers

Uniform Cost Search and its Time/Space Complexity

As part of a programming assignment, I have written a function ucs(G,v) in Python 3 which searches a digraph G which has weighted edges. Three nodes in G are randomly selected as goal nodes, and the task of this function is to apply uniform cost sear...
more »

2017-05-23 23:05 (0) Answers

Split chained integer pairs

I have an array of integer pairs [a, b], e.g [3, 7], [6, 7], [8, 5], [2, 6], [4, 2], [0, 5], [3, 4], [8, 1], [0, 1] These pairs always form chains (closed loops), in this case, there are two of them. The problem is to split given array into n a...
more »

2017-05-22 17:05 (0) Answers

Depth First Search Reversal?

I am making a program which determines whether or not a directed graph is strongly connected. The graph consists of 2 strings (one pointing to the other) and an optional edge weight. I don't understand how to reverse my graph to perform the second D...
more »

2017-05-14 08:05 (0) Answers

Git log --graph format query

I have this graph log (git log --oneline --all --decorate --graph) in my testgit repository: * 760711e (HEAD -> dev, master) Initial commit If I do a commit in my dev branch, the graph log would be this: * c710544 (HEAD -> dev) Initial dev...
more »

2017-05-13 16:05 (2) Answers

Depth First Search Adjacency

Program that checks if a directed graph is strongly connected I have a defaultdict: defaultdict(<class 'dict'>, {'SanFrancisco': {'Houston': '1000'}, 'LA': {'Ames': '300', 'SanFrancisco': True, 'Detroit': '200'}, 'NYC': {'LA': '3000'}, 'Aus...
more »

2017-05-13 05:05 (1) Answers

Python Depth First Search with Dict

I keep seeing pseudocode for Depth First Search that is completely confusing to me in how it relates to my specific problem. I'm trying to determine whether or not a 'directed graph' is strongly connected. If I have a dict with 2 strings (the first ...
more »

2017-05-09 07:05 (1) Answers

Uniform Cost Search in Python

I have implemented a simple graph data structure in Python with the following structure below. The code is here just to clarify what the functions/variables mean, but they are pretty self-explanatory so you can skip reading it. # Node data structure...
more »

2017-04-11 21:04 (1) Answers

Optimizing 2D grid connectivity algorithm

Summary: I'm looking for an optimal algorithm to ensure connectivity over a 2D grid of binary values. I have a fairly involved algorithm that does it in effectively linear time, but only if certain pre-processing steps are performed. The following go...
more »

2017-04-01 22:04 (0) Answers

Why is the graph database so faster?

What are the main reasons for the graph database to be faster than the relational database? We know that the relational implementation is based on B+ tree. And the graph database? Any material that gives details about this? ...
more »

2017-03-04 14:03 (0) Answers

Saving plots in a data.table list column

When I run... library(data.table) DT = CJ(id = 1, id2 = 1:3)[, .( d = as.IDate("2017-01-01")+1:10, v = id*10 + id2*1:10 ), by=.(id, id2)] plotDT = DT[, { par(mfrow = c(uniqueN(id2), 1), mar = c(2,2,.5,2)) .SD[,{ plot(d, v, type...
more »

2017-02-24 23:02 (0) Answers

Greedy Search from point A to point B on a graph

A question in my textbook asked me to calculate and find a route from Mehadia to Bucharest via 1) A Greedy Search and 2) A uniform-cost search. *Now I am able to completely illustrate and solve the route via uniform cost search but my greedy search ...
more »

2017-02-03 07:02 (1) Answers

Custom line style for network graph in R

I am hoping to make a directed network plot with arrowheads (or similar chevrons) along the length of the line... The igraph library seems to use the base polygon function, which accepts lty to specify line types, but these are limited to various ...
more »

2017-01-19 22:01 (2) Answers

Plotting Line Graph with JSON data, Android

I'm total beginner in Android development and I'm doing app for class. My assigment is to display JSON data in application as text and graphs. I'm using Retrofit 2 to display it as text in one activity, but I'm having problems with graphs, I don't kn...
more »

2017-01-11 05:01 (1) Answers

Graph search algorithm with fewest accessed nodes

I need an algorithm to find ANY path from point A to point B in a graph. The problem is that finding out wich nodes can follow a specific one needs a quite lengthy matlab simulation, so i want to access as few nodes as possible. I know some heuristi...
more »

2017-01-10 11:01 (0) Answers

MPAndroidChart: add custom image inside bars

I am using MPAndroidChart and I want to show a custom drawable inside this CombinedChart like in below image: If bar value is >= a goal value, say, 50, then I would like to add a star image inside the bar. Can any one help me for customise the B...
more »

2016-12-27 08:12 (1) Answers

What do line colors in git log --graph mean?

I'm curious what do line colors mean in git log --graph? Yes, I'm asking about lines | / \ which connect commits * at the left edge of console output. Question #1 Do these colors have some hidden meaning? Or do they are pseudo-randomly chos...
more »

2016-11-18 11:11 (1) Answers

How to embed matplotlib graph in Django webpage?

So, bear with me as I'm VERY new to Django, Python, and web-development in general. What I want to do is display a graph that I've made using matplotlib. I had it working to where the home page automatically redirects to the png of the graph (basical...
more »

2016-11-10 19:11 (0) Answers

trying to incorporate search in graph

I am trying to display statistics on a graph of students marks, the user will first need to enter the student number then according to the student number it must retrieve the marks and display on the graph, i reached a bit of a jam with the matching ...
more »

2016-11-09 20:11 (0) Answers