Last October, I learned from [Benjamin Steinberg's answer](https://mathoverflow.net/questions/432657/structure-theorem-for-a-class-of-idempotent-monoids-where-xy-x-or-xy-y/432691#432691) to another question of mine that a semigroup $S$ is called *breakable* if $xy \in \{x, y\}$ for all $x, y \in S$. Let's now say that $S$ is an *almost breakable* semigroup if $xy \in \{x, y\}$ or $yx \in \{x, y\}$ for all $x, y \in S$ (by the way, is there a more standard name for these objects?). Every breakable semigroup is almost breakable (that's obvious), while the converse need not be true. Also, an almost breakable semigroup is idempotent (whence the set of its units is either empty or trivial).



> 
> **Question.** Assume $S$ is an almost breakable semigroup and call a pair $(x,y)$ of elements of $S$ *irregular* if $xy \notin \{x, y\}$. Do there exist an integer $n \ge 1$ and $n$ elements $x\_1, \ldots, x\_n \in S$ such that the pair $(x\_i, x\_{i+1})$ is irregular for each $i \in [\![1, n ]\!]$, where $x\_{n+1} := x\_1$? If so, we will say that the $n$-tuple $(x\_1, \ldots, x\_n)$ is an $n$-cycle (in $S$) and $S$ contains an $n$-cycle.
> 
> 
> 


Of course, an almost breakable semigroup contains neither 1- nor 2-cycles. Moreover, experiments in Maple have shown that the answer is no for every almost brekable semigroup of order $\le 6$.



Cycles in almost breakable semigroups
Here is a self-contained version of the argument that there are no cycles, avoiding using the structure of bands. Suppose that $S$ is almost breakable.


Claim 1. If $SxS=SyS$, then both $xy,yx\in \{x,y\}$ and $xyx=x$, $yxy=y$.


Pf. Without loss of generality, assume that $yx=y$ (the other cases follow from renaming or working with the opposite semigroup, which is also almost breakable). Trivially $yxy=y$. Write $x=uyz$. Then $xz=x$ and $xyx=xyxz=xyz=uyzyz=uyz=x$. Thus $x=xyx=xy$.


Claim 2. If $x,y\in S$, then $SxS\subseteq SyS$ or vice versa.


Pf. Either $xy\in \{x,y\}$ or $yx\in \{x,y\}$.


Suppose now that $(x\_1,\ldots, x\_n)$ is a cycle. Without loss of generality, we may assume that $Sx\_1S$ is maximal among the $Sx\_iS$. Assume inductively that $Sx\_1\supsetneq Sx\_2\supsetneq \cdots\supsetneq Sx\_k$ with $1\leq k<n$. Then $x\_{k+1}x\_k\in \{x\_k,x\_{k+1}\}$. If $x\_{k+1}x\_k=x\_k$, then $x\_kx\_{k+1}x\_k=x\_k$ and $x\_kx\_{k-1}x\_k=x\_k$ (the latter since $x\_{k-1}\in Sx\_k$). Thus $Sx\_kx\_{k+1}S=Sx\_kS=Sx\_{k-1}x\_kS$. So by Claim 1, $x\_kx\_{k+1}\cdot x\_{k-1}x\_k\in \{x\_kx\_{k+1},x\_{k-1}x\_k\}$. But then $$x\_kx\_{k+1}\cdot x\_{k-1}x\_k=x\_k(x\_kx\_{k+1}\cdot x\_{k-1}x\_k)x\_k\in x\_k\{x\_kx\_{k+1},x\_{k-1}x\_k\}x\_k=\{x\_kx\_{k+1}x\_k,x\_kx\_{k-1}x\_k\}=\{x\_k\}$$ by another application of Claim 1 since $Sx\_kS=Sx\_kx\_{k+1}S=Sx\_{k-1}x\_kS$. Thus $x\_k\in \{x\_{k-1}x\_k,x\_kx\_{k+1}\}$, a contradiction to the definition of a cycle. Thus $x\_{k+1}x\_k=x\_{k+1}$ and so $Sx\_k\supseteq Sx\_{k+1}$. These left ideals cannot be equal by Claim 1, and so $Sx\_k\supsetneq Sx\_{k+1}$.  

Thus we have $Sx\_1\supsetneq Sx\_2\supsetneq\cdots\supsetneq Sx\_n$. But then $x\_nx\_1 = x\_nx\_{n-1}x\_1=\cdots=x\_nx\_{n-1}\cdots x\_2x\_1=x\_nx\_{n-1}\cdots x\_2=\cdots =x\_nx\_{n-1}=x\_n$, a contradiction to $(x\_n,x\_1)$ being irregular.


**Original answer.** It seems there are no cycles. First note that if $S$ is almost breakable, then the principal ideals in $S$ form a chain, for if $x,y\in S$, then either $xy\in \{x,y\}$ or $yx\in \{x,y\}$ and so either $SxS\subseteq SyS$ or conversely. Two elements that generate the same principal ideal are called $\mathscr J$-equivalent.


I will use a little bit of structural semigroup theory of bands. Maybe this can be avoided. Each $\mathscr J$-class of a band is a rectangular band (satisfies the identity $xyx=x$). If a rectangular band is not a left or right zero semigroup, then it contains elements $x,y$ with $xy\notin \{x,y\}$ and $yx\notin \{x,y\}$. Thus each $\mathscr J$-class of an almost breakable semigroup is a left zero semigroup or a right zero semigroup.


Let $(x\_1,\ldots, x\_n)$ be a cycle and assume without loss of generality that $x\_1$ generates the largest principal ideal amongst these elements. Then since $x\_2x\_1\in \{x\_1,x\_2\}$, we must have $x\_2x\_1=x\_2$ by choice of $x\_1$ (for if $x\_2x\_1=x\_1$, then these elements are $\mathscr J$-equivalent and by the above remarks form a right zero semigroup, but then $x\_1x\_2=x\_2\in \{x\_1,x\_2\}$). Assume inductively that $x\_ix\_{i-1}=x\_i$ for $1\leq i\leq k<n$. Notice that $x\_{k-1}x\_k\neq x\_k$, but $x\_kx\_{k-1}x\_k = x\_k$ and so $x\_{k-1}x\_k$ and $x\_k$ are in the same $\mathscr J$-class and this $\mathscr J$-class is a left zero semigroup. Suppose that $x\_{k+1}x\_k=x\_k$. Then $x\_kx\_{k+1}\neq x\_k$ and $x\_kx\_{k+1}x\_k=x\_k$. It follows that $x\_k$ is $\mathscr J$-equivalent to $x\_kx\_{k+1}$ and they generate a right zero semigroup. But we already saw that the $\mathscr J$-class of $x\_k$ is a left zero semigroup. So $x\_{k+1}x\_k=x\_{k+1}$. Thus we have that $x\_{k+1}x\_k=x\_{k+1}$ for all $1\leq k\leq n-1$.


It follows that $x\_nx\_{n-1}\cdots (x\_2x\_1)=x\_n\cdots (x\_3x\_2)=\cdots=x\_nx\_{n-1}=x\_n$. Therefore, $x\_nx\_1=x\_n$, contradicting that $(x\_n,x\_1)$ is irregular.


