Let $G$ be a finite semigroup (or monoid if that helps) and $K$ a field.



> 
> Question: When is the semigroup algebra $KG$ local?
> 
> 
> 


Here local means that there is a unique maximal right (or left) ideal.


When $G$ is a group this is true if and only if $G$ is a $p$-group when $K$ has characteristic $p$ (when the characteristic is 0, then $KG$ is only local when $G$ is trivial).


I would hope that there is a similar easy criterion for general semigroups that can be used for example in GAP to filter out all semigroups (among all semigroups with lets say at most 8 elements) with a local semigroup algebra over a given field.


An approach could be the following, if one can find a splitting field $K$ for a given $G$ (is there a good way to find a splitting field like for groups?) then the number of simple modules of $A=KG$ is $\DeclareMathOperator\rad{rad}\dim A-(\dim (\rad(A))+\dim([A,A]))$, which can be calculated by GAP (at least when the command RadicalOfAlgebra works in the intended way even for non-unital algebras).



> 
> Question 2: Given a local algebra by quiver and relations, is there an easy way to see whether it is isomorphic to a semigroup algebra and to find a corresponding semigroup?
> 
> 
> 



When is semigroup algebra local?
Question 1 either has a trivial answer or it is answered in my paper (with coauthors). [REPRESENTATION THEORY OF FINITE SEMIGROUPS,
SEMIGROUP RADICALS AND FORMAL LANGUAGE THEORY](https://www.ams.org/journals/tran/2009-361-03/S0002-9947-08-04712-0/S0002-9947-08-04712-0.pdf) depending on what you require for a local ring. Notice that a semigroup algebra is not usually unital. Do local rings have to have identities for you? If so, then the only examples are groups and they are the ones you gave. If you allow nonunital local rings, read on.


In any event, if $S$ is any semigroup, then $KS$ has the trivial homomorphism $KS\to K$ and so if it is to have a unique maximal left ideal, then the augmentation ideal (the kernel of this map) had better be it. If $S$ is finite, then this is the same as the augmentation ideal being the radical, that is, nilpotent.


We prove in our paper (Proposition 3.4) that if $S$ is a finite semigroup, then the augmentation ideal is nilpotent in characteristic $0$ if and only if $S$ is locally trivial, meaning $eSe=\{e\}$ for each idempotent $e$, and if the characteristic is $p>0$, then the augmentation ideal is nilpotent if and only if $S$ is locally a $p$-group, meaning $eSe$ is a $p$-group for each idempotent $e$. In particular, the only time this can occur for a monoid is when it is a group, in which case you already knew the answer. One can also deduce this from the much deeper Clifford-Munn-Ponizovskii theorem which tells you a semigroup algebra is local iff it has a unique maximal subgroup (up to $\mathcal J$-equivalence) and that maximal subgroup has a local group algebra. But our proof avoids using deeper theory.


As to your second question, an algebra given by quivers with relations must be unital. So in this case you are dealing either with the trivial group or a $p$-group in characteristic $p$ and I think we have discussed in the past on MO what quivers and relations come up this way. Semigroups will not give you new examples.


**Added.** If you are willing to be more flexible about what a semigroup algebra is, then I suppose you can pick up more examples. Suppose $S$ is a semigroup with an absorbing element (aka zero). Then the contracted semigroup algebra is the quotient of the usual semigroup algebra in which you identify the absorbing element of your semigroup with the zero of the algebra. That is you take as a basis the nonzero elements of the semigroup and when the product of two basis elements is the absorbing element, you declare the product to be zero in the algebra. This is what finite dimensional algebra people mean when they talk about a multiplicative basis.


The contracted semigroup algebras which are local are a bit more messy although one can say what they are. For those who know semigroup parlance, they are semigroups with a unique regular $\mathcal J$-class such that the maximal subgroup has a local algebra over the field (so trivial in characteristic $0$ and $p$-group in characteristic $p$). It's also a bit messier to say when the algebra is unital (the $\mathcal J$-class must be maximal and its sandwich matrix must be invertible over the group algebra of the maximal subgroup).


For contracted monoid algebras it is quite a bit easier. Then what you can do in characteristic $0$ is take a nilpotent semigroup and adjoin an identity. In characteristic $p$, you can look at a monoid whose group of units is a $p$-group and the noninvertible elements are nilpotent. Quiver presentations for these things can be quite complicated. In characteristic $0$, you basically have on vertex and a loop for each irreducible element of the nilpotent semigroup (elements that do not factor). But the relations can be quite complicated since they basically encode the multiplication table and there are incredible numbers of nonisomorphic nilpotent semigroups of any order and I doubt that significant a percentage of their algebras become isomorphic. In any event, if you allow contracted semigroup algebras, then in characteristic $0$, what you can get are quivers with a single vertex and with all relations of the form $w=0$ or $u-v=0$ where $w,u,v$ are all words of length at least $2$ and you must have enough relations to guarantee that all sufficiently long words are $0$.


