compact graph fragment representation