File:Anagram canonical.pdf

Summary

Algorithmic anagram test using a canonical form. Own work Svg version see File:Anagram canonical svg.svg.

Licensing

w:en:Creative Commons
attribution share alike
This file is licensed under the Creative Commons Attribution-Share Alike 4.0 International license.
You are free:
  • to share – to copy, distribute and transmit the work
  • to remix – to adapt the work
Under the following conditions:
  • attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
  • share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.
Category:CC-BY-SA-4.0#Anagram%20canonical.pdf


LaTeX source code
\documentclass[12pt]{article}
\setlength{\unitlength}{1mm}
\usepackage[pdftex]{color}
\usepackage[paperwidth=92\unitlength,paperheight=41\unitlength]{geometry}
\setlength{\topmargin}{-36mm}
\setlength{\textwidth}{92\unitlength}
\setlength{\textheight}{41\unitlength}
\setlength{\oddsidemargin}{-23mm}
\setlength{\parindent}{0cm}
\pagestyle{empty}

\begin{document}
\definecolor{cIdx}      {rgb}{0.50,0.50,0.50}%  index
\definecolor{lI}        {rgb}{0.50,0.50,0.99}%  legend 1
\definecolor{lII}       {rgb}{0.50,0.50,0.99}%  legend 2
\definecolor{lCan}      {rgb}{0.99,0.50,0.50}%  legend of canonical form
\definecolor{tI}        {rgb}{0.00,0.00,0.50}%  set 1
\definecolor{tII}       {rgb}{0.00,0.00,0.50}%  set 2
\definecolor{cCan}      {rgb}{0.90,0.00,0.00}%  canonical form
\newcommand{\0}[1]{\multicolumn{1}{@{}c@{}}{\textcolor{cIdx}{#1}}}
\newcommand{\1}[1]{\textcolor{tI}{\tt #1}}
\newcommand{\2}[1]{\textcolor{tII}{\tt #1}}
\newcommand{\3}[1]{\textcolor{cCan}{\tt #1}}

\begin{tabular}[t]{@{}c|*{11}{c|}}
\multicolumn{1}{c}{}
&\0 0&\0 1&\0 2&\0 3&\0 4&\0 5&\0 6&\0 7&\0 8&\0 9&\0{10}       \\
\multicolumn{12}{c}{}   \\
\cline{2-12}
\textcolor{lI}{String 1}
&\1 m&\1 a&\1 d&\1 a&\1 m&\1 ~&\1 c&\1 u&\1 r&\1 i&\1 e \\
\cline{2-12}
\multicolumn{1}{c}{$\Downarrow$} & \multicolumn{11}{c}{}        \\
\cline{2-12}
\textcolor{lCan}{Sorted}
&\3 ~&\3 a&\3 a&\3 c&\3 d&\3 e&\3 i&\3 m&\3 m&\3 r&\3 u \\
\cline{2-12}
\multicolumn{1}{c}{$\Uparrow$} & \multicolumn{11}{c}{}  \\
\cline{2-12}
\textcolor{lII}{String 2}
&\2 r&\2 a&\2 d&\2 i&\2 u&\2 m&\2 ~&\2 c&\2 a&\2 m&\2 e \\
\cline{2-12}
\end{tabular}
\end{document}
Category:Media missing infobox template Category:Files by User:Jochen Burghardt Category:Images with LaTeX source code Category:Anagrams Category:Array data structure
Category:Anagrams Category:Array data structure Category:CC-BY-SA-4.0 Category:Files by User:Jochen Burghardt Category:Files with no machine-readable author Category:Files with no machine-readable source Category:Images with LaTeX source code Category:Media missing infobox template Category:Pages using deprecated source tags