20190313 03:44:59 0500  answered a question  Number of neighbors of a set of vertices in a graph You want the vertex boundary of a set of vertices. 
20190313 03:31:22 0500  answered a question  Generating plane triangulations plantri is an optional package that you can install using
You will then be able to use the iterator over connected planar triangulations 
20181127 08:16:48 0500  received badge  ● Good Answer (source) 
20181127 08:16:48 0500  received badge  ● Nice Answer (source) 
20180927 04:10:05 0500  commented answer  Why does this error arise? See for instance This stackoverflow discussion for understanding the use and meaning of Concerning your code, you remove vertices of the graph in the 
20180925 06:26:21 0500  answered a question  Why does this error arise? Consider the following code. It follows the description of your relabeling method (I'm not sure of what you really want to get). I can display the relabeled graph. 
20180924 11:47:00 0500  commented question  Why does this error arise? You remove vertices from the list v, but not from the graph. So you may later add a vertex j to the list s that has already been removed from v. 
20180905 10:48:02 0500  answered a question  How to find the spanning elementary subgraphs of a given graph A perfect matching (if the graph has one) is a spanning elementary subgraph according your definition. You can get all the perfect matchings (only 1 in your graph) using Now if you want all spanning elementary subgraphs, you have to design a specific algorithm. 
20180828 04:51:34 0500  commented question  Why can't I find the spectral radius of a tree? There is a bug in this method for trees. Thank you for reporting the issue. This is now ticket #26148. 
20180415 11:55:14 0500  received badge  ● Supporter (source) 
20180318 05:21:32 0500  answered a question  Graph structure having maximum algebraic connectivity among some given blocks You have two approaches to solve this exercise:

20180304 06:05:25 0500  commented question  Getting all nonbacktracking walks of certain length in isogeny graph Could you please define "nonbacktracking walk". 
20180209 06:28:54 0500  commented question  To find trees having certain properties from a collection of trees on given number of vertices This is good class exercise to learn how to manipulate graphs with SageMath and NetworkX. 
20171107 06:52:13 0500  received badge  ● Nice Answer (source) 
20171015 09:07:22 0500  commented question  Edge color for undirected multiedge graphs This is now ticket #24051 
20170921 03:39:42 0500  received badge  ● Enthusiast 
20170916 13:51:52 0500  received badge  ● Nice Answer (source) 
20170915 00:46:19 0500  answered a question  Line graph of a given graph The vertices of the Then you can either use the method that has already been proposed here, or use the Javascript plotting (it's better to increase the link distance). 
20170901 03:30:38 0500  commented question  plot graphs with graph in vertices Ticket 21918 could help... 
20170821 19:56:47 0500  received badge  ● Enlightened (source) 
20170821 19:56:47 0500  received badge  ● Good Answer (source) 
20170821 11:40:53 0500  received badge  ● Nice Answer (source) 
20170821 11:08:35 0500  answered a question  Changing the weights in a graph You can use the set_edge_label 
20170522 02:09:25 0500  commented question  Why is Sage calling 1 a variable? The error message is 
20170519 07:40:07 0500  answered a question  Iterate over acyclic subdigraphs This is certainly not an easy question and I have no better algorithm in mind. I recommend to use Furthermore, with your code you may generate multiple times the same acyclic orientation. One solution is to keep track of previous sets of edges, but this is certainly not scalable. I'm using type For the example you gave, your code generates 5040 graphs while my code generates only 4055 graphs. 
20170429 03:03:54 0500  commented answer  Random block graph The first proposed method starts building a random tree with m edges and then replaces each edge with a kclique. It is effectively not sufficient to get all possible random block graphs. I have added a new version that starts with a random tree with m vertices, replaces each vertex by a kclique and then connect blocks corresponding to tree edges. This way we can get all possible random block graphs. 
20170429 02:55:19 0500  commented answer  Random block graph You are right, 
20170429 02:50:34 0500  received badge  ● Editor (source) 
20170428 04:05:16 0500  answered a question  Random block graph Recall that a block graph is a graph in which every biconnected component is a clique. A simple method to generate a connected block graph with m blocks of size k is to start from a random tree with m edges and then replace each edge by a clique of order k: The A call to EDIT: The method below starts with a random tree of order m. Then it creates a graph with one kclique (block) per vertex of the tree. We connect blocks corresponding to end vertices of tree edges. To do so, we select one vertex per block and merge the two selected vertices. We use a disjoint set data structure to keep track of the merge operations and so get a unique identifier per set of merged vertices. 
20161204 17:04:35 0500  received badge  ● Nice Answer (source) 
20161204 11:37:25 0500  received badge  ● Teacher (source) 
20161204 10:57:06 0500  answered a question  The interval I(u,v) between a pair of vertices u,v in graph This will be faster to compute all intervals at once. 