2016-06-07 13:58:32 -0600 | received badge | ● Famous Question (source) |

2015-11-15 03:29:36 -0600 | received badge | ● Famous Question (source) |

2015-03-14 14:28:25 -0600 | received badge | ● Notable Question (source) |

2014-11-10 19:50:23 -0600 | received badge | ● Notable Question (source) |

2014-01-26 10:08:48 -0600 | received badge | ● Popular Question (source) |

2013-11-04 12:58:23 -0600 | received badge | ● Popular Question (source) |

2013-02-09 15:23:13 -0600 | answered a question | plot digraph use adjacency matrix Hi Fidelbc, thanks again for your reply. I think I figured out how to get the graph done, thanks for all your help. Just one more small question, my output graph (same as what you got as output), seem like the graphs are not displayed fully, some of the edges or loops at the end of the graph seem cut off. I tried to re-scale the image to make it bigger, but still resulted the same graph. Do you know why this happened? Is there anyway to fix it to make the graph displayed fully? Thanks a lot. |

2013-02-07 17:12:33 -0600 | answered a question | plot digraph use adjacency matrix Yes, I know, that's why I don't understand the problem here, I copy and pasted the exact same format as my "result" file, as below: That's why I really don't understand, it is so strange. |

2013-02-07 13:22:11 -0600 | answered a question | plot digraph use adjacency matrix Hi Fedelbc, thanks for reminding me update my question! :) Here is the error I got: Do you have any suggestions please? Thanks again for your kind help. :) |

2013-02-07 11:27:58 -0600 | received badge | ● Supporter (source) |

2013-02-07 11:26:09 -0600 | commented answer | plot digraph use adjacency matrix Hi Fidelbc, thanks a lot, I did try your suggested answer, but seems like still no plotting outcome, it really gives error says "need more than 1 value to unpack", I don't know why that. Also, I changed my code into "f.readlines()", rather than "f.readline()", it seems start working, however, it still wouldn't plot anything after I typed in "graph.show()". I wonder if it has anything to do just because I am working on mac terminal? |

2013-02-06 12:35:50 -0600 | answered a question | plot digraph use adjacency matrix Hi Fidelbc, thanks heaps for your help. You are right that I didn't have 'word: ' at the beginning when I define i and j, but it constantly producing error message says "x is not in the list". So what I did was print out list S, then I saw it is the format as: ['word: 0000', 'word: 0001', 'word: 0010', 'word: 0011', 'word: 0100', 'word: 0101', 'word: 0110', 'word: 0111', 'word: 1000', 'word: 1001', 'word: 1010', 'word: 1011', 'word: 1100', 'word: 1101', 'word: 1110', 'word: 1111'] That's why I added 'word: ' into the expression for i and j. I just tried to change to M[i,j] += 1, but still having same error message says "use copy(M) to change a copy of M". The labels a, b, and c are the labels for edges, as they represent different states for certain group structures. I also tried your suggested version, but it produce another error message says: "need more than 1 value to unpack". Do you mind spending a bit more time to help me to look into it please? Thanks a lot for your time. |

2013-02-05 17:53:39 -0600 | received badge | ● Editor (source) |

2013-02-05 17:47:34 -0600 | asked a question | plot digraph use adjacency matrix Hi everyone, I got a question here, and I have been trying to debug it for past week, still can't get it sorted out, can anyone please help me? Thanks heaps. I have a file as my data (will paste at the bottom), basically the vertices are all binary strings with directed edges named "a" or "b", or "c". For example, if in my data, there is line says (0000, a, 1000), that means there is an edge from vertex 0000 to 1000 named a. Similarly, if I have (0000, b, 0000), means there is a self-loop from 0000 to it self named b. So there can be more than one self-loops sometimes. Now I have written the function digraph as below: So the idea should be pretty simple, create list of words with all binary strings length 4, then search where my data the words are allocated in the list, then assign value to 1 to the entries of my original zero matrix. But I keep getting error message says change a copy of the matrix instead, I tried to make a copy(M), but still doesn't work, then it says something else like "need more than 1 value unpack" etc. I really need a hand on this please, can anybody help me please? Also, I can't understand why it is exactly same code, but used to run very well on someone else's linux computer two months ago, and I didn't change anything but it just wouldn't run here and the error messages seem like syntax error. Here are my data as below |

2013-01-14 11:25:24 -0600 | commented answer | sage recursive functions programming I will try a little bit with this, thanks heaps. If I still cannot make it work, I may try to ask you again, thanks a lot. |

2013-01-14 11:23:46 -0600 | commented question | sage recursive functions programming Hi, thanks for reply. It is not homework, but part of research program, trying to program automatons, which is self-similar groups. I basically really weak with programming, but need to try to test some group structures. |

2013-01-10 13:23:15 -0600 | asked a question | sage recursive functions programming Hi everyone, can anybody please help me with this please? I am still relatively new to sage programming. I have two states here a and b, and function f to compute binary strings. If f is at state a, then f(1) = 0, also return to state a, while f(0)=1, but goes to next state b. b is the identity state, when f is at b, b(0)=0, and stays at state b, while b(1)=1, but goes back to state a. for example: suppose start from state a, then we have f(100) = a(100) = 0a(00) = 01b(0) = 010 similarly, suppose we start from state b, then we have f(100) = b(100) = 1a(00) = 11b(0) = 110 Therefore, any binary strings can be calculated by the function and output another binary strings. Can anybody please help me on how to program this in sage please? Thanks a lot. |

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.