⇤ ← Revision 1 as of 2010-12-18 05:33:13
542
Comment:
|
609
|
Deletions are marked like this. | Additions are marked like this. |
Line 8: | Line 8: |
p=Graph({1:[2,3,7],2:[1,8,4],3:[1,4,5],4:[2,3,6],5:[3,6,7],6:[4,5,8],7:[1,5,8],8:[2,6,7]}); p.plot() p.is_bipartite() True //given graph is bipartite p.bipartite_sets() (set([8, 1, 4, 5]), set([2, 3, 6, 7])) //two sets of the bipartite graph p |
g=Graph() g = Graph({1:[2,3,7], 2:[1,8,4],3:[1,4,5],4:[2,3,6],5:[3,6,7],6:[4,5,8],7:[1,5,8],8:[2,6,7]}); g.plot3d() |
Line 15: | Line 12: |
g.is_bipartite() True //output |
|
Line 16: | Line 15: |
g.bipartite_sets() (set([8, 1, 4, 5]), set([2, 3, 6, 7])) //output g.bipartite_color() {1: 1, 2: 0, 3: 0, 4: 1, 5: 1, 6: 0, 7: 0, 8: 1} //output |
|
Line 21: | Line 25: |
* <J.Aditya>, <Student>, <Snist> |
* <Your Name>, <Profession>, <Organization> * <Your Name>, <Profession>, <Organization> |
Book
Advanced Engineering Mathematics
Author
Erwin Kreyszig
Edition
8th Edition
g=Graph() g = Graph({1:[2,3,7], 2:[1,8,4],3:[1,4,5],4:[2,3,6],5:[3,6,7],6:[4,5,8],7:[1,5,8],8:[2,6,7]}); g.plot3d() g.is_bipartite() True //output g.bipartite_sets() (set([8, 1, 4, 5]), set([2, 3, 6, 7])) //output g.bipartite_color() {1: 1, 2: 0, 3: 0, 4: 1, 5: 1, 6: 0, 7: 0, 8: 1} //output
Solution by:
<Your Name>, <Profession>, <Organization>
<Your Name>, <Profession>, <Organization>