Using scipy and 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.

icon
Related questions
Question

Using scipy and 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