girth calculation assuming graph connectivity, plus more tests