Ask Your Question

akm's profile - activity

2019-11-21 06:41:43 -0600 received badge  Taxonomist
2015-01-13 15:19:42 -0600 received badge  Famous Question (source)
2014-06-29 14:01:15 -0600 received badge  Popular Question (source)
2014-06-29 14:01:15 -0600 received badge  Notable Question (source)
2013-02-20 08:37:42 -0600 received badge  Good Answer (source)
2012-12-04 05:55:26 -0600 received badge  Nice Answer (source)
2012-09-22 21:40:48 -0600 received badge  Student (source)
2012-09-01 08:31:27 -0600 received badge  Necromancer (source)
2012-09-01 08:31:27 -0600 received badge  Teacher (source)
2012-08-26 09:55:25 -0600 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 09:05:15 -0600 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.