Find the number of sequences of $0, 1$ with length $n$ satisfying both of the following properties: There exists a simple polygon such that its $i$-th angle is less than $180$ degrees if and only if the $i$-th element of the sequence is $1$. There exists a convex polygon such that its $i$-th angle is less than $90$ degrees if and only if the $i$-th element of the sequence is $1$.
Problem
Source: Lotfi Zadeh Olympiad 2021, Problem 4
Tags: Polygons, angles, Lotfi Zadeh MO
29.12.2021 02:51
Let $a$ be the number of 1's and $(n-a)$ be the number of 0's in the sequence.The second condition is equivalent to,\begin{align*} \pi(n-2)&=\text{sum of all the angles of the polygon}\\ &< a\frac{\pi}{2}+(n-a)\pi\\ &\implies a<4 \end{align*}Again the first condition is equivalent to,\begin{align*} \pi(n-2)&=\text{sum of all the angles of the polygon}\\ &>(n-a)\pi\\ &\implies a>2 \end{align*}Therefore,only possible value of $a$ is 3. For any of $\binom{n}{3}$ $\{0,1\}$-sequences,with 3 one's it is easy to construct a polygon with corresponding 3 angles less than $\pi$ and rest of the angles are greater than $\pi$.Again it is possible to draw a convex polygon with corresponding 3 angles less than $\frac{pi}{2}$. [asy][asy] /* Geogebra to Asymptote conversion, documentation at artofproblemsolving.com/Wiki go to User:Azjps/geogebra */ import graph; size(2.6cm); real labelscalefactor = 0.5; /* changes label-to-point distance */ pen dps = linewidth(0.7) + fontsize(10); defaultpen(dps); /* default pen style */ pen dotstyle = black; /* point style */ real xmin = 5.2, xmax = 7.8, ymin = -0.2, ymax = 2.2; /* image dimensions */ /* draw figures */ draw(circle((9.,0.), 2.5), linewidth(0.8)); draw(circle((6.5,4.330127018922194), 2.5), linewidth(0.8)); draw(circle((4.,0.), 2.5), linewidth(0.8)); /* dots and labels */ dot((4.,0.),dotstyle); label("$D$", (4.071735537190084,0.1672727272727292), NE * labelscalefactor); dot((9.,0.),dotstyle); label("$E$", (9.063471074380168,0.1672727272727292), NE * labelscalefactor); dot((6.5,4.330127018922194),dotstyle); label("$F$", (6.567603305785125,4.497851239669423), NE * labelscalefactor); dot((6.5,0.),linewidth(1.pt) + dotstyle); label("$A$", (6.137851239669423,0.018512396694216827), NE * labelscalefactor); dot((7.75,2.165063509461097),linewidth(1.pt) + dotstyle); label("$B$", (7.410578512396696,1.6714049586776876), NE * labelscalefactor); dot((5.25,2.165063509461097),linewidth(1.pt) + dotstyle); label("$C$", (5.245289256198348,1.6879338842975222), NE * labelscalefactor); label("$d$", (5.245289256198348,6.134214876033059), NE * labelscalefactor); dot((16.947768595041325,-2.2294214876033034),dotstyle); label("$H$", (17.013884297520665,-2.0641322314049564), NE * labelscalefactor); clip((xmin,ymin)--(xmin,ymax)--(xmax,ymax)--(xmax,ymin)--cycle); /* end of picture */ [/asy][/asy] [asy][asy] /* Geogebra to Asymptote conversion, documentation at artofproblemsolving.com/Wiki go to User:Azjps/geogebra */ import graph; size(3.cm); real labelscalefactor = 0.5; /* changes label-to-point distance */ pen dps = linewidth(0.7) + fontsize(10); defaultpen(dps); /* default pen style */ pen dotstyle = black; /* point style */ real xmin = 5., xmax = 8., ymin = -0.2, ymax = 2.8; /* image dimensions */ /* draw figures */ draw(shift((6.5,0.))*xscale(2.5)*yscale(2.5)*arc((0,0),1,60.,120.00000000000011), linewidth(0.8)); draw(shift((7.75,2.1650635094610955))*xscale(2.5)*yscale(2.5)*arc((0,0),1,180.,240.), linewidth(0.8)); draw(shift((5.25,2.1650635094610995))*xscale(2.5)*yscale(2.5)*arc((0,0),1,-60.,0.), linewidth(0.8)); /* dots and labels */ dot((4.,0.),dotstyle); label("$D$", (4.102802336471667,0.22618245302530626), NE * labelscalefactor); dot((9.,0.),dotstyle); label("$E$", (9.092924893558983,0.22618245302530626), NE * labelscalefactor); dot((6.5,4.330127018922194),dotstyle); label("$F$", (6.586365636773189,4.549422272068695), NE * labelscalefactor); dot((6.5,0.),linewidth(2.pt) + dotstyle); label("$A$", (6.402397984899002,0.18019054005675955), NE * labelscalefactor); dot((7.75,2.165063509461097),linewidth(2.pt) + dotstyle); label("$B$", (7.253248374817115,1.6749277115345271), NE * labelscalefactor); dot((5.25,2.165063509461097),linewidth(2.pt) + dotstyle); label("$C$", (5.482559725528068,1.6979236680188006), NE * labelscalefactor); clip((xmin,ymin)--(xmin,ymax)--(xmax,ymax)--(xmax,ymin)--cycle); /* end of picture */ [/asy][/asy] Indeed,take $r$ points in arc $AC$ ,$s$ points in arc $AB$ and $t$ points in arc $AC$ in the above pictures,with $r+s+t=n-3;r,s,t\in \mathbb Z_{\ge 0}$