NOIP 2013 Day 2 Algorithmic Problem Solutions
Wireless Network Coverage Optimization
A city grid consists of 129 east-west streets and 129 north-south streets, forming intersections at integer coordinates (x, y) where 0 ≤ x, y ≤ 128. Some intersections host public venues, each with a known count of facilities. A single wireless transmitter must be placed such that its coverage area — an ax ...
Posted on Sun, 17 May 2026 20:09:04 +0000 by pod2oo5
Advanced Number Theory Algorithms and Applications
Number Theory
1.1 Chinese Remainder Theorem
Problem Statement
Given a system of congruences:
\[ \begin{cases} x \equiv a_1 \pmod{b_1} \\ x \equiv a_2 \pmod{b_2} \\ \vdots \\ x \equiv a_n \pmod{b_n} \end{cases} \]
Find the smallest positive integer solution for \(x\), where \(b_i\) (for \(i \in [1,n]\)) are pairwise coprime.
Theoretical Analy ...
Posted on Sun, 17 May 2026 04:39:00 +0000 by xymbo
Minimum Spanning Tree Construction with Modular Arithmetic
Minimum Spanning Tree with Modular Edge Weights
Prim's Algorithm Adaptation
The classic Prim's algorithm builds a minimum spanning tree by starting from an initial vertex and repeatedly adding the minimum-weight edge connecting the tree to vertices outside it. For this problem, we adapt Prim's algorithm to handle edge weights computed as (a[i] ...
Posted on Sat, 16 May 2026 04:00:26 +0000 by dbchip2000
Lucas Theorem and Its Extended Application
Lucas Theorem
Mathematical Statement
Given prime $p$, the following congruence holds:
$$\binom{n}{m} \equiv \binom{\lfloor n/p \rfloor}{\lfloor m/p \rfloor} \cdot \binom{n \bmod p}{m \bmod p} \pmod{p}$$
Proof Foundation
Lemma 1
For prime $p$:
$$\binom{p}{k} \equiv 0 \pmod{p} \text{ when } 0 < k < p$$
The numerator contains factor $p$, mak ...
Posted on Tue, 12 May 2026 18:23:17 +0000 by Moneypenny