Questions tagged [digraphs]

A 'digraph' means 'one symbol written as two characters'. In printing it meant two letters cast as one piece of lead, e.g. ae, fi, ...

In graph theory, 'digraph' is an abbreviation of 'directed graph'. You may want to use the more explicit tag directed-graph.

In computer programming, digraphs and trigraphs are sequences of two and three characters respectively, appearing in source code, which a programming language specification requires an implementation of that language to treat as if they were one other character.

Various reasons exist for using digraphs and trigraphs: keyboards may not have keys to cover the entire character set of the language, input of special characters may be difficult, text editors may reserve some characters for special use and so on. Trigraphs might also be used for some EBCDIC code pages that lack characters such as { and }.

155 questions
0
votes
1 answer

Bipartite graph in NetworkX for LARGE amount of nodes

I am trying to create bipartite of certain nodes, for small numbers it looks perfectly fine: Image for around 30 nodes Unfortunately, this isn't the case for more nodes like this one: Image for more nodes My code for determining the position of each…
linuxbeginner
  • 39
  • 1
  • 7
0
votes
0 answers

I am unable to view attributes of a graph read from a GML file in python

I am trying to use the networkx package to work on a directed graph. The file was read successfully but a lot of the functions do not give any output for it. import networkx as…
0
votes
1 answer

Is there an admissable heuristic for performing A* (A-star) search on a Directed Graph with cycles?

I am working on a school project which requires us to generate a random digraph with weighted edges and perform a number of graph traversal techniques to find one of the target nodes (marked in green) from the starting node (marked in red). A sample…
0
votes
1 answer

Can someone tell me which language this is and how i should compile this into a graph?

Can someone tell me which language this is and how i should compile this into a graph? I downloaded a python code and after execute it gave me this back. There was nothing in the documentation except that the output is a dot-file. digraph pn…
vace
  • 35
  • 4
0
votes
1 answer

igraph, Python - directed girth seems to not work

I'm working with randomly generated digraphs. I need to verify that the graphs I have have a girth of at least, say 3. The solution I used is the following: I generate a random adjacency matrix I create an igraph.Graph instance from the matrix I…
Qise
  • 192
  • 6
0
votes
0 answers

List with references to its elements

I need to hold a list of nodes (strings) and have a "current" node (or more generally current nodes). I would use a vector and current nodes specified by indexes, but sometimes a node is removed from the list, this silently invalidates the index,…
porton
  • 5,214
  • 11
  • 47
  • 95
0
votes
1 answer

how to add float typed weights to an retworkx digraph

In my pursuit after a fast graph library for python, I stumbled upon retworkx, and I'm trying to achieve the same (desired) result I've achieved using networkx. In my networkx code, I instantiate a digraph object with an array of weighted…
0
votes
1 answer

Is this total sink algorithm only for dags?

I found this algorithm for digraphs that checks whether a total sink exists in a graph. https://www.geeksforgeeks.org/determine-whether-universal-sink-exists-directed-graph/ My question is : Is this valid for a non - dag digraph? Because if a cycle…
tonythestark
  • 519
  • 4
  • 15
0
votes
2 answers

Import graph from file to Networkx or NNGT

I need to build a large weighted digraph from data that's being exported from MatLab. The ultimate goal is to analyse it using NNGT, but it looks like building it using Networkx and then converting to NNGT might be easier. 'sample.txt' looks like…
Tormey R
  • 11
  • 3
0
votes
1 answer

Forcing a node to stay on top when creating a cycle

I have the following graph: digraph G { u1, u2, u3, u5 [ shape = oval, style=filled, fillcolor="palegreen"]; u3 -> v3 -> v5_0 -> v5_1 -> v1; u5 -> v8 -> v5_1; v1 -> v5_2 -> v2; u1 -> v2; v2 -> u2; } Now, I want u2 and u3 to be the…
einpoklum
  • 118,144
  • 57
  • 340
  • 684
0
votes
1 answer

How to determine the in-degree and out-degree of a node from a graph?

Whenever I apply H.neighbors(), to any node from my graph it shows none. import networkx as nx graph={'A': ['B', 'C'], 'B': ['C', 'D'], 'C': ['D','A'], 'D': ['C'], 'E': ['F'], 'F': ['C']} G = nx.Graph(graph) H =…
Aditi Sen
  • 1
  • 1
0
votes
0 answers

How to get different paths with same start and same end in a digraph(directed graph)?

giving a digraph like this: 1 --> 2 1 --> 3 2 --> 4 2 --> 5 3 --> 6 4 --> 7 5 --> 7 5 --> 8 7 --> 9 8 --> 9 6 --> 9 It`s easy to see there are 3 circle-like in graph. {[1,2,5,8,9], [1,3,6,9]} {[2,4,7], [2,5,7]} {[5,7,9], [5,8,9]} It`s just what I…
xx fox
  • 1
0
votes
1 answer

Ideavim - how can I add digraphs

In Vim, i add digraphs by putting a line such as the following into my ~/.vimrc file to create a digraph for "ſ" (a long-s character): :digr ls 383 However, adding such a line to my ~/.ideavimrc file has no effect. The default digraph set is in…
dkretz
  • 37,399
  • 13
  • 80
  • 138
0
votes
0 answers

Python DiGraph - Dynamic Source Data

This is probably a moon shot, but I'm looking to get started with my first Python project and I'm looking for advice. The goal is to write some code that would be able to create the following graph. The issue is that I would need the code to be…
c_misch
  • 1
  • 1
0
votes
1 answer

How to make boxes appear where I want them?

I want the Openshift and letsencrypt to appear below the Stage and Prod segment. Now its aligned with the Prod and Stage segment. Is rank the way to solve it? Also, is there a way to obtain results like fe03-osl2-stage and fe04-osl3-stage within a…
user3297323
  • 57
  • 1
  • 6