Graph theory in security