Tue, Nov 3 2026, 1:25 pm MT
Datalog fragments have been used a lot to study constraint satisfaction problems (CSPs) that are solvable in polynomial time. Well known fragments are linear Datalog, symmetric linear Datalog, and arc monadic Datalog, better known as arc consistency. We introduce n-almost symmetric Datalog and study n-almost symmetric linear arc monadic Datalog. We characterize the finite relational structures whose CSP is solved by this Datalog fragment as those that can be primitive positively constructed from the transitive tournament on n + 2 vertices. We also give characterizations in terms of a certain homomorphism duality (which we call n-fixed unfolded caterpillar duality) and in universal-algebraic terms (the existence of k-absorptive operations and of operations forming an elevator chain of length n + 1).