THE INHERENT STATES OF GLASSY SYSTEMS AND GRANULAR MEDIA