# Вневписанные окружности и дюжины точек.
(Представляется В. Филимоновым и А. Заславским.)
О появлении этой серии задач.
Всё началось со следующей задачи, которую мне сообщил Д. Терёшин.
Задача (Д. Терёшин). Рассмотрим треугольник $A B C$ и две его вневписанные окружности, одна из которых касается стороны $A C$ в точке $K$ и продолжений сторон $A B$ и $B C$ в точках $L$ и $M$, а другая - стороны $A B$ в точке $P$ и продолжений сторон $A C$ и $B C$ в точках $Q$ иR. Докажите, что точка пересечения $X$ прямых $L M$ и $Q R$ лежит на высоте (проведённой из вершины $A$ ) треугольника $A B C$.
Сходу геометрического решения этой задачи найти не удалось, работали лишь вычислительные способы. Некоторые наблюдения добавили интригу в этот сюжет. Оказалось, что также точка пересечения $Y$ прямых $K M$ и $P R$ лежит на высоте треугольника $A B C$, а кроме того, длины отрезков $A Y$ и $A X$ равны соответственно радиусу вписанной окружности и вневписанной окружности, касающейся стороны $B C$. Были обнаружены другие многочисленные факты, обнаружилась связь с известными трудными задачами олимпиад (некоторые из них присутствуют в серии). Желание получить чисто геометрические объяснения этих фактов побудило рассмотреть более подробно точки касания сторон с вписанной и вневписанными окружностями, и прямые, их соединяющие. Эти четыре окружности обладают различиями, связанными с геометрическим расположением: скажем, вписанная окружность всегда меньше вневписанной, вписанная расположена внутри, а вневписанная - вне треугольника. Однако, эти окружности имеют общие глубокие свойства: каждая из них касается трёх прямых, содержащих стороны треугольника, центр каждой из них лежит на пересечении трёх биссектрис углов треугольника (если под биссектрисой понимать внутреннюю либо внешнюю биссектрису), и как правило, наличие некоторого свойства у одной из окружностей влечёт наличие этого свойства (или аналога этого свойства) и у других. Поэтому вписанная и вневписанные окружности в некотором смысле равноправны по отношению к данному треугольнику, и для понимания некоторых важных геометрических фактов понадобилось одновременное рассмотрение всей четвёрки окружностей. Этим объясняется введение не вполне стандартных, но «равноправных» обозначений (см. ниже).
Разделы А, В, С этой серии появились в результате работы автора текста совместно с И. Богдановым, раздел D добавлен А. Заславским. Благодарим А. Акопяна и В. Протасова за проявленное внимание и замечания.
## П. Кожевников
## Обозначения.
Все рассмотрения происходят в произвольном неравнобедренном треугольнике $A B C$. На протяжении всей серии придерживаемся следующих обозначений для объектов, связанных с треугольником $A B C$.
$R, p$ - радиусы описанной и вписанной окружности, полупериметр;
$a, b, c$ - длины сторон $B C, C A, A B$;
$A^{\prime}, B^{\prime}, C^{\prime}$ - середины сторон $B C, C A, A B$;
$A H_{a}, B H_{b}, C H_{c}$ - высоты, $H$ - ортоцентр треугольника $A B C$;
$\Omega$ - описанная окружность, $O$ - её центр;
$\omega_{0}$ - вписанная окружность, $I_{0}$ - её центр; $\omega_{1}, \omega_{2}, \omega_{3}$ - вневписанные окружности (касающиеся соответственно сторон $B C, C A, A B), I_{1}, I_{2}, I_{3}$ - их центры, $r_{i}$ - радиусы окружностей $\omega_{i}$;
$I_{0}^{\prime}, I_{1}^{\prime}, I_{2}^{\prime}, I_{3}^{\prime}$ - центры вписанной и вневписанных окружностей треугольника $A^{\prime} B^{\prime} C^{\prime}$.
В предложенных обозначениях присутствует следующая симметрия: Заметим, что 6 прямых $I_{i} I_{j}$ $(i \neq j)$ - внешние и внутренние биссектрисы треугольника $A B C$. Поэтому четвёрка точек $I_{0}, I_{1}, I_{2}, I_{3}$ - ортоцентрическая, и треугольник $A B C$ - ортотреугольник (то есть треугольник с вершинами в основаниях высот любого из четырёх треугольников $\left.I_{0} I_{1} I_{2}, I_{1} I_{2} I_{3}, I_{2} I_{3} I_{0}, I_{3} I_{0} I_{1}\right)$. При этом точки $A, B, C$ однозначно соответствуют разбиениям множества из четырёх индексов $\{0,1,2,3\}$ на пары: $A=I_{0} I_{1} \cap I_{2} I_{3}, B=I_{0} I_{2} \cap I_{1} I_{3}, C=I_{0} I_{3} \cap I_{1} I_{2}$.
## Серия А: Первая дюжина: точки касания
Пусть $A_{i}, B_{i}, C_{i}(i=0,1,2,3)$ - точки касания окружности $\omega_{i}$ с прямыми $B C, C A, A B$ соответственно (на рис. А - красные точки, их 12 штук).
А1. $A_{0}$ и $A_{1}$, а также $A_{2}$ и $A_{3}$ симметричны относительно $A^{\prime}$, причём $A_{0} A_{3}=A_{1} A_{2}=c, A_{0} A_{2}=$ $A_{1} A_{3}=b, A^{\prime} A_{0}=A^{\prime} A_{1}=\frac{|b-c|}{2}, A^{\prime} A_{2}=A^{\prime} A_{3}=\frac{b+c}{2}$. (Аналогично - симметрия относительно $B^{\prime}$ и $C^{\prime}$.)
А2. а) Прямые $A A_{i}, B B_{i}, C C_{i}$ пересекаются в одной точке.
б) Прямые $A A_{1}, B B_{2}, C C_{3}$ пересекаются в одной точке. (Аналогично, тройки прямых $A A_{0}$, $B B_{3}, C C_{2} ; A A_{2}, B B_{1}, C C_{0} ; A A_{3}, B B_{0}, C C_{1}$ пересекаются в одной точки или параллельны.)
А3. Радикальные оси пар окружностей $\omega_{i}$ и $\omega_{j}$ - внутренние и внешние биссектрисы углов треугольника $A^{\prime} B^{\prime} C^{\prime}$. (Найдите радикальные центры всевозможных троек из окружностей $\omega_{0}, \omega_{1}$, $\omega_{2}, \omega_{3}$.)
A4\#. Среди окружностей, касающихся тройки окружностей $\omega_{1}, \omega_{2}, \omega_{3}$, есть три окружности, проходящие через точку $I_{0}^{\prime}$. (Докажите аналогичное утверждение для других троек окружностей.)
A5\#. $A A_{1} \| I_{0} A^{\prime}$ (аналогично $A A_{0}\left\|I_{1} A^{\prime}, A A_{2}\right\| I_{3} A^{\prime}, A A_{3} \| I_{2} A^{\prime}$ и т. д.).
А6\#. Прямые $I_{0} A_{1}, I_{1} A_{0}, I_{2} A_{3}, I_{3} A_{2}$ пересекаются в одной точке. Что это за точка?
## Серия В: Вторая дюжина: «фокусы»
Обозначим точки пересечения $B_{01}=B_{10}=A_{0} B_{0} \cap A_{1} B_{1}, B_{23}=B_{32}=A_{2} B_{2} \cap A_{3} B_{3}$. (Здесь $A_{0} B_{0} \cap A_{1} B_{1}$ - это именно $B_{01}$, а не $A_{01}$, так как $A$ соответствует разбиению множества индексов $\{0,1,2,3\}$ на пары 0,1 и 2,3 .) Аналогично определим точки все 12 точек: $A_{i j}$, где $i \in\{0,1\}, j \in\{2,3\}$ (везде полагаем $A_{i j}=A_{j i}$ ); $B_{i j}$, где $i \in\{0,2\}, j \in\{1,3\} ; C_{i j}$, где $i \in\{0,3\}, j \in\{1,2\}$. На рис. В1, В2 все эти точки - фиолетовые точки.
Докажите следующие утверждения
В0. Докажите, что угол $B_{2} B_{23} B_{3}$ - прямой (то же для аналогичных углов).
B1. Точки $B_{23}, C_{23}, A_{2}, A_{3}$ лежит на одной окружности. Найдите центр этой окружности. (Аналогично точки $B_{01}, C_{01}, A_{0}, A_{1}$ лежат на одной окружности, и т. д., таким образом получается, что красные и фиолетовые точки расположены на шести окружностях.)
B2. $A_{i j}$ лежат на средней линии $B^{\prime} C^{\prime}$ (аналогично, $B_{i j}$ и $C_{i j}$ лежат на средних линиях, таким образом, 12 фиолетовых точек расположены по 4 на трёх прямых $\left.A^{\prime} B^{\prime}, B^{\prime} C^{\prime}, C^{\prime} A^{\prime}\right)$.
B3. $A_{13}$ (и аналогично $A_{02}, B_{01}, B_{23}$ лежат на окружности с диаметром $A B$, (причём $A_{02} B_{01} A_{13} B_{23}-$ прямоугольник.) (Таким образом, фиолетовые точки - расположены по 4 на трёх окружностях с диаметрами $B C, C A, A B)$.
В4. Выразите длины $A_{02} A_{03}$ и т.д. через $a, b, c$.
B5. Точка $A_{i j}$ лежит на прямой $I_{i} I_{j}$, причём $A_{i j}$ является проекцией точки $A$ на прямую $I_{i} I_{j}$. (таким образом, 12 фиолетовых точек лежат по две на шести биссектрисах углов треугольника $A B C$ ).
B6. Точки $A_{02}$ и $C_{02}$ - фокусы окружностей $\omega_{0}$ и $\omega_{2}$ (то есть $A_{02}$ и $C_{02}$ - пара точек, инверсных относительно каждой из этих двух окружностей). (Таким образом, фиолетовые точки разбиваются на 6 пар фокусов; отсюда, в частности, следует, что внутри каждой из окружностей $\omega_{i}$ лежит ровно три фиолетовые точки).
B7\#. Найдите радикальные центры восьми троек таких окружностей с разными центрами из задачи B1.
B8\#. Шестёрка точек $A_{03} A_{02} C_{02} C_{23} B_{23} B_{03}$ лежит на одной окружности (имеются ещё три аналогичные окружности). Найдите центры этих окружностей. Выразите их радиусы через элементы треугольника $A B C$.
B9\#. $A_{02}$ и $A_{13}$ - центры соответственно вписанной и вневписанной, либо двух вневписанных окружностей для треугольника $B^{\prime} H_{a} H_{b}$.
## Серия С: Третья дюжина: «пересечения - на высотах»
Положим $A_{(3)}=A_{0} C_{0} \cap A_{1} B_{1}$ (Здесь $A_{0} C_{0} \cap A_{1} B_{1}$ - это именно $A_{(3)}$, а не $A_{(2)}$, так как точке $C$ соответствует разбиению индексов на пары 0,3 и 1,2 , и индекс 3 - это второй индекс из пары, содержащей 0). Аналогично, $A_{(2)}=A_{0} B_{0} \cap A_{1} C_{1}, A_{(0)}=A_{2} B_{2} \cap A_{3} C_{3}, A_{(1)}=A_{2} C_{2} \cap A_{3} B_{3}$, и точно так же вводятся точки $B_{(i)}$ и $C_{(i)}$ - всего 12 точек, они отмечены зелёным на рис. С.
Докажите следующие утверждения.
С1. Точки $A_{(i)}$ лежат на прямой $A H_{a}$ (и аналогично для точек $B_{(i)}$ и $C_{(i)}$, таким образом 12 зелёных точек лежат по 4 точки на каждой из высот треугольника $A B C$ ).
С2. Отрезок $A A_{(i)}$ равен по длине $r_{i}$.
С3. Прямая $A_{(i)} A_{i}$ параллельна одной из биссектрис угла $A$.
С4. Докажите, что прямые $A_{(1)} A_{1}, B_{(2)} B_{2}$ и $C_{(3)} C_{3}$ пересекаются в одной точке. (Аналогично, имеются ещё три тройки прямых, пересекающихся в одной точке: $A_{(0)} A_{0}, B_{(3)} B_{3}$ и $C_{(2)} C_{2} ; A_{(3)} A_{3}$, $B_{(0)} B_{0}$ и $C_{(1)} C_{1} ; A_{(2)} A_{2}, B_{(1)} B_{1}$ и $C_{(0)} C_{0}$.
С5. Треугольники $A_{1} B_{2} C_{3}$ и $A_{(0)} B_{(0)} C_{(0)}$ центрально симметричны. Найдите их центр симметрии. (Аналогично, пары треугольников $A_{0} B_{3} C_{2}$ и $A_{(1)} B_{(1)} C_{(1)}, A_{3} B_{0} C_{1}$ и $A_{(2)} B_{(2)} C_{(2)}, A_{2} B_{1} C_{0}$ и $A_{(3)} B_{(3)} C_{(3)}$ центрально симметричны.)
С6. Описанные окружности треугольников $A_{(1)} B_{(2)} C_{(3)}, A_{(0)} B_{(3)} C_{(2)}, A_{(3)} B_{(0)} C_{(1)}, A_{(2)} B_{(1)} C_{(0)}$ имеют общий центр (таким образом зелёные точки расположены по три на четырёх концентрических окружностях). Найдите общий центр этих четырёх окружностей.
С7.\# Выразите длины отрезков $A H, B H, C H$ через радиусы $r_{i}$.
С8.\# Выразите радиус описанной окружности треугольника $A_{(1)} B_{(2)} C_{(3)}$ через $R$ и $r_{0}$. (Аналогичным образом, выразите радиусы окружностей из задачи С6.)
С9.\# Прямая $I_{i} A^{\prime}$ проходит через $A_{(i)}$ (аналогично $I_{i} B^{\prime}$ проходит через $B_{(i)}, I_{i} C^{\prime}$ проходит через $C_{(i)}$ ).
## Серия D: Четвертая дюжина.
Положим $C_{0}^{*}=A_{0} B_{0} \cap A_{1} B_{2}$, и аналогично введём 12 точек $A_{i}^{*}, B_{i}^{*}, C_{i}^{*}$ (на рис. D они покрашены синим). (Построение этих точек легко описывается следующим образом: Возьмём одну из окружностей, например $\omega_{0}$. Возьмём точки её касания с двумя сторонами, например $A_{0}, B_{0}$. Возьмём точки касания этих же сторон с двумя другими окружностями, которые симметричны выбранным ранее относительно соответствующих середин, в данном случае $A_{1}, B_{2}$. Построим точку пересечения прямых, соединяющих две выбранных пары точек касания).
Докажите следующие утверждения.
D1. Стороны треугольника $A_{i}^{*} B_{i}^{*} C_{i}^{*}$ проходят через вершины $A B C$.
$\mathrm{D} 2$. Проведём через $C_{i}^{*}$ произвольную прямую и найдем точки $A^{\prime \prime}, B^{\prime \prime}$ её пересечения со сторонами $B C, A C$. Тогда прямые $A^{\prime \prime} B_{i}^{*}, B^{\prime \prime} A_{i}^{*}$ пересекаются в некоторой точке $C^{\prime \prime}$ стороны $A B$.
D3. Прямые $A A^{\prime \prime}, B B^{\prime \prime}, C C^{\prime \prime}$ пересекаются в одной точке, изогонально сопряжённая к которой лежит на прямой $O I_{i}$.
D4. Окружность $A^{\prime \prime} B^{\prime \prime} C^{\prime \prime}$ проходит через точку Фейербаха $F_{i}$. Наверное, есть ещё какие-то свойства.
D5. Четыре синие точки, обозначенные одной буквой, лежат на одной прямой - соответствующей стороне ортотреугольника.
D6. а) Треугольники $A_{i}^{*} B_{i}^{*} C_{i}^{*}$ и $A B C$ перспективны (то есть прямые, соединяющие соответствующие вершины этих треугольников, пересекаются в одной точке).
b) Попытайтесь отыскать какие-либо соотношения между четырьмя центрами перспективы.
D7. (Обобщение задачи D4) Рассмотрим произвольную точку $C^{* *}$ на прямой $H_{a} H_{b}$. Проведём через $C^{* *}$ произвольную прямую и найдем точки $A^{\prime \prime}, B^{\prime \prime}$ её пересечения со сторонами $B C, A C$. Пусть $P$ - точка пересечения прямых $A A^{\prime \prime}$ и $B B^{\prime \prime}$, а $C^{\prime \prime}$ - точка пересечения $C P$ и $A B$. Тогда описанные окружности всех треугольников $A^{\prime \prime} B^{\prime \prime} C^{\prime \prime}$ имеют общую точку.
## Вневписанные окружности и дюжины точек.
## Указания, решения, комментарии.
## Серия А: Дюжина точек касания
A1. Следует из подсчёта отрезков касательных, например, $2 A B_{1}=A B_{1}+A C_{1}=A B+B A_{0}+A C+$ $+C A_{0}=2 p$, откуда $B^{\prime} B_{1}=p-\frac{b}{2}=\frac{a+c}{2}$. (См. также замечание к задаче В5.)
А2. Следует из теоремы Чевы (используется равенство отрезков касательных).
А3. Из задачи А1 следует, что точка $A^{\prime}$ имеет равные степени относительно окружностей $\omega_{2}$ и $\omega_{3}$, значит $A^{\prime}$ лежит на их радикальной оси. Кроме того, эта радикальная ось перпендикулярна линии центров $I_{2} I_{3}$, то есть параллельна (внутренней) биссектрисе угла $B A C$ или угла $B^{\prime} A^{\prime} C^{\prime}$. Таким образом, радикальная ось - биссектриса угла $B^{\prime} A^{\prime} C^{\prime}$. Искомые радикальные центры точки $I_{0}^{\prime}, I_{1}^{\prime}, I_{2}^{\prime}, I_{3}^{\prime}$.
А4\#. (Эта задача формулировалась как гипотеза в докладе К. Кузнецовой (Великие Луки) на конференции школьников «Старт в науку - 2009»)
Из задачи А3 следует, что существует инверсия с центром $I_{0}^{\prime}$, переводящая каждую из окружностей $\omega_{1}, \omega_{2}, \omega_{3}$ в себя. При этой инверсии прямые $A B, B C, C A$ перейдут в окружности, проходящие через $I_{0}^{\prime}$ и касающиеся окружностей $\omega_{1}, \omega_{2}, \omega_{3}$.
A5\#. Гомотетия с центром $A$, переводящая $\omega_{1}$ в $\omega_{0}$, переводит диаметр $K A_{1}$ в диаметр $A_{0} L$. Таким образом, прямая $A A_{1}$ совпадает с прямой $L A_{1}$. После этого наблюдения утверждение задачи следует из того, что $I_{0} A^{\prime}$ - средняя линий треугольника $A_{0} L A_{1}$.
А6\#. В обозначениях из решения предыдущей задачи: треугольники $A_{1} L A_{0}$ и $A_{1} A H_{a}$ гомотетичны (с центром $A_{1}$ ), поэтому прямая $A_{1} I_{0}$ является медианой в треугольнике $A_{1} A H_{a}$, то есть проходит через середину высоты $A H_{a}$.
## Серия В: Вторая дюжина: «фокусы»
В0. Следует из того, что прямые $A_{i} B_{i}$ параллельны биссектрисам угла $C$ (внешней или внутренней).
В1. Из задачи В0 следует, что $A_{2} B_{23} \perp A_{3} B_{23}$ и $A_{2} C_{23} \perp A_{3} C_{23}$, поэтому указанные 4 точки лежат на одной окружности с диаметром $A_{2} A_{3}$. Из А1 следует, что центр этой окружности $-A^{\prime}$ (а радиус равен $\frac{b+c}{2}$. Аналогично, точки $B_{01}, C_{01}, A_{0}, A_{1}$ лежат на одной окружности с центром $A^{\prime}$ (и радиусом $\left.\frac{|b-c|}{2}\right)$.
В2. В прямоугольном треугольнике $A_{2} B_{23} A_{3}$ имеем: $A^{\prime} B_{23}=A^{\prime} A_{2}$, (и равно $\frac{b+c}{2}-$ см. А2), поэтому равнобедренные треугольники $A_{2} A^{\prime} B_{23}$ и $A_{2} C B_{2}$ гомотетичны, и $A^{\prime} B_{23} \| A C$, то есть $B_{23}$ лежит на средней линии $A^{\prime} C^{\prime}$.
Замечание. $B_{23}$ также лежит на окружности с диаметром $B_{2} B_{3}$.
B3. Зная, длину $A^{\prime} B_{23}$ (см. B1), легко найти $C^{\prime} B_{23}=A^{\prime} B_{23}=A^{\prime} C^{\prime}=\frac{c}{2}$, поэтому $B_{23}$ лежит на окружности радиуса $\frac{c}{2}$ с центром $C^{\prime}$. Для других точек типа $B_{i j}$ подсчёт аналогичен.
В4. Из В2 легко получить: $A_{13} A_{12}=A_{13} C^{\prime}+C^{\prime} B^{\prime}+B^{\prime} A_{12}=\frac{c+a+b}{2}=p ; A_{13} A_{03}=A_{13} A_{12}-$ $-A_{03} A_{12}=p-b$ (так как $A_{03} A_{12}$ - диаметр окружности из $\mathrm{B} 2$ ). Аналогично $A_{03} A_{02}=p-a$, $A_{02} A_{12}=p-c$.
B5. (Одна из возможных конфигураций этой задачи - в задаче 1.66 в задачнике Прасолова, см. также статью Протасова («Квант», № 4 - 2008); также см. задачу 255 из задачника Шарыгина $9-11$, которую автор даже отмечает (случайно ли?) в предисловии.)
Из $\mathrm{B} 1$ и $\mathrm{B} 2$ имеем: $C^{\prime} B_{23} \| A C$ и $C^{\prime} B_{23}=C^{\prime} A$, откуда $\angle B_{23} A C^{\prime}=\angle C^{\prime} A B_{23}=\angle B_{23} A B_{3}$, таким образом, $A B_{23}$ - внешняя биссектриса угла $B A C$. Кроме того, из В2 следует, что $B B_{23} \perp A B_{23}$. Для других точек доказательство аналогично.
Замечание. Обратим внимание на множество параллелограммов на рисунке (стороны которых параллельны либо сторонам треугольника $A B C$, либо его биссектрисам). Скажем, из параллелограммов $A_{3} A_{13} A_{23} C$ и $B A_{13} A_{23} A_{2}$ видно геометрическое объяснение задачи $\mathrm{A} 1$.
B6. Треугольники $I_{0} A_{02} B_{0}$ и $I_{0} B_{0} C_{02}$ подобны (в подсчёте углов используем, что $B_{0} C_{02}$ параллельна внешней биссектрисе угла $A B C$ ), откуда $I_{0} A_{02} \cdot I_{0} C_{02}=r_{0}^{2}$.
B7\#. Искомые радикальные центры - это точки $I_{i}$, а также точки, симметричные им относительно центра описанной окружности треугольника $A B C$.
Например, из В6 следует, что $I_{0} A_{02} \cdot I_{0} C_{02}=I_{0} A_{03} \cdot I_{0} B_{03}=I_{0} B_{01} \cdot I_{0} C_{01}=r_{0}^{2}$, значит степени точки $I_{0}$ относительно окружностей, построенных на отрезках $A_{0} A_{1}, B_{0} B_{2}, C_{0} C_{2}$ как на диаметрах (см. В1), равны.
Далее, рассмотрим, например, окружности с диаметрами $A_{2} A_{3}, B_{1} B_{3}$ и $C_{1} C_{2}$. Точка $I_{3}$ лежит на радикальной оси первых двух окружностей, так как равные отрезки $I_{3} A_{2}$ и $I_{3} B_{1}$ являются касательными к этим окружностям. Кроме того, радикальная ось перпендикулярна линии центров этих окружностей, то есть средней линии треугольника $A B C$. Три таких прямые пересекаются в точке, симметричной $I$ относительно $O$.
B8\#. Это окружности с центрами $I_{i}^{\prime}$.
В самом деле, пусть, скажем, $X$ - проекция $I_{0}^{\prime}$ на $B^{\prime} C^{\prime}$. Тогда из В3 вытекает: $X A_{12}=X B^{\prime}+$ $+B^{\prime} A_{12}=\frac{p-b}{2}+\frac{b}{2}=\frac{p}{2}$. Тогда $I_{0}^{\prime} A_{12}^{2}=I_{0}^{\prime} X^{2}+X A_{12}^{2}=\frac{r_{0}^{2}+p^{2}}{4}$. Аналогично квадрат расстояния от точки $I_{0}^{\prime}$ до любой из точек $A_{03}, A_{02}, C_{02}, C_{23}, B_{23}, B_{03}$ равен $\frac{r^{2}+p^{2}}{4}$.
Таким же образом, доказывается, что окружность с центром $I_{1}^{\prime}$ имеет радиус $\frac{r_{1}^{2}+(p-a)^{2}}{4}$ и т. д.
Замечание. На самом деле, нетрудно установить общий факт: три пары фокусов для трёх окружностей, центры которых не лежат на одной прямой, лежат на одной окружности (доказательство - упражнение на степень точки плюс тот факт, что радикальные оси должны пересекаться в одной точке).
Замечание. Это одна из окружностей семейства Тукера для треугольника $I_{1} I_{2} I_{3}$.
В9\#. (См. также статью В. Протасова из «Кванта» № $4-2008$, эта задача играет важную роль в доказательстве теоремы Фейербаха.) $C_{0} A_{02}$ - биссектриса угла $A B^{\prime} H_{a}$ (из симметрии). Рассмотрим окружность девяти точек, треугольник $B^{\prime} H_{a} H_{b}$, вписанный в эту окружность, и точку $C^{\prime}$ - середину дуги $H_{a} H_{b}$. Так как (см. В3) $C^{\prime} A_{02}=C^{\prime} H_{a}=C^{\prime} H_{b}$, то по теореме, обратной лемме о трезубце, получаем, что $A_{02}$ - центр вписанной или вневписанной окружности для треугольника $B^{\prime} H_{a} H_{b}$.
## Серия С: Третья дюжина: «пересечения - на высотах»
С1-3. Из В5 следует, что $A A_{02} A_{0} A_{03}$ - параллелограмм (его стороны параллельны (внешним) биссектрисам углов $C B A$ и $A C B$ ). Также $A_{(0)} A_{02} I_{0} A_{03}$ - параллелограмм (его стороны параллельны (внутренним) биссектрисам углов $C B A$ и $A C B$. Поэтому $\overrightarrow{I_{0} A_{0}}$ и $\overrightarrow{A_{(0)} A}$ симметричны относительно середины отрезка $A_{02} A_{03}$. Отсюда вытекает $\mathrm{C} 1$ и $\mathrm{C} 2$. Так как $I_{0} A_{0} A_{(0)} A$ - параллелограмм, то $A_{(i)} A_{i} \| A I_{0}$.
С4. (Это задача Емельянова 10.7 с 5 этапа Всероссийской олимпиады 2002? года.) Из С3 вытекает, что эти прямые - высоты треугольника $A_{(1)} B_{(2)} C_{(3)}$.
Замечание. Можно показать, что точка пересечения указанных трёх прямых симметрична ортоцентру треугольника $A_{0} B_{0} C_{0}$ относительно точки $I_{0}^{\prime}$.
С5. Покажем, что искомые центры симметрии - точки $I_{i}^{\prime}$.
Так как радикальная ось делит пополам отрезки общих касательных, из задачи А3 вытекает, что прямые $B_{2} C_{2}\left(=B_{2} C_{(0)}\right)$ и $B_{3} C_{3}\left(=C_{3} B_{(0)}\right)$ симметричны относительно прямой $A^{\prime} I_{0}^{\prime}$, или относительно точки $I_{0}^{\prime}$. Аналогично, прямые $A_{1} C_{(0)}$ и $C_{3} A_{(0)}$ симметричны относительно $I_{0}^{\prime}$. Это означает, что соответствующие точки пересечения $C_{(0)}$ и $C_{3}$ симметричны относительно $I_{0}^{\prime}$.
С6. Искомый центр - точка $H$.
Из $\mathrm{C} 1$ мы знаем, что например, $A_{(0)}=A_{3} C_{3} \cap A H_{a}$ и $C_{(2)}=A_{3} C_{3} \cap C H_{c}$. Так как $A_{3} C_{3}$ параллельна биссектрисе угла $B$, то $A_{3} C_{3}$ образует также равные углы с высотами $A H_{a}$ и $C H_{c}$. Отсюда вытекает, что треугольник $H A_{(0)} C_{(2)}$ равнобедренный, то есть $H$ равноудалена от $A_{(0)}$ и $C_{(2)}$.
С7-8. Радиусы описанных окружностей из задачи С6 равны $\left|\rho_{i}\right|$, где $\rho_{0}=A H+r_{1}=B H+r_{2}=$ $=C H+r_{3}, \rho_{1}=r_{0}-A H=B H-r_{3}=C H-r_{2}, \rho_{2}=A H-r_{3}=r_{0}-B H=C H-r_{1}$, $\rho_{3}=A H-r_{2}=B H-r_{1}=r_{0}-C H$ (здесь $A H$ и т. д. позволим быть отрицательными, если соответствующий угол треугольника тупой). Отсюда выражаем $A H, B H, C H$ через радиусы $r_{i} A H=\frac{r_{0}+r_{1}+r_{2}+r_{3}}{2}-r_{1}, B H=\frac{r_{0}+r_{1}+r_{2}+r_{3}}{2}-r_{2}, C H=\frac{r_{0}+r_{1}+r_{2}+r_{3}}{2}-r_{3}$.
Получаем: $\rho_{0}=\frac{r_{0}+r_{1}+r_{2}+r_{3}}{2}, \rho_{1}=\frac{r_{0}+r_{1}-r_{2}-r_{3}}{2}, \rho_{2}=\frac{r_{0}-r_{1}+r_{2}-r_{3}}{2}, \rho_{3}=$ $=\frac{r_{0}-r_{1}-r_{2}+r_{3}}{2}$, или с учётом соотношения $r_{1}+r_{2}+r_{3}=4 R+r_{0}$ (см. задачник Прасолова 12.24), $\rho_{0}=r_{0}+2 R, \rho_{1}=\left|r_{1}-2 R\right|, \rho_{2}=\left|r_{2}-2 R\right|, \rho_{3}=\left|r_{3}-2 R\right|$.
С9.\# Из задачи А5 вытекает, что, скажем, $I_{0} A^{\prime}$ пересекает высоту $A H_{a}$ в точке $S$ такой, что $\overrightarrow{A S}=$ $\overrightarrow{I_{0} A_{0}}$, то есть в точке $A_{(0)}$ (см. задачи С1-2).
С10.\# (задача предложена Д. Прокопенко) 1. Нетрудно видеть, что $A-$ середина $M N$, поэтому $A A_{(0)}$ серединный перпендикуляр в треугольнике $M A_{0} N$.
2. Из задачи СЗ следует, что $A_{0} A_{(0)}$ и $A_{0} I_{0}$ симметричны относительно биссектрисы угла $M A_{0} N$. Так как $A_{0} I_{0}$ - высота треугольника, то прямая $A_{0} A_{(0)}$ содержит центр описанной окружности треугольника $M A_{0} N$. Из 1 и 2 следует требуемое.
Ответ: ортоцентром треугольника $A_{0} M N$ является точка, симметричная $A_{0}$ относительно $I_{0}$.
Задачи серии D представляют собой переформулировку утверждения теоремы Емельяновых, и их решения могут быть найдены в книге «Летние Конференции Турнира Городов. Избранные материалы. Выпуск 1.» МЦНМО, 2009.
# Excircles and Dozens of Points.
(Presented by V. Filimonov and A. Zaslavsky.)
## On the Origin of this Series of Problems.
The work on this series started from the problem posed by D. Tereshin.
Problem (D. Tereshin). Consider triangle $A B C$ and its excircles: one of them touches the side $A C$ at $K$ and touches the lines $A B$ and $B C$ at $L$ and $M$, the other touches the side $A B$ at $P$ and touches the lines $A C$ and $B C$ at $Q$ and $R$. Prove that the intersection point $X$ of the lines $L M$ and $Q R$ lies on the altitude (passing through $A$ ) of the triangle $A B C$.
At once the geometrical solution was not found, only calculations work. Some observations made this problem more exciting. It appears that the intersection point $Y$ of lines $K M$ and $P R$ lies on the altitude of triangle $A B C$, and the length of the segments $A Y$ and $A X$ equal to the radii of incircle and excircle touching the side $B C$. Some other results were obtained, and some connections with known problems from olympiads were established. In search for the geometrical explanation of these results we tried to consider in details the touch points of the sides with incircle and excircles, and the lines joining these touch points.
The incircle and the excircles have some different properties (for example, the incircle is smaller than any of the excircles, the incircle lies inside the triangle while the excircle lies outside the triangle). Nevertheless, these four circles have deep common properties: each of them touches the three sidelines of the triangle, the center of each circle is the intersection of three angle bisectors (either internal or external). So as a rule, if one of the four circles has some property, then the others have an analogous property. That is why these four circles in some sense enjoy equal rights with respect to the original triangle. To understand some important geometrical results we need to consider all the four circles simultaneously. Thus we introduce some non-regular but symmetrical notation (see below).
The sections A, B, C of the project were made by the author of the text jointly with I. Bogdanov, the section D was added by A. Zaslavsky. Also A. Akopyan, D. Prokopenko, and V. Protassov had made many useful notes and additions.
## Excircles and Dozens of Points.
## Notation.
In a fixed non-equilateral triangle $A B C$ let us denote:
$R, p$ - the radius of the circumcircle and semiperimeter;
$a, b, c$ - lengths of $B C, C A, A B$;
$A^{\prime}, B^{\prime}, C^{\prime}$ — midpoints of $B C, C A, A B$;
$A H_{a}, B H_{b}, C H_{c}$ - altitudes, $H$ - orthocenter of triangle $A B C$;
$\Omega$ - circumcircle, $O$ - circumcenter;
$\omega_{0}$ - incircle, $I_{0}$ — incenter; $\omega_{1}, \omega_{2}, \omega_{3}$ - excircles (touching segments $B C, C A, A B$, respectively), $I_{1}, I_{2}, I_{3}$ — centers of the excircles, $r_{i}$ - radii of $\omega_{i}$;
$I_{0}^{\prime}, I_{1}^{\prime}, I_{2}^{\prime}, I_{3}^{\prime}$ - centers of incircle and excircles of triangle $A^{\prime} B^{\prime} C^{\prime}$.
The notation has the following symmetry: Note that 6 lines $I_{i} I_{j}(i \neq j)$ are internal and external bisectors of triangle $A B C$. Therefore the quadruple $I_{0}, I_{1}, I_{2}, I_{3}$ is orthocentric, and $A B C$ is the orthotriangle (that is the triangle having feet of altitudes as vertices) for each of triangles $I_{0} I_{1} I_{2}, I_{1} I_{2} I_{3}, I_{2} I_{3} I_{0}$, $I_{3} I_{0} I_{1}$ ). To each of the points $A, B, C$ we put into correspondence a partition of 4 -element set $\{0,1,2,3\}$ into two 2-element subsets: $A=I_{0} I_{1} \cap I_{2} I_{3}, B=I_{0} I_{2} \cap I_{1} I_{3}, C=I_{0} I_{3} \cap I_{1} I_{2}$.
Also see the further notation
## Series A: The First Dozen: Touch Points
Let $A_{i}, B_{i}, C_{i}(i=0,1,2,3)$ be touch points of $\omega_{i}$ and lines $B C, C A, A B$, respectively (see 12 red points in Fig. A).
Prove the following statements.
A1. $A_{0}$ и $A_{1}$ (and also $A_{2}$ and $A_{3}$ ) are symmetric with respect to $A^{\prime}$, moreover, $A_{0} A_{3}=A_{1} A_{2}=c$, $A_{0} A_{2}=A_{1} A_{3}=b, A^{\prime} A_{0}=A^{\prime} A_{1}=\frac{|b-c|}{2}, A^{\prime} A_{2}=A^{\prime} A_{3}=\frac{b+c}{2}$. (Similarly there is symmetry with respect to $B^{\prime}$ and $C^{\prime}$.)
A2. a) $A A_{i}, B B_{i}, C C_{i}$ are concurrent.
б) $A A_{1}, B B_{2}, C C_{3}$ are concurrent. (Similarly, triples of lines $A A_{0}, B B_{3}, C C_{2} ; A A_{2}, B B_{1}, C C_{0}$; $A A_{3}, B B_{0}, C C_{1}$ are either concurrent or parallel.)
A3. Radical axis of pairs $\omega_{i}$ and $\omega_{j}$ are internal and external bisectors of triangle $A^{\prime} B^{\prime} C^{\prime}$. (Find the radical centers of triples of circles $\omega_{0}, \omega_{1}, \omega_{2}, \omega_{3}$.)
A4. In the set of circles touching $\omega_{1}, \omega_{2}, \omega_{3}$ there exist three circles passing through $I_{0}^{\prime}$. (Formulate and prove the similar statement for the other triples of circles.)
A5. $A A_{1} \| I_{0} A^{\prime}$ (similarly $A A_{0}\left\|I_{1} A^{\prime}, A A_{2}\right\| I_{3} A^{\prime}, A A_{3} \| I_{2} A^{\prime}$, etc.).
A6. $I_{0} A_{1}, I_{1} A_{0}, I_{2} A_{3}, I_{3} A_{2}$ are concurrent. Determine the intersection point of these lines.
## Series B: The Second Dozen: "Foci"
Let us denote $B_{01}=B_{10}=A_{0} B_{0} \cap A_{1} B_{1}, B_{23}=B_{32}=A_{2} B_{2} \cap A_{3} B_{3}$. (Here $A_{0} B_{0} \cap A_{1} B_{1}$ is $B_{01}$, and not $A_{01}$, since $A$ corresponds to the partition of $\{0,1,2,3\}$ into pairs 0,1 and 2,3.) Similarly define all 12 points: $A_{i j}$ with $i \in\{0,1\}, j \in\{2,3\}$ (we put $A_{i j}=A_{j i}$ ); $B_{i j}$ with $i \in\{0,2\}, j \in\{1,3\} ; C_{i j}$ with $i \in\{0,3\}, j \in\{1,2\}$. (See 12 violet points in Fig. B1, B2.)
Prove the following statements.
B0. $\angle B_{2} B_{23} B_{3}=90^{\circ}$ (similarly for the other angles).
B1. $B_{23}, C_{23}, A_{2}, A_{3}$ are concyclic.
Find the center of the circle passing through these points. (Similarly, $B_{01}, C_{01}, A_{0}, A_{1}$ are concyclic, etc., thus red and violet points belong to 6 circles.)
B2. $A_{i j}$ lies on the midline $B^{\prime} C^{\prime}$
(similarly, $B_{i j}$ and $C_{i j}$ lie on midlines, thus 12 violet points lie on 3 lines $A^{\prime} B^{\prime}, B^{\prime} C^{\prime}, C^{\prime} A^{\prime}$ ).
B3. $A_{13}$ (the same for $A_{02}, B_{01}, B_{23}$ ) lie on the circle with diameter $A B$,
(moreover, $A_{02} B_{01} A_{13} B_{23}$ is a rectangle.)
(Thus 12 violet points lie on 3 circles with diameters $B C, C A, A B$ ).
B4. Find the lengths $A_{02} A_{03}$, etc., in terms of $a, b, c$.
B5. $A_{i j}$ lies on $I_{i} I_{j}$, moreover, $A_{i j}$ is the projection of $A$ to $I_{i} I_{j}$. (thus 12 violet points belong to 6 bisectors of triangle $A B C$ ).
B6. $A_{02}$ and $C_{02}$ are foci of $\omega_{0}$ and $\omega_{2}$ (Foci means that $A_{02}$ and $C_{02}$ is a pair of points inverse to each other with respect to each of two circles). (Thus 12 violet points are partitioned into 6 pairs of foci; in particular, from that it follows that each of $\omega_{i}$ contains exactly 3 violet points).
B7. Determine the radical centers of triples of circles from Problem B1 having distinct centers.
B8. Six points $A_{03}, A_{02}, C_{02}, C_{23}, B_{23}, B_{03}$ lie on a circle (also there exist 3 circles constructed in the same manner). Determine the centers of these circles. Find the radii of these circles in terms of $a, b, c$.
B9. $A_{02}$ and $A_{13}$ are either the centers of incircle and excircle or the centers of excircles, for the triangle $B^{\prime} H_{a} H_{b}$.
## Series C: The Third Dozen: Intersections on the Altitudes
Let $A_{(3)}=A_{0} C_{0} \cap A_{1} B_{1}$ (Here $A_{0} C_{0} \cap A_{1} B_{1}$ is $A_{(3)}$, and not $A_{(2)}$, since $C$ corresponds to the partition of $\{0,1,2,3\}$ into pairs 0,3 and 1,2 , here 3 belongs to the pair containing 0$)$. Similarly, $A_{(2)}=A_{0} B_{0} \cap A_{1} C_{1}$, $A_{(0)}=A_{2} B_{2} \cap A_{3} C_{3}, A_{(1)}=A_{2} C_{2} \cap A_{3} B_{3}$; in the same manner define $B_{(i)}$ and $C_{(i)}$ - totally 12 green points in Fig. C.
Prove the following statements.
C1. Points $A_{(i)}$ lie on the line $A H_{a}$ (similarly for $B_{(i)}$ and $C_{(i)}$, thus 12 green points lie on the altitudes of triangle $A B C$ ).
C2. The length of $A A_{(i)}$ is equal to $r_{i}$.
C3. $A_{(i)} A_{i}$ is parallel to one of two bisectors of angle $A$.
C4. Prove that $A_{(1)} A_{1}, B_{(2)} B_{2}$, and $C_{(3)} C_{3}$ are concurrent. (Similarly, there exist three triples of concurrent lines: $A_{(0)} A_{0}, B_{(3)} B_{3}, C_{(2)} C_{2} ; A_{(3)} A_{3}, B_{(0)} B_{0}, C_{(1)} C_{1} ; A_{(2)} A_{2}, B_{(1)} B_{1}, C_{(0)} C_{0}$.)
C5. Triangles $A_{1} B_{2} C_{3}$ and $A_{(0)} B_{(0)} C_{(0)}$ are symmetric (with respect to a point). Define the center of symmetry. (Similarly, pair of triangles $A_{0} B_{3} C_{2}$ and $A_{(1)} B_{(1)} C_{(1)}, A_{3} B_{0} C_{1}$ and $A_{(2)} B_{(2)} C_{(2)}, A_{2} B_{1} C_{0}$ and $A_{(3)} B_{(3)} C_{(3)}$ are symmetric.)
C6. Triangles $A_{(1)} B_{(2)} C_{(3)}, A_{(0)} B_{(3)} C_{(2)}, A_{(3)} B_{(0)} C_{(1)}, A_{(2)} B_{(1)} C_{(0)}$ Have a common circumcenter (thus green points lie on 4 concentric circles). Define the common circumcenter.
C7. Find $A H, B H, C H$ in terms of radii $r_{i}$.
C8. Find the radius of the circumcircle of triangle $A_{(1)} B_{(2)} C_{(3)}$ in terms of $R$ and $r_{0}$. (Similarly, find the radii of the circles from Problem C6.)
C9. $I_{i} A^{\prime}$ passes through $A_{(i)}$ (similarly, $I_{i} B^{\prime}$ passes through $B_{(i)}, I_{i} C^{\prime}$ passes through $C_{(i)}$ ).
C10. Let $l_{a}$ be a line passing through $A$ and parallel to $B C . M=A_{0} C_{0} \cap l_{a}, N=A_{0} B_{0} \cap l_{a}$. Prove that $A_{(0)}$ is the circumcircle of the triangle $A_{0} M N$.
Determine the orthocenter of the triangle $A_{0} M N$.
## Series D: The Fourth Dozen.
Let $C_{0}^{*}=A_{0} B_{0} \cap A_{1} B_{2}$, and similarly define 12 blue points $A_{i}^{*}, B_{i}^{*}, C_{i}^{*}$ (see Fig. D). (The description of these points is as follows: Take one of the circles, for example $\omega_{0}$. Take its two touch points, say $A_{0}$, $B_{0}$. Take the touch points of these sides with two other circles that are symmetric to $A_{0}, B_{0}$ with respect to the midpoints of the sides $-A_{1}, B_{2}$. Take the intersection points of the lines joining pairs of these points.)
Prove the following statements.
D1. The sidelines of triangle $A_{i}^{*} B_{i}^{*} C_{i}^{*}$ pass through the vertices of triangle $A B C$.
D2. A line passing through $C_{i}^{*}$ intersects $B C, A C$ at $A^{\prime \prime}, B^{\prime \prime}$, respectively. Show that $A^{\prime \prime} B_{i}^{*}$ and $B^{\prime \prime} A_{i}^{*}$ intersect at some point $C^{\prime \prime}$ of the line $A B$.
D3. $A A^{\prime \prime}, B B^{\prime \prime}, C C^{\prime \prime}$ have a common point that is isogonally conjugate to some point of the line $O I_{i}$.
D4. The circumcircle of triangle $A^{\prime \prime} B^{\prime \prime} C^{\prime \prime}$ passes through the Feuerbach point $F_{i}$.
D5. Four blue points denoted by the same letter lie on a sideline of the orthotriangle.
D6. a) Triangles $A_{i}^{*} B_{i}^{*} C_{i}^{*}$ and $A B C$ are perspective (i.e. the lines joining corresponding vertises of these triangles are concurrent)
b)Try to find some relations between four centers of perspective.
D7. (The generalization of the problem D4) Let $C^{* *}$ be a point on line $H_{a} H_{b}$. An arbitrary line passing through $C^{* *}$ intersects $B C, A C$ at $A^{\prime \prime}, B^{\prime \prime}$, respectively. Let $P$ be the point of intersection of lines $A A^{\prime \prime}$ and $B B^{\prime \prime}$, and $C^{\prime \prime}$ be the point of intersection of lines $C P$ and $A B$. Then the circumcircles of all triangles $A^{\prime \prime} B^{\prime \prime} C^{\prime \prime}$ have the common point.
Tasks from series A, B, C marked \# and also from series $\mathrm{D}$ were given to the paticipants after the intermediate finish.
## Excircles and Dozens of Points.
## Hints, Solutions, Comments.
Series A: The First Dozen: Touch Points
A1. Follows from the calculation of the tangent segments, for example, $2 A B_{1}=A B_{1}+A C_{1}=A B+$ $B A_{0}+A C+C A_{0}=2 p$, hence $B^{\prime} B_{1}=p-\frac{b}{2}=\frac{a+c}{2}$. (Also see a comment on B5)
A2. Follows from Ceva Theorem using the equality of the segments of tangents).
A3. From A1 it follows that $A^{\prime}$ equal powers with respect to the circles $\omega_{2}$ and $\omega_{3}$, hence $A^{\prime}$ lies on the radical axis of these circles. This radical axis is perpendicular to $I_{2} I_{3}$, hence it is parallel to the bisector of the angle $B A C$ (or $B^{\prime} A^{\prime} C^{\prime}$ ). Thus this radical axis as a bisector of the angle $B^{\prime} A^{\prime} C^{\prime}$. Hence radical centers of the triples of circles are $I_{0}^{\prime}, I_{1}^{\prime}, I_{2}^{\prime}, I_{3}^{\prime}$.
A4\#. (This Problem was formulated in thesis of K. Kuznetsova (Velikie Luki) at the Conference "Start v Nauku - 2009")
From A3 it follows that there exists an inversion with center $I_{0}^{\prime}$ that takes each of the circles $\omega_{1}, \omega_{2}$, $\omega_{3}$ to itself. This inversion takes $A B, B C, C A$ to the circles passing through $I_{0}^{\prime}$ and touching $\omega_{1}$, $\omega_{2}, \omega_{3}$.
A5\#. The homothety with center $A$ taking $\omega_{1}$ to $\omega_{0}$ takes diameter $K A_{1}$ to diameter $A_{0} L$. Thus $A A_{1}$ coincides to $L A_{1} . I_{0} A^{\prime}$ is a midline of the triangle $A_{0} L A_{1}$. This completes the solution.
A6\#. Using the notation of the previous solution: triangles $A_{1} L A_{0}$ and $A_{1} A H_{a}$ are homothetic (with center $A_{1}$ ), hence $A_{1} I_{0}$ is the median in triangle $A_{1} A H_{a}$ passing through the midpoint of the altitude $A H_{a}$.
## Series B: The Second Dozen: "Foci"
B0. The statement follows since $A_{i} B_{i}$ is parallel to a bisector (either internal or external) of angle $C$.
B1. From B0 it follows that $A_{2} B_{23} \perp A_{3} B_{23}$ и $A_{2} C_{23} \perp A_{3} C_{23}$, hence 4 mentioned points lie on the circle with diameter $A_{2} A_{3}$. From A1 it follows that the center of this circle is $A^{\prime}$ (and radius equals to $\frac{b+c}{2}$. Similarly, points $B_{01}, C_{01}, A_{0}, A_{1}$ lie on the circle with center $A^{\prime}$ (and radius equals $\frac{|b-c|}{2}$.
B2. In a right-angled triangle $A_{2} B_{23} A_{3}: A^{\prime} B_{23}=A^{\prime} A_{2},\left(=\frac{b+c}{2}-\right.$ see A2), hence equilateral triangles $A_{2} A^{\prime} B_{23}$ and $A_{2} C B_{2}$ are homothetic, and $A^{\prime} B_{23} \| A C$, that means that $B_{23}$ lies on the midline $A^{\prime} C^{\prime}$.
Note. $B_{23}$ also lies on the circle with diameter $B_{2} B_{3}$.
B3. Determine the length $A^{\prime} B_{23}$ (see B1), and obtain $C^{\prime} B_{23}=A^{\prime} B_{23}=A^{\prime} C^{\prime}=\frac{c}{2}$, hence $B_{23}$ lies on the circle of radius $\frac{c}{2}$ with center $C^{\prime}$. For the other points the calculation could be done in the same manner.
B4. From B2 it is easy to obtain: $A_{13} A_{12}=A_{13} C^{\prime}+C^{\prime} B^{\prime}+B^{\prime} A_{12}=\frac{c+a+b}{2}=p ; A_{13} A_{03}=$ $A_{13} A_{12}-A_{03} A_{12}=p-b$ (since $A_{03} A_{12}$ is a diameter of the circle from B2). Similarly, $A_{03} A_{02}=p-a$, $A_{02} A_{12}=p-c$.
B5. (One of the possible configurations - Problem 1.66 in the book of Prassolov, also see the article of V. Protassov ("Quant", № 4 - 2008); also see Problem 255 from the book of Sharygin 9 - 11, this Problem is specially mentioned in the Preface.)
From B1 and B2 it follows: $C^{\prime} B_{23} \| A C$ и $C^{\prime} B_{23}=C^{\prime} A$, hence $\angle B_{23} A C^{\prime}=\angle C^{\prime} A B_{23}=\angle B_{23} A B_{3}$, thus $A B_{23}$ is the external bisector of angle $B A C$. Moreover, from $\mathrm{B} 2$ it follows that $B B_{23} \perp A B_{23}$. Similarly for other points.
Comment. Note that Fig. contain many parallelograms (the sides of which are parallel either to the sides or to the bisectors of the triangles $A B C$ ). For example, taking parallelograms $A_{3} A_{13} A_{23} C$ and $B A_{13} A_{23} A_{2}$ we see another explanation of the equality from A1.
B6. Triangles $I_{0} A_{02} B_{0}$ and $I_{0} B_{0} C_{02}$ are similar (in the calculations of angles we use that $B_{0} C_{02}$ is parallel to the external bisector of the angle $A B C)$, hence $I_{0} A_{02} \cdot I_{0} C_{02}=r_{0}^{2}$.
B7\#. The radical centers are points $I_{i}$ and points symmetrical to them with respect to the circumcenter of triangle $A B C$.
For example, from $\mathrm{B} 6$ it follows that $I_{0} A_{02} \cdot I_{0} C_{02}=I_{0} A_{03} \cdot I_{0} B_{03}=I_{0} B_{01} \cdot I_{0} C_{01}=r_{0}^{2}$, hence $I_{0}$ has equal powers with respect to the circles with diameters $A_{0} A_{1}, B_{0} B_{2}, C_{0} C_{2}$ (see B1).
Then, consider, for instance, the circles with diameters $A_{2} A_{3}, B_{1} B_{3}$ and $C_{1} C_{2}$. The point $I_{3}$ lies on the radical axis of the first two circles, because the equal segments $I_{3} A_{2}$ and $I_{3} B_{1}$ are tangent lines to these circles. Moreover, the radical axis is perpendicular to the line joining the centers of the circles, i.e. the medial line of $A B C$. Three such lines intersect in the point symmetrical to $I$ with respect to $O$.
B8\#. These are the circles with centers $I_{i}^{\prime}$.
Let $X$ be the projection of $I_{0}^{\prime}$ to $B^{\prime} C^{\prime}$. Then from B3 it follows: $X A_{12}=X B^{\prime}+B^{\prime} A_{12}=\frac{p-b}{2}+\frac{b}{2}=$ $\frac{p}{2}$. Further, $I_{0}^{\prime} A_{12}^{2}=I_{0}^{\prime} X^{2}+X A_{12}^{2}=\frac{r_{0}^{2}+p^{2}}{4}$. Similarly, the square of the distance from $I_{0}^{\prime}$ to each of the points $A_{03}, A_{02}, C_{02}, C_{23}, B_{23}, B_{03}$ equals to $\frac{r^{2}+p^{2}}{4}$.
In the same way it is proved that the radius of the circle with center $I_{1}^{\prime}$ equals to $\frac{r_{1}^{2}+(p-a)^{2}}{4}$, etc. Comment. The following general result holds: three pair of foci for three circles which centers are not collinear lie on a circle (the proof is an exercise on a power of a point with respect to a circle).
Comment. This circle is of so called Tucker circles for the triangle $I_{1} I_{2} I_{3}$.
B9\#. (Also see the article of V. Protassov in "Quant" № $4-2008$, this problem plays an important role in the proof of Feuerbach Theorem.) $C_{0} A_{02}$ is a bisector of angle $A B^{\prime} H_{a}$ (this follows from symmetry). Consider a nine-point circle, triangle $B^{\prime} H_{a} H_{b}$ is inscribed to this circle, $C^{\prime}$ is a midpoint of the arc $H_{a} H_{b}$. Since (see B3) $C^{\prime} A_{02}=C^{\prime} H_{a}=C^{\prime} H_{b}$ we have that $A_{02}$ is a center of either inscribed or exscribed circle of triangle $B^{\prime} H_{a} H_{b}$.
## Series C: The Third Dozen: Intersections on the Altitudes
C1-3. From B5 it follows that $A A_{02} A_{0} A_{03}$ is a parallelogram (its sides are parallel to bisectors of angles $C B A$ and $A C B$ ). Also $A_{(0)} A_{02} I_{0} A_{03}$ is a parallelogram (its sides are parallel to bisectors of angles $C B A$ and $A C B)$. Therefore $\overrightarrow{I_{0} A_{0}}$ and $\overrightarrow{A_{(0)} A}$ are symmetric with respect to the midpoint of the segment $A_{02} A_{03}$. This implies $\mathrm{C} 1$ and $\mathrm{C} 2$. Since $I_{0} A_{0} A_{(0)} A$ is a parallelogram, $A_{(i)} A_{i} \| A I_{0}$.
C4. (This is the Problem of Emelyanov No 10.7 from All-Russian Olympiad - 2002?.) From C3 it follows that these lines are the altitudes of the triangle $A_{(1)} B_{(2)} C_{(3)}$.
Note. One can show that the intersection point of these three lines is symmetric to the orthocenter of triangle $A_{0} B_{0} C_{0}$ with respect to $I_{0}^{\prime}$.
C5. Show that the centers are points $I_{i}^{\prime}$.
Radical axis bisects the segments of common tangents, hence from $\mathrm{A} 3$ it follows that $B_{2} C_{2}\left(=B_{2} C_{(0)}\right)$ and $B_{3} C_{3}\left(={ }_{3} B_{(0)}\right)$ are symmetruc with respect to the line $A^{\prime} I_{0}^{\prime}$, and also with respect to point $I_{0}^{\prime}$. Similarly, $A_{1} C_{(0)}$ and ${ }_{3} A_{(0)}$ are symmetric with respect to $I_{0}^{\prime}$. This means that the corresponding points of intersection $C_{(0)}$ and $C_{3}$ are symmetric with respect to $I_{0}^{\prime}$.
C6. The center is $H$.
From C1 we know that, for example, that $A_{(0)}=A_{3} C_{3} \cap A H_{a}$ and $C_{(2)}=A_{3} C_{3} \cap C H_{c}$. Since $A_{3} C_{3}$ is parallel to the bisector of the angle $B$, the angles between $A_{3} C_{3}$ and the altitudes $A H_{a}$ and $C H_{c}$ are equal. From that it follows that triangle $H A_{(0)} C_{(2)}$ is equilateral, hence $H$ is equidistant from $A_{(0)}$ and $C_{(2)}$.
C7-8. The radii of the circumcircles from C6 equal $\left|\rho_{i}\right|$, where $\rho_{0}=A H+r_{1}=B H+r_{2}=C H+r_{3}$, $\rho_{1}=r_{0}-A H=B H-r_{3}=C H-r_{2}, \rho_{2}=A H-r_{3}=r_{0}-B H=C H-r_{1}, \rho_{3}=A H-r_{2}=B H-r_{1}=$ $r_{0}-C H$ (here $A H$, ect., could be negative if the corresponding angle of the triangle is obtuse). From this we have $A H=\frac{r_{0}+r_{1}+r_{2}+r_{3}}{2}-r_{1}, B H=\frac{r_{0}+r_{1}+r_{2}+r_{3}}{2}-r_{2}, C H=\frac{r_{0}+r_{1}+r_{2}+r_{3}}{2}-r_{3}$. Further, $\rho_{0}=\frac{r_{0}+r_{1}+r_{2}+r_{3}}{2}, \quad \rho_{1}=\frac{r_{0}+r_{1}-r_{2}-r_{3}}{2}, \quad \rho_{2}=\frac{r_{0}-r_{1}+r_{2}-r_{3}}{2}, \rho_{3}=$ $\frac{r_{0}-r_{1}-r_{2}+r_{3}}{2}$, and putting the relation $r_{1}+r_{2}+r_{3}=4 R+r_{0}$ (see the book of Prassolov, Problem 12.24), $\rho_{0}=r_{0}+2 R, \rho_{1}=\left|r_{1}-2 R\right|, \rho_{2}=\left|r_{2}-2 R\right|, \rho_{3}=\left|r_{3}-2 R\right|$.
C9.\# From A5 it follows that that $I_{0} A^{\prime}$ intersects the altitude $A H_{a}$ at point $S$ such that $\overrightarrow{A S}=\overrightarrow{I_{0} A_{0}}$, that is the point $A_{(0)}$ (see Problems C1-2).
C10.\# (This Problems was proposed by D. Prokopenko) 1. It is easy to show that $A$ is the midpoint of $M N$, hence $A A_{(0)}$ is the perpendicular bisector of $M N$.
2. From C3 it follows that $A_{0} A_{(0)}$ and $A_{0} I_{0}$ are symmetric with respect to the bisector of the angle $M A_{0} N$. Since $A_{0} I_{0}$ is the altitude of the triangle, $A_{0} A_{(0)}$ contains the circumcenter of triangle $M A_{0} N$.
Combining 1 and 2 we get the required statement.
The orthocenter of triangle $A_{0} M N$ is the point symmetric to $A_{0}$ with respect to $I_{0}$.
The tasks of series $\mathrm{D}$ are the reformulation of the Emelyanovs' Theorem, and their solutions can be found in the book "Summer Conferences of the Tournament of Towns. Selected matherials. Volume 1." (MCCME, 2009, in Russian)
# Магические графы
К. Кохась, Д. Ростовский
## Определения и обозначения
Все рассматриваемые графы не имеют изолированных вершин, кратных рёбер и петель.
Слова «цикл» и «путь» всюду означают простой цикл и простой путь в графе.
Граф называется полумагическим, если на его рёбрах можно расставить положительные числа (веса) так, что для каждой вершины сумма весов рёбер, выходящих из неё, равна одному и тому же числу $s$. Граф называется магическим, если возможна такая расстановка с попарно различными числами. Заметим, что в полумагическом графе висячая вершина может быть только концом изолированного ребра, причём в магическом графе такое ребро в графе может быть только одно.
Подграф $F$ данного графа $G$ называется его скелетом, если любая вершина $G$ является вершиной одного из его рёбер. Скелет называется 1-2-скелетом, если степень любой его вершины равна 1 или 2 , причём степени вершин в каждой компоненте связности одинаковы. Иначе говоря, 1-2-скелет состоит из изолированных рёбер и непересекающихся простых циклов. Если зафиксирован 1-2-скелет $F$ графа $G$, то все рёбра графа $G$ делятся на три группы: принадлежащие ииклической части $F$ (обозначим её $F_{c}$ ); принадлежащие линейной части $F$ (обозначим её $F_{\ell}$ ), т.е. изолированные рёбра в $F$; наконец, вообще не принадлежащие $F$. Будем говорить, что 1-2-скелет разделяет рёбра $e_{1}$ и $e_{2}$, если эти два ребра лежат в разных группах. Иными словами, хотя бы одно из них должно принадлежать $F$, но не оба в $F_{c}$ и не оба в $F_{\ell}$.
Будем использовать обозначения: $C_{n}$ - цикл из $n$ рёбер $(n \geqslant 3) ; P_{n}$ - путь из $n$ рёбер; $K_{n}$ - полный граф с $n$ вершинами; $K_{m, n}$ - полный двудольный граф с долями по $m$ и $n$ вершин.

Цикл $C_{5}$
Путь $P_{5}$

Полный граф $K_{4}$

Полный двудольный граф $K_{2,3}$
Рис. 1. Некоторые стандартные графы
Прямым произведением $F \times G$ двух графов называется граф, у которого множество вершин есть множество всевозможных пар вида $(v, w)$, где $v$ - вершина $F, w$ - вершина $G$. Вершины $\left(v_{1}, w_{1}\right)$ и $\left(v_{2}, w_{2}\right)$ соединены ребром, если либо $v_{1}=v_{2}$ и в графе $G$ есть ребро $w_{1} w_{2}$, либо $w_{1}=w_{2}$ и в графе $F$ есть ребро $v_{1} v_{2}$. Удвоением графа $G$ будем называть граф $G \times P_{1}$. Гантелей будем называть граф, состоящий либо из двух нечётных циклов, пересекающихся ровно по одной вершине, либо из двух нечётных циклов, соединённых путём любой длины.

Рис. 2. Граф $C_{5} \times P_{2}$

Рис. 3. Граф и его удвоение

Рис. 4. Гантели
## 1 Примеръ
1.1. Убедитесь, что магических графов меньше чем с 5 вершинами не существует, за исключением графа $P_{1}$ (одно ребро).
1.2. Докажите, что любой двудольный граф с нечётным числом вершин - не магический. А как у этих графов с полумагичностью?
1.3. Исследуйте следующие графы на полумагичность и магичность (ответы могут зависеть от $n$ и $m$ ):
a) $K_{n}$;
b) $K_{m, n}$;
c) $P_{n} \times P_{1}$;
d) $P_{n} \times P_{m}$ при $n, m>1$;
e) $C_{n} \times P_{1}$;
f) $C_{n} \times P_{m}, n \geqslant 3, m>1$;
$\mathrm{g})$ цикл из $2 n$ вершин, в котором противоположные вершины попарно соединены.
## 2 Полумагические графы
2.1. Докажите, что если полумагический граф $G$ содержит чётный цикл, то в $G$ найдётся полумагический скелет (т. е. скелет, который как самостоятельный граф является полумагичским графом), содержащий не все рёбра этого цикла.
2.2. Докажите, что если полумагический граф $G$ содержит гантелю, то в $G$ найдётся полумагический скелет, содержащий не все рёбра этой гантели.
2.3. Докажите, что в любом полумагическом графе можно выбрать 1-2-скелет.
2.4. Основная теорема о полумагических графах. Докажите, что граф тогда и только тогда является полумагическим, когда в нём любое ребро принадлежит некоторому 1-2-скелету.
Следующие задачи посвящены выяснению вопроса, в каких случаях граф содержит 1-2-скелет. Сначала разберёмся с 1-скелетами (в которых каждая вершина имеет степень 1). Будем называть граф млгким, если он не содержит 1-скелета, а в противном случае будем называть его твёрдым. Мягкий граф будем называть насыщенным, если при добавлении в него произвольного ребра он становится твёрдым. Например, полный граф с нечётным числом вершин - мягкий и насыщенный.
Пусть $G$ - произвольный граф, $S$ - некоторое множество его вершин. Через $G \backslash S$ обозначим граф, полученный удалением из $G$ всех вершин множества $S$ и их рёбер.
2.5. Пусть $G$ - насыщенный мягкий граф, $S$ - множество всех вершин в нём, каждая из которых соединена рёбрами со всеми остальными вершинами. Докажите, что компоненты связности графа $G \backslash S$ являются полными графами.
2.6. Основная теорема о мягких насыщенных графах. Граф $G$ - мягкий и насыщенный тогда и только тогда, когда либо
a) $G$ полный граф с нечётным числом вершин; либо
b) число вершин графа $G$ чётно и в нём можно выделить такие непересекающиеся полные подграфы $S_{0}, G_{1}, G_{2}$, $\ldots, G_{k}$, где $k=\left|S_{0}\right|+2$, что при всех $i$ в каждом $G_{i}$ число вершин нечётно и каждая вершина $G_{i}$ соединена ребром со всеми вершинами $S_{0}$, и никаких других рёбер в графе нет.
2.7. Докажите, что граф $G$ твёрдый тогда и только тогда, когда для каждого подмножества $S$ множества вершин графа $G$ граф $G \backslash S$ имеет не более $|S|$ нечётных компонент связности.
2.8. Докажите, что граф $G$ обладает 1-2-скелетом в том и только том случае, если для каждого подмножества $S$ множества вершин графа $G$ граф $G \backslash S$ имеет не более $|S|$ изолированных вершин.
## 3 Магические графъ
3.1. Докажите, что любой магический граф обладает двумя свойствами:
(1) Любое его ребро принадлежит какому-нибудь 1-2-скелету.
(2) Любая пара его рёбер разделяется каким-нибудь 1-2-скелетом.
3.2. Докажите обратное утверждение: любой граф, удовлетворяющий этим двум условиям, является магическим.
3.3. Граф $G^{\prime}$ получен из магического графа $G$ добавлением нового ребра, причём это ребро принадлежит некоторому 1-2-скелету графа $G^{\prime}$. Докажите, что граф $G^{\prime}$ - магический.
3.4. Граф $G$ состоит из двух (неизоморфных) компонент связности, каждая содержит не меньше 3 вершин. Обе компоненты являются магическими графами. Верно ли, что граф $G$ обязательно является магическим?
3.5. а) Если полумагический граф $G$ не содержит изолированных рёбер, и для любого ребра $e$ найдётся 1-2-скелет, циклическая часть которого не содержит $e$, то удвоение $G$ - магический граф.
b) Пусть $G$ - полумагический граф без изолированных рёбер, а $H$ - произвольный граф без изолированных вершин и изолированных рёбер, то граф $G \times H-$ магический.
3.6. Дан граф $G$, в котором не менее 4 вершин. Граф $G_{1}$ получен добавлением к $G$ одной новой вершины, которая соединена со всеми вершинами $G$. Докажите, что $G_{1}$ магический тогда и только тогда, когда $G$ имеет 1-2-скелет и не имеет изолированных рёбер.
3.7. а) Если в графе $n \geqslant 5$ вершин и степени всех вершин не меньше $\frac{n}{2}+1$, то граф магический.
b) Существуют неполумагические графы со сколь угодно большим числом вершин $n$, у которых минимальная степень вершины равна $n / 2$.
3.8. Пусть $G-$ связный магический граф с $n \geqslant 5$ вершинами и $r$ рёбрами. Тогда $r>\frac{5}{4} n$.
3.9. Для каждого $n=5,6,7,8$ приведите пример связного магического графа с $n$ вершинами и $r$ рёбрами, где $r$ наименьшее натуральное число, удовлетворяющее неравенству $r>\frac{5}{4} n$.
3.10. Постройте такой граф для произвольного $n \geqslant 5$.
3.11. Докажите, что связный магический граф с $n$ вершинами и $r$ рёбрами существует для любой пары $n, r$, в которой $\frac{5}{4} n5$.
Полумагичность очевидна. Как и во всяком однородном графе, можно все веса взять равными единице.
При $n=3$ граф не магический - это тоже очевидно.
При $n=4$ имеем 4 вершины $A, B, C, D$. Допустим, что граф магический, пусть $s-$ сумма весов рёбер, сходящихся в одной вершине. Тогда $2 s$ - т. е. сумма весов рёбер при вершинах $A$ и $C$ - это сумма весов всех рёбер графа без веса ребра $C D$, но с удвоенным весом ребра $A C$. Делая аналогичный подсчёт для вершин $B$ и $D$, находим, что веса рёбер $A C$ и $B D$ равны.
При $n>5$ граф магический. Это можно установить следующим образом. Поскольку граф однороден, мы можем рассматривать произвольные (не обязательно положительные) веса рёбер. (В регулярном графе мы всегда можем сделать веса положительными, добавив ко всем весам одну и ту же большую положительную константу.) Опишем конструкцию построения магических меток однородного графа с помощью чётных циклов.
Выпишем все чётные циклы, являющиеся подграфами нашего графа, и пронумеруем их числами от 1 до $N$ (где $N$ - их количество). Для $k$-го цикла в нашем списке назначим веса его рёбер - попеременно плюс и минус $3^{k}$, эти веса поставим в качестве меток возле соответствующих рёбер. После того как мы просмотрели все циклы, сложим все метки, стоящие около каждого ребра.
Докажем, что полученная разметка рёбер графа магическая. Действительно, каждый цикл даёт нулевой суммарный вклад весов в каждую вершину, поэтому сумма весов каждой вершины равна нулю. Проверим, что все веса различны. Для каждого ребра выпишем список номеров тех циклов, в которые входит это ребро. Очевидно, что для любых двух рёбер графа существует чётный цикл, содержащий лишь одно из них. Следовательно, для любых двух рёбер списки номеров циклов не совпадают. Но тогда суммы весов, назначенные с помощью этих циклов, для разных рёбер попарно не равны. Это следует из того, что каждый такой суммарный вес можно трактовать как $N$-значное число в троичной системе счисления, в которой используются цифры 0 и $\pm 1$. Несовпадение списков означает, что полученные числа различаются в каких-то разрядах троичной записи и поэтому не равны.
b) Ответ: граф полумагический только при $m=n$. При $m=n>2$ он магический.
Для полумагичности необходимо, чтобы числа $m$ и $n$ были равны. На балу каждая дама танцевала с пятью кавалерами, а каждый кавалер с пятью дамами. Докажите, что дам и кавалеров было поровну. Ну или что-то в этом роде.
При $m=n$ граф однородный и потому полумагический. При $m=n=2$ он не магический, это очевидно. А при $m=n>2$ граф магический, в чём можно убедиться конструкцией аналогичной предыдущему решению.
c) Ответ: граф полумагический, но не магический.
Для полумагичности достаточно расставить на двух крайних рёбрах двойки, а на остальных единицы. Чтобы убедиться, что граф не магический, достаточно посмотреть на ребро, у которого обе вершины степени 2 , и смежные с ним рёбра.
d) Ответ: граф магический, если $m$ или $n$ нечётны, и не полумагический, если и $m$, и $n$ чётны.
При чётных $n$ и $m$ граф двудольный и имеет $(n+1)(m+1)$ вершин (нечётное число). По утверждению задачи 1.2 граф не может быть полумагическим.
Докажем, что при нечётном $n$ и $m>1$ граф магический.
Сначала рассмотрим случай $m=2$. Стартовая полумагическая расстановка неотрицательных весов на графе показана на рис. 6: жирные рёбра имеют вес $2 M$, пунктирные - вес 0 , остальные рёбра имеют вес $M$, где $M$ большое число, которое мы выберем чуть позже. Это ещё не доказательство полумагичности, поскольку некоторые веса нулевые, а граф не однородный.
Теперь мы выполним основную конструкцию построения весов с помощью чётных циклов (см. решение задачи $1.3 a$ ), но с тремя поправками (всё-таки наш граф не однородный). Первая поправка состоит в том, что мы будем рассматривать не все циклы, а только 4-циклы (стороны клеточек). Вторая поправка состоит в том, что итоговый вес ребра мы положим равным сумме веса, назначенного с помощью основной конструкции, и веса этого же ребра

Рис. 6. Почти полумагические веса на графе $P_{n} \times P_{2}$
в стартовой расстановке. Наконец, третья поправка - назначая положительные и отрицательные веса рёбер каждого цикла (здесь у нас есть произвол, с какого знака начинать), мы будем следить, чтобы рёбра, имеющие нулевой вес в стартовой расстановке, всегда получали положительный вес. Наконец, выберем число $M$ настолько большим, чтобы в результате выполнения всей этой конструкции все веса рёбер оказались бы положительными и различными. Полученная расстановка весов будет магической.
В случае, когда $n-$ нечётно, $m>2$, мы действуем аналогично. Стартовые расстановки весов показаны на рис. 7 (нечётная сторона вертикальна).

Рис. 7. Полумагические веса на графе $P_{n} \times P_{m}$
е) Ответ: граф всегда полумагический. Магическим он является лишь при чётном $n$.
Граф можно представлять себе как набор вершин и рёбер $n$-угольной призмы.
Пусть $n=2 k$. В графе есть очевидные циклы длины 4 (контуры граней) и два $2 k$-цикла (контуры оснований). Здесь также выполнено свойство, что для любых двух рёбер найдётся чётный цикл, содержащий лишь одно из них. Таким образом, применима основная конструкция для однородных графов.
Пусть $n=2 k+1$. Проверим, что граф не магический. Пусть $d$ - сумма весов рёбер, сходящихся в вершине. Тогда, как нетрудно видеть, сумма весов всех рёбер графа равна $n d$. Обозначим наш граф-призму через $A_{1} A_{2} \ldots A_{2 k+1} B_{1} \ldots B_{2 k+1}$. Сумма весов рёбер, выходящих из вершин $A_{1}, A_{3}, \ldots, A_{2 k+1}, B_{2}, B_{4}, \ldots, B_{2 k}$, равна $n d$ и при этом представляет собой сумму весов всех рёбер графа без ребра $B_{1} B_{2 n+1}$, но с ребром $A_{1} A_{2 n+1}$, учтённым дважды. Следовательно, веса рёбер $A_{1} A_{2 n+1}$ и $B_{1} B_{2 n+1}$ равны.
f) Ответ: граф магический. Решение аналогично 1.3d). Пусть $A_{1}, \ldots, A_{m+1}-$ вершины графа $P_{m}$. Стартовая полумагическая расстановка неотрицательных весов на графе $C_{n} \times P_{m}$ выглядит следующим образом: рёбра всех подграфов вида $C_{n} \times A_{i}$ имеют вес 2 , остальные рёбра имеют вес 0 . В качестве набора чётных циклов опять рассматриваем 4-циклы
g) Ответ: граф всегда полумагический, а при нечётных $n$ он ещё и магический.
Полумагический он, потому что однородный. При $n=2$ это граф $K_{4}$, мы его обсуждали в задаче 1.3 а). При нечётном $n$ граф магический, поскольку работает основная конструкция: есть хороший запас чётных циклов -4 -циклы, содержащие соседние диаметры, и $(n+1)$-циклы вида «полукруг».
При чётном $n$ граф не магический. Пусть $A_{1} A_{2} \ldots A_{n} B_{n} \ldots B_{2} B_{1}$ - вершины цикла. Рёбра, выходящие из вершин $A_{i}, B_{i}$, где $i$ пробегает все нечётные индексы, - это все рёбра графа, кроме $A_{n} B_{n}$, причём ребро $A_{1} B_{1}$ учтено дважды. Отсюда следует, что в любой полумагической расстановке весов противоположные рёбра $2 n$-цикла имеют одинаковый вес.
## 2 Полумагические графъ
2.1. Пусть $a$ - минимальный вес ребра в данном чётном цикле. Обходя цикл, будем попеременно то уменьшать, то увеличивать на $a$ вес рёбер цикла. В результате вес некоторых рёбер станет нулевым - сотрём их. Оставшийся граф с полученной расстановкой весов и будет искомым полумагическим скелетом.
2.2. Пусть $A$ - вершина одного из нечётных циклов гантели, к которой прикреплена ручка гантели (или второй цикл, если ручки нет). Рассмотрим следующее назначение весов рёбер гантели. Будем обходить нечётный цикл, начиная с вершины $A$, и попеременно присваивать рёбрам веса $\pm a$. Вернувшись в вершину $A$, мы получим, что оба ребра данного цикла, сходящиеся в вершине $A$, имеют вес $a$. Продолжим движение по ручке, попеременно назначая веса её рёбер
$\mp 2 a$. Дойдя до второго цикла, обойдём его, продолжая назначать веса $\pm a$. В результате мы получим полумагическое назначение весов с нулевой суммой в каждой вершине (см рис. 5).
Прибавим построенные веса к уже имеющимся весам рёбер гантели, причём подберём $a$ так, чтобы все веса получились в результате неотрицательными и вес по крайней мере одного из рёбер стал равен нулю. Получится полумагическая разметка рёбер графа, причём все нулевые рёбра можно стереть (очевидно, изолированных вершин от этого появиться не может). Останется искомый полумагический скелет.
2.3. С помощью конструкций из решений задач 2.1, 2.2 мы можем последовательно уменьшать количество рёбер в графе, разрушая чётные циклы и гантели, и сохраняя при этом полумагичность. Заметим, что в силу полумагичности наш граф ни в какой момент не будет иметь висячих вершин (кроме вершин изолированных рёбер). Заметим также, что если в компонента связности графа имеет два нечётных цикла, то в ней можно найти чётный цикл или гантелю. Если же компонента содержит ровно один (нечётный) цикл и не имеет при этом висячих вершин, то ничего, кроме этого цикла, она содержать не может. Значит, в тот момент, когда все чётные циклы и гантели будут разрушены, граф будет представлять собой несколько изолированных рёбер плюс несколько изолированных (нечётных) циклов.
2.4. Проверим, что в полумагическом графе любое ребро принадлежит некоторому 1-2-скелету. Пусть $G$ - любой из графов с минимальным числом рёбер, имеющий ребро $e$, не принадлежащее ни одному 1-2-скелету. Фиксируем полумагическую расстановку $\mathcal{W}$ весов на графе $G$. Возьмём произвольный 1-2-скелет и с помощью него построим ещё одну полумагическую расстановку весов $\mathcal{S}$ : пусть каждое ребро из линейной части скелета имеет вес $a$, каждое ребро из циклической части - вес $a / 2$, а рёбра, не входящие в скелет, (и в том числе $e$ ) имеют вес 0 . Число $a$ подберём таким образом, веса из расстановки $\mathcal{S}$ не превосходили соответствующих весов из расстановки $\mathcal{W}$ и чтобы хотя бы на одном ребре равенство достигалось. Теперь вычтем из весов расстановки $\mathcal{W}$ веса $\mathcal{S}$. Получится полумагическая расстановка весов, в которой не все веса равны нулю, так как вес ребра $e$ не изменился. Если теперь стереть ребра нулевого веса, получится полумагический граф $G^{\prime}$, который является скелетом в $G$, содержит меньше рёбер, чем $G$, причём ребро $e$ не принадлежит никакому 1-2-скелету $G^{\prime}$ (потому что «скелет моего скелета - мой скелет»). Это противоречит определению графа $G$. Следовательно, таких графов $G$ не существует, чтд.
Теперь убедимся, что если в графе любое ребро принадлежит какому-нибудь 1-2-скелету, то граф - полумагический. Для каждого 1-2-скелета поставим на всех рёбрах его циклической части вес 1 , а на всех изолированных рёбрах вес 2. Тогда вклад этого скелета в каждую вершину будет одинаковым. Перебирая все 1-2-скелеты, просуммируем веса, полученные таким способом. Это и есть требуемая полумагическая расстановка весов.
2.5. Мы приводим решение из $[1, \S 3.1 .2]$. Пусть $A, B, C-$ вершины из $G \backslash S$, причём $B$ соединено ребром с $A$ и $C$. Для доказательства утверждения задачи достаточно проверить, что в этом случае в граф $G$ содержит ребро $A C$. Допустим, что это не так. По определению множества $S$, в графе $G$ найдётся вершина $D$, не соединённая с $B$ ребром. Если к графу $G$ добавить ребро $A C$, то в силу насыщенности, полученный граф будет обладать 1-скелетом и ребро $A C$ будет принадлежать этому скелету. Покрасим этот скелет в красный цвет. Аналогично при добавлении ребра $B D$ найдём синий 1-скелет, содержащий ребро $B D$. Сейчас мы из этих двух скелетов соберём 1-скелет графа $G$ и получим противоречие.
Объединим эти скелеты; кратности рёбер, которые оказались одновременно красными и синими, будем считать равными единице. Получим 1-2-скелет графа $G \cup A C \cup B D$. Очевидно, рёбра $A C$ и $B D$ принадлежат циклической части этого 1-2-скелета, причём все циклы в ней чётные, так как красные и синие рёбра в циклах чередуются.
Если рёбра $A C$ и $B D$ лежат в разных циклах, то искомый 1-скелет построить совсем легко: возьмём за основу красный 1-скелет и все красные рёбра того цикла, где лежит ребро $A C$, заменим на синие рёбра этого же цикла.
Пусть теперь рёбра $A C$ и $B D$ лежат в одном цикле $\gamma$. Начнём движение из вершины $B$ по синему ребру $B D$ и дальше вдоль цикла $\gamma$, пока не дойдём до вершины $A$ или $C$. Пусть это будет $A$, эти случаи совершенно аналогичны. Поскольку красное ребро, начинающееся в вершине $A$, - это $A C$, мы в процессе движения пришли в $A$ по синему ребру. Таким образом, пройденный путь из $B$ в $A$ начинается и кончается синим ребром. Возьмём тогда синий скелет, заменим все синие рёбра пройденного пути на красные, а также добавим ребро $A B$. Получится 1-скелет графа $G$.
2.6. Мы приводим решение из $[1, \S 3.1 .2]$. Если число вершин в насыщенном мягком графе $G$ нечётно, то очевидно, что он полный. Пусть число вершин в $G$ чётно и пусть $S$ - множество всех вершин $G$, которые соединены со всеми остальными вершинами, $s$ - их количество; $G_{1}, G_{2}, \ldots, G_{k}$ - компоненты связности графа $G \backslash S$. По утверждению предыдущей задачи мы знаем, что они являются полными графами.
Если в $G \backslash S$ являются нечётными не более $s$ компонент, то 1-скелет находится легко. Рассмотрим тогда случай, когда в графе $G \backslash S$ не менее $s+1$ нечётной компоненты, а с учётом того, что число вершин в $G$ чётно - не менее $s+2$ компонент. Если нечётных компонент оказалось больше $s+2$, соединим любые две из них ребром, получится граф $G_{1}$, для которого верно, что граф $G_{1} \backslash S$ имеет больше $s$ нечётных компонент связности. В таком графе не может быть 1-скелетов (это очевидно, и к тому же следует из простой части утверждения задачи 2.7), что противоречит насыщенности графа $G$.
Итак, у графа $G$ ровно $s+2$ нечётные компоненты. По аналогичным соображениям у него не может быть при этом чётных компонент.
2.7. Это утверждение - классическая теорема Татта (W. Tutte) Мы приводим её доказательство, следуя изложению в $[1, \S 3.1 .2]$.
Если в графе $G$ нашлось такое множество вершин $S$, что в графе $G \backslash S$ больше $|S|$ нечётных компонент связности, то граф $G$ мягкий. Это очевидно.
Проверим обратное утверждение. Допустим, что для каждого подмножества $S$ множества вершин графа $G$ граф $G \backslash S$ имеет не более $|S|$ нчётных компонент связности, но при этом граф $G$ мягкий.
Число вершин графа $G$ должно быть чётно, так как в противном случае при $S=\varnothing$ сразу получаем противоречие. Добавим к графу $G$ несколько рёбер, чтобы получился насыщенный мягкий граф $G^{\prime}$. Пусть $S^{\prime}-$ множество вершин, смежных с каждой вершиной $G^{\prime}, s$ - их количество. Поскольку количество вершин в графе $G^{\prime}$ такое же как и в $G$, т. е. чётно, то по основной теореме о мягких насыщенных графах, граф $G^{\prime} \backslash S^{\prime}$ содержит $s+2$ нечётные компоненты (нам важно, что их больше $s$ ), каждая из которых - полный граф. Уберём те рёбра, которые мы добавили, делая граф насыщенным. Возможно, при этом некоторые компоненты графа $G^{\prime} \backslash S^{\prime}$ распадутся на части, но в любом случае хотя бы один из «осколков» нечётной компоненты будет нечётным и общее число нечётных компонент будет больше $s$. Таким образом, построенное множество $S^{\prime}$ опровергает основное обсуждаемое свойство графа $G$.
2.8. Пусть $n$ - количество вершин графа $G$. Построим новый граф $G^{\prime}$ с $2 n$ вершинами: каждой вершине $v$ графа $G$ соответствуют две вершины $v^{\prime}$ и $v^{\prime \prime}$ в $G^{\prime}$; каждому ребру $u v$ в графе $G$ соответствуют два ребра в графе $G^{\prime}-u^{\prime} v^{\prime \prime}$ и $u^{\prime \prime} v^{\prime}$ (других рёбер в $G^{\prime}$ нет). Ясно, что $G^{\prime}$ - двудольный граф, и количество его рёбер в два раза превосходит число рёбер в $G$.
Заметим, что существование 1-2-скелета в исходном графе равносильно тому, что в графе $G^{\prime}$ найдётся паросочетание из $n$ рёбер. В самом деле, для каждого цикла $v_{1} v_{2} \ldots v_{\ell}$, принадлежащего скелету, в графе $G^{\prime}$ присутствуют рёбра $v_{1}^{\prime} v_{2}^{\prime \prime}, v_{2}^{\prime} v_{3}^{\prime \prime}, \ldots, v_{\ell}^{\prime} v_{1}^{\prime \prime}$; аналогично, для изолированного ребра $u v$ данного скелета в $G^{\prime}$ есть рёбра $u^{\prime} v^{\prime \prime}$ и $v^{\prime} u^{\prime \prime}$. Ясно, что все такие рёбра образуют полное паросочетание. Обратно, если дано полное паросочетание графа $G^{\prime}$, то по нему нетрудно построить 1-2-скелет в $G$. Например, рёбрам $u^{\prime} v^{\prime \prime}, v^{\prime} w^{\prime \prime}, w^{\prime} z^{\prime \prime}, z^{\prime} u^{\prime \prime}$ паросочетания соответствует цикл uvwz в графе $G$, а рёбрам $u^{\prime} v^{\prime \prime}$ и $v^{\prime} u^{\prime \prime}$ - изолированное ребро $u v$ в скелете.
Теперь рассмотрим условие о том, что для каждого подмножества $S$ множества вершин графа $G$ граф $G \backslash S$ имеет не более $|S|$ изолированных вершин. Сформулируем его для графа $G^{\prime}$. Возьмём любой набор $S$ вершин графа $G$. Что значит, что при их выкидывании вершина $u$ осталась изолированной? Это значит, что в графе $G^{\prime}$ все соседи вершины $u^{\prime}$ лежат в множестве $S^{\prime \prime}$. Если после выкидывания набора $S$ образовалось $k>|S|$ изолированных вершин, то в графе $G^{\prime}$ нарушается условие леммы Холла: у $k$ вершин не более $|S|$ соседей, что меньше, чем $k$. Ясно, что верно и обратное. Таким образом, наше условие равносильно выполнению в графе $G^{\prime}$ леммы Холла, то есть, снова равносильно наличию в $G^{\prime}$ полного паросочетания.
## 3 Магические графы
3.1. (1) Этим свойством обладают все полумагические графы.
(2) Докажем более общий факт: если в полумагическом графе есть такой полумагический набор весов рёбер, в котором веса каких-то двух рёбер $e_{1}$ и $e_{2}$ не равны, то рёбра $e_{1}$ и $e_{2}$ разделяются 1-2-скелетом.
Это устанавливается аналогично решению задачи 2.4. Выберем минимальный граф; фиксируем ту расстановку, где веса не равны; отнимем подходящим образом веса у рёбер, принадлежащих скелету; получится меньший граф. Так как исходный граф мы выбрали минимальным, одно из рёбер $e_{1}, e_{2}$ должно было получить при этом нулевой вес и было стёрто. Тогда в оставшемся графе по утверждению задачи 2.4 второе из этих рёбер принадлежит некоторому 1-2-скелету, который будет также и скелетом в исходном графе и будет разделять рёбра $e_{1}$ и $e_{2}$.
3.2. Пронумеруем все 1-2-скелеты и для $k$-го скелета положим вес рёбер циклической части равным $3^{k}$, а вес рёбер линейной части $-2 \cdot 3^{k}$. Теперь для каждого ребра найдём сумму его весов по всем содержащим его 1-2-скелетам. Получится полумагическая расстановка весов, которая является магической в силу единственности троичной записи натурального числа.
3.3. Следует из 3.2.
3.4. От вет: нет, граф $G$ может оказаться не магическим. Мы почерпнули этот пример в [5]. На рисунке 8 показаны два магических графа. Для любой магической расстановки весов ребра, нарисованные пунктиром, должны иметь вес $r / 2$, где $r$ - суммарный вес рёбер, сходящихся в одной вершине.

Рис. 8. Объединение магических графов - не всегда магический граф
3.5. а) Удвоение $G^{2}$ состоит из двух экземпляров графа $G_{1}$ и $G_{2}$ графа $G$ и множества рёбер $E$ между соответственными вершинами. Соответственные рёбра в компонентах $G_{1}$ и $G_{2}$ будем называть параллельными. Рёбра из множества $E$ будем называть вертикальными. Подграф в $G^{2}$, состоящий из двух соответственных компонент в $G_{1}$ и $G_{2}$, назовём дублированным.
Сначала опишем конструкцию поворота параллельных рёбер в удвоенном графе. Пусть подграф $H$ графа $G^{2}$ представляет собой объединение подграфов, лежащих в компонентах $G_{1}$ и $G_{2}$, таких что эти подграфы содержат
параллельные ребра $A_{1} B_{1}$ и $A_{2} B_{2}$. Убёрем в подграфе $H$ рёбра $A_{1} B_{1}, A_{2} B_{2}$ и добавим рёбра $A_{1} A_{2}$ и $B_{1} B_{2}$. Полученный подграф назовём $H^{\prime}$. Будем говорить, что подграф $H^{\prime}$ получен из $H$ с помощью поворота параллельных рёбер. Очевидно, что подграфы $H$ и $H^{\prime}$ одновременно являются (или не являются) 1-2-скелетами.
Теперь докажем, что граф $G^{2}$ из условия задачи является магическим. Для этого применим критерий магичности утверждение задач 3.1-3.2.
(1) Любое ребро принадлежит 1-2-скелету. Для рёбер из $G_{1}$ (и из $G_{2}$ ) это очевидно: в качестве скелета берём 1-2-скелет в $G_{1}$, содержащий это ребро, в объединении с его дублем в $G_{2}$. Для вертикальных рёбер следует взять поворот параллельных рёбер подходящего дублированного 1-2-скелета.
(2) Любая пара рёбер разделяются 1-2-скелетом. В случае, когда оба ребра $e_{1}$ и $e_{2}$ из $G_{1}$ (или оба из $G_{2}$ ), возьмём дублированный 1-2-скелет, содержащий ребро $e_{1}$. Если этот скелет не разделяет ребра $e_{1}$ и $e_{2}$, оба этих ребра принадлежат скелету. Тогда выполним поворот ребра $e_{2}$ и параллельного ему, получится скелет, разделяющий рёбра.
В случае, когда ребро $e_{1}$ из $G_{1}$, а ребро $e_{2}$ из $G_{2}$, возьмём в $G_{1} 1$-2-скелет, содержащий $e_{1}$ (он существует в силу утверждения задачи 2.4), а в $G_{2}-1$-2-скелет, не содержащий $e_{2}$ (существует по условию). Их объединение есть искомый разделяющий 1-2-скелет.
Если $e_{1}$ из $G_{1}$, а $e_{2}$ - вертикальное, подойдёт дублированный скелет, содержащий ребро $e_{1}$.
Наконец, если оба ребра $-A_{1} A_{2}$ и $B_{1} B_{2}$ - вертикальные, то поскольку в графе $G$ не было изолированных рёбер, в $G_{1}$ найдётся ребро $A_{1} X_{1}$ (где $X_{1} \neq B_{1}$ ) или $B_{1} Y_{1}$ (где $Y_{1} \neq A_{1}$ ). Выберем дублированный скелет, содержащий это ребро, и повернём это ребро и параллельное ему.
b) Доказывается аналогично п. а).
3.6. Утверждение задачи мы взяли в [6]. Доказательство, приведённое там, опирается на критерий магичности графа, который не встречался в данной серии задач. Задача содержит два утверждение, сложным является утверждение «тогда» - если $G^{\prime}$ - магический граф, то граф $G$ имеет 1-2-скелет и не имеет изолированных рёбер и изолированных вершин. Мы приводим доказательства этого утверждения, найденные участниками конференции.
Доказательство 1. Если бы в $G$ была изолированная вершина, то в графе $G^{\prime}$ она оказалась бы висячей и граф $G^{\prime}$ не мог бы быть магическим. Если бы в $G$ было изолированное ребро, то концы этого ребра в графе $G^{\prime}$ оказались бы смежными вершинами степени 2 и граф $G^{\prime}$ не мог бы быть магическим.
Допустим, что в $G$ не существует 1-2-скелета.
Обозначим новую вершину графа $G^{\prime}$ через $S$. Возьмём какой-нибудь 1-2-скелет $K$ графа $G^{\prime}$, можно считать, что все циклические компоненты в нём суть нечётные циклы. Рассмотрим компоненту этого скелета, содержащую вершину $S$. Эта компонента не может быть нечётным циклом, так как иначе при удалении из него вершины $S$ мы могли бы разбить остальные вершины этого цикла на пары и вместе с остальными частями рассматриваемого скелета получили бы скелет $G$. Значит, эта компонента является изолированным ребром $S A_{1}$. Сейчас мы построим в графе $G$ два множества вершин $-\mathcal{A}=\left\{A_{1}, \ldots, A_{n}\right\}$ и $\mathcal{B}=\left\{B_{1}, B_{2}, \ldots, B_{n}\right\}$, удовлетворяющих следующим условиям: все ребра $A_{i} B_{i}(1 \leqslant i \leqslant n)$ принадлежат скелету $K$, и все рёбра из вершин $A_{i}$, ведут в множество $\mathcal{B}$.
Для начала конструкции возьмём $\mathcal{A}=\left\{A_{1}\right\}$, и положим $B_{1}=S$. Допустим, что уже построены множества $\mathcal{A}=$ $\left\{A_{1}, \ldots, A_{k}\right\}$ и $\mathcal{B}=\left\{B_{1}, \ldots, B_{k}\right\}$, Допустим, что из множества $\mathcal{A}$ выходит какое-либо ребро, идущее вне $\mathcal{A} \cup \mathcal{B}$, скажем, $A_{k} B_{k+1}$. Вершина $B_{k+1}$ принадлежит некоторой компоненте скелета $K$. Если это нечётный цикл, то мы легко можем перестроить скелет $K$, чтобы получился полноценный 1-2-скелет графа $G$, что невозможно.
Для этого рассмотрим кратчайший путь от $B_{1}$ до $B_{k+1}$, идущий по вершинам $\mathcal{A} \cup \mathcal{B}$ и в котором вершины множеств $\mathcal{A}$ и $\mathcal{B}$ чередуются. Он имеет чётную длину. Выберем в нём все рёбра с чётным номером (последнее из них оканчивается вершиной $B_{k+1}$ ) и разобьём на пары все остальные вершины нечётного цикла.
Значит, можно считать, что вершина $B_{k+1}$ принадлежит изолированному ребру $B_{k+1} A_{k+1}$ скелета $K$. Поместим тогда вершину $B_{k+1}$ в множество $\mathcal{B}$, а вершину $A_{k+1}$ - в множество $\mathcal{A}$.
Будем продолжать увеличивать множества $\mathcal{A}$ и $\mathcal{B}$ описанным образом, пока это возможно. В конце концов окажется, что из множества $\mathcal{A}$ все рёбра ведут только в $\mathcal{A} \cup \mathcal{B}$. Предположим, что две вершины $A_{i}$ и $A_{j}$ соединены ребром. Рассмотрим кратчайший путь между этими вершинами, в котором вершины из $\mathcal{A}$ и $\mathcal{B}$ чередуются (существование такого пути легко усмотреть из процесса построения пары множеств). Вместе с ребром $A_{i} A_{j}$ он образует нечётный цикл, и тогда скелет $K$ перестраивается в скелет графа $G$ способом, аналогичным описанному выше.
Итак, требуемые множества $\mathcal{A}$ и $\mathcal{B}$ построены. Заметим теперь, что суммы весов всех вершин в этих множествах равны (ибо в них поровну вершин). С другой стороны, сумма весов всех вершин из $\mathcal{A}$ складывается из весов всех рёбер вида $A_{i} B_{j}$, в сумма весов вершин $\mathcal{B}$ - из тех же рёбер, а так же из рёбер вида $B_{1} B_{i}$ (напомним, что вершина $B_{1}=S$ соединена со всеми вершинами графа $\left.G\right)$ ! Противоречие.
Доказательство 2 (А. Цыбышев). Рассмотрим магическую расстановку весов на рёбрах графа $G^{\prime}$. Мысленно забудем про рёбра, выходящие из $S$, и будем временно рассматривать только рёбра графа $G$. Применим к ним алгоритм «избавления» от чётных циклов и гантелей, описанный в решении задач 2.1 и 2.2 . В результате останется граф $F$ с весами на рёбрах, в котором нет чётных циклов и гантелей, а сумма весов в каждой вершине такая же как в начале. Вернём обратно рёбра из вершины $S$ - получится полумагический граф $F^{\prime}$.
Если в графе $F$ найдётся изолированная вершина $A$, то в графе $F^{\prime}$ вершина $A$ будет висячей, что противоречит его полумагичности.
Пусть в $F$ есть висячая вершина $A$, и пусть $B$ - соседняя с ней вершина. Найдём в графе $F^{\prime} 1-2$-скелет, содержащий ребро $S B$. Очевидно, он должен состоять из цикла $S A B S$, а также других циклов и изолированных рёбер. Но тогда эти циклы, изолированные рёбра и ребро $A B$ образуют 1-2-скелет графа $G$, что и требовалось.
Осталось разобрать случай, когда в $F$ нет ни изолированных, ни висячих вершин. Поскольку в нём нет также чётных циклов и гантелей, все его компоненты - нечётные циклы. Но тогда они образуют искомый 1-2-скелет графа $G$.
Теперь докажем вторую часть утверждения задачи. Проверим, что если в графе $G$ есть 1-2-скелет и нет изолированных рёбер, то граф $G^{\prime}$ удовлетворяет свойствам задачи 3.1 (и следовательно, магический). Обозначим новую вершину графа $G^{\prime}$ через $A$, а 1-2-скелет в графе $G$ (любой, если их несколько) - через $S$.
1) Проверим, что каждое ребро $G^{\prime}$ принадлежит 1-2-скелету.
Случай а). Интересующее нас ребро $B C$ лежит в графе $G$.
a1) Если ребро $B C$ принадлежит линейной части скелета $S$, заменим в $S$ ребро $B C$ на треугольник $A B C-$ получится скелет графа $G^{\prime}$, содержащий $B C$.
a2) Если ребро $B C$ принадлежит циклической части скелета $S$, скажем, циклу $B C D \ldots B$, заменим в $S$ ребро $C D$ на два ребра $A C, A D$ - получится скелет графа $G^{\prime}$, содержащий $B C$ (в слегка увеличенном цикле).
a3) Если ребро $B C$ не принадлежит $S$ и при этом вершины $B$ и $C$ принадлежат одной компоненте скелета - циклу $B D_{1} \ldots D_{p} C E_{1} \ldots E_{q} B$, сконструируем из этого цикла два новых: $B D_{1} \ldots D_{p} C B$ и $A E_{1} \ldots E_{q} A$ (при $q=1$ второй цикл - это просто изолированное ребро), получится скелет графа $G^{\prime}$, содержащий $B C$.
а4) Если ребро $B C$ не принадлежит $S$ и при этом вершины $B$ и $C$ принадлежат разным компонентам скелета $B B_{1} \ldots B_{p} B$ и $C C_{1} \ldots C_{q} C$, заменим их на один большой цикл $B B_{1} \ldots B_{p} A C_{1} \ldots C_{q} C B$.
Случай б). Интересующее нас ребро $A B$ выходит из вершины $A$.
Если вершина $B$ содержится в изолированном ребре $B C 1-2$-скелета, то заменим это ребро на цикл $A B C A$. Если же вершина $B$ содержится в цикле $B D_{1} \ldots D_{p} B$, то заменим его на цикл $A B D_{1} \ldots D_{p} A$.
2) Проверим, что любые два ребра $e$ и $f$ разделяются 1-2-скелетами.
Случай а) Интересующие нас ребра принадлежат графу $G$.
a1) Одно из ребер, скажем, $e$, принадлежит циклической части скелета. Если ребро $f$ принадлежит скелету, заменим цикл, в котором лежит ребро $e$, на увеличенный цикл, не содержащий ребра $e$ (проходящий через вершину $A$, мы так делали в случае a2). Если ребро $f$ не принадлежит скелету, заменим цикл, в котором лежит ребро $e$, на увеличенный цикл, содержащий ребро $e$.
a2) Одно из рёбер - $e$ - лежит в линейной части скелета, а другое - тоже в линейной или вообще не принадлежит скелету. Добавим к скелету рёбра, соединяющие концы ребра $e$ с вершиной $A$.
а3) Оба ребра не принадлежат скелету. В качестве разделяющего возьмём скелет, содержащий ребро $e$, построенный в первой части решения; при его построении добавлялись рёбра не принадлежащие графу $G$.
Случай б) Одно из рёбер лежит в $G$, другое - в $G^{\prime}$. Мы оставляем читателю довести до конца этот несложный перебор. Следует помнить, что граф $G$ имеет не менее 4 вершин и не имеет изолированных рёбер.
3.7. Мы взяли это утверждение в [3].
a) Возьмём любые рёбра $e$ и $f$ и докажем, что они разделяются некоторым 1-2-скелетом. Выкинем из графа две вершины - концы ребра $f$ - и все рёбра, выходящие из них. В оставшемся графе $n-2$ вершины и степень каждой из них не меньше, чем $\frac{n}{2}-1=\frac{n-2}{2}$. Тогда, как известно, в этом графе найдётся цикл, проходящий по всем его вершинам (гамильтонов цикл). Этот цикл, вместе с ребром $f$, образует 1-2-скелет в исходном графе. Он разделяет рёбра $e$ и $f$, так как $f$ лежит в его линейной части, а $e$ - нет.
b) Построим граф $G$ на $n=2 k$ вершинах $X_{1}, \ldots, X_{k}, Y_{1}, \ldots, Y_{k}$, в котором проведены все рёбра вида $X_{i} Y_{j}$ и ребро $Y_{1} Y_{2}$. Степень каждой из вершин $X_{i}$ не меньше $k=\frac{n}{2}$. Докажем, что $G$ не является полумагическим графом.
Рассмотрим любой 1-2-скелет в $G$. Каждая из вершин $X_{i}$ имеет в этом скелете либо одну, либо две смежные вершины среди $Y_{i}$. Поскольку вершин обеих типов поровну, то 1-2-скелет должен являться паросочетанием из $k$ рёбер вида $X_{i} Y_{j}$. Это значит, что ребро $Y_{1} Y_{2}$ не содержится ни в одном 1-2-скелете, т. е. $G$ - не полумагический.
3.8. В магическом графе нет вершин степени 1 , и более того, никакие две вершины степени 2 не соединены ребром. Пусть $V$ - множество вершин степени 2 (возможно, пустое), а $W$ - множество вершин степени 3 или больше. Обозначим сумму весов рёбер в каждой вершине через $s$. Сумма весов всех рёбер, выходящих из $V$, равна $s|V|$. С другой стороны, все эти рёбра имеют один из концов в $W$, поэтому сумма их весов не превосходит $s|W|$. Таким образом, $|V| \leqslant|W|$ (причём строго меньше, если внутри $W$ есть хотя бы одно ребро). Далее, сумма степеней всех вершин не меньше, чем $2|V|+3|W|$, поэтому в графе есть не меньше, чем $|V|+\frac{3}{2}|W|$ рёбер. Но $|V|+\frac{3}{2}|W| \geqslant \frac{5}{4}(|V|+|W|)=\frac{5}{4} n$, т. к. $|W| \geqslant|V|$.
Для того чтобы количество рёбер действительно равнялось $\frac{5}{4} n$, необходимо, чтобы не было рёбер с обоими концами в $W$, т.е. чтобы граф был двудольным. В этом случае $s|V|=s|W|$, т.е. $|V|=|W|$. Но количество рёбер между $V$ и $W$, с одной стороны, равно $2|V|$, а с другой стороны, не меньше чем $3|W|$, т.е. $|V| \geqslant \frac{3}{2}|W|$, что невозможно. Таким образом, неравенство $r>\frac{5}{4} n$ доказано.
3.9. Пусть $n=5,6,7$ или 8. На рисунке изображены магические графы с минимальным числом рёбер.
3.10. На рис. $10 \mathrm{a}, \mathrm{b}, \mathrm{c}, \mathrm{e}, \mathrm{f}$ ) изображены примеры магических графов с минимальным возможным количеством рёбер. Вид графа зависит от остатка от деления $n$ на 4 . При $n=4 k$ приведены два вида графов: двудольный и недвудольный, при $n=4 k+2$ - только двудольный, в остальных двух случаях приведён пример недвудольного графа.
Доказательство магичности представленных графов состоит в рутинной проверке критерия магичности (задача 3.2). Мы не будем здесь делать эту проверку, но заметим, что есть обходной манёвр, который позволяет не делать такого перебора, и лишь немного не дотягивает до строгого доказательства, а именно, мы приведём магическую

a) 5 вершин, 7 рёбер

b) 6 вершин, 8 рёбер

c) 7 вершин, 9 рёбер

d) 8 вершин, 11 рёбер
Рис. 9. Минимальные магические графы

a) $n=4 k, r=5 k+1$, двудольный граф

c) $n=4 k+2, r=5 k+3$, двудольный граф

e) $n=4 k+1, r=5 k+2$, недвудольный граф

b) $n=4 k, r=5 k+1$, недвудольный граф

d) $n=4 k+2, r=5 k+4$, недвудольный граф

f) $n=4 k+3, r=5 k+4$, недвудольный граф
Рис. 10. Примеры магических графов с минимальным числом рёбер
расстановку весов рёбер, в «достаточно типичном» случае. Мы ограничимся случаем $n=4 k+3, r=5 k+4, k=2$; расстановка весов показана на рис 11 .
3.11. Мы приводим решение по мотивам [4]. Пусть уже построен связный магический граф с $n$ вершинами и $r$ рёбрами, не являющийся полным. Если он недвудольный, то при добавлении к нему ещё одного (любого!) ребра он не утрачивает магичности.
Действительно, новое ребро е обязательно входит в некоторый цикл. Если этот цикл чётен, то припишем ребру $e$ значение $\varepsilon$, а к остальным рёбрам цикла прибавим попеременно $\pm \varepsilon$, причём подберём $\varepsilon$ так, чтобы все веса остались положительными и различными. Полученная расстановка весов на новом графе будет магической.
Пусть теперь ребро $e$ входит в нечётный цикл. В силу недвудольности исходного графа, существует нечётный цикл, не содержащий $e$. Тогда $e$ лежит в некоторой гантели (см. лемму в решении задачи 4.1.). И опять можно приписать ребру $e$ вес $\varepsilon$, а к рёбрам гантели прибавить поправки $\pm \varepsilon, \pm 2 \varepsilon$, чтобы расстановка осталась магической.
Таким образом, достаточно для каждого $n \geqslant 5$ построить «минимальный» недвудольный граф. Это было сделано в предыдущей задаче для $n \neq 4 k+2$ (см. рис. $10 \mathrm{~b}, \mathrm{e}, \mathrm{f}$ ). Конструкции графов мы взяли в статье [4]. К сожалению, конструкция минимального недвудольного графа для $n=4 k+2$ в этой статье неверна. Кроме того, граф на рис. $10 \mathrm{~b}$ ) при $n=8$ не магический (в нём не разделяются 1-2-скелетами наклонное и нижнее ребро), пример магического графа при $n=8$ показан на рис. $9 \mathrm{~d}$ ), его изобрёл участник конференции А. Цыбышев. Мы не знаем, существует ли недвудольный магический граф с $4 k+2$ вершинами и $5 k+3$ рёбрами (при $k>3$ ), поэтому для случая $5 k+3$ рёбер оставим двудольный пример, а конструкцию добавления ребер начнём с недвудольного графа, содержащего $5 k+4$ ребра. Этот недвудольный граф с $4 k+2$ вершинами и $5 k+4$ рёбрами показан на рис. $10 \mathrm{~d})$. Пример расстановки весов на этом графе при $k=3$ см. на рис. 12 .

Рис. 11. $n=4 k+3, r=5 k+4, k=2$
Рис. 12. $n=4 k+2, r=5 k+4, k=3$
## 4 Однородные графы
## 4.1. Решение 1 (вокруг двудольности).
Лемма. Пусть в связном графе даны два нечётных цикла, один из которых содержит ребро $e$, а другой - нет. Тогда $e$ содержится в чётном цикле или гантеле.
Доказательство. Если циклы не пересекаются или пересекаются по одной вершине, то ребро $e$, очевидно, содержится в гантеле. Рассмотрим случай, когда циклы пересекаются не менее чем по двум вершинам. Пусть $X$ и $Y$ концевые вершины ребра $e$. Удалим ребро $e$ из первого цикла, на оставшуюся часть этого цикла будем ссылаться как на путь $X Y$. Пусть $A$ и $B$ - первая и последняя вершина пути $X Y$, принадлежащие второму циклу, тогда отрезки пути $X A$ и $B Y$ не пересекаются с циклом. Вершины $A$ и $B$ делят второй цикл на два пути разной чётности. Один из них дополняет пути $X A$ и $B Y$ до нечётного пути $X A B Y$, который, вместе с ребром $X Y$, образует чётный цикл.
Теперь обратимся к утверждению задачи. Не умаляя общности можно считать, что граф связный. Рассмотрим произвольное ребро е с концами $A$ и $B$. Выкинем его из графа. Допустим сначала, что граф $G \backslash e$ распался на две компоненты связности. Поскольку степени всех вершин были больше 1 , компоненты содержат более одной вершины. Ни одна из компонент не может быть двудольным графом. В самом деле, в двудольном графе сумма степеней вершин в обеих долях одинаковы; в нашей же компоненте сумма степеней в одной компоненте будет кратна $d$, а в другой (в той, куда попадёт конец ребра $e$ ) сумма степеней будет сравнима по модулю $d$ с -1 . Таким образом, в каждой компоненте есть нечётный цикл. Значит, ребро е содержится в гантеле.
Теперь предположим, что граф $G$ \e связен. Рассмотрим произвольный путь из $A$ в $B$ в этом графе. Если он нечётен, то $e$ содержится в чётном цикле. Пусть этот путь чётен (и, значит, $е$ содержится в нечётном цикле). Тогда, если бы граф $G \backslash e$ был двудольным, то эти вершины попали бы в одну и ту же долю, что невозможно, ибо сумма степеней вершин в этой доле была бы сравнима по модулю $d \mathrm{c}-2$, а в противоположной доле - кратна $d$. Значит, граф $G \backslash e$ не двудольный, а тогда найдётся нечётный цикл, не содержащий $e$. Осталось воспользоваться утверждением, приведённым в начале решения.
Решение 2. Это решение предложил участник конференции Алексей Цыбышев.
Расставим на всех рёбрах исходного однородного графа числа $1 / d$, сумма в каждой вершине будет равна 1. Начнём проводить процесс, описанный в решении задачи 2.3 , - избавляться от чётных циклов и гантелей, меняя соответствующим образом веса рёбер и откидывая нулевые рёбра. В итоге останется 1-2-скелет с полумагической расстановкой. Очевидно, что на его рёбрах стоят числа 1 и $1 / 2$. Но поскольку $1 / d$ не равно ни 0 , ни 1 , ни $1 / 2$, любое ребро хоть раз изменило свой вес. Это значит, что любое ребро содержится в каком-нибудь псевдоцикле.
4.2. Будем называть расстановку $\pm 1$ на чётных циклах и $\pm 1, \pm 2$ на гантелях, описанную в тексте условий, стандартной расстановкой на псевдоцикле.
Лемма. Пусть в графе задана расстановка чисел на рёбрах, причём веса всех рёбер ненулевые, а сумма в каждой вершине равна нулю. Тогда любое ребро содержится в чётном цикле или гантеле.
Доказательство леммы почти дословно повторяет решение задачи 4.1. Вместо количества рёбер нужно говорить о сумме их весов и пользоваться тем, что в двудольном графе сумма весов рёбер, выходящих из обеих долей, одинаковы.
1. Предположим, что однородный граф $G$ - магический с суммой $s$ в каждой вершине. Вычтем из веса каждого ребра число $s / d$, получится расстановка на рёбрах различных чисел с нулевой суммой в каждой вершине.
Выберем в графе $G$ произвольное ребро ненулевого веса и согласно лемме найдём содержащий его псевдоцикл. Вычтем из весов рёбер этого псевдоцикла его стандартную расстановку, умноженную на такой коэффициент, чтобы вес данного ребра обнулился. Теперь выкинем из $G$ все «нулевые» рёбра. Полученная разметка рёбер уменьшенного графа по прежнему обладает нулевой суммой в каждой вершине. Снова выберем в нём ребро и снова применим лемму, ит. д.
Количество рёбер в графе на каждом шагу уменьшается и рано или поздно все рёбра станут «нулевыми». Это будет означать, что исходная разметка рёбер графа $G$ является «суммой» стандартных расстановок на псевдоциклах с подходящими коэффициентами. Поскольку любые два ребра $G$ имеют разный вес, то для них найдётся псевдоцикл, вносящий в эти рёбра разный вклад. Это и означает, что он слабо разделяет эти два ребра.
2. Предположим теперь, что любые два ребра слабо разделяются псевдоциклами. Выпишем все псевдоциклы, и пронумеруем их числами от 1 до $N$ (где $N$ - их количество). Для $k$-го псевдоцикла назначим веса его рёбер, умножив его стандартную расстановку на $5^{k}$. Теперь для каждого ребра сложим все назначенные ему веса и прибавим большую константу $C$, чтобы все веса стали положительными. Будем считать этот результат окончательным весом данного ребра. Полученная разметка рёбер графа - магическая: каждый псевдоцикл даёт нулевой суммарный вклад весов в каждую вершину; добавление $C$ к каждому ребру изменяет сумму в вершине на $d C$. При этом веса всех рёбер различны. Действительно, так как целое число однозначно представляется в виде комбинации степеней пятёрки с коэффициентами $-2,-1,0,1,2$, а у любых двух рёбер хотя бы в одном псевдоцикле коэффициенты при соответствующей степени пятёрки различны.
4.3. Эта теорема является непосредственным следствием критерия магичности однородных графов, изложенного в предыдущей задаче.
Докажем, что любые два ребра $G$ слабо разделяются псевдоциклами. Если они лежат в одной компоненте, то это следует её магичности. Если же в разных, то в одной из них можно выбрать псевдоцикл, содержащий соответствующее ребро (задача 4.1.), он и будет разделять эти два ребра.
4.4. 1. Проверим сначала, что $\ell(G) \neq 1$. Если $\ell(G)=1$, то при удалении одного ребра $e$ граф распадается на две компоненты связности. Рассмотрим любую из них. Как и сам граф $G$, она является двудольным графом, причём степень одной её вершины равна $d-1$, а остальных - ровно $d$. Как уже обсуждалось (см. решение задачи 4.1.), этого не может быть.
2. Докажем, что если $\ell(G) \geqslant 3$, то $G$ - магический. Возьмём любые два ребра $e$ и $f$ и докажем, что они слабо разделяются псевдоциклами. При выкидывании этих рёбер граф остаётся связным, поэтому найдётся цикл, содержащий $e$, но не содержащий $f$. В силу двудольности этот цикл чётен, и он разделяет $e$ и $f$.
3. Докажем, что если $\ell(G)=2$, то $G$ - не магический. Пусть при выкидывании рёбер $e$ и $f$ граф теряет связность; тогда образуется ровно две компоненты связности, обозначим их $V$ и $W$. Каждая из них является двудольным графом. Если рёбра $e$ и $f$ имеют общий конец, то в одной из компонент окажется вершина степени $d-2$, в то время как остальные её вершины имеют степень $d$ - такой граф не может быть двудольным. Следовательно, $e=A B$ и $f=C D$ не имеют общих рёбер, и в одной компоненте содержатся вершины $A, C$, а в другой - вершины $C$ и $D$, степени которых равны $d-1$. Значит, $A$ и $C$ (а также $B$ и $D$ ) попадают в разные доли и все пути между ними нечётны.
Докажем, что рёбра $e$ и $f$ не могут слабо разделяться псевдоциклом. Нечётных циклов (а значит, и гантелей) в графе $G$ вообще нет в силу его двудольности. Если же чётный цикл содержит, например, ребро $e$, то он содержит и ребро $f$, причём из выводов предыдущего абзаца следует, что между ними в цикле с каждой стороны расположено нечётное число ребер. Значит, этот цикл не может слабо разделять рёбра $e$ и $f$.
## References
[1] Ловас Л., Пламмер М. Прикладные задачи теории графов. М.: Мир, 1998.
[2] Doob M. Characterizations of regular magic graphs // J. Combin. Theory, ser. B. Vol. 25. 1978. P. 94-104.
[3] Katerinis $P$. Minimum degree, factors and magic graphs.
[4] Trenkler M. Number of vertices and edges of magic graphs // Ars Combinatoria. 2000. Vol. 55. P. 93-96.
[5] Trenkler M. Some results on magic graphs // Proceedings of the third Czechoslovak symposium on graph theory. Teubner-texte zur Mathematik. Bd. 59. Leipzig: Taubner Verlagsgellschaft, 1983. P. 328-332. arXiv:0906.1317v1.
[6] Semaničová A. Magic graphs having saturated vertex // Tatra Mt. Math. Publ. 2007. Vol. 36. P. 121-128.
# Magic graphs
K. Kokhas, D. Rostovskiy
## Definitions and notations
All the graphs under consideration are supposed to be without isolated vertices, multiple edges and loops.
The words "cycle" and "path" mean simple cycle and simple path in a graph.
For every edge of a graph we assign a positive number that we call a weight of this edge. A graph is called semimagic if it is possible to choose weights of its edges and a positive number $s$ such that for each vertex the sum of weights of its edges equals to $s$. A graph is called magic if it possible to choose these weights to be pairwise different. Observe that a vertex of degree 1 in the semimagic graph is necessarily the endpoint of the isolated edge. A magic graph can contain at most 1 isolated edge.
A subgraph $F$ of a given graph $G$ is called a skeleton, if it contains all the vertices of $G$ and none of them is isolated vertex in $F$. 1-2-skeleton is a skeleton such that all its vertices have degree 1 or 2 and for each component the degrees of its vertices are the same. In other words 1-2-skeleton consists of isolated edges and simple cycles only. For each 1-2-skeleton we can split all the edges of the graph onto 3 groups: edges that belong to the cyclic part of $F$ (we will denote it by $F_{c}$ ); edges that belong to the linear part of $F$, i. e. isolated edges in $F$ (we will denote it by $F_{\ell}$ ); and edges that do not belong to $F$. We say that 1 -2-skeleton separates edges $e_{1}$ and $e_{2}$ if these two edges belong to different groups. In other words at least one of them belongs to $F$ but at most one belongs to $F_{c}$ and at most one belongs to $F_{\ell}$.
We will use the following notations: $C_{n}$ is the cycle with $n$ edges ( $n \geqslant 3$ ); $P_{n}$ is the path with $n$ edges; $K_{n}$ is the complete graph with $n$ vertices; $K_{m, n}$ is the complete bipartite graphs with parts of $m$ and $n$ vertices.

A cycle $C_{5}$

A path $P_{5}$

A complete graph $K_{5}$

A complete bipartite graph $K_{2,3}$
Figure 1: Some standard graphs
A direct product $F \times G$ of two graphs is the following graph. Its vertex set is the set of all pairs $(v, w)$, where $v$ is a vertex of $F, w$ is a vertex of $G$. The vertices $\left(v_{1}, w_{1}\right)$ and $\left(v_{2}, w_{2}\right)$ are joined by an edge, if either $v_{1}=v_{2}$ and $G$ contains the edge $w_{1} w_{2}$, or $w_{1}=w_{2}$ and $F$ contains the edge $v_{1} v_{2}$. The graph $G \times P_{1}$ is called the double of graph $G$. Dum-bell is a graph consisting of either two odd cycles which share exactly one common vertex, or two odd cycles joined by a path of an arbitrary length.

Figure 2: Graph $C_{5} \times P_{2}$

Figure 3: Graph and its double

Figure 4: Dum-bells
## 1 Examples
1.1. Show that magic graphs with less than 5 vertices do not exist, except the graph $P_{1}$ (one edge).
1.2. Prove that a bipartite graph with odd number of vertices is non magic. Could it be semimagic?
1.3. Determine wether these graphs are semimigic or magic (the answers may depend on $n$ and $m$ )
a) $K_{n}$;
b) $K_{m, n}$;
c) $P_{n} \times P_{1}$;
d) $P_{n} \times P_{m}$ при $n, m>1$;
e) $C_{n} \times P_{1}$;
f) $C_{n} \times P_{m}, n \geqslant 3, m>1$;
g) cycle of $2 n$ vertices, where every two opposite vertices are joined by edge.
## 2 Semimagic graphs
2.1. Prove that if a semimagic graph $G$ contains an even cycle then $G$ contains also a semimagic skeleton (i. e. the skeleton which is a semimagic graph itself) such that not all the edges of the cycle belong to this skeleton.
2.2. Prove that if a semimagic graph $G$ contains a dum-bell then $G$ contains also a semimagic skeleton such that not all the edges of the dum-bell belong to this skeleton.
2.3. Prove that each semimagic graph has 1-2-skeleton.
2.4. The main theorem about semimagic graphs. Prove that a graph is semimagic if and only if each of its edges belongs to some 1-2-sceleton.
In the following problems we find out when a graph contains 1-2-skeleton. We call a graph soft if it does not have 1-skeleton, and solid if it contains 1-skeleton. A soft graph is called saturated if it turns solid when an arbitrary edge has been added.
Let $G$ be an arbitrary graph, $S$ is an arbitrary set of its vertices. Denote by $G \backslash S$ the graph obtained by deletion of all the vertices of the set $S$ and its edges.
2.5. Let $G$ be a saturated soft graph, $S$ be the set of all its vertices such that each of them is joined with all other vertices. Prove that all components of the graph $G \backslash S$ are complete graphs.
2.6. The main theorem about saturated soft graphs. A graph $G$ is saturated and soft if and only if either
a) $G$ is a complete graph with odd number of vertices, or
b) the number of vertices of $G$ is even and we can split it onto complete graphs $S_{0}, G_{1}, G_{2}, \ldots, G_{k}$, where $k=\left|S_{0}\right|+2$, such that for all $i$ the number of vertices in $G_{i}$ is odd and every vertex of $G_{i}$ is joined with all the vertices of $S$.
2.7. Prove that a graph $G$ is solid if and only if for each set $S$ of vertices of $G$ the graph $G \backslash S$ has at most $|S|$ odd components.
2.8. Prove that graph $G$ contains 1-2-skeleton if and only if for each set $S$ of vertices of $G$ the graph $G \backslash S$ has at most $|S|$ isolated vertices.
## 3 Magic graphs
3.1. Prove that each magic graph has the following two properties:
(1) Every edge of the graph belongs to some 1-2-skeleton.
(2) Every two edges are separated by some 1-2-skeleton.
3.2. Prove the converse statement: if a graph has these two properties then it is magic.
3.3. Graph $G^{\prime}$ is obtained from magic graph $G$ by adding a new edge and this new edge belongs to some 1-2-skeleton of graph $G^{\prime}$. Prove that $G^{\prime}$ is magic.
3.4. Graph $G$ consists of two (non isomorphic) components, each component has at least 3 vertices. Both components are magic graphs. Is it true that $G$ is necessarily magic?
3.5. a) For each edge $e$ in a semimagic graph $G$ (without isolated edges) there exists a 1-2-skeleton, whose cyclic part does not contain $e$. Prove that the double of $G$ is magic.
b) $G$ is a semimagic graph without isolated edges, $H$ is an arbitrary connected graph without isolated edges. Prove that $G \times H$ is a magic graph.
3.6. $G$ is an arbitrary graph with at least 4 vertices. Graph $G^{\prime}$ is obtained by adding one more vertex to $G$, and this vertex is joined with all the "old" vertices of $G$. Prove that the graph $G^{\prime}$ is magic if and only if the graph $G$ is without isolated edges and it has 1-2-skeleton.
3.7. a) Graph $G$ has $n \geqslant 5$ vertices. The degrees of vertices of $G$ are at least $\frac{n}{2}+1$. Prove that $g$ is a magic graph.
b) Prove that for any large $n$ there exist non semimagic graph such that the minimal degree of its vertices equals to $[n / 2]$.
3.8. $G$ is a connected magic graph with $n \geqslant 5$ vertices and $r$ edges. Prove that $r>\frac{5}{4} n$.
3.9. For $n=5,6,7,8$ construct a connected magic graph with $n$ vertices and $r$ edges, where $r$ is the minimal integer that satisfies the inequality $r>\frac{5}{4} n$.
3.10. Construct an analogous graph for each $n \geqslant 5$.
3.11. Prove that there exists a connected magic graph with $n$ vertices and $r$ edges, if the pair $(n, r)$ satisfies the inequality $\frac{5}{4} n5$ only.
To show that the graph is semimagic take all weights equal to 1 .
If $n=3$ the graph is not magic, it is evident.
If $n=4$ we have 4 vertices $A, B, C, D$. Assume that it is magic, let $s$ be the sum of weights of all edges adjacent to the same vertex. Then $2 s$ is the sum of all edges adjacent to vertices $A$ and $C$, i.e. the sum of all edges of the graph except $C D$ but with weight of $A C$ counted twice. By the analogous consideration for vertices $B$ and $D$ we will obtain that the weights of $A C$ and $B D$ coincide.
If $n>5$ the graph is magic. We will prove this by the following construction. Since the graph is regular, we may consider arbitrary weights (not necessarily positive), because in the regular graph we can make all the weights to be positive by adding a large positive constant. Let us describe the main construction of magic weights for the regular graphs by means of even cycles.
Write out all even cycles that are contained in our graph and enumerate them by numbers from 1 to $N$ (where $N$ is the total number of these cycles). For any $k$ put the weights $\pm 3^{k}$ alternatively on the edges of $k$-th cycle. After that for each edge sum up all the weights on it.
Let us check that this set of weights is magic. Indeed, the sum of weights of edges adjacent to every vertex equals 0 , because the contribution of each cycle to this sum is 0 . Now let us check that all weights are distinct. For each edge of the graph write out the list cycles which contain this edge. It is clear that for any two edges there exists an even cycle that contains one of these edges only. Therefore for any two edges their lists of cycles do not coincide. But then the sums of weights determined by the cycles are not equal. This is because the weights obtained by our construction may be regarded as $N$-digital ternary numbers in system (with base 3 ) with digits 0 and $\pm 1$. Since all lists are distinct then all these ternary numbers are distinct also.
b) Answer: the graph is semimagic for $m=n$ only. For $m=n>2$ it is magic.
The equality $m=n$ is necessary for the graph to be semimagic (see problem 1.2).
If $m=n$ the graph is regular and hence semimagic. If $m=n=2$ it is evidently non-magic (see problem 1.1). And if $m=n>2$, the graph is magic, due to construction from the previous solution.
c) Answer: the graph is semimagic but non-magic.
To show that it is semimagic it is sufficient to assign weights of all edges to be 1 , except leftmost and rightmost edges of weight 2. The graph is non-magic because it contains adjacent vertices of degree 2 .
d) Answer: the graph is magic if either $m$ or $n$ is odd. If both $m$ and $n$ are even, then the graph is not semimagic.
If both $m$ and $n$ are even, then the graph is bipartite with $(n+1)(m+1)$ vertices (odd number). This graph is not semimagic due to problem 1.2.
Now prove that the graph is magic for odd $n$ and $m>1$.
At first consider case $m=2$. Consider the initial placement of nonnegative semimagic weights depicted on fig. 6: bold edges have weight $2 m$, dashed edges have weight 0 , all other edges have weight $M$, where $M$ is a big number, that we will choose later. This set of weights is almost semimagic, but some weights here are zero and the graph is not regular.

Figure 6: Almost semimagic weights on graph $P_{n} \times P_{2}$
Now we will perform the main construction of magic weights for the regular graphs by means of even cycles, but with 3 corrections (because our graph is not regular):
1) In the main construction we will consider 4-cycles only (i.e. the sides of cells).
2) The final weight of an edge will be equal to the sum of its initial weight and the weight obtained by the main construction.
3) When we assign positive and negative weights of edges in cycles, we choose plus sign for edges whose initial weight has been equal to zero.
Finally, choose $M$ so big that all the final weights turn out to be positive and distinct. Then this set of weights will be magic.
Now consider a case $n$ is odd, $m>2$. We perform analogous actions. The initial weights are depicted on fig. 7 (odd number $n$ corresponds to the vertical side of the picture).

Figure 7: Almost semimagic weights on graph $P_{n} \times P_{m}$
e) Answer: the graph is always semimagic. It is magic for even $n$ only.
We may realize this graph as edges of $n$-gonal prism.
Let $n=2 k$. The graph contains evident cycles of length 4 (sides of facets) and two $2 k$-cycles (sides of bases). The property "for any two edges there is a cycle that contains one of them only" is satisfied. Therefore we can perform the main construction for regular graphs.
Let us prove that the graph is non-magic for $n=2 k+1$. As usual let $s$ be the sum of weights of edges adjacent to the same vertex. It is easy to see that the sum of weights of all edges equals $n d$. Denote our prism by $A_{1} A_{2} \ldots A_{2 k+1} B_{1} \ldots B_{2 k+1}$. The sum of weights of edges adjacent to vertices $A_{1}, A_{3}, \ldots, A_{2 k+1}, B_{2}, B_{4}, \ldots, B_{2 k}$, equals $n d$ and can be interpreted as the sum of weights of all edges of the graph except $B_{1} B_{2 n+1}$ and with edge $A_{1} A_{2 n+1}$ counted twice. Hence, the weights of $A_{1} A_{2 n+1}$ and $B_{1} B_{2 n+1}$ are equal.
f) Answer: the graph is magic.
Solution is analogous to solution 1.3d). Let $A_{1}, \ldots, A_{m+1}$ be vertices of graph $P_{m}$. Initial placement of nonnegative weights on the graph looks as follows: all edges of subgraphs of the form $C_{n} \times A_{i}$ have weight 2 , all other weights are 0 . We apply the main construction for 4 -cycles only.
g) Answer: the graph is always semimagic; it is magic for odd $n$.
It is semimagic because it is reguar. For $n=2$ this graph is $K_{4}$, we discuss it in problem $1.3 \mathrm{a}$ ). For odd $n$ it is magic because the main construction works (we have a good store of even cycles here: 4 -cycles that contains subsequent diameters and $(n+1)$-cycles of the form "semicircle").
For even $n$ the graph is non-magic. Let $A_{1} A_{2} \ldots A_{n} B_{n} \ldots B_{2} B_{1}$ be vertices of the given cycle. The set of edges adjacent to all vertices $A_{i}, B_{i}$, where $i$ runs over odd numbers, is the set of all edges of the graph except $A_{n} B_{n}$ and with $A_{1} B_{1}$ counted twice. It follows that in any semimagic set of weights the opposite edges of the cycle have the same weight.
## 2 Semimagic graph
2.1. Let $a$ be the minimal weight of the edges in the given cycle. We will move along the cycle and decrease and increase by $a$ alternatively the weights of the edges of the cycle. After that erase all the edges with zero weight. The remaining graph together with the weights of its edges will be desired semimagic skeleton.
2.2. Let $A$ be the vertex of degree 3 (or 4 ) of one of odd cycles of the dum-bell. We will bypass the dum-bell starting from the vertex $A$. First of all we will move along the odd cycle and assign the weights to its edges to be $\pm a$ alternatively. After return to the vertex $A$, we have two edges of weight $a$ adjacent to $A$. Then we move along the handle of dum-bell and assign the weights of its edges to be $\mp 2 a$ alternatively. After that we move along the second cycle assigning its edges weights $\pm a$ alternatively. We obtain semimagic weights with $s=0$ (see fig. 5).
Now we are going to add new weights to old ones. For this choose the value of parameter $a$ so that all the weights of the graph would be nonnegative and the weight of at least one of the edges would be equal to 0 . We will obtain semimagic weights. After erasing all the edges with zero weight we obtain the desired skeleton.
2.3. The constructions of solutions $2.1,2.2$ allow us to decrease consequently the number of edges in the graph by destroying its even cycles and dum-bells. The graph will be semimagic during all these operations and therefore there will be no pendant
vertices in it (except the endpoints of isolated edges). Observe that if a component of the graph contains two even cycles then it contains also an odd cycle or a dum-bell. And if a component contains exactly one (odd) cycle and does not contain pendant vertices then this component is exactly this odd cycle.
So, after destroying all even cycles and dum-bells we will obtain a graph consisting of several isolated edges and several (odd) cycles.
2.4. Let us check that every edge of a semimagic graph belongs to some 1-2-skeleton. Let $G$ be a graph with minimal number of edges such that one of its edges, say, $e$ does not belong to any 1-2-skeleton. Fix a set of semimagic weights $\mathcal{W}$ on graph $G$. Fix an arbitrary 1-2-skeleton and construct one more semimagic set of weights $\mathcal{S}$ as follows. Let each edge of the linear part of the skeleton has weight $a$, each edge of the cyclic part has weight $a / 2$ and all other edges (including $e$ ) have weight 0 . Choose the value of $a$ so that all the weights of the set $\mathcal{S}$ do not exceed the corresponding weights in the set $\mathcal{W}$ and for at least one edge we have an equality. Now subtract from weights of $\mathcal{W}$ the weights of $\mathcal{S}$. We obtain a semimagic set of weights, where not all the weights are equal to 0 , because the weight of edge $e$ has not changed. Now remove all edges of zero weight. We obtain semimagic graph $G^{\prime}$ which is a skeleton of $G$. $G^{\prime}$ contains less edges than $G$ and edge $e$ does not belong to any 1-2skeleton of $G^{\prime}$, because "the skeleton of my skeleton is my skeleton". This is a contradiction with the definition of $G$. Therefore the graph $G$ does not exist.
Now let us check that if every edge of the graph belongs to some 1-2-skeleton, then the graph is semimagic. For each 1-2-skeleton assign the weight of its cyclic edges be 1 and the weight of its isolated edges be 2 . We obtain semimagic set of weights (but with zero weights). Let us sum up all these set of weights over all 1-2-skeletons. The result is the desired semimagic set of weights.
2.5. We take this problem and the following solution from [1, §3.1.2]. Let $A, B, C$ be vertices of $G \backslash S$ and $B$ is joined with both $A$ and $C$. It is sufficient to prove that graph $G$ contains edge $A C$. Assume that this is not true. By the definition of the set $S$ graph $G$ contains the vertex $D$ such that the edge $B D$ does not belong to the graph. If we add edge $A C$ to graph $G$, then the new graph has 1-skeleton (since graph $G$ is saturated). It is clear that edge $A C$ must belong to this skeleton. Color this skeleton in red. Analogously, if we add edge $B D$ to graph $G$, we can find blue 1-skeleton containing edge $B D$. Now from these two skeletons we will construct a 1-skeleton of graph $G$ and get a contradiction.
Consider the union of these skeletons; the edges which are red and blue simultaneously we will consider as usual (nonmultiple) edges. Then this union is a 1-2-skeleton of graph $G \cup A C \cup B D$, and all its cycles are even because red and blue edges alternate.
It is clear that edges $A C$ and $B D$ are both in the cyclic part. If these edges belong to different cycles, then the desired 1-skeleton can be constructed as follows. Take the red skeleton and replace all red edges of the cycle that contains $A C$ by blue edges of the same cycle. Now consider the second case, let edges $A C$ and $B D$ belong to cycle $\gamma$. Let us bypass cycle $\gamma$ starting from vertex $B$ and edge $B D$ till we reach vertex $A$ or $C$. Let it be $A$ for definiteness. Since the red edge of vertex $A$ is $A C$, we finish our movement by blue edge. Hence the path from $B$ to $A$ starts and finishes with blue edges. Take the blue skeleton, replace all blue edges of the path by red edges of the same path and add edge $A B$. We obtain 1-skelton of graph $G$.
2.6. We take this problem and the following solution from [1, §3.1.2]. It is evident that a soft saturated graph with odd number of vertices is necessarily complete. Let the number of vertices in $G$ be even; let $S$ be the set of all vertices of $G$ that are joined with all other vertices and $s$ be the number of these vertices; let $G_{1}, G_{2}, \ldots, G_{k}$ be components of connectivity of graph $G \backslash S$. Due to the statement of the previous problem we know that they are all complete graphs.
If $G \backslash S$ has at most $s$ odd components, construction of the 1-skeleton is trivial. Assume that $G \backslash S$ has at least $s+1$ odd components; taking into account parity of number of vertices of $G$, we conclude that $G \backslash S$ has at least $s+2$ odd components. If the number of odd components is greater than $s+2$, join any two of them by an edge. We obtain graph $G_{1}$ such that graph $G_{1} \backslash S$ has more than $s$ odd components of connectivity. There are no 1-skeletons in this graph (it is evident, it follows also from the easy part of the statement of problem 2.7), but this is impossible because graph $G$ is saturated.
Thus, graph $G$ has exactly $s+2$ odd components. It can not have even components due to analogous reasons.
2.7. This statement is classical Tutte theorem. The following proof is from $[1, \S 3.1 .2]$.
If we can find the set of vertices $S$ in graph $G$, such that graph $G \backslash S$ has more than $|S|$ odd components of connectivity, then graph $G$ is soft. It is clear.
Check the converse statement. Assume that for any subset $S$ of the set of vertices of $G$ graph $G \backslash S$ has at most $|S|$ components of connectvity but at the same time graph $G$ is soft.
The number of vertices of graph $G$ is even because otherwise $S=\varnothing$ leads to the contradiction. Add several edges to graph $G$ to obtain soft saturated graph $G^{\prime}$. Let $S^{\prime}$ be set of vertices joined with every vertex of $G^{\prime}, s$ be number of its elements. Since $G^{\prime}$ and $G$ have equal (even) number of vertices due to main theorem about soft saturated graphs we have that graph $G^{\prime} \backslash S^{\prime}$ contains $s+2$ odd components, each of them is a complete graph. Now remove those edges we have add making graph saturated. It is possible that some components of graph $G^{\prime} \backslash S^{\prime}$ will fall to parts but at least one part of odd component will be odd and the total number of odd components will be grater than $s$. Thus, the set $S^{\prime}$ disproves the property of $G$ under consideration.
2.8. Let $n$ be the number of vertices of graph $G$. Construct a new graph $G^{\prime}$ with $2 n$ vertices. For every vertex $v$ in $G$ take two vertices $v^{\prime}$ and $v^{\prime \prime}$ in $G^{\prime}$; for every edge $u v$ define two edges in $G^{\prime}: u^{\prime} v^{\prime \prime}$ and $u^{\prime \prime} v^{\prime}$ Then $G^{\prime}$ is a bipartite graph, that has twice as many edges as $G$.
Remark that the existence of 1-2-skeleton in $G$ is equivalent to the existence of perfect matching in $G^{\prime}$. Indeed, for each cycle $v_{1} v_{2} \ldots v_{\ell}$ of the skeleton graph $G^{\prime}$ has edges $v_{1}^{\prime} v_{2}^{\prime \prime}, v_{2}^{\prime} v_{3}^{\prime \prime}, \ldots, v_{\ell}^{\prime} v_{1}^{\prime \prime}$; analogously for any isolated edge graph $G^{\prime}$ contains
edges $u^{\prime} v^{\prime \prime}$ and $v^{\prime} u^{\prime \prime}$. It is clear that all these edges form a perfect matching. Conversely, for any perfect matching of graph $G^{\prime}$ it is not difficult to construct a 1-2-skeleton. For example, the edges $u^{\prime} v^{\prime \prime}, v^{\prime} w^{\prime \prime}, w^{\prime} z^{\prime \prime}, z^{\prime} u^{\prime \prime}$ of the perfect matching determine a cycle $u v w z$ of the graph $G$, and edges $u^{\prime} v^{\prime \prime}$ and $v^{\prime} u^{\prime \prime}$ determine an isolated edge $u v$ of the skeleton.
As we know, for each set $S$ of vertices of $G$ the graph $G \backslash S$ has at most $|S|$ isolated vertices. Let us reformulate this property in terms of graph $G^{\prime}$. Consider an arbitrary set $S$ of vertices of graph $G$. What does it mean that after deletion of this set the vertex $u$ becomes isolated? This means that in the graph $G^{\prime}$ all neighbours of $u^{\prime}$ belong to $S^{\prime \prime}$. If after removing set $S$ we have $k>|S|$ isolated vertices then the conditions of Hall theorem is not satisfied in graph $G$ because we found a set of $k$ vertices that has at most $|S|$ neighbours (the last number is less then $k$ ). The converse is also true (i.e. if the conditions of Hall theorem is not satisfied, then the property under discussion holds). Therefore this property is equivalent to the conditions of Hall theorem in graph $G^{\prime}$ that is equivalent to existence of perfect matching in $G^{\prime}$.
## 3 Magic graphs
3.1. (1) All the semimafic graphs have this property.
(2) We will prove more general fact: if a semimagic graph has a semimagic set of weights such that two edges, say $e_{1}$ and $e_{2}$, have distinct weights, then the edges $e_{1}$ and $e_{2}$ are separated by a 1-2-skeleton.
It can be done analogously to the solution of problem 2.4. Choose a minimal graph; fix a set of weights, where not all weights are equal; subtract by a suitable way the weights belonging to a skeleton; we will obtain smaller graph. Since the initial graph was minimal, one of edges $e_{1}, e_{2}$ must receive zero weight and should be removed. In the remaining graph the second edge due to statement of problem 2.4 belongs to some 1-2-skeleton, that sepapates these edges in the initial graph.
3.2. Let us enumerate all the 1-2-skeletons. Let the edges of cyclic part of $k$-th skeleton have weights $3^{k}$, and edges of linear parts have weight $2 \cdot 3^{k}$. For each edge sum up all its weights over all 1-2-skeletons. The set of weights obtained is semimagic due to uniqueness of ternary notation of numbers.
3.3. It follows from 3.2.
3.4. Ans w er: no, graph $G$ is not necessarily magic. Two magic graphs are depicted on the fig. 8 For any set of magic weights the edges denoted by dashed lines must have weight $s / 2$.

Figure 8: Union of magic graphs can be non-magic
3.5. a) The double $G^{2}$ consists of two copies $G_{1}$ and $G_{2}$ of the graph $G$ and of the set of edges $E$ between the corresponding vertices. The corresponding edges in parts $G_{1}$ and $G_{2}$ are called parallel. The edges from the set $E$ are called vertical. A subgraph of $G^{2}$ consisting of two copies of some subgraph of $G$ is called duplicated.
First of all describe a construction of rotation of parallel edges in $G^{2}$. Let subgraph $H$ of graph $G^{2}$ be the union of two subgraphs in parts $G_{1}$ and $G_{2}$ (without vertical edges) such that these subgraphs contain parallel edges $A_{1} B_{1}$ and $A_{2} B_{2}$. Let us replace edges $A_{1} B_{1}, A_{2} B_{2}$ in subgraph $H$ by edges $A_{1} A_{2}$ and $B_{1} B_{2}$. Denote the new subgraph by $H^{\prime}$. We say that subgraph $H^{\prime}$ is obtained from $H$ by the rotation of parallel edges. It is clear that both of $H$ and $H^{\prime}$ are (or are not) 1-2-skeletons.
To prove that graph $G^{2}$ is magic let us apply criterion from problems 3.1-3.2.
(1) Every edge belongs to 1-2-skeleton. It is clear for edges from $G_{1}$ (and from $G_{2}$ ): duplicate the 1-2-skeleton containing this edge in $G_{1}$. For vertical edges choose suitable rotation of edges of appropriate duplicated 1-2-skeleton.
(2) Every two edges are separated by 1-2-skeleton.
- If both of edges $e_{1}$ and $e_{2}$ belong to $G_{1}$ consider a duplicated 1-2-skeleton containing $e_{1}$. If it does not separate $e_{1}$ and $e_{2}$, then both edges belong to the skeleton. By rotating edge $e_{2}$ and its parallel copy we obtain a separating skeleton.
- If $e_{1}$ belongs to $G_{1}$, and $e_{2}$ belongs to $G_{2}$, consider the union of 1-2-skeleton in $G_{1}$ containing $e_{1}$ (it exists due to the statement of problem 2.4), and 1-2-skeleton in $G_{2}$ that does not contain $e_{2}$ (it exists by the condition of the problem).
- If $e_{1}$ belongs to $G_{1}$ and $e_{2}$ is vertical consider a duplicated skeleton containing $e_{1}$.
- Finally, if both of edges $A_{1} A_{2}$ and $B_{1} B_{2}$ are vertical choose in $G_{1}$ an edge $A_{1} X_{1}$ (where $X_{1} \neq B_{1}$ ) or $B_{1} Y_{1}$ (where $Y_{1} \neq A_{1}$ ), this edge exists since $G$ has no isolated edges. Consider a duplicated skeleton containing this edge and rotate this edge together with parallel edge.
b) Analogously to a).
3.6. We take the statement of the problem from [5]. The following solution was found by participants of the conference.
1. Check that if graph $G^{\prime}$ is magic then graph $G$ has 1-2-skeleton and has no isolated vertices and edges. Isolated vertex in $G$ corresponds to a pendant vertex in $G^{\prime}$. Isolated edge in $G$ corresponds to two adjacent vertices of degree 2. Both constructions are impossible in a magic graph.
Assume that $G$ does not contain 1-2-skeleton.
Denote by $S$ the new vertex of graph $G^{\prime}$. Fix an arbitrary 1-2-skeleton in graph $G^{\prime}$, w.l.o.g. we may assume that all its cycles are odd. Consider the component of the skeleton that contains vertex $S$. If this component is an odd cycle, remove vertex $S$ and split other vertices of the cycle on pairs. Together with other components of the skeleton they form a skeleton of graph $G$. Therefore we may assume that this component is an isolated edge $S A_{1}$. Now we will construct two sets of vertices $\mathcal{A}=\left\{A_{1}, \ldots, A_{n}\right\}$ and $\mathcal{B}=\left\{B_{1}, B_{2}, \ldots, B_{n}\right\}$ such that the edges $A_{i} B_{i}(1 \leqslant i \leqslant n)$ belong to skeleton $K$ and all the vertices adjacent to vertices of the set $\mathcal{A}$ belong to $\mathcal{B}$.
Let $\mathcal{A}=\left\{A_{1}\right\}, B_{1}=S$. Assume that the sets $\mathcal{A}=\left\{A_{1}, \ldots, A_{k}\right\}$ and $\mathcal{B}=\left\{B_{1}, \ldots, B_{k}\right\}$ have constructed already and there is an edge that joins some vertex of the set $\mathcal{A}$ with some vertex outside $\mathcal{A} \cup \mathcal{B}$, say $A_{k} B_{k+1}$. Vertex $B_{k+1}$ belongs to some component of the skeleton $K$. If this component is an odd cycle we can easily reconstruct the skeleton $K$ to obtain a 1-2-skeleton of graph $G$.
To do this consider the shortest path in $\mathcal{A} \cup \mathcal{B}$ from $B_{1}$ to $B_{k+1}$ such that the vertices of $\mathcal{A}$ and $\mathcal{B}$ alternate. The path has even length, choose all its even edges (the last of them has endpoint $B_{k+1}$ ) and split onto pairs all other vertices of the odd cycle.
Therefore we may assume that vertex $B_{k+1}$ belongs to the isolated edge $B_{k+1} A_{k+1}$ of skeleton $K$. Then place vertex $B_{k+1}$ to the set $\mathcal{B}$ and vertex $\mathcal{A}_{k+1}$ to the set $\mathcal{A}$.
We will increase sets $\mathcal{A}$ and $\mathcal{B}$ by this algorithm until it is possible. As a result we obtain that the set $\mathcal{A}$ is joined by edges with $\mathcal{A} \cup \mathcal{B}$ only. Assume there exists an edge $A_{i} A_{j}$ consider the shortest path between these two vertices such that the vertices of $\mathcal{A}$ and $\mathcal{B}$ alternate in it (the existence of this path can be easily seen from the process of construction of sets $\mathcal{A}$ and $\mathcal{B}$ ). This path together with edge $A_{i} A_{j}$ form an odd cycle. Then the skeleton $K$ can be reconstructed to the skeleton of graph $G$ as described above.
So we have sets $\mathcal{A}$ and $\mathcal{B}$. Since these sets have equal number of elements, the sums of weights of their vertices are equal. But the sum of weights of $\mathcal{A}$ equals the sum of weights of all edges $A_{i} B_{j}$ while the sum of weights of $\mathcal{B}$ equals the sum of weights of all edges $A_{i} B_{j}$ and edges of the form $B_{1} B_{i}$ (remind that $B_{1}=S$ is adjacent to all other vertices of graph $G$ ). We obtain a contradiction.
2. The proof of the converse statement - if graph $G$ has 1-2-skeleton and does not contain isolated edges, then $G^{\prime}$ satisfies conditions of the problem 3.1 (and therefore it is magic) - is not difficult technical exercise. The skeletons that we need for edge separating can be constructed by a suitable transformation of skeleton in $G$.
3.7. a) Prove that an arbitrary two edges $e$ and $f$ can be separated by some 1-2-skeleton. Remove the endpoints of edge $e$ (and all their edges) from the graph $G$. The remaining part of the graph has $n-2$ vertices of degree at least $\frac{n}{2}-1=\frac{n-2}{2}$. Then it is known that there is a Hamiltonian cycle in this graph (the cycle that passes trough all the vertices of the graph). This cycle together with edge $f$ forms 1-2-skeleton that separates edges $e$ and $f$.
b) Consider the graph $G$ with $n=2 k$ vertices $X_{1}, \ldots, X_{k}, Y_{1}, \ldots, Y_{k}$ such that its set of edges consists of all edges $X_{i} Y_{j}$ and edge $Y_{1} Y_{2}$. The degree of each vertex $X_{i}$ is at least $k=\frac{n}{2}$. Let us prove that $G$ is non semimagic.
Consider an arbitrary 1-2-skeleton of $G$. In this skeleton each vertex $X_{i}$ has one or two adjacent vertices among the vertices $Y_{i}$. Since we have equal number of vertices of both types, the 1-2-skeleton must be perfect matching. Therefore edge $Y_{1} Y_{2}$ does not belong to any 1-2-skeleton. Hence graph $G$ is non-magic.
3.8. A magic graph has no vertex of degree 1 and any two vertices of degree 2 are not adjacent in it. Let $V$ be the set of vertices of degree 2 (possibly, $V=\varnothing$ ), $W$ be the set of vertices of degree at least 3 . Let $s$ be the sum of weights in each vertex. The sum of weights of edges that have an endpoint in $V$ equals $s|V|$. The second endpoints of these edges belong to $W$, therefore this sum does not exceed $s|W|$. So, $|V| \leqslant|W|$. The sum of degrees of all the vertices is at least $2|V|+3|W|$ hence the number of edges is not less than $|V|+\frac{3}{2}|W|$. But $|V|+\frac{3}{2}|W| \geqslant \frac{5}{4}(|V|+|W|)=\frac{5}{4} n$, because $|W| \geqslant|V|$.
The equality would be possible if there are no edges with both endpoints in $W$, i.e. in a bipartite graph. But in this case $s|V|=s|W|$, so $|V|=|W|$. Then the number of edges between $V$ and $W$ equals $2|V|$ (from the point of view of the set $V$ ) and in the same time it is at least $3|W|$. Hence $|V| \geqslant \frac{3}{2}|W|$ that is impossible. The inequality $r>\frac{5}{4} n$ is proven.
3.9. See fig. 9 .

a) 5 vertices, 7 edges

b) 6 vertices, 8 edges

c) 7 vertices, 9 edges

d) 8 vertices, 11 edges
Figure 9: Minimal magic graphs
3.10. Magic graphs with minimal number of edges are depicted on fig. $10 \mathrm{a}, \mathrm{b}, \mathrm{c}, \mathrm{e}, \mathrm{f}$ ). For $n=4 k$ we have bipartite and non bipartite examples, for $n=4 k+2$ we have bipartite example only, in other cases the graphs are non bipartite.

a) $n=4 k, r=5 k+1$, bipartite graph

c) $n=4 k+2, r=5 k+3$, bipartite graph

e) $n=4 k+1, r=5 k+2$, non bipartite graph

b) $n=4 k, r=5 k+1$, non bipartite graph

d) $n=4 k+2, r=5 k+4$, non bipartite graph

f) $n=4 k+3, r=5 k+4$, non bipartite graph
Figure 10: Magic graphs with minimal number of vertices
The proof that the depicted graphs are magic consists of the routine verification that criterion from problems 3.2 holds. Instead of this this verification we show magic sets of weights for "typical case". Of course, this is not the proof but it follows that in concrete cases we really have magic graphs whose edges are separated in the spirit of the criterion. In general case the graphs will be magic too because the separation of its edges takes place "by the same reasons" as in this concrete examples. We restrict ourselves with case $n=4 k+3, r=5 k+4, k=2$; see fig. 11 .
3.11. This solution is a variation of [3]. Observe that if we add an arbitrary edge to non bipartite, connected (and non complete) magic graph then it remains be magic.
Indeed, the new edge $e$ belongs to some cycle. If this cycle is even, assign the weight $\varepsilon$ to this edge and the weight $\pm \varepsilon$ alternatively to all other edges of the cycle. Choose the value of $\varepsilon$ so that all the weights remain positive and distinct. We obtain a magic set of weights.
If the cycle is odd choose another cycle that does not contain $e$ (it exists because the graph is non bipartite). Then $e$ belongs to some dum-bell (see lemma from solution 4.1) Once again, we can assign the weight $\varepsilon$ to edge $e$ and weights $\pm \varepsilon$, $\pm 2 \varepsilon$ to other edges of dum-bell and obtain a magic set of weights.
Thus, to complete the solution it is sufficient for each $n \geqslant 5$ to construct "minimal" non-bipartite graph. It was done in the solution of the previous problem for $n \neq 4 k+2$ (see fig. $10 \mathrm{~b}, \mathrm{e}, \mathrm{f}$ ). We found these examples in [3]. Unfortunately, the construction of minimal non-bipartite graph for $n=4 k+2$ in this article is wrong. In addition, the graph on fig. $10 \mathrm{~b}$ ) is not magic for $n=8$ (it is impossible to separate by 1-2-skeletons the slanted and the lowest edges). Magic non bipartite graph for $n=8$ is depicted on fig. $9 \mathrm{~d}$ ), it was invented by A. Tsybyshev. We do not know wether non bipartite magic graph with $4 k+2$ vertices and $5 k+3$ edges $(k>3)$ exists, so for the case of $5 k+3$ edges we leave bipartite example, and begin our construction from non bipartite graph with $5 k+4$ edges. This non bipartite graph with $4 k+2$ vertices and $5 k+4$ edges is depicted on fig. $10 \mathrm{~d}$ ). Magic weights on this graph for $k=3$ see on fig. 12 .

Figure 11: $n=4 k+3, r=5 k+4, k=2$

Figure 12: $n=4 k+2, r=5 k+4, k=3$
## 4 Regular graphs
### 4.1. Solution 1 .
Le $\mathrm{mma}$. If a connected graph contains two odd cycles, and an edge $e$ belongs to only one of them, than there exists an even cycle or a dum-bell that containпs edge $e$.
Proof. The statement is trivial if cycles do not intersect or intersect by one vertex.
Assume that intersection of the cycles contains at least two vertices. Let $X$ and $Y$ be the endpoints of edge $e$. Remove edge $e$ from the first cycle, the remaining part of this cycle we will call the path $X Y$. Let $A$ and $B$ be the first and the last vertex in the path $X Y$ that belong to the second cycle. Then the parts $X A$ and $B Y$ of the path $X Y$ do not intersect the second cycle. Vertices $A$ and $B$ split the second cycle onto two paths whose number of vertices have different parity. Adding one of them to paths $X A$ and $B Y$ we can obtain an odd path $X A B Y$. Together with edge $X Y$ it forms an even cycle.
Let us return to the statement of the problem. W.l.o.g. we may assume that the graph is connected. Remove an arbitrary edge $e=A B$ from the graph. Assume that graph $G \backslash e$ falls to two components of connectivity. Since the degrees of all vertices were greater than 1 these components contain more than one vertex. Either of components can not be a bipartite graph. This is because in the bipartite graph the sums of degrees of all vertices in parts are equal, but in our components one of sums is divisible by $d$ and another (which contains vertex $A$ or $B$ ) is not divisible by $d$. Therefore each component contains an odd cycle. Hence edge $e$ belongs to some dum-bell.
Now assume that the graph $G \backslash e$ is connected. Consider an arbitrary path from $A$ to $B$. If this path has odd number of edges then $e$ is contained in an even cycle. Assume that this path is even (then $e$ is contained in odd cycle). If graph $G \backslash e$ is bipartite then both vertices $A$ and $B$ are in the same part. But this is impossible because the sums of degrees in the parts are not equal: first sum is equivalent $-2(\bmod d)$ and the second sum is divisible by $d$. Hence graph $G \backslash e$ is non bipartite and there exists an odd cycle that does not contain $e$. It remains to use lemma.
Solution 2 (by A. Tsybyshev). Assign weights $1 / d$ to all edges of our regular graph. Then sum of weights in each vertex is equal to 1 . Now start the process of destroying even cycles and dum-bells by changing weights and removing zero-weight edges that is described in the solution 2.3. As a result of this process we obtain a 1-2-skeleton with magic set of weights. Since we do not change the sum of weights in each vertex the sum of weights in each vertex is still equal to 1. Therefore the weights of edges are 1 and $1 / 2$. Since $d \neq 1,1 / 2,0$ we change the weight of every edge at least once. Hence each edge belongs to some pseudocycle.
4.2. The placement of numbers $\pm 1$ on even cycles and $\pm 1, \pm 2$ on dum-bells that was described in section 4 (problems) we will call standard weights on pseudocycle.
Le $\mathrm{mma}$. Let every edge of the graph has non zero (not necessarily positive) weight and sum of weights in each vertex is equal to 0 . Then every edge is contained in even cycle or dum-bell.
The proof is analogous to the solution of the problem 4.1.
1. Assume that the regular graph $G$ is magic and sum of weights in each vertex is equal to $s$. Subtract the number $s / d$ from every weight. We obtain a placement of pairwise distinct numbers on edges of the graph with zero sum in each vertex.
Choose in the graph $G$ an arbitrary edge of non zero weight and a pseudocycle that contains this edge (it exists due to lemma). Subtract from the weights of this pseudocycle the standard weights of the pseudocysle multiplyed by the appropriate coefficient in order to make the weight of chosen edge to be zero. Then remove all zero-weight edges. We obtain a placement with zero sum in each vertex. Then repeat this operation and so on.
In each step we decrease the number of edges therefore sooner or later all edges become zero-weight It means that the initial placement of numbers is a "sum" with appropriate coefficient of standard placements for pseudocycles. Since any two edges have distinct weights in the initial placement, there exists a pseudocycle such that its standard weights for this edges are distinct. By definition this pseudocycle weakly separates these edges.
2. Assume that every two edges are weakly separated by pseudocycles. Let us enumerate all pseudocycles. For $k$-th pseudocycle assign weights of its edges to be the standard placement multiplyed by $5^{k}$. For each edge sum up its weights over all pseudocycles and after that add a large positive constant in order to make all weights positive. The obtained set of weights is magic.
4.3. It follows from the previuous problem.
4.4. 1. Let us check first that $\ell(G) \neq 1$. If $\ell(G)=1$ then we can remove an edge $e$ and obtain the graph with two components of connectivity. Each component itself is a magic graph, one of its vertices has degree $d-1$ and all others have degree $d$. This is impossible (see solution 4.1).
2. Prove that if $\ell(G) \geqslant 3$, then graph $G$ is magic. Choose any two edges $e$ and $f$ and check that they are weakly separated by pseudocycles. After removing these edges the graph remains connected. Therefore there exists a cycle that contains $e$ and does not contains $f$. Since the graph is bipartite this cycle is even and it separates edges $e$ and $f$.
3. Prove that for $\ell(G)=2$ graph $G$ is non magic. If after removing edges $e$ and $f$ from graph $G$ we obtain a disconnected graph then it has two components, say $V$ and $W$, each of them is a bipartite graph. If the edges $e$ and $f$ have common endpoint then one of components has unique vertex of degree $d-2$ and other vertices of degree $d$. Such graph can not be bipartite. Therefore $e=A B$ and $f=C D$ have no common vertices, one component contains vertices $A$ and $C$, another component contains vertices $B$ and $D$ of degree $d-1$. Hence $B$ and $D$ are in different parts of the component and all the paths that join these points have odd number of edges.
Now prove that edges $e$ and $f$ are not weakly separated by a pseudocycle. Since $G$ is bipartite there are no even cycles (and dum-bells) in it. And all even cycles that contain both $e$ and $f$ do not separate these edges due to previous paragraph.
## References
[1] Ловас Л., Пламмер М. Прикладные задачи теории графов. М.: Мир, 1998.
[2] Doob M. Characterizations of regular magic graphs // J. Combin. Theory, ser. B. Vol. 25. 1978. P. 94-104.
[3] Trenkler M. Number of vertices and edges of magic graphs // Ars Combinatoria. 2000. Vol. 55. P. 93-96.
[4] Trenkler M. Some results on magic graphs // Proceedings of the third Czechoslovak symposium on graph theory. Teubner-texte zur Mathematik. Bd. 59. Leipzig: Taubner Verlagsgellschaft, 1983. P. 328-332. arXiv:0906.1317v1.
[5] Semaničová A. Magic graphs having saturated vertex // Tatra Mt. Math. Publ. 2007. Vol. 36. P. 121-128.
# Как считать слова?
Дмитрий Пионтковский, Максим Прасолов, Григорий Рыбников
## 1 Главная задача
Задача 1. В словаре племени Винни-Пухов 100 слов. В фразах их языка возможны любые сочетания этих слов. Существуют два магических заклинания, "Земля стоит на великом крокодиле" и "Кажддй вечер крокодил глотает солнце", которые вызывают ураган, и поэтому вслух можно произносить только такие фразы, в которых эти последовательности слов не встречаются ${ }^{1}$. Сколько всего фраз из двадиати слов можно произносить вслух?
Задача 2. У компьютера есть 256 различных команд. Существует одна последовательность из четырёх команд, после которой компьютер ломается. Программисты написали все возможные программы из семи команд. Сколько процентов из них не сломают компъютер? ${ }^{2}$
Задача 3 (Главная Задача). Алфавит некоторого языка $L$ состоит из $N$ букв. Задано несколько слов $v_{1}, \ldots, v_{k}$, которые называются запретными $и$ в языке не употребляются. Слово (то есть ограниченная последовательность букв) называется допустимым, если никакая часть этого слова не является запретным словом. Сколько в языке $L$ возможсно допустимых слов из $n$ букв?
Задача 4. Докажите, что задачи 1 и 2 сводятся $к$ задаче 3.
## 2 Как записывать ответ?
Зафиксируем какой-нибудь алфавит $A$ из $N$ букв (например, если $A=(a, b, c, \ldots, z)$, то $N=26)$. Словом мы будем называть любую конечную последовательность букв алфавита $А$. Подсловом мы будем называть часть слова, состоящую из идущих подряд в этом слове букв.
Мы будем считать, что в каждом языке $L$ есть ровно одно слово из нуля букв - nустое слово.
Мы будем считать, что запретные слова не содержатся друг в друге, т.е. никакое подслово запретного слова, кроме него самого, не является снова запретным. Кроме того, мы будем считать, что запретные слова состоят как минимум из двух букв, т.е. что пустое слово и отдельные буквы являются допустимыми словами. Напомним, что множество запретных слов конечно.
Задача 5. Свободным языком алфавита А назъвается язык $F_{A}$, в котором вообще нет запретных слов. Докажите, что количество слов из $n$ букв в этом язике равно $N^{n}$.
Задача 6. В язике $B$ запретными являются все слова из двух различных букв. Докажите, что для любого натурального п количество допустимых слов из $n$ букв в этом языке равно $N$.
Пусть $M$ - какое-нибудь множество слов. Обозначим через $m_{n}$ количество слов в этом множестве, состоящих из $n$ букв. Рядом размеров множества $M$ называется бесконечная сумма
$$
M(x)=m_{0}+m_{1} x+m_{2} x^{2}+m_{3} x^{3}+\ldots
$$
Такого вида бесконечные суммы (с произвольными числами в качестве коэффициентов $m_{n}$ ) мы будем кратко называть просто рядами (их полное название, которое мы не будем использовать - формальные степенные рядыи).
Для каждого языка $L$ его рядом размеров $L(x)$ называется ряд размеров множества допустимых слов. Например, для свободного языка $F_{A}$ ряд размеров - это сумма геометрической прогрессии $F_{A}(x)=1+N x+$ $N^{2} x^{2}+N^{3} x^{3}+\ldots$, а для языка $B$ это $B(x)=1+N x+N x^{2}+N x^{3}+\ldots$
Задача 7. Выпишите ряд размеров для языка над алфавитом $\{a, b\}$, в котором запретными являнтся слова аа $u$ bb.[^0]
## 3 Арифметика языков
Если множество $M$ содержит только ограниченное количество слов, то его ряд размеров - это многочлен от переменной $x$. Для бесконечных множеств и ряды тоже бесконечные, но с ними можно производить разные арифметические операции, похожие на операции с многочленами, то есть складывать, вычитать, умножать друг на друга и на числа и даже иногда делить.
В определениях и задачах этого раздела $S=s_{0}+s_{1} x+s_{2} x^{2}+\ldots$ и $R=r_{0}+r_{1} x+r_{2} x^{2}+\ldots-$ два ряда, а $L_{1}$ и $L_{2}$ - какие-то два языка с разными алфавитами $A_{1}$ и $A_{2}$. Для определённости, мы будем считать, что алфавит $A_{1}$ состоит из заглавных букв, а алфавит $A_{2}$ - из строчных. Алфавит $A$ - это объединение двух алфавитов $A_{1}$ и $A_{2}$, то есть в него входят и заглавные, и строчные буквы.
Определение 1. а) Суммой рядов $R$ и $S$ называется сумма
$$
R+S=\left(s_{0}+r_{0}\right)+\left(s_{1}+r_{1}\right) x+\left(s_{2}+r_{2}\right) x^{2}+\ldots
$$
б) Суммой языков $L_{1}$ и $L_{2}$ называется язык $L_{1}+L_{2}$ над алфавитом $A$, у которого множество допустимых слов - объединение множеств допустимых слов языков $L_{1}$ и $L_{2}$.
Задача 8. Задайте язык $L_{1}+L_{2}$ конечным множеством запретных слов.
Задача 9. Докажите, что если $L=L_{1}+L_{2}$, то
$$
L(x)=L_{1}(x)+L_{2}(x)-1
$$
Произведение рядов размеров определяется так же, как произведение многочленов.
Определение 2. Произведением ряда $R$ на одночлен ах ${ }^{n}$ называется ряд
$$
R \cdot a x^{n}=a r_{0} x^{n}+a r_{1} x^{n+1}+a r_{2} x^{2} x^{n+2}+\ldots
$$
Произведением рядов $R$ и $S$ называется сумма
$$
R \cdot S=R \cdot s_{0}+R \cdot s_{1} x+R \cdot s_{2} x^{2}+\ldots
$$
Заметим, что эта бесконечная сумма рядов имеет смысл - складывая ряды почленно, мы получаем в качестве коэффициента при каждой степени $x$ конечную сумму чисел.
Задача 10. Докажите равенство
$$
(1-x) \cdot\left(1+x+x^{2}+\ldots\right)=1
$$
Определение 3. Произведением двух множеств слов $M, N$ называется множество $M N$ всех слов вида $m n$, где $m$ - слово из $M$, а $n$ - слово из $N$.
Произведением двух языков $L_{1}$ и $L_{2}$ называется язык $L_{1} \cdot L_{2}$ над алфавитом $A$, у которого множество допустимых слов является произведением множеств допустимых слов языков $L_{1}$ и $L_{2}$.
Задача 11. Задайте язык $L_{1} \cdot L_{2}$ конечным множеством запретных слов.
Задача 12. Докажите равенство
$$
L(x)=L_{1}(x) \cdot L_{2}(x)
$$
Деление рядов не имеет аналога для языков, но позволяет сокращённо записывать их ряды размеров. Оно определяется по формуле, похожей на формулу суммы геометрической прогрессии.
Определение 4. Предположим, что ряд $S$ начинается с единицы, то есть $s_{0}=1$, и $S=1+\bar{S}$, где $\bar{S}=$ $s_{1} x+s_{2} x^{2}+\ldots$ Тогда обратным рядом называется ряд
$$
\frac{1}{S}=1-\bar{S}+\bar{S}^{2}-\bar{S}^{3}+\ldots
$$
Частным от деления рядов $R$ и $S$ называется ряд
$$
\frac{R}{S}=R-R \cdot \bar{S}+R \cdot \bar{S}^{2}-R \cdot \bar{S}^{3}+\ldots
$$
Частное двух рядов размеров языков может не соответствовать никакому языку, хотя бы потому, что в получившемся ряде могут появиться отрицательные коэффициенты.
Задача 13. а) Докажите, что
$$
S \cdot \frac{R}{S}=R
$$
b) Докажите, что если $S \cdot T=R$, где ряд $S$ начинается с единииы, то $T=\frac{R}{S}$.
Польза от операции деления рядов состоит в том, что многие бесконечные ряды можно записать с её помощью в виде конечного выражения - частного двух многочленов.
Задача 14. а) Докажите, что
$$
F_{A}(x)=\frac{1}{1-N x}
$$
б) Запишите ряды размеров языков из задач 6 и 7 в виде частного двух многочленов.
Задача 15. Докажнте, что ряд размеров любого языка может быть записан в виде частного двух многочленов
Таким образом, ответ к Главной Задаче должен быть представим в виде частного двух многочленов.
## 4 Свободное слово
Задача 16. Пусть $L$ - язык над латинским алфавитом, в котором запретным является только слово "mouse". Haũdume $L(x)$.
Определение 5. Пусть $a, b$ - два слова, из которых ни одно не является частью другого. Непустое слово $c$ называется зацеплением слов $a$ и $b$, если оно является окончанием слова $a$ и в то же время началом слова $b$ (например, слово "ко" - зацепление слов "молоко" и "корова").
Слово называется свободным, если у него нет никаких зацеплений с самим собой, кроме самого этого слова.
Задача 17. Пусть в языке $L$ над алфавитом $A$ из $N$ букв имеется только одно запретное слово - некоторое свободное слово из m букв. Докажите, что
$$
L(x)=\frac{1}{1-N x+x^{m}}
$$
Задача 18. Решите задачу 2 в предположении, что последователъность, ломающая компъютер, является свободным словом.
## 5 Преобразования слов
Определение 6. Пусть $M$ и $M^{\prime}$ - два множества слов. Разобьём множество $M$ на какие-нибудь две части $K$ и $L$. Функция $f$ из множества $L$ в какое-нибудь подмножество $I$ множества $M^{\prime}$ называется преобразованием множества $M$ в множество $M^{\prime}$, если $f$ сохраняет длину слова и является взаимно однозначным отображением из $L$ в $I$.
В этом случае множество $K$ называется ядром отображения $f$, а множество $I$ - его образом.
Преобразование мы будем обозначать стрелкой: $M \Longrightarrow M^{\prime}$.
Определение 7. Цепочка преобразований
$$
M_{1} \Longrightarrow M_{2} \Longrightarrow \ldots \Longrightarrow M_{n}
$$
называется точной, если ядро каждого следующего преобразования совпадает с образом предыдущего.
Задача 19. Пусть $L$ - язык над алфавитом А с множеством допустимых слов $G$ и множеством всех не допустимых слов N. Постройте точную последовательность преобразований
$$
\emptyset \Longrightarrow N \Longrightarrow F_{A} \Longrightarrow G \Longrightarrow \emptyset
$$
где $F_{A}$ - множество слов свободного языка, то есть всех слов над алфавитом $A$, а $\emptyset$ обозначает пустое множество.
Задача 20. В ряд сидят по очереди мальчики и девочки, по 10 тех и других; последней сидит учителъница. У детей есть конфеть, поровну в сумме у малъчиков и у девочек. Первый малъчик отдаёт все свои конфеты сидящей за ним девочке. Девочка съедает их, сведает из своих конфет столько же, а остаток отдаёт следующему мальчику. Тот тоже поступает точно так же, за ним - следующая девочка, и так далее. Последняя девочка отдаёт остаток своих конфет учительнице. Сколъко ей достанется?
Задача 21. Пусть
$$
\emptyset \Longrightarrow M_{1} \Longrightarrow M_{2} \Longrightarrow \ldots \Longrightarrow M_{n} \Longrightarrow \emptyset
$$
- точная цепочка преобразований.
a) Докажите, что если в каждом множестве $M_{i}$ только конечное число $m_{i}$ слов, то
$$
m_{1}+m_{3}+m_{5}+\cdots=m_{2}+m_{4}+\ldots
$$
б) Докажите формулу для рядов размеров
$$
M_{1}(x)+M_{3}(x)+M_{5}(x)+\cdots=M_{2}(x)+M_{4}(x)+\ldots
$$
Определение 8. Множество слов $M$ называется свободным, если никакое слово из $M$ не является подсловом другого слова из этого множества, все слова в нём свободные и не имеют зацеплений между собой.
Задача 22. Пусть $L$ - язык над алфавитом $A$, у которого множество запретных слов $B$ свободное. Обозначим через $G$ множество его допустимых слов, через $\bar{G}$ - множество всех допустимых слов, кроме пустого. Постройте точную последователъность преобразований
$$
\emptyset \Longrightarrow B \cdot G \Longrightarrow A \cdot G \Longrightarrow \bar{G} \Longrightarrow \emptyset
$$
Задача 23. Пусть $L$ - язык над алфавитом $A$ из $N$ букв, у которого множество запретных слов $B$ свободное. Докажите формулу
$$
L(x)=\frac{1}{1-N x+B(x)}
$$
Задача 24. Докажите, что множество заклинаний в задаче 1 свободное, и решите её.
Задача 25. Найдите $L(x)$, если алфавит лзыка $L$ - латинский, а запретные слова - это слова veni, vidi, vici.
Определение 9. Пусть $L$ - язык. Простой сцепкой называется слово $v=s t r$, где $s, t, r$ - непустые слова, причём $g=s t$ и $f=t r$ - запретные слова, и больше никаких запретных подслов в $v$ нет. Конец $r$ простой сцепки, остающийся после первого запретного слова $g$, называется её хвостом.
Задача 26. Докажите, что множество запретных слов языка является свободным в том и только том случае, если в этом языке нет простых сцепок.
Задача 27. Пусть $L$ - язык над некоторым алфавитом $A$ с множеством запретных слов $B$ и множеством простых сиепок $S$. Обозначим через $G$ множество его допустимых слов, через $\bar{G}-$ множество всех допустимых слов, кроме пустого. Постройте точную последовательность преобразований
$$
S \cdot G \Longrightarrow B \cdot G \Longrightarrow A \cdot G \Longrightarrow \bar{G} \Longrightarrow \emptyset
$$
Задача 28. Каким условиям должно удовлетворять множество запретных слов языка $L$, чтобы точную последовательность из задачи 27 можно было продолэжить до последовательности
$$
\emptyset \Longrightarrow S \cdot G \Longrightarrow B \cdot G \Longrightarrow A \cdot G \Longrightarrow \bar{G} \Longrightarrow \emptyset
$$
(такие языки назовём незапутанными)? Выведите формулу, которая выражала бы рлд размеров $L(z)$ незапутанного языка через число $N$ букв в алфавите и ряды размеров множеств $B$ и $S$.
Задача 29. Вычислите ряд размеров для языка над алфавитом из трёх букв $a, b, c$ с запретными словами $a b b, b b c, b a c$.
Задача 30. Вычислите ряд размеров для языка над алфавитом $A=\left\{x_{1}, \ldots, x_{n}, y_{1}, \ldots, y_{n}, z_{1}, \ldots, z_{n}\right\}$, в котором запретными являются все слова вида $x_{i} y_{j}$ и $y_{j} z_{k}$, где $1 \leq i, j, k \leq n$.
Задача 31. Докажите, если множество запретных слов незапутанного языка состоит только из одного слова, то это множество свободно.
## 6 Ещё о свободных множествах
Задача 32. Постройте бесконечное свободное множество в алфавите из двух букв.
Задача 33. Предположим, что множество запретных слов $B$ языка $L$ свободно, а алфавит содержит более одной буквы. Докажите, что множество допустимых слов этого языка бесконечно.
Определение 10. Пусть $S=s_{0}+s_{1} x+s_{2} x^{2}+\ldots$ и $R=r_{0}+r_{1} x+r_{2} x^{2}+\ldots-$ два ряда. Если для любых коэффициентов $s_{k}$ и $r_{k}$ с одинаковыми номерами выполняется неравенство $s_{k} \geq r_{k}$, то будем говорить, что между рядами выполняется неравенство
$$
S \geq R
$$
Задача 34. Докажите, что если для рядов $P, Q$ и $R$ выполняются неравенства
$$
P \geq Q u R \geq 0
$$
mo
$$
P R \geq Q R
$$
Задача 35. Предположим, что множества запретных слов $B$ и $B^{\prime}$ двух языков $L$ и $L^{\prime}$ над одним алфавитом А содержат одно и то же количество слов каждой длинъ, так что $B(z)=B^{\prime}(z)$. Докажите, что если множество B свободно, то выполняется неравенство
$$
L^{\prime}(z) \geq L(z)
$$
причём равенство $L^{\prime}(z)=L(z)$ достигается в том и толъко том случае, когда множество $B^{\prime}$ такэже является свободным.
Задача 36. Известно, что алфавит состоит из двух букв, а множество $B$ содержит не менее двух слов, одно из которых, слово $w$, имеет длину 2.
a) Докажите, что множество $B$ не является свободным.
b) Может ли оно быть свободным, если длина слова $ш$ равна 3?
Задача 37. Известно, что алфавит состоит из п букв, а множество B состоит из $g$ слов длины 2. Докажите, что если $g \leq n^{2} / 4$, то множество $B$ может быть выбрано свободным.
Задача 38. Докажите, что если $n=k d u m \leq k^{d}(d-1)^{d-1}$, где числа $d, k, m, n$ натуралъные, то над алфавитом из $n$ букв можно выбрать свободное множество, состоящее из $m$ слов длины $d$.
Задача 39. а) Докажите, что если $B$ - свободное множество над алфавитом из $n$ букв, то виполняется неравенство
$$
\frac{1}{1-n x+B(x)} \geq 1
$$
б) Верно ли обратное утвержддние: если для некоторого натурального $n$ и некоторого многочлена $p(x)$ с неотрицательными целыми коэффиииентами и нулевым свободным членом выполняется неравенство
$$
\frac{1}{1-n x+p(x)} \geq 1
$$
то над алфавитом из п букв существует свободное множнество $B$ такое, что $B(x)=p(x)$ ?
Задача 40. Пусть $n$ - натуральное число, $p(x)$ - многочлен с неотрицательными целями коэффициентами и нулевым свободным членом. Докажите, что свободное множество $B$ с рядом размеров $B(x)=p(x)$ существует в том и только том случае, когда существуют такие многочлены $f$ и $g$ с неотрицательными целыми коэффиииентами такие без свободных членов, что
$$
(1-f)(1-g) \geq 1-n x+p(x)
$$
Задача 41. ${ }^{3}$ Придумайте условие, описывающее возможные ряды размеров множеств запрещённых слов незапутанных языков (подобно тому, как в задаче 40 охарактеризованы ряды размеров свободных множеств).
## 7 Слова и цепи
Определение 11. Пусть $L$ - язык. Цепями длины 1 называются все запретные слова, цепями длины 2 все простые сцепки. Через эти цепи определяются ещё цепи длины 3,4 и так далее. А именно, слово $v=s t r$ (где все слова $s, t, r$ - непустые) называется цепъю длины $n$, если его начало $g=s t$ является цепью длины $n-1$, конец $f=t r$ - запретным словом, причём $t$ является подсловом хвоста $p$ цепи $g$, и никаких запретных подслов, кроме $f$, в конечном участке $p r$ нет. Хвостом этой цепи называется слово $r$.[^1]
Цепь выглядит примерно так (каждая дуга - это запретное слово в ней):

Длина цепи - это количество дуг. Зацепляются только соседние дуги (т. е. их пересечение - зацепление ненулевой длины), и выделенные два последних хвоста не содержат запретных слов, кроме последней дуги.
Например, если запретное слово - $a b a$, то единственная цепь длины 1 - это $a b a$, длины 2 - $a b a b a$, длины 3 - abababa, и так далее.
Задача 42. Пусть в языке $L$ запретными считаются слова "tournament", "of", "towns". Bunuиuте все цепи длины $n$.
Задача 43. Антицепь длины $n$ определяется так же, как и цепь длины $n$, но все слова языка $L$ в определении 11 прочитывается "справа налево", т. е. хвосты антицепей находятся слева, а начальная цепь длинъ $n-1$ - справа. Докажите, что множества цепей длины $n$ и антицепей длины $n$ совпадают.
Задача 44. Докажите, что никакая чепь длины п не содержит в качестве подслова никакую другую цепь длины $n$.
Задача 45. Докажите, что если слово имеет вид $w=g c$, где $g-$ допустимое слово, а с - иепь, то в случае, если длина цепи с больше 1, слово $w$ представимо в таком виде ровно двумя способами, причём длины цепей в этих представлениях различаются на единииу.
Следующая задача даёт способ решения Главной Задачи.
Задача 46. Пусть $L$ - язык над алфавитом А. Обозначим через $G$ множество его допустимых слов, через $\bar{G}$ - множество всех допустимых слов, кроме пустого. Пусть $C_{1}-$ множество цепей длины $1, C_{2}$ - цепей длинъ 2, и так далее.
Докажите формулу
$$
L(x)=\frac{1}{1-N x+C_{1}(x)-C_{2}(x)+C_{3}(x)-\ldots}
$$
Задача 47. Найдите ряд размеров для языка из задачи 42.
Задача 48. Найдите все возможные варианты ответов для задачи 2 в зависимости от того, какие именно команди ломают компъютер.
Задача 49. Назовём подслово с слова $w$ максимальной подцепью, если $w$ представимо в виде $w=g с и$, где $g$ - допустимое слово, а с - цепъ, причём для любого другого представления $w=g c^{\prime} u^{\prime}$ с другой цепъъ с с всегда слово с $c^{\prime}$ - подслово слова с. Докажите, что любое недопустимое слово имеет ровно одну максимальнуюо подиепь нечётной длины.
Задача 50. Пусть $L$ - язык над алфавитом $A$, и $A^{\prime}$ - новый алфавит, полученный из $A$ добавлением одной буквы. Пусть $L^{\prime}$ - язык над алфавитом $A^{\prime}$, в котором запретными являются все запретные слова языка L. Докажите формулу
$$
L^{\prime}(x)=\frac{1}{\frac{1}{L(x)}-x}
$$
Задача 51. Язык $W$ называется свободным произведением языков $L$ и $L^{\prime}$ над непересекающимися алфавитами $A$ и $A^{\prime}$, если алфавит языка $W$ есть объединение алфавитов $A$ и $A^{\prime}$, а множество запретных слов - обдединение множеств запретных слов языков $L$ и $L^{\prime}$. Выразите ряд размеров свободного произведения $W$ через ряды размеров языков $L$ и $L^{\prime}$.
Задача 52. Предположим, что множество запретных слов языка $L$ содержит толъко слова из двух букв. Рассмотрим другой язык $М$ над тем же алфавитом, в котором запретными являются те и только те двухбуквенные слова, которые не являются запретными в языке L. Докажите равенство
$$
L(x) M(-x)=1
$$
## 8 Дополнительные задачи
Задача 53. Докажите, что свободное множество из $m$ слов длины $d$ в алфавите из $n=k d$ букв существует в том и только том случае, когда $m \leq k^{d}(d-1)^{d-1}$ (ср. задачу 38), если
a) $d=2$;
б) $d=3$;
в) $d>3$.
Определение 12. Язык называется $d$-определённым, если наибольшая из длин его запретных слов равна $d$. 2-определённый язык называется квадратичным.
Задача 54. Квадратичные языки $L$ и M из задачи 52 называются двойственными друг $к$ другу (обозначение: $M=L^{!}$).
a) Докажите, что ( $\left.L^{!}\right)!=L$.
б) Haüdume $\left(L_{1}+L_{2}\right)$ !
в) Onишume $\left(L_{1} \cdot L_{2}\right)$ !
Задача 55. Пусть $L-d$-определённый язык. Определим новый язык $L^{(n)}$, в котором алфавитом являются все допустимые слова языка $L$ длины $n$, а допустимые слова - все допустимые слова языка $L$, длина которых делится на п (выраженные через новые буквы).
a) Докажите, что язык $L^{(n)}$ задаётся конечным набором запретных слов.
б) Всегда ли язык $L^{(n)}$ является d-определённым?
в) При каком наименъшем $n$ язык $L^{(n)}$ гарантированно является квадратичным или свободным (вне зависимости от выбора $d$-определённого языкам $L)$ ?
Задача 56. Для любого квадратичного языка $L$ над алфавитом $x_{1}, \ldots, x_{n}$ определим ориентированный граф $\Gamma_{L}$ следующим образом: его вершины - $n$ точек, помеченные буквами $x_{1}, \ldots, x_{n}$, а ребро (стрелка) $x_{i} \rightarrow x_{j}$ проводится в том и только том случае, когда $x_{i} x_{j}$ - разрешённое слово. Обозначим через $a_{k}$ количество допустимых слов из $k$ букв. Докажнте, что
a) лзык $L$ конечный в том и только том случае, когда в графе $\Gamma_{L}$ нет циклов;
b) язык $L$ имеет полиномиалъный рост (т. e. существуют два ненулевых многочлена $p, q$ одной и той же степени d с положительным стариим коэффиииентом такие, что $p(k) \geq a_{k} \geq q(k)$ для всех $k \geq 0$ ) в том и только том случае, когда в графе $\Gamma_{L}$ есть иикл, но нет пересекающихся ииклов;
c) язык $L$ имеет экспоненииальный рост (т. е. для некоторых $c_{1}>c_{2}>1$ и для всех $k$ выполняются неравенства $c_{1}^{k} \geq a_{k} \geq c_{2}^{k}$ ) тогда и только тогда, когда в графе $\Gamma_{L}$ есть хотя бы два пересекающихся цикла.
Задача 57. Пусть $L$ и $L^{!}$- пара двойственных квадратичных языков. Возможно ли, что оба они имежт экспоненииалъный рост?
Задача 58. Для люббого d-определённого языка $L$ над алфавитом $x_{1}, \ldots, x_{n}$ определим ориентированный граф $\Gamma_{L}$ следующим образом: его вериинъ помечены всеми допустимыми словами длины $d-1$, а ребро (стрелка) $v \rightarrow w$ проводится в том и только том случае, когда при умножении слова $v$ на некоторуюо букву $x_{i}$ получается допустимое слово, последние $d-1$ букв которого составляют слово $w$. Докажите все три свойства а), b), с) из задачи 56 для построенного графа $\Gamma_{L}$.
Определение 13. Пусть $M$ - некоторое множество слов над алфавитом $A$. Слова $u$ и $v$ (над тем же алфавитом) называются $M$-эквивалентными, если для любого слова $w$ слова $u w$ и $v w$ либо оба принадлежат $M$, либо оба не принадлежат $M$. Множество $M$ называется регулярным, если найдётся такое натуральное число $n$, что в любом множестве из $n$ слов найдутся два $M$-эквивалентных друг другу слова.
Задача 59. Докажите, что множество допустимых слов любого языка регулярно.
Определение 14. Конечным автоматом над алфавитом $A$ называется ориентированный граф Г с конечным множеством вершин $V$, причём
a) стрелки помечены буквами алфавита $A$, причём для любой буквы $a \in A$ из каждой вершины выходит ровно одна стрелка, помеченная $a$;
b) выделены начальная вершина $v_{0} \in V$ и множество принимающих вериин $W \subseteq V$.
Будем воспринимать каждое слово над алфавитом $A$ как инструкцию для путешествия по стрелкам конечного автомата ( $\Gamma, v_{0}, W$ ): начинаем с начальной вершины, идём из неё по стрелке, помеченной первой буквой слова, дальше идём по стрелке, помеченной второй буквой, и т.д. Мы говорим, что автомат принимает слово, если соответствующий слову путь заканчивается в принимающей вершине.
Задача 60. а) Докажнте, что для любого регулярного множества $M$ существует конечный автомат, принимающий слова из $М$ и никаких больше.
b) Докажите, что для любого конечного автомата множество принимаемъх им слов регулярно.
Задача 61. Докажите, что для любого регулярного множества $М$ его ряд размеров может быть записан в виде частного двух многочленов.
Задача 62. Пусть $M_{w}$ - множсство всех допустимъх слов языка $L$, оканчивающихся на фиксированное подслово w. Докажите, что ряд размеров множества $M_{w}$ представим в виде частного двух многочленов.
(До промежуточного финиша были предложены части $1-5$, после промежуточного финиша добавлены части $6-8$.)
# Как считать слова?
Дмитрий Пионтковский, Максим Прасолов, Григорий Рыбников
## Решения
## 1 Главная задача
1. См. задачу 24 .
2. См. задачи 18 и 48 .
3. Один из вариантов решения дан в задаче 46, а другой может быть получен с помощью задач 59 и 61 .
4. В задаче 1 алфавит $A$ состоит из $N=100$ слов языка племени, роль слов языка $L$ играют фразы языка племени Винни-Пухов, а запретные слова языка $L$ - это два магических заклинания. В задаче 2 алфавит $A$ состоит из $N=256$ команд компьютера, а роль слов языка $L$ играют программы. Единственное запретное слово - программа, ломающая компьютер.
## 2 Как записывать ответ?
5. Слово из $m$ букв получается выбором на каждом из $m$ мест любой из $N$ букв. Перемножая количество возможностей на каждом месте, получаем $N^{m}$ слов.
6. Если в допустимом слове первая буква $x$, то вторая тоже. Аналогично остальные. Значит, допустимое слово имеет вид $x x \ldots x$, где $x$ - одна из $N$ букв алфавита. Следовательно допустимых слов из фиксированного количества букв $N$ штук.
7. Пусть в допустимом слове первая буква $a$. Так как $a a$ - запрещённое слово, то вторая буква данного допустимого слова $b$. Продолжаем рассуждения и получаем, что на нечётном месте стоит буква $a$, а на чётном - буква $b$. Если первая буква $b$, то на чётном месте стоит буква $a$, а на нечётном - $b$. Значит, ряд размеров данного языка таков: $1+2 x+2 x^{2}+2 x^{3}+\ldots$
## 3 Арифметика языков
8. Набор запретных слов таков: всевозможные слова из двух букв, в которых одна буква из первого алфавита, а другая - из второго, и запретные слова обоих языков. Очевидно, что допустимое слово каждого языка не содержит запретных слов в сумме языков. Если в не содержащем запретное подслово слове суммы языков первая буква принадлежит первому алфавиту, то вторая тоже, и аналогично остальные. Другими словами такое слово состоит из букв одного алфавита. Но тогда оно является допустимым в языке с этим алфавитом, а значит, допустимым в сумме языков.
9. Свободные члены рядов $L(x)$ и $L_{1}(x)+L_{2}(x)-1$ равны единице. При $n>0$ коэффициент при $x^{n}$ ряда $L_{1}(x)+L_{2}(x)-1$ равен сумме количеств слов длины $n$ в языках $L_{1}$ и $L_{2}$, то есть количеству слов длины $n$ в языке $L$, то есть коэффициенту при $x^{n}$ в ряде $L(x)$.
10. Имеем
$$
\begin{aligned}
& (1-x)\left(1+x+x^{2}+x^{3}+\ldots\right)=1-x+(1-x) \cdot x+(1-x) \cdot x^{2}+(1-x) \cdot x^{3}+\cdots= \\
& =1-x+x-x^{2}+x^{2}-x^{3}+x^{3}-x^{4}+\cdots=1
\end{aligned}
$$
что и требовалось.
11. Набор запретных слов таков: все слова из двух букв, в которых первая буква из второго алфавита, а вторая - из первого, и все запретные слова языков произведения. Рассмотрим допустимое слово произведения. В нём буквы второго алфавита следуют после букв первого алфавита, и это слово не содержит запретных слов языков-множителей. Значит, допустимое слово произведения не содержит указанных запретных слов. Теперь возьмём слово, не содержащее указанных запретных слов. В нём буквы второго алфавита следуют после букв первого алфавита, поэтому такое слово имеет вид $w_{1} w_{2}$, где $w_{1}$ - слово из букв первого алфавита, а $w_{2}$ - из букв второго. Слово $w_{1} w_{2}$ не содержит запретных слов языков-множителей, поэтому слова $w_{1}$ и $w_{2}$ допустимы в своих языках, то есть слово $w_{1} w_{2}$ допустимо в произведении языков.
12. Коэффициент при $x^{k}$ в ряде $L_{1}(x) \cdot L_{2}(x)=L_{1}(x) \cdot n_{0}+L_{1}(x) \cdot n_{1} x+\cdots=\left(n_{0} \cdot m_{0}+n_{0} m_{1} x+\ldots\right)+$ $\left(n_{1} m_{0} x+n_{1} m_{1} x^{2}+\ldots\right)+\ldots$ равен $n_{0} m_{k}+n_{1} m_{k-1}+\cdots+n_{k} m_{0}$. Количество слов длины $k$ в множестве слов $L_{1} \cdot L_{2}$ равно числу способов выбрать пару слов $m$ из языка $L_{1}$ и $n$ из языка $L_{2}$, суммарное количество букв которых равно $k$. Если в слове $m i$ букв, то в слове $n k-i$ букв, а количество таких пар равно $m_{i} \cdot n_{k-i}$. Суммируя такие выражения для всех $i$, получаем $n_{0} m_{k}+n_{1} m_{k-1}+\cdots+n_{k} m_{0}$. Поэтому коэффициенты при $x^{k}$ в рядах $L_{1}(x) \cdot L_{2}(x)$ и $L_{1} \cdot L_{2}(x)$ совпадают, следовательно сами ряды совпадают.
13.
a) В решении этой задачи нам потребуются тот факт, что стандартные свойства умножения и сложения многочленов (ассоциативность, коммутативность, дистрибутивность) выполняются и для рядов. Рассмотрим, например, ассоциативность умножения $-(P \cdot Q) \cdot R=P \cdot(Q \cdot R)$. Чтобы вычислить коэффициент при $x^{k}$ в левой и правой части, достаточно его вычислить для рядов, у которых отброшены члены более высокой степени, то есть для многочленов. Поэтому указанное тождество для рядов следует из того же тождества для многочленов. Аналогично доказываются остальные свойства.
Заметим теперь, что поскольку ряд $\bar{S}$ начинается с первой степени $x$, в ряд $R \cdot \bar{S}^{m}$ не входят степени $x$ от нулевой до $m-1$-й. Именно поэтому бесконечные суммы вида $R-R \cdot \bar{S}+R \cdot \bar{S}^{2}-R \cdot \bar{S}^{3}+\ldots$ имеют смысл - для вычисления $k$-го коэффициента можно заменить эту сумму конечной. По той же причине для бесконечных сумм такого вида выполняется свойство дистрибутивности
$$
R \cdot\left(S_{1}+S_{2}+S_{3}+\ldots\right)=R \cdot S_{1}+R \cdot S_{2}+R \cdot S_{3}+\ldots
$$
Имея это в виду, мы легко получаем тождество
$$
(1+\bar{S})\left(1-\bar{S}+\bar{S}^{2}-\bar{S}^{3}+\ldots\right)=1
$$
Отсюода
$$
\begin{aligned}
& S \cdot \frac{R}{S}=S \cdot\left(R-R \cdot \bar{S}+R \cdot \bar{S}^{2}-R \cdot \bar{S}^{3}+\ldots\right)=S \cdot R \cdot\left(1-\bar{S}+\bar{S}^{2}-\bar{S}^{3}+\ldots\right)= \\
&=R \cdot(1+\bar{S})\left(1-\bar{S}+\bar{S}^{2}-\bar{S}^{3}+\ldots\right)=R
\end{aligned}
$$
б) Согласно утверждению а),
$$
S \cdot\left(T-\frac{R}{S}\right)=S \cdot T-S \cdot \frac{R}{S}=R-R=0
$$
Предположим, что ряд ( $T-\frac{R}{S}$ ) ненулевой. Так как ряд $S$ начинается с единицы, то первый ненулевой коэффициент ряда ( $T-\frac{R}{S}$ ) равен первому ненулевому коэффициенту ряда $S \cdot\left(T-\frac{R}{S}\right.$ ). Значит, ряд ( $T-\frac{R}{S}$ ) нулевой и $T=\frac{R}{S}$.
14.
a) Рассуждая аналогично задаче 10, получаем
$$
F_{A}(x)=1+N x+N^{2} x^{2}+\cdots=\frac{1}{1-N x}
$$
б) Получаем
$$
1+N x+N x^{2}+N x^{3}+\cdots=-N+1+N \cdot\left(1+x+x^{2}+x^{3}+\ldots\right)=-N+1+\frac{N}{1-x}=\frac{1+(N-1) x}{1-x}
$$
и
$$
1+2 x+2 x^{2}+2 x^{3}+\cdots=1+2 x \cdot\left(1+x+x^{2}+x^{3}+\ldots\right)=1+\frac{2 x}{1-x}=\frac{1+x}{1-x}
$$
15. Следует из задач 59 и 61 .
## 4 Свободное слово
16. Как следует из задачи 17 ниже, получаем $L(x)=\frac{1}{1-26 x+x^{5}}$. Можно и непосредственно получить эту формулу, проведя рассуждения, аналогичные решению задачи 17 .
17. Пусть $a_{k}$ - число допустимых слов длины $k$. Ясно, что $a_{0}=1$. Докажем, что при $k>0$ выполнено рекуррентное соотношение $a_{k}=N a_{k-1}-a_{k-m}$ (мы считаем, что $a_{k}=0$ при $k<0$, так как слов отрицательной длины не существует).
Действительно, приписывая к началу каждого допустимого слова из $k-1$ буквы каждую букву алфавита, мы получаем $N a_{k-1}$ слов, среди которых все допустимые слова длины $k$. Посмотрим, какие недопустимые слова длины $k$ получаются таким образом, то есть имеют вид $c g$, где $c-$ буква, а $g$ - допустимое слово длины $k-1$. Ясно, что запретное подслово должно стоять в начале, то есть $c g=w f$, где $w$ - запретное слово, а $f$ - допустимое. Из того, что $w$ - свободное слово, следует, что для любого допустимого слова $f$ слово, получающееся отбрасыванием первой буквы в слове $w f$, допустимо (в противном случае $w$ имело бы зацепление с самим собой). Поэтому множество всех слов вида $c g$, где $c$ - буква, а $g$ - допустимое слово длины $k-1$, является объединением двух непересекающихся множеств: множества допустимых слов длины $k$ и множества слов вида $w f$, где $f$ - допустимое слово длины $k-m$. Отсюда следует нужное нам рекуррентное соотношение.
Рассмотрим сумму соотношения $a_{0}=1$ и всех соотношений $a_{k} x^{k}=N a_{k-1} x^{k}-a_{k-m} x^{k}$ для $k=1,2,3, \ldots$. Получится
$$
L(x)=1+N x L(x)-x^{m} L(x)
$$
Решая это уравнение относительно $L(x)$, получаем нужную нам формулу.
18 . Согласно задаче 17,
$$
L(x)=\frac{1}{1-256 x+x^{4}}=1+\left(256 x-x^{4}\right)+\left(256 x-x^{4}\right)^{2}+\left(256 x-x^{4}\right)^{3}+\ldots
$$
Коэффициент при $x^{7}$ равен $256^{7}-4 \cdot 256^{3}$. Поэтому вероятность поломки компьютера равна $\frac{4 \cdot 256^{3}}{256^{7}}=4 \cdot 256^{-4}$, что примерно равно $10^{-10}$.
## 5 Преобразования слов
19. Первая стрелка определена однозначно; вторая сопоставляет каждому слову из $N$ то же самое слово, рассматриваемое как элемент $F_{A}$; третья сопоставляет каждому из оставшихся слов $F_{A}$ его же, как элемент $G$; последняя стрелка тривиальна, как и первая.
20. Каждый из школьников съедает поровну конфет, бывших у мальчиков, и конфет, бывших у девочек. Последняя девочка доест все конфеты, бывшие у мальчиков. Поэтому и конфеты, бывшие у девочек, она тоже доест, и учительнице ничего не достанется.
21.
а) Пусть $M_{\text {odd }}=M_{1} \cup M_{3} \cup M_{5} \cup \ldots$ и $M_{\text {even }}=M_{2} \cup M_{4} \cup M_{4} \cup \ldots$ Каждое преобразование устанавливает взаимно-однозначное соответствие между некоторым подмножеством $M_{\text {odd }}$ и $M_{\text {even }}$, причём, поскольку по краям стоят пустые множества, каждый элемент участвует ровно в одном из этих взаимно-однозначных соответствий. Поэтому во множествах $M_{\text {odd }}$ и $M_{\text {even }}$ поровну элементов.
б) Для каждого $k$ множество $M_{i}^{(k)}$ слов из $M_{i}$ длины $k$ конечно; применяя к конечным множествам $M_{i}^{(k)}$ с данным $k$ утверждение пункта а), получаем, что коэффициенты при $x^{k}$ в левой и правой частях доказываемой формулы совпадают. Поскольку $k$ - любое, это означает, что формула верна.
22. Проверим, что множество $A \cdot G$ является объединением двух непересекающихся множеств: множества $\bar{G}$ и множества $B \cdot G$. Доказательство этого опирается на то, что множество $B$ - свободное, и почти буквально повторяет соответствующее рассуждение в решении задачи 17 .
Теперь точная последовательность строится очевидным образом: первая и последняя стрелки тривиальны, вторая переводит каждый элемент $B \cdot G$ в себя (мы пользуемся тем, что $B \cdot G \subseteq A \cdot G$ ), а третья переводит в себя каждый из оставшихся элементов $A \cdot G$ (мы пользуемся тем, что $A \cdot G \backslash B \cdot G=\bar{G}$ ). В частности, ядром второго преобразования является пустое множество, а ядром третьего преобразования (и образом второго) - множество $D \cdot G$; образом третьего преобразования является $\bar{G}$.
23. По задаче 21б), из точной последовательности задачи 22 получаем
$$
(B \cdot G)(x)+\bar{G}(x)=(A \cdot G)(x)
$$
Заметим, что каждый элемент $A \cdot G$ записывается в виде $a g$, где $a \in A, g \in G$, однозначно. Поэтому $(A \cdot G)(x)=$ $A(x) G(x)$. Далее, каждый элемент $B \cdot G$ записывается в виде $b g$, где $b \in B, g \in G$, однозначно (поскольку запрещённое слово не может быть подсловом другого запрещённого слова). Поэтому $(B \cdot G)(x)=B(x) G(x)$. Мы имеем $A(x)=N x, G(x)=L(x), \bar{G}(x)=G(x)-1=L(x)-1$. Отсюда
$$
B(x) L(x)+L(x)-1=N x L(x)
$$
Решая это уравнение относительно $L(x)$, получаем требуемую формулу.
24. Обозначим встречающиеся в фразах слова буквами: "земля" - А, "стоять" - B, "на" - С, "великий" $\mathrm{D}$, "крокодил" - E, "каждый" - F, "вечер" - G, "глотать" - H, "солнце" - I. Тогда заклинаниям отвечают запретные слова "ABCDE" и "FGEHI". Эти слова свободны (потому что в каждом все буквы различны) и не имеют зацеплений друг с другом (потому что первая и последняя буквы второго слова не встречаются в первом). Следовательно, множество заклинаний свободно, и ряд размеров языка имеет вид
$$
L(x)=\frac{1}{1-100 x+2 x^{5}}
$$
Из этой формулы легко вывести (обращая рассуждения в решении задачи 17), что числа $a_{k}$ (количество фраз из $k$ слов) можно вычислить из начального условия $a_{0}=1$ и рекуррентного соотношения $a_{k}=100 a_{k-1}-2 a_{k-5}$. Вычисления приводят к ответу $a_{20}=10^{40}-32 \cdot 10^{30}+264 \cdot 10^{20}-448 \cdot 10^{10}+16$.
25. В каждом запретном слове буква $v$ встречается только на первом месте и все слова имеют длину 4 , поэтому множество запретных слов свободно. По задаче 23 , мы имеем
$$
L(x)=\frac{1}{1-26 x+3 x^{4}}
$$
26. Если множество запретных слов свободно, то, в частности, нет простых сцепок. Докажем обратное: если нет простых сцепок, то множество запретных слов свободно. Предположим противное: пусть множество запретных слов свободным не является. Тогда найдётся зацепление двух запретных слов, то есть найдутся такие три непустых слова $s, t, r$, что слова st и $t r$ - запретные. Выберем такую тройку $(s, t, r)$ так, чтобы она имела минимально возможную суммарную длину. Если это не простая сцепка, то str содержит запретное подслово $w$, отличное от st и $\operatorname{tr}$. Заметим, что конец $w$ не совпадает с концом $t r$, поскольку иначе либо $w$ является подсловом $t r$, либо $\operatorname{tr}$ является подсловом $w$, что невозможно, так как никакое запретное слово не содержит другое запретное в качестве подслова. Аналогично, начало $w$ не совпадает с началом st. Из тех же соображений, подслово $w$ имеет общую часть как с подсловом $s$, так и с подсловом $r$. Обозначим через $t^{\prime}$ общую часть подслов $s t$ и $w$, через $s^{\prime}$ - остаток подслова $s t$, а через $r^{\prime}$ - остаток подслова $w$. Эти слова непусты, их суммарная длина меньше суммарной длины слов $s, t, r$, а слова $s^{\prime} t^{\prime}=s t$ и $t^{\prime} r^{\prime}=w$ - запретные. Получено противоречие. Таким образом, из отсутствия простых сцепок следует, что множество запретных слов - свободное.
27. Будем строить преобразования последовательно, начиная с конца (с самой правой стрелки). Так как последнее множество пусто, то и область определения последнего преобразования - пустое множество. Поэтому предпоследнее преобразование имеет образом всё множество $\bar{G}$. Так как $\bar{G} \subseteq A \cdot G$, мы можем взять $\bar{G}$ в качестве области определения предпоследнего преобразования и считать, что каждый элемент $g \in \bar{G}$ переводится этим преобразованием в себя. Ядро этого преобразования состоит из не являющихся допустимыми слов вида $a g$, где $a$ - буква и слово $g$ является допустимым. Ясно, что для любого такого слова найдутся запретное слово $w$ и допустимое слово $f$ такие, что $a g=w f$ (мы уже использовали это соображение при решении задач 17 и 22). Это позволяет построить третью с конца стрелку (это преобразование также переводит каждый элемент своей области определения в себя). Рассмотрим ядро этого преобразования. Оно состоит из тех слов вида $w f$, где $w$ - запретное, а $f$ - допустимое, которые имеют вид $a v$, где $a$ - буква, а слово $v$ допустимым не является. Выберем в $v$ самое первое (начинающееся левее всех) запретное подслово $u$. Легко видеть, что подслово $u$ слова $a v=w f$ имеет общую часть с подсловом $w$ и образует вместе с ним простую сцепку. Таким образом, ядро третьей с конца стрелки целиком содержится в $S \cdot G$, что позволяет построить преобразование $S \cdot G \Longrightarrow B \cdot G$ (также переводящее каждый элемент своей области определения в себя).
28. Из решения предыдущей задачи получаем, что язык является незапутанным тогда и только тогда, когда допустимы все слова вида $r g$, где $r$ - хвост простой сцепки, а $g$ - допустимое слово. Эквивалентное условие на множество запретных слов звучит так: не существует таких слов $p, q, r, s, t$, где слова $p, q, s, t$ непусты, слова $p q, q r s$, st - запретные, причём pqrs - простая сцепка.
Заметим, что любой элемент множества $S \cdot G$ однозначно представляется в виде произведения простой сцепки на допустимое слово (это легко следует из определения простой сцепки и того, что никакое запретное слово не является подсловом другого запретного слова). Аналогично решению задачи 23 , для незапутанного языка $L$ из точной последовательности мы получаем уравнение
$$
S(x) L(x)+N x L(x)=B(x) L(x)+L(x)-1
$$
откуда и получается искомая формула
$$
L(x)=\frac{1}{1-N x+B(x)-S(x)}
$$
29. Простые сцепки имеют вид $a b b c, a b b a c$, их хвосты - $c, a c$. Видно, что ни один из этих хвостов не оканчивается на непустое начало запретного слова. Поэтому язык является незапутанным. Соответственно, ряд размеров имеет вид
$$
L(x)=\frac{1}{1-3 x+3 x^{3}-x^{4}-x^{5}}
$$
30. Простые сцепки имеют вид $x_{i} y_{j} z_{k}$, где $1 \leq i, j, k \leq n$, их хвосты $z_{k}$. Так как ни одно запретное слово не начинается на $z_{k}$, язык является незапутанным. Соответственно, ряд размеров имеет вид
$$
L(x)=\frac{1}{1-3 n x+2 n^{2} x^{2}-n^{3} x^{3}}
$$
31. Пусть $w$ - единственное запретное слово, и пусть $L$ - его длина. Предположим, что оно не является свободным, и $p q r, p q=q r=w,-$ простая сцепка. Мы имеем $w r=p q r=p w$. Следовательно, конечный участок длины $L$ у каждого из слов $w r=p w, w r r=p w r=p p w, w r r r=p p w r=p p p w, \ldots$ равен $w$. Возьмём из этих слов первое, имеющее длину не меньше $2 L$. Мы получим, что слово вида $r r r . . . r$ имеет конечный участок, равный $w$. Но тогда у слова $r$ есть непустое окончание, являющееся началом слова $w$. Следовательно наш язык не является незапутанным (см. решение задачи 28).
## 6 Ещё о свободных множествах
32. Например, если алфавит состоит из букв $a$ и $b$, то свободным будет множество слов вида $a^{n} b^{n} a b$, где $n \geq 2$. Докажем это. Очевидно, что никакие два разных слова такого вида не являются подсловами друг друга. Осталось доказать, что между ними нет нетривиальных зацеплений (т.е. что любое зацепление есть просто зацепление слова с самим собой по всей длине). Действительно, если $w-$ зацепление слов $a^{n} b^{n} a b$ и $a^{m} b^{m} a b$, то легко видеть, что $w$ содержит не менее трёх букв. Как конец слова $a^{n} b^{n} a b$, оно имеет вид либо $b^{k} a b$, либо $a^{k} b^{n} a b$, где $1 \leq k \leq n$. Поскольку оно также должно быть началом слова $a^{m} b^{m} a b$, получаем, что $k=m=n$ и $w=a^{n} b^{n} a b=a^{m} b^{m} a b$ - тривиальное зацепление.
33. Лемма. Если $p(x)=1+p_{1} x+p_{n} x^{n}$ - многочлен с единичным свободным членом степени $n \geq 1$, то ряд $f(x)=1 / p(x)$ не может быть многочленом (т.е. этот ряд содержит бесконечное множество ненулевых членов).
Доказательство леммы. Предположим, от противного, что ряд $f(x)-$ многочлен, т.е. $f(x)=f_{0}+f_{1} x+$ $\ldots f_{m} x^{m}$, где старший коэффициент $f_{m}$ ненулевой. Согласно задаче 13 а), получаем $1=f(x) p(x)=1+\left(f_{0} p_{1}+\right.$ $\left.f_{1} p_{0}\right) x+\cdots+f_{m} p_{n} x^{m+n}$ - противоречие.
Перейдём к решению задачи. Согласно задаче 23, имеем
$$
L(x)=\frac{1}{1-N x+B(x)}
$$
Если бы язык $L$ был конечным, то ряд $L(x)$ был бы многочленом, что невозможно согласно доказанной лемме. Следовательно, множество допустимых слов языка бесконечно.
34. Очевидно, для любых рядов неравенство $A \geq B$ равносильно неравенству $A-B \geq 0$, т.е. условию, что коэффициенты ряда $A-B$ неотрицательны . Обозначим ряд $P-Q$ через $A=a_{0}+a_{1} x+a_{2} x^{2} \ldots$, а ряд $R$ как $R=r_{0}+r_{1} x+r_{2} x^{2}$... Тогда произвольный $n$-й коэффициент ряда $A R$, вычисляемый по формуле $a_{0} r_{n}+a_{1} r_{n-1}+\cdots+a_{n} r_{0}$, представим в виде суммы неотрицательных числе, и потому сам неотрицательный. Это означает, что выполняется неравенство $A R \geq 0$, равносильное неравенству $P R-Q R \geq 0$, или $P R \geq Q R$.
35. По формуле из задачи 23,
$$
L(x)=\frac{1}{1-A(x)+B(x)}
$$
Согласно задаче 27 , существует точная последовательность
$$
\emptyset \Longrightarrow K \Longrightarrow B^{\prime} \cdot G^{\prime} \Longrightarrow A \cdot G^{\prime} \Longrightarrow \bar{G}^{\prime} \Longrightarrow \emptyset
$$
где $K$ - ядро отображения $B \cdot G \Longrightarrow A \cdot G^{\prime}$, а $G^{\prime}$ - множество допустимых слов языка $L^{\prime}$. Из этой последовательности получаем (зад. 21) равенство
$$
B^{\prime}(x) G^{\prime}(x)-A(x) G^{\prime}(x)+G^{\prime}(x)-1=K(x)
$$
откуда (т.к. $B^{\prime}(x)=B(x), L^{\prime}(x)=G^{\prime}(x)$ и $K(x) \geq 0$ )
$$
L^{\prime}(x)(B(x)-A(x)+1) \geq 1
$$
Умножая это неравенство на ряд $L(x) \geq 0$, получаем (ввиду зад. 33)
$$
L^{\prime}(x)(B(x)-A(x)+1) \cdot \frac{1}{1-A(x)+B(x)} \geq L(x)
$$
т. е.
$$
L^{\prime}(x) \geq L(x)
$$
36. Пусть алфавит $A=\{a, b\}$. Обозначим второе слово через $v$. Очевидно, чтобы слова $v$ и $w$ не были свободными, необходимо, чтобы их начальные и конечные буквы были различные. Если при этом $w$ начинается на одну букву, а $v$ - на другую, то последняя буква слова $v$ совпадает с первой буквой слова $w$, и эти слова зацепляются, так что множество $B$ не будет свободным. Итак, осталось рассмотреть случай, когда оба слова $v$ и $w$ начинаются на одну букву (скажем, $a$ ), а заканчиваются на другую (b).
a) Имеем $w=a b$ и $v=a \ldots b$. Очевидно, если первая буква $b$ в слове $v$ находится на $k$-м месте, то его подслово из букв на $(k-1)$-м и $k$-м местах равно $w$, так что множество $B$ не свободно.
b) Ответ: нет. Пусть $w=a a b$ (случай $w=a b b$ аналогичен, с точностью до левой-правой симметрии и замены букв). Поскольку слово $w$ не является подсловом в $v$, то в слове $v$ за парой букв $a a$ всегда следует ещё одна $a$. Так как слова $v$ и $w$ не зацепляются, то $v$ не может начинаться на $a b$, т. е. оно начинается на $a a$. Следовательно, третья буква в $v$ снова $a$, затем четвёртая и т. д., откуда $v=a a \ldots a-$ противоречие.
37. Достаточно показать, что существует свободное множество $B$ из $g=\left[n^{2} / 4\right]$ двухбуквенных слов. Пусть $k=[n / 2]$, т. е. $n=2 k$ или $n=2 k+1$. Положим $B=\left\{x_{i} x_{j} \mid 1 \leq i \leq k, k+1 \leq j \leq n\right\}$. Очевидно, оно свободно. Тогда в случае четного $n=2 k$ множество $B$ насчитывает $k^{2}=n^{2} / 4$ элементов, а в случае нечётного $n=2 k+1$ оно содержит $k(k+1)=(n-1)(n+1) / 4=n^{2} / 4-1 / 4=\left[n^{2} / 4\right]$ элементов, что и требовалось.
38. Достаточно показать, что существует свободное множество $B$ из $m \leq k^{d}(d-1)^{d-1}$ слов длины $d$. Разобьём основной алфавит $A=\left\{x_{1}, \ldots, x_{n}\right\}$ на два подмножества $P=\left\{x_{1}, \ldots, x_{k}\right\}$ и $Q=\left\{x_{k+1}, \ldots, x_{n}\right\}$. Тогда легко видеть, что множество $B=\left\{p q \mid p \in P, q \in F_{Q}\right.$ - слово длины $\left.d-1\right\}$ - искомое.
39 .
а) Согласно задаче $23, \frac{1}{1-n x+B(x)}=L(x) \geq 1$.
б) Ответ: неверно. Например, в случае двухбуквенного алфавита $A$ такого множества $B$ не существует при $p(x)=x^{3}+x^{10}$ (это доказано в задаче $36 \mathrm{~b}$ ). Осталось убедиться, что ряд
$$
f(x)=\frac{1}{1-2 x+x^{3}+x^{10}}
$$
имеет неотрицательные коэффициенты (поскольку свободный член этого ряда единичный, это условие равносильно требуемому неравенству $f(x) \geq 1$ ). Оказывается, для этих коэффициентов справедливо даже более сильное неравенство $a_{n} \geq(3 / 2)^{n}$. Доказательство последнего неравенства можно провести по индукции, воспользовавшись рекуррентным соотношением $a_{n+10}=2 a_{n+9}-a_{n+7}-a_{n}$, которое следует из равенства $\left(1-2 x+x^{3}+x^{10}\right) f(x)=1$.
Другой подобный пример - случай $p(x)=4 x^{6}$, снова над алфавитом из двух букв.
40. Решение содержится в теореме 5.1 (эквивалентность $\mathrm{A} \Longleftrightarrow \mathrm{B}$ ) и предложении 5.6 в статье: David Anick, Generic algebras and $C W$-complexes, Proceedings of 1983 Conference on algebra, topology and K-theory in honor of John Moore. Princeton University, 1988, p. 247-331.
41. Вопрос остаётся открытым.
## 7 Слова и цепи
42. Слово "of" не участвует в построении цепей длины больше 1 , потому что данные слова не начинаются на букву $\mathrm{f}$ и не заканчиваются на букву о. Буквы $s$ нет в слове tournament, поэтому цепь может содержать слово towns только в конце. Буква t в слове tournament стоит лишь на первом и последних местах, поэтому это слово может зацепляться с собой только по одной букве. Исходя из сказанного, мы находим все цепи: tournament, of, towns; tournamentournament, tournamentowns;... Цепей длины больше 1 будет ровно две.
43. Рассмотрим цепь $c$ длины $n$. От его правого конца можно строить антицепь по направлению к левому концу единственным образом. Будем присоединять звенья слева по очереди. Докажем по индукции, что начало $i$-го звена антицепи лежит между началом $i$-го справа звена цепи и концом $i+1$-го справа звена цепи. Для $i=1$ утверждение верно, потому что в этом случае соответствующие звенья цепи и антицепи совпадают. Проверим базу также для $i=2$. Второе звено антицепи лежит правее второго справа звена цепи, потому что между первым и вторым звеном нет запретных слов. Начало второго звена антицепи лежит левее конца третьего справа звена цепи, потому что правее третьего справа конца звена цепи нет запретных слов по определению цепи. Таким образом для $i=2$ утверждение верно. Докажем шаг. По предположению индукции $i$-е справа звено цепи пересекает $i-1$-е звено антицепи, но $(i+1)$-е звено антицепи не пересекает $(i-1)$-го звена антицепи, поэтому $(i+1)$-е звено антицепи левее $i$-го справа звена цепи. Между концом $(i+2)$-го и началом $i$-го справа звена цепи не начинается никакое запретное слово, поэтому начало ( $i+1$ )-го звена антицепи левее конца $(i+2)$-го звена цепи. Так как $(i-1)$-е звено антицепи не левее $i-1$-го звена цепи, то $(i+1)$-е звено цепи не пересекает ( $i-1$ )-е звено антицепи, но пересекает $i$-е звено, поэтому ( $i+1$ )-е звено антицепи не левее $(i+1)$-го звена цепи.
44. Пусть цепь $c^{\prime}$ - подслово цепи $c$. Докажем по индукции, что $i$-е звено цепи $c$ не правее $i$-го звена цепи $c^{\prime}$. База $i=1$ очевидна. Если первые звенья цепей совпадают, и одна является подсловом другой, то все остальные звенья также совпадают, и, в частности, если такие цепи имеют одинаковую длину, то они совпадают. Поэтому цепь $c^{\prime}$ начинается не с начала, а поэтому первое звено цепи $c^{\prime}$ правее или совпадает со вторым звеном цепи $c$. Если бы второе звено цепи $c$ было правее первого звена цепи $c^{\prime}$, то тогда бы первое звено цепи $c^{\prime}$ можно было бы выбрать в качестве второго звена цепи $c$. Значит, второе звено цепи $c$ левее второго звена цепи $c^{\prime}$, и база индукции верна для $i=2$. Перейдём к шагу индукции. Если $(i+1)$-е звено цепи $c^{\prime}$ не пересекается с $i$-ым звеном цепи $c$, то $(i+1)$-е звено цепи $c^{\prime}$ правее $(i+1)$-го звена цепи $c$. Также добавленное звено цепи $c^{\prime}$ не пересекается с $(i-1)$-м звеном цепи $c^{\prime}$, а значит, по предположению индукции с $(i-1)$-м звеном цепи $c$. Поэтому, если $i+1$-е звено цепи $c^{\prime}$ пересекает $i$-е звено цепи $c$, то $i+1$-е звено цепи $c$ всё равно не правее $(i+1)$-го звена цепи $c^{\prime}$, потому что иначе то звено можно было бы выбрать вместо этого. Шаг доказан. Значит, последние звенья цепей совпадают, но по прошлой задаче данная пара цепей является также парой антицепей одинаковой длины с совпадающими первыми звеньями, откуда они совпадают.
45. Пусть слово представлено в виде $g c$, где $g$ - допустимое слово, а $c$ - цепь длины не менее двух. По задаче 43 цепь с также является антицепью. Если при убирании первого звена цепи $c$ появляется запретное слово, не зацепленное с укороченной цепью $c$, то антицепь $c$ можно продолжить влево и получить новое представление $g^{\prime} c^{\prime}$, где длина цепи увеличилась. Если такого запретного слова не появилось, то антицепь $c$ можно укоротить на самое левое звено и получить новое представление $g^{\prime} c^{\prime}$, в котором длина цепи уменьшилась. Если есть ещё одно представление $g^{\prime \prime} c^{\prime \prime}$, то заметим, что дуги антицепей $c, c^{\prime}, c^{\prime \prime}$ совпадают, а значит, длина каких-то двух цепей отличается минимум на два, но тогда допустимое слово перед короткой антицепью содержит самое левое звено более длинной антицепи, противоречие.
46. Для решения этой задачи мы применим задачу 21 для точной последовательности
$$
\ldots \Longrightarrow C_{n+1} \cdot G \Longrightarrow C_{n} \cdot G \Longrightarrow C_{n-1} \cdot G \Longrightarrow \ldots C_{1} \cdot G \Longrightarrow A \cdot G \Longrightarrow \bar{G}
$$
Построим эту последовательность. Возьмём слово $c g$ из $C_{n} \cdot G$. Хвост цепи $c$ припишем в начало слова $g$ и получим $c^{\prime} g^{\prime}$. Если $g^{\prime}$ допустимое слово, то слово $c^{\prime} g^{\prime}$ принадлежит $C_{n-1} \cdot G$. Если слово $g^{\prime}$ содержит запретное слово, то цепь $c$ можно продолжить вправо до цепи $c^{\prime \prime}$, остаток обозначим $g^{\prime \prime}$. Тогда слово $c^{\prime \prime} g^{\prime \prime}$ принадлежит $C_{n+1} \cdot G$. Цепь можно единственным образом продолжать внутри слова, поэтому построенные отображения взаимно-однозначны на частях языков $C_{n} \cdot G$.
Стрелки $C_{1} \cdot G \Longrightarrow A \cdot G \Longrightarrow \bar{G} \Longrightarrow \emptyset$ мы берём из задачи 27 . По задаче 21
$$
1-L(x)\left(1-N x+C_{1}(x)-C_{2}(x)+C_{3}(x)-\ldots\right)=0
$$
Откуда получаем требуемое.
47. По задаче $42 C_{1}(x)=x^{2}+x^{5}+x^{10}, C_{n}(x)=x^{9(n-1)}\left(x^{5}+x^{10}\right)$. По формуле из задачи 46
$$
\begin{aligned}
L(x)=\frac{1}{1-26 x+x^{2}+\left(x^{5}+x^{10}\right)\left(1-x^{9}+x^{18}-\ldots\right)}=\frac{1}{1-26 x+x^{2}+\frac{x^{5}+x^{10}}{1+x^{9}}}= \\
\quad=\frac{1+x^{9}}{1-26 x+x^{2}+x^{5}+x^{9}-25 x^{10}+x^{11}}
\end{aligned}
$$
48. Рассмотрим четыре варианта запретного слова из четырёх букв с точностью до замены букв.
1) Запретное слово имеет вид аааа. В этом случае $C_{2 n}=x^{4 n+1}, C_{2 n-1}=x^{4 n}$. По формуле задачи 46
$$
\begin{aligned}
L(x)=\frac{1}{1-256 x+x^{4}-x^{5}+\ldots}=\frac{1}{1-256 x+\frac{x^{4}-x^{5}}{1-x^{4}}} & =\frac{1-x^{4}}{1-256 x+255 x^{5}}= \\
& =\left(1-x^{4}\right)\left(1+\left(256 x-255 x^{5}\right)+\left(256 x-255 x^{5}\right)^{2}+\ldots\right)
\end{aligned}
$$
Коэффициент при $x^{7}$ равен $256^{7}-3 \cdot 256^{2} \cdot 255-256^{3}=256^{7}-4 \cdot 256^{3}+3 \cdot 256^{2}$.
2) Запретное слово имеет вид аbса и хотя бы две различные буквы. В этом случае $C_{n}=x^{3 n+1}$.
$$
L(x)=\frac{1}{1-256 x+x^{4}-x^{7}+\ldots}=1+\left(256 x-x^{4}+x^{7}-\ldots\right)+\left(256 x-x^{4}+x^{7}-\ldots\right)^{2}+\ldots
$$
Коэффициент при $x^{7}$ равен $256^{7}-4 \cdot 256^{3}+1$
3) Запретное слово имеет вид abab. В этом случае $C_{n}=x^{2(n+1)}$.
$$
L(x)=\frac{1}{1-256 x+x^{4}-x^{6}+x^{8}(\ldots)}
$$
Коэффициент при $x^{7}$ равен $256^{7}-4 \cdot 256^{3}+2 \cdot 256$
4) Запретное слово свободно. А случай свободного запретного слова разобран в задаче 18 .
49. Из задачи 46 следует, что
$$
\frac{1}{1-N x}-L(x)=L(x) \cdot C_{1}(x) \cdot \frac{1}{1-N x}-L(x) \cdot C_{2}(x) \cdot \frac{1}{1-N x}+L(x) \cdot C_{3}(x) \cdot \frac{1}{1-N x}-\ldots
$$
(Бесконечная сумма имеет смысл, поскольку степени начальных членов слагаемых растут.) В левой части равенства стоит ряд размеров множества недопустимых слов. В правой части равенства стоит знакопеременная сумма рядов размеров множеств $L \cdot C_{n} \cdot F_{A}$. Определено отображение для каждого из этих языков в множество недопустимых слов, и наоборот, каждое недопустимое слово можно представить в виде $g c_{1} u$, где $g$ - допустимое, $c_{1}$ - запретное слово. Но недопустимое слово может быть представлено в виде $g c_{n} u$, где $g$ допустимое, а $c_{n}$ - цепь длины $n$, несколькими способами. Пусть для слова $w$ число таких способов равно $w_{n}$. Тогда сумма чисел $\left(w_{1}-w_{2}+w_{3}-w_{4}+\ldots\right)$ по всем словам длины $k$ равна коэффициенту при $x^{k}$ в правой части равенства выше, а значит, и в левой, что равно количество недопустимых слов длины $k$.
Заметим, что из представления слова $w$ в виде $g c_{n} u$ можно получить другое представление с длиной цепи на единицу меньше, отбросив хвост цепи $c_{n}$ в остаток $u$. Поэтому два таких варианта сократятся в сумме $\left(w_{1}-w_{2}+w_{3}-w_{4}+\ldots\right)$. Другими словами рассматриваемая сумма равна числу представлений слова $w$ в виде $g c u$, где подслово $c$ - это максимальная подцепь слова $w$, причём цепь $c$ имеет нечётную длину.
Рассмотрим представление слова $w$ в виде $g c u$, где $c$ - максимальная цепь с самым правым последним звеном. По задаче 45 либо в слове $g c$ есть максимальная цепь длины 1 , либо оно представимо в виде $g^{\prime} c^{\prime}$, где $g^{\prime}$ - допустимо, а $c^{\prime}$ - цепь, которая либо длиннее, либо короче цепи $c$ на одно звено. Заметим, что $c^{\prime}$ также максимальная подцепь слова $w$. Одна из цепей $c$ и $c^{\prime}$ имеет нечётную длину. Тем самым мы показали, что сумма $\left(w_{1}-w_{2}+w_{3}-w_{4}+\ldots\right)$ не меньше единицы. Но сумма таких величин по всем недопустимым словам длины $k$ равна их количеству. Значит, каждая величина равна единице, и в каждом недопустимом слове максимальных цепей нечётной длины ровно одна.
50. Применим формулу задачи 46 .
$$
L^{\prime}(x)=\frac{1}{\left.1-(N+1) x+C_{1}(x)-C_{2}(x)\right)+\ldots}=\frac{1}{\frac{1}{L(x)}-x}
$$
51. Применим формулу задачи 46 .
$$
W(x) \quad=\quad \frac{1}{1-\left(N+N^{\prime}\right) x+\left(C_{1}(x)+C_{1}^{\prime}(x)\right)-\left(C_{2}(x)+C_{2}^{\prime}(x)\right)+\ldots} \quad=\quad \frac{1}{\frac{1}{L(x)}+\frac{1}{L^{\prime}(x)}-1}
$$
52. Допустимые слова языка $M$ - это цепи языка $L$. Цепи длины $n$ этих языков состоят из $n+1$-й буквы, поэтому $C_{n}(-x)=(-1)^{n+1} C_{n}(x)$. Имеем $M(-x)=1-N x+C_{1}(x)-C_{2}(x)+\ldots$, то есть $L(x) M(-x)=1$.
53. Существование свободного множества при условии $m \leq k^{d}(d-1)^{d-1}$ доказано в задачах 37 и 38 . Осталось доказать, что при $m>k^{d}(d-1)^{d-1}$ искомого свободного множества не существует.
a) Если задано $m>n^{2} / 4$ слов из двух букв, то они могут составлять свободное множество $S$ лишь при условии, что первая буква никакого слова не совпадает со второй буквой никакого другого слова, т.е. есть два непересекающихся множества букв, $P$ и $Q$, элементы которых могут служить, соответственно, только начальными или только вторыми буквами слова из $S$. Обозначим $r=|P|+|Q| \leq n$ и $s=|P| \cdot|Q| \geq$ $|S|=m>n^{2} / 4$. По теореме Виета, натуральные числа $|P|$ и $|Q|$ являются корнями квадратного уравнения $x^{2}-r x+s=0$, дискриминант которого $D=r^{2}-4 s$ отрицателен при выполнении указанных ограничений на $r$ и $s$ - противоречие.
б) Пусть $B$ - свободное множество $m$ слов длины 3. Поскольку в свободном множестве никакая первая буква слова не может быть также и последней буквой какого-либо слова, в алфавите $A$ есть два непересекающихся подмножества $X$ и $Y$, элементы которых встречаются, соответственно, только в начале и только в конце слов из $B$. Если есть буквы, которые не встречаются ни в конце, ни в начале слова, присоединим их произвольным образом к одному из множеств $X$ и $Y$. Пусть, для определённости, число $s$ элементов множества $X=\left\{x_{1}, \ldots, x_{s}\right\}$ не превосходит количество элементов $t$ множества $Y=\left\{y_{1}, \ldots, y_{t}\right\}$. Каждый элемент множества $B$ имеет вид $x_{i_{1}} x_{i_{2}} y_{j_{1}}$ или $x_{i_{1}} y_{j_{1}} y_{j_{2}}$, причём никакое финальное подслово вида $x y$ элемента первого типа не может быть началом элемента второго типа. Проведём преобразование множества $B$, заменив для каждого финального подслова $x y$ все слова первого типа, оканчивающиеся на него, на слова второго типа, по правилу $x_{i} x y \mapsto x y y_{i}$, где $1 \leq i \leq s \leq t$. Легко видеть, что при таком преобразовании никакие элементы не переходят в другие элементы множества $B$ и никакие различные элементы не переходят в один и тот же, причём получившееся множество $B^{\prime}$ останется свободным. При этом в $B^{\prime}$ все элементы имеют вид $x_{i_{1}} y_{j_{1}} y_{j_{2}}$. Следовательно, количество элементов множества $B^{\prime}$ (равное по-прежнему числу $m$ ) не превосходит $s t^{2}$, откуда
$$
m \leq s t^{2} \leq(n-t) t^{2} \leq\left(n-\frac{2 n}{3}\right)\left(\frac{2 n}{3}\right)^{2}=\frac{4 n^{3}}{27}=4 k^{3}
$$
что и требовалось.
в) Для доказательства потребуется следующая аналитическая
Лемма. Пусть $R(x)=1+a_{1} x+a_{2} x^{2}+\ldots$ - ряд с натуральными коэффициентами такой, что $R(x)=1 / p(x)$ для некоторого многочлена $p(x)$ с единичным свободным членом. Обозначим $R_{n}(x)=1+a_{1} x+a_{2} x^{2}+\cdots+a_{n} x^{n}$. Если для всех $x \in\left[0, x_{0}\right]$, где $x_{0}>0$, выполняется условие $p(x) \geq m>0$, то для всех $n>0$ справедливы неравенства $R_{n}\left(x_{0}\right) \leq 1 / m$.
Не доказывая лемму, перейдём к решению задачи. Обозначим $s=m k^{-d}-(d-1)^{(d-1)}$; требуется доказать, что при $s>0$ свободного множества не существует. Предположим, что это не так. Тогда, согласно задаче 39 а), ряд $1 / p(x)$, где $p(x)=1-d k x+m x^{d}$, имеет натуральные коэффициенты (нулевых коэффициентов быть не может, поскольку этот ряд бесконечен согласно задаче 33). Отметим, что при $s>0$ многочлен $p(x)$ положителен на отрезке $[0,1]$ (доказательство: минимум этого многочлена на отрезке $[0,1]$ достигается либо в концах отрезка, где $p(x)$ положителен, либо в такой точке $x_{0}$, в которой $p^{\prime}\left(x_{0}\right)=0$, т. е. при $x_{0}=\frac{1}{k(d-1)}$; при этом $p\left(x_{0}\right)=s x_{0}^{d}>0$ ). Это означает, что существует такое число $m>0$, что $p(x) \geq m$ при $x \in[0,1]$. Согласно лемме, это означает, что для всех $n$ количество слов длины не выше $n$, равное $L_{n}(1)$, ограничено константой $1 / m$.
54. а) По определению, запретными словами языка $L$ ! являются все двухбуквенные слова, не запретные в $L$. Следовательно, запретными словами языка ( $\left.L^{!}\right)!$будут все двухбуквенные слова, не запретные в $L^{\text {! }}$, т. е. в точности запретные слова языка $L$. Таким образом, и алфавиты, и наборы запретных слов языков $L$ и $\left(L^{!}\right)$! совпадают, а потому и сами языки равны.
б) Поскольку множество запретных слов языка $M=\left(L_{1}+L_{2}\right)$ ! есть объединение множеств запретных слов языков $L_{1}^{!}$и $L_{2}^{!}$, а алфавит языка $M$ представляет собой объединение их (непересекающихся) алфавитов, то язык $M$ есть свободное произведение (см. определение в зад. 51) языков $L_{1}^{!}$и $L_{2}^{!}$.
в) Запретными словами языка ( $L_{1} \cdot L_{2}$ )! будут разрешённые двухбуквенные слова языков $L_{1}$ и $L_{2}$, а также слова вида $a B$, где $a$ - буква из алфавита языка $L_{1}$, а $B$ - буква из алфавита языка $L_{2}$. Это означает, что
$$
\left(L_{1} \cdot L_{2}\right)^{!}=L_{2}^{!} \cdot L_{1}^{!}
$$
55. Пусть $w-$ слово длины $n k$ (где $k \geq 1$ ) над алфавитом языка $L, w^{(n)}-$ соответствующее ему слово языка $L^{(n)}$. Разобьём $w$ на подслова $w=w_{1} \ldots w_{k}$, каждое из которых соответствует букве языка $L^{(n)}$. Легко видеть, что слово $w$ содержит какое-то запретное подслово $u$ (состоящее, по определению, из не более чем $d$ букв) в том и только том случае, когда в каком-то подслове $w^{\prime}=w_{p} \ldots w_{p+m-1}$ каждое из подслов $w_{i}$
либо содержится в подслове $u$, либо пересекается с ним, так что количество $n$-буквенных фрагментов $m$ в подслове $w^{\prime}$ удовлетворяет неравенству $m \leq s$, где
$$
s=2+\left[\frac{d-2}{n}\right]
$$
Таким образом, любое недопустимое слово $w^{(n)}$ языка $L^{(n)}$ содержит недопустимое подслово из не более чем $s$ букв, т. е. язык $L^{(n)}$ задаётся конечным множеством запретных слов, причём длины запретных слов этого языка не превосходят $s$. Это доказывает утверждение а).
б) Ответ: не всегда.
Докажем, что при $d \geq 3$ и $n \geq 2$ длины запретных слов языка $L^{(n)}$ всегда меньше $d$; в частности, этот язык не может быть $d$-определённым, т. е. ответ на вопрос из п. б) отрицательный. Достаточно доказать неравенство $s0$, которое, очевидно, верно при заданных ограничениях на $d$ и $n$.
в) Ответ: $n=d-1$. По доказанному выше, язык $L^{(n)}$ является квадратичным или свободным (т. е. длины запретных слов не превосходят 2) при условии $s \leq 2$, которое равносильно неравенству $2+\frac{d-2}{n}<3$, или $n>d-2$, т. е. $n \geq d-1$. Если же $n \leq d-2$, то существуют такие $d$-определённые языки $L$, для которых язык $L^{(n)}$ имеет запретные слова из более чем трёх букв: примером служит язык $L$ с трёхбуквенным алфавитом $\{a, b, c\}$ и единственным запретным словом $a b c^{d-2}$.
56. См. решение задачи 58 .
57. Ответ: да. Например, пусть $A$ - алфавит из $n \geq 2$ букв. Рассмотрим язык $L=F_{A} \cdot F_{A}^{!}$. Поскольку язык $F_{A}$ имеет экспоненциальный рост (для него в задаче 55 с) можно выбрать $c_{1}=n+1$ и $c_{2}=n$ ), причём $2 F_{A}(x) \geq L(x) \geq F_{A}(x)$, то язык $L$ также имеет экспоненциальный рост. Согласно задаче 53 в), имеем $L^{!}=\left(F_{A}^{!}\right)!\cdot F_{A}^{!}=L$, так что оба языка $L$ и $L^{!}$имеют экспоненциальный рост.
58. Докажем сначала следующее утверждение (при решении задачи 56 без него можно обойтись).
Лемма. Пусть $a=\left\{a_{0}, a_{1}, a_{2}, \ldots\right\}$ - последовательность натуральных чисел, в которой $a_{0}=1$ и для некоторого натурального $N$ имеем $a_{1} \geq 2, \ldots, a_{N} \geq 2$. Тогда последовательность $a$ имеет полиномиальный (соответственно, экспоненциальный) рост в том и только том случае, когда соответствующие неравенства из утверждений b) и с) выполняются для всех $a_{k}$ при $k \geq N$.
Доказательство леммы. Пусть $M=\max _{i \leq N}\left\{a_{i}\right\}$. Очевидно, если для некоторых многочленов $p, q$ степени $d$ выполняются неравенства $p(k) \geq a_{k} \geq q(k)$ при $k \geq N$, то выполняются также и неравенства $p(k)+M \geq a_{k} \geq$ $q(k)-M$ при всех $k$, что доказывает лемму в случае полиномиального роста. Аналогично, если $c_{1}^{k} \geq a_{k} \geq c_{2}^{k}$ при $k \geq N$, то $\left(M+c_{1}\right)^{k} \geq a_{k} \geq g^{k}$ при всех $k$, что полностью доказывает лемму.
Перейдём к решению задачи. Очевидно, все допустимые слова длины $\geq d-1$ получаются, если, начиная со слова в вершине графа, приписывать к нему справа буквы, которые прочитываются при прохождении какого-либо маршрута, начинающегося в этой вершине, причём разные слова соответствуют разным маршрутам. Очевидно, язык конечен тогда и только тогда, когда никакой маршрут не возвращается в начальную вершину, т.е. в графе нет циклов (что доказывает утверждение а)). Осталось рассмотреть случай, когда язык бесконечен и в графе есть цикл. В этом случае количество $a_{j}$ слов длины $j \geq d$ равно числу маршрутов длины $j-d+1$.
Предположим, что есть два пересекающихся цикла; пусть их длины суть $d_{1}$ и $d_{2}$, и $v$ - общая вершина, исходящие из которой ребра различны для обоих циклов (скажем, отвечающие буквам $x$ и $y$ ). Слова, которые прочитываются на ребрах $k$-звенных маршрутов, начинающихся в $v$ и проходящим по каждому из циклов, различны, поэтому $a_{k} \geq 2$ при всех $k \geq 0$. Кроме того, для любого $j=(d-1)+q\left(d_{1}+d_{2}\right)+r$, где $r0$ (если $v$ - обособленная вершина), либо $q_{k}^{v}=1$ для всех $k$ (если $v$ - цикл), т. е. соответствующая последовательность всегда полиномиальна. Пусть теперь $v$ - какая-то начальная вершина графа $\Gamma_{L}^{\prime}$, из которой исходят $r$ стрелок $a_{1}, \ldots, a_{r}$ к вершинам $v_{1}, \ldots, v_{r}$ (возможно, повторяющимся). По индукции, считаем $q_{k}^{v_{i}}=b_{i}(k)-$ многочлен с положительным старшим коэффициентом. Если $v$ - обособленная вершина, то $q_{k}^{v}=\sum_{i=1}^{r} q_{k-1}^{v_{i}}$, т.е. эта последовательность полиномиальна как сумма полиномиальных последовательностей. Если же $v$ цикл, то перед переходом к вершинам по ребрам $a_{1}, \ldots, a_{r}$ возможно слово любой длины в цикле, поэтому $q_{k}^{v}=\sum_{i=1}^{r}\left(\sum_{j=1}^{k} q_{k-j}^{v_{i}}\right)=\sum_{i=1}^{r}\left(\sum_{j=1}^{k} b_{i}(k-j)\right)$ - сумма многочленов с положительными старшими коэффициентами. Утверждение доказано.
Примечание. Аналогичным образом можно определить тип роста любого регулярного множества. Для этого используется отвечающий этому множеству конечный автомат.
59. Обозначим множество допустимых слов через $M$. Пусть язык является $d$-определённым. Докажем, что каждое слово $M$-эквивалентно слову не более чем из $d$ букв.
Действительно, если слово $v$ не является допустимым, то какое слово к нему не припиши, результат не будет допустимым. Поэтому все недопустимые слова эквивалентны. В частности, любое из них эквивалентно какому-нибудь запретному слову, то есть слову длины не большей $d$.
Пусть слово $u$ допустимо и имеет длину, большую $d$. Обозначим через $v$ подслово слова $u$, состоящее из его последних $d$ букв. Пусть $w$ - произвольное слово. Если слово uw содержит запретное подслово, то это подслово содержится в $v w$, так как длина запретного подслова не больше $d$. Поэтому слова $u$ и $v$ эквивалентны.
Пусть в алфавите $k$ букв. Тогда число слов длины не большей $d$ не превосходит $(k+1)^{d}$. Положим $n=(k+1)^{d}+1$. В любом наборе из $n$ слов найдутся два, $M$-эквивалентные одному и тому же слову длины не большей $d$ и, тем самым, эквивалентные друг другу. Поэтому множество допустимых слов регулярно.
60. а) Пусть $S$ - максимальное множество слов, из которых никакие два не $M$-эквивалентны. Тогда любое другое слово эквивалентно какому-то слову из $S$. Построим конечный автомат. Возьмём $S$ в качестве множества вершин графа. Для всех $s \in S, a \in A$, проведём из вершины $s$ стрелку, помеченную $a$, в вершину, $M$-эквивалентную $s a$. В полученном графе назовём начальной вершиной ту, которая $M$-эквивалентна пустому слову, а принимающими вершинами - все слова из $S$, которые принадлежат $M$. Легко видеть, что построенный конечный автомат принимает те и только те слова, которые принадлежат $M$.
б) Любому слову отвечает путь по стрелкам конечного автомата. Ясно, что если для двух слов такие пути заканчиваются в одной вершине, то слова $M$-эквивалентны, где $M$ - множество принимаемых автоматом слов. Поэтому в качестве $n$ из определения регулярного множества можно взять число, на единицу большее числа вершин в автомате.
61. Рассмотрим конечный автомат ( $\Gamma, v_{0}, W$ ), принимающий множество $M$. Для каждой вершины $v$ этого конечного автомата обозначим через $T_{v}$ множество слов, для которых соответствующие пути по графу $\Gamma$ заканчиваются в $v$.
Далее, для каждой вершины $v$ и каждой буквы $а$ обозначим через $U(v, a)$ множество таких вершин $u$ графа $\Gamma$, что из $u$ в $v$ идёт стрелка, помеченная $a$. Тогда выполнены следующие равенства:
$$
T_{v_{0}}(x)=1+\sum_{a \in A} \sum_{u \in U\left(v_{0}, a\right)} x T_{u}(x)
$$
$$
T_{v}(x)=\sum_{a \in A} \sum_{u \in U(v, a)} x T_{u}(x)
$$
для $v \neq v_{0}$.
Перенумеруем вершины графа $\Gamma$, начиная с $v_{0}: V=\left\{v_{0}, v_{1}, v_{2} \ldots, v_{k}\right\}$. Заметим, что каждое из равенств (1), (2) можно воспринимать как уравнение вида
$$
\left(1+x P_{i}(x)\right) T_{v_{i}}(x)=\sum_{j \neq i} x Q_{i j}(x) T_{v_{j}}(x)+R_{i}(x)
$$
где $P_{i}(x), Q_{i j}(x), R_{j}(x)$ - некоторые известные многочлены, относительно неизвестных рядов $T_{v_{0}}(x), \ldots, T_{v_{k}}(x)$.
Попробуем решить уравнения (3). Выразим из последнего уравнения $T_{v_{k}}(x)$ через остальные неизвестные ряды,
$$
T_{v_{k}}(x)=\sum_{j \neq k} x \frac{Q_{k j}(x)}{\left(1+x P_{k}(x)\right)} T_{v_{j}}(x)+\frac{R_{k}(x)}{\left(1+x P_{k}(x)\right)}
$$
подставим это выражение вместо $T_{v_{k}}(x)$ в остальные уравнения, и домножим их все на $\left(1+x P_{k}(x)\right)$. Мы получим уравнения того же вида, но число их (как и число неизвестных) станет на единицу меньше. Проделав то же самое для $T_{v_{k-1}}(x), T_{v_{k-2}}(x)$, и т. д., мы получим в конце концов выражение для $T_{v_{0}}(x)$ в виде отношения двух многочленов. Подставив его в выражение для $T_{v_{1}}(x)$, получаем, что и этот ряд есть отношение двух многочленов. Продолжая этот процесс, получаем выражения того же вида для всех $T_{v_{i}}(x)$. Осталось заметить, что $M(x)=\sum_{v \in W} T_{v}(x)$.
62. Для каждого слова $v$ обозначим через $v^{o p p}$ слово, состоящее из тех же букв в противоположном порядке. Для каждого множества слов $M$ положим $M^{o p p}=\left\{v^{o p p} \mid v \in M\right\}$. Ясно, что $M^{o p p}(x)=M(x)$ для любого $M$. Если $L$ - язык с множеством запретных слов $B$, то через $L^{\text {opp }}$ мы обозначаем язык с множеством запретных слов $B^{\text {oрр }}$.
Вернёмся к задаче. Очевидно, что $M_{w}^{o p p}$ - это множество допустимых слов языка $L^{o p p}$, начинающихся с подслова, равного $w^{o p p}$. Это множество регулярно (доказательство аналогично решению задачи 59). Поэтому ряд $M_{w}(x)=M_{w}^{o p p}(x)$ равен отношению двух многочленов.
На самом деле, множество $M_{w}$ тоже регулярно, но доказательство этого заняло бы больше места.
# How to count words?
Dmitri Piontkovski, Maxim Prasolov, Grigory Rybnikov
## 1 Main problem
Problem 1. The language of Winnie-Pooh tribe has 100 words. All possible combinations of these words, in any order, are used as sentences of the language. The are two magic spells, "Earth stands on Great Crocodile" and "Every evening Crocodile swallows Sun", that cause tornado. That is why it is not allowed to pronounce sentences that contain the above sequences of words ${ }^{1}$. How many sentences of 20 words in this language are allowed?
Problem 2. A computer uses 256 commands. There is a sequence of four commands that breaks the computer. The programmers made all possible programs of 7 commands. Find the percentage of the programs that do not break the computer. ${ }^{2}$
Problem 3 (Main Problem). The alphabet of a language $L$ consists of $N$ letters. Several words $v_{1}, \ldots, v_{k}$ are called forbidden and are not used in the language. A word (that is, a finite sequence of letters) is called admissible if no part of it is a forbidden word. Find the number of admissible words of $n$ letters in $L$.
Problem 4. Show that the Problems 1 and 2 are special cases of Problem 3.
## 2 How to write down the answer?
Choose an alphabet $A$ of $N$ letters (for example, if $A=(a, b, c, \ldots, z)$, then $N=26)$. By a word we will mean an arbitrary finite sequence of letters of the alphabet $A$. A part of a word is called its subword.
We assume that every language $L$ has exactly one word of zero length, that is, an empty word.
We assume that distinct forbidden words are not subwords of each other. We also assume that each forbidden word has at least two letters, that is, the empty word and one-letter words are admissible. Recall that the set of forbidden words is finite.
Problem 5. The free language $F_{A}$ over the alphabet $A$ is the language with no forbidden words. Prove that the number of the words of $n$ letters in this language is equal to $N^{n}$.
Problem 6. Let $B$ be the language whose forbidden words are all two-letter words with different letters. Prove that the number of admissible words of $n$ letters in the language $B$ is equal to $N$ for any positive integer $n$.
Let $M$ be an arbitrary set of words. Let us denote by $m_{n}$ the number of $n$-letter words in this set. The infinite sum
$$
M(x)=m_{0}+m_{1} x+m_{2} x^{2}+m_{3} x^{3}+\ldots
$$
is called the dimension series of the set $M$. The infinite sums of such type (with arbitrary numbers as coefficients $m_{n}$ ) will be briefly referred to as series (their complete name, which will not be used here, is formal power series).
For any language $L$, by its dimension series $L(x)$ we will mean the dimension series of the set of admissible words. For example, for the free language $F_{A}$ its dimension series is the geometric series $F_{A}(x)=1+N x+N^{2} x^{2}+N^{3} x^{3}+\ldots$, and for the language $B$ above we have $B(x)=1+N x+N x^{2}+N x^{3}+\ldots$
Problem 7. Write down the dimension series for the language over the alphabet $\{a, b\}$ with forbidden words aa and $b b$.
## 3 The arithmetics of languages
If a set $M$ contains finitely many words, then its dimension series is a polynomial in the variable $x$. For infinite sets, their dimension series are infinite as well, but they allow various arithmetic operations similar to the operations over the polynomials, that is, addition, subtraction, multiplication by each other and by numbers, and even sometimes division
In the definitions and problems of this section, $S=s_{0}+s_{1} x+s_{2} x^{2}+\ldots$ and $R=r_{0}+r_{1} x+r_{2} x^{2}+\ldots$ are two series, and $L_{1}$ and $L_{2}$ are two languages over alphabets $A_{1}$ and $A_{2}$ without common letters. We will assume that the alphabet $A_{1}$ consists of upper-case letters while the alphabet $A_{2}$ consists of lower-case ones. Let the alphabet $A$ be the union of the alphabets $A_{1}$ and $A_{2}$, that is, $A$ contains both upper-case and lower-case letters.[^2]
Definition 1. a) The sum of two series $R$ and $S$ is the series
$$
R+S=\left(s_{0}+r_{0}\right)+\left(s_{1}+r_{1}\right) x+\left(s_{2}+r_{2}\right) x^{2}+\ldots
$$
b) The sum of two languages $L_{1}$ and $L_{2}$ is the language $L_{1}+L_{2}$ over $A$ whose set of admissible words is the union of the sets of admissible words of the languages $L_{1}$ and $L_{2}$.
Problem 8. Define the language $L_{1}+L_{2}$ by a finite set of forbidden words.
Problem 9. Prove that if $L=L_{1}+L_{2}$, then
$$
L(x)=L_{1}(x)+L_{2}(x)-1
$$
The product of two series is defined by the same way as the product of two polynomials.
Definition 2. The product of a series $R$ by a monomial ax ${ }^{n}$ is the series
$$
R \cdot a x^{n}=a r_{0} x^{n}+a r_{1} x^{n+1}+a r_{2} x^{2} x^{n+2}+\ldots
$$
The product of two series $R$ and $S$ is the sum
$$
R \cdot S=R \cdot s_{0}+R \cdot s_{1} x+R \cdot s_{2} x^{2}+\ldots
$$
Note that this infinite sum of series is well-defined because the coefficient of every power of $x$ is a finite sum of numbers.
Problem 10. Prove that
$$
(1-x) \cdot\left(1+x+x^{2}+\ldots\right)=1
$$
Definition 3. The product of two sets of words $M$ and $N$ is the set $M N$ of all words of the form $m n$, where $m$ is a word in $M$ and $n$ is a word in $N$.
The product of two languages $L_{1}$ and $L_{2}$ is the language $L_{1} \cdot L_{2}$ over $A$ whose set of admissible words is the product of the sets of admissible words of the languages $L_{1}$ and $L_{2}$.
Problem 11. Define the language $L_{1} \cdot L_{2}$ by a finite set of forbidden words.
Problem 12. Prove that
$$
L(x)=L_{1}(x) \cdot L_{2}(x)
$$
The division of series has no version for languages, but it helps to write down their dimension series in a compact form. It is defined by a formula similar to the formula for the sum of an infinite geometric progression.
Definition 4. Suppose that a series $S$ begins with the unit, that is, $s_{0}=1$, and $S=1+\bar{S}$, where $\bar{S}=s_{1} x+s_{2} x^{2}+\ldots$ Then its inverse is the series
$$
\frac{1}{S}=1-\bar{S}+\bar{S}^{2}-\bar{S}^{3}+\ldots
$$
The quotient of two series $R$ and $S$ is the series
$$
\frac{R}{S}=R-R \cdot \bar{S}+R \cdot \bar{S}^{2}-R \cdot \bar{S}^{3}+\ldots
$$
In general, the quotient of two dimension series can not be obtained as the dimension series for a language. For example, some of the coefficients of the quotient can be negative.
Problem 13. a) Prove that
$$
S \cdot \frac{R}{S}=R
$$
b) Prove that if $S \cdot T=R$, where the series $S$ begins with the unit, then $T=\frac{R}{S}$.
The use of the division of two series is that it helps to represent many infinite series by a finite formula, that is, a quotient of two polynomials.
Problem 14. a) Prove that
$$
F_{A}(x)=\frac{1}{1-N x}
$$
b) Represent the dimension series from Problems 6 and 7 as a quotient of two polynomials.
Problem 15. Prove that the dimension series of any language can be represented as a quotient of two polynomials.
Thus, the answer to our Main Problem should be represented as a quotient of two polynomials.
## 4 Free word
Problem 16. Let $L$ be a language over the Latin alphabet with only one forbidden word "mouse". Find $L(x)$.
Definition 5. Let $a$ and $b$ be words such that no one is a subword of each other. A nonempty word $c$ is called an overlap of $a$ and $b$ if it is a beginning subword of $a$ and, in the same time, the final subword of $b$ (for example, the word "all" is an overlap of the words "ball" and "allow").
A word $w$ is called free if it has no overlaps with itself except for the whole word $w$ (e.g., the word "free" is free but the word "underground" is not).
Problem 17. Suppose that in a language $L$ over an alphabet $A$ of $N$ letters there is a single forbidden word, which is free and consists of $m$ letters. Prove that
$$
L(x)=\frac{1}{1-N x+x^{m}}
$$
Problem 18. Solve Problem 2 under the addition assumption that the sequence of commands breaking the computer is a free word.
## 5 Transformations of words
Definition 6. Let $M$ and $M^{\prime}$ be two sets of words. Let us divide the set $M$ in two parts $K$ and $L$. A function $f$ mapping $L$ to a subset $I$ of $M^{\prime}$ is called a transformation of the set $M$ to the set $M^{\prime}$ if $f$ preserves lengths of words and is a one-to-one map of $L$ onto $I$.
In this case, the set $K$ is called the kernel of the transformation $f$ and the set $I$ is called the image of $f$.
A transformation will be denoted by an arrow: $M \Longrightarrow M^{\prime}$.
Definition 7. A sequence of transformations
$$
M_{1} \Longrightarrow M_{2} \Longrightarrow \ldots \Longrightarrow M_{n}
$$
is called exact if the kernel of each subsequent transformation coincides with the image of the previous one.
Problem 19. Let $L$ be a language over an alphabet $A$, let $G$ be the set of admissible words, and let $N$ be the set of all non-admissible words. Construct an exact sequence of transformations
$$
\emptyset \Longrightarrow N \Longrightarrow F_{A} \Longrightarrow G \Longrightarrow \emptyset
$$
where $F_{A}$ is the set of admissible words of the free language, that is, the set of all words over the alphabet A, and $\emptyset$ denotes the empty set.
Problem 20. 10 boys and 10 girls are sitting in a line so that boys' neighbors are girls and vice versa; their teacher is sitting next to them. Each of the children has some bonbons, and the total number of the boys' bonbons is equal to the total number of the girls' ones. The first boy gives all his bonbons to the girl sitting next to him. The girl eats all these bonbons, then she eats the same number of her own bonbons, and then she gives the rest of her bonbons to the next boy. He does the same (eats and gives the rest of bonbons to the next girl), then the next girl does the same, and so on. The last girl gives the rest of her bonbons to the teacher. How many bonbons does the teacher get?
Problem 21. Let
$$
\emptyset \Longrightarrow M_{1} \Longrightarrow M_{2} \Longrightarrow \ldots \Longrightarrow M_{n} \Longrightarrow \emptyset
$$
be an exact sequence of transformations.
) Prove that if each set $M_{i}$ consists of a finite number $m_{i}$ of words, then
$$
m_{1}+m_{3}+m_{5}+\cdots=m_{2}+m_{4}+\ldots
$$
b) Prove the following formula for the dimension series:
$$
M_{1}(x)+M_{3}(x)+M_{5}(x)+\cdots=M_{2}(x)+M_{4}(x)+\ldots
$$
Definition 8. A set $M$ of words is called free if no word in $M$ is a subword of another word in $M$, all words in $M$ are free, and the words in $M$ have no overlaps with each other.
Problem 22. Let $L$ be a language over an alphabet $A$, and let the set $B$ of forbidden words of $L$ be free. Denote the set of all admissible words by $G$ and the set of all nonempty admissible words by $\bar{G}$. Construct an exact sequence of transformations
$$
\emptyset \Longrightarrow B \cdot G \Longrightarrow A \cdot G \Longrightarrow \bar{G} \Longrightarrow \emptyset
$$
Problem 23. Let $L$ be a language over an alphabet $A$ of $N$ letters, and let the set $B$ of forbidden words of $L$ be free. Prove the formula
$$
L(x)=\frac{1}{1-N x+B(x)}
$$
Problem 24. Prove that the set of magic spells in Problem 1 is free, and solve the problem.
Problem 25. Find $L(x)$ provided that the alphabet of the language $L$ is Latin and the forbidden words are veni, vidi, vici.
Definition 9. Let $L$ be a language. A simple linkage is a word $v=s t r$, where $s, t, r$ are nonempty words such that the words $g=s t$ and $f=t r$ are forbidden and there are no other forbidden subwords in $v$. The end $r$ of the simple linkage (which is produced by cutting off the first forbidden subword $g$ ) is called the tail of $v$.
Problem 26. Prove that the set of forbidden words of a language is free if and only if there are no simple linkages in it.
Problem 27. Let $L$ be a language over an alphabet $A$, let $B$ be its set of forbidden words, and let $S$ be the set of all simple linkages. Denote the set of all admissible words by $G$ and the set of all nonempty admissible words by $\bar{G}$. Construct an exact sequence of transformations
$$
S \cdot G \Longrightarrow B \cdot G \Longrightarrow A \cdot G \Longrightarrow \bar{G} \Longrightarrow \emptyset
$$
Problem 28. Find the conditions on the set of forbidden words of a language $L$ under which the exact sequence from Problem 27 could be extended to an exact sequence
$$
\emptyset \Longrightarrow S \cdot G \Longrightarrow B \cdot G \Longrightarrow A \cdot G \Longrightarrow \bar{G} \Longrightarrow \emptyset
$$
(such languages are called non-tangled). Give a formula to express the dimension series $L(z)$ of a non-tangled language in terms of the number $N$ of letters and the dimension series of the sets $B$ and $S$.
Problem 29. Find the dimension series of the language over the alphabet $\{a, b, c\}$ with forbidden words abb, bbc, bac.
Problem 30. Find the dimension series of the language over the alphabet $A=\left\{x_{1}, \ldots, x_{n}, y_{1}, \ldots, y_{n}, z_{1}, \ldots, z_{n}\right\}$, if the forbidden words are the words of the form $x_{i} y_{j}$ and $y_{j} z_{k}$, where $1 \leq i, j, k \leq n$.
Problem 31. Prove that if the set of forbidden words of a non-tangled language consists of a single word, then this set is free.
## 6 Free sets revisited
Problem 32. Construct an infinite free set over an alphabet of two letters.
Problem 33. Suppose that the set of forbidden words $B$ of a language $L$ is free and the alphabet has more than one letter. Prove that the set of admissible words of the language is infinite.
Definition 10. Let $S=s_{0}+s_{1} x+s_{2} x^{2}+\ldots$ and $R=r_{0}+r_{1} x+r_{2} x^{2}+\ldots$ be two series. If the inequality $s_{k} \geq r_{k}$ holds for any $k$, then we say that the following inequality for the series holds:
$$
S \geq R
$$
Problem 34. Prove that if series $P, Q$, and $R$ satisfy the inequalities
$$
P \geq Q \text { and } R \geq 0
$$
then
$$
P R \geq Q R
$$
Problem 35. Suppose that for every $d>0$ the sets $B$ and $B^{\prime}$ of forbidden words of the languages $L$ and $L^{\prime}$ over the same alphabet $A$ contain the same number of words of length $d$, so that $B(z)=B^{\prime}(z)$. Prove that if the set $B$ is free, then the inequality
$$
L^{\prime}(z) \geq L(z)
$$
holds; in addition, we have $L^{\prime}(z)=L(z)$ if and only if the set $B^{\prime}$ is also free.
Problem 36. Suppose that the alphabet consists of two letters and the set $B$ contains at least two words, including a word $w$ of length 2 .
a) Prove that the set $B$ is not free.
b) Is it possible that $B$ is free if $w$ is of length 3?
Problem 37. Suppose that an alphabet consists of $n$ letters and $B$ consists of $g$ two-letter words. Prove that if $g \leq n^{2} / 4$, then the set $B$ may be chosen to be free.
Problem 38. Prove that if $n=k d$ and $m \leq k^{d}(d-1)^{d-1}$, where the numbers $d, k, m, n$ are positive integers, then, over an alphabet of $n$ letters, one can choose a free set consisting of $m$ words of length $d$.
Problem 39. ) Prove that, if $B$ is a free set over an alphabet of $n$ letters, then there is the following inequality
$$
\frac{1}{1-n x+B(x)} \geq 1
$$
b) Is the converse true, that is, is it true that if the inequality
$$
\frac{1}{1-n x+p(x)} \geq 1
$$
holds for a positive integer $n$ and a polynomial $p(x)$ whose coefficients are positive integers and whose constant term is zero, then there exists a free set $B$ over an alphabet of $n$ letters, with $B(x)=p(x)$ ?
Problem 40. Let $n$ be a positive integer and let $p(x)$ be a polynomial with positive integer coefficients and zero constant term. Prove that there exists a free set $B$ with dimension series $B(x)=p(x)$ if and only if there exist two polynomials $f$ and $g$ with nonnegative integer coefficients with $f(0)=g(0)=0$ such that
$$
(1-f)(1-g) \geq 1-n x+p(x)
$$
Problem 41. ${ }^{3}$ Find a condition describing possible dimension series of the sets of forbidden words for non-tangled languages (like we described dimension series of free sets in problem 40 ).
## 7 Words and chains
Definition 11. Let $L$ be a language. Chains of length one are the forbidden words, and chains of length 2 are the simple linkages. Next, one can define the chains of length 3, 4 etc. Namely, a word $v=\operatorname{str}$ (where all the words $s, t, r$ are nonempty) is called a chain of length $n$ if its initial subword $g=s t$ is a chain of length $n-1$, the final subword $f=t r$ is a forbidden word, where $t$ is a subword of the tail $p$ of the chain $g$, and there are no other forbidden subwords but $f$ in the final subword $p r$. The tail of the chain $v$ is the word $r$.
A chain looks as follows (each arc denotes a forbidden subword in the chain):

The length of the chain is the number of arcs. The only overlaps are of neighboring arcs (and the overlaps of neighboring arcs are non-empty). The emphasized two final tails do not contain any forbidden subword but the last arc.
For example, if the only forbidden word is $a b a$, then the only chain of length one is $a b a$, the only chain of length two is ababa, the only one of length 3 is $a b a b a b a$, etc.
Problem 42. Suppose that the forbidden words in a language $L$ are the words "tournament", "of", "towns". Write up all chains of length $n$.
Problem 43. Antichains of length $n$ are defined in the same way as chains of length $n$, with the only difference that we read words of $L$ in Definition 11 "from right to left", i.e., the tail of an antichain is to the left, and the initial antichain of length $n-1$ is to the right. Prove that the sets of length $n$ chains and length $n$ antichains coincide.
Problem 44. Prove that a chain of length $n$ contains no other chain of length $n$ as a subword.
Problem 45. Prove that if a word is decomposed as $w=g c$, where $g$ is an admissible word and $c$ is a chain, then, if in addition the length of $c$ is greater than 1, w has exactly two decompositions of this form, and the lengths of the chains in these decompositions differ by 1 .
The next problem gives a way to solve the Main Problem.
Problem 46. Let $L$ be a language over an alphabet $A$. Let $G$ be the set of its admissible words and $\bar{G}$ the set of all nonempty admissible words. Let $C_{1}$ be the set of chains of length one, $C_{2}$ the set of chains of length 2, and so on.
Prove that
$$
L(x)=\frac{1}{1-N x+C_{1}(x)-C_{2}(x)+C_{3}(x)-\ldots}
$$[^3]
Problem 47. Find the dimension series for the language in Problem 42.
Problem 48. Find all possible answers to Problem 2 depending on the form of the breaking sequence.
Problem 49. We say that a subword $c$ of a word $w$ is its maximal subchain if $w$ can be decomposed as $w=g c u$, where $g$ is an admissible word and $c$ is a chain, and for any other decomposition $w=g c^{\prime} u^{\prime}$ with another chain $c^{\prime}$ the word $c^{\prime}$ is always a subword of c. Prove that any non-admissible word has a single maximal subchain of odd length.
Problem 50. Let $L$ be a language over an alphabet $A$, and let $A^{\prime}$ be a new alphabet which extends $A$ by one additional letter. Let $L^{\prime}$ be a language over $A^{\prime}$ with the same list of forbidden words as L. Prove that
$$
L^{\prime}(x)=\frac{1}{\frac{1}{L(x)}-x}
$$
Problem 51. A language $W$ is called the free product of languages $L$ and $L^{\prime}$ over disjoint alphabets $A$ and $A^{\prime}$ if the alphabet of $W$ is the union of the alphabets $A$ and $A^{\prime}$ and the set of forbidden words is the union of the sets of forbidden words of $L$ and $L^{\prime}$. Express the dimension series of the free product $W$ in terms of the dimension series of $L$ and $L^{\prime}$.
Problem 52. Suppose that all forbidden words of a language $L$ are of two letters. Over the same alphabet, consider another language $M$ whose forbidden words are all two-letter admissible words of L. Prove that
$$
L(x) M(-x)=1
$$
## 8 Additional problems
Problem 53. Prove that there exists a free set of $m$ words of length $d$ over an alphabet of $n=k d$ letters if and only if $m \leq k^{d}(d-1)^{d-1}$ (cf. Problem 38)
a) for $d=2$;
b) for $d=3$;
c) for $d>3$.
Definition 12. A language is said to be $d$-defined if the maximal length of its forbidden words is $d$. A 2-defined language is said to be quadratic.
Problem 54. Quadratic languages $L$ and $M$ in Problem 52 are said to be dual to each other (notation: $M=L^{!}$).
a) Prove that $\left(L^{!}\right)!=L$.
b) Find $\left(L_{1}+L_{2}\right)^{\text {! }}$.
c) Describe $\left(L_{1} \cdot L_{2}\right)^{\text {!}}$.
Problem 55. Let $L$ be a d-defined language. Let us define a new language $L^{(n)}$ over the alphabet consisting of all length $n$ admissible words of $L$ as the language whose admissible words are all admissible words of $L$ whose length is a multiple of $n$ (rewritten in the new alphabet).
a) Prove that $L^{(n)}$ is defined by finitely many forbidden words.
b) Is $L^{(n)}$ always d-defined?
c) For what minimal $n$, the language $L^{(n)}$ is necessarily either quadratic or free (for all $d$-defined languages $L$ )?
Problem 56. For any quadratic language $L$ over the alphabet $x_{1}, \ldots, x_{n}$, let us define an oriented graph $\Gamma_{L}$ as follows: it has $n$ vertices labelled with $x_{1}, \ldots, x_{n}$, and there is an edge (an arrow) $x_{i} \rightarrow x_{j}$ if and only if the word $x_{i} x_{j}$ is admissible. Denote the number of admissible words of length $k$ by $a_{k}$. Prove that
a) the language $L$ is finite if and only if $\Gamma_{L}$ has no cycles;
b) the language $L$ has polynomial growth (i. e., there exist two nonzero polynomials $p, q$ of the same degree $d$ with positive leading coefficient such that $p(k) \geq a_{k} \geq q(k)$ for each $k \geq 0$ ) if and only if $\Gamma_{L}$ has a cycle but has no intersecting cycles;
c) the language $L$ has exponential growth (i. e., for some $c_{1}>c_{2}>1$ and for all $k$, we have $c_{1}^{k} \geq a_{k} \geq c_{2}^{k}$ ) if and only if $\Gamma_{L}$ has at least two intersecting cycles.
Problem 57. Let $L$ and $L^{!}$be a pair of dual quadratic languages. Is it possible that both have exponential growth?
Problem 58. For any d-defined language $L$ over the alphabet $x_{1}, \ldots, x_{n}$, we define the oriented graph $\Gamma_{L}$ as follows: its vertices are labelled with all admissible words of length $d-1$, and there is an edge (arrow) $v \rightarrow w$ if and only if there is a letter $x_{i}$ such that the word $v x_{i}$ is admissible and the last $d-1$ letters of it constitute the word $w$. Prove all properties a), b), c) in Problem 56 for $\Gamma_{L}$.
Definition 13. Let $M$ be a set over an alphabet $A$. Words $u$ and $v$ (over the same alphabet) are said to be $M$-equivalent if, for any word $w$, the words $u w$ and $v w$ either both belong to $M$ or neither of them belongs to $M$. The set $M$ is said to be regular if there is a natural number $n$ such that any set of $n$ contains two $M$-equivalent words.
Problem 59. Prove that the set of admissible words of any language is regular.
Definition 14. A finite automaton over an alphabet $A$ is an oriented graph $\Gamma$ with a finite set of vertices $V$ such that
a) the arrows are marked by the letters of the alphabet $A$, and for every vertex $v \in V$ and each letter $a \in A$, there is a unique arrow marked by $a$ whose tail is $v$;
b) an initial vertex $v_{0} \in V$ and a set of approving vertices $W \subseteq V$ are given.
Let us consider each word over the alphabet $A$ as an instruction for a trip by arrows over the finite automaton $\left(\Gamma, v_{0}, W\right)$, that is, we begin with the initial vertex, then go by the arrow marked by the first letter of the word, then follow the arrow marked by the second letter of the word, and so on. We say that the automaton approves a word if the path corresponding to the word ends with an approving vertex.
Problem 60. a) Prove that for every regular set $M$ there exists a finite automaton approving the words of $M$ and no other words.
b) Prove that for every finite automaton the set of approving words is regular.
Problem 61. Prove that for every regular set $M$ its dimension series can we represented as a quotient of two polynomials.
Problem 62. Let $L$ be a language and $M_{w}$ the set of all admissible words of $L$ which have a final subword equal to a given word $w$. Prove that the dimension series of the set $M_{w}$ can we represented as a quotient of two polynomials.
Note. Parts 1-5 were suggested before the intermediate consideration of the problems. Parts 6-8 were added after the intermediate consideration of the problems.
# How to count words?
Dmitri Piontkovski, Maxim Prasolov, Grigory Rybnikov
## Solutions
## 1 Main problem
## 1. Cf. Problem 24.
2. Cf. Problems 18 and 48.
3. One version of the solution is given in problem 46; another version can be obtained using Problems 59 and 61.
4. In Problem 1, the alphabet $A$ consists of $N=100$ words of the tribe language. The phrases of the tribe language play the role of words of $L$, and the forbidden words of $L$ are the two magic spells. In Problem 2, the alphabet $A$ consists of $N=256$ commands of the computer, and the programs play the role of words of $L$. The only forbidden word is the program of 4 commands that breaks the computer.
## 2 How to write down the answer?
5. To get an arbitrary word of $m$ letters, one choose any of $N$ letters in any of $m$ places. Multiplying the numbers of possibilities in each place, we get $N^{m}$ words.
6. If the first letter of an admissible word is $x$, then the second one is $x$ as well. It follows that each admissible word has the form $x x \ldots x$, where $x$ is one of the $N$ letters. Therefore, the number of admissible words of any given number of letters is $N$.
7. Assume that the first letter of an admissible word is $a$. Since $a a$ is a forbidden word, then the second letter is $b$. Proceeding by the same way, we get $a$ on the odd places and $b$ on the even places. Similarly, if the first letter is $b$, then we get $a$ on even places and $b$ one odd ones. Thus, the dimension series of this language is $1+2 x+2 x^{2}+2 x^{3}+\ldots$
## 3 The arithmetics of languages
8. The collection of forbidden words is the following: all forbidden words of the both languages and all words of 2 letters such that the first letter is of the first alphabet and the second one is of the the second alphabet. Obviously, the admissible word of each language do not contain a subword which is forbidden in the sum of languages. Let $w$ be a word of sum which does not contain subwords equal to the words described above. If its first letter is, say, in the first alphabet, then the subsequent letters are in the first alphabet as well, that is, each such a word consists of the letters of the same alphabet. It follows that $w$ is admissible in the language of this alphabet, thus, it is admissible in the sum.
9. The initial terms of the series $L(x)$ and $L_{1}(x)+L_{2}(x)-1$ are equal to 1 . For $n>0$, the coefficient of $x^{n}$ in the series $L_{1}(x)+L_{2}(x)-1$ is equal to the sum of the numbers of words of $n$ letters in the languages $L_{1}$ and $L_{2}$, that is, the number of words of $n$ letters in the language $L$, which is equal to the coefficient of $x^{n}$ in the series $L(x)$.
10. We have
$$
\begin{aligned}
& (1-x)\left(1+x+x^{2}+x^{3}+\ldots\right)=1-x+(1-x) \cdot x+(1-x) \cdot x^{2}+(1-x) \cdot x^{3}+\cdots= \\
& \quad=1-x+x-x^{2}+x^{2}-x^{3}+x^{3}-x^{4}+\cdots=1
\end{aligned}
$$
as required.
11. The collection of forbidden words is the following: all forbidden words of two given languages and words of two letters such that their first letter is in the second alphabet and the second one is in the first alphabet. Consider an admissible word $w$ of the product. In $w$, the letters of the second alphabet follow to the letters of the first one, therefore, $w$ has the from $w_{1} w_{2}$, where $w_{1}$ is a word of the first language and $w_{2}$ is a word of the second one. The word $w_{1} w_{2}$ do not contain subwords which are forbidden in the languages-multipliers, therefore, $w_{1}$ and $w_{2}$ are admissible in their languages, that is, the word $w_{1} w_{2}$ is admissible in the product of the languages.
12. The coefficient of $x^{k}$ in the series $L_{1}(x) \cdot L_{2}(x)=L_{1}(x) \cdot n_{0}+L_{1}(x) \cdot n_{1} x+\cdots=\left(n_{0} \cdot m_{0}+n_{0} m_{1} x+\ldots\right)+$ $\left(n_{1} m_{0} x+n_{1} m_{1} x^{2}+\ldots\right)+\ldots$ is $n_{0} m_{k}+n_{1} m_{k-1}+\cdots+n_{k} m_{0}$. The number of words of length $k$ in the set of words $L_{1} \cdot L_{2}$ is equal to the number of possibilities to get a pair of words, $m$ in $L_{1}$ and $n$ in $L_{2}$, such that the total number of letters in these words is $k$. If the word $m$ is of $i$ letters, then the word $n$ is of $k-i$ letters, so that the number of such pairs is equal to $m_{i} \cdot n_{k-i}$. Taking a sum of all such products for all $i$, one gets $n_{0} m_{k}+n_{1} m_{k-1}+\cdots+n_{k} m_{0}$. Thus, the coefficients of $x^{k}$ in two series $L_{1}(x) \cdot L_{2}(x)$ and $L_{1} \cdot L_{2}(x)$ coincide, therefore, the series itself coincide.
13. a) First let us show that the standard properties of addition and multiplication of polynomials (associativity, commutativity, distributivity) hold for series as well. For example, consider associativity relation for multiplication $(P \cdot Q) \cdot R=P \cdot(Q \cdot R)$. To compute the coefficient of $x^{k}$ in the both sides of this relation, it is enough to make computations for the same series without terms of degree higher than $k$, i.e., for polynomials. Therefore, the relation for series follows from the same relation for polynomials. The other relations are proved in the same way.
Now note that, since the series $\bar{S}$ starts with $x^{1}$, the series $R \cdot \bar{S}^{m}$ has no terms of degree less than $m$. That is why infinite sums of the form $R-R \cdot \bar{S}+R \cdot \bar{S}^{2}-R \cdot \bar{S}^{3}+\ldots$ make sense: to find the $k$ th coefficient, the sum can be replaced by a finite one. For the same reason, the sums of this type satisfy the distributivity relation
$$
R \cdot\left(S_{1}+S_{2}+S_{3}+\ldots\right)=R \cdot S_{1}+R \cdot S_{2}+R \cdot S_{3}+\ldots
$$
Having this in mind, we easily get
$$
(1+\bar{S})\left(1-\bar{S}+\bar{S}^{2}-\bar{S}^{3}+\ldots\right)=1
$$
Hence
$$
\begin{aligned}
& S \cdot \frac{R}{S}=S \cdot\left(R-R \cdot \bar{S}+R \cdot \bar{S}^{2}-R \cdot \bar{S}^{3}+\ldots\right)=S \cdot R \cdot\left(1-\bar{S}+\bar{S}^{2}-\bar{S}^{3}+\ldots\right)= \\
& \quad=R \cdot(1+\bar{S})\left(1-\bar{S}+\bar{S}^{2}-\bar{S}^{3}+\ldots\right)=R
\end{aligned}
$$
b) By the above, we have
$$
S \cdot\left(T-\frac{R}{S}\right)=S \cdot T-S \cdot \frac{R}{S}=R-R=0
$$
Assume that the series $\left(T-\frac{R}{S}\right)$ is nonzero. Since $S$ starts with 1, the first nonzero coefficient of $\left(T-\frac{R}{S}\right)$ is equal to the first nonzero coefficient of $S \cdot\left(T-\frac{R}{S}\right)$. Therefore $T-\frac{R}{S}=0$ and $T=\frac{R}{S}$.
14. a) Similarly to Problem 10, we obtain
$$
F_{A}(x)=1+N x+N^{2} x^{2}+\cdots=\frac{1}{1-N x}
$$
b) We have
$$
1+N x+N x^{2}+N x^{3}+\cdots=-N+1+N \cdot\left(1+x+x^{2}+x^{3}+\ldots\right)=-N+1+\frac{N}{1-x}=\frac{1+(N-1) x}{1-x}
$$
and
$$
1+2 x+2 x^{2}+2 x^{3}+\cdots=1+2 x \cdot\left(1+x+x^{2}+x^{3}+\ldots\right)=1+\frac{2 x}{1-x}=\frac{1+x}{1-x}
$$
15. The solution follows from Problems 59 and 61.
## 4 Free word
16. It follows from Problem 17 below that
$$
L(x)=\frac{1}{1-26 x+x^{5}}
$$
Also, one can directly obtain the above formula in a similar way as in the solution of Problem 17.
17. Let $a_{k}$ be the number of admissible words of length $k$. Clearly, $a_{0}=1$. Let us prove the recurrent relation $a_{k}=N a_{k-1}-a_{k-m}$ for $k>0$ (we have $a_{i}=0$ for $i<0$, since there are no words of negative length).
Indeed, by adding each letter of the alphabet to the beginning of each admissible word of length $k-1$, we obtain $N a_{k-1}$ words, among which are all admissible words of length $k$. Let us find which non-admissible words of length $k$ can be obtained in this way, i.e., can be written as $c g$, where $c$ is a letter and $g$ is an admissible word of length $k-1$. Clearly, the forbidden subword must stand at the beginning, so $c g=w f$, where $w$ is the forbidden word and $f$ is admissible. Since $w$ is free, we conclude that, for any admissible word $f$, the word obtained from $w f$ by cutting its first letter is admissible (otherwise $w$ would have an overlap with itself). Therefore, the set of all words of the form $c g$, where $c$ is a letter and $g$ is an admissible word of length $k-1$, is the union of two non-intersecting sets: the set of all admissible words of length $k$ and the set of all words of the form $w f$, where $f$ is an admissible word of length $k-m$. Hence we get the recurrent relation.
Consider the sum of relation $a_{0}=1$ and all relations $a_{k} x^{k}=N a_{k-1} x^{k}-a_{k-m} x^{k}$ for $k=1,2,3, \ldots$ We obtain
$$
L(x)=1+N x L(x)-x^{m} L(x)
$$
Solving this equation with respect to $L(x)$, we get the required formula.
18. According to Problem 17,
$$
L(x)=\frac{1}{1-256 x+x^{4}}=1+\left(256 x-x^{4}\right)+\left(256 x-x^{4}\right)^{2}+\left(256 x-x^{4}\right)^{3}+\ldots
$$
Here the coefficient of $x^{7}$ is $256^{7}-4 \cdot 256^{3}$. Thus, the probability of computer break is $\frac{4 \cdot 256^{3}}{256^{7}}=4 \cdot 256^{-4}$, or, approximately, $10^{-10}$.
## 5 Transformations of words
19. The first arrow is determined uniquely; the second one maps each word in $N$ to the same word regarded as an element of $F_{A}$; the third one maps each of the remaining words in $F_{A}$ to the same word as an element of $G$; the last arrow is as trivial as the first one.
20. Each of the children eats as many bonbons that belonged to boys as bonbons that belonged to girls. The last girl eats the last bonbons that belonged to boys. Thus she also eats the last bonbons that belonged to girls, and the teacher gets nothing at all.
21. a) Let $M_{\mathrm{odd}}=M_{1} \cup M_{3} \cup M_{5} \cup \ldots$ and $M_{\text {even }}=M_{2} \cup M_{4} \cup M_{4} \cup \ldots$ Each transformation establishes a one-to-one correspondence between a subset of $M_{\text {odd }}$ and a subset of $M_{\text {even }}$, besides, since both the rightmost and the leftmost sets are empty, each element participates in exactly one of these correspondences. Hence the sets $M_{\text {odd }}$ and $M_{\text {even }}$ have the same number of elements.
b) For each $k$, the set $M_{i}^{(k)}$ of words in $M_{i}$ of length $k$ is finite; by applying assertion a) to the finite sets $M_{i}^{(k)}$ with the same $k$, we conclude that the coefficient of $x^{k}$ in the left-hand side of the formula is the same as in its right-hand side. Since $k$ is arbitrary, it means that the formula is correct.
22. Let us verify that the set $A \cdot G$ is the union of two non-intersecting sets: the set $\bar{G}$ and the set $B \cdot G$. The proof, which is based on the fact that the set $B$ is free, is almost literally the same as the corresponding reasoning in the solution of Problem 17.
Now it is easy to construct the required exact sequence: the first and the last arrows are trivial, the second one maps each element of $B \cdot G$ to itself (here we use that $B \cdot G \subseteq A \cdot G$ ), and the third one maps each of the remaining elements of $A \cdot G$ to itself (here we use that $A \cdot G \backslash B \cdot G=\bar{G})$. In particular, the kernel of the second transformation is empty, and the kernel of the third transformation, which is the same as the image of the second one, is $D \cdot G$; the image of the third transformation is $\bar{G}$.
23. By Problem 21b), the exact sequence in Problem 22 implies
$$
(B \cdot G)(x)+\bar{G}(x)=(A \cdot G)(x)
$$
Note that each element of $A \cdot G$ can be uniquely written as ag, where $a \in A, g \in G$. Hence $(A \cdot G)(x)=A(x) G(x)$. Further, each element of $B \cdot G$ can be uniquely written as $b g$, where $b \in B, g \in G$, (since no forbidden word is a subword of another forbidden word). Hence $(B \cdot G)(x)=B(x) G(x)$. We have $A(x)=N x, G(x)=L(x)$, $\bar{G}(x)=G(x)-1=L(x)-1$. Therefore,
$$
B(x) L(x)+L(x)-1=N x L(x)
$$
Solving this equation with respect to $L(x)$, we get the required formula.
24. Denote the words that occur in the spells by letters: "earth" - A, "stand" - B, "on" - C, "great" $\mathrm{D}$, "crocodile" - E, "every" - F, "evening" - G, "swallow" - H, "sun" - I. Then the spells correspond to forbidden words "ABCDE" and "FGEHI". These words are free (since all letters in each of them are distinct) and have no overlaps with each other (since both the first and the last letters of the second word do not occur in the first one). Therefore, the set of spells is free, and and the dimension series for the language is
$$
L(x)=\frac{1}{1-100 x+2 x^{5}}
$$
Using this formula, it is not hard to show (see the solution of Problem 17), that $a_{k}$ (the number of sentences of $k$ words) can be computed from the initial condition $a_{0}=1$ and the recurrent relation $a_{k}=100 a_{k-1}-2 a_{k-5}$. The computations provide us with the answer $a_{20}=10^{40}-32 \cdot 10^{30}+264 \cdot 10^{20}-448 \cdot 10^{10}+16$.
25. Letter $v$ occurs only as the first letter of each forbidden word and all forbidden words are of length 4. Hence the set of forbidden words is free. By Problem 23, we have
$$
L(x)=\frac{1}{1-26 x+3 x^{4}}
$$
26. If the set of forbidden words is free, then, in particular, there are no simple linkages. Let us prove that if there are no simple linkages, then the set of forbidden words is free. Assume the contrary, i.e., that the set of forbidden words is not free. Then there is an overlap of two forbidden words, that is, there exist three nonempty words $s, t$, $r$ such that the words st and $t r$ are forbidden. Choose such a triple $(s, t, r)$ so that the length of $s t r$ be minimal. If it is not a simple linkage, then str has a forbidden subword $w$ other than st and $t r$. Note that the end of $w$ is not he end of $t r$ since otherwise either $w$ would be a subword of $t r$ or $t r$ would be a subword of $w$, which is impossible as no forbidden word is a subword of another forbidden word. Similarly, the beginning of $w$ is not the beginning of $s t$. For the same reason, the subword $w$ overlaps with both $s$ and $r$. Denote the common part of $s t$ and $w$ by $t^{\prime}$, the remaining part of $s t$ by $s^{\prime}$, and the remaining part of $w$ by $r^{\prime}$. These words are nonempty, the length of $s^{\prime} t^{\prime} r^{\prime}$ is less than the length of $s t r$, the words $s^{\prime} t^{\prime}=s t$ and $t^{\prime} r^{\prime}=w$ are forbidden. We obtain a contradiction. Thus, if there are no simple linkages, the set of forbidden words is free.
27. We construct the transformations starting from the end (from the rightmost arrow). Since the last set is empty, the domain of definition of the last transformation is also empty. Hence the image of the last but one transformation is the whole set $\bar{G}$. Since $\bar{G} \subseteq A \cdot G$, we can take $\bar{G}$ to be the domain of definition of the last but one transformation, and define the corresponding function to map each element $g \in \bar{G}$ to itself. The kernel of this transformation consists of all non-admissible words of the form $a g$, where $a$ is a letter and $g$ is an admissible word. It is readily seen that, for any word of this type, there exist a forbidden word $w$ and an admissible word $f$ such that $a g=w f$ (we already used similar reasoning in the solutions of Problems 17 and 22). So we can construct the third arrow from the right (this transformation also maps each element of its domain to itself). Consider the kernel of this transformation. It consists of those words of the form $w f$, where $w$ is forbidden and $f$ is admissible, which also have the form $a v$, where $a$ is a letter and $v$ is a non-admissible word. Choose the leftmost forbidden subword $u$ in $v$. Clearly, the subword $u$ of the word $a v=w f$ overlaps with the subword $w$ and forms a simple linkage with it. Thus the kernel of the third arrow from the right is contained in $S \cdot G$. Hence it is possible to construct transformation $S \cdot G \Longrightarrow B \cdot G$ (which also maps each element of its domain to itself).
28. By the solution of the previous problem, we see that a language is non-tangled if and only if all words of the form $r g$, where $r$ is the tail of a simple linkage and $g$ is an admissible word, are admissible. An equivalent condition for the set of forbidden words writes as follows: there exist no such words $p, q, r, s, t$, where the $p, q, s, t$ are nonempty, the words $p q, q r s$, st are forbidden, and pqrs is a simple linkage.
Note that any element of the set $S \cdot G$ can be uniquely represented as the product of a simple linkage by an admissible word (it follows easily from the definition of simple linkage and the fact that no forbidden word is a
subword of another forbidden word). In the same way as in the solution of Problem 23, for a non-tangled language $L$, we use the exact sequence to obtain the following equation:
$$
S(x) L(x)+N x L(x)=B(x) L(x)+L(x)-1
$$
whence follows the required formula
$$
L(x)=\frac{1}{1-N x+B(x)-S(x)}
$$
29. Simple linkages are $a b b c$ and $a b b a c$, and their tails are $c$ and $a c$. It is clear that none of these tails ends with the beginning of a forbidden word. Thus the language is non-tangled. Therefore, the dimension series is
$$
L(x)=\frac{1}{1-3 x+3 x^{3}-x^{4}-x^{5}}
$$
30. Simple linkages are $x_{i} y_{j} z_{k}$, where $1 \leq i, j, k \leq n$, their tails are $z_{k}$. Since no forbidden word starts with $z_{k}$, the language is non-tangled. Therefore, the dimension series is
$$
L(x)=\frac{1}{1-3 n x+2 n^{2} x^{2}-n^{3} x^{3}}
$$
31. Let $w$ be the unique forbidden word and let $L$ be its length. Suppose that $w$ is not free; let $p q r$, where $p q=q r=w$, is a simple linkage. We have $w r=p q r=p w$. Therefore, the last subword of length $L$ in each of the words $w r=p w, w r r=p w r=p p w, w r r r=p p w r=p p p w, \ldots$ is equal to $w$. Take the first word in this sequence which has length at least $2 L$. Then a word of the from $r r r \ldots r$ has the final subword equal to $w$. But this means that the word $r$ has a nonempty ending which is an initial subword of $w$. Therefore, the language under consideration is tangled (Cf. the solution of Problem 28).
## 6 Free sets revisited
32. For example, if the alphabet consists of the letters $a$ and $b$, then the set of words $a^{n} b^{n} a b$, where $n \geq 2$, is free. Let us prove this. Obviously, no two words are subwords of each other. It remains to prove that there is no nontrivial overlap (i. e., each overlap is the letter-by-letter application of a word on itself). Let $w$ is an overlap of the words $a^{n} b^{n} a b$ and $a^{m} b^{m} a b$. Then it is easy to see that $w$ has at least three letters. Since $w$ is an end of the word $a^{n} b^{n} a b$, it has the form either $b^{k} a b$ or $a^{k} b^{n} a b$, where $1 \leq k \leq n$. Because $w$ is also a begin of the word $a^{m} b^{m} a b$, we get $k=m=n$ and $w=a^{n} b^{n} a b=a^{m} b^{m} a b$ is a trivial overlap.
33. Lemma. Let $p(x)=1+p_{1} x+p_{n} x^{n}$ be a polynomial of degree $n \geq 1$. Then the series $f(x)=1 / p(x)$ cannot be a polynomial (i. e., this series has an infinite set of nonzero terms).
Proof of Lemma. Suppose (ad absurdum) that the series $f(x)$ is a polynomial, that is, $f(x)=f_{0}+f_{1} x+\ldots f_{m} x^{m}$, where the leading coefficient $f_{m}$ is nonzero. According to Problem 13 a), we have $1=f(x) p(x)=1+\left(f_{0} p_{1}+\right.$ $\left.f_{1} p_{0}\right) x+\cdots+f_{m} p_{n} x^{m+n}$, a contradiction.
Return to Problem 33. According to Problem 23, we have
$$
L(x)=\frac{1}{1-N x+B(x)}
$$
If the language $L$ was finite, the series $L(x)$ would be a polynomial, in contradiction with the above Lemma. It follows that the set of admissible words is infinite.
34. Obviously, for series $A$ and $B$ the inequality $A \geq B$ is equivalent to an inequality $A-B \geq 0$, which is equivalent to the condition that the coefficients of the series $A-B$ are nonnegative. Denote the series $P-Q$ by $A=a_{0}+a_{1} x+a_{2} x^{2} \ldots$, and the series $R$ by $R=r_{0}+r_{1} x+r_{2} x^{2} \ldots$ Then an $n$-th coefficient of the series $A R$ is given by the formula $a_{0} r_{n}+a_{1} r_{n-1}+\cdots+a_{n} r_{0}$. So, $a_{n}$ is a sum of nonnegative numbers, so that $a_{n} \geq 0$. This means that it holds an inequality $A R \geq 0$. Equivalently, we have $P R-Q R \geq 0$, or $P R \geq Q R$.
35. According to Problem 23,
$$
L(x)=\frac{1}{1-A(x)+B(x)}
$$
By Problem 27, there is an exact sequence
$$
\emptyset \Longrightarrow K \Longrightarrow B^{\prime} \cdot G^{\prime} \Longrightarrow A \cdot G^{\prime} \Longrightarrow \bar{G}^{\prime} \Longrightarrow \emptyset
$$
where $K$ is a kernel of the transformation $B \cdot G \Longrightarrow A \cdot G^{\prime}$ and $G^{\prime}$ is the set of admissible words of the language $L^{\prime}$. It follows from this exact sequence (Problem 21) that
$$
B^{\prime}(x) G^{\prime}(x)-A(x) G^{\prime}(x)+G^{\prime}(x)-1=K(x)
$$
therefore (since $B^{\prime}(x)=B(x), L^{\prime}(x)=G^{\prime}(x)$ and $K(x) \geq 0$ ),
$$
L^{\prime}(x)(B(x)-A(x)+1) \geq 1
$$
Multiplying this by the series $L(x) \geq 0$, we get (using Problem 33)
$$
L^{\prime}(x)(B(x)-A(x)+1) \cdot \frac{1}{1-A(x)+B(x)} \geq L(x)
$$
i. e.,
$$
L^{\prime}(x) \geq L(x)
$$
36. Let $A=\{a, b\}$ be the alphabet. Denote the second word by $v$. Obviously, if the words $v$ and $w$ are free, then their initial and last letters differ. If, in addition, $w$ the initial letters of the two words differ, then the last letter of $v$ coincides with the first one of $w$, and , so that the set $B$ is not free. So, it remains to consider the case when $v$ and $w$ begin with the same letter (say, a) and end with another one (b).
a) We have $w=a b$ and $v=a \ldots b$. Obviously, if the first appearing of $b$ in the word $v$ is in $k$-th place, then the subword of $v$ which consists of the $(k-1)$-th and $k$-th letters is $w$. It follows that $B$ is not free.
b) Answer: no. Let $w=a a b$ (the case $w=a b b$ is analogous, up to the right-left symmetry and the interchanging the letters). Since the word $w$ is not a subword of $v$, in $v$ the letters that follows the pair of letters $a a$ is again $a$. Since the words $v$ and $w$ have overlaps, $v$ cannot begin with $a b$, i. e., $v$ begins with $a a$. Therefore, the 3rd letter of $v$ is $a$, as well as the 4 th etc. It follows that $v=a a \ldots a$, a contradiction.
37. It is sufficient to show that there exist a free set $B$ of $g=\left[n^{2} / 4\right]$ two-letter words. Let $k=[n / 2]$, i. e., $n=2 k$ or $n=2 k+1$. Put $B=\left\{x_{i} x_{j} \mid 1 \leq i \leq k, k+1 \leq j \leq n\right\}$. Obviously, the set $B$ is free. Then for an even $n=2 k$, the set $B$ consists of $k^{2}=n^{2} / 4$ elements, and in the case of odd $n=2 k+1$ the set $B$ is of $k(k+1)=(n-1)(n+1) / 4=n^{2} / 4-1 / 4=\left[n^{2} / 4\right]$ elements, as required.
38. It is sufficient to show that there exist a free set $B$ of $m \leq k^{d}(d-1)^{d-1}$ words of length $d$. Let us divide the alphabet $A=\left\{x_{1}, \ldots, x_{n}\right\}$ by two subsets $P=\left\{x_{1}, \ldots, x_{k}\right\}$ and $Q=\left\{x_{k+1}, \ldots, x_{n}\right\}$. Then is es easy to see that the set $B=\left\{p q \mid p \in P, q \in F_{Q}-d-1\right\}$ is as needed.
39 .
a) According to Problem 23, $\frac{1}{1-n x+B(x)}=L(x) \geq 1$.
b) Answer: no. For example, over a 2-letters alphabet $A$ there is no such a set $B$ with $p(x)=x^{3}+x^{10}$ (it is shown in Problem 36 b). It remains to see that the series
$$
f(x)=\frac{1}{1-2 x+x^{3}+x^{10}}
$$
has nonnegative coefficients (since the initial term of the above series is 1 , the above condition is equivalent to the required inequality $f(x) \geq 1$ ). We will show that the coefficients of the series satisfy the stronger inequality $a_{n} \geq(3 / 2)^{n}$. One can provide the proof of the last inequality by induction, using the reccurent relation $a_{n+10}=$ $2 a_{n+9}-a_{n+7}-a_{n}$, which follows from the condition $\left(1-2 x+x^{3}+x^{10}\right) f(x)=1$.
Another similar example is the case $p(x)=4 x^{6}$, again over the two-letter alphabet.
40. The proof is given in Theorem 5.1 (equivalence $\mathrm{A} \Longleftrightarrow \mathrm{B}$ ) and Proposition 5.6 in the paper: David Anick, Generic algebras and $C W$-complexes, Proceedings of 1983 Conference on algebra, topology and K-theory in honor of John Moore. Princeton University, 1988, p. 247-331.
41. The question is still open.
## 7 Words and chains
42. The word "of" has not any overlaps with the other words because no words begin with the letter $\mathrm{f}$ and do not end with the letter o. There is no letter s in the word "tournament" so a chain can consist the word "towns" only as the last arc. A letter $t$ is only on the first and the last position in the word "tournament". So overlaps of the word "tournament" with itself are only "tournamentournament".
Now we find all chains: tournament, of, towns; tournamentournament, tournamentowns;... There are two chains of the length $n$ for $n>1$.
43. From the arc on the right of a chain construct an antichain leftward arc by arc. We obtain a unique antichain of the length $i$ if it exists. We prove by induction that the beginning of the $i$ th arc of the antichain lies between the beginning of the $i$ th from the right (numeration of arcs is from the right) and the end of the (i+1)th chain arcs. The first arcs of chain and antichain coincide, therefore the base of induction holds for $i=1$. Now check the induction statement for $i=2$. The second antichain arc is on the right from the second chain arc because there are not forbidden words between the first and the second antichain arcs. The beginning of the second antichain arc is on the left from the end of the third (from the right) chain arc because there is no forbidden words after the end of the third chain arc by the definition of a chain. So the base holds for $i=2$. Then we prove the induction step. Suppose the induction statement is true for $1,2, \ldots$, i. By the induction assumption the $i$ th chain arc intersects the $(i-1)$ th antichain arc, but the $(i+1)$ th antichain arc does not intersect the $(i-1)$ th antichain arc, therefore the $(i+1)$ th antichain arc is on the left from the $i$ th chain arc. Between the end of the $(i+2)$ th and the beginning of the $i$ th chain arcs no forbidden words begin, therefore the beginning of the $(i+1)$ th antichain arc is on the left from the end of the $(i+2)$ th chain arc. The $(i-1)$ th antichain is not on the left from the $(i-1)$ th chain arc, so the $(i+1)$ chain arc does not intersect the $(i-1)$ th antichain arc, but intersects the $i$ th arc. Therefore the $(i+1)$ th antichain arc is not on the left from the $(i+1)$ th chain arc. This finishes the proof.
44. Assume that a chain $c^{\prime}$ is a subword of a chain $c$. Let us prove by induction that the $i$ th $c$-arc is not on the right from the $i$ th $c^{\prime}$-arc. The statement is obvious for $i=1$. If the first arcs of considered chains coincide and the chains have the same length then their arcs coincide and so the whole chains are equal. Hence the chain $c^{\prime}$ does not start from the beginning of the word $c$. Between the first and the second $c$-arcs there is no forbidden words. Therefore the first $c^{\prime}$-arc is not on the left from the second $c$-arc and then the second $c^{\prime}$-arc is on the right from the second $c$-arc. So we proved the base for $i=2$. Now we prove an induction step. We consider two cases.
The first case. The $(i+1)$ th $c^{\prime}$-arc does not intersect the $i$ th $c$-arc. Then the $(i+1)$ th $c^{\prime}$-arc is on the right from the $(i+1)$ th $c$-arc.
The second case. The $(i+1)$ th $c^{\prime}$-arc intersects the $i$ th $c$-arc. The $(i+1)$ th $c^{\prime}$-arc does not intersect the $(i-1)$ th $c^{\prime}-$ arc, therefore by induction hypothesis the $(i+1)$ th does not intersect the $(i-1)$ th $c$-arc. Summarizing observations we obtain that by definition of chain the $(i+1)$ th $c$-arc is not on the right from the $(i+1)$ th $c^{\prime}$-arc.
The induction statement is proved and we must only consider the case when the last $c$ - and $c^{\prime}$ - arcs coincide. In this case we note that these chains as antichains (by the previous problem) have the same arcs on the right and the same length. Therefore they coincide.
45. Assume that a word is decomposed as $g c$ where $g$ is admissible word and $c$ is a chain of the length at least two. By the problem 43 the chain $c$ is also an antichain. If you reduce the chain $c$ by the beginning of the first arc and it will appear a forbidden word that is on the left from the reduced chain then the antichain $c$ can be continued to the left and we obtain a new decomposition $g^{\prime} c^{\prime}$ where the chain length is increased by one. If a forbidden word does not appear then the antichain $c$ can be reduced by the beginning of the arc on the left and we obtain a new decomposition $g^{\prime \prime} c^{\prime \prime}$ where the chain length is decreased. If the third decomposition $g^{\prime \prime} c^{\prime \prime}$ exists then note that the arcs of the antichains $c, c^{\prime}, c^{\prime \prime}$ are the same so there are two chains among them which lengths differ at least by two. But in this case the arc on the left of the longest antichain does not intersect the shortest antichain and we have a contradiction.
46. We will apply the problem 21 for an exact sequence
$$
\ldots \Longrightarrow C_{n+1} \cdot G \Longrightarrow C_{n} \cdot G \Longrightarrow C_{n-1} \cdot G \Longrightarrow \ldots C_{1} \cdot G \Longrightarrow A \cdot G \Longrightarrow \bar{G}
$$
Let us construct this sequence. Choose a word $c g$ from $C_{n} \cdot G$. Add a tail of the chain $c$ to the beginning of the word $g$ and obtain a decomposition $c^{\prime} g^{\prime}$. If $g^{\prime}$ is an admissible word then the word $c^{\prime} g^{\prime}$ belongs to $C_{n-1} \cdot G$. If $g^{\prime}$ contains a forbidden word then the chain $c$ can be continued to the right to the chain $c^{\prime \prime}$, the rest of the word denote by $g^{\prime \prime}$. Then the word $c^{\prime \prime} g^{\prime \prime}$ belongs to $C_{n+1} \cdot G$. A chain can be continued in unique way in the word, so the constructed maps are biunique on the parts of $C_{n} \cdot G$.
The arrows $C_{1} \cdot G \Longrightarrow A \cdot G \Longrightarrow \bar{G} \Longrightarrow \emptyset$ are the same as in the problem 27. By the problem 21 ,
$$
1-L(x)\left(1-N x+C_{1}(x)-C_{2}(x)+C_{3}(x)-\ldots\right)=0
$$
So we obtain the formula.
47. By the problem $42 C_{1}(x)=x^{2}+x^{5}+x^{10}, C_{n}(x)=x^{9(n-1)}\left(x^{5}+x^{10}\right)$. By the formula from the problem 46
$$
\begin{aligned}
L(x)=\frac{1}{1-26 x+x^{2}+\left(x^{5}+x^{10}\right)\left(1-x^{9}+x^{18}-\ldots\right)}=\frac{1}{1-26 x+x^{2}+\frac{x^{5}+x^{10}}{1+x^{9}}}= \\
\quad=\frac{1+x^{9}}{1-26 x+x^{2}+x^{5}+x^{9}-25 x^{10}+x^{11}}
\end{aligned}
$$
48. Consider four cases of a forbidden word of four letters.
1) The forbidden word is of the form aaaa. In that case $C_{2 n}=x^{4 n+1}, C_{2 n-1}=x^{4 n}$. By the formula in the problem 46
$$
\begin{aligned}
L(x)=\frac{1}{1-256 x+x^{4}-x^{5}+\ldots}=\frac{1}{1-256 x+\frac{x^{4}-x^{5}}{1-x^{4}}} & =\frac{1-x^{4}}{1-256 x+255 x^{5}}= \\
& =\left(1-x^{4}\right)\left(1+\left(256 x-255 x^{5}\right)+\left(256 x-255 x^{5}\right)^{2}+\ldots\right)
\end{aligned}
$$
Then a coefficient of $x^{7}$ equals to $256^{7}-3 \cdot 256^{2} \cdot 255-256^{3}=256^{7}-4 \cdot 256^{3}+3 \cdot 256^{2}$.
2) The forbidden word has the form abca and at least two distinct letters. In that case $C_{n}=x^{3 n+1}$.
$$
L(x)=\frac{1}{1-256 x+x^{4}-x^{7}+\ldots}=1+\left(256 x-x^{4}+x^{7}-\ldots\right)+\left(256 x-x^{4}+x^{7}-\ldots\right)^{2}+\ldots
$$
A coefficient of $x^{7}$ equals to $256^{7}-4 \cdot 256^{3}+1$
3) The forbidden word is of the form abab. In that case $C_{n}=x^{2(n+1)}$.
$$
L(x)=\frac{1}{1-256 x+x^{4}-x^{6}+x^{8}(\ldots)}
$$
A coefficient of $x^{7}$ equals to $256^{7}-4 \cdot 256^{3}+2 \cdot 256$.
4) The forbidden word is free. This case was analyzed in the problem 18 .
49. From the 46 it follows that
$$
\frac{1}{1-N x}-L(x)=L(x) \cdot C_{1}(x) \cdot \frac{1}{1-N x}-L(x) \cdot C_{2}(x) \cdot \frac{1}{1-N x}+L(x) \cdot C_{3}(x) \cdot \frac{1}{1-N x}-\ldots
$$
The left part of this equality is a dimension series of the set of inadmissible words. The right part of this equality is an alternative sum of dimension series of langugages $L \cdot C_{n} \cdot F_{A}$. One can define a map from these labguages to the set of inadmissible words and vice versa, every inadmissible word can be decomposed as $g c_{n} u$, where $g$ is admissible, $c_{1}$ is a forbidden word. But one can decompose an inadmissible word as $g c_{n} u$ in several ways. Denote the number of such decompositions of the word $w$ as $w_{n}$. So then the sum of the numbers $\left(w_{1}-w_{2}+w_{3}-w_{4}+\ldots\right)$ for all inadmissible words of the length $k$ equals to a coefficient of $x^{k}$ in the right part of the equality behind - and therefore in the left part, that is equal to the amount of inadmissible words of the length $k$.
Note that from the decomposition of the word $w$ as $g c_{n} u$ one can obtain another decomposition, in which the chain length is decreased by one, by moving a tail of $c_{n}$ to $u$. So two these decompositions will be cancel in the sum $\left(w_{1}-w_{2}+w_{3}-w_{4}+\ldots\right)$. In other words the sum $\left(w_{1}-w_{2}+w_{3}-w_{4}+\ldots\right)$ equals to the quantity of decompositions of the word $w$ as gcu where subword $c$ is a maximal chain of odd length.
Consider a decomposition of the word $w$ as $g c u$ where $c$ is a maximal chain with the most right ${ }^{1}$ arc. By the problem 45 in the word $g c$ there is a maximal chain of the length one or it can be decomposed as $g^{\prime} c^{\prime}$ where $g^{\prime}$ is admissible and $c^{\prime}$ is a chain which length differs by one from the length of the chain $c$. In both cases there is a maximal chain of odd length in the word $w$. So we showed that $\left(w_{1}-w_{2}+w_{3}-w_{4}+\ldots\right)$ is at least one. But the sum of such quantities for all inadmissible words equals to their number. So then every such quantity equals to one and in every inadmssible word there is only one maximal chain of odd length.
50. Apply the formula from the problem 46 .
$$
L^{\prime}(x)=\frac{1}{\left.1-(N+1) x+C_{1}(x)-C_{2}(x)\right)+\ldots}=\frac{1}{\frac{1}{L(x)}-x}
$$
51. Apply the formula from the problem 46.
$$
W(x)=\frac{1}{1-\left(N+N^{\prime}\right) x+\left(C_{1}(x)+C_{1}^{\prime}(x)\right)-\left(C_{2}(x)+C_{2}^{\prime}(x)\right)+\ldots}=\frac{1}{\frac{1}{L(x)}+\frac{1}{L^{\prime}(x)}-1}
$$
52. Admissible words of the language $M$ are the chains of the language $L$. Chains of the length $n$ consist of $n+1$ letters. Therefore $C_{n}(-x)=(-1)^{n+1} C_{n}(x)$. Thus we obtain $M(-x)=1-N x+C_{1}(x)-C_{2}(x)+\ldots$, i.e. $L(x) M(-x)=1$.
## 8 Additional problems
53. The existence of a free subset under the assumption $m \leq k^{d}(d-1)^{d-1}$ is established in Problems 37 and 38 . It remains to show that no such set exists for $m>k^{d}(d-1)^{d-1}$.[^4]a) If we are given $m>n^{2} / 4$ words of length two, which form a free set $S$, then the first letter of any of these words cannot coincide with the last letter of another word, i. e., there are two disjoint subsets of letters, $P$ and $Q$, whose elements may only serve as the first letter or the last letter, respectively, for a word in $S$. Let $r=|P|+|Q| \leq n$, and let $s=|P| \cdot|Q| \geq|S|=m>n^{2} / 4$. By the Viet theorem, the numbers $|P||Q|$ are the roots of quadratic equation $x^{2}-r x+s=0$, whose discriminant $D=r^{2}-4 s$ is negative under the above constrains on $r$ and $s$; hence we get a contradiction.
b) Let $B$ be a free set consisting of $m$ words of length 3 . Since no letter can be both the first and the last letter for words of the same free set, the alphabet $A$ contains two disjoint subsets $X$ and $Y$, whose element can serve as the first letter or the last letter, respectively, for a word in $B$. If there are letters that does not occur as the first or the last letter of a word in $B$, we add each of them to one of $X$ and $Y$. Without loss of generality, we assume that the number $s$ of elements of the set $X=\left\{x_{1}, \ldots, x_{s}\right\}$ is no greater than the number $t$ of elements of $Y=\left\{y_{1}, \ldots, y_{t}\right\}$. Each element $B$ has the form $x_{i_{1}} x_{i_{2}} y_{j_{1}}$ or $x_{i_{1}} y_{j_{1}} y_{j_{2}}$, and no final subword $x y$ of an element of the first type can be the beginning of an element of the second type. Let us change the set $B$ by replacing each word of the first type with a word of the second type according to the rule $x_{i} x y \mapsto x y y_{i}$, where $1 \leq i \leq s \leq t$. It is readily seen that such transformation maps no element of $B$ to another element of $B$, no distinct elements are mapped to the same one, and the resulting set $B^{\prime}$ remains free. All elements of $B^{\prime}$ are of the form $x_{i_{1}} y_{j_{1}} y_{j_{2}}$. Therefore, the number of the elements of $B^{\prime}$ (which is still $m$ ) does not exceed $s t^{2}$, whence
$$
m \leq s t^{2} \leq(n-t) t^{2} \leq\left(n-\frac{2 n}{3}\right)\left(\frac{2 n}{3}\right)^{2}=\frac{4 n^{3}}{27}=4 k^{3}
$$
as required.
c) The proof uses the following analytical
Lemma. Let $R(x)=1+a_{1} x+a_{2} x^{2}+\ldots$ be a series with positive integer coefficients. Suppose that $R(x)=1 / p(x)$ for a polynomial $p(x)$ with constant term 1. Let $R_{n}(x)=1+a_{1} x+a_{2} x^{2}+\cdots+a_{n} x^{n}$. If we have $p(x) \geq m>0$ for all $x \in\left[0, x_{0}\right]$, where $x_{0}>0$, then inequality $R_{n}\left(x_{0}\right) \leq 1 / m$ holds for each $n>0$.
Omitting the proof of the Lemma, we pass to the solution of the Problem. Let $s=m k^{-d}-(d-1)^{(d-1)}$; we need to show that no free set exists if $s>0$. Assume the contrary. Then, by Problem 39 a), the series $1 / p(x)$, where $p(x)=1-d k x+m x^{d}$, has positive integer coefficients (there can be no zero coefficients, since the series is infinite by Problem 33). Note that the polynomial $p(x)$ is positive on the segment $[0,1]$ whenever $s>0$ (proof: the minimum of this polynomial on $[0,1]$ is achieved either at an end of this segment, where $p(x)$ is positive, or at a point $x_{0}$ such that $p^{\prime}\left(x_{0}\right)=0$, i. e., at $x_{0}=\frac{1}{k(d-1)}$; then $p\left(x_{0}\right)=s x_{0}^{d}>0$ ). It means that there is a number $m>0$ such that $p(x) \geq m$ for $x \in[0,1]$. By Lemma, it follows that, for all $n$, the number of words of length at most $n$, which is $L_{n}(1)$, is bounded by the constant $1 / m$.
54. a) By definition, the forbidden words of $L$ ! are all two-letter words that are not forbidden in $L$. Hence the forbidden words of $\left(L^{!}\right)$! are all two-letter words that are not forbidden in $L^{!}$, i.e. exactly all forbidden words of $L$. Thus the alphabets and the sets of forbidden words for languages $L$ and $\left(L^{!}\right)!$are the same, hence the languages are equal.
b) Since the set of forbidden words for the language $M=\left(L_{1}+L_{2}\right)$ ! is the union of the sets of forbidden words for the languages $L_{1}^{!}$and $L_{2}^{!}$, and the alphabet of $M$ is the union of their (disjoined) alphabets, the language $M$ is the free product of $L_{1}^{!}$and $L_{2}^{!}$(see definition in Problem 51).

of the form $a B$, where $a$ is a letter of the alphabet of $L_{1}$ and $B$ is a letter of the alphabet of $L_{2}$. Hence
$$
\left(L_{1} \cdot L_{2}\right)^{!}=L_{2}^{!} \cdot L_{1}^{!}
$$
55. Let $w$ be a word of length $n k$ (where $k \geq 1$ ) over the alphabet of $L$, and let $w^{(n)}$ be the corresponding word of $L^{(n)}$. Let us break $w$ into subwords $w=w_{1} \ldots w_{k}$ each of which corresponds to a letter of the language $L^{(n)}$. It is readily seen that $w$ has a forbidden subword $u$ (which consists, by definition, of at most $d$ letters) if and only if there is a subword $w^{\prime}=w_{p} \ldots w_{p+m-1}$ such that each $w_{i}$ either is contained in the word $u$ or overlaps with it, so that the number $m$ of $n$-letter pieces in $w^{\prime}$ satisfies the inequality $m \leq s$, where
$$
s=2+\left[\frac{d-2}{n}\right]
$$
Thus any non-admissible word $w^{(n)}$ of $L^{(n)}$ contains a non-admissible word of length at most $s$, hence the language $L^{(n)}$ can be defined by a finite set of forbidden words, and the length of each forbidden word is no greater than $s$. This proves part a) of the problem.
b) Answer: not always.
Let us prove that the lengths of forbidden words of $L^{(n)}$ are less than $d$ if $d \geq 3$ and $n \geq 2$; in particular, this language is not $d$-defined, which gives a negative answer to $\mathrm{b}$ ). It suffices to prove the inequality $s0$, which is obvious under the given constrictions on $d$ and $n$.
c) Answer: $n=d-1$.
By the above, the language $L^{(n)}$ is either quadratic or free (i. e., the lengths of forbidden words do not exceed 2) under assumption $s \leq 2$, which is equivalent to inequality $2+\frac{d-2}{n}<3$, or $n>d-2$, i.e., $n \geq d-1$. On the other hand, if $n \leq d-2$, then there exists a $d$-defined language $L$ such that the language $L^{(n)}$ has forbidden words of more than three letters: for example, we can take the language $L$ over the three-letter alphabet $\{a, b, c\}$ with one forbidden word $a b c^{d-2}$.
56. See the solution of Problem 58 .
57. Answer: yes.
For example, let $A$ be an alphabet of $n \geq 2$ letters. Consider the language $L=F_{A} \cdot F_{A}^{!}$. Since $F_{A}$ has exponential growth (in the statement of Problem 55 c) we can take $c_{1}=n+1$ and $c_{2}=n$ ), and since $2 F_{A}(x) \geq L(x) \geq F_{A}(x)$, the language $L$ also has exponential growth. By Problem $53 \mathrm{c}$ ), we have $L^{!}=\left(F_{A}^{!}\right)^{!} \cdot F_{A}^{!}=L$, thus both $L$ and $L^{!}$ have exponential growth.
58. First we prove the following assertion (it is not necessary for solving Problem 56 only).
Lemma. Let $a=\left\{a_{0}, a_{1}, a_{2}, \ldots\right\}$ be a sequence such that $a_{0}=1$ and the inequalities $a_{1} \geq 2, \ldots, a_{N} \geq 2$ for some positive integer $N$. Then the sequence $a$ has polynomial (respectively, exponential) growth if and only if the corresponding inequalities in assertions b) and ) hold for all $a_{k}$ with $k \geq N$.
Proof of the Lemma. Let $M=\max _{i \leq N}\left\{a_{i}\right\}$. It is clear that if, for some polynomials $p, q$ of degree $d$, the inequalities $p(k) \geq a_{k} \geq q(k)$ hold for $k \geq N$, the inequalities $p(k)+M \geq a_{k} \geq q(k)-M$ hold for all $k$. The Lemma for the case of polynomial growth follows. Similarly, if $c_{1}^{k} \geq a_{k} \geq c_{2}^{k}$ for $k \geq N$, then $\left(M+c_{1}\right)^{k} \geq a_{k} \geq g^{k}$ for all $k$, which completes the proof of the Lemma.
Let us pass to the solution of the problem. Clearly, to get all admissible words of length $\geq d-1$, we can do the following. We start with the word at a vertex of the graph. Then we go along a path that starts at this vertex, and each time we read a letter on an edge that we pass, we add this letter to the right of our word. Clearly, different words are obtain from different paths. It is readily seen that the language is finite if and only if no path returns to the initial vertex, that is, the graph has no cycles (it proves assertion a)). It remains to consider the case when the language is finite and there is a cycle in the graph. In this case the number $a_{j}$ of words of length $j \geq d$ is equal to the number of paths of length $j-d+1$.
Assume that there are two intersecting cycles; let their lengths be $d_{1}$ and $d_{2}$, and let $v$ be their common vertex such that the edges issuing from it when we go along the two cycles are distinct (and correspond, say, to letters $x$ and $y$ ). The words that we read on edges when we walk by paths of length $k$ that start at $v$ and go along each of the cycles are distinct, hence $a_{k} \geq 2$ for all $k \geq 0$. Moreover, for each $j=(d-1)+q\left(d_{1}+d_{2}\right)+r$, where $r0$ (if $v$ is an isolated vertex), or $q_{k}^{v}=1$ for all $k$ (if $v$ is a cycle), thus the corresponding sequence is always polynomial. Let now $v$ be an initial vertex of $\Gamma_{L}^{\prime}$, from which $r$ arrows $a_{1}, \ldots, a_{r}$ issue to vertices $v_{1}, \ldots, v_{r}$ (which are not necessarily distinct). By induction, we assume that $q_{k}^{v_{i}}=b_{i}(k)$ is a polynomial with positive highest coefficient. If $v$ is an isolated vertex, then $q_{k}^{v}=\sum_{i=1}^{r} q_{k-1}^{v_{i}}$, hence this sequence is polynomial as the sum of polynomial sequences. On the other way, if $v$ is a cycle, then, before we pass along one of the edges $a_{1}, \ldots, a_{r}$ a word of any length is possible in the cycle, hence $q_{k}^{v}=\sum_{i=1}^{r}\left(\sum_{j=1}^{k} q_{k-j}^{v_{i}}\right)=\sum_{i=1}^{r}\left(\sum_{j=1}^{k} b_{i}(k-j)\right)$ is the sum of polynomials with positive highest coefficients. This completes the proof.
Note. It is possible to define the growth of any regular set in a similar way. To this end, the corresponding finite automaton is used.
59. Let $M$ be the set of admissible words. Assume that the language is $d$-defined. Let us prove that each word is $M$-equivalent to a word of no more than $d$ letters.
Indeed if a word $v$ is non-admissible, then, for any word $w$, the word $v w$ is also non-admissible. Hence all non-admissible words are equivalent. in particular, any of them is equivalent to a forbidden word, which is of length at most $d$.
Assume that $u$ is an admissible word of length greater than $d$. By $v$ denote the subword of $u$ consisting of its last $d$ letters. Let $w$ be an arbitrary word. If the word $u w$ has a forbidden subword, then this subword is contained in $v w$, since the length of any forbidden word is at most $d$. Hence the words $u$ and $v$ are equivalent.
Let the alphabet have $k$ letters. Then the number of words of length at most $d$ is no greater than $(k+1)^{d}$. Let $n=(k+1)^{d}+1$. In any set of $n$ words there exist two words that are $M$-equivalent to the same word of length at most $d$ and, thus, to each other. Therefore, the set of admissible words is regular.
60. a) Let $S$ be a maximal set of words in which no two words are $M$-equivalent. Then any other word is equivalent to one of $S$. Let us construct a finite automaton. Take $S$ as the set of vertices of the graph. For all $s \in S, a \in A$, we draw an arrow marked by $a$ from $s$ to the vertex that is $M$-equivalent to $s a$. We say that the vertex which is $M$-equivalent to the empty word is the initial vertex of the automaton, and all elements of $S$ which belong to $M$ are the approving vertices of the automaton. It is easy to see that the automaton approves a word if and only if it belongs to $M$.
b) Any word determines a path along arrows of the finite automaton. Clearly, if to words determine paths ending at the same vertex, then these words are $M$-equivalent, where $M$ is the set of all words approved by the automaton. Hence the number $n$ in the definition of regular set can be taken to be one plus the number of the vertices of the automaton.
61. Consider a finite automaton $\left(\Gamma, v_{0}, W\right)$ which approves the set $M$. For each vertex $v$ of $\Gamma$, denote the set of words for which the corresponding paths in $\Gamma$ end at $v$ by $T_{v}$.
Further, for each vertex $v$ and each letter $a$ denote by $U(v, a)$ the set of all vertices $u$ of $\Gamma$ such that there is an arrow marked by $a$ from $u$ to $v$. Then the following relations hold:
$$
T_{v_{0}}(x)=1+\sum_{a \in A} \sum_{u \in U\left(v_{0}, a\right)} x T_{u}(x)
$$
and
$$
T_{v}(x)=\sum_{a \in A} \sum_{u \in U(v, a)} x T_{u}(x)
$$
for $v \neq v_{0}$.
Let us number the vertices of $\Gamma$, starting with $v_{0}: V=\left\{v_{0}, v_{1}, v_{2} \ldots, v_{k}\right\}$. Note that each of relations (1), (2) can be viewed as an equation of the form
$$
\left(1+x P_{i}(x)\right) T_{v_{i}}(x)=\sum_{j \neq i} x Q_{i j}(x) T_{v_{j}}(x)+R_{i}(x)
$$
where $P_{i}(x), Q_{i j}(x), R_{j}(x)$ are some given polynomials, with respect to unknown series $T_{v_{0}}(x), \ldots, T_{v_{k}}(x)$.
Let us try to solve equations (3). We use the last equation to express $T_{v_{k}}(x)$ in terms of the rest series,
$$
T_{v_{k}}(x)=\sum_{j \neq k} x \frac{Q_{k j}(x)}{\left(1+x P_{k}(x)\right)} T_{v_{j}}(x)+\frac{R_{k}(x)}{\left(1+x P_{k}(x)\right)}
$$
substitute this expression instead of $T_{v_{k}}(x)$ into the remaining equations, and multiply them by $\left(1+x P_{k}(x)\right)$. Thus we obtain equations of the same form, but their number (which is also the number of unknowns) decreases by one. By doing the same for $T_{v_{k-1}}(x), T_{v_{k-2}}(x)$, etc., we obtain at last an expression of $T_{v_{0}}(x)$ as a quotient of two polynomials. By substituting it into the expression for $T_{v_{1}}(x)$, we find that this series is also a quotient of two polynomials. In this way we obtain the same for all $T_{v_{i}}(x)$. It remains to note that $M(x)=\sum_{v \in W} T_{v}(x)$.
62. For each word $v$, denote by $v^{\text {opp }}$ the word consisting of the same letters in the opposite order. For any set of words $M$, we write $M^{o p p}=\left\{v^{o p p} \mid v \in M\right\}$. Clearly, $M^{o p p}(x)=M(x)$ for any $M$. If $L$ is a language whose set of forbidden words is $B$, then by $L^{o p p}$ we denote the language whose set of forbidden words is $B^{o p p}$.
Let us return to our problem. It is clear that the set $M_{w}^{o p p}$ consists of all admissible words of $L^{o p p}$ which start with a subword equal to $w^{o p p}$. This set is regular (the proof is similar to the solution of problem 59). Hence the series $M_{w}(x)=M_{w}^{o p p}$ can be represented as a quotient of two polynomials.
The set $M_{w}$ is also regular, but the proof of this fact would take more place.

# Замощения, раскраски и плиточные группы
А.Я.Белов-Канель, И.Иванов-Погодаев, А.Малистов,
И.Митрофанов, М.Харитонов
Задачи замощения очень часто становятся в центре различных сюжетов в математике. Очень часто такие задачи решаются с помощью раскрасок. Одной из целей настоящего проекта является изучение более мощного метода, связанного с применением понятий теории групп. Попутно мы изучим, чем по сути, является раскраска в новых терминах, а также рассмотрим вопросы, как замощения могут быть полезны в самой теории групп.
Первый цикл является предварительным, это несколько задач на замощение. Второй и третий циклы являются подготовительными, тут мы разрабатываем необходимую технику нового метода. Во втором вводятся некоторые полезные понятия и изучается связь слов и путей на графах. В третьем мы вводим основные понятия теории групп. В четвертом цикле мы применяем новую технику к плиточным замощениям.
## Цикл А. Замощения и раскраски

Уголки из 3 клеток

$L$-тетрамино

$T$-тетрамино
- A1. При каких $M$ и $N$ прямоугольник $M \times N$ можно разбить на уголки из трех клеток?
- A2. При каких $M, N$ и $P$ прямоугольник $M \times N$ можно разбить на прямоугольники $P \times 1$ ?
- A3. При каких $M, N$ и $P$ прямоугольник $M \times N$ с одной добавленной клеткой можно разбить на прямоугольники $P \times 1$ ?
- A4. При каких $M, N, A, B$ прямоугольник $M \times N$ можно разбить на прямоугольники $A \times B$ ?
- A5. При каких $M$ и $N$ прямоугольник $M \times N$ можно разбить на $L$-тетрамино?
Следующая задача не решается с помощью методов раскраски, для ее решения нужно разработать более глубокие методы. Этим мы займемся в циклах $B, C, D$.
- A6**. Докажите, что если прямоугольник $M \times N$ можно замостить с помощью $T$-тетрамино, то $M$ и $N$ делятся на 4 .
## Цикл В. Подготовительный материал: слова, графы и пути
Пусть есть некоторый конечный алфавит $A$ : множество букв $\boldsymbol{a}, \boldsymbol{b}, \boldsymbol{c}, \ldots$ Из букв алфавита можно составлять слова - конечные последовательности букв, например, $\boldsymbol{a b b} \boldsymbol{c}, \boldsymbol{c}, \boldsymbol{c a b c a b c c b} \boldsymbol{b}$ и т.п. Будем называть произведением слов $A$ и $B$ слово, получающееся приписыванием слова $B$ справа к слову $A$. Таким образом, алфавит задает множество слов, с определенной на нем операцией произведения.
$N$-ой степенью слова $X$ называется слово, получающееся выписыванием слова $X N$ раз подряд.
- B1. Докажите, что если произведение слов $U$ и $V$ совпадает с произведением слов $V$ и $U$, то и $U$, и $V$ представляются в виде степеней какого-то слова $A$.
Полугруппой будем называть множество элементов с заданной на нем операцией произведения * (результатом применения операции для двух элементов является элемент из того же множества) и выполненным для любых элементов $\boldsymbol{a}, \boldsymbol{b}, \boldsymbol{c}$ свойством $\boldsymbol{a} *(\boldsymbol{b} * \boldsymbol{c})=(\boldsymbol{a} * \boldsymbol{b}) * \boldsymbol{c}$. Это свойство называется свойством ассоциативности.
Примеры. Множество натуральных чисел образует полугруппу, относительно сложения. Множество рациональных чисел образует полугруппу относительно умножения, а относительно деления - нет, так как на ноль делить нельзя.
Задаваемое алфавитом множество слов является полугруппой относительно операции приписывания одного слова к другому. (Ассоциативность, очевидно, соблюдается.) Более точно, такое множество называется свободной полугруппой.
B2. Петя и Вася составляют различные слова используя буквы $\boldsymbol{a}, \boldsymbol{b}, \boldsymbol{c}, \boldsymbol{d}, \boldsymbol{e}, \boldsymbol{f} . \mathrm{B}$ любом слове можно вычеркнуть любую из трех пар рядом стоящих букв (в любом порядке): $\boldsymbol{a}$ и $\boldsymbol{b}, \boldsymbol{c}$ и $\boldsymbol{d}, \boldsymbol{e}$ и $\boldsymbol{f}$. Также можно вставить любую из этих пар букв в любом месте слова. Например, слово dacdbeaaf можно преобразовать следующим образом: dacdbeaaf $\rightarrow$ dabeaaf $\rightarrow$ deaaf $\rightarrow$ dfeeaaf. Докажите, что каждое слово можно такими операциями привести к виду, содержащему минимальное число букв, и этот вид не зависит от того, какие операции и в каком порядке применялись.
Рассмотрим произвольное полимино. Расставим стрелки по его контуру, чтобы получился обход по часовой стрелке или против часовой стрелки. Сопоставим каждому полимино слово (последовательность букв), так чтобы стрелкам «вверх», «вниз», «вправо», «влево» отвечали буквы $\boldsymbol{U}, \boldsymbol{D}, \boldsymbol{R}, \boldsymbol{L}$ соответственно. При этом последовательность букв в слове должна соответствовать последовательности стрелок на контуре. Таким образом, каждому полимино будет соответствовать несколько слов, получающихся друг из друга с точностью до циклического сдвига.

$R R U L U L D D$

Рисунок 1 .
- B3. Опишите множества слов, соответствующие домино из двух клеток и тримино-уголку из трех клеток и различным положениям этих плиток на клеточной плоскости.
В В4. Пусть $M$ - множество слов, соответствующее различным положениям домино из двух клеток. Пусть с каждым словом из $M$ можно проводить следующие операции:
1. вставить или убрать рядом стоящие пары $\boldsymbol{R}$ и $\boldsymbol{L}$ или $\boldsymbol{U}$ и $\boldsymbol{D}$ (как в задаче B2);
2. приписать в начало слова букву $\boldsymbol{R}$, а в конец - букву $\boldsymbol{L}$, или наоборот;
3. приписать в начало слова букву $\boldsymbol{U}$, а в конец - букву $\boldsymbol{D}$, или наоборот;
4. приписывать друг к другу слова, получающиеся при таких преобразованиях.
Докажите, что тогда контур фигуры, разбиваемой на домино, можно получить при помощи этих преобразований.
Можно заметить, что: операция 1 соответствует добавлению или удалению пары путей «тудаобратно», операции 2 и $\mathbf{3}$ соответствуют возможности заменить слово на его циклический сдвиг, а операция 4 соответствует прикладыванию полимино друг к другу (с учетом того, что можно убрать куски путей «туда-обратно»). Это позволяет сформулировать необходимое условие замощения в терминах произведений слов.
- B5. Пусть возможно замощение заданной конечной области набором полимино Т. Рассмотрим начальный набор слов, соответствующих набору $\boldsymbol{T}$. Докажите, что тогда слово, соответствующее контуру области, представляется как результат применения к этому начальному набору нескольких операций произведения и замены слова на его циклический сдвиг.
В6. Приведите пример, когда слово контура получается в результате проведения операций из B5, но замощение невозможно.
Пусть теперь на плоскости есть многоугольник, разбитый на $N$ маленьких многоугольников так, что никакая вершина многоугольника разбиения не лежит внутри стороны другого многоугольника. Рассмотрим замкнутые пути, произвольной длины, проходящие по сторонам маленьких многоугольников. Будем считать, что от добавления ребра «туда-обратно» путь не меняется. Выберем какуюнибудь вершину разбиения (вершину одного из многоугольников) - точку $\boldsymbol{A}$. Произведением двух путей будем считать новый путь, получающийся, если сначала пройти первый «сомножитель», а потом второй.
В7. Рассмотрим бесконечное множество замкнутых путей начинающихся и заканчивающихся в точке $\boldsymbol{A}$. Докажите, что есть конечный набор $\boldsymbol{P}$ замкнутых путей, начинающихся и заканчивающихся в точке $\boldsymbol{A}$ и таких, что любой замкнутый путь, проходящий через $\boldsymbol{A}$ представим в виде произведения конечного числа путей из $\boldsymbol{P}$. Найдите минимальное число путей в таком наборе $\boldsymbol{P}$.
- B8. Выберем другую вершину $\boldsymbol{B}$, рассмотрим замкнутые пути, начинающиеся и заканчивающиеся в В. Докажите, что можно установить соответствие, такое что:
1. Каждому пути через $\boldsymbol{A}$ будет соответствовать свой путь через $\boldsymbol{B}$ и наоборот;
2. Произведению двух путей из А будет соответствовать путь, являющийся произведением соответствующих этим сомножителям путей из $\boldsymbol{B}$.
## Цикл С. Группы
Группой будем называть множество элементов с заданной на нем операцией произведения *, удовлетворяющей следующим свойствам:
1. Ассоциативность. Для всех $\boldsymbol{a}, \boldsymbol{b}, \boldsymbol{c}$ выполнено $\boldsymbol{a} *(\boldsymbol{b} * \boldsymbol{c})=(\boldsymbol{a} * \boldsymbol{b}) * \boldsymbol{c}$.
2. Существование единицы. Существует элемент $\boldsymbol{e}$ такой, что $\boldsymbol{a} \boldsymbol{e}=\boldsymbol{e} \boldsymbol{a}=\boldsymbol{a}$ выполнено для всех $\boldsymbol{a}$.
3. Существование обратного элемента. Для любого $\boldsymbol{a}$ существует элемент $\boldsymbol{a}^{-1}$, такой что $a a^{-1}=a^{-1} a=e$
Примеры. Множество целых чисел образует группу относительно сложения, обратным элементом является противоположный по знаку. Множество рациональных чисел (но без нуля) образует группу относительно умножения.
Группа подстановок. Три элемента можно расположить друг за другом шестью различными способами: 213, $321,132,312,231,123$. Фактически, речь идет о преобразованиях трех элементов: можно поменять местами два из них (получится 213,321 или 132), а можно сместить все три по циклу (получится 312 или 231). Можно также ничего не делать, тогда останется 123. То есть, у нас получается как бы шесть различных «действий». Если применить сначала одно такое действие, а потом - другое, результатом опять будет какое-то действие из этих шести. Например, если сначала поменять местами первые два элемента, а потом сместить все по кругу вправо на одну позицию, то получится $123 \rightarrow 213 \rightarrow 321$. То есть, все равно, что поменять местами первый и третий элементы. Эти «действия» называются подстановками. Они образуют группу относительно операции последовательного применения. В этой группе шесть элементов, единицей является тождественное преобразование 123. Это минимальная группа, где есть элементы $a$ и $b$, такие что $a b \neq b a$. Можно рассматривать группы подстановок $S_{n}$ для разных натуральных $n$.
- С0. Проверьте, что пути из задач В8 и В9 образуют группу.
Группа называется абелевой или коммутативной если для любых элементов $\boldsymbol{a}, \boldsymbol{b}$ выполнено $a b=b a$
- C1. Постройте некоммутативную группу из 8 элементов.
- C2. Докажите, что множество движений в пространстве, переводящих куб в себя, образует группу. Найдите число ее элементов.
С3. Докажите, что множество слов в алфавите $\left\{a_{1}, a_{1}^{-1}, a_{2}, a_{2}^{-1}, \ldots, a_{n}, a_{n}^{-1}\right\}$ Образует группу относительно операции приписывания (с сокращением рядом стоящих обратных букв $\boldsymbol{x}$ и $\boldsymbol{x}^{-1}$ ).
Пусть $\boldsymbol{G}$ - группа. Подгруппой называется подмножество $\boldsymbol{H} \in \boldsymbol{G}$ элементов группы, такое, что если $\boldsymbol{a}, \boldsymbol{b}$ лежат в $\boldsymbol{H}$, то $\boldsymbol{a}^{-\boldsymbol{1}}, \boldsymbol{b}^{-\boldsymbol{1}}, \boldsymbol{b} \boldsymbol{a}$ и $\boldsymbol{a} \boldsymbol{b}$ тоже лежат в $\boldsymbol{H}$. Подгруппа сама по себе тоже является группой, с той же операцией.
- С4. Докажите, что каждый элемент в группе подстановок $S_{\boldsymbol{n}}$ есть произведение нескольких независимых циклов. Опишите все подгруппы группы подстановок из пяти элементов.
Элементы $\boldsymbol{a}$ и $\boldsymbol{b}$ называются сопряэженными, если существует такой элемент $\boldsymbol{x}$, что $\boldsymbol{x} \boldsymbol{a} \boldsymbol{x}^{-\boldsymbol{1}}=\boldsymbol{b}$. Если $\boldsymbol{H}$ - подгруппа некоторой группы $\boldsymbol{G}$, то сопряженное множество $\boldsymbol{x} \boldsymbol{H} \boldsymbol{x}^{-1}$ также образует подгруппу $G$, так как $x h_{1} x^{-1} x h_{2} x^{-1}=x h_{1} h_{2} x^{-1}$.
- C5. Найдите все сопряженные подгруппы в группе подстановок из пяти элементов.
Часто одна и та же группа может быть описана различными способами. Например, элементами группы могут быть движения, переводящие многогранник в себя или подстановки из нескольких элементов, при этом само устройство группы будет одинаковым. Для описания «одинаковости» существует специальное понятие.
Группы $\boldsymbol{G}$ и $\boldsymbol{H}$ называются изоморфными, если между их элементами можно провести соответствие, обладающее следующими свойствами:
1. Для каждого элемента из $\boldsymbol{G}$ существует единственный соответствующий ему элемент из $\boldsymbol{H}$, и наоборот.
2. Если $\boldsymbol{g}_{1}, \boldsymbol{g}_{2} \in \boldsymbol{G}$ соответствуют $\boldsymbol{h}_{\boldsymbol{1}}, \boldsymbol{h}_{\mathbf{2}} \in \boldsymbol{H}$, то $\boldsymbol{g}_{1} \boldsymbol{g}_{\boldsymbol{2}}$ соответствует $\boldsymbol{h}_{1} \boldsymbol{h}_{\mathbf{2}}$.
- С6. Найдите группу подстановок, изоморфную группе движений, сохраняющих куб.
Пусть элементы некоторой группы раскрашены в несколько цветов так, что цвет произведения двух элементов зависит только от цветов сомножителей и не зависит от выбора элемента внутри цвета. То есть произведение элементов с цветами 1 и 2 всегда имеет один и тот же цвет, независимо от того, какие элементы с цветами 1 и 2 берутся.
- C7. Докажите, что множество элементов с цветом, как у единицы, образует подгруппу. Такая подгруппа называется нормалъной.
Эквивалентное определение. Подгруппа $\boldsymbol{H} \in \boldsymbol{G}$ называется нормалъной, если для любого элемента $\boldsymbol{g} \in \boldsymbol{G}$ (не обязательно принадлежащего $\boldsymbol{H}$ ) выполнено $\boldsymbol{g} \boldsymbol{H}_{\boldsymbol{g}} \boldsymbol{- 1} \in \boldsymbol{H}$. То есть, нормальная подгруппа сопряжена сама себе.
- С8. Докажите эквивалентность определений.
- C9. Найдите все нормальные подгруппы в группе подстановок $S_{4}$.
-10. Рассмотрим некоторую группу $\boldsymbol{G}$. Пусть $\boldsymbol{K}$ множество элементов вида $\boldsymbol{a}_{\boldsymbol{b}} \boldsymbol{a}^{-1} \boldsymbol{b}^{-1}$ (они называются коммутатори). Пусть $\boldsymbol{H}$ - это всевозможные произведения элементов из $\boldsymbol{K}$. Докажите, что $\boldsymbol{H}$ является нормальной подгруппой.
## Цикл D. Плиточные группы
Множество клеток на квадратной решетке будем называть связнъи, если из любой его клетки в любую другую можно попасть, переходя из клетки в клетку по стороне.
Пусть $\boldsymbol{T}$ - множество клеток на квадратной решетке, дополнение к которому связно. Если периметр $\boldsymbol{T}$ можно обойти, не проходя по одному ребру дважды, будем называть $\boldsymbol{T}$ плиткой. Теперь мы будем рассматривать замощения с помощью плиток.
Рассмотрим множество слов, соответствующих конечному набору плиток. Пусть с этим множеством можно играть в игру, как в задаче B4, то есть брать слово, приписывать в любом месте взаимообратные буквы, заменять слово на его сопряженное, а также приписывать рядом уже получившиеся слова (то есть брать произведения слов).
- D1. Докажите, что полученные описанным образом слова образуют группу.
Будем называть эту группу плиточной группой данного набора.
- D2. Пусть $\boldsymbol{C}$ - множество замкнутых путей на квадратной решетке. Докажите, что множество соответствующих этим путям слов образует группу. Также докажите, что для любого набора плиточная группа является нормальной подгруппой в группе $\boldsymbol{C}$.
- D3. Докажите, что если область $\boldsymbol{O}$ замощается набором $\boldsymbol{T}$, то слово $\boldsymbol{d} \boldsymbol{O}$, соответствующее периметру $\boldsymbol{O}$, лежит в плиточной группе $\boldsymbol{T}$.

## Замощения, раскраски и плиточные группы
- E1. Прямоугольник $m \times n$ разбит на домино. Проверьте, что какие-то две плитки образуют квадрат $2 \times 2$.
a) Каково минимальное возможное количество таких квадратиков?
b) Рассмотрим квадрат $2 \times 2$ из каких-то 2 домино. С этим квадратиком свяжем преобразование (Flip), переводящее вертикальное его разбиение в горизонтальное и наоборот. Докажите, что с помощью цепочки таких преобразований любое разбиение можно перевести в любое.

Рисунок 2 .
c*) За какое минимально возможное количество таких преобразований любое разбиение можно перевести в любое?
Определение. В дальнейшем мы ещё столкнёмся с таким преобразованиями. Назовём их флипами. Флип - это такое преобразование, при котором выбирается кусок плоскости определённого вида и меняется расстановка плиток на нём.
- E2. Прямоугольник $m \times n$ разбит на плитки $1 \times k$. Проверьте, что какие-то $k$ из них образуют квадрат $k \times k$.
a) Каково минимальное возможное количество таких квадратиков?
b) Пусть прямоугольник разбит на плитки $1 \times k$ и пусть какие-то $k$ образуют квадрат $k \times k$. Аналогично, с этим квадратиком свяжем преобразование (Flip), переводящее вертикальное его разбиение в горизонтальное и наоборот. Докажите, что с помощью цепочки таких преобразований любое разбиение можно перевести в любое.
c*) За какое минимально возможное количество таких преобразований любое разбиение можно перевести в любое?

Рисунок 3 .
- E3. а) Докажите, что центрально-симметричный выпуклый многоугольник разбивается на параллелограммы. Докажите обратное, т.е. что если выпуклый многоугольник разбивается на параллелограммы, то он центрально-симметричен.
b) Рассмотрим разбиение правильного $2 n$-угольника с единичными сторонами на ромбы с единичными сторонами. Если какие-то три таких ромба образуют шестиугольник, то одно его разбиение можно заменить на другое (см. рис. 3), и назовем это преобразование флипом. Докажите, что с помощью цепочки флипов любое разбиение можно перевести в любое.
c) За какое минимально возможное количество флипов любое разбиение можно перевести в любое?
d) Какое минимальное число шестиугольников может наблюдаться при разбиении правильного $2 n$-угольника с единичными сторонами на параллелограммы?
е) Рассмотрим разбиение правильного 6 -угольника со стороной $n$ на ромбы с единичными сторонами. Докажите, что с помощью цепочки флипов любое разбиение можно перевести в любое и найдите, за какое минимально возможное количество флипов любое разбиение можно перевести в любое.
Указание. Нарисуйте куб $n \times n \times n$ в виде кирпичной кладки. Что происходит с картинкой, если убирать кирпичи по одному?

Рисунок 4 .

Рисунок 5 .
- E4. Дана конечная прямоугольная решётка на клетчатой плоскости. У этой решётки у каждого ребра есть направление (см. рис. 4).
Условие 1. В каждую вершину входит то же количество рёбер, что и выходит.
Назовем флипом следующее преобразование: если все стрелки вокруг клетки направлены по часовой стрелке, поменяем их направление, и наоборот, если все стрелки вокруг клетки направлены против часовой стрелки, поменяем их направление. Докажите, что с помощью цепочки флипов (см. рис. 5) любое расположение стрелок, удовлетворяющее условию 1 , можно перевести в любое расположение стрелок, удовлетворяющее условию 1.
Указание. Рассмотрите функцию $h(x)$, задаваемую следующим образом: для каждой клетки $x$, у которой есть ненаправленное ребро, $h(x)=0$. Будем определять $h$ индуктивно: если для $x$ определена $h(x)$, а $y$ - соседняя с $x$ клетка по стороне, то $h(y)$ равна 0 , если у клетки $y$ есть ненаправленное ребро; 1 , если при движении из $x$ в $y$ мы пересекаем направленное ребро, идущее слева направо относительно направления движения; -1 , если при движении из $x$ в $y$ мы пересекаем направленное ребро, идущее справа налево относительно направления движения. Считайте известным, что эта функция определена корректно.

Рисунок 6 .
- E5. Рассмотрим прямоугольник $m \times n$, который замостили плитками тетрамино. Рассмотрим следующую диагональную сетку прямых (см. рис. 6). Докажите, что любое ребро, проходящее по диагоналям 2 клеток, пересекает ровно одно тетрамино, а числа $m$ и $n$ делятся на 4 .
- E6. Докажите, что с помощью флипов (см. рис. 7) любое разбиение можно перевести в любое.

Рисунок 7.

Рисунок 8 .
- E7. Такие связные плитки, что любая прямая из показанных на рисунке 8 пересекает не более одной клетки плитки, назовём р-плитками. Пусть $T_{n}$ - множество р-плиток, состоящих из $n$ клеток, а $\left|T_{n}\right|$ - количество элементов этого множества. Найдите $\left|T_{n}\right|$.

Рисунок 10 .
- E8. Докажите, что если прямоугольник $a \times b$ можно покрыть р-плитками, показанными на
a) рис. 9, b) рис. 10 , то 10 делит $a b$.
E9. Пусть $D_{n}$ - фигура, указанная на рис. 11. Докажите, что если фигура $D_{n}$ покрывается р-плитками с рис. 10 , то $n \equiv 0,4,15,19 \quad(\bmod 20)$.
E10. Сколько способов замостить доминошками а) прямоугольник $2 \times m$ ? б) ацтекский бриллиант (Aztec diamond)? (см. рис. 12)
Нас интересует покрытие фигуры $F$ в несколько слоёв плитками из некоторого набора $T$. Назовём инвариантом такую расстановку чисел в клетках, что сумма чисел, покрытых любой плиткой из набора $T$, делится на $p$. Инвариант нетривиален, если сумма чисел, покрытых фигурой $F$, не делится на $p$.
- E11. а) Докажите, что если нетривиальный инвариант существует, то нельзя покрыть $F$ плитками из $T$ так, что кратность покрытия каждой клетки сравнима с 1 по модулю $p$. б) Докажите, что если нетривиальных инвариантов нет, то такое покрытие существует.

Рисунок 11 .

Рисунок 12 .
-12. Для каких $m$ и $n$ прямоугольник $m \times n$ можно покрыть уголками из 3 клеток так, чтобы каждая клетка была покрыта одинаковое число раз?
- E13. Полуинвариантом назовём такую расстановку чисел в клетках, что сумма чисел, покрытых любой плиткой из набора $T$, отрицательная, а сумма чисел, покрытых фигурой $F$, положительная. Докажите, что а) если полуинвариант существует, то покрыть фигуру $F$ фигурами из $T$ так, что каждая клетка покрыта одинаковое число раз, нельзя; б)если полуинвариантов нет, то такое покрытие существует.
E14. Дано табло с лампочками и пульт с кнопками. Кнопка меняет состояние соединённых с ней лампочек на противоположное. а) Докажите, что количество возможных узоров является степенью двойки. б) Назовём инвариантом такой набор лампочек, что любая кнопка меняет состояние чётного числа лампочек из этого набора. Докажите, что если инвариантов нет, все лампочки можно погасить вне зависимости от начального состояния. в) Докажите, что если никакой инвариант не различает начального и конечного состояния, то можно осуществить переход из начального в конечное состояние.
E15. Назовём набор флипов полным, если любое замощение области переводится любое замощение области с помощью цепочки из этого набора флипов. Существует ли набор плиток, для которого нельзя выбрать полного набора флипов?

Рисунок 13 .
- E16*. Плоский граф разбит на области , представляющие собой 6-угольники, внутри которых нет рёбер (можно считать их плитками домино $2 \times 1$ ). У каждого ребра две стороны, снабженные стрелками. Эти две стрелки имеют противоположную ориентацию. При этом каждая область ориентирована по часовой стрелке. Разрешается взять область из двух смежных 6-угольников и преобразовать её как указано на рисунке 13. Верно ли, что из любого такого разбиения плоского графа можно получить любое другое с помощью цепочки заданого набора флипов?

## Замощения, раскраски и плиточные группы
- F1. Рассмотрим ориентированный граф, рёбра которого покрашены в два цвета, в каждую вершину входит красное и синее ребро, и выходят таких же цветов. Самосовмещением графа называется правило, которое сопоставляет каждой вершине графа какую-то другую вершину, при этом для любой вершины есть единственный прообраз. Пусть для любых двух вершин есть самосовмещение графа, сохраняющее ориентацию и цвета рёбер, переводящее первую вершину во вторую. Кроме того, если из вершины пройти три раза по синей стрелке, а потом - три раза по красной, то мы придём туда же, куда пришли бы, пройдя три раза по красной, а потом - три раза по синей. Докажите, что при замене числа «три» на «двадцать четыре» факт останется верным.

Рисунок 1. $T_{5}$
Рисунок 2. $T_{2}$
Рисунок 3. $L_{3}$
Определим область $T_{n}$ как «треугольник» со стороной $n$, составленный из шестиугольников. Также определим $L_{n}$, как $n$ шестиугольников, расположенных в ряд. (см. рис. 1-3)
- F2. Установите соответствие между фигурами на шестиугольной решетке и плитками на квадратной решетке. Расставьте стрелки двух цветов ( $a$ и $b$ ) на квадратной решетке так, чтобы слова, соответствующие плиткам $L_{n}$, давали замкнутые пути.
- F3. Придумайте раскраску (инвариант) новой квадратной решетки из F2, такую, что путям, соответствующим $L_{4}$, соответствуют нулевые значения, а фигурам $T_{n}-$ нет.
- F4. Докажите, что $T_{n}$ нельзя замостить фигурами $L_{3}$.
- F5. Найдите все значения $n$, при которых $T_{n}$ можно замостить фигурами $T_{2}$.
## Замощения, раскраски и плиточные группы
## Решения цикла $E$

Рисунок 1.
Указание к решению E1b. Доказательство проводится по индукции. Пусть вертикальная сторона прямоугольника чётной длины. Докажем по индукции, что можно поставить все плитки домино вертикально для фигуры $F$ на рис. 1 слева. Нам надо получить с помощью цепочки флипов плитку $z$. Пусть её нет и нельзя получить цепочкой флипов. Тогда имеем структуру на рис. 1 справа. Отсюда мы можем применить индукционное предположение для $F$ без $z$.
Указание к решению E2b. Аналогично E1b.
Указание к решению Е3. Нарисуйте куб $n \times n \times n$ в виде кирпичной кладки. Что происходит с картинкой, если убирать кирпичи по одному?
Указание к решению Е4. Рассмотрите функцию $h(x)$, задаваемую следующим образом: для каждой клетки $x$, у которой есть ненаправленное ребро, $h(x)=0$. Будем определять $h$ индуктивно: если для $x$ определена $h(x)$, а $y$ - соседняя с $x$ клетка по стороне, то $h(y)$ равна 0 , если у клетки $y$ есть ненаправленное ребро; 1 , если при движении из $x$ в $y$ мы пересекаем направленное ребро, идущее слева направо относительно направления движения; -1 , если при движении из $x$ в $y$ мы пересекаем направленное ребро, идущее справа налево относительно направления движения. Считайте известным, что эта функция определена корректно. Пусть расстановка стрелок $A$ мажорирует расстановку стрелок $B$, если для любого $x h_{A}(x) \geqslant h_{B}(x)$. Рассмотрим расстановку $C$ такую, что если один флип переводит её в расстановку $D$, то $C$ не мажорирует $D$. Т.к. расстановок конечное число, такая $C$ существует. Несложно доказать, что не существует такой точки $x$ на $C$, что для всех точек $y$, соседних с ней по стороне, $h(x) \geqslant h(y)$. Тогда $C$ определяется единственным образом. Значит, любую расстановку с помощью цепочки флипов можно перевести в любую другую.

Рисунок 2 .
Указание к решению E5. Пронумеруем диагонали как показано на рис. 2 справа. Пусть для всех диагоналей с номерами от 1 до $n$ утверждение доказано. Пусть для диагонали с $(n+1)$-ым номером утверждение не верно. Перебором всех возможных случаев расположения Т-тетрамино, пересекающих $(n+1)$-ую диагональ, получаем противоречие. Как следствие доказательства получаем, что $m$ и $n$ делятся на 4.

Рисунок 3 .
Указание к решению E6. Рассмотрим диагональную сетку из $E 5$. Из каждой диагонали направим ребро в сторону, где лежит бо́льшая часть тетрамино, содержащего эту сторону. Флипы $M_{1 a}, M_{1 b}$ переводят любую расстановку Т-тетрамино $A$ в $B$, если $A$ и $B$ соответствуют одинаковые расстановки стрелок. Для полученной сетки из направленных рёбер применим $E 4$. $M_{2}$ и есть флип из задачи $E 4$.
Ответ к Е7: $2^{n-1}$.
Ответ к E10а: $(m+1)$-ый член последовательности Фибоначчи $(1,1,2,3,5,8, \ldots)$.
## Решения цикла F
Решение F1. Рассмотрим последовательность из двадцати четырех ребер $a$ и двадцати четырех $b$. По условию, мы можем переставить три последних $a$ и три первых $b$. Продолжая такие перестановки, мы добиваемся требуемого.
F2 и F3 являются подготовительными пунктами для F4 и F5. Мы представим указания к решению для F4 и F5.
Решение F4 и F5. Для решения задач F4 и F5 сначала представим эти задачи для квадратной решетки. Соответствующие фигуры представлены на рисунке. Область $T_{n}$ при этом будет выглядеть как лестница (см. рисунок). Запишем слова для получившихся плиток. Итак, наша цель выяснить вопрос, принадлежат ли слова, соответствующие областям, в соответствующим плиточным группам (для $L_{3}$ и $T_{2}$ ).

Рисунок 4 .
Для этого мы воспользуемся новой идеей, предложенной Конвеем. Рассмотрим бесконечный ориентированный граф, в каждую вершину которого входит одно ребро $A$ и одно $B$, и выходит также одно ребро $A$ и одно $B$ (см. рисунок). Непосредственно можно проверить, что словам для всех возможных положений $L_{3}$ и $T_{2}$ соответствуют замкнутые пути.

Рисунок 5 .
Вычислим для путей, соответствующих положениям $L_{3}$ следующий инвариант: количество треугольных клеток, пройденных по часовой стрелке минус количество треугольных клеток, пройденных против часовой стрелки. Заметим, что это число складывается для произведений двух путей, а для $L_{3}$-путей оно равно нулю. Кроме того, инвариант не меняется при сопряжении. Значит, для всех слов из плиточной группы для $L_{3}$ этот инвариант равен нулю. В плитке $T_{n}$ количество клеток должно делиться на три, в этом случае $n \equiv 0$ или $2(\bmod 3)$. В этих случаях путям на графе для $T_{n}$ будут соответствовать ненулевые значения инварианта. Значит, соответствующие слова не могут лежать в плиточной группе для $L_{3}$ и разбиение, указанное в задаче F4 невозможно.
Для F5 будем использовать другой инвариант: количество количество шестиугольных клеток, пройденных по часовой стрелке минус количество треугольных клеток, пройденных против часовой стрелки. Этот инвариант для различных положений $T_{2}$ (уже на квадратной решетки) будет давать значения 1 или -1 . Также можно установить, что для слова $T_{n}$ инвариант будет равен $\left[\frac{n+1}{3}\right]$. Допустим, что $T_{n}$ разбивается на $m$ плиток $T_{2}$. тогда $\left[\frac{n+1}{3}\right]=m(\bmod 2)$. Кроме того, так как в $T_{n}$ ровно $n(n+1) / 2$ клеток, получаем, что $m=n(n+1) / 2 \quad(\bmod 2)$. Следовательно, $\left[\frac{n+1}{3}\right]=\frac{(n+1) n}{2} \quad(\bmod 2)$. Легко видеть, что данное соотношение не выполнено для $n \equiv 3,5,6$ или $9(\bmod 12)$. Учитывая, что $n \equiv 0$ или $2(\bmod 3)$, осталось рассмотреть случаи $n \equiv 0,2,9$ или $11(\bmod 12)$. Для этих случаев $T_{n}$ можно разбить на $T_{2}$. Построение этих разбиений оставляем читателю. Таким образом, разбиение, указанное в задаче F5 возможно только для $n \equiv 0,2,9$ или $11(\bmod 12)$.

# Pavements, colorings and tiling groups
A.Belov-Kanel, I.Ivanov-Pogodaev, A.Malistov,
I.Mitrofanov, M.Kharitonov
The problems of tiling often act as the centre of various mathematical matters. Very often such problems are solved with the help of coloring. One of the aims of this project is to study a more powerful method related to application of the notion of the group theory. Conjointly we will explore what, in essence, is the coloring in the new terms, and will also see how the tilings could be used in the group theory.
The first cycle is preliminary, it contains a few tiling related problems. The second and the third cycles are preparatory, during those we develop the necessary technique of the new method. During the second cycle some useful terms are introduced, and the relations between the words and the paths on graphs are studied. During the third cycle we introduce the basic terms of the group theory. In the fourth cycle we employ the new technique to the tiling problems.
## Section A. Tilings and colorings

A1. Find all integers $M$ and $N$ such that a rectangle $M \times N$ can be cut into 3-cells corners?
- A2. Find all integers $M, N, P$ such that a rectangle $M \times N$ can be cut into rectangles $P \times 1$ ?
- A3. Find all integers $M, N, P$ such that a rectangle $M \times N$ with one additional cell can be cut into rectangles $P \times 1$ ?
- A4. Find all integers $M, N, A, B$ such that a rectangle $M \times N$ can be cut into rectangles $A \times B$ ?
- A5. Find all integers $M, N$ such that a rectangle $M \times N$ can be cut into L-tetromino?
The following problem cannot be solved by colorings. We should develop some more powerful ideas to solve it. We shall do this in sections $B, C, D$.
- A6**. Suppose that $M \times N$ rectangle can be tiled by $T$-tetramino. Prove that $M$ and $N$ are divisible by 4 .
## Section B. Spade-work: words, graphs and paths
Let an alphabet $A$ be a set of letters $a, b, c, \ldots$ We can use these letters to arrange words which are finite sequences of these letters, for example, $a b b c, c, c a b c a b c c b b$ etc. A word is called product of two words $A$ and $B$ if it is congruent with the word $A B$ ( $B$ attached to the right of $A)$. Hence, an alphabet determines the set of words with product operation.
A word written $N$ times in a row $(\underbrace{X X \ldots X X}_{N \text { times }})$ is called $N$-power of $X$ and is denoted by $X^{N}$.
- B1. Suppose that the product $U V$ is congruent to the product $V U$. Prove that the words $U$ and $V$ are powers of some word $A$.
Consider a set of elements with some product operation $*$ (the product of two elements of the set also belongs to the set). This set is called a semigroup with respect to the $*$ operation if $\boldsymbol{a} *(\boldsymbol{b} * \boldsymbol{c})=$ $(\boldsymbol{a} * \boldsymbol{b}) * \boldsymbol{c}$ holds for all elements $\boldsymbol{a}, \boldsymbol{b}, \boldsymbol{c}$. This is associative property.
Examples. The set of integers is a semigroup with respect to the sum operation. The set of rational numbers is a semigroup with respect to the product operation. In this example we cannot change product by division because of that we cannot divide by zero.
The set of words determined by an alphabet is a semigroup with respect to the operation of attaching of one word to another. (It is clear that associative property holds.) More precisely, it is called free semigroup.
- B2. Peter and John assembly various words using the letters $\boldsymbol{a}, \boldsymbol{b}, \boldsymbol{c}, \boldsymbol{d}, \boldsymbol{e}, \boldsymbol{f}$. One can delete any of the neighboring pairs (any order) $\boldsymbol{a}$ and $\boldsymbol{b}, \boldsymbol{c}$ and $\boldsymbol{d}, \boldsymbol{e}$ and $\boldsymbol{f}$ from any word. Also, one can add any of these pairs into any part of any word. For example, we can transform the word dacdbeaaf by the following way: dacdbeaaf $\rightarrow$ dabeaaf $\rightarrow$ deaaf $\rightarrow$ dfeeaaf. Prove that any word can be transformed to the form containing the minimal number of letters. Prove that this form doesn't depend on a set of operations applied.
Consider a polimino. Let us mark the edges on the boundary of this polimino with arrows placed clockwise (together) or counter-clockwise. Let us associate any polimino with the sequence of the letters on its boundary. For "up", "down", "right", "left" arrows we shall accordingly write $\boldsymbol{U}, \boldsymbol{D}, \boldsymbol{R}, \boldsymbol{L}$ letters. At the same time, the sequence of the letters in the word must correspond to the sequence of boundary arrows. Hence, there are several words correspond to each polimino. They can be transformed one to another by the cyclic shift.

RRULULDD

Figure 1.
- B3. Describe the set of words corresponding to two-cells domino and three-cells corner trimino. (You should take into account various placements of the poliminoes on the plane.)
- B4. Let $M$ be the set of words corresponding to the various placements of the two-cells domino on the plane. Suppose that we can apply the following operations to any word in $M$ :
1. Add or delete neighboring pairs $\boldsymbol{R}$ and $\boldsymbol{L}$ или $\boldsymbol{U}$ and $\boldsymbol{D}$ (in any order, as in B2);
2. Add $\boldsymbol{R}$ letter to the beginning of the word and $\boldsymbol{L}$ letter to the end of the word (and vice versa);
3. Add $\boldsymbol{U}$ letter to the beginning of the word and $\boldsymbol{D}$ letter to the end of the word (and vice versa); 4. Attach obtained words to each other.
Let some region can be tiled by dominoes. Prove that the word corresponding to the boundary can be obtained by complex of these operations.
It is easy to see that: operation 1 corresponds to adding or deleting of pair of «there and back again» paths; operation 2 and 3 corresponds to the changing word by its cyclic shift; operation 4 corresponds to the attaching words to each other (using the fact that we can delete «there and back again» paths). Thus, we can formulate the necessary tiling condition using our language of word products.
- B5. Suppose that we can tile the fixed finite region using the set of poliminoes $\boldsymbol{T}$. Consider the original set of words corresponding to $\boldsymbol{T}$. Prove that the word corresponding to the boundary is presented by the result of the several product and cyclic-shift operations.
- B6. Construct an example of the region which boundary can be obtained by the operations of B5, but tiling cannot be done.
Consider a polygon on the plane. Suppose that it is cut on $N$ small polygons such that none of vertices of the small polygons belong to the inner part of other polygon edge. Consider closed paths of arbitrary length passing through the small polygons edges. Suppose that adding (or delete) the "there and back"
edges doesn't change any path. Let point $\boldsymbol{A}$ be some vertex of a small polygon. If the path can be presented by pass through one path then do through the second one, then we say that our path is a product of two passed paths.
- B7. Consider an infinite set of closed paths that start at point $\boldsymbol{A}$. Prove that there exists a finite set $\boldsymbol{P}$ of closed paths from $\boldsymbol{A}$ such that any closed path starting at $\boldsymbol{A}$ can be presented by the finite product of the paths from $\boldsymbol{P}$. Find the minimal number of paths in the set $\boldsymbol{P}$.
- B8. Choose another vertex $\boldsymbol{B}$. Consider closed paths starting at $\boldsymbol{B}$. Prove that we can provide a correspondence such that the following properties hold:
1. Every path starting at $\boldsymbol{A}$ corresponds to its own path staring at $\boldsymbol{B}$.
2. If paths $\boldsymbol{p}_{\mathbf{1}}$ and $\boldsymbol{p}_{\mathbf{2}}$ starting at $\boldsymbol{A}$ correspond to the paths $\boldsymbol{p}_{\mathbf{1}}^{\prime}$ and $\boldsymbol{p}_{\mathbf{2}}^{\prime}$, then product $\boldsymbol{p}_{\mathbf{1}} \boldsymbol{p}_{\mathbf{2}}$ corresponds to the path $\boldsymbol{p}_{1}^{\prime} \boldsymbol{p}_{\mathbf{2}}^{\prime}$.
## Section C. Groups
A set with respect to the product operation $*$ is called a group if the following conditions hold:
1. Associative property. For any $\boldsymbol{a}, \boldsymbol{b}, \boldsymbol{c}$ holds $\boldsymbol{a} *(\boldsymbol{b} * \boldsymbol{c})=(\boldsymbol{a} * \boldsymbol{b}) * \boldsymbol{c}$.
2. The existence of the unit element. There exists an element $\boldsymbol{e}$ such that the equality $\boldsymbol{a} \boldsymbol{e}=\boldsymbol{e} \boldsymbol{a}=\boldsymbol{a}$ holds for any $\boldsymbol{a}$ in the group.
3. The existence of the inverse element. For any $\boldsymbol{a}$ in the group there exists an element $\boldsymbol{a}^{-\mathbf{1}}$ such that $a a^{-1}=a^{-1} a=e$
Examples. The set of integers is a group with respect to the sum operation. An opposite number is an inverse element. The set of rational numbers (without zero) is a group with respect to the product operation.
Substitution groups. There are six ways to place three elements in the row: 213, 321, 132, 312, 231, 123. In fact, we consider the transformations of the three elements: we can interchange two of them (so we obtain 213, 321 or 132), or we can shift all three elements by the cycle (so we obtain 312 or 231). Also we can do nothing so we stay with 123 in this case. It is easy to see that we have six different «actions». If we apply one of these actions and immediately another one, then we obtain the action from the six ones again. For example, if we interchange the first two elements and shift all three elements by the cycle to the right, then we obtain $123 \rightarrow 213 \rightarrow 321$. Thus, we obtain the action of interchanging of the first and third elements. These «actions» are called substitutions. The set of substitutions is a group with respect to the consecutive applying operation. There are six elements in this group. The identical transformation 123 is the unit element. This group is the smallest group such that there holds $a b \neq b a$ for some $a$ and $b$. We denote it by $S_{3}$. We can consider substitution group $S_{n}$ for any integer $n$.
- C0. Check that paths in the B8 and B9 form a group.
A group is called abelian or commutative if $\boldsymbol{a} \boldsymbol{b}=\boldsymbol{b} \boldsymbol{a}$ holds for any $\boldsymbol{a}$ and $\boldsymbol{b}$.
C1. Construct a nonabelian group consisting of $\mathbf{8}$ elements.
- C2. Prove that the set of motions in space that transfer the cube to itself is a group. Find the number of elements in this group.
C3. Prove that the set of words in the alphabet $\left\{a_{1}, a_{1}^{-1}, a_{2}, a_{2}^{-1}, \ldots, a_{n}, a_{n}^{-1}\right\}$ is a group with respect to the attaching operation. (Also we can use cancellation of neighboring inverse letters $\boldsymbol{x}$ and $\boldsymbol{x}^{-\mathbf{1}}$.)
Let $\boldsymbol{G}$ be a group. Suppose that $\boldsymbol{H}$ is a subset of $\boldsymbol{G}$ and if $\boldsymbol{a}, \boldsymbol{b} \in \boldsymbol{H}$, then $\boldsymbol{a}^{-1}, \boldsymbol{b}^{-1}, \boldsymbol{b} \boldsymbol{a}, \boldsymbol{a} \boldsymbol{b} \in \boldsymbol{H}$. Then we say that $\boldsymbol{H}$ is a subgroup of $\boldsymbol{G} . \boldsymbol{H}$ is a group too, with respect to the same operation.
C4. Prove that every element in the substitution group $\boldsymbol{S}_{\boldsymbol{n}}$ is a product of several independent cycles. Describe all subgroups in the substitution group $\boldsymbol{S}_{5}$.
Elements $\boldsymbol{a}$ and $\boldsymbol{b}$ are called conjugate if there exists an element $\boldsymbol{x}$, such that $\boldsymbol{x} \boldsymbol{a} \boldsymbol{x}^{-\boldsymbol{1}}=\boldsymbol{b}$. If $\boldsymbol{H}$ is a subgroup, then conjugate set $\boldsymbol{x} \boldsymbol{H} \boldsymbol{x}^{-\mathbf{1}}$ is also a subgroup, because of $\boldsymbol{x} h_{1} x^{-1} x h_{2} x^{-1}=x h_{1} h_{2} x^{-1}$.
- C5. Find all conjugate subgroups in the $\boldsymbol{S}_{\mathbf{5}}$ substitution group.
A group often can be described by different methods. For example, elements of a group can be presented by the motions in space transferring polyhedron to itself, or by substitutions of several elements. The structure of a group be the same. There is a special notion to describe the «sameness» idea.
Groups $\boldsymbol{G}$ and $\boldsymbol{H}$ are called isomorphic if there exists a correspondence between $\boldsymbol{G}$ and $\boldsymbol{H}$ with the following properties:
1. There is an unique element $\boldsymbol{h} \in \boldsymbol{H}$ corresponding to any element $\boldsymbol{g} \in \boldsymbol{G}$, and vice versa;
2. If elements $\boldsymbol{h}_{1}, \boldsymbol{h}_{\mathbf{2}} \in \boldsymbol{H}$ correspond to the elements $\boldsymbol{g}_{1}, \boldsymbol{g}_{\boldsymbol{2}} \in \boldsymbol{G}$, then product $\boldsymbol{h}_{1} \boldsymbol{h}_{2}$ corresponds to $g_{1} g_{2}$.
-6. Suppose that $G$ is a group of motions transferring the fixed cube to itself. Find a substitution group which isomorphic to $G$.
Suppose that the elements of a group are colored in several colors such that the color of product depends on colors of the elements only and not depends on the choose of elements of that color. Hence, the product of elements colored in 1 and 2 colors always has the same color (we can take any elements with color 1 and 2).
- C7. Prove that the set of all elements having the same color as unit element is a subgroup. This subgroup is called normal.
Equivalent definition. A subgroup $\boldsymbol{H} \in \boldsymbol{G}$ is called normal if for any $\boldsymbol{g} \in \boldsymbol{G}(\boldsymbol{g}$ may be not in $\boldsymbol{H})$ the following holds: $\boldsymbol{g} \boldsymbol{H} \boldsymbol{g}^{-\mathbf{1}} \in \boldsymbol{H}$. In other words, a normal subgroup is conjugate to itself.
- C8. Prove this equivalence of the definitions.
- C9. Find all normal subgroups in the substitution group $\boldsymbol{S}_{\mathbf{4}}$.
- C10. Consider a group $\boldsymbol{G}$. Let $\boldsymbol{K}$ be a set of elements $\boldsymbol{a} \boldsymbol{b} \boldsymbol{a}^{-\mathbf{1}} \boldsymbol{b}^{-\mathbf{1}}$. (they are called commutators). Suppose that $\boldsymbol{H}$ is the set of all possible products of elements in $\boldsymbol{K}$. Prove that $\boldsymbol{H}$ is a normal subgroup.
## Section D. Tiling groups
A set of cells on the square lattice is called connected if we can walk from any cell to another by passing thought cell edges.
Let $\boldsymbol{T}$ be a set of cells on the square lattice. Suppose that $\boldsymbol{T}$ have connected complement set. If we can walk through the boundary of $\boldsymbol{T}$ passing all the edges one time only, then we say that $\boldsymbol{T}$ is a tile. Now we shall consider the pavements with tiles.
Consider a set of words corresponding to the finite tile set. Let us play with this set the game as in B4 problem: add or delete pairs of inverse letters, or change word by its conjugate, or attach words to each other (take words products).
D1. Prove that the set of all words that we obtain by such operations is a group with respect to the product.
This group is called a tiling group of the given tile set.
- D2. Let $\boldsymbol{C}$ be a set of all closed paths on the square lattice. Prove that the set of words corresponding to these paths is a group. Prove that for any tile set a tiling group is a normal subgroup in $\boldsymbol{C}$ group.
- D3. Suppose that region $\boldsymbol{O}$ can be tiled by tile set $\boldsymbol{T}$. Prove that the word $\boldsymbol{d} \boldsymbol{O}$ corresponding to the boundary of $\boldsymbol{O}$ is in the tiling group of $\boldsymbol{T}$.

## Pavements, colorings and tiling groups
E1. Consider a rectangle $m \times n$ tiled by dominoes. Check that there exists a subsquare $2 \times 2$ consisting of two dominoes.
a) Find the minimal number of these subsquares.
b) Consider a square $2 \times 2$ tiled by 2 dominoes. Let us define a flip: it is a transformation of a horizontal tiling to a vertical one and vice versa. Prove that for any tiling of an $m \times n$ rectangle there exists a sequence of such flips such that we can obtain any other tiling.

Figure 2 .
$\left.c^{*}\right)$ Find the minimal number of flips which is sufficient for transforming of any tiling to any other one.
Definition. Below we shall examine these flip transformations. To make a flip, we choose the region in the plane of fixed form and change the tiling into it.
E2. Consider a rectangle $m \times n$ tiled by $1 \times k$ tiles. Check that there exists a square $k \times k$ consisting of $\mathrm{k} 1 \times k$ tiles.
a) Find the minimal number of these squares.
b) Consider a rectangle $k \times k$ tiled by $1 \times k$ tiles. Similarly, a flip is a transformation of a horizontal tiling to a vertical one and vice versa. Prove that for any tiling of an $m \times n$ rectangle there exists a sequence of such flips such that we can obtain any other tiling.
$\left.c^{*}\right)$ Find the minimal number of flips which is sufficient for transforming of any tiling to any other one.

Figure 3 .
- E3. a) Prove that a central-symmetric convex polygon can be tiled by parallelograms. Also prove the converse fact that if a convex polygon can be tiled by parallelograms then it is central-symmetric.
b) Consider a tiling of the regular $2 n$-polygon (with unit edges) by rhombuses with unit edges. If there exist three such rhombuses forming a hexagon then we can change this tiling to another one (see picture 3). We shall call this transformation a flip. Prove that it's possible to obtain any tiling by some sequence of flips.
c) Find the minimal number of flips sufficient for transforming of any tiling to any other one.
d) Find the minimal number of hexagons used in tiling of a regular $2 n$-polygon (with unit edges) by parallelograms.
e) Consider a tiling of the regular hexagon (with edges of length $n$ ) by rhombuses with unit edges. Prove that it is possible to obtain any tiling by some sequence of flips. Find the minimal number of flips sufficient for transforming of any tiling to any other one.
Note. Draw a cube $n \times n \times n$ using the picture of brick arrangement. How does the picture change when we remove the bricks one by one?

Figure 4 .

Figure 5 .
- E4. Consider a finite rectangle grid on the square lattice. Suppose that any edge of this grid is oriented (see picture 4).
Condition 1. For any vertex, there are equal numbers of ingoing and outgoing edges.
Let us call by flip the following transformation. If all the arrows around the cell are oriented clockwise, then we change the directions of all arrows, and vice versa, if all the arrows are oriented counterclockwise, we do the same. Suppose that condition 1 holds for the placement of the arrows. Prove that this placement can be transformed by flips into any other placement satisfied condition 1 .
Note. Consider the function $h(x)$, with the following condition hold: if cell $x$ contains nondirected edge, then $h(x)=0$. Let us define $h$ by induction: if $h(x)$ is defined for some $x$, and $y$ is a neighboring cell (by edge), then $h(y)$ is defined in the following way: $h(y)=0$, if the cell $y$ contains nondirected edge, $h(y)=1$, if we intersect oriented edge which goes from the left to the right, and $h(y)=-1$, if we intersect directed edge which goes from the right to the left. You may assume that this function is well defined.

Figure 6 .
E5. Consider a rectangle $m \times n$ tiled by tetraminoes. Further consider the following diagonal net of lines (see the figure 6). Prove that each edge containing diagonals of two cells meets just one tetramino, and that $m$ and $n$ are divisible by 4 .

Figure 7 .
- E6. Prove that by sequences of flips (see the figure 7) each dissection can be transferred into each other.

Figure 8 .
- E7. Connected tiles such that each line indicated in the figure 8 meets not more than one of its cells, will be called $p$-tiles. Let $T_{n}$ be the set of p-tiles consisting of $n$ cells, and $\left|T_{n}\right|$ be the number of elements in this set. Determine $\left|T_{n}\right|$.

Figure 9 .

Figure 10 .
- E8. Prove that if a rectangle $a \times b$ can be covered by p-tiles shown at a) fig. 9, b) fig. 10 , then 10 divides $a b$.

Figure 11 .

Figure 12 .
- E9. Let $D_{n}$ be the figure indicated at fig. 11. Prove that if the figure $D_{n}$ can be covered by p-tiles indicated at fig. 10 then $n \equiv 0,4,15,19 \quad(\bmod 20)$.
E10. What is the number of possible tilings by dominoes for a) a rectangle $2 \times m$ ? b) Aztec diamond? (see fig. 12)?
Consider a tiling (possibly with several layers) of a figure $F$ by tiles from some set $T$. A distribution of numbers in cells will be called an invariant if the sum of numbers covered by any tile from the set $T$ is divisible by $p$. An invariant is nontrivial if the sum of numbers covered by $F$ is not divisible by $p$.
- E11. a) Prove that if a nontrivial invariant exists then $F$ cannot be covered by tiles from $T$ so that the multiplicity of covering of each cell equals 1 modulo $p$. b) Prove that if there are no nontrivial invariants then such a covering exists.
- E12. For which $m$ and $n$ a rectangle $m \times n$ can be covered by corner triminoes so that each cell is covered by equal number of triminoes?
- E13. A semiinvariant is a distribution of numbers in cells, such that the sum of numbers covered by each tile from the set $T$ is negative and the sum of numbers covered by $F$ is positive. Prove that a) if a semiinvariant exists then $F$ cannot be covered by figures from $T$ so that each cell is covered by equal number of figures; b) if there are no semiinvariants then such a covering does exist.
- E14. There are a board with lamps and a board with buttons. Pressing a button, we change the state of lamps connected with it, to the opposite state. a) Prove that the number of distributions possible for the states of lamps is a power of two. b) A set of lamps will be called an invariant if each button changes the state of an even number of lamps in it. Prove that if there are no invariants then all the lamps can be switched off independently of the initial state. c) Prove that if no invariant distinguishes the initial and the final states then a transfer from the initial state to the final state is possible.
- E15. A set of flips will be called complete if any pavement of the domain can be transferred to each one by some chain of flips from this set. Is it true that for some set of tiles there exists no complete set of flips?

Figure 13.
- E16*. A plane graph is dissected into domains which are hexagons with no edges inside them (we may consider them as domino tiles $2 \times 1$ ). Each edge has two sides equiped by arrows. These two arrows have opposite directions and each hexagon has clockwise orientation. It is allowed to take a domain consisting of two adjacent hexagons and change it as is indicated at the figure 13. Is it true that every such dissection of a plane graph can be changed into each other by a chain of such flips?

## Pavements, colorings and tiling groups
- F1. Consider an oriented graph whose edges are colored in two colors, and each vertex is the end of one red and one blue edge and the origin of similar edges. A self-coincidence of the graph is a rule which maps each vertex of the graph into some vertex so that each vertex has a single inverse image. Suppose that for each pair of vertices there exists a self-coincidence of the graph which saves orientation and colors of edges and maps the first vertex to the second one. If we pass a path such that first three edges are red and the remaining three edges are blue then we come to the same point as if first three edges were blue and the remaining three edges were red. Prove that the result remains true if 3 is replaced by 24 .

Figure 1. $T_{5}$
Figure 2. $T_{2}$
Figure 3. $L_{3}$
Define the domain $T_{n}$ as a "triangle" formed of hexagons. Furthermore define $L_{n}$ as $n$ hexagon placed in a row (see fig. $1-3$ )
- F2. Find a correspondence between figures on a hexagon lattice and tiles on a square lattice. Place arrows of two colors $\left(a\right.$ and $b$ ) in the square lattice so that words corresponding to tiles $L_{n}$ produce closed paths.
- F3. Construct a coloring (invariant) of a new square lattice from $F 2$ such that paths $L_{4}$ correspond to zero values and figures $T_{n}$ do not.
- F4. Prove that $T_{n}$ cannot be tiled by figures $L_{3}$.
- F5. Find all values $n$ such that $T_{n}$ can be tiled by figures $T_{2}$.
# Tilings of rectangles with T-tetrominoes
Michael Korn and Igor Pak
Department of Mathematics
Massachusetts Institute of Technology
Cambridge, MA, 02139
mikekorn@mit.edu, pak@math.mit.edu
August 26, 2003
#### Abstract
We prove that any two tilings of a rectangular region by T-tetrominoes are connected by moves involving only 2 and 4 tiles. We also show that the number of such tilings is an evaluation of the Tutte polynomial. The results are extended to a more general class of regions.
## 1 Introduction
The subject of tilings is a wonderful story that started as a collection of amateur problems (cf. [6]) and has now become an area of study in its own right, with numerous connections and applications to other fields: from group theory to topology, from enumerative combinatorics to probability. In the last decade various advanced methods have been developed which allowed some hard questions to be answered. This resulted in a structural approach to the study of tilings, which was presented in a recent survey [13] by the second author. The current paper carries out this approach to the very end for a special set of tiles. An unexpected combinatorial connection to the Tutte polynomial is a bonus and a delightful surprise.
In this paper we consider the set of T-tetrominoes, which has been studied earlier by Walkup in his curious paper [21]. His main result states that only rectangles of the form $4 m \times 4 n$ are tileable by T-tetrominoes. The proof in [21] is interesting but rather ad hoc. We explore further the structure of these tilings, combining Walkup's approach with several new direct bijections.
Our main result is local move connectivity of T-tetromino tilings for rectangular regions, resolving a conjecture in [13] in this case. This is done by introducing a new type of height function, and relating it to the tiling by means of two bijections. The height function technique for domino tilings was discovered by Thurston [19], and was used extensively in the recent literature to prove the local move connectivity for various sets of tiles (see e.g. $[2,8,12,17]$ ).
Along the way we show that our new height functions enable us to define a lattice structure on all Ttetromino tilings of a rectangle. While this may seem a theoretical curiosity, in fact there are important applications of this result. There is a natural definition of a Markov chain on tilings (perform "random local moves") which translates into a nice Markov chain on height functions. Using the "coupling from the past" technique of Propp and Wilson and the fact that the height functions form a lattice (see $[15,14]$ ) one can sample random T-tetromino tilings from an exactly uniform distribution (as opposed to a "nearly uniform" distribution usually obtained by the Markov chain approach). We refer to [16] for a full discussion of this approach and other examples of lattice structures on tilings.
Another classical problem for general tilings is their enumeration. Unfortunately, there seems to be little hope for a closed formula for the number of T-tetromino tilings of rectangles ${ }^{1}$. We show, however, that the[^5]number is an evaluation $T(3,3)$ of the Tutte polynomial, well-studied in the literature. Let us mention here that the Tutte polynomial is a fundamental invariant of graphs, and is related to a number of problems in discrete mathematics, computer science and several models in statistical mechanics. It has been extensively studied for various series of graphs as well as from a computational point of view (approximating its values is one of the challenges in the field). We refer to [22] for a beautifully written survey and a starting point for countless references.
Given the lack of a closed formula, one can ask whether the Markov chain approach can be used to efficiently approximate the number of tilings. In the past decade this idea has been developed into an important technique, first in the graph theoretic setting [7] and later in the tilings literature [9]. Without going into the details, the technique is based on showing rapid mixing of a Markov chain, and establishing a so-called self-reducibility property, the latter being usually much simpler. Roughly, one uses a Markov chain to sample a number of uniform tilings, collect statistics for certain patterns among the sampled tilings, and reduce the problem to a smaller similar problem. The self-reducibility allows such a reduction and keeps the errors relatively small. Unfortunately, we are unable to carry out this approach in full. We show the self-reducibility, but rapid mixing of our Markov chain goes beyond the scope of this work and is stated as a conjecture.
Returning back to combinatorics of the T-tetromino tilings, we answer a question as to what extent our results can be generalized from rectangular to other regions. We show that in fact all the bijective proofs go through for quadruplicated simply connected regions. As a corollary, we have the local move connectivity for such regions. We conclude by showing that if either condition on the regions is dropped, there is no local move property.
After the results of this paper were obtained, we learned of an alternative approach to the problem presented in a recent manuscript by Konstantin and Yuri Makarychev [10]. The authors showed that one can prove local move connectivity of T-tetromino tilings for rectangular regions by means of the so-called ice graphs and by using Eloranta's theorem (see [4]). We discovered that this approach can be combined with ours and one can define a height function, similar to ours. We present our findings in the appendix. For completeness and clarity of the exposition we start by recalling Makarychev's results (with independent proofs), define a new height function, and then proceed to prove the local move connectivity by a height function.
A few words about the structure of the paper. We start with definitions and basic results. In section 3 we state Walkup's result about the structure of T-tetromino tilings of a rectangle which will be an important technical tool for the rest of the paper. Then, in section 4 , we define a new notion of chain graphs and show that they are in one-to-one correspondence with T-tetromino tilings. In section 5 we introduce the height functions, which we use in section 6 to prove local connectivity. We introduce a lattice structure on height functions in section 7 . In section 8 we consider tilings of non-rectangular regions, proving local connectivity for quadruplicated simply connected regions. In section 9 we define two planar graphs which correspond to chain graphs, which enables us to obtain an enumerative formula for the number of T-tetromino tilings. Section 10 contains the description of the Markov chain $\mathcal{M}$ on T-tetromino tilings and proves the selfreducibility. We conclude with final remarks and the appendix outlining an alternative approach to local connectivity.
## 2 Main results
A T-tetromino is the figure formed by four unit squares arranged as shown in Figure 1. We make no distinction between the four possible orientations of the T-tetromino. A tiling of a region $\Gamma$ with T-tetrominoes is an arrangement of T-tetrominoes which covers every square of $\Gamma$ exactly once. An individual T-tetromino in such a tiling is called a tile. Let $\mathcal{T}_{\Gamma}$ denote the set of all possible tilings of $\Gamma$ by T-tetrominoes.
In this paper, we will work exclusively with tilings by T-tetrominoes. Every reference to tilings or tiles refers to T-tetrominoes, even if this is not explicitly stated. We will chiefly be interested in tiling rectangular regions, although in section 8 we will see that much of what we prove also holds for a somewhat more general

Figure 1: T-tetrominoes.
class of shapes.
Given a tiling of a region $\Gamma$, one can transform it into a new tiling by performing a "local move". A local move consists of picking up some (small) number of tiles, then re-filling that area with tiles in a different way. Two natural local moves for T-tetrominoes are shown in Figure 2. We call them the 2-move and the 4-move.

Figure 2: Local 2-move and local 4-move.
Suppose we are given a region $\Gamma$ and a collection $\mathcal{L}$ of allowable local moves, and suppose that $\tau_{1}$ and $\tau_{2}$ are two different tilings of $\Gamma$. Let us say that $\tau_{1}$ and $\tau_{2}$ are local-move equivalent with respect to $\mathcal{L}$ if it is possible to transform $\tau_{1}$ into $\tau_{2}$ by performing a sequence of local moves from $\mathcal{L}$. This is an equivalence relation on the set of all tilings of $\Gamma$. A natural question to ask is whether all tilings of $\Gamma$ are local-move equivalent. If so, we say that the region $\Gamma$ has local connectivity with respect to $\mathcal{L}$. If $\mathcal{R}$ is a set of regions (the set of all rectangles, or the set of all simply-connected regions, for example), we say that $\mathcal{R}$ has a local-move property if there exists a finite set $\mathcal{L}$ of local moves such that all regions $\Gamma \in \mathcal{R}$ have local connectivity with respect to $\mathcal{L}$.
One of our main results is the following.
Theorem 1 For tilings by T-tetrominoes, the set of all rectangles has a local-move property. Specifically, every rectangle $\Gamma$ has local connectivity with respect to the 2-move and 4-move.
This result was conjectured in [13] to hold for all simply connected regions. Later on, in section 8, we extend this theorem to a more general class of regions and show that the conjecture does not hold in full generality.
## 3 Tiling rectangles with T-tetrominoes
Without loss of generality, let $\Gamma$ be a rectangle which is situated in the first quadrant of the Cartesian plane, with one corner at $(0,0)$. Let a type-A point be a point whose coordinates are congruent mod 4 to ( 0,0$)$ or $(2,2)$, and let a type- $B$ point be a point whose coordinates are congruent mod 4 to $(0,2)$ or $(2,0)$. A segment of length 1 is called a cut if there is no valid tiling of $\Gamma$ in which a tile crosses that segment. A point is called cornerless if there is no valid tiling of $\Gamma$ in which that point is one of the eight corners of a tile.
In [21], Walkup proves the following property of T-tetromino tilings of rectangles (see Figure 3).
Theorem 2 (Walkup) If an $m \times n$ rectangle can be tiled by T-tetrominoes, then both $m$ and $n$ must be divisible by 4. Furthermore, all segments incident to type- $A$ points are cuts, and all type- $B$ points are cornerless.

Figure 3: The dark lines are cuts. Circles are cornerless points.
From now on, we will only be concerned with rectangles having sides divisible by 4 , since all other rectangles are untileable.
Define a block to be a $2 \times 2$ square whose corners have even coordinates. The following lemma is immediate by inspection from the structure of cuts and cornerless points.
Lemma 3 In any tiling of a rectangle by T-tetrominoes, each tile contains three squares from one block and one square from an adjacent block. Similarly, each block contains three squares from one tile and one square from another tile.
## 4 Chain graphs
Define an antiblock to be a $2 \times 2$ square whose corners have odd coordinates. Color the antiblocks white and gray in checkerboard fashion, so that antiblocks centered at type-A points are gray and those centered at type-B points are white.
For a $4 m \times 4 n$ rectangle $\Gamma$, let $V_{\Gamma}$ be the set of points in $\Gamma$ which have odd coordinates. Say that a directed graph on the vertices $V_{\Gamma}$ is a chain graph if it satisfies the following properties:
- every edge connects vertices that are two units apart (either vertically or horizontally),
- every vertex has indegree 1 and outdegree 1 , and
- every white antiblock contained in $\Gamma$ borders exactly two edges of the graph, and these edges are non-adjacent.
Let $\mathcal{C}_{\Gamma}$ denote the set of all chain graphs of a region $\Gamma$.
Theorem 4 For any $4 m \times 4 n$ rectangle $\Gamma$, we have $\left|\mathcal{C}_{\Gamma}\right|=\left|\mathcal{T}_{\Gamma}\right|$.
The proof is based on an explicit bijection $\phi: \mathcal{T}_{\Gamma} \rightarrow \mathcal{C}_{\Gamma}$ defined as follows.
Let $\tau \in \mathcal{T}_{\Gamma}$ be a tiling. Notice that each vertex in $V_{\Gamma}$ lies in the middle of some block. By Lemma 3 , each tile in $\tau$ contains three squares from one block and one square from an adjacent block. Call these blocks the primary and secondary blocks of the tile respectively. For each tile, draw a directed edge from its primary block to its secondary block, and define $\phi(\tau)$ to be the directed graph which results (see Figure 4).
Theorem 4 follows immediately from the following Lemma.

Figure 4: A tiling $\tau$, and the chain graph $\phi(\tau)$.
Lemma 5 For any $4 m \times 4 n$ rectangle $\Gamma$, the map $\phi$ defined above is a bijection between $\mathcal{T}_{\Gamma}$ and $\mathcal{C}_{\Gamma}$.
Proof: First let us show that $\phi(\tau)$ is a chain graph. It is clear from the definition, and from Lemma 3 , that every vertex will have indegree 1 and outdegree 1 , and that edges will only connect vertices which are two units apart. As for the third restriction, consider a type-B point not on the boundary. Up to rotations and reflections, the tiles surrounding it must look like one of the two possibilities shown in Figure 5. Thus there will be exactly two edges bordering the associated white antiblock, and they will be non-adjacent. Hence $\phi(\tau)$ is a chain graph for all $\tau$.

Figure 5: The two possibilities for a type-B point.
Notice that each tile corresponds to an edge in this graph. For each edge, there is only one possible tile placement which yields that edge and is consistent with the cuts and cornerless points. Hence the map $\phi$ is injective.
What remains to be shown is that every chain graph is equal to $\phi(\tau)$ for some tiling $\tau$. As we just observed, for each edge there is only one possible tile placement that can yield that edge. So any chain graph will yield a collection of tile placements. It remains to be checked that these tiles cover all of $\Gamma$ and do not overlap. Since each vertex has outdegree 1 , the number of edges equals the number of blocks, so the total area of the tiles will equal the area of $\Gamma$. Thus it will be sufficient to verify that the tiles do not overlap.
Assume there are two tiles which overlap. Let us assume the overlap occurs in the block containing the squares A, B, D, and E (see Figure 6). Without loss of generality, we may take one of the tiles to be the one covering squares B, D, E, and F. Since each vertex has indegree 1 and outdegree 1, the tile which overlaps this one must contain only one square from this block, hence the overlap must occur at E. There are two possible tiles which cover E. First there is the tile which covers C, E, F, and G. If we have this, then the graph must contain both an edge and its opposite. This violates the rule about what a white antiblock may border. The other possibility is the tile which covers E, H, I, and J. In this case, the graph must contain
two adjacent edges both on the same white antiblock, which again violates the constraint. Thus there can be no overlaps, which proves that every chain graph is $\phi(\tau)$ for some tiling $\tau$.

Figure 6: How an overlap may occur.
## 5 Height functions
Let us call a point having coordinates congruent $\bmod 4$ to $(0,0)$ a type-A0 point. Similarly, a point congruent to $(2,2)$ will be called a type-A1 point. (Points congruent to either $(0,2)$ or $(2,0)$ will still be called type- $B$ points.)
For a $4 m \times 4 n$ rectangle $\Gamma$, let $W_{\Gamma}$ be the set of points in $\Gamma$ which have even coordinates. Let $\partial \Gamma$ denote the set of boundary point of $\Gamma$. Say that a function $f: W_{\Gamma} \rightarrow \mathbb{Z}$ is a height function if it satisfies the following properties:
- $f(x)=0$ for all $x \in \partial \Gamma$,
- $f(x)$ is an even integer for all type-A0 points $x$,
- $f(x)$ is an odd integer for all type-A1 points $x$, and
- $|f(x)-f(y)| \leq 1$ whenever $x$ and $y$ are adjacent (at a distance of two units).
Let $\mathcal{H}_{\Gamma}$ denote the set of all height functions of a region $\Gamma$.
Theorem 6 For any $4 m \times 4 n$ rectangle $\Gamma$, we have $\left|\mathcal{H}_{\Gamma}\right|=\left|\mathcal{T}_{\Gamma}\right|$.
We define a map $\psi: \mathcal{C}_{\Gamma} \rightarrow \mathcal{H}_{\Gamma}$ as follows. Let $C \in \mathcal{C}_{\Gamma}$ be a chain graph. Define a function $f^{\circ}$ on the faces of $C$ by the following rules. Let $f^{\circ}$ have the value 0 on the unbounded face of $C$. As we pass an edge of the graph, if the edge points to the right, let the value of $f^{\circ}$ increase by 1 . (Similarly, if the edge points to the left, let the value of $f^{\circ}$ decrease by 1.) Now define $f: W_{\Gamma} \rightarrow \mathbb{Z}$ by letting $f(x)$ equal the value of $f^{\circ}$ on the face in which $x$ lies (see Figure 7). Define $\psi(C)$ to be this function $f$.
Theorem 6 follows immediately from Theorem 4 and the following lemma.
Lemma 7 For any $4 m \times 4 n$ rectangle $\Gamma$, the map $\psi$ defined above is a bijection between $\mathcal{C}_{\Gamma}$ and $\mathcal{H}_{\Gamma}$.
Proof: Let $C$ be a chain graph, and let $f$ be $\psi(C)$ as defined above. Let us first show that the function $f$ is well-defined. If it is not, then there must exist some closed path through the faces of the graph such that the net change in the value of $f^{\circ}$ is non-zero. This means that upon going around this path counterclockwise, we cross more right-pointing edges than left-pointing edges, say. Therefore more edges leave the area enclosed by the path than enter that area. But this is impossible since every vertex has equal indegree and outdegree, so the net flow out of any region must be zero. Hence $f$ is a well-defined function on $W_{\Gamma}$.
Next, let us verify that $f$ is a valid height function. Points $x \in \partial \Gamma$ lie in the unbounded face of $C$, hence $f(x)=0$ for such points. And if $x$ and $y$ are adjacent points, then they lie either in the same face of $C$ or in adjacent faces of $C$, hence the difference between $f(x)$ and $f(y)$ is at most 1 . Now let us verify the other two statements. As one travels from a type-A0 point $x$ to another type-A0 point $y$ which is 4 units away, one

Figure 7: A chain graph $C$, and the function $f=\psi(C)$.
passes through the middle of a white antiblock (see Figure 8). In doing so, one crosses either 0 or 2 edges of $C$, hence the value of $f^{\circ}$ will have changed twice, or not at all, so $f(x)$ and $f(y)$ will have the same parity. Since $(0,0)$ is a type-A0 point, and $f((0,0))=0$, it follows that $f(x)$ will be even for all type-A0 points $x$. By the same argument, all type-A1 points must have the same parity as each other. And (2,2) is a type-A1 point with $f((2,2))= \pm 1$, so $f(x)$ will be odd for all type-A1 points $x$. Thus $f$ is in fact a height function.

Figure 8: Two type-A0 points, and what might lie between them.
Given a height function $f=\psi(C)$, one can uniquely reconstruct the chain graph $C$ by inserting directed edges in the places where the value of $f$ increases or decreases. Hence $\psi$ is an injective map. It remains to be shown that every height function $f$ is equal to $\psi(C)$ for some valid chain graph $C$.
Take a height function $f$, and insert directed edges along the boundaries where the value of $f$ increases or decreases. Call this graph $C$. Consider a vertex of $C$. To one corner of it, there is a type-A0 point $x_{0}$, on the opposite corner is a type-A1 point $x_{1}$, and the remaining two corners are type-B points $y_{0}$ and $y_{1}$. Since $f\left(x_{0}\right)$ is even, and $f\left(x_{1}\right)$ is odd, these values must differ by exactly 1 . Without loss of generality, assume $f\left(x_{0}\right)=h$ and $f\left(x_{1}\right)=h+1$. Then both $f\left(y_{0}\right)$ and $f\left(y_{1}\right)$ must be $h$ or $h+1$ as well. Up to rotations, the situation must look like one of the possibilities in Figure 9. Thus the vertex in question will have indegree 1 and outdegree 1 .

Figure 9: The possibilities for a vertex of $C$.
Now consider a type-B point $y$, which corresponds to a white antiblock. Let $f(y)=h$, and assume without
loss of generality that $h$ is even. If $z_{1}$ and $z_{2}$ are the two type-A0 points adjacent to $y$, then we must have $f\left(z_{1}\right)=f\left(z_{2}\right)=h$. If $z_{3}$ and $z_{4}$ are the two type-A1 points adjacent to $y$, then we must have $f\left(z_{3}\right)=h \pm 1$ and $f\left(z_{4}\right)=h \pm 1$, not necessarily the same (see Figure 10). So this white antiblock will border exactly two non-adjacent edges of $C$.

Figure 10: The possibilities for a white antiblock.
Hence the graph $C$ constructed in this way from a height function $f$ is indeed a chain graph, and $\psi(C)=f$. This completes the proof.
For ease of notation, define $\zeta(\tau)=\psi(\phi(\tau))$. For a $4 m \times 4 n$ rectangle $\Gamma$, the map $\zeta$ is the canonical bijection between $\mathcal{T}_{\Gamma}$ and $\mathcal{H}_{\Gamma}$.
Lemma 8 Let $\Gamma$ be a $4 m \times 4 n$ rectangle and let $\tau_{1}, \tau_{2} \in \mathcal{T}_{\Gamma}$ be tilings of $\Gamma$. The tilings $\tau_{1}$ and $\tau_{2}$ differ by a 2-move if and only if the height functions $\zeta\left(\tau_{1}\right)$ and $\zeta\left(\tau_{2}\right)$ differ by 1 on some type- $B$ point, and are the same everywhere else. The tilings $\tau_{1}$ and $\tau_{2}$ differ by a 4-move if and only if the height functions $\zeta\left(\tau_{1}\right)$ and $\zeta\left(\tau_{2}\right)$ differ by 2 on some type-A point, and are the same everywhere else.
Proof: By inspection of the structure of cuts and cornerless points, one sees that the 2 -move must be centered at a type-B point, and the 4-move must be centered at a type-A point. From Figure 11, one can see that if $\tau_{1}$ and $\tau_{2}$ differ by a 2-move, then the height functions $\zeta\left(\tau_{1}\right)$ and $\zeta\left(\tau_{2}\right)$ differ by 1 in their values on the corresponding type-B point. Similarly, if $\tau_{1}$ and $\tau_{2}$ differ by a 4 -move, then the height functions $\zeta\left(\tau_{1}\right)$ and $\zeta\left(\tau_{2}\right)$ differ by 2 in their values on the corresponding type-A point.

Figure 11: The 2-move and 4-move, and their effect on $\zeta(\tau)$.
As for the converse, suppose there are height functions $f_{1}$ and $f_{2}$ which are identical everywhere, except $f_{1}(y)=h$ and $f_{2}(y)=h+1$ for some type-B point $y$. Thus the value of $f_{1}$ (or $f_{2}$ ) on the neighbors of $y$ must be $h, h+1, h$, and $h+1$ (since they must alternate even and odd). Hence the picture must look like the bottom left of Figure 11, possibly rotated. Going backwards, we see what the chain graph and the tiling must then look like, and that in fact, $\zeta^{-1}\left(f_{1}\right)$ and $\zeta^{-1}\left(f_{2}\right)$ differ by a 2 -move.
Similarly, suppose there are height functions $f_{1}$ and $f_{2}$ which are identical everywhere, except $f_{1}(x)=h+1$ and $f_{2}(x)=h-1$ for some type-A point $x$. Thus $f_{1}(y)=f_{2}(y)=h$ for all neighbors $y$ of $x$. Hence the
picture must look like the bottom right of Figure 11. Going backwards, we see what the chain graph and the tiling must then look like, and that in fact, $\zeta^{-1}\left(f_{1}\right)$ and $\zeta^{-1}\left(f_{2}\right)$ differ by a 4 -move.
For height functions $f_{1}, f_{2} \in \mathcal{H}_{\Gamma}$, say that $f_{1}$ and $f_{2}$ differ by a 2 -move (or 4 -move) if the tilings $\zeta^{-1}\left(f_{1}\right)$ and $\zeta^{-1}\left(f_{2}\right)$ differ by a 2 -move (or 4 -move). By the previous Lemma, one can see that performing a 2 -move on a height function $f$ is equivalent to increasing or decreasing its value by 1 at some type-B point. Similarly, performing a 4-move is equivalent to increasing or decreasing the value of $f$ by 2 at some type-A point. Of course, such moves may only be applied if the function that results is a valid height function.
## 6 Local connectivity from height functions
Theorem 1 will easily follow from the following lemma.
Lemma 9 Let $\Gamma$ be a $4 m \times 4 n$ rectangle, and let $f_{1}, f_{2} \in \mathcal{H}_{\Gamma}$ be height functions. It is always possible to convert $f_{1}$ into $f_{2}$ by performing a sequence of 2-moves and 4-moves.
Proof: For a $4 m \times 4 n$ rectangle $\Gamma$, let $f_{0}$ be the height function which is 1 on the type-A1 points of $\Gamma$, and 0 everywhere else. We would like to show that every height function $f$ can be transformed into $f_{0}$. If every height function can be transformed into $f_{0}$, it follows that any height function can be transformed into any other. Suppose $f(x)>1$ for some $x$. Let $h$ be the largest value that $f$ attains. Suppose there is a type-B point $y$ which attains this value. Then $f$ must take the values $h, h-1, h$, and $h-1$ on the neighbors of $y$. So we can perform a 2-move to change $f(y)$ to $h-1$ and still have a valid height function. We do this for all type-B points at which $f$ attains the value $h$. Now look at any remaining (type A0 or A1) point $x$ having $f(x)=h$. We must have $f(z)=h-1$ for the neighbors $z$ of $x$, since there are no type-B points remaining for which $f(z)=h$. So we can perform a 4-move to change $f(x)$ to $h-2$. We do this for every point where $f$ attains the value $h$. Now the largest value which appears is at most $h-1$, and we repeat the procedure until we have $f(x) \leq 1$ for all $x$.
We do a similar thing for points where $f(x)<0$, increasing them until $f(x) \geq 0$ for all $x$. At this point, all points will have the value 0 or 1 (in particular, $f(x)=0$ for all type-A0 points $x$, and $f(x)=1$ for all type-A1 points). It just remains to set $f(y)=0$ for all type-B points $y$, which can be done by a sequence of 2 -moves. This finishes the procedure, proving the lemma.
## 7 The lattice structure on height functions
There is a natural partial order on $\mathcal{H}_{\Gamma}$. If $f_{1}, f_{2} \in \mathcal{H}_{\Gamma}$ are height functions, we say $f_{1} \leq f_{2}$ iff $f_{1}(x) \leq f_{2}(x)$ for all points $x$. This partial order can be extended to tilings-say $\tau_{1} \leq \tau_{2}$ if $\zeta\left(\tau_{1}\right) \leq \zeta\left(\tau_{2}\right)$.
Theorem 10 For any $4 m \times 4 n$ rectangle $\Gamma$, the poset $P_{\Gamma}$ consisting of all tilings of $\Gamma$, with this order relation, is a distributive lattice.
Proof: In order to prove that $P_{\Gamma}$ is a lattice, we need to show that for height functions $f_{1}$ and $f_{2}$, there exists a unique greatest lower bound ("meet") $\alpha$ and least upper bound ("join") $\beta$. We define $\alpha(x)=$ $\min \left\{f_{1}(x), f_{2}(x)\right\}$ and $\beta(x)=\max \left\{f_{1}(x), f_{2}(x)\right\}$, for all $x$. Clearly $\alpha \leq f_{1}$ and $\alpha \leq f_{2}$, and all other lower bounds are less than $\alpha$. It just remains to be shown that $\alpha$ is a valid height function. Clearly the values of $\alpha$ on the boundary will be 0 , and the type-A0 points will be even and the type-A1 points will be odd, because these properties hold for $f_{1}$ and $f_{2}$. As for adjacent values differing by at most 1 , suppose $x$ and $y$ are adjacent points, and $\alpha(x) \geq \alpha(y)+2$. Without loss of generality, assume $\alpha(y)=f_{1}(y)$. Then it would follow that $f_{1}(x) \geq \alpha(x) \geq \alpha(y)+2=f_{1}(y)+2$, a contradiction. Therefore, $\alpha$ is a valid height function. The proof for $\beta$ is analogous.
To prove that $P_{\Gamma}$ is a distributive lattice, we need to verify the distributive laws: For height functions $f$, $g$, and $h$,
$$
(f \vee g) \wedge(f \vee h)=f \vee(g \wedge h) \quad \text { and } \quad(f \wedge g) \vee(f \wedge h)=f \wedge(g \vee h)
$$
For any $x$ we have:
$$
((f \vee g) \wedge(f \vee h))(x)=\min (\max (f(x), g(x)), \max (f(x), h(x))
$$
The functions min and max satisfy the distributive laws, so we have
$$
\min (\max (f(x), g(x)), \max (f(x), h(x))=\max (f(x), \min (g(x), h(x))=(f \vee(g \wedge h))(x)
$$
Hence
$$
(f \vee g) \wedge(f \vee h)=f \vee(g \wedge h)
$$
as desired. Note that changing the sign of functions switches the role of $\vee$ and $\wedge$, which implies the second distributive law. Therefore, $P_{\Gamma}$ is a distributive lattice.
## 8 Non-rectangular regions
A quadruplicated simply connected region is a region which is formed by taking a simply-connected union of grid squares and dilating the figure by 4 in each direction. Let $\mathcal{Q}$ denote the set of all such regions. As we did for rectangles, we will assume that the corners of such a shape have coordinates which are congruent to $(0,0) \bmod 4$. Notice that $\mathcal{Q}$ contains all $4 m \times 4 n$ rectangles.
Theorem 11 The second part of Theorem 2 holds for all regions $\Gamma \in \mathcal{Q}$.
Proof: Suppose there exists a region $\Gamma \in \mathcal{Q}$ which can be tiled in a way which violates some of the supposed cuts and cornerless points. Let $\Gamma^{\prime}$ be the smallest $4 m \times 4 n$ rectangle which contains $\Gamma$. We can extend the tiling of $\Gamma$ to a tiling of $\Gamma^{\prime}$ by adding tiled $4 \times 4$ squares to the part of $\Gamma^{\prime}$ which is not in $\Gamma$. This gives a tiling of $\Gamma^{\prime}$ which violates the necessary cuts and cornerless points, which contradicts Theorem 2 .
As a result of this, all the above results for rectangles are also true for all $\Gamma \in \mathcal{Q}$. The proofs are the same as before.
The results do not hold if we drop the condition of being simply-connected. (Notice that the correspondence between chain graphs and height functions breaks down if the region is not simply connected, because points on the boundary of the region need not be on the unbounded face of the chain graph, so they may have nonzero height.) For example, Figure 12 shows a tiling of a non-simply connected region where neither the 2-move nor the 4 -move can be applied.

Figure 12: Tiling of a non-simply connected region.
Theorem 12 Let $\mathcal{S}$ denote the set of all simply-connected regions. For tilings by T-tetrominoes, the set $\mathcal{S}$ does not have a local-move property.
Proof: Let $\Delta_{1}$ denote the region shown in Figure 13. It is straightforward to see that this region can be tiled in only two ways, namely the way shown and its mirror image. Since there are no intermediate tilings, and no tile is in the same place in both tilings, the only way for local connectivity to hold for this region is if we declare this entire transformation to be one local move.
In fact, we can generate infinitely many regions which admit only two tilings. Let $\Delta_{k}$ denote the region in Figure 14, where the total length of the region is $8 k+2$. As before, it can only be tiled in two ways, so in order to have local connectivity, the entire region must be considered to be a local move. No finite set of local moves can contain all of these, hence any finite set of local moves is insufficient to give local connectivity for these regions.

Figure 13: The region $\Delta_{1}$.

Figure 14: The region $\Delta_{k}$.
## 9 Enumeration of tilings and the Tutte polynomial
For a region $\Gamma \in \mathcal{Q}$, define the graph $G_{\Gamma}$ as follows. Include a vertex for each type-A1 point, and connect two vertices with an undirected edge if they are 4 units apart (vertically or horizontally). Similarly, define $G_{\Gamma}^{*}$ by including a vertex for every type-A0 point, and again connecting those vertices which are 4 units apart. Note that when $\Gamma$ is a $4 m \times 4 n$ rectangle, the graphs $G_{\Gamma}$ and $G_{\Gamma}^{*}$ are isomorphic to the $m \times n$ and $(m+1) \times(n+1)$ rectangular shape subgraphs of the square grid.
For a graph $G$, we let $V(G)$ and $E(G)$ denote the set of vertices and edges of $G$ respectively. Let $c(G)$ denote the number of connected components of $G$. If $e \in E(G)$, let $G \backslash e$ be the graph formed by deleting $e$ from $G$. Similarly, let $G / e$ be the graph formed by contracting $e$ in $G$.
The Tutte polynomial $T(G ; x, y)$ is a polynomial in the variables $x$ and $y$ which is defined for undirected graphs $G$. Typically it is defined in terms of the following recursive formulas (see [22]):
- $T(G ; x, y)=1$ if $G$ has no edges,
- $T(G ; x, y)=y \cdot T(G \backslash e ; x, y)$ if $e$ is a loop,
- $T(G ; x, y)=x \cdot T(G / e ; x, y)$ if $e$ is a cutedge,
- $T(G ; x, y)=T(G \backslash e ; x, y)+T(G / e ; x, y)$ if $e$ is neither a loop nor a cutedge.
Another equivalent definition of $T(G ; x, y)$ is as follows. Let $H$ be a spanning subgraph of $G$ (that is, a subgraph of $G$ which contains all the vertices of $G)$. Then
$$
T(G ; x, y)=\sum_{H \subset G}(x-1)^{c(H)-c(G)}(y-1)^{c(H)+|E(H)|-|V(G)|}
$$
where the sum is over all spanning subgraphs $H \subset G$.
Theorem 13 For every $\Gamma \in \mathcal{Q}$, the number of $T$-tetromino tilings of $\Gamma$ is equal to $2 \cdot T\left(G_{\Gamma} ; 3,3\right)$.
To prove this, we introduce a few lemmas about spanning subgraphs of $G_{\Gamma}$ and $G_{\Gamma}^{*}$.

Figure 15: A tiling $\tau$, and the graphs $\sigma(\tau)$ (solid lines) and $\sigma^{*}(\tau)$ (dotted lines).
Given a tiling $\tau$ of $\Gamma$, define $\sigma(\tau)$ to be the spanning subgraph of $G_{\Gamma}$ which includes those edges which do not cross any tile. Similarly, define $\sigma^{*}(\tau)$ to be the spanning subgraph of $G_{\Gamma}^{*}$ which includes those edges which do not cross any tile (see Figure 15).
Suppose $H$ is a spanning subgraph of $G_{\Gamma}$. Define $\omega(H)$ to be the spanning subgraph of $G_{\Gamma}^{*}$ consisting of those edges which do not cross any edge of $H$.
Lemma 14 Fix $\Gamma \in \mathcal{Q}$ and a tiling $\tau \in \mathcal{T}_{\Gamma}$. Then $\omega(\sigma(\tau))=\sigma^{*}(\tau)$. Furthermore, no edge of the chain graph $\phi(\tau)$ crosses an edge of either $\sigma(\tau)$ or $\sigma^{*}(\tau)$. Conversely, any edge of $G_{\Gamma}$ or $G_{\Gamma}^{*}$ which does not cross any edge of $\phi(\tau)$ is an edge of $\sigma(\tau)$ or $\sigma^{*}(\tau)$.
Proof: Notice that the points where an edge of $G_{\Gamma}$ and an edge of $G_{\Gamma}^{*}$ intersect are precisely the type-B points in the interior of $\Gamma$. Consider any such point. Recalling Figure 5, observe that exactly one of the two edges which meet there will avoid crossing tiles of $\tau$. Hence each such point is on an edge of either $\sigma(\tau)$ or $\sigma^{*}(\tau)$, but not both. So an edge of $G_{\Gamma}^{*}$ is in $\sigma^{*}(\tau)$ if and only if no edge of $\sigma(\tau)$ crosses it. Hence $\sigma^{*}(\tau)=\omega(\sigma(\tau))$.
Recall that in $\phi(\tau)$, each edge corresponds to a tile; the edge connects the two blocks in which the tile lies. Edges of $\sigma(\tau)$ and $\sigma^{*}(\tau)$ run along block boundaries; an edge is present in these graphs if and only if no tile crosses that boundary. If no tile crosses that boundary, then no edge of $\phi(\tau)$ will either. Conversely, if no edge of $\phi(\tau)$ crosses a block boundary, then no tile crosses that boundary, hence that boundary will be an edge of $\sigma(\tau)$ or $\sigma^{*}(\tau)$. (See Figure 16.)
Corollary 15 Suppose a region $\Gamma \in \mathcal{Q}$ and tilings $\tau_{1}, \tau_{2} \in \mathcal{T}_{\Gamma}$ satisfy $\sigma\left(\tau_{1}\right)=\sigma\left(\tau_{2}\right)$. Then $\phi\left(\tau_{1}\right)$ and $\phi\left(\tau_{2}\right)$ are identical up to the orientation of the edges.

Figure 16: The graphs $\sigma(\tau)$ and $\sigma^{*}(\tau)$, and the chain graph $\phi(\tau)$.
Proof: Let $H=\sigma\left(\tau_{1}\right)=\sigma\left(\tau_{2}\right)$. For each white antiblock, there is exactly one edge of $G_{\Gamma}$ which crosses it. The presence or absence of that edge in $H$ determines which pair of edges along the white antiblock must be included in the corresponding chain graphs. This gives all the edges of the chain graphs, except those which do not border a complete white antiblock (ones near the boundary of the region). By inspection, one can see that all those edges must be included in order to have total degree 2 at each vertex of the chain graphs.
Lemma 16 Let $\Gamma \in \mathcal{Q}$, and let $H$ be a spanning subgraph of $G_{\Gamma}$. Then
$$
c(\omega(H))=c(H)+|E(H)|-\left|V\left(G_{\Gamma}\right)\right|+1
$$
Proof: We fix $\Gamma$ and prove this by induction on the number of edges in $H$. If $H$ has no edges, then $c(H)=\left|V\left(G_{\Gamma}\right)\right|$, so $c(H)+|E(H)|-\left|V\left(G_{\Gamma}\right)\right|+1=1$, which is equal to $c(\omega(H))$, as required. Now assume that the result holds for all subgraphs $H \subset G_{\Gamma}$ with $|E(H)|1$ for some point $x$. Let $x$ be the point where $f$ attains its largest value, call it $h$ (if there are several possible points, choose any one). We must then have $f(y)=h-1$ for the neighbors $y$ of $x$. Thus we can perform a 4-move, and decrease $f(x)$ to $h-2$. Repeat this process until $f$ attains no values greater than 1 . Now if there are points $x$ where $f(x)<0$, find the one where $f$ attains its minimum. We can perform a 4-move to increase $f(x)$ by 2 . We repeat this until $f$ attains no values less than 0 . Now $0 \leq f(x) \leq 1$ for all $x$, so we are done.
## References
[1] D. Aldous and J. Fill. Reversible Markov Chains and Random Walks on Graphs. monograph in preparation.
[2] T. Chaboud. Domino tiling in planar graphs with regular and bipartite dual. Theoret. Comput. Sci., 159(1):137-142, 1996. Selected papers from the "GASCOM '94" (Talence, 1994) and the "Polyominoes and Tilings" (Toulouse, 1994) Workshops.
[3] H. Cohn, N. Elkies, and J. Propp. Local statistics for random domino tilings of the Aztec diamond. Duke Math. J., 85(1):117-166, 1996.
[4] K. Eloranta. Diamond ice. J. Statist. Phys., 96(5-6):1091-1109, 1999.
[5] M. E. Gegúndez, A. Márquez, and P. Revuelta. The Tutte polynomial on the square lattice. (preprint).
[6] S. W. Golomb. Polyominoes. Georges Allen and Unwin Ltd, London, 1966.
[7] M. Jerrum and A. Sinclair. Approximating the permanent. SIAM J. Comput., 18(6):1149-1178, 1989.
[8] C. Kenyon and R. Kenyon. Tiling a polygon with rectangles. Proc. 33-rd FOCS, pages 610-619, 1992.
[9] M. Luby, D. Randall, and A. Sinclair. Markov chain algorithms for planar lattice structures. SIAM J. Comput., 31(1):167-192 (electronic), 2001.
[10] K. Makarychev and Y. Makarychev. Proof of Pak's conjecture on tilings by T-tetrominoes (in Russian), http://home.earthlink.net/〜makarychev/tetromino/tetro.htm.
[11] C. Merino and D. J. A. Welsh. Forests, colorings and acyclic orientations of the square lattice. Ann. Comb., 3(2-4):417-429, 1999 .
[12] C. Moore, I. Rapaport, and E. Remila. Tiling groups for wang tiles. Proc. 13-th SODA, pages 402-411, 2002 .
[13] I. Pak. Tile invariants: New horizons. Theor. Comp. Sci. (to appear).
[14] J. Propp. Generating random elements of finite distributive lattices. Electron. J. Combin., 4(2):Research Paper 15, approx. 12 pp. (electronic), 1997. The Wilf Festschrift (Philadelphia, PA, 1996).
[15] J. Propp and D. Wilson. Exact sampling with coupled Markov chains and applications to statistical mechanics. In Proceedings of the Seventh International Conference on Random Structures and Algorithms (Atlanta, GA, 1995), volume 9, pages 223-252, 1996.
[16] J. Propp and D. Wilson. Coupling from the past: a user's guide. In Microsurveys in discrete probability (Princeton, NJ, 1997), volume 41 of DIMACS Ser. Discrete Math. Theoret. Comput. Sci., pages 181192. Amer. Math. Soc., Providence, RI, 1998.
[17] E. Rémila. Tiling groups: new applications in the triangular lattice. Discrete Comput. Geom., 20(2):189204,1998 .
[18] Alistair Sinclair. Algorithms for random generation and counting. Progress in Theoretical Computer Science. Birkhäuser Boston Inc., Boston, MA, 1993.
[19] W. Thurston. Conway's tiling groups. Amer. Math. Monthly, 97(8):757-773, 1990.
[20] D. L. Vertigan and D. J. A. Welsh. The computational complexity of the Tutte plane: the bipartite case. Combin. Probab. Comput., 1(2):181-187, 1992.
[21] D. W. Walkup. Covering a rectangle with T-tetrominoes. Amer. Math. Monthly, 72:986-988, 1965.
[22] D. J. A. Welsh. Complexity: knots, colourings and counting, volume 186 of London Mathematical Society Lecture Note Series. Cambridge University Press, Cambridge, 1993.
## Note:
After the paper was finished there has been several subsequent developments. First, Michel Las Vergnas established a connection between our Theorem 13 and his results in the paper "On the evaluation at $(3,3)$ of the Tutte polynomial of a graph", J. Combin. Theory Ser. B, vol. 45 (1988), 367-372. The authors were not aware of this paper, but the connections is in the same spirit as the appendix.
The authors later generalized and extended Theorem 13 in this paper to plane and ribbon graphs in the recent preprint "Combinatorial evaluations of the Tutte polynomial", which is available from:
http://www-math.mit.edu/ pak/research.html
# TILE INVARIANTS: NEW HORIZONS
IGOR PAK
Department of Mathematics
MIT
Cambridge, MA 02139 USA
E-mail: pak@math.mit.edu
December 20,2000
#### Abstract
Let $\mathbf{T}$ be a finite set of tiles. The group of invariants $\mathbb{G}(\mathbf{T})$, introduced by the author $[\mathrm{P}]$, is a group of linear relations between the number of copies of tiles in tilings of the same region. We survey known results about $\mathbb{G}$, the height function approach, the local move property, various applications and special cases.
## Introduction
The problem of tileability of a region is very old, and in many instances computationally hard, even for small sets of tiles (see e.g. [MR,Ro]). The subject of this paper is different, although not unrelated. We study a group of invariants $\mathbb{G}=\mathbb{G}(\mathbf{T})$, associated with a set of tiles $\mathbf{T}$. This notion was introduced in $[\mathrm{P}]$, and further studied in $[\mathrm{MuP}, \mathrm{MoP}]$. The elements of $\mathbb{G}$ correspond to linear relations for the number of copies of tiles used in different tiling of every fixed region $\Gamma$. Turns out, this group has various nice properties, and in certain special cases can be fully computed.
In this paper we survey much of what is known about $\mathbb{G}$, the basic algebraic properties, some complexity results, as well as some applications and special cases. We describe some examples when coloring arguments do not suffice, while a different technique can be applied. A number of results never appeared before; their proofs will be sketched. We also include conjectures and open problems for further study.
Rather than define the group of invariants here, let us discuss a small but very interesting example of domino tilings, which was one of our motivations. Denote by $\tau_{1}, \tau_{2}$ the vertical and horisontal domino tiles, and let $\mathbf{T}=\left\{\tau_{1}, \tau_{2}\right\}$. Let $\Gamma$ be a connected region on a square grid. The problem of tileability of $\Gamma$ by $\mathbf{T}$ corresponds to finding a perfect matching in a dual graph, so it can be solved in polynomial time $[\mathrm{LP}]$.
Now, let $A$ be a tiling of $\Gamma$ by dominoes. Denote by $\alpha_{1}(A), \alpha_{2}(A)$ the number of times tiles $\tau_{1}, \tau_{2}$ appear in $A$. Clearly, $\alpha_{1}(A)+\alpha_{2}(A)=|\Gamma| / 2$, which follows
Key words and phrases. Polyomino tilings, tile invariants, Conway group, undecidability, height function.
from the area consideration. Also, one can show that $\alpha_{1}(A)=\operatorname{const}(\Gamma) \bmod 2$, where the const depends only on the region $\Gamma$, and not on the tiling. This follows from a simple coloring argument $[\mathrm{P}]$. We call the linear relations as above the tile invariants. In general, tile invariants are the linear relations of the type
$$
(*) c_{1} \alpha_{1}(A)+c_{2} \alpha_{2}(A)+\ldots \equiv \operatorname{const}(\Gamma) \bmod m
$$
where the const $(\Gamma)$ depends only on the region $\Gamma$, and not on the tiling $A$ of $\Gamma$; $c_{i} \in \mathbb{Z}$, and $m=\infty$ is allowed. The group $\mathbb{G}(\mathbf{T})$ can be defined as the group of such invariants, with addition as a group operation (the precise definition will be given in section 1). In the case of dominoes, the group of invariants is $\mathbb{G}(\mathbf{T})=\mathbb{Z} \times \mathbb{Z}_{2}$, generated by the two invariants described above.
Our goal is to determine the group of invariants, and compute it in some special cases. For example, as in the case of dominoes, tile invariants can often be derived from certain colorings of the squares. In section 1 we follow $[\mathrm{P}]$ and introduce the group of valuations $\mathbb{E} \subset \mathbb{G}$, closely related to the extended coloring arguments. As we mentioned above, in general not all tile invariants can be obtained by the extended coloring arguments. This difference can be underscored by the complexity results. We show that in general case computing $\mathbb{G}$ is NP-hard, and even undecidable when considered on the whole plane. At the same time, $\mathbb{E}$ can be determined in polynomial time (see section 3.)
Now, if the group $\mathbb{G}(\mathbf{T})$ is computed, one can use it to obtain criteria for tileability of regions $\Gamma$ tileable by $\mathbf{T}$ with a proper subset $\mathbf{T}^{\prime}$ of tiles. Indeed, in this case the number of times $\alpha_{i}$ the tiles $\tau_{i} \in \mathbf{T}^{\prime}$ can occur in the tiling of $\Gamma$ must satisfy a number of linear relations. Existence of integral solution of these relations gives a tileability criteria. This approach was pioneered in [CL] and later successfully used in $[\mathrm{P}]$ to obtain tileability results which cannot be proved by coloring arguments (see section 9.)
The difficulty with the group of invariants is proving that a suspected relation is indeed a tile invariant. At the moment we see only two ways of proving such a result. The first has to do with the local move property. Recall that one can obtain any domino tiling $A_{1}$ of a simply connected region $\Gamma$ to any other domino tiling $A_{2}$ of $\Gamma$ by a sequence of $2 \times 2$ moves (see e.g. [LP,T].) Now, in general, it suffices to check that a given relation is preserved by such moves. In fact, one can easily compute the whole group of invariants in this case (see section 4.)

FigURE 0.1. Local $2 \times 2$ move.
Unfortunately, very few sets of tiles have a finite number of local moves. For example, even for dominoes in three dimensions there exist infinitely many principally different simply connected regions which have exactly two domino tilings. In the other direction, even when we believe that there exist a finite number of local
moves, even when we conjecture we know them all, the problem of proving this claim may be very hard.
The second and the most successful at the moment approach is based on the notion of height function, and was inspired by the Conway group [CL] and Thurston's article $[\mathrm{T}]$. Roughly, Thurston defined a function from edges in the grid into a line, which maps tileable regions into loops. This approach is useful for proving local move property and finding new tile invariants [T,CL]. In the case of domino tilings, Thurston's height functions proves the connectivity of tilings by the $2 \times 2$ moves. It also gives a remarkable linear time algorithm for testing tileability of simply connected regions $[\mathrm{Ch}, \mathrm{F}]$. In sections 4,5 we present general conditions for the technique to succeed.
While our exposition is somewhat brief due to the space limitations, we include a large number of examples and references when the techniques in the survey were successfully applied to various tiling problems. Among others, we present a final result of computation of the ribbon tile invariants [MoP], started earlier in [CL,MuP,P1] (see section 6). We also go at length to describe the Generalized Sperner's Lemma which can also be defined as a tile invariant for a special set of tiles (section 8.1). We conclude with the heuristic method for study of general set of tiles.
Many results are only stated in the main body of the paper. We sketch the proofs of new results in section 10 .
## Acknowledgements.
We would like to thank David Ingerman, Ezra Miller, Cris Moore, Roman Muchnik, Jim Propp and Richard Stanley for stimulating conversations and encouragement. Without them this work would never be written. We are also grateful to Mike Sipser, Dan Spielman and Santosh Vempala for help with complexity questions.
## 1. BASIC DEFINITIONS
The most general tiling problem can be formulated as follows. Let $\Lambda$ be a finite or infinite set, and let $\mathcal{B}$ be a collection of finite subsets, which we call regions. Let ' $\sim$ ' be an equivalence relation on $\mathcal{B}$. We will assume that ' $\sim$ ' preserves size (the number of elements in the region). Finally, let $\mathbf{T}$ be a finite subset of $\mathcal{B}$ (the set of tiles). Denote by $\widetilde{\mathbf{T}}$ the set of regions $\tau \in \mathcal{B}$ such that $\tau \sim \tau^{\prime} \in \mathbf{T}$. We assume that $\tau \nsim \tau^{\prime}$, for all $\tau, \tau^{\prime} \in \mathbf{T}$.
A typical example is a square grid $\Lambda=\mathbb{Z}^{2}$ with a set of simply connected regions $\mathcal{B}$ and translation equivalence ' $\sim$ '. Note that we view tiles here as subsets of squares, for example dominoes correspond to pairs of adjacent squares in the grid.
The problem of tileability by the set of tiles $\mathbf{T}$ is a decision whether a given set $\Gamma \in \mathcal{B}$ can be presented as a disjoint union of regions in $\widetilde{\mathbf{T}}: \Gamma=\sqcup \tau_{i}$, where $\tau_{i} \in \widetilde{\mathbf{T}}$ for all $i$. We denote such tilings by $A$ and write $A \vdash \Gamma$. This problem is hard even in some very simple special cases, and will not be studied in this paper. Instead, we will study an abelian group $\mathbb{G}(\mathbf{T}, \mathcal{B})$ which can be defined as follows.
Let $\mathbf{T}=\left\{\tau_{1}, \ldots, \tau_{k}\right\}$ be the set of tiles, where $k=|\mathbf{T}|$. For every tiling $A$ of a region $\Gamma \in \mathcal{B}$ denote by $\alpha_{i}(A)$ the number of tiles $\tau \in A$ such that $\tau \sim \tau_{i}$. Now let
$$
\mathbb{G}(\mathbf{T}, \mathcal{B})=\mathbb{Z}^{k} / \mathbb{Z}\left\langle\left(\alpha_{1}(A)-\alpha_{1}\left(A^{\prime}\right), \ldots, \alpha_{k}(A)-\alpha_{k}\left(A^{\prime}\right)\right), \forall \Gamma \in \mathcal{B}, \forall A, A^{\prime} \vdash \Gamma\right\rangle
$$
where on the right hand side we have a subgroup of $k$-vectors with $A, A^{\prime}$ any two tilings by $\mathbf{T}$ of the same region $\Gamma \in \mathcal{B}$. This is a group of invariants, the main subject of this paper. The elements of $\mathbb{G}(\mathbf{T}, \mathcal{B})$ are called tile invariants.
In general, $\mathbb{G}(\mathbf{T}, \mathcal{B})$ may depend heavily on the set of regions (all regions vs. simply connected regions) as well as a set of tiles (adding one tile may destroy most of the tile invariants). Note also that if $\mathcal{B}_{1} \subset \mathcal{B}_{2}$, then $\mathbb{G}\left(\mathbf{T}, \mathcal{B}_{1}\right) \supset \mathbb{G}\left(\mathbf{T}, \mathcal{B}_{2}\right)$. Similarly, if $\mathbf{T}_{1} \subset \mathbf{T}_{2}$, then
$$
\mathbb{G}\left(\mathbf{T}_{2}, \mathcal{B}\right) \subset \mathbb{G}\left(\mathbf{T}_{1}, \mathcal{B}\right) \times \mathbb{Z}^{\left|\mathbf{T}_{2}\right|-\left|\mathbf{T}_{1}\right|}
$$
Define a coloring group
$$
\mathbb{O}(\mathbf{T})=\mathbb{Z}^{\Lambda} / \mathbb{Z}\left\langle x_{1}+\cdots+x_{r}=0, \forall \tau=\left\{x_{1}, \ldots, x_{r}\right\} \in \widetilde{\mathbf{T}}\right\rangle
$$
One can think of elements of $\mathbb{D}$ as of functions $f: \Lambda \rightarrow \mathbb{Z}$, such that $f(\Gamma)=$ $\sum_{x \in \Gamma} f(x)$, and $f(\tau)=0$ for all $\tau \in \widetilde{\mathbf{T}}$. The function $f$ is called a coloring map. Before recently, coloring maps were the main tool to prove untileability [G]. Indeed, if $f(\Gamma) \neq 0$, this immediately implies that $\Gamma$ is not tileable by $\mathbf{T}$. In this case we say that a coloring argument $f$ rejects tileability of $\Gamma$. Let us add that any map $f: \Lambda \rightarrow G$, where $G$ is abelian, can obtain from the above functions. In other words, if any coloring arguments $f: \Lambda \rightarrow G$ rejects tileability of $\Gamma$, for some abelian group $G$, it also rejects tileability for some $f: \Lambda \rightarrow \mathbb{Z}_{m}$.
Now, define an extended coloring group
$$
\overline{\mathbb{O}}(\mathbf{T})=\mathbb{Z}^{\Lambda} / \mathbb{Z}\left\langle x_{1}+\cdots+x_{r}=y_{1}+\cdots+y_{r}\right\rangle
$$
where $\tau=\left\{x_{1}, \ldots, x_{r}\right\}, \tau^{\prime}=\left\{y_{1}, \ldots, r_{r}\right\}$, and $\tau \sim \tau^{\prime} \in \widetilde{\mathbf{T}}$. Clearly, $\mathbb{O}(\mathbf{T}) \subset \overline{\mathbb{O}}(\mathbf{T})$. One can think of the elements of $\overline{\mathbb{O}}(\mathbf{T})$ as of functions $f: \Lambda \rightarrow \mathbb{Z}$, which are constant on equivalent tiles in $\widetilde{\mathbf{T}}$. We call such functions an extended coloring maps.
There is a natural map $\nu: \overline{\mathbb{O}}(\mathbf{T}) \rightarrow \mathbb{Z}^{\mathbf{T}}$ which maps the functions to their values on tiles in $\mathbf{T}$. We have $\mathbb{O}(\mathbf{T})=\nu^{-1}(0)$. By definition, the value $f(\Gamma)$ of a function in $\overline{\mathbb{O}}(\mathbf{T})$ is independent on the tiling by $\mathbf{T}$, so $\nu$ extends to the quotient group $\mathbb{G}(\mathbf{T})$. Denote by $\mathbb{E}(\mathbf{T})$ the image of $\nu$ in $\mathbb{G}(\mathbf{T})$. We call $\mathbb{E}(\mathbf{T})$ the group of valuations of the set of tiles T. From above,
$$
\mathbb{E}(\mathbf{T}) \simeq \overline{\mathbb{O}}(\mathbf{T}) / \mathbb{O}(\mathbf{T})
$$
By definition, the subgroup $\mathbb{E}(\mathbf{T}) \subset \mathbb{G}(\mathbf{T})$ consists of all tile invariants which follow from the extended coloring maps.
Computing the coloring group and the group of valuations is of interest, so as to see which tileability criteria and which group invariants are "easy to obtain".
Unless stated otherwise, for the rest of the paper we will assume that $\Lambda \subseteq Z^{2}$, where $\mathrm{Z}^{2}$ denotes the square grid with elements $-1 \times 1$ squares. Denote by $\mathcal{B}, \mathcal{B}_{\mathrm{sc}}$, $\mathcal{B}_{N}$ the set of all regions, of all simply connected regions, and the set of regions in $N \times N$ square. The equivalence relation consists of parallel translations of the
regions (no rotation or reflection is allowed). Let the set of tiles $\mathbf{T}$ consist of some $k$ tiles, each of size $\leq R$. By abuse of notation, we use $\tau \in \mathbf{T}$ to denote $\tau \in \widetilde{\mathbf{T}}$.
The main questions of this paper can be stated as follows:
## Group of Invariants Problem (GI) :
Given $\mathbf{T} \subset \mathrm{Z}^{2}$, compute $\mathbb{G}(\mathbf{T}, \mathcal{B})$ (or $\mathbb{G}\left(\mathbf{T}, \mathcal{B}_{\text {sc }}\right), \mathbb{G}\left(\mathbf{T}, \mathcal{B}_{N}\right)$ ).
Tileability Problem (T) :
Given $\mathbf{T} \subset \mathrm{Z}^{2}, \Gamma \in \mathcal{B}$ (or $\mathcal{B}_{\mathrm{sc}}, \mathcal{B}_{N}$ ), decide whether $\Gamma$ is tileable by $\mathbf{T}$.
## Group of Valuations Problem (GV) :
Given $\mathbf{T} \subset \mathrm{Z}^{2}$, compute $\mathbb{E}(\mathbf{T})$.
## Coloring Group Problem (CG) :
Given $\mathbf{T} \subset \mathrm{Z}^{2}$, compute $\mathbb{O}(\mathbf{T})$.
The last two problems are very much related, but we decided to separate them for convenience.
We say that a tile invariant is finite (infinite) if the order of the element in $\mathbb{G}$ is finite (infinite). Using definition (*) in the introduction, the invariant is infinite if $m=\infty$. We will come back to tile invariants in the next section.
Remark 1.1 Much of this survey can be understood with conventional definitions of the tilings on a square grid. The point of this somewhat overgeneralized section was to introduce the general concepts and notation we use throughout the paper, as well as to prepare the reader to possible extensions and generalizations. While much of the results in the paper can be generalized by verbatim, we decided to keep the presentation simple for the sake of clarity. At the same time we hope that after reading this section the reader is fully equipped to generalize the results to any appropriate level.
Remark 1.2 One should keep in mind that the tile invariants were implicitly introduced in [CL] in order to obtain new tileability criteria. Although we downplay the connection in this paper, the results that are obtained in this direction can be judges as the most unexpected. See section 9 for for details.
## 2. AlgebRAIC ASPECTS
Fix a set of tiles $\mathbf{T}=\left\{\tau_{1}, \ldots, \tau_{k}\right\} \subset \mathrm{Z}^{2}$. Consider $\mathbb{G}=\mathbb{G}(\mathbf{T}, \mathcal{B})$. Since $\mathbb{G}$ is abelian, it can be presented as
$$
\mathbb{G} \simeq \mathbb{Z}^{r} \times\left(\mathbb{Z}_{2}\right)^{m_{2}} \times\left(\mathbb{Z}_{3}\right)^{m_{3}} \times \cdots \times\left(\mathbb{Z}_{p^{c}}\right)^{m_{p^{c}}} \times \ldots
$$
where $r \leq k$ is called the free rank of $\mathbb{G}$, denotes $\operatorname{rk}(G)$, and $\mathbb{Z}^{\mathrm{rk}} \subset \mathbb{G}$ is called the free subgroup of $\mathbb{G}$. Similarly, denote by $M=\sum_{q=p^{c}} m_{q}$ the torsion rank of $\mathbb{G}$, and $\mathbb{T}=\left(\mathbb{Z}_{2}\right)^{m_{2}} \times\left(\mathbb{Z}_{3}\right)^{m_{3}} \times \ldots \subset \mathbb{G}$ is called the torsion subgroup of $\mathbb{G}$. By construction, the torsion subgroup is always finite.
Proposition 2.1 For $N$ sufficiently large, we have $\mathbb{G}\left(\mathbf{T}, \mathcal{B}_{N}\right)=\mathbb{G}(\mathbf{T}, \mathcal{B})$.
Sketch of proof. Consider a sequence of subgroups $\mathbb{G}_{N}=\mathbb{G}\left(\mathbf{T}, \mathcal{B}_{N}\right)$. Recall that $\mathbb{G}_{N} \supset \mathbb{G}_{N+1}$. By Hilbert Basis Theorem, this sequence stabilizes.
Now let us turn to signed tilings and the coloring group. Denote by $\chi(\Gamma) \in \mathbb{R}^{\Lambda}$ the characteristic function of a region $\Gamma$. One can think of a tiling of $\Gamma$ by $\mathbf{T}$ as of decomposition $\chi(\Gamma)=\chi(\tau)+\chi\left(\tau^{\prime}\right)+\ldots$, where $\tau, \tau^{\prime}, \cdots \in \mathbf{T}$. The signed tiling is similar decomposition, where each tile is used with a positive or negative sign. Note that the notion of the coloring argument extends to signed tilings as well.
Theorem $2.2[\mathrm{P}]$ A region $\Gamma$ has a signed tiling by $\mathbf{T}$ if and only if there is no coloring argument which would reject tileability.
Sketch of proof. Note that signed tilings by $\mathbf{T}$ form a group $\mathbb{S}(\mathbf{T})$, with addition as an operation. By definition, we have $\mathbb{O}(\mathbf{T})=\mathbb{Z}^{\mathbf{T}} / \mathbb{S}(\mathbf{T})$, which is a reformulation of the result.
Similarly to the coloring arguments, consider the extended coloring arguments for signed tilings. Define $\mathbb{E}_{\circ}(\mathbf{T})=\mathbb{E}(\mathbf{T} \cup-T)$, where $-\mathbf{T}$ contains the negative tiles $-\tau$, with $\chi_{-\tau}=-\chi_{\tau}$. We claim that
$$
\mathbb{E}_{\mathrm{o}}(\mathbf{T}) \simeq \mathbb{E}(\mathbf{T})
$$
Indeed, let $f: \Lambda \rightarrow Z$ be any extended coloring map. Since $\chi_{-\tau}+\chi_{\tau}=0$, we have $f(-\tau)=-f(\tau)$ and thus $\mathbb{E}_{0}(\mathbf{T}) \subset \mathbb{E}(\mathbf{T})$. On the other hand, $\mathbb{E}(\mathbf{T}) \subset \mathbb{E}_{0}(\mathbf{T})$ since every extended coloring map by definition corresponds to an extended coloring map for signed tiles $\mathbf{T} \cup-\mathbf{T}$, and therefore defines a proper valuation on $\mathbf{T} \cup-\mathbf{T}$.
An interesting class of tile invariants are the abelian invariants, which are defined as tile invariants which remain invariants for signed tilings. Define group of abelian invariants $\mathbb{A}(\mathbf{T})=\mathbb{G}(\mathbf{T} \cup-\mathbf{T})$. From above, we conclude that $\mathbb{E}(\mathbf{T}) \subset \mathbb{A}(\mathbf{T})$. In fact, this is an identity:
Theorem $2.3 \mathbb{A}(\mathbf{T})=\mathbb{E}(\mathbf{T})$.
The real meaning of Theorem 2.3 can be seen in the following observation. If for some reason we have an abelian invariant, we can conclude that there exists a coloring map which defines it. In practice, finding such coloring map can be complicated. We leave the proof to the reader.
## 3. COMPLEXITY ASPECTS
It is well known that the tileability problem is NP-complete when $\Gamma$ is finite [GJ]. It is also undecidable when $\Gamma$ is the whole plane [Be,Ri]. We shall prove that the similar situation holds for GI Problem. But first we need to state it as a decision problem.
GI-rank Problem: Given $\mathbf{T}, r$, decide whether $\operatorname{rk} \mathbb{G}(\mathbf{T}, \mathcal{B}) \geq r$.
Bounded GI-rank Problem: Given T, $r, N$, decide whether $\operatorname{rk} \mathbb{G}\left(\mathbf{T}, \mathcal{B}_{N}\right) \geq r$.
Theorem 3.1 The GI-rank Problem is undecidable. Similarly, the Bounded GI-rank Problem is NP-hard.
The proof is given below in section 10. Roughly, Theorem 3.1 implies that computationally GI is intractible. A simple check shows that Theorem 3.1 extends to simply connected regions as well (i.e. computing the rank of $\mathbb{G}\left(\mathbf{T}, \mathcal{B}_{\text {sc }}\right)$ is also undecidable). It seems likely that the proof can be modified to show that computing any of the exponents $m_{p}$ in the torsion group is also undecidable.
Now, let us fix the set of tiles $\mathbf{T}$. Recall that $\operatorname{rk}(\mathbb{G}) \leq|\mathbf{T}|$. Proposition 2.1 implies that the negative answer to the Bounded GI-rank Problem can be obtained by an exhaustive search for some finite $N=N(\mathbf{T})$. In other words, a sequence of Bounded GI-rank Problems is in co-NP (as $N$ grows). The certificate for $\operatorname{rk}(\mathbb{G})n-r$ bounded regions $\Gamma_{i}, 1 \leq i \leq l$, and two collections of tilings $A_{i}, A_{i}^{\prime} \vdash \Gamma_{i}$, such that
$$
\operatorname{rk} \mathbb{Z}\left\langle\left(\alpha_{1}\left(A_{i}\right)-\alpha_{1}\left(A_{i}^{\prime}\right), \ldots, \alpha_{k}\left(A_{i}\right)-\alpha_{k}\left(A_{i}^{\prime}\right)\right), i=1 \ldots l\right\rangle>n-r
$$
In a way this makes it unlikely that there is a good generic way to establish the tile invariants for general sets of tiles. For example, if height functions exist for a given set of tiles, this puts the Bounded GI-rank Problem into NP. However, it is believed that an NP-hard problem cannot be in NP $\cap$ co-NP [GJ]. We will not attempt to formalize and extend this observation.
For the signed tilings, one can define the Signed Tileability Problem (ST) by analogy. Observe that Theorem 2.2 can be used now to establish the certificates for $\operatorname{rk}(\mathbb{O}) \geq r, m_{p}(\mathbb{O}) \geq m$. Using the logic as above one would conclude that ST and CG must have efficient solutions. This is true indeed.
Bounded CG-rank Problem: Given $\mathbf{T}, r, N$, decide whether $r k \mathbb{O}\left(\mathbf{T}, \mathcal{B}_{N}\right) \geq r$.
Bounded GV-rank Problem: Given $\mathbf{T}, r, N$, decide whether $r k \mathbb{E}\left(\mathbf{T}, \mathcal{B}_{N}\right) \geq r$.
Theorem 3.2 Bounded CG-rank Problem and Bounded GV-rank Problem are in $\mathrm{P}$.
The proof is based on a simple reduction to a linear algebra problem, and is given in section 10. We believe that currently known algorithms for solving linear equations over the integers (see [BK,LLL,Sc]) can be used to determine the full groups $\mathbb{O}\left(\mathbf{T}, \mathcal{B}_{N}\right), \mathbb{E}\left(\mathbf{T}, \mathcal{B}_{N}\right)$. Further, we conjecture that there exist an efficient algorithm for computing $\mathbb{O}(\mathbf{T}, \mathcal{B}), \mathbb{E}(\mathbf{T}, \mathcal{B})$. We hope to return to this problem in the future.
## 4. HeigHT FUNCTionS
There seem to be no general agreement as to what exactly is the method of height functions, especially when dimension increases. Here we present our personal approach with no attempt to justify it.
Suppose $\mathbf{T}$ is a fine set of tiles of the plane $\mathrm{Z}^{2}$, or any other plane graph $L$ with straight edges for that matter (for example $L$ can be triangular of hexagonal lattice). Let $V$ be a different plane, which will also be fixed. Suppose the edges of $L$ are oriented, and there is a function $\varphi: L \rightarrow V$ which maps oriented edges into vectors in $V$. Also, let $\varphi(x, y)=-\varphi(y, x)$ for all edges $(x, y) \in L$ oriented from $y$
to $x$. Now, every path $x_{1} \rightarrow x_{2} \rightarrow x_{3} \rightarrow \ldots$ can be mapped to a path in $V$ (up to translation): $v_{1} \rightarrow v_{2} \rightarrow v_{3} \rightarrow \ldots$, where $v_{i+1}-v_{i}=\varphi\left(x_{i}, x_{i+1}\right)$. We think about the image of the path on a graph as a polygon in $V$ with straight edges.
The function $\varphi$ is called a height function if the following condition is satisfied:
( $\star$ ) For every simply connected region $\Gamma$ tileable by a set of tiles $\mathbf{T}$, the image $\varphi(\partial \Gamma)$ is a closed loop.
Here the boundary $\partial \Gamma$ is a closed path with any fixed starting point and oriented counterclockwise. We will always assume that there is a finite number of equivalence classes of values $\varphi(x, y)$ for all $(x, y) \in L$. The condition $(\star)$ may seem difficult to check, so the following result helps to simplify it.
Theorem 4.1 It suffices to check ( $\star$ ) only for the tiles $\tau \in \mathbf{T}$.
The theorem follows easily by induction from the following lemma of independent interest.
Lemma 4.2 Let $\Gamma \subset \mathbb{R}^{2}$ be a simply connected region and is tiled by simply connected regions $\tau_{1}, \ldots, \tau_{k}$. Then there exist $i$ such that $\Gamma-\tau_{i}$ is also simply connected.
Lemma 4.2 seems to be well known in geometric group theory, although we were unable to obtain any reference to that. In this context it was sketched in the pioneer paper [CL]. A simple proof can be found in [MP] (see also [Pr]).
Let us remark that in 3 and more dimensions Lemma 4.2 as stated is incorrect ${ }^{1}$. On the other hand, proof of Theorem 4.1 requires a result somewhat weaker that that in the lemma. For example, one can change the statement to "there exist $i_{1}, \ldots, i_{l}$ such that regions $\tau_{i_{1}} \cup \ldots \cup \tau_{i_{l}}$ and $\Gamma-\left(\tau_{i_{1}} \cup \ldots \cup \tau_{i_{l}}\right)$ are simply connected ${ }^{2}$. We do not believe that even this weaker condition holds. It would be interesting to find an explicit counterexample to that.
Now, once the height function is given, it can be used to prove certain tile invariants for the set of tiles $\mathbf{T}$, not unlike the extended coloring arguments. Indeed, consider any extended coloring argument $f: V \rightarrow G$ ( $G$ is abelian), where now we require the value $f(\varphi(\tau))$ to be invariant of the location of the $\tau$ on the plane. By construction, $f(\varphi(\Gamma))$ is always the sum of the $f\left(\varphi\left(\tau_{i}\right)\right)$ and is independent of the tiling. Therefore the values $c_{i}=f\left(\varphi\left(\tau_{i}\right)\right), \tau \in \mathbf{T}$ define a tile invariant for $\mathbf{T}$.
Formally, denote by $\mathbb{E}_{\varphi}(\mathbf{T})$ the group of valuations of extended coloring arguments on $V$ for the set of tiles $\varphi\left(\tau_{i}\right)$. Then
$$
(* *) \quad \mathbb{E}_{\varphi}(\mathbf{T}) \subseteq \mathbb{G}\left(\mathbf{T}, \mathcal{B}_{\mathrm{sc}}\right)
$$
This means that in certain cases when there exists a height function, one can obtain proofs of certain tile invariants by finding an appropriate extended coloring[^6]argument in $V$. In other words, one can sometimes compute the whole group of invariants $\mathbb{G}\left(\mathbf{T}, \mathcal{B}_{\text {sc }}\right)$.
We should note here that condition $(\star)$ does not necessarily imply that $\varphi(A)$, $A \vdash \Gamma$ is a tiling of $\Gamma$ with tiles $\varphi\left(\tau_{i}\right)^{3}$. Rather, we obtain a signed tiling of $\varphi(\Gamma)$. Still, the conclusion $(* *)$ remains valid in view of results in section 3.
Let us emphasize once again, that the relationship
$$
\text { height functions } \longleftrightarrow \text { tile invariants }
$$
seem to go smoothly only on a plane. In principle, of course, neither $\Lambda$ nor $V$ have to be planar. There are several interesting example of the height functions when $V$ is a line and dimension of $\Lambda$ varies. We will come back to such examples in the next section. Let us note also that we don't seem to have any nontrivial example of two-dimensional height functions when $\Lambda$ is not planar, and nothing at all when $V$ is three and more - dimensional.
## 5. LOCAL MOVES
### 5.1 One-dimensional height functions.
Let $\mathbf{T}$ be a finite set of tiles, $\mathcal{B}$ be any set of finite regions. We say that $\mathbf{T}$ satisfies local move property with respect to $\mathcal{B}$ if there exists a finite set of regions $\Gamma_{1}, \ldots, \Gamma_{\ell} \in \mathcal{B}$, and two collections of tilings $A_{i}, A_{i}^{\prime} \vdash \Gamma_{i}$, for all $1 \leq i \leq \ell$ (cf. section 3 ), such that
$(\diamond)$ For every $\Gamma \in \mathcal{B}$ and two tilings $A, A^{\prime} \vdash \Gamma$, there exists a sequence of tilings $A=B_{0} \rightarrow B_{1} \rightarrow \ldots \rightarrow B_{t}=A^{\prime}$, where the arrow $X \rightarrow Y$ is between two tilings which differ in a region $\Gamma^{\prime} \sim \Gamma_{i}$, with the tilings $X, Y$ restricted to $\Gamma^{\prime} \subset \Gamma$, being the tilings $A_{i}$ and $A_{i}^{\prime}$.
Theorem 5.1 If $\mathbf{T}$ satisfies local move property with respect to $\mathcal{B}$, then the GI-rank Problem is in $\mathrm{P}$.
The main problem with the local move property is scarcity of the sets of tiles which have it and difficulty of proving it in this case. Most known approaches are more or less ad hoc, with a small exception of the height function approach. Again, there seem to be no consensus of how this should work in general. We describe here a version of it, following $[\mathrm{T}, \mathrm{Ch}, \mathrm{ST}]$.
Let $\Lambda \subset \mathbb{R}^{d}$ be a d-dimensional structure (set of lattice cubes, simplices, etc.) For every $\Gamma \subset \Lambda$ denote by $\widehat{\Gamma}$ the set of points $x \in \mathbb{R}^{d}$ inside $\Gamma$. Suppose $\varphi: \Lambda \rightarrow \mathbb{R}$ is a one dimensional height function, such that $\varphi: \tau \rightarrow \mathbb{R}$ can be defined at all points $x \in \widehat{\tau}$ (by using piecewise linearity, or otherwise). This defines a function $\varphi_{A}: \widehat{\Gamma} \rightarrow \mathbb{R}$ for every tiling $A \vdash \Gamma$. We say that $\varphi(A) \leq \varphi\left(A^{\prime}\right)$, where $A, A^{\prime} \vdash \Gamma$, if for all points $x \in \Gamma$ we have $\varphi_{A}(x) \leq \varphi_{A^{\prime}}(x)$. Finally, denote by ' $\prec$ ' a partial linear order on tilings $A, A^{\prime} \vdash \Gamma$ :
$$
A \prec A^{\prime} \text { if and only if } \varphi(A) \leq \varphi\left(A^{\prime}\right)
$$[^7]
Note that a priori there could be incomparable tilings.
Now, suppose the "suspected" set of local moves
$$
\text { (○) }\left\{\left(A_{i} \rightarrow A_{i}^{\prime}\right), A_{i}, A_{i}^{\prime} \vdash \Gamma_{i}, 1 \leq i \leq \ell\right\}
$$
satisfied the following properties:
($\cdot$) Either $A_{i} \prec A_{i}^{\prime}$ or $A_{i} \succ A_{i}^{\prime}$ for all $1 \leq i \leq \ell$.
$(\bullet \bullet)$ If $x \in \widehat{\Gamma}-\partial \Gamma$, is a local maximum of $\varphi_{A}, A \vdash \Gamma$, then there exists a local move $A \rightarrow A^{\prime}$ such that $A^{\prime} \prec A$.
$(\bullet \bullet \bullet)$ For all $x \in \partial \Gamma$ there exists a unique tile $\tau_{x}, \widehat{\tau} \ni x$, such that if $x$ is a local maximum of $\varphi_{A}, A \vdash \Gamma$, then $A \ni \tau$.
Theorem 5.2 Let $\mathcal{B}=\mathcal{B}_{\text {sc }}$ and $d=2$. If (O) and a one-dimensional height function $\varphi$ satisfies $(\bullet)-(\bullet \bullet \bullet)$ for all $\Gamma \in \mathcal{B}$, then $\mathbf{T}$ satisfies the local move property with respect to $\mathcal{B}$, with $(\bigcirc$ ) as a set of local moves. Further, the maximum number $M$ of local moves to be made satisfies $M \leq c|\Gamma|^{2}$, where $c=c(\mathbf{T})$ does not depend on $\Gamma$. Finally, the Tileability Problem is in $\mathrm{P}$ in this case.
To avoid problems related to generalizations of Lemma 4.2, the above result covers only the case $d=2$. For $d \geq 3$ we need an additional geometric condition to compensate for absence of the Lemma. Formally, consider the following property:
(\&) For every local maxima $x \in \partial \Gamma, \Gamma \in \mathcal{B}$ we always have $\Gamma-\tau_{x}=\Gamma^{\prime} \sqcup \Gamma^{\prime \prime} \sqcup \ldots$, where $\Gamma^{\prime}, \Gamma^{\prime \prime}, \ldots \in \mathcal{B}$.
It is easy to see that $\mathcal{B}_{\mathrm{sc}}$ satisfies ( $\boldsymbol{\rho}$ ) for $d=2$, so the following result is a generalization of Theorem 5.2.
Theorem 5.2 ${ }^{\prime}$ If in condition of Theorem 5.2 the property (か) is also satisfied, then conclusion of Theorem 5.2 holds for all $d \geq 2$.
Note that the conclusion of Theorem 5.2 implies, by Theorem 5.1, that the GI Problem is also in $\mathrm{P}$ in this case. As we shall see, the examples include domino tilings, zonotopal tilings, etc. It would be interesting to find analogs of ( $\bullet$ ) for two-dimensional height function. This could positively resolve the connectivity conjecture for ribbon tilings.
Conjecture 5.3 If T satisfies the local move property with respect to $\mathcal{B}_{\mathrm{sc}}$, then Tileability Problem for regions $\Gamma \in \mathcal{B}_{\mathrm{sc}}$ is in $\mathrm{P}$.
While we have only few known examples of the local moves property, the conjecture seem to hold. Theorem 5.2 seem to support the conjecture. Note that if $\Gamma \in \mathcal{B}$ is untileable, then $(\diamond)$ holds by default. Heuristicly, the conjecture suggests that for any set of local moves one should be able to define a "generalized one-dimensional height function", and apply the analog of the last part of Theorem 5.2.
### 5.2 Tiling Polytope.
Let us conclude this section with a polytopal interpretation of the local moves. Define rational tilings (cf. [SU]) to be decompositions $\chi(\Gamma)=\kappa \chi(\tau)+\kappa^{\prime} \chi\left(\tau^{\prime}\right)+\ldots$, where $\tau, \tau^{\prime}, \cdots \in \mathbf{T}, \kappa, \kappa^{\prime}, \cdots \in \mathbb{Q}_{+}$.
Theorem 5.4 Rational Tileability Problem is in $\mathrm{P}$.
Proof. Let ' $\prec$ ' be a lexicographic order on $\Lambda$. For any $\tau \in \mathbf{T}$, denote by $\tau_{x}$ the unique tile $\sim \tau$, such that $x \prec y$ for all $y \in \tau_{x}$. In other words, let $\tau_{x}$ be the tile obtained by translation of $\tau$ such that $x$ is the smallest element in $\tau_{x}$.
Let $k=|\mathbf{T}|$. For any region $\Gamma \in \mathcal{B}$, consider a polytope $\mathbf{P}_{\Gamma} \subset \mathbb{R}^{k|\Gamma|}=$ $\mathbb{R}\left\langle a_{x, \tau}, x \in \Gamma, \tau \in \mathbf{T}\right\rangle$, defined by the following linear equations and inequalities:
$$
\left\{\begin{array}{l}
a_{x, \tau} \geq 0, \quad \forall x \in \Gamma, \tau \in \mathbf{T} \\
\sum_{x, \tau: \tau_{x} \ni y} a_{x, \tau}=1, \forall y \in \Gamma
\end{array}\right.
$$
Now, every rational point $(a)$ in the polytope $\mathbf{P}_{\Gamma}$ corresponds to a rational tiling with $\kappa_{\tau_{x}}=a_{x, \tau}$. Since the system is rational, the rational tileability is equivalent to $\mathbf{P}_{\gamma}$ being empty or not. The latter can be determined in polynomial time (see e.g. $[\mathrm{Sc}])$.
Proposition 5.5 Let $\mathbf{P}_{\Gamma}$ be the polytope defined in the proof of Theorem 5.4. Then the integer points in $\mathbf{P}_{\Gamma}$ correspond to the (usual) tilings of $\Gamma$ with the set of tiles $\mathbf{T}$.
One can think of the points in $\mathbf{P}_{\Gamma}$ as of nonnegative real tilings of $\Gamma$. All the vertices are the rational tilings. Unfortunately, not all of them are integer (the usual) tilings. Denote by $\widehat{\mathbf{P}}_{\Gamma} \subset \mathbf{P}_{\Gamma}$ a convex hull of the integer points. We call $\widehat{\mathbf{P}}_{\Gamma}$ the tiling polytope. By definition, $\widehat{\mathbf{P}}_{\Gamma}$ is a $0-1$ polytope.
Let $A, A^{\prime} \vdash \Gamma$. We say that a local move $A \rightarrow A^{\prime}$ is primitive if for no $B \vdash \Gamma$ we can have two nonintersecting local moves $A \rightarrow B$ and $B \rightarrow A^{\prime}$.
Theorem 5.6 The primitive moves $A \rightarrow A^{\prime}$, where $A, A^{\prime} \vdash \Gamma$, are in one-to-one correspondence with edges in the tiling polytope $\widehat{\mathbf{P}}_{\Gamma}$.
We should mention here that for large $\Gamma$ the set of edges of the tiling polytope is much larger than the set of local moves described in the beginning. Indeed, while the local moves can be (and usually are) primitive moves, the minimal set of local moves is a very small subset of primitive moves which can be compositions of a number of (intersecting) local moves.
It is tempting to study the simplex method or other optimization problems on tiling polytopes. The difficulty is that the minimum number of linear relations and inequalities which define $\widehat{\mathbf{P}}_{\Gamma}$ is probably exponential in $|\Gamma|$ (it's superpolynomial unless $\mathrm{P}=\mathrm{NP}$ ).
### 5.3 Zonotopal tilings.
It was noted on many occasions that one can think of tilings by "lozenges" (analogues of dominoes in the triangular lattice) as of projection of the cubic surface, at least for certain nice simply connected regions. In fact, Thurston's height function coincides with the height of the surface in these cases (see [T,ST]). Let us briefly mention here that one can consider zonotopal tilings which extend this observation.
Let $M$ be a finite set of vectors in $V=\mathbb{R}^{d}$ and suppose $\langle M\rangle=V$. Consider a polytope $P_{M}$ defined as a Minkowski sum of elements in $M$ (considered as intervals). Such polytopes are called zonotopes. Call basis blocks zonotopes $P_{B}$ such that $B \subset M,\langle B\rangle=B=d$. Polyhedral subdivision of $P_{m}$ into basis blocks are called zonotopal tilings. They have a number of interesting properties, in particular the basis blocks in every zonotopal tiling are in one to one correspondence with bases of a matroid $M$ [BLSWZ,St,Z]. In fact, much of the information about $P_{M}$ and zonotopal tilings can be obtained from from the (oriented) matroid structure of $M$ (see references above).

Figure 5.1. Two zonotopal tiling of a centrally symmetric 10-gon.
Among the most interesting properties of zonotopal tilings is (non)existence of a one-dimensional height functions. The latter correspond to the so-called 1extensions of $M$ (into $\mathbb{R}^{d+1}$ ). One can show that all zonotopal tilings that arise from every such extension are connected by "local moves" (in zonotopes generated by $d+1$ vectors). While 1-extensions of $M$ may generate all tilings, all 1-extensions can make a graph of zonotopal tilings connected (there is a related notion of a coherent subdivision [GKZ,Z]). Still, there exist zonotopal tilings disconnected from the others. We refer to the above mentioned [BLSWZ,GKZ,St,Z] and the references therein.
## 6. RIBBON TILES
### 6.1 Basic definitions.
Let $\Lambda=\mathrm{Z}^{2}$ be the square grid. Let $x=(i, j) \in \Lambda$ be the square in $\mathrm{Z}^{2}$ with $i$ increasing downward and $j$ increasing to the right. As before, let ' $\sim$ ' be defined by translations.
Fix an integer $n \geq 2$. A region $\tau \in \mathcal{B}_{\text {sc }}$ is called a ribbon tile if every diagonal $i-j=$ const contains at most one square of $\tau$. Denote by $\mathbf{T}_{n}$ the set of ribbon tiles with $n$ squares. It is easy to see that $\left|\mathbf{T}_{n}\right|=2^{n-1}$, with tiles $\tau$ encoded by $\epsilon=\left(\epsilon_{1}, \ldots, \epsilon_{n-1}\right), \epsilon_{i} \in\{0,1\}$ as follows. Start in the lower left corner of $\tau$ and move northeast; each upward move encode with 1 , each right move with 0 . Denote by $\tau_{\epsilon}$ the tile as above, and by $\alpha_{\epsilon}(A)$ the number of times tile $\tau_{\epsilon}$ occurs in a tiling $A$.
Define 2-moves to be the local moves which involve exactly two ribbon tiles. For description of all such moves see [P]. As observed by Adin [Ad], the total number of such moves is $\binom{\left|\mathbf{T}_{n}\right|}{2}$. This formula is somewhat misleading since not all pairs of ribbon tiles can form a 2-move, while some pairs can form it in several ways.

Figure 6.1. Ribbon trominoes.

Figure 6.2. Example of 2-move for ribbon tiles.
The main object of this section is the successful computation of $\mathbb{G}\left(\mathbf{T}_{n}\right)$, and the local move property with respect to 2-moves. Note that there is an obvious area invariant which states that the total number of tiles $\tau$ is $|\Gamma| / n$.
### 6.2 Dominoes.
This is a classical example studied for decades (see e.g. [G,Ka,LP,TF]). Thurston $[\mathrm{T}]$. defined an important one-dimensional height function $\varphi$ which became a model for our generalization in section 5 . Color the squares with two colors (black and white) in a checkerboard fashion. Orient all edges upward and to the right. The map $\varphi$ is defined on edges in $\mathrm{Z}^{2}$, and is $+1(-1)$ if the edge is moving counterclockwise (clockwise) around a black square.
One can show that the above height function with the set of 2-moves satisfies $(\bullet)-(\bullet \bullet \bullet)$. From here we obtain the local move property for 2 -moves with respect to $\mathcal{B}_{\mathrm{sc}}$ as an immediate conclusion of Theorem 5.2. An elementary example shows that this does not hold for non simply connected regions. We should mention here that the result can be generalized to any planar regular graph with a bipartite dual graph [Ch]. Also, a careful look at the tileability algorithm reveals that it has cost $O(|\Gamma|)$, faster than other (general) matching algorithms [LP,Sc]. This result can be extended to non simply connected regions as well $[\mathrm{F}]$.
As mentioned in the introduction, the group of invariants $\mathbb{G}\left(\mathbf{T}_{2}\right) \simeq \mathbb{E}\left(\mathbf{T}_{2}\right) \simeq$ $\mathbb{Z} \times \mathbb{Z}_{2}$ in this case.
### 6.3 Ribbon Trominoes.
The set of ribbon trominoes is the celebrated example, studied Conway and
Lagarias [CL] ${ }^{4}$. They defined a two-dimensional height function $\varphi$ which maps edges of the square lattice into a Cayley graph of a specially chosen group embedded in $\mathbb{R}^{2}$. The latter consists of hexagons and triangles. The sum of the winding numbers around centers of hexagons gives a nonabelian tile invariant:
$$
\alpha_{01}-\alpha_{10}=\operatorname{const}(\Gamma)
$$
One can conclude from here that the group of invariants $\mathbb{G}\left(\mathbf{T}_{3}\right) \simeq \mathbb{Z}^{2}$. On the other hand, direct computation shows that $\mathbb{E}\left(\mathbf{T}_{3}\right) \simeq \mathbb{Z} \times \mathbb{Z}_{3}[\mathrm{CL}, \mathrm{P}]$, so the infinite tile invariant above cannot be proved by means of coloring arguments.
The local move property for 2 -moves with respect to $\mathcal{B}_{\text {sc }}$ remains open (see below). A special case was considered in [We] for the starecase shaped regions introduced in $[\mathrm{CL}]$ (see also $[\mathrm{P}]$ ).
Before we conclude, let us mention here that the approach was later modified by Muchnik and the author $[\mathrm{MuP}]$ to prove that $\mathbb{G}\left(\mathbf{T}_{4}\right) \simeq \mathbb{Z}^{2} \times \mathbb{Z}_{2}$. At the same time, $\mathbb{E}\left(\mathbf{T}_{4}\right) \simeq \mathbb{Z} \times \mathbb{Z}_{4}[\mathrm{P}]$
### 6.4 The general case.
It was recently shown in $[\mathrm{MoP}]$ that for all $n \geq 2$ :
$$
\mathbb{G}\left(\mathbf{T}_{n}, \mathcal{B}_{\mathrm{sc}}\right) \simeq\left\{\begin{array}{l}
\mathbb{Z}^{m}, \quad \text { if } n=2 m+1 \\
\mathbb{Z}^{m-1} \times \mathbb{Z}_{2}, \quad \text { if } n=2 m
\end{array}\right.
$$
This proved the conjecture of the author $[\mathrm{P}]$, previously known only for $n \leq 4$. The main result of $[\mathrm{P}]$ is a similar result for a smaller set of regions $\mathbb{G}\left(\mathbf{T}_{n}, \mathcal{B}_{\mathrm{rc}}\right)$, where $\mathcal{B}_{\text {rc }}$ ) is the set of row convex regions. The author in $[\mathrm{P}]$ also found an explicit basis for the group:
$$
\sum_{\epsilon: \epsilon_{i}=0, \epsilon_{n-i}=1} \alpha_{\epsilon}-\sum_{\epsilon: \epsilon_{i}=1, \epsilon_{n-i}=0} \alpha_{\epsilon}=\operatorname{const}(\Gamma), 1 \leq i0
$$
We conclude that $\Delta \leq\left(c^{\prime} / \delta\right)|\Gamma|^{2} \leq c^{\prime \prime}|\Gamma|^{2}$, which proves the claim.
For the last part, consider the following algorithm. Compute $\varphi$ on $\partial \Gamma$. From above, the local maxima of $\varphi_{0}=\varphi_{A_{0}}$ are on the boundary. Find a maximum value of $x \in \partial \Gamma$. This is clearly a local maximum of $\varphi_{0}$. Now delete $\tau_{x}$ from $\Gamma$ and proceed accordingly. Eventually we either determine $A_{0}$ completely, or at some point we have to delete $\tau_{x}$ from $\Gamma$ in an impossible situation. Since $A_{0}$ is unique, this implies untileability of $\Gamma$ in that case. Note that the cost of the algorithm is $O\left(|\Gamma|^{2} \ell k\right)$. This completes the proof of the theorem.
## Proof of Theorem 5.6.
First, observe that tilings $A \vdash \Gamma$ correspond to vertices of $\mathbf{P}_{\Gamma}$. Indeed, suppose otherwise. By abuse of notation we can write this as $A=\beta_{1} B_{1}+\beta_{2} B_{2}+\ldots$, where $\beta_{1}, \beta_{2}, \cdots \in \mathbb{R}_{+}$. But that means that zeroes of $\left(a_{x, \tau}\right)$ on the left hand side correspond to zeroes on the right hand side, i.e. $B_{1}, B_{2}, \cdots=A$. This proves the claim.
Similarly, consider two tilings $A_{1}, A_{2} \vdash \Gamma$. Let
$$
A_{\lambda}=\lambda A_{1}+(1-\lambda) A_{2}=\beta_{1} B_{1}+\beta_{2} B_{2}+\ldots
$$
where $0<\lambda<1$. The point $A_{\lambda}$ lies on the interval $\left[A_{1}, A_{2}\right]$. By the observation above, only tiles that are in $A_{1}, A_{2}$ can appear in $B_{i}$. Therefore all tiles that lie in $A_{1} \cap A_{2}$ must also appear in each of the $B_{i}$. On the other hand, a tile $\tau_{x} \in A_{1}$ must appear in $B_{i}$ with the total weight $\lambda$. Having or not having $\tau_{x}$ splits the set of tilings $B_{i}$ into two subsets. Since every element $y \in \Lambda$ must belong to some tile, the total set of tiles splits between tiles that contain and don't contain $\tau_{x}$. Denote these sets of indices by $I$ and $J$. The above implies that either every $B_{i}=A_{1}$, $i \in I$, every $B_{j}=A_{2}, j \in J$, or there exist $B_{i}, B_{j}, i \in I, j \in J$, such that $A_{1} \rightarrow C$ and $C \rightarrow A_{2}$ are non-intersecting local moves (and the same is true for $A_{1} \rightarrow D$ and $\left.D \rightarrow A_{2}\right)$. This completes the proof.
## Proof of Generalized Sperner's Lemma 8.1 (sketch).
Define an orientation of the $(d-1)$-dimensional simplices on the boundary to agree with orientation of $V=\mathbb{R}^{d}$. Formally, we say that a simplex on the boundary is positive (negative) if it is colored with $d$ colors $\in\{0,1, \ldots, d\}$ and coloring the remaining vertex of a unique $d$-dimensional simplex in $\Gamma$ with the remaining color would make this simplex positive (negative). Denote by $\beta_{+}(\partial \Gamma)$ and $\beta_{-}(\partial \Gamma)$ the number of positive and negative simplices on the boundary. A simplex (of any dimension) with repeated colors we call neutral.
Let us prove by induction that in conditions of the theorem we have:
$$
\operatorname{const}(\partial \Gamma)=(d+1)\left(\beta_{+}(\partial \Gamma)-\beta_{-}(\partial \Gamma)\right)
$$
First, let us prove the base of induction. Indeed, for a single positive (negative) $d$-dimensional simplex all $(d+1)$ simplices on the boundary are positive (negative). If the $d$-dimensional simplex is neutral, then the symmetry argument implies that const $=0$ in this case.
For the step of induction, we can delete any $d$-dimensional simplex from $\Gamma$. Now observe that const $(\partial \Gamma)$ is additive with respect to such division since the intersection of the boundaries is taken with opposite signs, and thus cancel each other (cf. proof of Theorem 4.1). We omit the easy details.
## Proof of Theorem 8.2.
Consider all 0-deficient $(d-1)$-dimensional simplices in $\Gamma$, i.e. $(d-1)$-dimensional faces with $d$ distinct colors. Each such face is either on the boundary or is a boundary of one black and one white $d$-dimensional simplex. Denote by $\Delta$ the number of such faces. Denote by $\delta_{+}\left(\delta_{-}\right)$the number of of such faces on the boundary, so that the adjacent simplex is black (white). By counting $\Delta$ separately, as a boundary of black or white squares, we obtain
$$
\Delta=2 \rho_{+}+(d+1) \alpha_{+}+\delta_{-}=2 \rho_{-}+(d+1) \alpha_{-}+\delta_{+}
$$
Subtracting the sides in the last equality, we conclude
$$
2 \rho+(d+1) \alpha=\delta_{+}-\delta_{-}
$$
This proves the result.
## REFERENCES
[Ad] R. Adin, personal communication (1999).
[BLSWZ] A. Björner, M. Las Vergnas, B. Sturmfels, N. White, G. Ziegler, Oriented Matroids, Cambridge U. Press, Cambridge, UK, 1999.
[Be] R. Berger, The undecidability of the domino problem, Mem. Amer. Math. Soc. 66 (1966).
[BJLS] F. Berman, D. Johnson, T. Leighton, P. Shor, Generalized planar matching, J. Algorithms 11 (1990), 153-184.
[BC] A. B. Brown, S. S. Cairns, Strengthening of Sperner's lemma applied to homology theory, Proc. Nat. Acad. Sci. U.S.A. 47 (1961), 113-114.
[BH] J. K. Burton, Jr., C. L. Henley, A constrained Potts antiferromagnet model with an interface representation, J. Phys. A 30 (1997), 8385-8413.
[Ch] T. Chaboud, Domino tiling in planar graphs with regular and bipartite dual, Theoret. Comput. Sci. 159 (1996), 137-142.
[CJ] I.-P. Chu, R. Johnsonbaugh, Tiling deficient boards with trominoes, Math. Mag. 59 (1986), 34-40.
[CL] J. H. Conway, J. C. Lagarias, Tilings with polyominoes and combinatorial group theory, J. Comb. Theory, Ser. A 53 (1990), 183-208.
[F] J. C. Fournier, Tiling pictures of the plane with dominoes, Discrete Math. 165/166 (1997), 313-320.
[GJ] M. Garey, D. S. Johnson, Computers and Intractability: A Guide to the Theory of NP-completeness, Freeman, San Francisco, CA, 1979.
[GKZ] I. M. Gelfand, M. M. Kapranov, A. V. Zelevinsky, Discriminants, resultants, and multidimensional determinants, Birkhäuser, Boston, MA, 1994.
[G] S. Golomb, Polyominoes, Scribners, New York, 1965.
[GO] J. E. Goodman, J. O'Rourke, editors, Handbook of Discrete and Computational Geometry, CRC Press, Boca Raton, FL, 1997.
[Gu] D. Gupta, Some tilings moves explored, Ph.D. Thesis, MIT, 1998, pp. 135 pp..
$[\mathrm{JK}]$ G. James, A. Kerber, The Representation Theory of the Symmetric Group, AddisonWesley, Reading, MA, 1981.
[Ka] P. W. Kastelyn, The statistics of dimers on a lattice. I. The number of dimer arrangements on a quadratic lattice, Phisica 27 (1961), 1209-1225.
$[\mathrm{KK}]$ C. Kenyon, R. Kenyon, Tiling a polygon with rectangles, Proc. 33rd Symp. Foundations of Computer Science (1992), 610-619.
[Ke] R. Kenyon, A note on tiling with integer-sided rectangles, J. Combin. Theory, Ser. A 74 (1996), 321-332.
[LLL] A. K. Lenstra, H. W. Lenstra, L. Lovász, Factoring polynomials with rational coefficients, Math. Ann. 261 (1982), 515-534.
[LP] L. Lovász, M. D. Plummer, Matching theory, North-Holland, Amsterdam, 1986.
[LRS] M. Luby, D. Randall, A. Sinclair, Markov chain algorithms for planar lattice structures, Proc. 36th Symp. Foundations of Computer Science (1995), 150-159.
[M] I. G. Macdonald, Symmetric Functions and Hall Polynomials, Oxford University Press, London, 1979.
[Mo] C. Moore, personal communication (2000).
[MN] C. Moore, M. E. J. Newman, Height Representation, Critical Exponents, and Ergodicity in the Four-state Triangular Potts Antiferromagnet, J. Stat. Phys. 99 (2000), $661-690$.
[MoP] C. Moore, I. Pak, Ribbon tile invariants from signed area, J. Comb. Theory, Ser. A, to appear (2001).
[MR] C. Moore, J. M. Robson, Hard tiling problems with simple tiles, Discrete and Computational Geometry, to appear (2001).
[MuP] R. Muchnik, I. Pak, On tilings by ribbon tetrominoes, J. Comb. Theory, Ser. A 88 (1999), 188-193.
[P] I. Pak, Ribbon tile invariants, Trans. AMS 352 (2000), 5525-5561.
[Pr] J. Propp, A pedestrian approach to a method of Conway, or, A tale of two cities, Math. Mag. 70 (1997), 327-340.
[PW] J. Propp, D. Wilson, Exact Sampling with Coupled Markov Chains and Applications to Statistical Mechanics, Random Structures and Algorithms 9 (1996), 223-252.
[RY] D. Randall, G. Yngve, Random three-dimensional tilings of Aztec octahedra and tetrahedra: an extension of domino tilings, Proc. SODA 2000, 636-645.
[Ré] E. Rémila, Tiling groups: new applications in the triangular lattice, Discrete Comput. Geom. 20 (1998), 189-204.
[Ri] R. M. Robinson, Undecidability and nonperiodicity for tilings of the plane, Invent. Math. 12 (1971), 177-209.
[Ro] J. M. Robson, Sur le pavage de figure du plan par des barres, in Actes des Journées Polyominos et Pavages (1991), 95-103.
[ST] N. C. Saldanha, C. Tomei, An overview of domino and lozenge tilings, Resenhas 2 $(1995), 239-252$.
[Sc] A. Schrijver, Theory of Integer and Linear Programming, John Wiley, New York, 1988 .
[SU] E. R. Scheinerman, D. H. Ullman, Fractional graph theory, Wiley, New York, 1997.
[Si] M. Sipser, Introduction to the Theory of Computation, PWS Publishing Company, New York, 1997.
[Sh] Yu. A. Shashkin, Fixed points, AMS, Providence, RI, 1991.
[St] R. P. Stanley, Enumerative Combinatorics, Vol. 1, Wadsworth \& Brooks/Cole, California, 1986 .
[SS] S. K. Stein, S. Szabó, Algebra and tiling, Carus Mathematical Monographs, 25, MAA, Washington, DC, 1994 .
[TF] H. N. V. Temperley, M. E. Fisher, Dimer problem in statistical mechanics - An exact result, Philos. Mag. 6 (1961), 1061-1063.
[T] W. Thurston, Conway's tiling group, Amer. Math. Monthly 97 (1990), 757-773.
[Wa] D. W. Walkup, Covering a rectangle with T-tetrominoes, Amer. Math. Monthly 72 (1965), 986-988.
[We] D. C. West, An elementary proof of two triangle-tiling theorems of Conway and Lagarias, unpublished manuscript (1990), 6 pp.
[Wo] L. A. Wolsey, Cubical Sperner lemmas as applications of generalized complementary pivoting, J. Comb. Theory, Ser. A 23 (1977), 78-87.
[Z] G. Ziegler, Lectures on Polytopes, Graduate Texts in Mathematics 152, Springer, 1995.
## Added in Print:
In the past year few advances has been made. First, Scott Sheffield resolved most of the open problems on ribbon tilings in "Ribbon tilings and multidimensional height functions", arXiv preprint math.CO/0107095. Among other things, he proved the local connectivity property, conjectured by the author in $[\mathrm{P}]$ (see section 6.4) and found a linear time algorithm for testing tileability.
Second, Cris Moore, Ivan Rapaport and Eric Remila defined a height function and proved a local connectivity property for the set of colored square tiles similar to that in section 8.2. Their paper "Tiling groups for Wang tiles" will appear in Proc. SODA'2002.
Finally, the author resolved affirmatively the question whether computing (unbounded) group $\mathbb{E}(\mathbf{T})$ is decidable ("Computational complexity of tile invariants", preprint, 2001.)
# RIBBON TILE INVARIANTS
IGOR PAK
#### Abstract
Let $\mathbf{T}$ be a finite set of tiles, and $\mathcal{B}$ a set of regions $\Gamma$ tileable by $\mathbf{T}$. We introduce a tile counting group $\mathbb{G}(\mathbf{T}, \mathcal{B})$ as a group of all linear relations for the number of times each tile $\tau \in \mathbf{T}$ can occur in a tiling of a region $\Gamma \in \mathcal{B}$. We compute the tile counting group for a large set of ribbon tiles, also known as rim hooks, in a context of representation theory of the symmetric group.
The tile counting group is presented by its set of generators, which consists of certain new tile invariants. In a special case these invariants generalize the Conway-Lagarias invariant for tromino tilings and a height invariant which is related to computation of characters of the symmetric group.
The heart of the proof is the known bijection between rim hook tableaux and certain standard skew Young tableaux. We also discuss signed tilings by the ribbon tiles and apply our results to the tileability problem.
## 0. TRIVIA
Suppose we are given a set of the tiles on a plane. We are allowed to use translations of the tiles to arrange them in a geometric shape (each tile may occur several times). This arrangement is called tiling of that shape. One can ask whether a given region can be tiled by a given set of tiles, and if it can, how many different tilings there are.
For example, with a set of tiles shown in Figure 0.1 one can make four different tilings of the 4 -by- 6 rectangle. Two of them are shown in Figure 0.2. Now one can try to find a criterion for when you can tile a rectangle. Observe that each of these tiles alone can tile the whole plane.

Figure 0.1.

Figure 0.2 .
Our personal favorite example is given by the set of tiles shown in Figure 0.3. One can show that there exists only one tiling of the fourth quadrant (see Fig. 0.4). The proof is left to the reader.
It turns out that there are certain nice sets of tiles for which it is not clear whether a given region can be tiled. Here is an example. Consider the 8 tiles shown in Figure 0.5. One can show that the 25 -by- 25 square cannot be tiled by these tiles.[^9]

FigURE 0.3.

Figure 0.4 .

FigURE 0.5.
Of course, this could be proved by an exhaustive search. In general, the following result holds.
Theorem 0.1. If an $a-b y-b$ rectangle can be tiled by the tiles shown in Figure 0.5, then $10 \mid a \cdot b$.
Another example. Consider 6 tiles shown in Figure 0.6. We again have
Theorem 0.2. If an $a$-by-b rectangle can be tiled by the tiles shown in Figure 0.6, then $10 \mid a \cdot b$.

FigURE 0.6.
Of course, an area argument shows that $5 \mid a \cdot b$.
Consider now a different region. Let $\Delta_{N}$ be a triangular shape as in Figure 0.7. One can check that $\Delta_{24}$ can be tiled by the tiles shown in Figure 0.6 while $\Delta_{25}$ cannot. Generally,

FigURE 0.7.
Theorem 0.3. If $\Delta_{N}$ can be tiled by the tiles shown in Figure 0.6, then $N \equiv$ $0,4,15,19(\bmod 20)$.
It turns out that all three theorems can be proved by use of the same kind of argument. Heuristically, the reason for untileability arises from the following question, completely different in nature:
- Given a set of tiles and a tileable region, are there any linear relations for the number of times each tile occurs in a tiling?
The rest of the paper explains the relevance of this question. All three theorems are proved in section 7 .
## 1. INTRODUCTION
Let $\mathbb{Z}^{2}$ be a square lattice, and $\mathcal{R}$ the set of all compact simply connected regions in $\mathbb{Z}^{2}$. We think of these regions as disjoint unions of $1 \times 1$ squares. Sometimes they are called polyominoes. Fix a finite set of tiles $\mathbf{T}=\left\{\tau_{1}, \ldots, \tau_{N}\right\}, \tau_{i} \in \mathcal{R}$, $i=1, \ldots, N$. Let tiles be invariant under translations. We say that a region $\Gamma \in \mathcal{R}$ is tileable by $\mathbf{T}$ if it can be presented as a disjoint union of the regions
$$
\Gamma=\coprod_{1 \leq j \leq l} \tau_{j}^{\prime}
$$
where each region $\tau_{j}^{\prime}, 1 \leq j \leq l$ is a translation of some $\tau_{i_{j}}$. Such a disjoint union is called a tiling $s$ of $\Gamma$. Denote $\mathcal{S}=\mathcal{S}(\Gamma, \mathbf{T})$ a set of all tilings of $\Gamma$ by the set of tiles $\mathbf{T}$.
Fix a set of tiles $\mathbf{T}$ and a region $\Gamma \in \mathcal{R}$. There are two basic questions one can ask:
- Is $\Gamma$ tileable by $\mathbf{T}$ ?
- If $\Gamma$ is tileable by $\mathbf{T}$, what do the tilings look like?
The first question is very classical and well understood (see e.g. G]). It is usually not hard to find a tiling if $\Gamma$ is tileable by $\mathbf{T}$, while proving the opposite can be extremely difficult. Except for ad hoc examples, there are basically two techniques for proving that a region cannot be tiled: coloring arguments and Conway group analysis (see $\mathrm{CL}, \mathrm{T}]$ ). Note also that the case when $\mathbf{T}$ contains a 1-by-1 square is trivial: every region is tileable.
While the first questions admits only a "yes" or "no" answer, the second question could be posed in many ways, each of them giving us some information about the

Figure 1.1.

Figure 1.2

FigURE 1.3.
structure of the tiling set $\mathcal{S}(\Gamma, \mathbf{T})$. One can find the following two questions in the literature (see e.g. [G], [EP]):
- How many tilings of $\Gamma$ are there?
- What do random tilings $s \in \mathcal{S}(\Gamma, \mathbf{T})$ look like?
It turns out that the answers to these questions depend heavily on the geometry of $\Gamma$, and can be very complicated even in very simple cases. In particular, finding the number of tilings $|\mathcal{S}(\Gamma, \mathbf{T})|$ is a more general problem than just finding whether a certain region has a tiling. In some cases this problem is known to be NP-complete, and probably cannot be solved by means other than exhaustive enumeration (see GJ, p. 257]).
To avoid these difficulties we propose another approach to the problem. We fix only $\mathbf{T}$ and ask about properties of tilings of all regions at once. We would like to ask the following two questions:
- Are there any relations for the number of times each tile occurs in a tiling of a given region?
- Is there a finite set of local replacement rules (we also call them local moves or just moves) such that for every region $\Gamma \in \mathcal{R}$, any tiling of $\Gamma$ can be changed into any other tiling by a sequence of moves?
Before we give formal definitions, let us illustrate what happens in the case of dominoes. Although small, this example will illustrate the variety of approaches as well as the complexity of a problem.
Let $\mathbf{T}_{2}$ be a set of two tiles: horizontal domino $\tau_{1}$ and vertical domino $\tau_{2}$ (see Fig. 1.1). It is easy to come up with a necessary condition for tileability (see e.g. $\mathrm{G}]$ ). Color the region in a checkerboard fashion. Since each domino must contain one black and one white square, the total number of black squares must be equal to the total number of white squares. For example, the region shown in Figure 1.2 cannot be tiled by dominoes since it has 8 black squares and only 6 white squares. Unfortunately, there exist untileable regions with an equal number of black and white squares (see e.g. Fig. 1.3). This means that we need a stronger condition for tileability.
Now suppose we have a region $\Gamma$ that is known to be tileable. We want to compute the number of tilings $\Gamma$ has. This turns out to be an interesting and nontrivial question. In the case of a 2 -by- $m$ rectangle the number of tilings is a Fibonacci number $F(m)=F(m-1)+F(m-2)$ (see Fig. 1.4). In the case of a

Figure 1.4.

FigURE 1.6.

Figure 1.5. Aztec diamond $A_{7}$

$c_{2}=8$
$\mathrm{d}=2$
FigURE 1.7.
general rectangle the problem was solved by Kastelyn and Temperley \& Fisher (see $\mathrm{Ka}, \mathrm{TF}$ ). In the case of an Aztec diamond (see Fig. 1.5) the domino tilings were enumerated by Elkies, Kuperberg, Larsen and Propp (see EKLP). Both results gave rise to many other questions about domino tiling (see e.g. [CE]). In this work we do not further consider any numerical results of this type.
Let $\Gamma$ be a region tileable by dominoes $\tau_{1}, \tau_{2}$. Consider $s \in \mathcal{S}\left(\Gamma, \mathbf{T}_{2}\right)$, a domino tiling of $\Gamma$. Suppose $s$ consists of $a_{1}=a_{1}(s)$ copies of the horizontal domino $\tau_{1}$, and of $a_{2}=a_{2}(s)$ copies of the vertical domino $\tau_{2}$. Of course, $2\left(a_{1}+a_{2}\right)$ is equal to the area $|\Gamma|$ of the region (see Fig. 1.6). This gives us the first relation. There is one more relation which is less obvious: $a_{2}=$ Const $(\bmod 2)$. To see this, let us color black every other column of the region $\Gamma$ (see Fig. 1.7). Denote by $c_{1}$, $c_{2}$ the number of black and white regions respectively, and put $d=c_{1}-c_{2}$. Since horizontal dominoes contain exactly one black and one white square, and vertical dominoes contain two squares of the same color, we immediately get $a_{2}=d / 2$ $(\bmod 2)($ see Fig. 1.7).

FigURE 1.8

Figure 1.9.
Here is another way to look at the set of tilings $\mathcal{S}\left(\Gamma, \mathbf{T}_{2}\right)$. Let us allow the following local replacement rules (or simply moves): take two adjacent horizontal or vertical dominoes and flip them (see Fig 1.8). Of course, this move gives us a new tiling of $\Gamma$ (see Fig 1.9). It is known that by a sequence of such moves we can get from any tiling $s \in \mathcal{S}\left(\Gamma, \mathbf{T}_{2}\right)$ of a simply connected region $\Gamma$ to any other tiling $s^{\prime} \in \mathcal{S}\left(\Gamma, \mathbf{T}_{2}\right)$ (see e.g. [T]). From this we immediately get $a_{1}(s)+a_{2}(s)=$
$a_{1}\left(s^{\prime}\right)+a_{2}\left(s^{\prime}\right)$ and $a_{2}(s)=a_{2}\left(s^{\prime}\right)(\bmod 2)$, since these identities are trivial for any single move. This also implies that for a general region there is no other relation for the numbers $a_{1}, a_{2}$ that does not follow from these two. We will use similar logic when proving our main results.
Now we are ready to introduce the tile counting group and tile invariants. Let $\mathbf{T}=\left\{\tau_{1}, \ldots, \tau_{N}\right\}$ be a set of tiles. Denote by $\mathcal{R}_{\mathbf{T}} \subset \mathcal{R}$ set of regions tileable by $\mathbf{T}$. Let $\mathcal{B} \subset \mathcal{R}_{\mathbf{T}}$ be a fixed subset of tileable regions. Consider a tileable region $\Gamma \in \mathcal{B}$. We identify each tiling $s \in \mathcal{S}(\Gamma, \mathbf{T})$ with its multiset of tiles, $s \simeq\left\{\tau_{i_{1}}, \ldots, \tau_{i_{l}}\right\}$. Of course, by doing so we lose some information about the geometric structure of the tilings, since there could be many tilings of $\Gamma$ with the same multiset of tiles (see e.g. Fig. 1.4). As before, by $|\Gamma|$ we denote the area of $\Gamma$.
Let $\mathbb{Z}\langle\mathbf{T}\rangle$ be a group of formal integer linear combinations of $\mathbf{T}$. With each pair of tilings $s_{1}, s_{2} \in \mathcal{S}(T, \Gamma)$ of a region $\Gamma \in \mathcal{B}$ we associate a relation:
$$
\left(\tau_{i_{1}}+\cdots+\tau_{i_{l}}=\tau_{j_{1}}+\cdots+\tau_{j_{r}}\right)
$$
Let $I$ be the linear span of such relations for all regions $\Gamma \in \mathcal{B}$ and for all pairs of tilings $s_{1}, s_{2} \in \mathcal{S}(T, \Gamma)$. Define the tile counting group to be the quotient group
$$
\mathbb{G}(\mathbf{T} ; \mathcal{B})=\mathbb{Z}\langle\mathbf{T}\rangle / I
$$
This will be the main object of our study. Since both groups in the quotient are abelian, one can think of a tile counting group $\mathbb{G}(\mathbf{T} ; \mathcal{B})$ as a subgroup of $\mathbb{Z}\langle\mathbf{T}\rangle$. Thus it is reasonable to describe $\mathbb{G}(\mathbf{T} ; \mathcal{B})$ by its set of independent generators (or the basis) given in $\mathbb{Z}\langle\mathbf{T}\rangle$.
For example, let $\mathbf{T}_{2}$ be a set of dominoes (see Fig. 1.1), and $\mathcal{B}$ a set of simply connected regions. The two tilings in Figure 1.8 correspond to the relation $2 \cdot \tau_{1}=$ $2 \cdot \tau_{2}$. Since every domino tiling of a simply connected region can be obtained from every other domino tiling, $I$ in this case is generated by the above relation. Therefore
$$
\mathbb{G}\left(\mathbf{T}_{2} ; \mathcal{B}\right)=\mathbb{Z}^{2} / I \simeq \mathbb{Z} \times \mathbb{Z}_{2}
$$
The basis can be given as $\tau_{1}+\tau_{2}, \tau_{1}-\tau_{2} \in \mathbb{Z}\left\langle\mathbf{T}_{2}\right\rangle$. Note that the second generator has order 2 as an element in $\mathbb{G}\left(\mathbf{T}_{2} ; \mathcal{B}\right)$, while it has infinite order as an element of $\mathbb{Z}\left\langle\mathbf{T}_{2}\right\rangle$.
Here is another way to describe the tile counting group. Let $G$ be an abelian group, not necessarily finite. A map $f: \mathcal{B} \rightarrow G$ is called a tile invariant (or just an invariant) if for any tileable region $\Gamma \in \mathcal{B}$ and for any tiling $s \in \mathcal{S}(\Gamma, \mathbf{T})$ of it, $s \simeq\left\{\tau_{i_{1}}^{\prime}, \ldots, \tau_{i_{l}}^{\prime}\right\}$, where $\tau_{j}^{\prime}$ is a translation of a tile $\tau_{j}$, we have
$$
f(\Gamma)=f\left(\tau_{i_{1}}\right)+\cdots+f\left(\tau_{i_{l}}\right)
$$
The problem is to find all the tile invariants for a fixed set of tiles T. Clearly a tile invariant is determined by its values on $\mathbf{T}$, so the problem of finding an invariant is equivalent to finding maps $f: \mathbf{T} \rightarrow G$ which can be extended to the set of all regions $\mathcal{B}$.
Let $\sum_{\tau \in \mathbf{T}} a(\tau) \in \mathbb{Z}\langle\mathbf{T}\rangle$ be an element of a tile counting group $\mathbb{G}=\mathbb{G}(\mathbf{T} ; \mathcal{B})$. Suppose $m$ is its order in $\mathbb{G}$ ( $m$ could be infinity). Then a map $f: \mathbf{T} \rightarrow \mathbb{Z}_{m}$, $m<\infty$, or $f: \mathbf{T} \rightarrow \mathbb{Z}, m=\infty$, defined by $f(\tau)=a(\tau)(\bmod m)$ or $f(\tau)=a(\tau)$, is a tile invariant, where by $\mathbb{Z}_{m}$ we mean the additive group of integers modulo $m$. Conversely, every tile invariant can be lifted to an element of the tile counting group. Thus the problem of computing the tile counting group $\mathbb{G}(\mathbf{T})$ is equivalent to describing all invariants. We say that tile invariants $f_{1}, f_{2}, \ldots$ form an independent

Figure 1.10.

FigURE 1.11.
basis of invariants if they correspond to an independent generating set in a tile counting group. An invariant $f: \mathbf{T} \rightarrow G$ is called trivial if $f(\tau)=0$ for all $\tau \in \mathbf{T}$, where $0 \in G$ is the identity element. Otherwise the invariant is called nontrivial. An invariant $f: \mathbf{T} \rightarrow G$ is called primitive if $G \simeq \mathbb{Z}$ or $\mathbb{Z}_{m}$ for some $m$. For the rest of the paper we will be considering only primitive invariants.
Note that when $\mathcal{B}=\mathbf{T}$ every map $f: \mathcal{B} \rightarrow G$ is a tile invariant, i.e $\mathbb{G}(\mathbf{T}, \mathbf{T}) \simeq$ $\mathbb{Z}^{|\mathbf{T}|}$. Generally, the bigger that our set of regions $\mathcal{B}$, the more equations we have on $f$, and the fewer tile invariants we get.
The obvious example of a nontrivial tile invariant is given by the area of tiles:
$$
f_{0}: \mathbf{T} \rightarrow \mathbb{Z}, \quad f_{0}\left(\tau_{i}\right)=\left|\tau_{i}\right|
$$
which can be extended to all tileable regions: $f_{0}(\Gamma)=|\Gamma|$. This implies that the tile counting group has $\mathbb{Z}$ as a subgroup. In the case of domino tiles $\mathbf{T}_{2}$ we also get another invariant (see above):
$$
f_{*}: \mathbf{T}_{2} \rightarrow \mathbb{Z}_{2}, \quad f_{*}\left(\tau_{1}\right)=0, f_{*}\left(\tau_{2}\right)=1 \quad \bmod 2
$$
The main result of this paper is a description of a tile counting group for the following set of tiles.
Let the axes on a plane be as shown in Figure 1.10. We say that squares $(i, j)$ and $\left(i^{\prime}, j^{\prime}\right)$ lie on the same diagonal if $i-j=i^{\prime}-j^{\prime}$. For example, the two squares $(2,4)$ and $(5,7)$ lie on the same diagonal (see Fig. 1.10). A ribbon tile is a simply connected region with no two squares lying on the same diagonal. An example of a ribbon tile is shown in Figure 1.11. Denote by $\mathbf{T}_{n}$ the set of all ribbon tiles $\tau$ with $n$ squares: $|\tau|=n$. Obviously, $\mathbf{T}_{2}$ is the set of dominos (see Fig 1.1). The sets $\mathbf{T}_{3}$, $\mathbf{T}_{4}$ and $\mathbf{T}_{5}$ are shown in Figures 1.12 - 1.14.
Note that $\left|\mathbf{T}_{n}\right|=2^{n-1}$. Indeed, we can encode each ribbon tile by a sequence $\left(\varepsilon_{1}, \ldots, \varepsilon_{n-1}\right)$ of $n-1$ zeroes and ones as follows. Call the lower left square the starting square. Begin with the starting square and move along the tile. Write $\mathbf{0}$ when going right, and write $\mathbf{1}$ when going up. See Figures $1.12-1.14$ for these coding sequences for all tiles in $\mathbf{T}_{3}, \mathbf{T}_{4}$ and $\mathbf{T}_{5}$.

Figure 1.12.

Figure 1.13.

Figure 1.14
Definition 1.1. Consider the sequence of maps $f_{1}, \ldots, f_{m}: \mathbf{T}_{n} \rightarrow \mathbb{Z}, m=\left\lfloor\frac{n-1}{2}\right\rfloor$, defined as follows:
$$
f_{i}\left(\varepsilon_{1}, \ldots, \varepsilon_{n-1}\right)=\varepsilon_{i}-\varepsilon_{n-i}
$$
We call the map $f_{i}$ the $i$-convexity invariant.
Definition 1.2. The constant map $f_{0}: \mathbf{T}_{n} \rightarrow \mathbb{Z}$ defined as
$$
f_{0}\left(\varepsilon_{1}, \ldots, \varepsilon_{n-1}\right)=1
$$
is called the area invariant.
Note that the area invariant is designed to be 1 on a tile $\tau \in T_{n}$ rather than $n$. This is designed to simplify the statement of the main result (see below.)

FigURE 1.15
Definition 1.3. If $n$ is even, the map $f_{*}: \mathbf{T}_{n} \rightarrow \mathbb{Z}_{2}$ defined as
$$
f_{*}\left(\varepsilon_{1}, \ldots, \varepsilon_{n-1}\right)=\varepsilon_{n / 2}(\bmod 2)
$$
is called the parity invariant.
Before we state our main results, we need to specify the set of regions $\mathcal{B} \in \mathcal{R}_{\mathbf{T}_{n}}$. A region $\Gamma \in \mathcal{R}$ is called row-convex (column-convex) if every horizontal (vertical) line either intersects $\Gamma$ in an interval or does not intersect it at all (see Fig. 1.15). Let $\mathcal{B}_{r c}$ be a set of tileable row-convex simply connected regions. The main result of this paper is the following theorem.
Theorem 1.4. Let $\mathcal{B}=\mathcal{B}_{r c}$ be as above. Then:
1) When $n=2 m+1, \mathbb{G}\left(\mathbf{T}_{n}, \mathcal{B}\right) \simeq \mathbb{Z}^{m+1}$ and the maps $f_{0}, f_{1}, \ldots, f_{m}$ form an independent basis of invariants.
2) When $n=2 m, \mathbb{G}\left(\mathbf{T}_{n}, \mathcal{B}\right) \simeq \mathbb{Z}^{m} \times \mathbb{Z}_{2}$ and the maps $f_{0}, f_{1}, \ldots, f_{m-1}, f_{*}$ form an independent basis of invariants.
When $n=2$ Theorem 1.4 says that the area and parity invariants form an independent basis. Analogously, when $n=3$ Theorem 1.4 says that, aside from the area invariant $f_{0}$, there exists one other nontrivial tile invariant $f_{1}: \mathbf{T} \rightarrow \mathbb{Z}$, where
$$
f_{1}(\mathbf{1 0})=1, \quad f_{1}(\mathbf{0 1})=-1, \quad f_{1}(\mathbf{0 0})=f_{1}(\mathbf{1 1})=0
$$
(see Fig. 1.12). In a different form this invariant was discovered by Conway and Lagarias in [CL] (see also [T] ). To say that $f_{1}$ is an invariant is equivalent to saying that:
$$
\# \mathbf{1 0}-\# \mathbf{0 1}=\text { Const }
$$
This means that the number of times the $\mathbf{1 0}$ tromino occurs in a tiling minus the number of times the $\mathbf{0 1}$ tromino occurs in the same tiling of a region $\Gamma$ depends only on the region $\Gamma$, and not on the tiling.
Here is another nontrivial invariant that exists for all $n>1$.
Definition 1.5. Consider the map $f_{\bullet}: \mathbf{T}_{n} \rightarrow \mathbb{Z}_{2}$ defined as follows:
$$
f_{\bullet}\left(\varepsilon_{1}, \ldots, \varepsilon_{n-1}\right)=\varepsilon_{1}+\varepsilon_{2}+\cdots+\varepsilon_{n-1} \quad(\bmod 2)
$$
## We call $f \bullet$ the height invariant.
The reason why $f_{\bullet}$ is called the height invariant can easily be seen from the picture. Consider the smallest rectangular box the ribbon tile $\tau$ can fit in (see Fig 1.16). Then $f_{\bullet}(\tau)=a-1(\bmod 2)$, where $a$ is the height of the rectangle. This invariant was considered earlier in connection with certain characters of the

FiGURE 1.16.

FigURE 1.17 .
symmetric group $S_{N}$ (see $[$, JK, S]). Namely, it corresponds to signs in the Murnaghan-Nakayama summation formula for computing the character values on the conjugacy classes $\left(n^{a}\right)$, where $N=a \cdot n$ (see [JK, [M for details). Observe that
$$
f_{\bullet}=\left\{\begin{array}{l}
f_{1}+\cdots+f_{m-1}+f_{m} \quad \bmod 2, n=2 m+1 \\
f_{1}+\cdots+f_{m-1}+f_{*} \quad \bmod 2, n=2 m
\end{array}\right.
$$
This proves that $f_{\bullet}$ is indeed an invariant provided Theorem 1.4 holds.
Now let us say a few words about how Theorem 1.4 is proved. We shall present a finite set of moves which preserve the invariants but enable us to get from any tiling to any other. Formally, let $\mathcal{B}_{y}$ be the set of row- and column-convex regions such that when fit into the smallest possible box they contain the upper right, upper left and the lower left corner of the box (see Fig. 1.17).
Theorem 1.6. Let $\mathcal{B}=\mathcal{B}_{y}$ be as above. For every $n>1$ there is a finite set of at most $n 4^{n}$ moves such that any tiling of $\Gamma \in \mathcal{B}$ by $\mathbf{T}_{n}$ can be transformed by a sequence of moves to any other such a tiling ${ }_{*}^{*}$
When $n=2$ we need only one move (see Fig 1.8). When $n=3$ we already need 6 moves (see Fig 1.18). Together with Theorem 1.6, we prove this in section 3.
To finish the introduction, let us compare the definition of tile invariants with the generalized coloring arguments introduced by Conway and Lagarias (see [CL]).
Let $G$ be an abelian group, not necessarily finite, and $e$ its identity element. A map $f: \mathcal{R} \rightarrow G$ is called a coloring map if for every region $\Gamma \in \mathcal{R}$ we have
$$
f(\Gamma)=f\left(x_{1}\right)+\cdots+f\left(x_{|\Gamma|}\right)
$$
where $x_{1}, \ldots, x_{|\Gamma|}$ are the squares in $\Gamma$. Of course, $f$ is defined by its values on all $1 \times 1$ squares.[^10]

Figure 1.18.
A coloring map $f: \mathcal{R} \rightarrow G$ is called $\mathbf{T}$-coloring if $f(\Gamma)=e$ for all $\Gamma \in \mathcal{R}_{\mathbf{T}}$. In a sense the $\mathbf{T}$-coloring maps are complementary to tile invariants, which are defined only on tileable regions.
It is clear that to show that $f$ is a $\mathbf{T}$-coloring map, all we need is to check that $f\left(\tau^{\prime}\right)=e$ for all translations $\tau^{\prime}$ of a tile $\tau \in \mathbf{T}$. If this is the case, we say that $f$ gives a coloring argument for a set of tiles $\mathbf{T}$. The idea is that we show that now $f(\Gamma)=e$ becomes a necessary condition for $\mathbf{T}$-tileability, which is usually easy to check. Various arguments can be found in G.
To give an example, recall the argument we used to prove untileability by dominoes (see Fig. 1.2). It was, basically, a map $f: \mathcal{R} \rightarrow \mathbb{Z}$, defined by
$$
f(i, j)= \begin{cases}1, & \text { if } i+j=1 \quad \bmod 2 \\ 0, & \text { if } i+j=0 \quad \bmod 2\end{cases}
$$
The map $f$ is an example of a $\mathbf{T}$-coloring map. Indeed, observe that, by definition, for both vertical and horizontal dominoes $\tau_{1}, \tau_{2}$ (see Fig. 1.1) we have $f\left(\tau_{1}\right)=$ $f\left(\tau_{2}\right)=0$.
It turns out that coloring arguments cannot be used to prove Theorems $0.1-0.3$. In particular, we have the following result.
Theorem 1.7. Let $\mathbf{T}$ be the set of tiles shown in Figure 0.5. Consider a rectangle $\Gamma=[5 \cdot a \times 5 \cdot b]$, where $a$ and $b$ are odd. Then for any $\mathbf{T}$-coloring map $f: \mathcal{R} \rightarrow G$ we have $f(\Gamma)=e$.
Recall that by Theorem 0.1 the region $\Gamma$ in Theorem 1.7 is not $\mathbf{T}$-tileable. Thus Theorem 0.1 cannot be proved by the use of coloring arguments only. Theorem 1.7 and its analogs for other sets of tiles will be proved in section 8 .
Let us note that coloring maps can be used not only to prove untileability but also to find some tile invariants. Here is how this can be done.
Let $\mathbf{T}$ be a set of tiles, and $G$ an abelian group. Consider a map $g: \mathbf{T} \rightarrow G$. Suppose $f: \mathcal{R} \rightarrow G$ is a coloring map such that $f\left(\tau^{\prime}\right)=g(\tau)$ for all translations $\tau^{\prime}$ of a tile $\tau \in \mathbf{T}$. Then there exists a tile invariant $\widehat{g}: \mathcal{R}_{\mathbf{T}} \rightarrow G$ such that $\widehat{g}(\tau)=g(\tau)$ for all $\tau \in \mathbf{T}$. We call this an extended coloring argument corresponding to the map $f$.
For example, let $\mathbf{T}=\mathbf{T}_{2}$ be the set of dominoes. Consider the coloring map $f: \mathcal{R} \rightarrow \mathbb{Z}_{2}$ defined by $f(i, j)=j \bmod 2$. In a different form the map $f$ was
considered earlier (see Figure 1.7). We have $g\left(\tau_{1}\right)=1$ and $g\left(\tau_{2}\right)=0$ (see Figure 1.1), which proves that the map $f_{\bullet}$ (see Definition 1.5) is indeed an invariant if $n=2$.
One can try to use the extended coloring argument to get all the tile invariants for a given set of tiles $\mathbf{T}$ and a set of regions $\mathcal{B} \subset \mathcal{R}_{\mathbf{T}}$. It is easy to see that this is impossible if the tile counting group $\mathbb{G}\left(\mathbf{T}_{n}, \mathcal{B}\right) \supsetneq \mathbb{G}\left(\mathbf{T}_{n}, \mathcal{R}_{\mathbf{T}}\right)$, i.e. if there exists a tile invariant for the set of regions $\mathcal{B}$ that is not an invariant for the set of all T-tileable regions $\mathcal{R}_{\mathbf{T}}$. It turns out that in the case of the ribbon tiles $\mathbf{T}_{n}, n>2$, neither convexity nor parity invariants follow from extended coloring arguments. Analogously, for the height invariant we have the following result.
Theorem 1.8. Let $\mathbf{T}_{n}, n>1$, be a set of ribbon tiles. Then the height invariant f$\cdot$ follows from the extended coloring argument if and only if $n=2$.
The proof of Theorem 1.8 is given in section 9 . Of course, the "if" part is already proven. Incidentally, proving this theorem was the original goal of this work.
The rest of the paper is constructed as follows. In section 2 we define a rim hook correspondence, which is used in section 3 to prove Theorem 1.6. In section 4 we check that the coloring maps defined in Definitions 1.1-1.3 are invariant under the local moves defined in Theorem 1.5. In section 5 we present a technique for working with tile invariants which enables us to extend the set of regions. In section 6 we show that there are no ribbon tile invariants other than those given in Theorem 1.4. Then we prove the main theorem itself.
The second part of the paper contains several applications of the main result. In section 7 we use ribbon tile invariants to find necessary conditions for tileability. We prove Theorems $0.1-0.3$ and a few other similar results. In section 8 we define and analyze signed tilings and prove Theorem 1.7 along with other related results. This section is motivated by the work CL of Conway and Lagarias, although we were able to avoid the use of combinatorial group theory. In section 9 we prove Theorem 1.8 and explore the connection between extended tile arguments and tile invariants. Finally, in section 10 we present several conjectures and open problems.
This work was done while the author was a postdoctoral fellow at MIT. The research was supported by a National Science Foundation Postdoctoral Research Fellowship.
## 2. THE RIM HOOK BIJECTION
Let us recall some standard notation in combinatorics related to the representation theory of the symmetric group (see e.g. [JK, M]).
A partition is a nonincreasing integer sequence $\lambda=\left(\lambda_{1}, \lambda_{2}, \ldots, \lambda_{l}\right), \lambda_{1} \geq \lambda_{2} \geq$ $\cdots \geq \lambda_{l}>0$. With each partition $\lambda$ we associate a region $\Gamma_{\lambda}$, called a Young diagram or a Ferrers shape, defined as follows:
$$
\Gamma_{\lambda}=\left\{(i, j) \in \mathbb{Z}^{2} \mid 1 \leq i \leq l, 1 \leq j \leq \lambda_{i}\right\}
$$
See Figure 2.1 for the Young diagram associated with the partition $(5,5,4,3,1)$. Denote $|\lambda|=\lambda_{1}+\cdots+\lambda_{l}=\left|\Gamma_{\lambda}\right|$.
A skew Young diagram $\Gamma_{\lambda \backslash \mu}$ is the set theoretic difference of the Young diagrams associated with the partitions $\lambda$ and $\mu$ :
$$
\Gamma_{\lambda \backslash \mu}=\Gamma_{\lambda} \backslash \Gamma_{\mu}
$$
For example, the skew Young diagram $\Gamma_{(5,5,4,3,1) \backslash(3,2)}$ is shown in Figure 2.2.

Figure 2.1.

Figure 2.3.

FigURE 2.2.

FigURE 2.4.
To simplify the notation we will use $\lambda$ to denote both the partition and the corresponding region $\Gamma_{\lambda}$, which we also call the Young diagram of shape $\lambda$. By $\mathcal{R}_{y}$ and $\mathcal{R}_{s y}$ we denote the set of all Young diagrams and the set of all skew Young diagrams, respectively.
By $\lambda \circ \mu$ we denote the skew Young diagram obtained as the disjoint union of the Young diagrams $\lambda$ and $\mu$ where $\mu$ is located to the right and above $\lambda$. The example of $(3,3,1) \circ(2,1)=(5,4,3,3,1) \backslash(3,3)$ is shown in Figure 2.2.
A Young tableau is a Young diagram $\lambda$ filled with integer numbers which increase in rows and columns (see Fig. 2.3). A Young tableaux is called standard if these numbers are $1, \ldots,|\lambda|$. We can think of a Young tableau as a flag of Young diagrams $\emptyset=\lambda^{1} \subset \lambda^{2} \subset \ldots \subset \lambda^{n}=\lambda$. A skew Young tableau is defined analogously.
Recall that by $\mathbf{T}_{n}$ we denote a set of ribbon tiles with $n$ squares (see Figs. 1.121.14). A rim hook tableau is a tiling of a Young diagram $\Gamma_{\lambda}$ by ribbon tiles $\tau \in \mathbf{T}_{n}$ filled with numbers $1,2, \ldots,|\lambda| / n$ (squares in the same tile are filled with the same number), and such that squares of tiles with greater numbers are located either to the right or below squares of tiles with smaller numbers (see Fig. 2.4). Again we can think of a rim hook tableau as a flag of Young diagrams.
The rim hook bijection $\varphi$ maps Young diagrams $\lambda,|\lambda|=m \cdot n$, tileable by $\mathbf{T}_{n}$ into $n$-tuples of Young diagrams $\left(\nu^{1}, \ldots, \nu^{n}\right),\left|\nu^{1}\right|+\cdots+\left|\nu^{n}\right|=m$. The bijection $\varphi$ is designed in such a way that whenever we add a ribbon tile to the diagram $\lambda$ on the outside, there exist $i, 1 \leq i \leq n$, such that $\nu^{i}$ gets a square on the outside (see Fig. 2.5). If we think of rim hook tableaux as flag sequences of tileable Young diagrams, the rim hook bijection maps these flag sequences into the $n$-tuples of Young tableaux filled with numbers $1, \ldots, m$ which are increasing in rows and columns in each tableau. It is known that this establishes a bijection between the rim hook tableau of a fixed tileable Young diagram $\lambda$ and the $n$-tuples of Young tableaux with shapes $\varphi(\lambda)=\left(\nu^{1}, \ldots, \nu^{n}\right)$ which are filled with numbers $1, \ldots, m$, where $|\lambda|=m \cdot n$ (see e.g. [JK], [SW]).
The easiest way to understand the rim hook bijection is to look at Figure 2.6. Take a rim hook tableau tiled with 14 tiles $\tau_{i} \in \mathbf{T}_{3}$ and rotate it counterclockwise $135^{\circ}$ degrees. Then project all hooks on the horizontal axis, preserving their labels and relative order. Split the "shadows" into three ( $n$ in the general case) separate sets of "shadows" depending on their horizontal coordinate mod 3. Then simply

Figure 2.5.

FigURE 2.6.
shorten the shadows and reverse the procedure. At the end we get three Young tableaux filled with the numbers $1, \ldots, 14$ (see Figure 2.6).
Theorem 2.1. The map $\varphi$ defined above is a one-to-one correspondence.
The theorem goes back to Nakayama and Robinson (see [R], JK]). In modern times it was rediscovered by Stanton and White (see [SW], [FS]) and is sometimes attributed to them.
Another way to think of the rim hook bijection is to say that it establishes a bijection between rim hook tableaux of shape $\lambda$ and standard Young tableaux of the skew shape $\nu^{1} \circ \cdots \circ \nu^{n}$. We shall use this interpretation in the next section. Various proofs and applications of the theorem can be found in JK, [FS, S].
## 3. LOCAL MOVES
Let $\lambda \backslash \mu$ be a skew Young diagram. We define local moves on a set of standard Young tableaux of shape $\lambda \backslash \mu$ as follows. Take a pair of numbers $i$ and $i+1$, $1 \leq i<|\lambda|$, and exchange them if they lie in different rows and columns. We claim that, using these moves, one can start with any standard Young tableau of shape $\lambda \backslash \mu$ and get any other such tableau.
Formally, let $\Omega(\lambda \backslash \mu)$ be a graph with vertices all standard Young tableaux of shape $\lambda \backslash \mu$ and edges obtained by applying local moves. An example with $\lambda=(3,2)$ and $\mu=\emptyset$ is shown in Figure 3.1.
Theorem 3.1. Let $\lambda \backslash \mu$ is a skew Young diagram. Then its graph $\Omega(\lambda \backslash \mu)$ is connected.
This result is known and not hard to prove. Some generalizations and applications can be found in $[\mathrm{BW}, \mathrm{BK}$.
Sketch of Proof. Introduce an orientation of edges of the graph $\Omega(\lambda \backslash \mu)$ by distinguishing situations when a local move exchanges $i$ and $i+1$ with $i+1$ lying to the right and above $i$ from those where $i+1$ lies to the left and below $i$ (see Figure 3.1). Observe that the orientation is acyclic and has exactly one sink. This proves the result.
Consider what happens if we apply the bijection $\varphi$ to the vertices of a graph $\Omega(\lambda \backslash \mu)$ in Theorem 3.1. Fix a skew Young diagram $\nu=\nu^{1} \circ \cdots \circ \nu^{n}$. Define local moves on a set of rim hook tableaux of shape $\lambda=\varphi^{-1}\left(\nu^{1}, \ldots, \nu^{n}\right)$ by the image of the corresponding local moves on a standard skew Young tableaux. Observe that squares in a Young tableau of shape $\nu$ correspond to rim hooks in a rim hook tableau of shape $\lambda$. Thus the corresponding local moves on a set of rim hook tableaux will preserve all the rim hooks except two. Since these rim hooks have consequent labels, together they form a skew shape which has exactly two rim hook tableaux (see Figure 3.2). Note that the two rim hooks may lie far from each other, in which case the local move is just relabeling of their numbers. When $n=1$ this is the only case that occurs.
Now we are ready to state an analog of Theorem 3.1. Denote by $\Omega_{n}(\lambda \backslash \mu)$ a graph with rim hook tableaux as vertices and edges connecting those pairs of tableaux which have the same set of all but two rim hooks.
Theorem 3.2. Let $\lambda$ be a Young diagram tileable by $\mathbf{T}_{n}$. Then its graph $\Omega_{n}(\lambda)$ is connected.

FiguRE 3.1.

Figure 3.2.

FigURE 3.3.

FigURE 3.4.
Note that here we do not claim that $\Omega_{n}(\lambda \backslash \mu)$ is connected for any tileable skew Young diagram $\lambda \backslash \mu$. It is true and can be proved by the straightforward generalization of the rim hook bijection. We avoid the use of this natural generalization for the purpose of studying ribbon tile invariants.
Proof. Define $\left(\nu^{1}, \ldots, \nu^{n}\right)=\varphi(\lambda)$ to be the image of $\lambda$ under the rim hook correspondence. Consider $G=\Omega\left(\nu^{1} \circ \cdots \circ \nu^{n}\right)$. The correspondence $\varphi^{-1}$ maps vertices of $G$ onto $\Omega_{n}(\lambda)$ and edges onto edges. In other words, $\varphi^{-1}(G)$ is a subgraph of $\Omega_{n}(\lambda)$. By Theorem 3.1 the graph $G$ is connected. Therefore the graph $\Omega_{n}(\lambda)$ is also connected.
Now let us make a graph on the ribbon tilings of $\lambda$. The idea is to erase the labels in the rim hook tableaux and connect those that were connected before.
Formally, consider a graph $\Theta_{n}(\lambda)$ with vertices being all ribbon tilings $s \in$ $\mathcal{S}\left(\Gamma_{\lambda}, \mathbf{T}\right)$ of a fixed shape $\lambda$. Define the edges to be the pairs of tilings that differ by exactly two tiles. Two examples of such graphs $\Theta_{2}(3,3,2)$ and $\Theta_{3}(3,3,3,3)$ are shown in Figure 3.3 and Figure 3.4 respectively.
Theorem 3.3. Let $\lambda$ be a Young diagram tileable by $\mathbf{T}_{n}$. Then the graph $\Theta_{n}(\lambda)$ is connected.

Figure 3.5.

FiguRE 3.6.
Proof. Consider a map $\iota: \Omega_{n}(\lambda) \rightarrow \Theta_{n}(\lambda)$ which maps rim hook tableaux to ribbon tilings by erasing labels of tiles. By definition $\iota$ maps edges of $\Omega_{n}(\lambda)$ into edges of $\Theta_{n}(\lambda)$. Therefore, in order to prove that $\Theta_{n}(\lambda)$ is connected, all we need to show is that each vertex has a preimage. Indeed, if this is true, in order to find a path between two vertices in $\Theta_{n}(\lambda)$ we simply take their preimages, find a path between them in $\Omega_{n}(\lambda)$, and then map it back to $\Theta_{n}(\lambda)$.
In other words, the theorem in now reduced to the following lemma.
Lemma 3.4. Every ribbon tiling of a Young diagram $\lambda$ admits a labeling which makes it a rim hook tableau of shape $\lambda$.
Proof. We prove the lemma by induction on the number of squares $|\lambda|$. The base case is trivial. Fix a Young diagram $\lambda$. By the border strip of $\lambda$ we mean the set of squares $(i, j) \in \lambda$ such that $(i+1, j+1) \notin \lambda$. A tile $\tau$ is called a border tile if it lies in the border strip (see Figure 3.5). We claim that every ribbon tiling of $\lambda$ must contain at least one border tile. If we find such a tile $\tau$, label it with the largest number. Then there are no tiles that lie to the right of or below $\tau$, and we can proceed by induction with $\lambda \backslash \tau$.
In order to find a border ribbon, start with the lower left corner. It must belong to some tile. This tile has this square as its starting square. If it is not a border tile, find the first border square that is not in that tile. It must belong to some other tile. This tile also has this square as its starting square. Keep on doing so until we find the border tile. It must always exist, since the top right corner must also belong to some tile, and this square cannot be a starting square of any tile unless $n=1$, in which case it is a border tile by definition (see Figure 3.6).
This proves the induction step together with the lemma. The lemma in turn implies Theorem 3.3.
Proof of Theorem 1.6. Observe that the set or regions $\mathcal{B}=\mathcal{B}_{y}$ is exactly the set of all Young diagram shapes. Take the moves to be as described above. The number of different moves is bounded by the the number of pairs of ribbon tiles aligned to each other. The latter number is easily bounded by $n \cdot 4^{n}$, which proves the theorem.
Finally, we would like to note that in the proof of Lemma 3.4 rim hooks need not be of the same length.
## 4. Tile invaRIANTS
Let $\mathcal{B}=\mathcal{B}_{y}$ be a set of tileable Young diagram shapes. In the previous section we showed that all the tilings of $\lambda \in \mathcal{B}_{y}$ can be obtained from each other by a finite set of moves. Here we show that the maps $f_{i}, 0 \leq i1$.
Proof. The tileability follows immediately from the existence of tilings of the rectangles $[2 \times 5],[3 \times 10]$ and of the rectangles $[5 \times 2],[10 \times 3]$ transpose to them (see Figure 7.3).
The other direction is similar to the proof of Theorem 7.1. Observe that if a rectangle $[a \times b]$ can be tiled by $\mathbf{T}$, then either $a$ or $b$ can be divided by 5 . But then $[a \times b]$ is tileable by either a horizontal tile $\tau_{0}$ or a vertical tile $\tau_{0}^{\prime}, \tau_{0}, \tau_{0}^{\prime} \in \mathbf{T}_{5}$. Observe that
$$
f_{\bullet}\left(\tau_{0}\right)=f_{\bullet}\left(\tau_{0}^{\prime}\right)=0 \quad \bmod 2
$$
where $f_{\bullet}: \mathcal{B} \rightarrow \mathbb{Z}_{2}$ is a height invariant. Therefore $f_{\bullet}([a \times b])=0$ for any tileable rectangle $[a \times b]$. On the other hand, for any tile $\tau \in \mathbf{T}$ we have $f_{\bullet}(\tau)=1$. Therefore there must be an even number of tiles in $[a \times b]$, i.e. $10 \mid a \cdot b$. This proves the theorem.
3. Let $\mathbf{T} \subset \mathbf{T}_{5}$ be the set of six tiles shown in Figure 0.6. Note that in this case $\mathbf{T}$ is also symmetric under the transposition.
Theorem 7.3. Let $\mathbf{T}$ be the set of tiles in Figure 0.5. Then the rectangle $[a \times b]$ can be tiled by $\mathbf{T}$ if and only if $10 \mid a \cdot b$ and $a, b \neq 1,3$.
Proof. The tileability follows immediately from the existence of tilings of the rectangles $[2 \times 5],[7 \times 10]$ and of the rectangles $[5 \times 2],[10 \times 7]$ that are transposed to them (see Figure 7.4).
To show the other direction, use the same reasoning as in the proof of Theorem 7.2. If a rectangle $[a \times b]$ can be tiled by $\mathbf{T}$, then its area must be divisible by 5 and therefore it is tileable by either a horizontal or a vertical tile in $\mathbf{T}_{5}$. Thus the 1-convexity invariant $f_{1}$ is 0 on any tileable $[a \times b]$. On the other hand, $f_{1}(\tau)= \pm 1$ for each $\tau \in \mathbf{T}$. Therefore $[a \times b]$ has to be tiled by an even number of tiles, and $10 \mid a \cdot b$. This finishes the proof of the theorem.
Theorem 7.4. The triangular shape $\Delta_{N}$ can be tiled by tiles shown in Figure 0.6 if and only if $N \equiv 0,4,15,19(\bmod 20)$.
Proof. First we prove the tileability part. Observe that $\Delta_{4}$ and $\Delta_{15}$ are both tileable (see Figure 7.5). Now, if we have tilings of the regions $\Delta_{M}, \Delta_{N}$ we can construct a

Figure 7.5.

FiguRE 7.6 .

FigURE 7.7.

FigURE 7.8.
tiling of the region $\Delta_{M+N+1}$ assuming the rectangle $[(M+1) \times(N+1)]$ is tileable. (see Figure 7.6). Analogously, if we have tilings of the regions $\Delta_{M}, \Delta_{N}$ we can construct a tiling of the region $\Delta_{M+N}$ assuming the rectangle $[M \times N]$ is tileable (see Figure 7.7). Since both $[5 \times 16]$ and $[4 \times 15]$ are tileable (see Theorem 7.3), this gives us tilings of $\Delta_{20}=\Delta_{15+5+1}$ and $\Delta_{19}=\Delta_{15+5}$. Going further, if $\Delta_{M}$ is tileable, then $\Delta_{20+M}$ is also tileable. This covers all the values $N \equiv 0,4,15,19$ $(\bmod 20)$.
To prove the "only if" part, start by computing the area. We have
$$
f_{0}\left(\Delta_{N}\right)=\frac{N(N+1)}{2}
$$
Since the area must be divisible by 5 , this gives us $5 \mid N(N+1)$ and $N \equiv 0,4$ $(\bmod 5)$. Now, in each of these cases it is easy to see that $\Delta_{N}$ can be tiled by $\mathbf{T}_{5}$. Indeed, both $\Delta_{4}$ and $\Delta_{5}$ can be tiled by $\mathbf{T}_{5}$ (see Figure 7.8). Since any rectangle $[a \times b]$ is tileable by either a horizontal or a vertical tile in $\mathbf{T}_{5}$, we can use the construction in Figure 7.7 repeatedly and tile $\Delta_{N}$ for all $N \equiv 0,4(\bmod 5)$.

Figure 7.9 .

Figure 7.10
Now we can compute the value of the 1-convexity invariant $f_{1}$ on $\Delta_{N}, N \equiv 0,4$ $(\bmod 5)$. We have
$$
f_{1}\left(\Delta_{4}\right)=f_{1}\left(\Delta_{5}\right)=0, f_{1}\left(\Delta_{N+5}\right)=f_{1}\left(\Delta_{N}\right)
$$
which gives us
$$
f_{1}\left(\Delta_{5 m+4}\right)=f_{1}\left(\Delta_{5 m+5}\right)=0
$$
Since $f_{1}$ takes only the values $\pm 1$ on $\mathbf{T}$, this implies that in order to be tileable $\Delta_{N}$ must have an even number of tiles. Thus $2 \left\lvert\, f_{0}=\frac{N(N+1)}{10}\right.$, and $20 \mid N(N+1)$. This immediately implies $N \equiv 0,4,15,19(\bmod 20)$.
4. Let $\mathbf{T} \subset \mathbf{T}_{5}$ be the set of eight tiles shown in Figure 7.9. As before, we solve the tileability problem for rectangular and triangular shapes.
Theorem 7.5. Let $\mathbf{T}$ be the set of tiles in Figure 7.9. Then a rectangle $[a \times b]$ can be tiled by $\mathbf{T}$ if and only if $(a, b), a \leq b$, satisfies one of the following:
1) $10 \mid a \cdot b, a \geq 8$,
2) $a=4,6,5 \mid b$,
3) $a=5,2 \mid b$.
Proof. The tileability follows from the existence of tilings of the rectangles $[4 \times 5]$, $[5 \times 6]$ and of the rectangles $[5 \times 4],[6 \times 5]$ that are transposed to them (see Figure 7.10). Indeed, then we can construct rectangles $[4 \times 5 \mathrm{~m}],[6 \times 5 \mathrm{~m}],[5 \times 2 r], r \geq 3$, which cover cases 2) and 3). An easy check shows that this also implies tileability in case 1 ).
Now let us prove the "only if" direction. First, we show that 10 must divide $a b$ in order for $[a \times b]$ to be tileable by $\mathbf{T} \subset \mathbf{T}_{5}$. Indeed, the area $f_{0}=a \cdot b$ must be divisible by 5 , which implies that $[a \times b]$ is tileable by either a horizontal or a vertical tile in $\mathbf{T}_{5}$. Now this implies that the 2-convexity invariant takes the value zero on a rectangle, while its value is $\pm 1$ on each of the eight tiles in $\mathbf{T}$. Therefore $[a \times b]$ must contain an even number of tiles in order to be tileable by $\mathbf{T}$, which proves the claim.
Observe that since $10 \mid a \cdot b, a, b>7$, covers by case 1) we are left with the cases when $a$ or $b$ is at most 7. It is easy to see that there are no tileable rectangle with $a=2,3$. An elaborate search of about a dozen beginnings shows that there are no

FigURE 7.11 .
tileable rectangle with $a=7$. These cover all the untileable cases, and finishes the proof of the theorem.
Theorem 7.6. The triangular shape $\Delta_{N}$ can be tiled by tiles shown in Figure 7.9 if and only if $N \equiv 0,5,14,19(\bmod 20)$.
Proof. First we prove the tileability part. Observe that $\Delta_{5}$ and $\Delta_{14}$ are both tileable (see Figure 7.11). Recall that by Theorem 7.5 the rectangles $[14 \times 5],[15 \times 6]$ and $[20 \times N], N \geq 5$, are all tileable by $\mathbf{T}$. Using the same construction as in the proof of Theorem 7.4 (see Figures 7.6 and 7.7), we get tilings on $\Delta_{19}, \Delta_{20}$. We also get a tiling of $\Delta_{20+N}$ from a tiling of $\Delta_{N}$. This covers all the values $N \equiv 0,5,14,19$ $(\bmod 20)$ and proves the "if" part.
To prove the "only if" part, first recall that the area is divisible by 5 if and only if $N \equiv 0,4(\bmod 5)$, and in all these cases $\Delta_{N}$ is tileable by $\mathbf{T}_{5}$ (see the proof of Theorem 7.4). Compute the 2-convexity invariant $f_{2}\left(\Delta_{N}\right)$. We have (see Figures 7.7 and 7.8$)$
$$
f_{2}\left(\Delta_{4}\right)=f_{2}\left(\Delta_{5}\right)=-1, \quad f_{2}\left(\Delta_{N+5}\right)=f_{2}\left(\Delta_{N}\right)-1
$$
which gives us
$$
f_{2}\left(\Delta_{5 m+4}\right)=f_{2}\left(\Delta_{5 m+5}\right)=-m
$$
Since $f_{2}$ takes only the values $\pm 1$ on $\mathbf{T}$, this implies that in order to be tileable the number of tiles in $\Delta_{5 m+4,5}$ must have the same parity as $m$. This immediately implies $N \equiv 0,4,15,19(\bmod 20)$, and finishes the proof.
## 8. SignEd TILINGS ANd COLORING ARGUMENTS
Instead of ordinary tilings one can try using signed tilings (see CL), which are basically placements of tiles on a plane with weights +1 or -1 assigned to each of them. We say that they tile a region if the sum of the weights of the tiles is 1 for every square inside a region and 0 elsewhere.
Even with small sets of tiles it often happens that there are untileable regions which have signed tilings. For example, the region in Figure 1.3 has no ordinary domino tiling but has a signed domino tiling. Indeed, simply tile the rectangle $[3 \times 4]$ by dominoes and add two horizontal dominoes on the top and on the bottom with negative signs.
It turns out that signed tilings are easier to study because of their connection with coloring arguments. By analogy with tile invariants, a coloring map $f: \mathcal{R} \rightarrow G$ is trivial if $f(\Gamma)=0$, for every $\gamma \in \mathcal{R}$, where 0 is an identity element in an abelian group $G$. Otherwise $f$ is called nontrivial.
Theorem 8.1. A region $\Gamma$ has a signed tiling if and only if there is no abelian group $G$ that has a nontrivial $\mathbf{T}$-coloring map $f: \mathcal{R} \rightarrow G$.
Proof. Indeed, consider a group $\mathfrak{G}$ obtained as a free abelian group generated by elements $x_{i, j}$ that correspond to squares of a square grid. Let $\mathfrak{I} \subset \mathfrak{G}$ be a subgroup generated by sums $x_{i_{1}, j_{1}}+x_{i_{2}, j_{2}}+\ldots$ that correspond to translations of tiles.
Observe that the $\mathbf{T}$-coloring maps correspond to the elements of the quotient group $\mathfrak{G} / \mathfrak{I}$. Therefore for every region $\Gamma$ there exists a $\mathbf{T}$-coloring map $f: \mathcal{R} \rightarrow G$ such that $f(\Gamma) \neq 0$ unless the sum of squares of $\Gamma$ lies in $\Im$. On the other hand, a region $\Gamma$ has a signed tiling if and only if the sum of its squares lies in $\mathfrak{I}$. This proves the result.
By analogy with the tile counting group we define a coloring group $\mathbb{O}(\mathbf{T})=\mathfrak{G} / \mathfrak{J}$. It follows from the proof of the theorem that signed tilings and $\mathbf{T}$-coloring maps are basically dual to each other. However, it is convenient to separate them, since they give a different view of the subject.
It is important to note that whenever we have a $\mathbf{T}$-coloring map which proves that a certain region $\Gamma$ is untileable, this also implies that $\Gamma$ has no signed tiling. Therefore in the event when $\Gamma$ is untileable but has a signed tiling (like the region in Figure 1.3 mentioned above), it also means that this fact cannot be proved by use of T-coloring maps. Traditionally the coloring maps were a major instrument in proving untileability results (see [G]), so it is often desirable to check whether they can be used to prove any of our negative results. Below we will show that the results we obtained in the previous section in fact cannot be proved by use of coloring arguments.
Finally, let us point out where the difference between signed and ordinary tilings comes from. Instead of an abelian group $G$ one can take a monoid $M$ (commutative semigroup with an identity element). One can also define a semigroup morphism from all regions to $M$ which is the identity on all tiles. It is not hard to prove a theorem similar to Theorem 8.1 which says that a region $\Gamma$ has a tiling if and only if there exists no morphism which is not the identity on $\Gamma$ (cf. [L]). We skip the details.
Theorem 8.2. Let $\mathbf{T}_{n}$ be a set of ribbon tiles, and let $\mathbb{O}\left(\mathbf{T}_{n}\right)$ be its coloring group. Then
$$
\mathbb{O}\left(\mathbf{T}_{n}\right) \simeq \mathbb{Z}^{n-1}
$$
Proof. Let $Z$ be an abelian group generated by elements $z_{0}, z_{1}, \ldots, z_{n-1}$. Define a coloring map
$$
\zeta: \mathcal{R} \rightarrow Z /\left(z_{0}+\cdots+z_{n-1}\right)
$$
which acts on generators as follows:
$$
\zeta\left(x_{i, j}\right)=z_{(j-i \bmod n)}
$$
To prove that $\zeta$ is indeed a $\mathbf{T}_{n}$-coloring map, note that by definition ribbon tiles in $\mathbf{T}_{n}$ contain no two squares lying on the same diagonal. Therefore they must
contain squares lying in $n$ subsequent diagonals: $i, i+1, \ldots, i+n-1$, where $i \in \mathbb{Z}$. Thus for all $\tau \in \mathbf{T}_{n}$
$$
\zeta(\tau)=z_{i}+\cdots+z_{n}+z_{1}+\cdots+z_{i-1}=0
$$
and $\zeta$ is indeed a $\mathbf{T}_{n}$-coloring map.
We can now prove that the coloring group for the set of ribbon tiles $\mathbf{T}_{n}$ is $\mathbb{Z}^{n-1}$. Let us prove that for any region $\Gamma, \zeta(\Gamma)=0$, there exist a signed tiling of $\Gamma$. Then, by Theorem 8.1, this will imply that the coloring group is isomorphic to $Z /\left(z_{0}+\cdots+z_{n-1}\right) \simeq \mathbb{Z}^{n-1}$, which proves the result.
Let $d_{1}$ be the difference of ribbon tiles $\mathbf{0 0 \ldots 0 0 1}$ and $\mathbf{0 0} \ldots \mathbf{0 0}$ which have the same starting square. Observe that adding $d_{1}$ to a region adds a square $x_{i, j}$ and subtracts a square $x_{i+1, j+1}$ lying on the same diagonal. Let $d_{2}$ be the difference of two horizontal tiles $\mathbf{0 0 \ldots} \mathbf{0}$, one of them having the starting square $x_{i, j}$ and the other in $x_{i, j+1}$. By analogy with $d_{1}, d_{2}$ adds a square $x_{i, j}$ and subtracts a square $x_{i, j+n}$ lying on the same diagonal modulo $n$. Note that all the differences $d_{1}$ and $d_{2}$ are equivalent up to translation.
Now, let $\Gamma$ be a region such that $\zeta(\Gamma)=0$. We show that by adding enough differences $d_{1}$ and $d_{2}$ we can get an empty region. Indeed, by using $d_{2}$ 's we can move all the squares of $\Gamma$ into the first $n$ diagonals. Furthermore, by using $d_{2}$ 's we can move all the squares of $\Gamma$ into the squares $x_{0,0}, x_{0,1}, \ldots,, x_{0, n-1}$. Since $\zeta(\Gamma)=0$, this means that we get the same weight $m$ at each of these squares. Now subtract $m$ copies of the horizontal tile. We get an empty region, which is exactly what we needed. This finishes the proof of the theorem.
Note that if we use only $d_{1}$ without $d_{2}$ we get a sequence of numbers ..., $m_{-1}$, $m_{0}, m_{1}, m_{2}, \ldots$, which are numbers of squares in diagonals. This sequence gives rise to a coloring argument for the ordinary tilings that is more general than the $\mathbf{T}_{2}$ coloring map $\zeta$. For example, it proves that the region in Figure 1.3 is untileable by dominoes. Indeed, the sequence is $1,1,2,2,2,1,1$. The first two ones imply that there is a domino lying in the first two diagonals. Now, the two in the third place implies that there must be two dominoes that lie in the the third and fourth diagonal. Consequently, there must be two dominoes that lie in the the fifth and sixth diagonal. But this is impossible since the sixth number in the sequence is one. Therefore the region in Figure 1.3 is indeed untileable by dominoes.
When we restrict our set of tiles to a subset, all the coloring maps remain. However, a priori other coloring maps may appear. We show that in the cases considered in the previous section this does not happen.
Theorem 8.3. For the set of tiles shown in Figure 7.1 the coloring group is $\mathbb{Z}^{3}$. For the sets of tiles shown in Figures 0.5, 0.6 and 7.9 the coloring group is $\mathbb{Z}^{4}$.
Proof. All we need to show is that our sets of tiles generate differences $d_{1}$ and $d_{2}$. This would imply that their coloring group is the same as that of the ribbon tiles.
1) For the set of tiles in Figure 7.1, $d_{1}$ comes from subtracting 010 and 001 with the same starting square. The difference $d_{2}$ comes from subtracting $\mathbf{1 0 0}$ and $\mathbf{0 0 1}$ with starting squares $x_{i, j}$ and $x_{i-1, j}$ respectively.
2) For the set of tiles in Figure 0.5, $d_{1}$ comes from subtracting 0010 and 0001 with the same starting square. The difference $d_{2}$ comes from subtracting 0111 and 1110 with starting squares $x_{i, j}$ and $x_{i, j+1}$ respectively.
3) For the set of tiles in Figure 0.6, denote $d_{2}$ the difference between 0111 and 1110 with starting squares $x_{i, j}$ and $x_{i, j+1}$ respectively. It adds $x_{i, j}$ and subtracts
$x_{i-3, j+2}$. Analogously define a difference $d_{2}^{\prime}$ between 0001 and 1000 with starting squares $x_{i-1, j}$ and $x_{i, j}$ respectively. It subtracts $x_{i, j}$ and adds $x_{i-2, j+3}$. Now the difference $d_{1}$ comes from adding $d_{2}$ and $d_{2}^{\prime}$.
4) For the set of tiles in Figure 7.9, $d_{1}$ comes from subtracting 0010 and 0011 with the same starting square. The difference $d_{2}$ comes from subtracting 0010 and $\mathbf{0 1 0 0}$ with starting squares $x_{i, j}$ and $x_{i, j+1}$ respectively.
Theorem 8.3 basically tells us that $\zeta(\Gamma)=0$ is a criterion for a region $\Gamma$ to have a signed tiling in each of those cases. Before we can conclude, we need the following technical result.
Lemma 8.4. 1) Let $n=5, \Gamma=\Delta_{N}$. Then $\zeta(\Gamma)=e$ if and only if $N \equiv 0,4$ $(\bmod 5)$.
2) Let $n=5, \Gamma=[a \times b]$. Then $\zeta(\Gamma)=e$ if and only if $5 \mid a \cdot b$.
3) Let $n=4, \Gamma=[a \times b]$. Then $\zeta(\Gamma)=e$ if and only if $4 \mid a$ or $4 \mid b$.
Proof. Parts 1) and 2) follow immediately from the area being divisible by 5 and existence of tilings by $T_{5}$ in all these cases (see the proof of Theorem 7.4).
Part 3) is analogous except for the case when $a, b \equiv 2(\bmod 4)$. In this case a simple direct computation of zeta shows that $\zeta \neq e$.
Corollary 8.5. 1) Let $n=5$, and let $\mathbf{T}$ be any of the sets of tiles shown in Figures 0.5, 0.6 and 7.9. Then $\Delta_{N}$ has a signed tiling by $\mathbf{T}$ if and only if $N \equiv 0,4(\bmod 5)$.
2) Let $n=5$, and let $\mathbf{T}$ be any of the sets of tiles shown in Figures 0.5, 0.6 and 7.9. Then $[a \times b]$ has a signed tiling by $\mathbf{T}$ if and only if $5 \mid a \cdot b$.
3) Let $n=4$, and let $\mathbf{T}$ be the set of tiles shown in Figure 7.1. Then $[a \times b]$ has a signed tiling by $\mathbf{T}$ if and only if $4 \mid$ a or $4 \mid b$.
Proof. This follows immediately from Lemma 8.4 and Theorems 8.3 and 8.1.
Corollary 8.6. None of Theorems $0.1-0.3$ can be proved by the coloring arguments.
## 9. EXTENDED COLORING ARGUMENTS AND TILE INVARIANTS
Recall the definition of a coloring group:
$$
\mathbb{O}(\mathbf{T})=\mathfrak{G} / \mathfrak{I}
$$
where $\mathfrak{G}$ is a free abelian group generated by elements $x_{i, j}$ that correspond to squares of a square grid, and let $\mathfrak{I} \subset \mathfrak{G}$ be a subgroup generated by sums $x_{i_{1}, j_{1}}+$ $x_{i_{2}, j_{2}}+\ldots$ that correspond to translations of tiles.
By analogy, define an extended coloring group as follows:
$$
\overline{\mathbb{O}}(\mathbf{T})=\mathfrak{G} / \mathfrak{I}^{\prime}
$$
where $\mathfrak{I}^{\prime} \subset \mathfrak{G}$ is a subgroup generated by relations
$$
x_{i_{1}, j_{1}}+x_{i_{2}, j_{2}}+\cdots=x_{p_{1}, q_{1}}+x_{p_{2}, q_{2}}+\ldots
$$
where the tiles $\tau_{1}=\coprod_{k}\left(i_{k}, j_{k}\right), \tau_{2}=\coprod_{k}\left(p_{k}, q_{k}\right)$ are translations of the same tile $\tau \in \mathbf{T}$. Of course, $\mathbb{O}(\mathbf{T}) \subset \overline{\mathbb{O}}(\mathbf{T})$.
By definition, every extended coloring argument for a set of tiles $\mathbf{T}$ corresponds to an element of the extended coloring group $\overline{\mathbb{O}}(\mathbf{T})$. In other words, there is a map $\nu: \overline{\mathbb{O}}(\mathbf{T}) \rightarrow \mathbb{G}(\mathbf{T})$. Since $\nu$ is homomorphic, the image $\mathbb{E}(\mathbf{T})=\nu(\overline{\mathbb{O}}(\mathbf{T}))$ is a subgroup in the tile counting group $\mathbb{G}(\mathbf{T})$. Call this image $\mathbb{E}(\mathbf{T}) \subset \mathbb{G}(\mathbf{T})$ a torsion group.

Figure 9.1.
Theorem 9.1. $\mathbb{E}(\mathbf{T}) \simeq \overline{\mathbb{O}}(\mathbf{T}) / \mathbb{O}(\mathbf{T})$.
Proof. By definition, $\mathbb{O}(\mathbf{T})$ is the kernel of $\nu$. This implies the result.
Now we can show that in the case of ribbon tiles most of the invariants cannot be derived by the extended coloring arguments. We shall give a complete description of the torsion group $\mathbb{E}\left(\mathbf{T}_{n}\right)$ and compare it with the previously computed tile counting group $\mathbb{G}\left(\mathbf{T}_{n}\right) \supset \mathbb{E}\left(\mathbf{T}_{n}\right)$.
Definition 9.2. Let $\mathbf{T}_{n}$ be a set of ribbon tiles. A map $f_{\mathbf{v}}: \mathbf{T}_{n} \rightarrow \mathbb{Z}_{n}$ defined as
$$
f_{\mathbf{V}}\left(\varepsilon_{1}, \ldots, \varepsilon_{n-1}\right)=\sum_{i=1}^{n-1} \cdot \varepsilon_{i} \quad(\bmod n)
$$
is called the shade invariant.
An easy geometric interpretation of $f_{\mathbf{v}}$ is given in Figure 9.1. Imagine there is a wall behind our ribbon tile $\tau$, and the light is coming from the southeast. Then $f_{\mathbf{V}}(\tau)$ is equal to the shaded area modulo $n$.
First, observe that $f_{\boldsymbol{v}}$ is a tile invariant. Indeed, if $n$ is odd we have
$$
f_{\mathbf{v}}=f_{1}+2 f_{2}+\cdots+m f_{m} \quad(\bmod n)
$$
where $f_{i}$ is the $i$-convexity invariant and $n=2 m+1$. Analogously, if $n$ is even we have
$$
f_{\mathbf{v}}=f_{1}+2 f_{2}+\cdots+(m-1) f_{m-1}+\left.f_{*}\right|^{\mathbb{Z}_{n}} \quad(\bmod n)
$$
where $n=2 m$ and $g=\left.f_{*}\right|^{\mathbb{Z}_{n}} \bmod n$ is a parity invariant lifted to $\mathbb{Z}_{2 m}$ :
$$
g\left(\varepsilon_{1}, \ldots, \varepsilon_{n-1}\right)=m \varepsilon_{m} \quad(\bmod 2 m)
$$
This gives $f_{\boldsymbol{v}} \in \mathbb{G}(\mathbf{T})$. Let us show that $f_{\mathbf{v}} \in \mathbb{E}(\mathbf{T})$, i.e. that the shade invariant can be obtained by the extended coloring argument. Indeed, consider a coloring $\operatorname{map} f: \mathcal{R} \rightarrow \mathbb{Z}$, defined by $f(i, j)=i \bmod n$. It is easy to see that $\nu(f)=f_{\mathbf{V}}$ and therefore $f_{\mathbf{V}} \in \mathbb{E}\left(\mathbf{T}_{n}\right)$. Analogously, the area invariant $f_{0}=\nu(g) \in \mathbb{E}\left(\mathbf{T}_{n}\right)$, where $g: \mathcal{R} \rightarrow \mathbb{Z}$ is a coloring map defined by
$$
f(i, j)= \begin{cases}1, i-j=0 \quad \bmod n \\ 0, i-j \neq 0 & \bmod n\end{cases}
$$
We claim that except for $f_{0}$ and $f_{\boldsymbol{v}}$ and their linear combinations, no other nontrivial invariant can be obtained by the extended coloring argument.
Theorem 9.3. Let $\mathbf{T}_{n}$ be a set of ribbon tiles, $f_{0}$ the area invariant and $f_{\boldsymbol{\nabla}}$ the shade invariant. Then $\mathbb{E}\left(\mathbf{T}_{n}\right) \simeq \mathbb{Z} \times \mathbb{Z}_{n}$, and the maps $f_{0}$, $f_{\mathbf{v}}$ form an independent basis of invariants.
Proof. We already showed that $f_{0}, f_{\boldsymbol{v}} \in \mathbb{E}\left(\mathbf{T}_{n}\right)$. Since they are independent, together they generate $\mathbb{Z} \times \mathbb{Z}_{n}$.
In the other direction, recall the computation of the coloring group $\mathbb{O}\left(\mathbf{T}_{n}\right) \simeq$ $\mathbb{Z}^{n-1}$ given in Theorem 8.2. Let us compute $\overline{\mathbb{O}}\left(\mathbf{T}_{n}\right)$. By Theorem 9.1 this is all we need to find $\mathbb{E}(\mathbf{T})$.
Denote $\tau_{0}=\mathbf{0 0} \ldots \mathbf{0}, \tau_{1}=\mathbf{1 1} \ldots \mathbf{1}$ and $\tau_{2}=\mathbf{1 0} \ldots \mathbf{0}$. Let us find all coloring maps $f: \mathcal{R} \rightarrow \mathfrak{G}$ (see the proof of Theorem 8.1), $f(i, j)=x_{i, j}$ such that the sums of squares in translations of $\tau_{0-2}$ are constant. Note here that a priori $\nu(f)$ does not have to be a tile invariant, since we do not check the relations for other ribbon tiles.
We claim that $f$ is determined by values $x_{1,1}, x_{1,2}, \ldots, x_{1, n}$ and $x_{2,1}$. Indeed, translations of $\tau_{0}$ and $\tau_{1}$ give us $x_{i, j}=x_{i \pm n, j}=x_{i, j \pm n}$. Now, given $x_{i, j}, \ldots x_{i, j+n-2}$ and the value $f\left(\tau_{2}\right)=x_{1,1}+\cdots+x_{1, n-1}+x_{2,1}$, we get
$$
x_{i+1, j}=f\left(\tau_{2}\right)-x_{i, j}-\cdots-x_{i, j+n-2}
$$
Therefore, given $x_{1,1}, \ldots, x_{1, n}$ and $x_{2,1}$, we first determine $x_{1, j}$, for all $j \in \mathbb{Z}$, then $x_{2, j}$, then $x_{3, j}$, etc. For the negative rows use $x_{i, j}=x_{i+n, j}$. This proves the claim.
Now, by taking a quotient $\overline{\mathbb{O}}\left(\mathbf{T}_{n}\right) / \mathbb{O}\left(\mathbf{T}_{n}\right)$ we can make all values $x_{1,1}, x_{1,2}$, $\ldots, x_{1, n-1}$ zero (see the proof of Theorem 8.2). Let $x_{1, n}=a, x_{2,1}=a+z$. The computations above give us $x_{i+1, j}=a+i z$ and $n z=0$. Therefore $f=a \cdot f_{0}+z \cdot f_{\mathbf{V}}$, and $f_{0}, f_{\mathbf{v}}$ generate the whole torsion group $\mathbb{E}\left(T_{n}\right)$.
As a corollary, from Theorem 9.3 we immediately get Theorem 1.8. As we noted in the introduction, another way to prove Theorem 1.8 would be to find a tileable region $\Gamma \in \mathcal{R}_{\mathbf{T}_{n}} \backslash \mathcal{R}_{r c}, n \geq 3$, such that $f_{\bullet}$ is not constant on the set $\mathcal{S}\left(\Gamma, \mathbf{T}_{n}\right)$ of ribbon tilings. When $n=3$ one such example is shown in Figure 9.2. The value of $f_{\bullet}$ is 1 on the first tiling and 0 on the second tiling. Note also that such a region $\Gamma$ probably must have at least one hole inside (see Conjecture 10.1 in the next section).

FigURE 9.2.
## 10. ConClusion
Let us summarize the results in the paper and compare them with open questions.
The main result of the paper is a description of the tile counting group for a set of ribbon tiles. Note, however that we only considered row convex or column convex regions (which probably include all the interesting ones). However, Conway and Lagarias in CL were able to prove that for $n=3$ the map $f_{1}$ is an invariant for all simply connected regions. Recently Muchnik and the author in MP used a similar
technique to show that for $n=4$ the maps $f_{1}$ and $f_{*}$ are invariants for all simply connected regions. All the available evidence points to the following conjecture *
Conjecture 10.1. The $i$-convexity and parity maps are the group invariants for all simply connected regions.
The major point of our proof is Theorem 1.6, which claims that there is a finite set of moves which can change any tiling of a given Young shape region to any other tiling. This result has been generalized by the author for any skew shape (see $\overline{\mathrm{Pa}}$ ). In fact we believe in the following conjecture.
Conjecture 10.2. Let $\Gamma$ be any simply connected region tileable by $\mathbf{T}_{n}$. Then the graph $\Theta_{n}(\Gamma)$ is connected.
In other words, we claim that the moves defined in section 3 suffice. Of course, the results of section 4 imply that Conjecture 10.1 follows from Conjecture 10.2.
Let us move now to other sets of tiles. Unfortunately it is not always true that there exist a finite number of moves (or local replacement rules as they are also called). For example, let $\mathbf{T} \supset \mathbf{T}_{3}$ be the set of all trominoes (see G] and Figure 10.1). There are infinitely many regions with exactly two tilings that are not local in any sense (see Figure 10.2). Even though there are no finite number of local moves, there still can be some invariants other than the area. Here is an example.
Let $\mathbf{T}$ be the set of four trominoes $\tau_{1}, \ldots, \tau_{4}$ in Figure 10.1. Let $\mathcal{B}=\mathcal{R}_{\mathbf{T}}$ be the set of all $\mathbf{T}$-tileable regions. Define maps $f_{1,2}, f_{2,3}: \mathbf{T} \rightarrow \mathbb{Z}_{3}$ as follows:
$$
\begin{array}{ll}
f_{1,2}\left(\tau_{1}\right)=f_{1,2}\left(\tau_{2}\right)=1, & f_{1,2}\left(\tau_{3}\right)=f_{1,2}\left(\tau_{4}\right)=0 \\
f_{2,3}\left(\tau_{2}\right)=f_{2,3}\left(\tau_{3}\right)=1, & f_{2,3}\left(\tau_{1}\right)=f_{2,3}\left(\tau_{4}\right)=0
\end{array}
$$
Theorem 10.3. Let $\mathbf{T}$ and $\mathcal{B}=\mathcal{R}_{\mathbf{T}}$ be as above, and let $f_{0}$ be an area invariant. Then tile counting group
$$
\mathbb{G}(\mathbf{T}, \mathcal{B}) \simeq \mathbb{Z} \times \mathbb{Z}_{3}^{2}
$$
and the maps $f_{0}, f_{1,2}, f_{2,3}$ form an independent basis of invariants.
Theorem 10.3 basically claims that there is one nontrivial tile invariant $f_{1,2}$, which can be stated as follows:
- For any convex region $\Gamma$ the number of times modulo 3 the tiles $\tau_{1}$ and $\tau_{2}$ occur in a tiling of $\Gamma$ depends only on $\Gamma$.
Theorem 10.3 also claims that rotations of $f_{1,2}$ and the area invariant generate the whole tile invariant group.

FiguRE 10.1.[^11]

Figure 10.2.

Figure 10.3.
Proof of Theorem 10.3. The idea is similar to the one used in section 6. By definition $\mathbb{G}(\mathbf{T} ; \mathcal{B})=\mathbb{Z}^{\mathbf{T}} / I$, where $I$ is the linear span or relations obtained from different tilings of the same region. Thus having enough relations that generate $I^{\prime} \subset I$ will imply that $\mathbb{G}(\mathbf{T} ; \mathcal{B}) \subset \mathbb{Z}^{\mathbf{T}} / I^{\prime}$. In this particular case two types of relations will suffice.
First, there is a relation obtained from the two tilings of $[2 \times 3]$ (see Figure 10.3):
$$
\tau_{1}+\tau_{3}=\tau_{2}+\tau_{4}
$$
Then there is another relation which comes from the two tilings in Figure 10.4:
$$
4 \cdot \tau_{4}+\tau_{2}=4 \cdot \tau_{3}+\tau_{1}
$$
In combination with the first relation and rotations, this gives $3 \cdot \tau_{1}=\cdots=3 \cdot \tau_{4}$. Simple further computations show that the maps $f_{0}, f_{1,2}, f_{2,3}$ are independent and generate the whole tile counting group $\mathbb{G}\left(\mathbf{T}, \mathcal{R}_{\mathbf{T}}\right)$. Therefore we have $\mathbb{G}\left(\mathbf{T}, \mathcal{R}_{\mathbf{T}}\right) \subset$ $\mathbb{Z} \times \mathbb{Z}_{3}^{2}$
Now it remains to prove that $f_{1,2}$ is indeed an invariant. This in turn would imply that $f_{1,2}$ is an invariant, and prove the theorem. This can be done by the tile extended coloring argument.
Let $g: \mathcal{R} \rightarrow \mathbb{Z}_{3}$ be a coloring map defined by $g(i, j)=j-i(\bmod 3)$. Observe that $g \in \overline{\mathbb{O}}(\mathbf{T})$. Compute the corresponding tile invariant $f=\nu(g): \mathcal{R}_{\mathbf{T}} \rightarrow \mathbb{Z}_{3}$. We have
$$
f\left(\tau_{1}\right)=f\left(\tau_{3}\right)=0, f\left(\tau_{2}\right)=-1, f\left(\tau_{2}\right)=1 \quad \bmod 3
$$

Figure 10.4 .

Figure 10.5 .
By the symmetry, we also have another tile invariant $f^{\prime}: \mathcal{R}_{\mathbf{T}} \rightarrow \mathbb{Z}_{3}$, given by
$$
f^{\prime}\left(\tau_{2}\right)=f^{\prime}\left(\tau_{4}\right)=0, f^{\prime}\left(\tau_{1}\right)=-1, f^{\prime}\left(\tau_{3}\right)=1 \quad \bmod 3
$$
From this we get
$$
f_{1,2}=f+f^{\prime}-f_{0} \quad \bmod 3
$$
Therefore both $f_{1,2}$ and $f_{2,3}$ are $\mathbf{T}$-invariants. This finishes the proof.
Note that in the proof of Theorem 10.3 we used nothing but coloring arguments. Of course, with a smaller set of tileable regions, when the tile counting group becomes bigger, this would be impossible. That was the case with ribbon tiles. Indeed, in section 9 we showed that the height invariant cannot be extended to the set of all tileable regions, so the tile counting group $\mathbb{G}\left(\mathbf{T}_{n}, \mathcal{R}_{\mathbf{T}_{n}}\right) \subsetneq \mathbb{G}\left(\mathbf{T}_{n}, \mathcal{B}_{r c}\right)$. Thus finding the tile counting group is probably hard in general unless all invariants follow from the extended coloring arguments.
Even in the case of all $\mathbf{T}$-tileable regions it is still possible to have invariants which do not follow from any extended coloring arguments. Indeed, consider the set $\mathbf{T}$ of two tiles shown in Figure 10.5. It is easy to see that any region either is untileable or has a unique tiling. On the other hand, extended coloring arguments can prove only the area invariant. Note that in this case every region has a signed tiling.
We believe that having $\mathbb{E}(\mathbf{T}) \simeq \mathbb{G}\left(\mathbf{T}, \mathcal{R}_{\mathbf{T}}\right)$, is a rather rare event. However it might occur for certain nice sets of tiles such as finite sets of rectangles. Without making a precise conjecture, let us state the following problem.
Problem 10.4. Let $\mathbf{T}$ be a finite set of rectangles, and let $\mathcal{B}$ be the set of convex regions tileable by $\mathbf{T}$. Find tile invariant group $\mathbb{G}(\mathbf{T} ; \mathcal{B})$ and the torsion group $\mathbb{E}(\mathbf{T})$.
For example, let $\mathbf{T}$ consist of two rectangles $[2 \times 1]$ and $[1 \times 3]$. It is not hard to see that $\mathbb{G}(\mathbf{T} ; \mathcal{B}) \simeq \mathbb{E}(\mathbf{T}) \simeq \mathbb{Z} \times \mathbb{Z}_{5}$. There is some recent literature relevant to the problem (see [Ke] for details).
In this paper we always considered tiles to be identical if they can be obtained by translation. Following some recent literature (see e.g. [Pr]), one can try to distinguish between ribbon tiles with different starting points. It seems to us that at least theoretically the whole analysis of the paper can be generalized for this case, though some computations may become complicated. We challenge the reader to find tileability applications of these generalizations.
Our proof of the main theorem was based on an ad hoc method which probably cannot be generalized in full for other sets of tiles. The heart of the proof is the rim hook bijection. There are shifted, tree, and skew analogs of this bijection (see $[\mathrm{FS}$ and $\mathrm{Pa}$ ), but they all can be reduced to the original bijection in one way or another.
Problem 10.5. Find a three-dimensional analog of the rim hook bijection.
Of course, there are infinitely many open questions and problems, but the reader is probably too tired already to be bothered by whatever is left.
## ACKNOWLEDGMENTS
I would like to express my deep gratitude to Jim Propp for interest in my work, for encouragement, for reading the first draft of this paper, and for useful suggestions. Conversations with Richard Stanley and his comments were very helpful. Nathan Lulov asked me the initial question which later became Theorem 1.8.
## REFERENCES
[BW] A. Bjorner, M. Wachs, Generalized quotients in Coxeter groups., Trans. Amer Math. Soc. 308 (1988), 1-37. MR 89c:05012
[BK] A. Berenstein, A. Kirillov, Groups generated by involutions, Gelfand-Tsetlin patterns, and combinatorics of Young tableaux, St. Petersburg Math. J. 7 (1996), 77-127. MR 96e:05178
[CEP] H. Cohn, N. Elkies, J. Propp, Local statistics for random domino tilings of the Aztec diamond, Duke Math. J. 85 (1996), 117-166. MR 97k:52026
[CL] J. H. Conway, J. C. Lagarias, Tilings with polyominoes and combinatorial group theory, J. Comb. Theory, Ser. A 53 (1990), 183-208. MR 91a:05030
[EKLP] N. Elkies, G. Kuperberg, M. Larsen and J. Propp, Alternating sign matrices and domino tilings. I, II, J. Alg. Comb. 1 (1992), 111-132, 219-234. MR 94f:52035, MR 94f:52036
[FS] S. Fomin, D. Stanton, Rim hook lattices, St. Petersburg Math. J. 9 (1998), 1007-1016. MR 99c:05202
[GJ] M. Garey, D. S. Johnson, Computers and Intractability: A Guide to the Theory of NP-completeness, Freeman, San Francisco, CA, 1979. MR 80g:68056
[G] S. Golomb, Polyominoes, Scribners, New York, 1965. MR 95k:00006 (later ed.)
[JK] G. James, A. Kerber, The Representation Theory of the Symmetric Group, AddisonWesley, Reading, MA, 1981. MR 83k:20003
[Ka] P. W. Kastelyn, The statistics of dimers on a lattice. I. The number of dimer arrangements on a quadratic lattice, Physica 27 (1961), 1209-1225.
$[\mathrm{Ke}] \quad \mathrm{R}$. Kenyon, A note on tiling with integer-sided rectangles, J. Combin. Theory, Ser. A 74 (1996), 321-332. MR 97c:52045
[M] I. G. Macdonald, Symmetric Functions and Hall Polynomials, Oxford University Press, London, 1979. MR 84g:05003
[MP] R. Muchnik, I. Pak, On tilings by ribbon tetrominoes, J. Combin. Theory, Ser. A 88 (1999), 199-193. CMP 2000:01
[Pa] I. Pak, A generalization of the rim hook bijection for skew shapes, preprint, 1997.
[Pr] J. Propp, A pedestrian approach to a method of Conway, or, A tale of two cities, Math. Mag. 70 (1997), 327-340. MR 98m:52031
[R] G. de B. Robinson, Representation Theory of the Symmetric Group, Edinburgh University Press and Univ. of Toronto Press, 1961. MR 23:A3182
[S] R. P. Stanley, Enumerative Combinatorics. Vol. 2, Cambridge Univ. Press, 1999. CMP $99: 09$
[SW] D. Stanton, D. White, A Schensted algorithm for rim hook tableaux, J. Comb. Theory, Ser. A 40 (1985), 211-247. MR 87c:05014
$[\mathrm{TF}] \quad$ H. N. V. Temperley, M. E. Fisher, Dimer problem in statistical mechanics - An exact result, Philos. Mag. 6 (1961), 1061-1063. MR 24:B2436
$[\mathrm{T}]$ W. Thurston, Conway's tiling group, Amer. Math. Monthly 97 (1990), 757-773. MR91k:52028
Department of Mathematics, Yale University, New Haven, Connecticut 06520-8283
E-mail address: paki@math.yale.edu
Current address: Department of Mathematics, MIT, Cambridge, Massachusetts 02139
E-mail address: paki@math.mit.edu
# Доказательство гипотезы Пака о системе локальных ходов для замощений прямоугольников фигурами Т-тетромино
Константин Макарычев*
Юрий Макарычев ${ }^{\dagger}$
#### Abstract
Аннотация В этой работе мы докажем гипотезу Игоря Пака о замощениях односвязной области фигурами тетромино для случая замощений прямоугольника. Проблема была независимо решена в работе Михаила Корна и Игоря Пака [KР].
Гипотеза Пака [Pak]. Любое замощение односвязной области фигурами Т-тетромино можно перевести в любое другое последовательностью локальных ходов следующего вида:

M1A
M1B

M2
*Принстонский Университет, kmakaryc@cs.princeton.edu
†Принстонский Университет, ymakaryc@cs.princeton.edu
Доказательство состоит из нескольких частей. Сперва мы исследуем произвольные замощения прямоугольника тетромино, затем сведем задачу замощения (прямоугольника) к двойственной задаче (six-vertex model). И, наконец, воспользовавшись теоремой [Eloranta] о локальных ходах в six-vertex model, получим требуемый результат.
Для удобсва мы будем использовать следующие названия для направлений: север (верх), юг (низ), запад (лево), восток (право).
Рассмотрим произвольный прямоугольник $4 n \times 4 m$ и его произвольное замощение. Проведем в нем диагонали с шагом в 4 клетки (см. рисунок). Таким образом мы разделили прямоугольник на квадраты (наклоненные на $45^{\circ}$ ). Для краткости будем назывыть стороны этих квадратов - ребрами. Скажем, что ребро регулярно (в данном замощении), если оно пересекает ровно одно тетромино. На следующем рисунке нарисованы 4 регулярных ребра (красным цветом обозначены ребра, темно-красным - ребра, пересекающие тетромино). Назовем замощение регулярным, если все ребра в этом замощении регулярны. Мы хотим доказать, что все замощения регулярны.

Юг
Занумеруем ребра, начиная с северо-западного (верхнего левого) угла, двигаясь с юго-запада на северо-восток:

Лемма 1. Пусть $P$ замощение, в котором первые $n$ ребер регулярны, тогда $(n+1)$-ое ребро также регулярно.
Доказательство. Рассмотрим $(n+1)$-ое ребро в замощении Р и покажем, что оно регулярно. Для этого предположим противное: $(n+1)$-ое ребро не регулярно, т.е. через две клетки ребра проходят различные тетромино.
Это ребро может быть «вертикальным» - идти с северо-запада на юговосток или «горизонтальным» идти с юго-запада на северо восток. Мы рассмотрим эти два случая отдельно.
## Вертикальное ребро
На следующих рисунках темно-красными жирными линиями выделены первые п ребер (про эти ребра нам известно, что они регулярные), $(n+1)$-ое ребро покрашено в синий и желтые цвета.

Рассмотрим тетромино, проходящее через синюю клетку (см. рисунок). Оно
не пересекает регулярные ребра и не проходит через желтую клетку (вторую клетку ребра). Значит, вообще говоря, возможны следующие варианты:
ВАРИАНТ V1:

В этом случае зеленую клетку не может содержать ни одна фигура тетромино (важно, что на юго-западе от этой клетки регулярное ребро, которое содержит клетки одного и того же тетромино).
ВАРИАНТ V2:

Если тетромино расположено, как на рисунке выше, посмотрим какие тетромино проходят через клетки, помеченные крестиками. Единственная возможность (учитывая то, что регулярные (жирные) ребра тетромино может
пересекать только по двум клеткам) - это тетромино, нарисованные голубым и зеленым цветом. Но зеленое тетромино стоит точно так же, как и синее поэтому, рассматривая тетромино на северо-востоке, мы получаем последовательность голубых и зеленых тетромино. Однако эта последовательность должна пересечь вертикальную или горизонтальную (восточную или северную соответственно) стенку прямоугольника. Значит такое замощение невозможно.
## Горизонтальное ребро
Заметим, что любое тетромино, пересекающее розовый квадрат (см. рисунок), пересекает его по двум клеткам. Действительно, если это тетромино пересекает одно из трех регулярных ребер красного квадрата, то его две клетки лежат на этом регулярном ребре, а остальные две должны лежать по одну сторону от ребра, т.е. обе лежат в красном квадрате. Т.к. все клетки красного квадрата покрыты каким-нибудь тетромино, а тетромино, проходящие через регулярные ребра, покрывают четное (0 или 2) число клеток квадрата, то и тетромино, проходящее через четвертое ребро, должно покрывать четное число клеток (хотя через четвертое (нерегулярное) ребро и проходят две тетромино, ясно, что лишь одно из них может пересекать розовый кварат).

Как и в случае с вертикальным ребром, рассмотрим тетромино проходящую через синюю клетку. Видно, что если оно пересекает розовый квадрат по двум клеткам, то оно содержит и желтую клетку, а значит это ребро регулярно. Таким образом это тетромино не может содержать клеток розового квадрата.
Рассмотрим оставшиеся варианты расположения этого тетромино (их два):
ВАРИАНТ Н1:

Если синее тетромино расположено как на рисунке, то мы получаем случай аналогичный V2. Рассматривая тетромино проходящие через клетки, обозначенные крестиками, мы видим, что продолжение замощения на северовосток определяется одназначно (как на рисунке). Однако такое продолжение должно пересечь северную или восточную границу.
ВАРИАНТ Н2:

Если тетромино расположено, как на этом рисунке, то мы сделаем изображенную здесь замену (ход) и прийдем к случаю Н1. (Т.е. мы изменим наше замощение и по пункту Н1 увидим, что оно невозможно).
Таким образом, мы показали, что $(n+1)$-ое ребро регулярное.
Ч.т.д.
Применяя лемму 1 , по индукции, мы получаем:
Теорема 1. Любое замощение прямоугольника $4 n \times 4 m$ фигурами тетромино - регулярно.
Замечание: из этой теоремы легко следует теорема [Walkup], что фигурами тетромино можно замостить только прямоугольники вида $4 n \times 4 m$. Действительно, предположим, что прямоугольник $k \times l$ ( $k$ или $l$ не делится на 4) можно замостить тетромино. Повторяя это замощение несколько раз, мы можем замомстить пряугольник $4 k \times 4 l$. K этому замощению мы уже можем применить теорему 1. Т.е. это замощение регулярно. Теперь если мы рассмотрим изначальное замощение, оно будет так же регулярно, но из-за «граничного» эффекта это невозможно - в северо-восточном углу ребром будет отрезана область, которую невозможно замостить.
Теперь посмотрим как покрываются квадраты, ограниченные ребрами. Как мы уже знаем, каждому ребру квадрата соответствует одно тетромино. Оно может лежать в одном из двух смежных квадратов. Мы будем говорить, что оно направлено из квадрата, не содержащего это тетромино, в квадрат, его содержащий. Таким образом каждому замощению соответствует расстановка стрелок на ребрах «двойственной» решетки (она на рисунке нарисована серым цветом) с вершинами в центрах квадратов. Причем в каждую вершину направлено ровно две стрелки.

Наоборот, легко видеть, что каждой расстановке стрелок (при которой в каждую вершину двойственной решетки смотрят ровно две стрелки) соответствует какое-то замощение тетромино. Это достаточно проверить локально: нужно показать, что любой комбинации входящих стрелок в центр квадрата соответствует какое-то замощение самого квадрата. Причем всего различных вариантов вхождения стрелок два (с точностью до вращения):
1. Соседние стрелки смотрят во внутрь:

2. Диаметрально противоположенные стрелки смотрят во внутрь. Этому варианту соответствуют два замощения (которые переводятся друг в друга преобразованиями M1А и M1в):

Чтобы задача растановки стрелок стала эквивалентной задаче замощения фигурами тетромино, отождествим замощения отличающиеся только на преобразования M1А и M1в. Таким образом образом мы свели задачу замощения к следующей задаче:
Задача «Six-vertex model». Дана решетка, на ее ребрах нужно раставить стрелки так, чтобы в каждую вершину входило ровно две.
Докажем следующую теорему.
Теорема 2 [Eloranta]. Пусть дана решетка в односвязной области. Тогда любую расстановку стрелок можно перевести в любую другую с помощью последовательности локальных ходов, обращающих стрелки цикла вокруг одной клетки.

Доказательство. Введем функцию высоты $h(x)$ на клетках решетки. При переходе от одной клетки к другой $h$ будет увеличиваться на 1 , если мы пересекаем стрелку идущую слева направо (относительно хода нашего движения), и уменьшаться на 1 в противном случае. Эта функция определена корректно, т.к. если мы пройдем по замкнутому циклу число стрелок, выходящих из цикла, будет равно числу стрелок, входящих в цикл (это следует из того, что в каждую вершину входит ровно две стрелки и выходит столько же, значит верен закон сохранения: в каждый цикл «втекает» столько же стрелок сколько и «вытекает»). На границе положим $h(x)$ равной 0 .
Рассмотрим произвольную расстановку стрелок. Приведем ее локальными ходами к одному из локальных минимумов (одна расстановка стрелок меньше или равна другой, если функция высоты первой меньше или равна функции высоты второй в каждой клетке). Покажем, что функция высоты полученой раскраски не содержит локальных максимумов. Действительно, если клетка клетка $s$ - локальный максимум, то ее должен был бы обходить цикл (т.к. во всех направлениях $h(x)$ убывает), обратив направление этого цикла мы уменьшим значение $h(s)$ на 2 и не изменим значения в других точках. Итак, на границе $h(x)$ равна 0 , а внутри области $h(x)$ не имеет локальных максимумов, значит внутри $h(x)$ строго отрицательна. Отсюда, следует, что на границе все стрелки обращены по часовой стрелке. Аналогично, внутри стрелки также образуют концентрические циклы. Таким оброзом мы показали, что все расстановки стрелок, являющиеся локальными минимумами, одинаковые.
Ч.т.д.
Теперь перейдем от двойственной модели к модели замощения фигурами тетромино. Легко видеть, что обращению цикла соответствует следующий локальный ход:

Таким образом этот ход и два хода, по которым мы отождествили замощения:

образуют систему локальных ходов для замощения прямоугольника фигурами тетромино.
Итак, гипотеза Пака доказана в частном случае для прямоугольников.
## Список литературы
[Eloranta] Kari Eloranta, Diamond Ice, Jour. of Stat. Phys., 1999
[KP] Michael Korn, Igor Pak, Tilings of rectangles with T-tetrominoes, http://www-math.mit.edu/ pak/ttet11.pdf
[Pak] Igor Pak, Tile Invariants: New Horizons, 2001
[Walkup] D. W. Walkup, Covering a rectangle with T-tetrominoes, Amer. Math. Monthly 72 (1965), 886-988
# Доказательство гипотезы Пака о системе локальных ходов для замощений прямоугольников фигурами Т-тетромино
Константин Макарычев*
Юрий Макарычев ${ }^{\dagger}$
#### Abstract
Аннотация В этой работе мы докажем гипотезу Игоря Пака о замощениях односвязной области фигурами тетромино для случая замощений прямоугольника. Проблема была независимо решена в работе Михаила Корна и Игоря Пака [КР].
Гипотеза Пака [Pak]. Любое замощение односвязной области фигурами Т-тетромино можно перевести в любое другое последовательностью локальных ходов следующего вида:
[^12]
Доказательство состоит из нескольких частей. Сперва мы исследуем произвольные замощения прямоугольника тетромино, затем сведем задачу замощения (прямоугольника) к двойственной задаче (six-vertex model). И, наконец, воспользовавшись теоремой [Eloranta] о локальных ходах в six-vertex model, получим требуемый результат.
Для удобсва мы будем использовать следующие названия для направлений: север (верх), юг (низ), запад (лево), восток (право).
Рассмотрим произвольный прямоугольник $4 n \times 4 m$ и его произвольное замощение. Проведем в нем диагонали с шагом в 4 клетки (см. рисунок). Таким образом мы разделили прямоугольник на квадраты (наклоненные на $45^{\circ}$ ). Для краткости будем назывыть стороны этих квадратов - ребрами. Скажем, что ребро регулярно (в данном замощении), если оно пересекает ровно одно тетромино. На следующем рисунке нарисованы 4 регулярных ребра (красным цветом обозначены ребра, темно-красным - ребра, пересекающие тетромино). Назовем замощение регулярным, если все ребра в этом замощении регулярны. Мы хотим доказать, что все замощения регулярны.
Север

Юг
Занумеруем ребра, начиная с северо-западного (верхнего левого) угла, двигаясь с юго-запада на северо-восток:

Лемма 1. Пусть $P$ замощение, в котором первые $n$ ребер регулярны, тогда $(n+1)$-ое ребро также регулярно.
Доказательство. Рассмотрим $(n+1)$-ое ребро в замощении Р и покажем, что оно регулярно. Для этого предположим противное: $(n+1)$-ое ребро не регулярно, т.е. через две клетки ребра проходят различные тетромино.
Это ребро может быть «вертикальным» - идти с северо-запада на юговосток или «горизонтальным» идти с юго-запада на северо восток. Мы рассмотрим эти два случая отдельно.
## Вертикальное ребро
На следующих рисунках темно-красными жирными линиями выделены первые п ребер (про эти ребра нам известно, что они регулярные), $(n+1)$-ое ребро покрашено в синий и желтые цвета.

Рассмотрим тетромино, проходящее через синюю клетку (см. рисунок). Оно
не пересекает регулярные ребра и не проходит через желтую клетку (вторую клетку ребра). Значит, вообще говоря, возможны следующие варианты:
ВАРИАНТ V1:

В этом случае зеленую клетку не может содержать ни одна фигура тетромино (важно, что на юго-западе от этой клетки регулярное ребро, которое содержит клетки одного и того же тетромино).
ВАРИАНТ V2:

Если тетромино расположено, как на рисунке выше, посмотрим какие тетромино проходят через клетки, помеченные крестиками. Единственная возможность (учитывая то, что регулярные (жирные) ребра тетромино может
пересекать только по двум клеткам) - это тетромино, нарисованные голубым и зеленым цветом. Но зеленое тетромино стоит точно так же, как и синее поэтому, рассматривая тетромино на северо-востоке, мы получаем последовательность голубых и зеленых тетромино. Однако эта последовательность должна пересечь вертикальную или горизонтальную (восточную или северную соответственно) стенку прямоугольника. Значит такое замощение невозможно.
## Горизонтальное ребро
Заметим, что любое тетромино, пересекающее розовый квадрат (см. рисунок), пересекает его по двум клеткам. Действительно, если это тетромино пересекает одно из трех регулярных ребер красного квадрата, то его две клетки лежат на этом регулярном ребре, а остальные две должны лежать по одну сторону от ребра, т.е. обе лежат в красном квадрате. Т.к. все клетки красного квадрата покрыты каким-нибудь тетромино, а тетромино, проходящие через регулярные ребра, покрывают четное (0 или 2) число клеток квадрата, то и тетромино, проходящее через четвертое ребро, должно покрывать четное число клеток ( хотя через четвертое (нерегулярное) ребро и проходят две тетромино, ясно, что лишь одно из них может пересекать розовый кварат).

Қак и в случае с вертикальным ребром, рассмотрим тетромино проходящую через синюю клетку. Видно, что если оно пересекает розовый квадрат по двум клеткам, то оно содержит и желтую клетку, а значит это ребро регулярно.Таким образом это тетромино не может содержать клеток розового квадрата.
Рассмотрим оставшиеся варианты расположения этого тетромино (их два):
ВАРИАНТ H 1:

Если синее тетромино расположено как на рисунке, то мы получаем случай аналогичный V2. Рассматривая тетромино проходящие через клетки, обозначенные крестиками, мы видим, что продолжение замощения на северовосток определяется одназначно (как на рисунке). Однако такое продолжение должно пересечь северную или восточную границу.
ВАРИАНТ Н2:

Если тетромино расположено, как на этом рисунке, то мы сделаем изображенную здесь замену (ход) и прийдем к случаю Н1. (Т.е. мы изменим наше замощение и по пункту Н1 увидим, что оно невозможно).
Таким образом, мы показали, что $(n+1)$-ое ребро регулярное.
$$
\text { Ч.т.д. }
$$
Применяя лемму 1 , по индукции, мы получаем:
Теорема 1. Любое замощение прямоугольника $4 n \times 4 m$ фигурами тетромино - регулярно.
Замечание: из этой теоремы легко следует теорема [Walkup], что фигурами тетромино можно замостить только прямоугольники вида $4 n \times 4 m$. Действительно, предположим, что прямоугольник $k \times l$ ( $k$ или $l$ не делится на 4) можно замостить тетромино. Повторяя это замощение несколько раз, мы можем замомстить пряугольник $4 k \times 4 l$. К этому замощению мы уже можем применить теорему 1. Т.е. это замощение регулярно. Теперь если мы рассмотрим изначальное замощение, оно будет так же регулярно, но из-за «граничного» эффекта это невозможно - в северо-восточном углу ребром будет отрезана область, которую невозможно замостить.
Теперь посмотрим как покрываются квадраты, ограниченные ребрами. Қак мы уже знаем, каждому ребру квадрата соответствует одно тетромино. Оно может лежать в одном из двух смежных квадратов. Мы будем говорить, что оно направлено из квадрата, не содержащего это тетромино, в квадрат, его содержащий. Таким образом каждому замощению соответствует расстановка стрелок на ребрах «двойственной» решетки (она на рисунке нарисована серым цветом) с вершинами в центрах квадратов. Причем в каждую вершину направлено ровно две стрелки.

Наоборот, легко видеть, что каждой расстановке стрелок (при которой в каждую вершину двойственной решетки смотрят ровно две стрелки) соответствует какое-то замощение тетромино. Это достаточно проверить локально: нужно показать, что любой комбинации входящих стрелок в центр квадрата соответствует какое-то замощение самого квадрата. Причем всего различных вариантов вхождения стрелок два (с точностью до вращения):
1. Соседние стрелки смотрят во внутрь:

2. Диаметрально противоположенные стрелки смотрят во внутрь. Этому варианту соответствуют два замощения (которые переводятся друг в друга преобразованиями M1А и M1в):

Чтобы задача растановки стрелок стала эквивалентной задаче замощения фигурами тетромино, отождествим замощения отличающиеся только на преобразования M1А и M1в. Таким образом образом мы свели задачу замощения к следующей задаче:
Задача «Six-vertex model». Дана решетка, на ее ребрах нужно раставить стрелки так, чтобы в каждую вершину входило ровно две.
Докажем следующую теорему.
Теорема 2 [Eloranta]. Пусть дана решетка в односвязной области. Тогда любую расстановку стрелок можно перевести в любую другую с помощью последовательности локальных ходов, обращающих стрелки цикла вокруг одной клетки.

8
Доказательство. Введем функцию высоты $h(x)$ на клетках решетки. При переходе от одной клетки к другой $h$ будет увеличиваться на 1 , если мы пересекаем стрелку идушую слева направо (относительно хода нашего движения), и уменьшаться на 1 в противном случае. Эта функция определена корректно, т.к. если мы пройдем по замкнутому циклу число стрелок, выходящих из цикла, будет равно числу стрелок, входящих в цикл (это следует из того, что в каждую вершину входит ровно две стрелки и выходит столько же, значит верен закон сохранения: в каждый цикл «втекает» столько же стрелок сколько и «вытекает»). На границе положим $h(x)$ равной 0.
Рассмотрим произвольную расстановку стрелок. Приведем ее локальными ходами к одному из локальных минимумов (одна расстановка стрелок меньше или равна другой, если функция высоты первой меньше или равна функции высоты второй в каждой клетке). Покажем, что функция высоты полученой раскраски не содержит локальных максимумов. Действительно, если клетка клетка $s$ - локальный максимум, то ее должен был бы обходить цикл (т.к. во всех направлениях $h(x)$ убывает), обратив направление этого цикла мы уменьшим значение $h(s)$ на 2 и не изменим значения в других точках. Итак, на границе $h(x)$ равна 0 , а внутри области $h(x)$ не имеет локальных максимумов, значит внутри $h(x)$ строго отрицательна. Отсюда, следует, что на границе все стрелки обращены по часовой стрелке. Аналогично, внутри стрелки также образуют концентрические циклы. Таким оброзом мы показали, что все расстановки стрелок, являющиеся локальными минимумами, одинаковые.
$$
\text { Ч.т.д. }
$$
Теперь перейдем от двойственной модели к модели замощения фигурами тетромино. Легко видеть, что обращению цикла соответствует следующий локальный ход:

M2
Таким образом этот ход и два хода, по которым мы отождествили замощения:

образуют систему локальных ходов для замощения прямоугольника фигурами тетромино.
Итак, гипотеза Пака доказана в частном случае для прямоугольников.
## Список литературы
[Eloranta] Kari Eloranta, Diamond Ice, Jour. of Stat. Phys., 1999
$[\mathrm{KP}]$ Michael Korn, Igor Pak, Tilings of rectangles with T-tetrominoes, http://www-math.mit.edw/ pak/ttet11.pdf
[Pak] Igor Pak, Tile Invariants: New Horizons, 2001
[Walkup] D. W. Walkup, Covering a rectangle with T-tetrominoes, Amer. Math. Monthly 72 (1965), 886-988
# Tiling with Polyominoes and Combinatorial Group Theory
J. H. CONWAY
Princeton University, Princeton, New, Jersey
AND
J. C. Lagarias
AT\&T Bell Laboratories, Murray Hill, New Jersey
Communicated by Andrew Odlyzko
Received May 3, 1988
When can a given finite region consisting of cells in a regular lattice (triangular, square, or hexagonal) in $\mathbb{P}^{2}$ be perfectly tiled by tiles drawn from a linite set of tile shapes? This paper gives necessary conditions for the existence of such tilings using boundary invariants, which are combinatorial group-theoretic invariants associated to the boundaries of the tile shapes and the regions to be tiled. Boundary invariants are used to solve problems concerning the tiling of triangular-shaped regions of hexagons in the hexagonal lattice with certain tiles consisting of three hexagons. Boundary invariants give stronger conditions for nonexistence of tilings than those obtainable by weighting or coloring arguments. This is shown by considering whether or not a region has a signed tiling, which is a placement of tiles assigned weights 1 or -1 , such that all cells in the region are covered with total weight 1 and all cells outside with total weight 0 . Any coloring (or weighting) argument that proves nonexistence of a tiling of a region also proves noncxistence of any signed tiling of the region as well. A partial converse holds: if a simply connected region has no signed tiling by simply connected tiles, then there is a generalized coloring argument proving that no signed tiling exists. There exist regions possessing a signed tiling which can be shown to have no perfect tiling using boundary invariants. 1990 Academic Press, Inc.
## 1. INTRODUCTION
Packing, covering, and tiling problems are among the most basic combinatorial problems. Here we consider problems concerning the possibility or impossibility of tiling finite regions of a regular lattice tiling of $\mathbb{R}^{2}$ by translations of a finite set of (lattice) tiles.
There are three regular lattice tilings of $\mathbb{R}^{2}$, which are the triangular lattice, square lattice, and hexagonal lattice, pictured in Fig. 1.1. Each of these tilings divides $\mathbb{R}^{2}$ into cells, and any cell can be obtained from any other cell by a translation. A lattice figure or region, is a finite union of (closed) cells that is connected. Lattice figures for the three types of lattices are called polyiamonds, polyominoes, and polyhexes, respectively. Two lattice figures are equivalent if one can be obtained from the other by a translation. They are congruent if one can be obtained from the other by a Euclidean motion, which includes rotations and reflections. A (lattice) tile is a simply connected lattice figure. A set $\Sigma$ of lattice figures tiles a region $R$ if $R$ can be covered with translates of figures in $\Sigma$ such that each cell in $R$ is covered by exactly one lattice figure.
Tiling problems on lattices are in general computationally difficult problems. Consider the following two problems:
## Plane Tiling Problem
Instance. A finite set $\Sigma$ of tiles.
Question. Does $\Sigma$ tile the whole lattice?
## Finite Tiling Problem
Instance. A region $R$ and a finite set $\Sigma$ of tiles.
Question. Does $\Sigma$ tile $R$ ?
The Plane Tiling Problem is undecidable, as can be shown by a suitable encoding of the undecidable Wang Tiling Problem (also called the Domino Problem, see $[2 ; 24 ; 14$, Chap. 11]), in which each colored edge of a colored square (Wang tile) is replaced with an appropriately serrated edge following the lattice edges. The Finite Tiling Problem is clearly decidable by exhaustive enumeration and is in the computational complexity class NP because if a tiling exists it can be nondeterministically "guessed." However, it is NP-complete, as may be shown using an encoding of Square Tiling (see $[8$, p. 257]) again obtained using tiles with serrated edges. Consequently it is unlikely that there exists a polynomial time algorithm to solve

(a) Trangular

(b) Square
(c) Hexagonal
Fig. 1.1. Regular lattice tilings of $\mathbb{R}^{2}$.

FIG. 1.2. Triangular region $T_{5}$.
the Finite Tiling Problem. Special methods do exist which can often be used to prove nonexistence of tilings of regions with a single tile. These include coloring and weighting arguments among others $[3-6 ; 8-13 ; 16-20$; 26].
In view of the difficulty of the general Finite Tiling Problem, it is not too surprising that even apparently simple-looking tiling problems can prove difficult to solve. This paper arose from considering the following sets of tiling problems on the hexagonal lattice. Let $T_{N}$ denote the triangular array of cells in the hexagonal lattice having $\binom{N+1}{2}$ cells pictured in Fig. 1.2. The triangle tiling by triangles problem is to decide: for which values of $N$ can $T_{N}$ be tiled by congruent copies of the triangular tile $T_{2}$ pictured in Fig. 1.3a? The triangle tiling by lines problem is to decide: for which values of $N$ can $T_{N}$ be tiled by congruent copies of the three-in-line tile $L_{3}$ pictured in Fig. 1.3b? In these problems one permits tiles to be rotated or reflected. In terms of equivalence classes of tiles the first problem above allows tiling by two inequivalent tiles and the second problem allows tiling by three inequivalent tiles, as pictured in Fig. 1.4.
These two tiling problems have the following answers.
THEOREM 1.1. The triangular region $T_{N}$ in the hexagonal lattice can be tiled by congruent copies of the triangular tile $T_{2}$ if and only if
$$
N \equiv 0,2,9, \text { or } 11(\bmod 12)
$$
Theorem 1.2. It is impossible to tile the triangular region $T_{N}$ in the hexagonal lattice with congruent copies of the three-in-line tile $L_{3}$.
(a) Trianguiar tile $T_{2}$
(b) Three-in-line tule $L_{3}$
Fig. 1.3. Tiles for triangle tiling problems.
(a) Triangular tites
(b) Line tiles
Fig. 1.4. Tile sets of translation-inequivalent tiles.
To solve these problems, we introduce combinatorial group-theoretic invariants associated to the boundaries of the tiles and the region to be tiled; we call these boundary invariants. Section 2 defines these invariants and shows that for a simply connected region $R$ a necessary condition for a tiling by tiles in a set $\Sigma$ to exist is that the combinatorial boundary of the region $R$ be contained in a group $T(\Sigma)$ generated by the boundaries of the tiles in $\Sigma$ (Theorem 2.1). This group-theoretic criterion seems in general no easier to verify than to solve the original problem. It can, however, be successfully applied to the case of the two triangle tiling problems, using group-theoretic properties specific to these problems. This is done in Section 3.
These solutions to the two triangle tiling problems are somewhat complicated, and it is reasonable to ask if simpler solutions exist. We investigate the relation between boundary invariants and other known necessary conditions for a tiling to exist. A region $R$ has a signed tiling using tiles from a set $\Sigma$ if there exists a placement of a finite number of such tiles, possibly overlapping, with each such tile assigned a weight of +1 and -1 , such that for each cell in $R$ the sum of the weights of tiles covering that cell add up to +1 , while for each cell outside $R$ the sum of the weights covering that cell is 0 . Clearly a necessary condition for a tiling to exist is that a signed tiling exist. It is easy to determine when signed tilings exist for the triangle tiling problems.
THEOREM 1.3. The triangular region $T_{N}$ in the hexagonal lattice has a signed tiling by congruent copies of the triangular tile $T_{2}$ if and only if
$$
N \equiv 0 \text { or } 2(\bmod 3)
$$
THEOREM 1.4. The triangular region $T_{N}$ in the hexagonal lattice has a signed tiling by congruent copies of the three-in-line tile $L_{3}$ if and only if
$$
N \equiv 0 \text { or } 8(\bmod 9)
$$
These results are proved in Section 4.
Section 5 studies a notion of generalized coloring argument which includes known coloring and weighting arguments as special cases. Any generalized coloring argument that proves nonexistence of a tiling also proves nonexistence of a signed tiling (see Theorem 5.2). In view of the theorems above we immediately obtain the following consequence.
Theorem 1.5. It is impossible to solve the triangle tiling problems by a generalized coloring argument.
This result gives a sense in which the two triangle tiling problems above do not have a simple solution.
Another interesting example is provided by a result of Walkup [26] showing that an $r \times s$ rectangle can be perfectly tiled by $T$-tetrominoes if and only if $r \equiv s \equiv 0(\bmod 4)$. It can be checked that such rectangles have signed tilings by $T$-tetrominoes if and only if $r s \equiv 0(\bmod 8)$. Hence this problem also cannot be solved by a generalized coloring argument. Walkup's ingenious argument is special to the $T$-tetromino; its relation to the combinatorial group theory approach of this paper is not obvious.
The boundary invariants defined in Section 2 can in principle be defined for tilings on finite subregions of any periodic tiling of $\mathbb{R}^{2}$ or of hyperbolic space $\mathbb{H}^{n}$.
We are indebted to Peter Doyle, Roger Lyndon, and Hugh Montgomery for helpful comments.
## 2. Boundary Invariants: The Tile Group
Boundary invariants can be defined for any regular lattice; for simplicity we treat only the case of the square lattice. The triangle tiling problems described in Section 1 for the hexagonal lattice can be translated into mathematically equivalent tiling problems on the square lattice, see Section 3.
The square lattice in $\mathbb{R}^{2}$ consists of lattice points, edges, and cells. A lattice point is a member of $\mathbb{Z}^{2}$. Two lattice points are neighbors if they are at distance one from each other, so each lattice point has exactly four neighbors. An edge is a line segment connecting two neighboring lattice points; it is either horizontal or vertical. A cell is the set of all points making up the interior and boundary of a square of area one having its four vertices at lattice points.
A (directed) path $P$ in the square lattice consists of a sequence of directed edges specified by a sequence of lattice points $\left\{\left(x_{i}, y_{i}\right): 0 \leqslant i \leqslant n\right\}$, where the $i$ th directed edge connects $\left(x_{i-1}, y_{i-1}\right)$ to $\left(x_{i}, y_{i}\right)$. It is closed if $\left(x_{0}, y_{0}\right)=\left(x_{n}, y_{n}\right)$. A directed path is simple if no edge appears twice and if it does not cross itself, where we say a path crosses itself if there is

(a)

(b)

(c)
Fig. 2.1. Arrangements of cells, (a) and (b) are simply connected. (c) is not.
$0N
\end{array}
$$
Since a signed tiling is finite, there is a positive integer $k$ such that all tiles are in rows $-k$ to $+k$. Hence $n_{B C}(-k-1)=n_{B C}(-k-2)=0$ and applying the congruences for $j=-k,-k+1, \ldots, 0$ successively one obtains
$$
n_{B C}(j) \equiv 0(\bmod 3), \quad-k \leqslant j \leqslant 0
$$
Similarly starting from $n_{B C}(k+1)=n_{B C}(k+2)=0$ and working backwards using $j=k+2, k+1, k, \ldots, N+3$ successively one obtains
$$
n_{B C}(j) \equiv 0(\bmod 3), \quad N+1 \leqslant j \leqslant k
$$

Fig. 4.2. Signed tiling of $T_{8}$ by three-in-line tiles. (A weight -1 tile is placed on the shaded squares.)

FIG. 4.3. Signed tiling of $T_{9 K+8}$ by three-in-line tiles.
Now working forwards using the congruences for $j=1,2, \ldots, N$ one finds for $1 \leqslant j \leqslant N$ that $n_{B C}(j)(\bmod 3)$ is periodic with period 9 and takes the values $(1,1,1,2,2,2,0,0,0)$ for $j=(1,2,3,4,5,6,7,8,9)$, respectively. But (4.2) implies that $n_{B C}(N-1) \equiv n_{B C}(N) \equiv 0(\bmod 3)$; this is impossible unless $N \equiv 0$ or $8(\bmod 9)$.
It remains to construct signed tilings for $N \equiv 0$ or $8(\bmod 9)$. A signed tiling for $N=8$ is easy to find, and one is given in Fig. 4.2. Signed tilings for $N=9 K, 9 K+8$ can be constructed by induction on $K$. Given a signed tiling for $9(K-1)+8$ we obtain one for $9 K$ by tiling the last row with tiles of type $R_{3}$. Then given a signed tiling of $T_{9 K}$ we may subdivide $T_{9 K+8}$ as pictured in Fig. 4.3, and use the signed tilings of $T_{9 K}$ and $T_{8}$ provided by the induction hypothesis together with a tiling of the $8 \times 9 \mathrm{~K}$ rectangular region with $R_{3}$ tiles. This completes the construction.
## 5. Generalized Coloring Arguments and Tile Homology
Many tiling problems have been resolved using arguments involving colorings or weightings of the cells of the underlying lattice. We show that such arguments have a natural interpretation in terms of boundary invariants and that the strongest such arguments are equivalent to detecting the existence of signed tilings.
Consider the square lattice with its associated free group $\mathbf{F}=\langle A, U\rangle$ and cycle group $\mathbf{C}=[\mathbf{F}: \mathbf{F}]$. Coloring or weighting arguments correspond to additive invariants assigned to cells of the square lattice. Part (iii) of the following theorem shows that a natural group encoding such invariants is the maximal abelian quotient group $\mathbf{A}_{0}=\mathbf{C} /[\mathbf{C}: \mathbf{C}]$, which we call the cell group.
THEOREM 5.1. (i) The cycle group $\mathbf{C}$ consists of all words $W$ such that $P(W)$ is a closed directed path in $\mathbb{Z}^{2}$, i.e., $\mathbf{C}=[\mathbf{F}: \mathbf{F}]$.
(ii) The group $[\mathbf{C}: \mathbf{C}]$ consists of all words $W$ such that $P(W)$ is a closed directed path in $\mathbb{Z}^{2}$ with winding number 0 around every cell in $\mathbb{Z}^{2}$. Consequently, $[\mathbf{C}: \mathbf{C}]$ is a normal subgroup of $\mathbf{F}$.
(iii) The group $\mathbf{A}_{0}=\mathbf{C} /[\mathbf{C}: \mathbf{C}]$ is a direct sum of a countable number of copies of $\mathbb{Z}$, which are in one-to-one correspondence with the cells $c_{i j}$ of the lattice $\mathbb{Z}^{2}$. The projection map $\pi_{i, j}: \mathbf{C} \rightarrow \mathbb{Z}$ onto the $c_{i j}$ th $\mathbb{Z}$-summand of $\mathbf{A}_{0}$ is given by the winding number $w\left(P(W) ; c_{i j}\right)$.
We defer the proof of this theorem to the end of this section, in order to proceed directly to the discussion of coloring arguments.
A generalized coloring map is any homomorphism $\phi: \mathbf{C} \rightarrow \mathbf{A}$, where $\mathbf{A}$ is an abelian group. A generalized coloring argument uses a generalized coloring map $\phi$ to show that a simply connected region $R$ cannot be tiled by tiles in a set $\Sigma$ by showing that the image of the combinatorial boundary $[\partial R]$ under $\phi$ is not contained in the image of the tile group $\mathrm{T}(\Sigma)$ under $\phi$. Since all such homomorphisms $\phi$ can be factored as the projection $\pi: \mathbf{C} \rightarrow \mathbf{A}_{0}=\mathbf{C} /[\mathbf{C}: \mathbf{C}]$ composed with a homomorphism $\Phi: \mathbf{A}_{0} \rightarrow \mathbf{A}$, the strongest generalized coloring map is the projection $\pi$ onto the cell group $\mathbf{A}_{0}$.
We justify the name "generalized coloring argument" by showing how the coloring argument in Golomb [9] can be formulated in terms of a generalized coloring map. It is well known that the checkerbuard with two opposite corners removed ("mutilated checkerboard") pictured in Fig. 5.1 cannot be tiled with dominoes. To prove this one colors the checkerboard in a checkerboard pattern. Depending on where the mutilated checkerboard is placed on the lattice, it covers either 30 black squares and 32 white squares or 32 black squares and 30 white squares. Since each domino in a tiling covers one square of each color, any perfectly tiled region must contain the same number of squares of each color, hence the mutilated checkerboard cannot be tiled.
To obtain an equivalent gencralized coloring argument one colors the cells of the lattice $\mathbb{Z}^{2}$ in a checkerboard pattern with the cell $c_{i j}$ having lower left corner $(i, j)$ being colored black if $i+j \equiv 0(\bmod 2)$ and white if $i+j \equiv 1(\bmod 2)$. Now definc a map $\phi: \mathbf{C} \rightarrow \mathbb{Z} \oplus \mathbb{Z}$ given by $\phi=\phi_{1} \oplus \phi_{2}$, where $\phi_{1}(W)$ counts the sum of the winding numbers of the closed path $P(W)$ about all cells $c_{i j}$ with $i+j \equiv 0(\bmod 2)$ (the "white" cells) and $\phi_{2}(W)$

$$
\partial R=U^{-7} A^{-1} U^{-1} A^{-7} U^{7} A U A^{7}
$$
Fig. 5.1. Mutilated checkerboard and dominoes.
denotes the sum of the winding numbers of the closed path $P(W)$ about all cells $c_{i j}$ with $i+j \equiv 1(\bmod 2)$ (the "black cells"). The mutilated checkerboard $R$ has boundary $\partial R=U^{-7}\left(A^{-1} U^{-1}\right) A^{-7} U^{7}(A U) A^{7}$ while
$$
\mathbf{T}(\Sigma)=N\left(\left\langle U^{-1} A^{-2} U A^{2}, U^{-2} A^{-1} U^{2} A\right\rangle\right)
$$
see Fig. 5.1. Now $\phi([\partial R])=\{(30,32),(32,30)\}$ while $\phi(\mathbf{T}(\Sigma))=$ $\{(n, n): n \in \mathbb{Z}\}$, which shows that $R$ cannot be tiled by dominoes. ${ }^{1}$
Other coloring and weighting arguments used in $[5,7,9,10,13,17]$ can be framed in terms of generalized coloring maps in similar fashion.
The information about nonexistence of tilings given by any generalized coloring map $\phi: \mathbf{C} \rightarrow \mathbf{A}$ is completely expressed in terms of the tile homotopy group, using the quotient map $\bar{\phi}: \mathbf{C} / \mathbf{T}(\Sigma) \rightarrow \tilde{\mathbf{A}}=\mathbf{A} / \phi(\mathbf{T}(\Sigma))$ induced by factoring out the tile group $\mathrm{T}(\Sigma)$; indeed $\phi([\partial R])$ is contained in $\phi(\mathbf{T}(\Sigma)$ ) if and only if $\bar{\phi}([\partial R])$ consists of the identity element in $\tilde{\mathbf{A}}$. Conversely, any homomorphism $\bar{\phi}$ from the tilc homotopy group $h(\Sigma)$ into an abelian group $\tilde{\mathbf{A}}$ arises from the generalized coloring map $\phi: \mathbf{C} \rightarrow \tilde{\mathbf{A}}$ given by $\phi=\bar{\phi} \circ \bar{\pi}$, where $\bar{\pi}: \mathbf{C} \rightarrow \mathbf{C} / \mathbf{T}(\Sigma)$ is the natural projection. Thus we may cqually well consider gencralized coloring arguments as specified by homomorphisms $\bar{\phi}$ from the tile homotopy group $\mathbf{h}(\Sigma)$ to abelian groups $\tilde{\mathbf{A}}$.
In this new context the maximal information available about tilings is given by the map $\pi_{s}: \mathbf{h}(\Sigma) \rightarrow \mathbf{H}(\Sigma)$, where $\mathbf{H}(\Sigma)$ is the maximal abelian quotient group of $\mathbf{h}(\Sigma) .^{2}$ We call $\mathbf{H}(\Sigma)$ the tile homology group, by analogy with the well-known fact that the first homology group is the maximal abelian quotient group of the first homotopy group. Using the projection $\bar{\pi}: \mathbf{C} \rightarrow \mathbf{C} / \mathbf{T}(\Sigma)$ we have $\mathbf{H}(\Sigma)=\mathbf{C} / \mathbf{B}(\Sigma)$, where $\mathbf{B}(\Sigma)$ is the kernel of $\pi_{s} \circ \bar{\pi}$. We call $\mathbf{B}(\Sigma)$ the tile boundary group. $\mathbf{B}(\Sigma)$ is the smallest normal subgroup of $\mathbf{C}$ containing $\mathbf{T}(\Sigma)$ and $[\mathbf{C}: \mathbf{C}]$. We claim that
$$
\mathbf{B}(\Sigma)=\mathbf{T}(\Sigma)[\mathbf{C}: \mathbf{C}]
$$
and that $\mathbf{B}(\Sigma)$ is a normal subgroup of $\mathbf{F}$. The inclusion $\mathbf{T}(\Sigma)[\mathbf{C}: \mathbf{C}] \subseteq$ $\mathbf{B}(\Sigma)$ is clear. To prove the other inclusion, note that $\mathbf{T}(\Sigma)[\mathbf{C}: \mathbf{C}]$ is a normal subgroup of $\mathbf{F}$ (hence of $\mathbf{C}$ ) using the general fact that $\mathbf{G}_{1} \mathbf{G}_{2}=$ $\left\{g_{1} g_{2}: g_{1} \in \mathbf{G}_{1}, g_{2} \in \mathbf{G}_{2}\right\}$ is a normal subgroup of a group $\mathbf{G}$ whenever $\mathbf{G}_{1}$ and $\mathbf{G}_{2}$ are both normal subgroups of $\mathbf{G}$. Since $\mathbf{B}(\Sigma)$ is the smallest normal subgroup of $\mathbf{C}$ containing $\mathbf{T}(\Sigma)$ and $[\mathbf{C}: \mathbf{C}]$, it follows that $\mathbf{B}(\Sigma) \subseteq$ $\mathbf{T}(\Sigma)[\mathbf{C}: \mathbf{C}]$, proving the claim.[^13]
The discussion above shows that the maximal information about nonexistence of tilings obtainable by a generalized coloring argument concerns whether or not the combinatorial boundary $[\partial R]$ is in the tile boundary group $B(\Sigma)$. Now we show that this condition is a necessary and sufficient condition for a signed tiling to exist.
THEOREM 5.2. For a simply connected region $R$ and set of tiles $\Sigma$ the following conditions are equivalent:
(i) $R$ has a signed tiling using tiles in $\Sigma$.
(ii) The combinatorial boundary $[\partial R]$ is in the tile boundary group $\mathbf{B}(\Sigma)$.
Proof. (i) $\Rightarrow$ (ii). Suppose that $R$ has a signed tiling. Place $R$ on $\mathbb{Z}^{2}$ so that it has an oriented boundary $\partial R$ with base point $(0,0)$. Let $\left\{\left(T_{i}, \varepsilon_{i}\right): 1 \leqslant i \leqslant k\right\}$ denote the signed tiling of $R$, with $\varepsilon_{i}=1$ or -1 being the sign of the tile $T_{i}$. Let $\partial T_{i}$ denote an oriented boundary of tile $T_{i}$ with base point $(0,0)$, and let $W_{i}$ be an oriented path from $\mathbf{m}_{i}$ to $(0,0)$, where $\mathbf{m}_{i}$ is the basepoint where the tile $T_{i}$ is placed. Consider the word
$$
W=(\partial R)^{-1} \prod_{i=1}^{k}\left(W_{i}\left(\partial T_{i}\right)^{s_{i}} W_{i}^{-1}\right)
$$
We claim that $P(W)$ is a closed path which has winding number 0 about all cells in $\mathbb{Z}^{2}$, so that by Theorem 5.1 (ii), $W \in[C: C]$. To see this, we note that $P\left((\partial R)^{-1}\right)$ has winding number -1 about all cells in $R$ and winding number 0 elsewhere, while $P\left(W_{i}\left(\partial T_{i}\right)^{s_{i}} W_{i}^{-1}\right)$ has winding number $\varepsilon_{i}$ about all cells in $T_{i}$ and winding number 0 elsewhere, so the claim follows by definition of a signed tiling. Thus $W \in[\mathbf{C}, \mathbf{C}]$ and
$$
\partial R=\left(\prod_{i=1}^{k}\left(W_{i}\left(\partial T_{i}\right)^{\varepsilon_{i}} W_{i}^{-1}\right)\right) W^{-1}
$$
is expressed as an element of $\mathbf{T}(\Sigma)[\mathbf{C}: \mathbf{C}]$, which is $\mathbf{B}(\Sigma)$. Since $\mathbf{B}(\Sigma)$ is a normal subgroup of $\mathbf{F}$, the conjugacy class $[\partial R] \subseteq \mathbf{B}(\Sigma)$.
(ii) $\Rightarrow$ (i). Place $R$ so that it has an oriented boundary $\partial R$ with base point $(0,0)$. Since $\partial R \in \mathbf{B}(\Sigma)$ and $\mathbf{B}(\Sigma)=\mathbf{T}(\Sigma)[\mathbf{C}: \mathbf{C}]$, one has
$$
\partial R=\left(\prod_{i=1}^{k}\left(W_{i}\left(\partial T_{i}\right)^{s_{i}} W_{i}^{-1}\right)\right) W^{-1}
$$
where $\partial T_{i}$ are oriented boundaries of tiles in $\Sigma$ with basepoint $(0,0), \varepsilon_{i}$ takes
values $\pm 1$, and $W \in[\mathbf{C}: \mathbf{C}]$. Now we can reverse the previous argument. By Theorem 5.1 (ii) the path $P(W)$ associated to the word
$$
W=(\partial R)^{-1}\left(\prod_{i=1}^{k}\left(W_{i}\left(\partial T_{i}\right)^{\varepsilon_{i}} W_{i}^{-1}\right)\right)
$$
has winding number 0 about all cells. Computing the winding numbers of $P\left((\partial R)^{-1}\right)$ and $P\left(W_{i}\left(\partial T_{i}\right)^{\varepsilon_{i}} W_{i}^{-1}\right)$ about each cell shows that $\left\{\left(T_{i}, \varepsilon_{i}\right)\right\}$ is a signed tiling of $R$.
Theorem 1.5 follows easily from this result.
Proof of Theorem 1.5. Theorem 5.3 and the discussion preceding it show that a gencralized coloring argument can only prove the nonexistence of a tiling by proving the nonexistence of a signed tiling. Since we have shown that both triangle tiling problems have instances having a signed tiling but no perfect tiling, these problems cannot be solved by any generalized coloring argument.
We have obtained the following hierarchy of successively weaker tiling invariants.
THEOREM 5.3. Let $R$ be a simply connected region and $\Sigma$ a set of tiles. Consider the conditions:
(H1) $\quad R$ can be tiled using tiles in $\Sigma$.
(H2) $[\partial R]$ is in the tile group $\mathrm{T}(\Sigma)$.
(H3) $[\partial R]$ is in the tile boundary group $\mathbf{B}(\Sigma)$.
Then $\mathrm{H} 1) \Rightarrow(\mathrm{H} 2) \Rightarrow(\mathrm{H} 3)$. These implications are not reversible in general.
Proof. The assertion $(\mathrm{H} 1) \Rightarrow(\mathrm{H} 2)$ is exactly Theorem 2.1. $(\mathrm{H} 2) \Rightarrow(\mathrm{H} 3)$ is immediate.
To show $(\mathrm{H} 2) \nRightarrow(\mathrm{H} 1)$ let the tile set $\Sigma$ consist of a $2 \times 2$ square and a $3 \times 3$ square. Consider the $L$-shaped region $R$ obtained by removing a $2 \times 2$ square from the upper right corner of a $3 \times 3$ square. It is clear that $[\partial R] \in \mathbf{T}(\Sigma)$ and that $R$ cannot be tiled by translates of these two tiles.
The implication $(\mathrm{H} 3) \neq(\mathrm{H} 2)$ follows from the triangle tiling by lines problem. By Theorem 1.4 a signed tiling exists for $N \equiv 0 \operatorname{or} 8(\bmod 9)$, and (H3) then holds by Theorem 5.2. The proof of Theorem 1.2 shows that (H2) does not hold in this case.
By using semigroups instead of groups one can obtain a necessary and sufficient condition for a tiling to exist. The tile semigroup $\mathbf{T}^{+}(\Sigma)$ is defined
to be the subsemigroup of the free group $\mathbf{F}$ generated by the conjugacy classes $\{[\partial T]: T \in \Sigma\}$.
THEOREM 5.4. Let $R$ be a simply connected region and $\Sigma$ a set of tiles. The following conditions are equivalent:
(i) $R$ can be tiled by tiles in $\Sigma$.
(ii) $[\partial R]$ is contained in the tile semigroup $\mathrm{T}^{+}(\Sigma)$.
Proof. (i) $\Rightarrow$ (ii). The proof of Theorem 2.1 actually shows this. (ii) $\Rightarrow$ (i). Using tiles with basepoints, if $[\partial R] \subseteq \mathbf{T}^{+}(\Sigma)$, then $\partial R$ can be expressed as
$$
\partial R=\prod_{i=1}^{k} \dot{W}_{i}\left(\partial T_{i}\right) W_{i}^{-1}
$$
from which a tiling of $R$ can be directly read off, using winding numbers around cells of $R$.
Now we give the proof that was deferred.
Proof of Theorem 5.1. (i) Let $\mathbf{C}_{0}$ consist of all words $W$ such that $P(W)$ is a closed directed path in $\mathbb{Z}^{2} . \mathbf{C}_{0}$ is clearly a normal subgroup of $\mathbf{F}$.
We first show that $[\mathbf{F}: \mathbf{F}] \subseteq \mathbf{C}_{0}$. Expressing a word $W$ in the generators $A, U, A^{-1}, U^{-1}$ as a directed path it is easy to see this path is closed iff
$$
\begin{aligned}
& \# \operatorname{occurrences}(A)=\# \operatorname{occurrences}\left(A^{-1}\right) \\
& \# \operatorname{occurrences}(U)=\# \operatorname{occurrences}\left(U^{-1}\right)
\end{aligned}
$$
All commutators $A B A^{-1} B^{-1}$ have this property, hence $[\mathbf{F}: \mathbf{F}] \subseteq \mathbf{C}_{0}$.
Now we prove $\mathbf{C}_{0} \subseteq[\mathbf{F}: \mathbf{F}]$. Let $W$ be a word representing an element of $\mathbf{C}_{0}$. We assign to each word $W$ an invariant $(n, k, l)$, where $n$ is the length of the word, $k$ is the maximum value $i^{2}+j^{2}$ of any vertex $(i, j) \in \mathbb{Z}^{2}$ visited by the path $P(W)$, and $l$ denotes the number of vertices $(i, j)$ with $i^{2}+j^{2}=k$ (counted with multiplicity) that are visited by the path $P(W)$. Note that $k$ and $l$ are both less than $n^{2}$. We proceed by induction on triples ( $n, k, l$ ) ordered lexicographically. The base case is $(0,0,0)$, which is the identity. For the induction step, if $W$ contains any adjacent pairs of generators $G G^{-1}$ we may cancel them and decrease its length. If this is not the case, the path $P(W)$ corresponding to $W$ traverses no edge twice in succession. Let $(i, j)$ be a vertex with $i^{2}+j^{2}=k$ visited by $P(W)$. If $(i, j)$ is in the first quadrant, then either $W=W_{2} A^{-1} U W_{1}$ with $U W_{1}$ visiting vertex $(i, j)$ or $W=W_{2} U^{-1} A W_{1}$ with $A W_{1}$ visiting vertex $(i, j)$, as pictured in Fig. 5.2.

Fig. 5.2. Shortening a word in the first quadrant.
In the first case the word $\tilde{W}=W_{2} U A^{-1} W_{1}$ has a lexicographically smaller value ( $n, k, l-1$ ) or ( $n, k^{1},{ }^{*}$ ), and in the group $\mathbf{F}$ one has
$$
W=\left(W_{2} A^{-1} U A U^{-1} W_{2}^{-1}\right) \tilde{W}
$$
where $W_{2} A^{-1} U A U^{-1} W_{2}^{-1}$ is a conjugate of a commutator, so it is in $[\mathbf{F}: \mathbf{F}]$. By the induction hypothesis, $\tilde{W}$ is in $[\mathbf{F}: \mathbf{F}]$, hence so is $W$. In the second case above we use $\tilde{W}=W_{2} A U^{-1} W_{1}$ and the same argument. Similar arguments work for $(i, j)$ in the other three quadrants, completing the induction step, and proving $\mathbf{C}_{0}=[\mathbf{F}: \mathbf{F}]=\mathbf{C}$.
(ii) Let $\mathbf{C}_{1}$ consist of all words $W$ such that $P(W)$ is a closed path with winding number 0 about all cells. $\mathbf{C}_{1}$ is clearly a normal subgroup of F. We must show $\mathbf{C}_{1}=[\mathbf{C}: \mathbf{C}]$.
We show $[\mathbf{C}: \mathbf{C}] \subseteq \mathbf{C}_{1}$. Since winding numbers are additive, if $W_{1}, W_{2} \in \mathbf{C}$ then both they and their inverses correspond to closed paths, whence
$$
\begin{aligned}
& w\left(W_{1} W_{2} W_{1}^{-1} W_{2}^{-1} ; c_{i j}\right) \\
& \quad=w\left(W_{1} ; c_{i j}\right)+w\left(W_{2} ; c_{i j}\right)+w\left(W_{1}^{-1} ; c_{i j}\right)+w\left(W_{2}^{-1} ; c_{i j}\right)=0
\end{aligned}
$$
for all cells $c_{i j}$.
We show $\mathbf{C}_{1} \subseteq[\mathbf{C}: \mathbf{C}]$ by induction on the invariant ( $n, k, l$ ) ordered as in the previous argument. The base case is the empty word, identified with the identity element of $\mathbf{F}$. For the induction step, let $W$ have value $(n, k, l)$. If $W$ contains any adjacent pairs of generators of the form $G G^{-1}$, we may cancel them and complete the induction step. Otherwise let $(i, j)$ with $i^{2}+j^{2}=k$ be a vertex visited by the path corresponding to $W$. For the subsequent argument we relabel the cells so that $c_{i j}$ denotes the cell whose vertex furthest from the origin $(0,0)$ is $(i, j)$. We examine all the visits of the path of $W$ to $(i, j)$. Suppose $(i, j)$ is in the first quadrant. At each visit the path either arrives at this vertex from $(i, j-1)$ and exits to $(i-1, j)$ via $A^{-1} U$, or else arrives from $\left(i-1, j\right.$ ) and exits to $(i, j-1)$ via $U^{-1} A$, as in Fig. 5.2. Now we compute the winding number $w\left(W ; c_{i j}\right)$ using the
argument principle, as in [15]. Since the path never crosses the line $i+j=k$, one has
$$
w\left(W ; c_{i j}\right)=\# \text { occurrences }\left(A^{-1} U\right)-\# \operatorname{occurrences}\left(U^{1} A\right)
$$
where this sum is over visits to $(i, j)$ only. Since this winding number is zero, there must be at least one visit of each kind, and one has $W=W_{3} A^{-1} U W_{2} U^{-1} A W_{1}$ or $W=W_{3} U^{-1} A W_{2} A^{-1} U W_{1}$, where $W_{1}, W_{2}$, $W_{3}$ are possibly empty words, and the path of $W$ visits $(i, j)$ in the middle of $A^{-1} U$ and of $U^{-1} A$. In the first case, let $\tilde{W}=W_{3} U A^{-1} W_{2} A U^{-1} W_{1}$, which has invariant either $(n, k, l-2)$ or $\left(n, k^{1},{ }^{*}\right)$, and note that as words in $F$ one has
$$
W=\left(W_{3} A^{-1} U W_{2} U^{-1} A\right)\left(U A^{-1} W_{2}^{-1} A U^{-1} W_{3}^{-1}\right) \tilde{W}
$$
Calling the right side of this expression $Z \tilde{W}$, one finds after inserting suitable words of the form $D D^{-1}$ that
$$
Z=M N M^{-1} N^{-1}
$$
where $M=W_{3} A^{-1} U W_{2} U^{-1} A W_{3}^{-1}$ and $N=W_{3} U A^{-1} U^{-1} A W_{3}^{-1}$. Since $M$ and $N$ yield closed paths, it follows that $Z$ is in $[\mathbf{C}: \mathbf{C}]$. By the induction hypothesis $\tilde{W}$ is in $[\mathbf{C}: \mathbf{C}]$, hence so is $W$. Similar arguments work in the second case $W=W_{3} U^{-1} A W_{2} A^{-1} U W_{1}$ and for $(i, j)$ in the other three quadrants. This completes the induction step showing $\mathbf{C}_{1} \subseteq[\mathbf{C}: \mathbf{C}]$, and (ii) is proved.
(iii) Define a homomorphism $\pi=\oplus_{i, j} \pi_{i, j}$ from $\mathbf{C}$ to $\Theta_{(i, j)} \mathbb{Z}$ by $\pi_{i, j}=w\left(P(W) ; c_{i j}\right)$. This map is well defined by part (i) and its kernel is $[\mathbf{C}: \mathbf{C}]$ by part (ii). Hence its image is isomorphic to $\mathbf{C} /[\mathbf{C}: \mathbf{C}]$.
## REFERENCES
1. L. V. Ahlfors. "Complex Analysis." 2nd ed., McGraw-Hill, New York, 1966.
2. R. Berger, The undecidability of the domino problem, Mem. Amer. Math. Soc. 66 (1966).
3. R. Brualdi and T. H. Foregger, Packing boxes with harmonic bricks, J. Combin. Theory Ser. B 17 (1974), 81-114.
4. R. Brualdi and T. H. Foregger, Some hypergraphs and packing problems associated with matrices of 0's and 1's. J. Combin. Theory Ser. B 17 (1974), 115-123.
5. N. G. de Bruisn, Filing boxes with bricks, Amer. Math. Monthly 76 (1964), 37-40.
6. H. S. M. Coxeter and W. O. J. Moser, "Generators and Relations for Discrete Groups," Springer-Verlag, Berlin, 1957.
7. M. Gardnfr, Mathematical games, Sci. Amer. 211 (1964), 124-130; 213 (1965), 96-104; 216 (1967), 124-132; 233 (1975), 112-117; 234 (1976), 122-140; 241 (1976), 119-123.
8. M. Garey and D. S. Johnson, "Computers and Intractability: A Guide to the Theory of NP-completeness," Freeman, San Francisco, 1979.
9. S. Golomb, Checker boards and polyominoes, Amer. Math. Monthly 61 (1954), 675-682.
10. S. Golomb, Covering a rectangle with L-tetrominoes, Amer. Math. Monthly 70 (1963), $760-761$.
11. S. Golomb, Replicating figures in the plane, Math. Gazette 48 (1964), 403-412.
12. S. Golomb, "Polyominoes," Scribners, New York, 1965.
13. S. Golomb, Tiling with polyominoes, J. Combin. Theory 1 (1966), 280-296.
14. B. Grunbaum and G. C. Shepard, "Tilings and Patterns," Freeman, New York, 1987.
15. P. Henrici, "Applied and Computational Complex Analysis," Vol. I, Wiley, New York, 1974.
16. G. Katona and D. Szasz, Matching problems, J. Combin. Theory 10 (1971), 60-92.
17. J. B. Kelly, Polynomials and polyominoes, Amer. Math. Monthly 73 (1966), 464-471.
18. D. Klarner, A packing theory, J. Combin. Theory 8 (1970), 272-278.
19. D. KLarner, Brick-packing puzzles, J. Recreational Math. 6 (1973), 112-117.
20. D. Klarner and F. Göbel, Packing boxes with congruent figures, Kon. Ned. Acad. Wetensch. Ser. A 72 (1969), 465472.
21. R. C. Lyndon and P. E. Schupp, "Combinatorial Group Theory," Springer-Verlag, New York, 1977.
22. W. Magnus, A. Karrass, and D. Solitar, "Combinatorial Group Theory," Interscience, New York, 1966 (Dover reprint 1976).
23. M. H. A. Newman, "Topology of Plane Sets of Points," Cambridge Univ. Press, Cambridge, 1951.
24. R. M. Robinson, Undecidability and nonperiodicity of tilings in the plane, Int. Math. 12 (1971), 177-209.
25. W. Thurston, Conway's tiling groups, Amer. Math. Monthly 95 (1990), Special Geometry Issue, to appear.
26. D. Walkup, Covering a rectangle with T-tetrominoes, Amer. Math. Monthly 72 (1965), 986-988.
# RIBBON TILE INVARIANTS FROM SIGNED AREA
CRistopher Moore
Computer Science Department and Department of Physics and
Astronomy, University of New Mexico, Albuquerque NM 87131
moore@cs.unm.edu
IGOR PAK
Department of Mathematics, MIT,
Cambridge, MA 02139
pak@math.mit.edu
May 17, 2001
#### Abstract
Ribbon tiles are polyominoes consisting of $n$ squares laid out in a path, each step of which goes north or east. Tile invariants were first introduced in [P1], where a full basis of invariants of ribbon tiles was conjectured. Here we present a complete proof of the conjecture, which works by associating ribbon tiles with certain polygons in the complex plane, and deriving invariants from the signed area of these polygons.
## 1. INTRODUCTION
Polyomino tilings have been an object of attention of serious mathematicians as well as amateurs for many decades [G]. Recently, however, the interest in tiling problems has grown as some important ideas and techniques have been introduced. In [P1], the second author introduced a tile counting group, which appears to encode a large amount of information concerning the combinatorics of tilings. He made a conjecture on the group structure, and obtained several partial results. A special case of the conjecture was later resolved in [MP]. In this paper we continue this study and complete the proof of the conjecture.
Consider the set of ribbon tiles $\mathbf{T}_{n}$, defined as connected $n$-square tiles with no two squares in the same diagonal $x+y=c$ (as in the figures below). It is easy to see that $\left|\mathbf{T}_{n}\right|=2^{n-1}$, as each tile can be associated with a path of length $n-1$ in the square lattice, each step of which goes east or north. Recording these moves by $\mathbf{0}$ and $\mathbf{1}$ respectively, we obtain a sequence $\varepsilon=\left(\varepsilon_{1}, \ldots, \varepsilon_{n-1}\right) \in\{0,1\}^{n-1}$, which uniquely encodes a ribbon tile. We will refer to this tile as $\tau_{\varepsilon}$.[^14]

Figure 1. Two dominoes.

00

Figure 2. Four ribbon trominoes.

100

101

Figure 3. Eight ribbon tetrominoes.
Now, let $\Gamma$ be a finite simply connected region, and let $\nu$ be a tiling of $\Gamma$ by ribbon tiles in $\mathbf{T}_{n}, n \geq 2$. We denote by $a_{\varepsilon}(\nu)$ the number of times the ribbon tile $\tau_{\varepsilon}$ is used in $\nu$.
Conjecture 1.1 [P1] Let $\Gamma$ and $\nu$ be as above. Then for every $i, 1 \leq iDepartment of Mathematics, Yale University, New Haven, Connecticut 06520
E-mail: \{roma,paki\}@math.yale.edu
Communicated by the Managing Editors
Received July 18, 1998
## 1. INTRODUCTION
A ribbon polyomino is a polyomino which has at most one square $(i, j)$ in every diagonal $i-j=c$. A tetromino is a polyomino with four squares. Up to translations there are exactly 8 different ribbon tetrominoes, which we denote $\tau_{1}, \ldots, \tau_{8}$ as in Fig. 1. Let $\mathbf{T}=\left\{\tau_{1}, \ldots, \tau_{\mathbf{8}}\right\}$.
Now let $\Gamma$ be a simply connected region (a finite connected set of squares), and let $v$ be a tiling of $\Gamma$ by ribbon tetrominoes. This means that $\Gamma$ is covered without intersection by parallel translations of ribbon tetrominoes. Denote by $a_{i}(v)$ the number of times tetromino $\tau_{i}$ occurs in the tiling $v$. While numbers $a_{i}$ may be different for different tilings, this is no longer true for certain linear combinations of them.
Theorem 1.1. For every simply connected region $\Gamma$ and a tiling $v$ of $\Gamma$ we have
$$
a_{2}(v)+a_{3}(v)-a_{6}(v)-a_{7}(v)=C_{1}(\Gamma)
$$
and
$$
a_{1}(v)+a_{2}(v)+a_{7}(v)+a_{8}(v)=C_{2}(\Gamma) \quad(\bmod 2)
$$
where $C_{1,2}(\Gamma)$ are functions of $\Gamma$ and do not depend on $v$.
The theorem was conjectured by the second author in [P], where it was proved for all row (column) convex regions. A more general version of the conjecture for all ribbon polyominoes remains open (see [P] for details).[^19]
FIGURE 1
While the result for row (column) convex regions was obtained by use of the Young tableau technique, here we rely on the technique developed by Conway and Lagarias in [CL].
It remains open whether there exists a finite set of "moves" such that by using these moves one can start with any tiling and get to any other tiling of a given simply connected region. Such a set of moves was proposed in [P] where this property was shown for Ferrer's shapes. In case of domino tilings and lozenges the result is known for all simply connected regions (see $[\mathrm{ST}, \mathrm{T}]$ ).
It is important to note that as shown in [P] the theorem cannot be obtained by use of the coloring arguments (see [G, CL]). Thus our result lays in line with other "hard" results for trominoes (see [CL]), T-tetrominoes (see $[\mathrm{W}]$ ), skew and square tetrominoes (see $[\mathrm{Pr}]$ ), and rectangles (see $[\mathrm{K}]$ ).
## 2. PROOF OF THE THEOREM
Observe that all tiles $\tau \in \mathbf{T}$ are simply connected. This fact is crucial in the induction we present below. Our proof relies on the following lemma.
LemmA 2.1. Let $\Gamma$ be a compact simply connected region. Assume that $v$ is a tiling of $\Gamma$ by tiles $\tau_{i} \in \mathbf{T}$. Then there exists a tile $\tau$ in the tiling $v$ such that $(\Gamma-\tau)$ is simply connected.
Versions of the lemma have appeared previously in [CL, Pr]. We give here a new rigorous proof of the claim.
Proof. Denote by $|v|$ the number of tiles in a tiling $v$. The result is trivial for $|v|=1,2$. Now suppose $|v|>2$. We say that two regions are
attached if the intersection of their boundaries contains an interval. Note that two regions can be attached from either inside or outside.
Observe that if we remove any tile $\tau \in v$ which is attached to $\Gamma$, then we obtain a region which is a union of simply connected regions. Indeed, this follows from $\Gamma^{c}+\tau$ being connected since $\Gamma$ is simply connected, and $\tau$ is attached to $\Gamma^{c}$. ( $\Gamma^{c}$ is a complement of $\Gamma$.)
Denote by $l(\tau)$ the number of tetrominoes in the smallest connected component in $\Gamma-\tau$, and by $n(\tau)$ the number of connected components of $\Gamma-\tau$. We will show that there exists a tile $\tau \in v$ such that either $n(\tau)=1$ or $l(\tau)=1$. This implies the lemma. Indeed, in the first case tile $\tau$ is the desired tile while in the second case we can simply remove a unique tile $\tau^{\prime}$ in either of the smallest connected components and obtain the desired simply connected region $\Gamma-\tau^{\prime}$.
Now, let $\tau$ be a tile attached to $\Gamma$. Let $\Gamma_{1}$ be any smallest connected component obtained after removing $\tau$. Observe that the boundary of $\Gamma_{1}$ is made up of pieces of the boundary of $\Gamma$ and $\tau$. As $\tau$ is simply connected, $\Gamma_{1}$ has a common boundary with $\Gamma$, otherwise the boundary of $\Gamma_{1}$ lies inside the boundary of $\tau$. Consider any tile $\tau^{\prime}$ in $\Gamma_{1}$ which is attached to $\Gamma$. Consider removing tile $\tau^{\prime}$ instead of $\tau$. In this case, the component of $\Gamma-\tau^{\prime}$ which contains $\tau$ also contains all components of $\Gamma-\tau$ other than $\Gamma_{1}$ simply because they are attached to $\tau$. We call it a big component of $\Gamma-\tau^{\prime}$. Observe that besides the big component all the other components must be of size smaller than $l(\tau)$. If there are no components other than the big component, then $n\left(\tau^{\prime}\right)=1$ and tile $\tau^{\prime}$ is the one desired in the lemma. If there exists such a component, we have $l\left(\tau^{\prime}\right) 1 | 1 | $\stackrel{A}{1}$ | -1 | $\mathrm{A}$
1 | 1 |
| :---: | :---: | :---: | :---: | :---: | :---: |
| 1 | $\mathrm{B}$
1 | 1 | $B$
-1 | 1 | $\mathrm{B}$
1 |
| $\underset{1}{\mathrm{~A}}$ | 1 | $\mathrm{A}$
1 | -1 | $\mathrm{A}$
1 | 1 |
| -1 | B
-1 | -1 | $\mathrm{B}$
1 | -1 | B
-1 |
| $\mathrm{A}$
1 | 1 | A
1 | -1 | $\mathrm{A}$
1 | 1 |
| 1 | $\mathrm{B}$
1 | 1 | $\mathrm{B}$
-1 | 1 | B |
| $\mathrm{A}$
1 | 1 | $\mathrm{A}$
1 | -1 | $\mathrm{A}$
1 | 1 |
FIGURE 3
going clockwise. Similarly, paths for tiles $\tau_{6}$ and $\tau_{7}$ enclose two cells $A B A B$ going counterclockwise. Paths for tiles $\tau_{1}$ and $\tau_{5}$ enclose no $A B A B$ cells. Finally, paths for tiles $\tau_{4}$ and $\tau_{8}$ enclose $2 A B A B$ cells, one in the clockwise direction and one the in counterclockwise direction. Thus for $n=1$ the statement is true.
Assume the statement is true for $n=k$. Let $\Gamma$ be covered by $n=k+1$ tiles. By Lemma 2.1, there exists a tile $\tau$ such that $\Gamma-\tau$ is a simply connected region. Call it $\Gamma_{1}$. Then by a suitable conjugation $\omega(\Gamma)=\omega\left(\Gamma_{1}\right) \circ \omega(\tau)$ (here $\circ$ is a group operation in $F_{2}$ ). Now use the additivity property of winding numbers and the induction assumption for the region $\Gamma_{1}$. This proves the lemma.
Note that the first part of the Theorem 1.1 follows immediately from Lemma 2.3. Similarly, the second part is implied by the following result.
Lemma 2.4. Assign the values to each cell as shown on the Fig. 3. Namely, assign -1 to squares $(i, j)$ with exactly one coordinate divisible by 4. Assign 1 to the remaining squares. Then
$$
a_{1}(v)+a_{2}(v)+a_{7}(v)+a_{8}(v) \quad(\bmod 2)
$$
is equal to $\frac{1}{2}$ times the winding number of the region $\Gamma$.
Proof. The proof is similar to the proof of Lemma 2.3. It is easy to check that the winding numbers are: $2(\bmod 4)$ for $\tau_{1}, 2(\bmod 4)$ for $\tau_{2}$, $0(\bmod 4)$ for $\tau_{3}, 0(\bmod 4)$ for $\tau_{4}, 0(\bmod 4)$ for $\tau_{5}, 0(\bmod 4)$ for $\tau_{6}$, $2(\bmod 4)$ for $\tau_{7}, 2(\bmod 4)$ for $\tau_{8}$. The rest of the proof goes along the lines of the proof of Lemma 2.3. We omit the details.
## REFERENCES
[CL] J. H. Conway and J. C. Lagarias, Tilings with polyominoes and combinatorial group theory, J. Combin. Theory Ser. A 53 (1990), 183-208.
[G] S. Golomb, "Polyominoes," Scribner's, New York, 1965.
[K] R. Kenyon, A note on tiling with integer-sided rectangles, J. Combin. Theory Ser. A 74 (1996), 321-332.
[P] I. Pak, Ribbon tile invariants, preprint, 1997
[Pr] J. Propp, A pedestrian approach to a method of Conway, preprint, 1997.
[ST] N. Saladana and C. Tomei, An overview of domino and lozenge tilings, preprint, 1998.
[T] W. Thurston, Conway's tiling group, Amer. Math. Monthly 97 (1990), 757-773.
[W] D. Walkup, Covering a rectangle with T-tetrominoes, Amer. Math. Monthly 72 (1965), 986-988.
[^0]: ${ }^{1}$ Даже если слова в других словарных формах.
${ }^{2}$ Подобная история в 1990-е гг произошла с первой версией микропроцессора Pentium.
[^1]: ${ }^{3}$ Жюри не известны ни решение, ни даже ответ к этой задаче
[^2]: ${ }^{1}$ Even if the words are in other forms
${ }^{2}$ Similar story happened in 1990 s with the first version of Pentium microprocessor.
[^3]: ${ }^{3}$ Neither a solution nor even an answer to this problem are known to the Jury
[^4]: ${ }^{1}$ this means that any arc of any maximal chain is not on the right from the last arc of the chain $c$
[^5]: ${ }^{1}$ For example, the $8 \times 12$ rectangle has an unpromising $1182=2 \cdot 3 \cdot 197$ tilings by T-tetrominoes.
[^6]: ${ }^{1}$ A counterexample is a family of six blocks which form a three dimensional cross shape figure, and is hard to disassemble. In this case no block can be removed without the remaining union of five blocks having a hole inside. Versions of this puzzle can be often found in toy stores.
${ }^{2}$ Actually, we need a slightly stronger condition on the intersection of the two simply connected parts.
[^7]: ${ }^{3}$ The tiles $\varphi\left(\tau_{i}\right) \subset V$ may also not be uniquely defined. The extended coloring argument $f$ defined above must be constant on all such tiles though.
[^8]: ${ }^{4}$ They actually considered one additional disconnected tile which we ignore. This set of tiles appeared after translation of the trominoes in hexagonal lattice into the square lattice [CL].
[^9]: Received by the editors December 12, 1997.
2000 Mathematics Subject Classification. Primary 05E10, 52C20; Secondary 05B45, 20C30.
Key words and phrases. Polyomino tilings, tile invariants, Conway group, rim (ribbon) hooks, Young diagrams, Young tableaux, rim hook bijection, symmetric group.
[^10]: *Ron Adin points out that the minimum number of local moves is exactly $\binom{\left|\mathbf{T}_{n}\right|}{2}$. The calculation uses our analysis in section 3 . This gives $\binom{4}{2}=6$ moves for $n=3$, and $\binom{8}{2}=28$ for $n=4$.
[^11]: * Conjecture 10.1 was recently established by C. Moore and the author (July 2000).
[^12]: * Принстонский Университет, kmakaryc@cs.princeton.edu
${ }^{\dagger}$ Принстонский Университет, ymakaryc@cs.princeton.edu
[^13]: ${ }^{1}$ Since homomorphisms map conjugacy classes to conjugacy classes, one may ask why the image $\phi([\partial R])$ is not a single element in the abelian group $\mathbb{Z} \oplus \mathbb{Z}$. This is because $[\partial R]$ is actually an F-conjugacy class, so its image is actually a conjugacy class in the nonabelian group $\mathbf{F} /[\mathbf{C}: \mathbf{C}]$.
${ }^{2}$ The map $\pi_{s}$ is exactly the quotient map $\pi_{s}: C / T(\Sigma)-A_{0} / \pi(T(\Sigma))$ induced from the strongest generalized coloring map $\left.\pi: \mathbf{C} \rightarrow \mathbf{A}_{0}=\mathbf{C} / \mathbf{C}, \mathbf{C}\right]$, as is easily checked.
[^14]: Key words and phrases. Polyomino tilings, tile invariants, Conway group, height representation.
[^15]: ${ }^{1}$ In contrast with other ribbon tile invariants we introduce, the shade invariant can be extended to all regions, not just the simply connected ones [P1, Theorem 9.1].
[^16]: ${ }^{2}$ Versions of this result were also used in $[\mathrm{CL}, \mathrm{Pr}]$.
[^17]: ${ }^{3}$ As the referee validly points out, this is rather a reason for wishing that Conjecture 6.1 were true. While we agree, we leave the final judgement to the reader.
[^18]: ${ }^{4}$ Interestingly, Thurston's paper [T1] was inspired by [CL].
[^19]: ${ }^{1}$ We are grateful to Jim Propp for introduction to the subject and interest in our work.
${ }^{2}$ Supported by an NSF Postdoctoral Research Fellowship.