2023-01-24 09:13:17 +0100 | received badge | ● Famous Question (source) |
2022-03-26 09:31:06 +0100 | received badge | ● Famous Question (source) |
2021-03-25 08:42:28 +0100 | received badge | ● Notable Question (source) |
2020-03-09 17:42:07 +0100 | received badge | ● Famous Question (source) |
2019-11-18 16:24:24 +0100 | received badge | ● Supporter (source) |
2019-11-18 16:23:16 +0100 | received badge | ● Popular Question (source) |
2019-10-30 23:00:39 +0100 | received badge | ● Notable Question (source) |
2019-09-29 03:17:09 +0100 | received badge | ● Notable Question (source) |
2019-01-10 21:50:02 +0100 | received badge | ● Popular Question (source) |
2018-09-25 14:35:46 +0100 | commented answer | Why does this error arise? Yes, it does what I want. I would like to also understand why I do not get any output in my code. As a starter in programming I am not familiar with the underscore |
2018-09-25 12:52:44 +0100 | received badge | ● Associate Editor (source) |
2018-09-25 12:43:15 +0100 | received badge | ● Commentator |
2018-09-25 12:18:45 +0100 | commented question | Why does this error arise? I fixed the mistake you pointed out. I generate the dictionary $d$ according to which I want to relabel the graph $G$ but |
2018-09-24 22:07:22 +0100 | commented question | Why does this error arise? Thank you for pointing that out. The mistake is naive indeed. |
2018-09-24 18:33:14 +0100 | asked a question | Why does this error arise? I want to relabell the vertices of a randomly generated graph in Sage. Let $v$ be the set of vertices ordered according to their appearance in the degree sequence. The labelling strategy is like this:
In order to achieve that I wrote the following code but it gives me the folowing error: ValueError: list.remove(x): x not in list, which I do not know how to fix. I know that the problem is in the last part because the rest of the code works. In my understanding, all the elements of $s$ are also elements of $v$. So I do not know why the error is coming up. UPDATE: The new code: It works but |
2018-07-22 23:26:10 +0100 | received badge | ● Popular Question (source) |
2018-07-22 19:49:07 +0100 | commented answer | Preserving the rooted tree layout in graphs Thank you! Unfortunately I do not have enough reputation to upvote this answer. |
2018-07-22 18:58:15 +0100 | received badge | ● Nice Question (source) |
2018-07-22 17:07:38 +0100 | asked a question | Preserving the rooted tree layout in graphs I am working in a research project where I deal with rooted trees. I want to be able to add edges to the rooted tree and somehow "preserve" the rooted tree layout. More precisely, if I add the edges $(2,8)$ and $(3,6)$ in the rooted tree produced by the code below the layout of the updated graph is kind of messy and it gets worse if the order of the tree is increased. I want to add the new edges in a different color but without affecting the layout of the initial tree. I want the updated graph to look like the output of this tikzpicture: Is this even possible? |
2018-07-22 15:35:55 +0100 | commented answer | Constructing a dictionary where the values are lists Thank you for your effort! I like especially the idea of the generic argument. I know this comes quite a while after you wrote the answer but it is better late than never. By the way, I am not a programmer and I know that my way of coding is far away from optimal. I use coding to test mathematical conjectures. Hoping to get better with practice. |
2018-03-21 21:08:24 +0100 | commented question | Constructing a dictionary where the values are lists @dan_fuela I did mention where $A$ and $B$ are moving. Since in the loops we use bound variables to explore the subsets of $V$ and the set of maximale independent sets $MI$ of the randomly generated graph, I found that clarification kind of enough. I will try to adapt the code so it correlates with the terminology of the formula. |
2018-03-21 20:54:55 +0100 | commented question | Constructing a dictionary where the values are lists @nbruin Thank you! You are right, I did the updating procedure of the dictionary according to a fast googling. The instruction I followed is clearly wrong. In my code there is also a typo, it should be "tuple" not "tupple". |
2018-03-21 20:07:17 +0100 | asked a question | Constructing a dictionary where the values are lists I want to construct a dictionary where the keys are the subsets of the vertex set $V$ of a randomly generated graph and the values are the maximal indipendent sets (denoted MI in the code) for which the function: $$\omega (A,B)=\sum\limits_{i\in A\triangle B}2^i \quad \text{where} \quad A\triangle B=(A\setminus B) \cup (B\setminus A) $$ is minimized, for $A\subset V$ and $B \in MI$. I am having difficulties on encoding the information in a dictionary. I have spent quite some time and I can not figure out how to do it. Here is the code: When I compile it I get Basically it wont let me use |
2018-03-21 15:15:23 +0100 | commented answer | TypeError: 'sage.rings.integer.Integer' object is not iterable Thank you, it works. Somehow I thought that I can treat the variable i in the third loop more or less like a bound variable in the predicate logic. |
2018-03-21 15:09:34 +0100 | marked best answer | TypeError: 'sage.rings.integer.Integer' object is not iterable This is my code When I compile it I get Which I do not understand because I do not think that I have iterated over any integer in any part of the code. The problem seem to be the last three lines because if delete them and compile the code there does not appear any error. |
2018-03-21 15:09:34 +0100 | received badge | ● Scholar (source) |