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

Simple Path and Simple Cycle in Graph DataStructure

I am unable to understand that does simple path in graph always contains first and last vertices as same?Can simple path be simple cycle ? Can simple cycle be simple path in graph data structure?Please help me out!.
0
votes
1 answer

Having a directed graph in pyhton (networkx), is it possible to create a subgraph according to a specific condition on the node attributes?

I have a twitter data set that i want to analyze,after creating a directed graph(the nodes are twitter users, and edge from a to b means a follows b) how i created the graph : I want to make a sub graph that contains only male users and edges…
0
votes
0 answers

Floyd-Warshall to Graph networkx

I created a graph using networkx (Python). I am trying to convert it to DiGraph but I can't get it right. I need to create (and work on) a Graph first, so I can't start using DiGraph() to build it at the beginning. I would assign "1" to all weights.…
hellomynameisA
  • 546
  • 1
  • 7
  • 28
0
votes
1 answer

how to set a top-down position in a graph networkx

This is my extended work from here. I would like to set the last element 'm' in the unique_liss appears at the top position of the rest nodes like this. However, most of the image generated would be like this: this is my codes: Unique_liss= ['a',…
amj
  • 55
  • 4
0
votes
1 answer

No digraphs available in vim

I can't get digraphs to work in vim. When I type: :digraphs it gives me an error message: E196: No digraphs in this version. Do I need to install any plugins or packages? If I type: :scriptnames it doesn't seem to return i.e. just seems to…
John
  • 451
  • 7
  • 17
0
votes
1 answer

Adjacency Matrix with Letters as Index

Hi I'm looking for a way to implement an adjaceny matrix, where I can use letters as the index... something like a hashmap? I currently use a simple 2D array and I have converted the letters A-Z into indices 0-25 (I could convert back afterward but…
liamod
  • 316
  • 1
  • 9
0
votes
1 answer

How to show k-partite graph in NetworkX?

I am currently looking for a solution to create a k-partite graph with Networkx. I have already implemented the bipartite graph and the image is attached As one can see due to connection among nodes in my first set Bipartite is not a good solution.…
user3050590
  • 1,656
  • 4
  • 21
  • 40
0
votes
1 answer

digraph object has no attribute 'add_path'

Scikit fuzzy rule formation cannot be done due to this error. Skfuzzy code and error message is shown below import matplotlib.pyplot as pit import skfuzzy as fuz import numpy as np from skfuzzy import control as…
0
votes
1 answer

Proof that you can turn a connected graph into a strongly connected digraph by turning every edge into an arch?

We consider the street network of a given city which is connected - from every junction we can reach every other junction in the city (every street is a two-way street). (a) The city hall wants to transform each street in a one-way street such that…
robbyyt
  • 3
  • 1
0
votes
0 answers

Converting List of words to Problem Graph For Minimum Spanning Tree Algorithm

I have been trying to construct a problem weighted Graph for Minimum Spanning Tree from a list or string of words as, given a string of words to list of named-tuple with every possible combinations of words as head and tail with additional head…
0
votes
0 answers

Graphviz not displaying PNG in Python Idle

I am using the following code to display in image in Python IDLE but no luck. import pydot import graphviz import os G = pydot.Dot(graph_type = 'digraph') node = pydot.Node('Name') G.add_node(node) from IPython.display import Image, display im =…
Hasham Beyg
  • 313
  • 3
  • 11
0
votes
1 answer

write and read Graph, multiGraph, Digraph, MultiDigraph

Read and Write, Multigraph, MultiDiGraph ? I'm working with networkx and osmnx, And I wanted to know if there is any way to write and read a Multigraph and MultiDigraph.
harry
  • 31
  • 6
0
votes
1 answer

How to show edge labes on DiGraph draw_networkx

I have nx.DiGraph like this (toy example) import networkx as nx G = nx.DiGraph() G.add_node('a', weight= 1) G.add_node('b', weight= 2) G.add_node('c', weight= 3) G.add_edge('a', 'b', range = 10) G.add_edge( 'b','a', range = 20) G.add_edge('a', 'c',…
Edward
  • 4,443
  • 16
  • 46
  • 81
0
votes
1 answer

Manipulating edge-costs of a negatively weighted digraph to allow use of Dijkstra's algorithm

Suppose we have a digraph containing both positively and negatively weighted edges. I understand that the shortest-path solution is the Bellman-Ford algorithm. My question is: why can we not just add some large value N to all the edge costs so that…
Dylan Fouche
  • 91
  • 2
  • 8
0
votes
1 answer

vim - search for a digraph using its octal value

If I have this digraph character: ň in a file, place the cursor over it and type ga I see the message <ň> 328, Hex 0148, Octal 510 But then if I search for /\%o510 or /%x0148 I get E486: Pattern not found in my vimrc: set encoding=utf-8 set…
user364902
  • 3,146
  • 6
  • 23
  • 23