Ask Your Question

akm's profile - activity

2019-11-21 13:41:43 +0200 received badge  Taxonomist
2015-01-13 22:19:42 +0200 received badge  Famous Question (source)
2014-06-29 21:01:15 +0200 received badge  Popular Question (source)
2014-06-29 21:01:15 +0200 received badge  Notable Question (source)
2013-02-20 15:37:42 +0200 received badge  Good Answer (source)
2012-12-04 12:55:26 +0200 received badge  Nice Answer (source)
2012-09-23 04:40:48 +0200 received badge  Student (source)
2012-09-01 15:31:27 +0200 received badge  Necromancer (source)
2012-09-01 15:31:27 +0200 received badge  Teacher (source)
2012-08-26 16:55:25 +0200 asked a question Discrepancy between Graph.modular_decomposition() and Wikipedia

I am either confused, or am seeing a bug, or there's a bug on Wikipedia.

There's a diagram on the page about modular decomposition referenced by the docs: http://en.wikipedia.org/wiki/Modular_... http://en.wikipedia.org/wiki/File:Mod...

It shows a 'series' module containing 2,3,4.

But when I recreate that graph and run modular_decomposition() on it I get something that seems different:

W = Graph() 
W.add_edges([[1,2],[1,4],[1,3],[2,4],[2,5],[2,6],[2,7],[3,4],[3,5],[3,6],[3,7],[4,5],[4,6],[4,7],[5,6],[5,7],[6,8],[6,9],[6,10],[6,11],[7,8],[7,9],[7,10],[7,11],[8,9],[8,10],[8,11],[9,10],[9,11]]) 
W.plot(vertex_size=100) 
W.modular_decomposition()

results in

('Prime', 
  [
    ('Serie', 
      [
        ('Parallel', 
          [
            10, 
            11
          ]
        ), 
        9, 
        8
      ]
    ), 
    ('Parallel', 
      [
        6, 
        7
      ]
    ), 
    5, 
    1, 
    4, 
    ('Parallel', 
      [
        2, 
        3
      ]
    )
  ]
)

Which shows 8,9,10,11 in a 'series' but not 2,3,4.

Am I getting something wrong or missing something?

2012-03-13 15:05:15 +0200 answered a question How do I display the full output that includes graphics?

I found this solves the problem: put this line in your notebook cell before you create output.

html('<!--notruncate-->')

Worked for me.