brain
tamnd's digital brain — notes, problems, research
43815 notes
We are given a string of lowercase English letters. We are allowed to perform an operation any number of times, where each operation picks a contiguous substring and compresses it into a single repeated letter determined by how many distinct characters were inside that substring.
We are given a string of lowercase English letters and many queries, each query focusing on a substring defined by indices $l$ and $r$. For each such range, we first look at which distinct characters appear inside it. Suppose the substring $s[l..
We are given a string made of lowercase English letters and a large number of queries, each query specifying a segment of this string. For each segment, we are allowed to choose two positions inside it and swap their characters exactly once.
The corrected target inequality is equivalent to proving a lower bound for a cyclic sum of fractions with denominators $a^3(b+c)$.
The condition is
Let $A,B,C,D$ be distinct collinear points in this order.
The previous argument fails because it treats binary “blocks” inside $k$ as if they evolve independently under both the inequality $k<n\le 2k$ and the structure of numbers with three ones.
Place the isosceles triangle $ABC$ with $AB=AC$ so that $A$ is symmetric above the midpoint of $BC$, and interpret $M$ as the midpoint of $BC$.
Small cases suggest that whenever two selected elements are both “far from the top”, their sum, if it stays within ${1,\dots,n}$, must also be selected, which tends to force new larger elements into t…
A configuration of lamps can be encoded as a vector $x(t) = (x_0(t), \ldots, x_{n-1}(t)) \in \mathbb{F}_2^n$, where $x_i(t)=1$ means $L_i$ is on at time $t$ and $0$ means off.
The functional equation $f(f(n)) = f(n) + n$ forces a strong coupling between values at $n$ and at $f(n)$.
The expression $m(PQR)$ is a geometric quantity defined as the minimum of the three altitudes of triangle $PQR$.
A move replaces two adjacent orthogonally neighboring pieces and one piece two steps away in the same row or column by removing the middle piece and relocating the jumping piece.
The two conditions suggest a strong metric and angle rigidity.
The polynomial $f(x)=x^n+5x^{n-1}+3$ has integer coefficients and leading coefficient $1$.
The quantity $S(n)$ measures how far one can guarantee representations of $n^2$ as sums of positive squares once representations exist up to some length.
Let $S \subset \mathbb{R}^3$ be finite, and write each point as $(x,y,z)$.
The circle $C$ is tangent to a fixed line $l$ at $M$, so the radius $OM$ is perpendicular to $l$, where $O$ denotes the center of $C$.
A direct search for the maximum number of colored edges reduces the problem to maximizing $e(R)+e(B)$ over two edge-disjoint triangle-free graphs $R$ and $B$ on $K_9$.
Substituting $y=0$ transforms the equation into $f(x^2+f(0)) = (f(x))^2$.
The original reduction to
The condition requires a uniform lower bound on pairwise differences after rescaling by a polynomial factor in the index gap.
Let $ABC$ be a triangle with an interior point $P$.
The earlier attempt failed because it tried to control gcd conditions via prime avoidance without a stable invariant.
The problem asks for the smallest integer $n$ such that every $n$-element subset of $S={1,2,\dots,280}$ contains five integers that are pairwise coprime.
Let $a_1<a_2<\cdots<a_k$ be all positive integers less than $n$ that are coprime to $n$.
The earlier failure comes from an incorrect algebraic detour: introducing a complicated symmetric rational function that is not actually the natural simplification of the geometric ratio.
The earlier approach fails because cyclicity was incorrectly used as a substitute for equal angles.
The game is defined on positive integers with two alternating moves.
The functional equation is
Checking small values gives $n=2,3,4,5$ producing $\frac{5}{4},1,\frac{17}{16},\frac{33}{25}$, so only $n=3$ works in this range.
The structure is circular and symmetric, so the key parameter is the number of points on each arc between chosen black points.
A space explorer visits a fixed sequence of celestial objects. Each object offers some scientific value if studied, but also consumes two limited resources: energy and time.
The configuration contains two independent cyclic structures sharing the point $E$.
Write $A_i={i,i+n}$ for $1\le i\le n$.
Direct substitutions collapse the problem to a single relation:
The input describes a tree with vertices numbered from 1 to n. Every vertex except the first has exactly one parent given, which implicitly defines an undirected edge between each node i and its parent pi.
The condition imposes a strong local symmetry constraint: every point $P$ in a finite planar set $S$ has at least $k$ other points at the same distance from it.
We are given a sequence of distinct integers, and we want to extract a subsequence that is strictly increasing. On top of the usual increasing constraint, there is an additional rule that restricts how consecutive elements in the subsequence can differ: if two consecutive…
We are given several small evolutionary scenarios, each describing a rooted tree of species and a partial mapping between some leaves and known genome strings. Every genome string has the same length and consists of four possible nucleotides.
We are given a starting lottery ticket of length $n$. Every position initially contains the number 1. For each position $i$, there is a required target value $bi$. If we manage to make the $i$-th position equal to $bi$, we earn $ci$ coins.
We start with a row of n dice, each die showing a single lowercase letter. So at any moment the whole configuration is just a string of length n. The goal is to transform an initial string into a fixed target string using exactly m moves.
We are given an $m times n$ grid, where each cell contains a non-negative number representing how many trees grow there. A giraffe starts at the top-left cell $(1,1)$ and wants to reach the bottom-right cell $(m,n)$. The movement rules are constrained and unusual.
We are given a tree with n vertices, and every vertex carries a numeric value. If we take any connected component of this tree, its cost is defined in a slightly unusual way: we multiply the number of vertices in that component by the sum of values stored on those vertices.
We are asked to fill an $N times m$ grid with two types of pieces. One is a $1 times 1$ coin tile, and the other is a $1 times 2$ dollar bill that can be placed either horizontally or vertically.
The configuration is governed by three recurring geometric objects: the points $A_1,B_1,C_1$ on the circumcircle determined by internal angle bisectors, the external angle bisectors meeting at the thr…
The previous construction failed because it broke the fixed requirement that exactly 17 column permutations must be defined on the same index set ${0,\dots,16}$.
We are given a tree with $n$ nodes. The task is to consider every unordered pair of distinct nodes $(u, v)$ that is not already connected by an edge in the input tree, and decide whether adding a direct edge between them preserves a very strong structural property: after…
Testing small cases gives $k=1$ for $(a,b)=(1,1)$.
Coordinates are placed with the right angle at $A$, taking $A=(0,0)$, $B=(b,0)$, $C=(0,c)$ with $b,c>0$.
Two players play on a pair of positive integers, and each move consists of choosing one number and reducing the other by any positive multiple of it, as long as the result stays non-negative.
We are asked to count how many binary matrices of size $n times n$ satisfy two global constraints that are imposed in a very asymmetric way across rows and columns. Each row has a condition on the AND of all its entries.
We are given an array and every adjacent pair can be connected either by addition or XOR. Each choice produces one expression, so there are $2^{n-1}$ expressions. However, the value of an expression is not computed in the usual left-to-right manner.
We are given a desired value of a function computed from a permutation of numbers from 0 to n-1. For any permutation, we look at every prefix and compute the MEX of that prefix, then sum all those MEX values.
The expression
We are given an $n times m$ grid where each cell behaves like a chessboard square colored by parity: a cell is white when the sum of its coordinates is even and black otherwise.
We are given a circular arrangement of $n$ sectors, and initially each sector contains exactly one cone. The goal is to move all cones so that they end up stacked in a single chosen sector.
Testing the recursion directly shows that fixed points are sparse but structured.
The structure describes $n+1$ finite sets, each of size $n$, with the property that any two sets intersect in exactly one element, and every element lies in at least two sets.
We are scheduling activities over a fixed number of weeks, and each team contributes exactly one representative per week. So every week is represented by a binary string of length n, where the i-th character tells whether member 1 or member 2 of team i is present.
Something went wrong.
Let $f(k)=k^2+k+n$ and assume there exists a smallest integer $k_0\in[0,n-2]$ such that $f(k_0)$ is composite.
We are given up to six dice, each die showing one symbol on its top face after a roll, but internally each die has six possible symbols it can show, all equally likely.
A group of people needs to cross a bridge at night, but only a limited number of them can be on the bridge at once. Each person has a fixed crossing time, and when multiple people cross together, the group moves at the speed of the slowest member.
We are given a timeline starting at minute zero and a set of disjoint activity intervals, sorted in increasing order and not overlapping. During each activity interval, we must remain fully awake. Outside these intervals, we are free to choose when to sleep.
The problem describes a planet whose surface is observed in a very structured way. Instead of looking at the whole sphere at once, the measurement process slices the planet in two directions. First, the planet is split vertically into n horizontal bands from pole to pole.
We are given a set of lights, each initially colored red, green, or blue, and a set of buttons. Each button is connected to a subset of lights.
We are given two configurations of a rectangular board filled with obstacles and colored tiles. Empty cells exist, and tiles occupy some of them. Tiles are indistinguishable except for their color, and multiple tiles of the same color cannot be told apart individually.
We are given two identical geometric objects: right square pyramids standing on the same horizontal ground plane. Each pyramid is described by one directed edge of its square base and a height.
We are asked to enumerate a very large collection of integer sequences, where each sequence is generated by a positive linear recurrence.
We are given two dice, each described by a multiset of face values. When two dice are rolled against each other, we pick one face uniformly from each die and compare the numbers. The higher number wins the round, and ties are split evenly.
We are trying to recover three hidden integers, each representing the number of legs of a mythical creature. We cannot observe them directly.
A configuration with rational areas for every triangle suggests that all coordinates should lie in a lattice with a controlled determinant structure, since triangle area is given by a determinant expr…
Assume there exists a function $f : \mathbb{Z}_{\ge 0} \to \mathbb{Z}_{\ge 0}$ satisfying
Consider the family of all integer vectors $a=(a_1,\dots,a_n)$ with each $a_i$ in ${0,1,\dots,k-1}$.
A direct decomposition of the quadrilateral into triangles along a guessed diagonal is unreliable because the cyclic order of the constructed points is not controlled a priori.
We are given $n$ people and a fixed initial seating arrangement where person $i$ starts at seat $i$. Each seat is unique and every person occupies exactly one seat. Each person also has a preferred seat $ai$, which lies somewhere in a larger pool of seats $1 ldots 2n$.
For each permutation of ${1,\ldots,n}$, a fixed point is an index $i$ with $f(i)=i$.
A first attempt to force balance by treating each vertical or horizontal line independently fails because every point influences two constraints simultaneously, one vertical and one horizontal.
Substituting $y=2$ into the functional equation yields
A quick sanity check is to look at what the statement is really forcing on $X$.
We are given up to ten thousand identical decorations placed inside a 100 by 100 square window. Each decoration is centered at an integer coordinate strictly inside the boundary, and each one is a rotated square whose diagonals align with the coordinate axes and have total…
We are given a game that depends on a chosen base $k$. For each test, there are $x$ coins on the table. Before the game starts, the first player selects an integer base $k ge 2$. After that, two players alternate moves.
We are standing at a junction that connects multiple independent corridors. Each corridor is an infinite line extending away from us, and threats appear over time on these corridors.
We are given an array of integers $a1, a2, ldots, an$. For each query, we are also given a value $u$ and a starting position $l$.
We are interacting with a hidden prime power value. In each test case, the judge fixes an unknown prime $p$ and an exponent $k$, forming $q = p^k$. We are allowed to query powers of this hidden number: for any exponent $a$ we choose, we receive a transformed value $g(q^a)$.
We are given a directed acyclic graph where every edge can carry at most one unit of flow. From the source node 1, we are interested in every other node i and want to know how many edge-disjoint paths exist from 1 to i.
We are working with the natural numbers in increasing order, but one digit has been completely erased from existence. Any number that contains this forbidden digit is removed from the sequence.
We are given several independent test cases. In each one, there is a list of integers representing scores of different code submissions. The player must submit code twice, and the final score is not a sum or maximum, but a bitwise AND of the two chosen submissions’ scores.
We are given a long string S and two short patterns s1 and s2. For every substring T of S, we look at how many times s1 appears in T as a subsequence and how many times s2 appears in T as a subsequence.
We are given a circle split into $K$ equally spaced positions, and a subset of $n$ of these positions contain markets. Each market sits at a fixed point on the circle, so we can think of the input as an increasing sequence of indices on a circular array.
Each input line describes a Unix-like permission configuration encoded in a compact numeric form. Instead of directly giving permissions for a file, the system uses a three-digit number, where each digit independently describes the access rights for one of three user classes…
We are asked to construct an $n times m$ grid filled with only three symbols: 1, +, and . The grid is not just a static object, it defines expressions in two directions. Every row, read left to right, becomes a valid arithmetic expression.
A direct attempt to repair the previous quadratic potential must first survive explicit consistency checks.
The construction applies successive $120^\circ$ clockwise rotations about the vertices $A_1,A_2,A_3$ in a periodic pattern.
Assume, for contradiction, that all six expressions
The task asks us to construct a grid-based maze where movement is restricted to only going right or down, starting from the top-left cell and ending at the bottom-right cell. Some cells are empty and usable, while others contain hedges that block passage.
Testing small initial values clarifies the mechanism.
The configuration involves two circumcircles sharing the point $B$: the circumcircle of $ABC$ and the circumcircle of $KBN$.
The original approach fails because it tries to force a 4-term zero sum inside a single parity class, where no additive structure is guaranteed.