In theoretical computer science and formal language theory, a '''ranked alphabet''' is a pair of an ordinary alphabet ''F'' and a function ''Arity'': ''F''→<math>\mathbb{N}</math>. Each letter in ''F'' has its arity so it can be used to build terms. Nullary elements (of zero arity) are also called '''constants'''. Terms built with unary symbols and constants can be considered as strings. Higher arities lead to proper trees.

For instance, in the term :<math>f(a,g(a),f(a,b,c))</math>, ''a,b,c'' are constants, ''g'' is unary, and ''f'' is ternary.

Contrariwise, :<math>f(a,f(a))</math> cannot be a valid term, as the symbol ''f'' appears once as binary, and once as unary, which is illicit, as ''Arity'' must be a function.

== References ==

* {{cite book| first1=Hubert| last1=Comon| first2=Max| last2=Dauchet| first3=Rémi| last3=Gilleron| first4=Florent| last4=Jacquemard| first5=Denis| last5=Lugiez| first6=Christof| last6=Löding| first7=Sophie| last7=Tison| first8=Marc| last8=Tommasi| title=Tree Automata Techniques and Applications|date=November 2008| chapter=Preliminaries | url=https://gforge.inria.fr/frs/download.php/10994/tata.pdf| accessdate=11 February 2014| ref={{harvid|Comon et al.|2008}}}}

{{Comp-sci-theory-stub}}

Category:Trees (data structures) Category:Automata (computation) Category:Formal languages Category:Theoretical computer science