A* star algorithm open and closed lists

I have looked at the implementation of the problem on the internet and i have a question: whenever you add a node you need to search it in the open list(why it is not enough to search it in the closed list?)? And why do you search it to see if you ca...
more »

How can I automatically plot graphs in R with ggplot and save them to a folder?

I'm trying to create a graph (using quickplot) for each column of a data set and save it to a folder as a pdf -any advice would be much appreciated! So far I've made a test data frame (before I try it with 500+ columns) test.data <-cbind.data.f...
more »

How to find if a vertex exists in a boost graph?

I have a boost graph (with bundled properties). I want to find if a vertex with a certain value already exists in the graph or not. Can someone help me with this? Here, I present a MWE of my existing code: Live on Coliru #include <iostream> #...
more »

semPaths - different size nodes for lavaan SEM

I was wondering how to set different sizes for different nodes using semPlot for a SEM model with lavaan. library(lavaan) library(semPlot) model <- ' # measurement model ind60 =~ x1 + x2 + x3 dem60 =~ y1 + y2 + y3 + y4 dem65 =~ y5...
more »

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 »

Zest Graphical Framework - Graph View Based on Previous Graph

I am trying to create a "Go Back to Previous Graph" option for my RCP application which uses the Zest graphical framework. There is a base graph, which it starts out with, and more detailed graphs the user can interact with. Once the user is at a ce...
more »

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 »

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 »

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 »

Prolog: Write code to manipulate a graph to find a solution at a depth of 2 when Goal Node is at a depth of 3

I'm trying to write depth limited code that will manipulate the graph here and find the solution node G at a depth of 2. I'm also trying to get the code to return the cost of the solution path. So far I've gotten this: solve( Node, Solution) :- ...
more »

To draw the graph like Structure along with the Radiobutton?

enter image description here As I am beginner in android so I don't know the name of this structure exactly but i have highlighted it in rectangle shape... I have to design this in xml is it possible to design it in xml?? If not how it can be done...
more »

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 »

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 »

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 »

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 »

Flutter - Draw Graphs on the screen

Is there any library for Flutter (Dart) for drawing Graphs on the screen with a coordinate system? Or how would I approach doing it from scratch? ...
more »

How to find the shortest path cover a specific set of edges in a weighted undirected graph?

Given a weighted undirected graph(say with nodes A,B,C,D,E), and a set of jobs which require to go from one node to another(say A->C,A-B,D->E,E->F). How to find the shortest path starting from A which covers all jobs in the job set? P.S. Triangle in...
more »

How can I find a suitable heuristic for an A* Algorithm?

As part of a programming assignment, I have implemented a directed weighted graph structure in Python, where each graph is randomly generated, for example: My coded implementation is typical OOP - a class Graph, which contains a list of class Node...
more »

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 »

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 »

Technologies for creating a graph with 200 million+ nodes?

I have roughly 15gb worth of text files that I need to process into at most 240 million nodes, where the number of edges per node will be relatively small (I can't provide an exact quantity, but each vertex will have at most 50 edges with the majorit...
more »

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 »

Algorithm for finding subset out of list that fulfills constraint

I'm looking for an efficient algorithm to perform the following task. An implementation in python would be optimal, but using another language or just pseudocode would be helpful as well. Given is a rational number x and a list of about 600 rational...
more »

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 »

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 »

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 »

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 »

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 »

Neo4j Cypher: Find common nodes between a set of matched nodes

Very similar to the question posted here I have the following nodes: Article and Words. Each word is connected to an article by a MENTIONED relationship. I need to query all articles that have common words where the list of common words is dynamic....
more »

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 »

r creating an adjacency matrix from columns in a dataframe

I am interested in testing some network visualization techniques but before trying those functions I want to build an adjacency matrix (from, to) using the dataframe which is as follows. Id Gender Col_Cold_1 Col_Cold_2 Col_Cold_3 Col_Hot_1 ...
more »

Prim's algorithm on graph with weights of only 1 and 2 on each edge using two lists

Given a weighted, connected, simple undirected graph G with weights of only 1 and 2 on each edge I want to implement Prim's algorithm this way: the weights are either 1 or 2, so I can simply store the edges in 2 separate lists, one for edges with...
more »

Why does Matlab remove dots on a (polar) plot when saving as an image?

I construct a plot in Matlab, for example plot([1 2 3],[1 0 -1],'b.-') If I save this figure as a .png/.jpg/.tif file (using File-Save as...), Matlab removes the dots and plots only the lines: Why is this? How can I save the figure as it is? ...
more »

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 »