  Minimum weight codewords play a crucial role in the error correction
performance of a linear block code. In this work, we establish an explicit
construction for these codewords of polar codes as a sum of the generator
matrix rows, which can then be used as a foundation for two applications. In
the first application, we obtain a lower bound for the number of minimum-weight
codewords (a.k.a. the error coefficient), which matches the exact number
established previously in the literature. In the second application, we derive
a novel method that modifies the information set (a.k.a. rate profile) of polar
codes and PAC codes in order to reduce the error coefficient, hence improving
their performance. More specifically, by analyzing the structure of
minimum-weight codewords of polar codes (as special sums of the rows in the
polar transform matrix), we can identify rows (corresponding to
\textit{information} bits) that contribute the most to the formation of such
codewords and then replace them with other rows (corresponding to
\textit{frozen} bits) that bring in few minimum-weight codewords. A similar
process can also be applied to PAC codes. Our approach deviates from the
traditional constructions of polar codes, which mostly focus on the reliability
of the sub-channels, by taking into account another important factor - the
weight distribution. Extensive numerical results show that the modified codes
outperform PAC codes and CRC-Polar codes at the practical block error rate of
$10^{-2}$-$10^{-3}$.
