My daughter is learning to read; I am learning TeX. So I need your help on this:
I have an array/a list of nouns (basically names of people and two mythical creatures called Fara and Fu:
noun = ["Fu", "Fara", "Uta", "Mama", "Mami", "Ralf", "Lara", "Mara", "Murat", "Marta", "Mamut", "Ira", "Mira", "Maria" ]
Together with this goes a list of verbs she can read:
verb = ["malt", "ruft", "umarmt" ]
I am looking for a way to automatically typeset all possible and sensible permutations of nouns and verb, such as this list my simple ruby script already generates:
Maria umarmt Mama.
Maria malt Uta mit mir.
Mara malt Maria.
Fu malt Mamut.
Marta malt Mama.
By "sensible" I mean not having things like
Fu umarmt Fu.
as it is physically impossible to hug oneself (unless you are James Bond).
Randomly the text " mit mir" (together with me) might be added to each sentence.
Why LaTeX? rubyonly outputs text, and here comes request number two:
The syllables of the words need to be colored blue-red-blue-red-.... for first-second-third-... syllable, such as this:

In the name of my daughter (and myself of course) - Thank you!
My current setup as per my comment below:
\documentclass[18pt,oneside,a4paper]{scrartcl}
\usepackage{pgfmath,color}
\usepackage[doublespacing]{setspace}
%Einstellungen der Seitenrnder
\renewcommand{\familydefault}{\sfdefault}
\usepackage{helvet}
\usepackage[left=4cm,right=3cm,top=3cm,bottom=3cm,includeheadfoot]{geometry}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\renewcommand{\headrulewidth}{0.5pt}
%Fu§zeile mittig
\fancyfoot[C]{\thepage}
%Linie unten
\renewcommand{\footrulewidth}{0.5pt}
%neue Rechtschreibung
\usepackage{ngerman}
\def\noun{%
{{Fu}},{{Fa}{ra}},{{U}{ta}},{{Ma}{ma}},%
{{Ma}{mi}},{{Ralf}},{{La}{ra}},%
{Ma}{ra},{{Mu}{rat}},{{Mar}{ta}},%
{{Ma}{mut}},{I}{ra},{Mi}{ra},{{Ma}{ri}{a}}%
}
\def\verb{{{malt}},{{ruft}},{{um}{armt}}%
}
\def\zc{\expandafter\zzblue}
\def\zzblue#1{%
\ifx\relax#1\else\textcolor{blue}{#1}%
\expandafter\zzred
\fi}
\def\zzred#1{%
\ifx\relax#1\else\textcolor{red}{#1}%
\expandafter\zzblue
\fi}
\begin{document}
\makeatletter
\@for\za:=\noun\do{%
\@for\zb:=\noun\do{%
\ifx\za\zb\else
\@for\v:=\verb\do{
\par\zc\za\relax\ \zc\v\relax\ \zc\zb\relax
\pgfmathparse{random(2)}%
\ifnum\pgfmathresult=1\ \textcolor{blue}{mit mir}\fi.
}%
\fi
}}
\end{document}
\pgfmathparse{random(8)}%
\let\zza\pgfmathresult
\pgfmathparse{random(8)}%
\show\pgfmathresult