Book
Advanced Engineering Mathematics
Author
Erwin Kreyszig
Edition
8th Edition
g=Graph() g = Graph({1:[2,3],2:[1,4],3:[1,4],4:[2,3]}); //planar graph with 4 vertices g.plot() g.is_planar() True //output g = Graph({1:[2,3,4],2:[1,3,4],3:[1,2,4],4:[1,2,3]}); // complete graph (k4) g.plot() g.is_planar() False //output g = Graph({1:[2,3,4,5],2:[1,3,4,5],3:[1,2,4,5],4:[1,2,3,5],5:[1,2,3,4]}); //complete graph (k5) g.plot() g.is_planar() False //output
Solution by:
- Koumudi, student, SNIST