Groupoids And Semigroups In Category Theory