Graph theoretical implementations of digital system diagnostic algorithms