Graphical matrices are used to generate the Hosoya matrices which in turn produce the Hosoya-Wiener indices. The computer program to generate graphical matrices of acyclic structures, the corresponding numerical matrices and double invariants is delineated