Using numpy andn graph theory algorithm, develop a python program that will read two text.files, which includes the adjacency matrix of two alkanes. In the end, the program will output theWiener's index and determine which of the two has the higher boiling point.

Operations Research : Applications and Algorithms
4th Edition
ISBN:9780534380588
Author:Wayne L. Winston
Publisher:Wayne L. Winston
Chapter8: Network Models
Section8.7: The Network Simplex Method
Problem 2P
icon
Related questions
Question

Using numpy andn graph theory algorithm, develop a python program that will read two text.files, which includes the adjacency matrix of two alkanes. In the end, the program will output theWiener's index and determine which of the two has the higher boiling point. 

 

isobutane.txt
0,0,0,1
0,0,0,1
0,0,0,1
1,1,1,0
n-butane.txt
0,1,0,0
1,0,1,0
0,1,0,1
0,0,1,0
Results
isobutane Wiener index: 9
n-butane Wiener index: 10
Boiling point of n-butane is higher than isobutane
Transcribed Image Text:isobutane.txt 0,0,0,1 0,0,0,1 0,0,0,1 1,1,1,0 n-butane.txt 0,1,0,0 1,0,1,0 0,1,0,1 0,0,1,0 Results isobutane Wiener index: 9 n-butane Wiener index: 10 Boiling point of n-butane is higher than isobutane
Expert Solution
steps

Step by step

Solved in 4 steps with 2 images

Blurred answer