問題一覧 > 教育的問題

No.2755 Conjugacy Classes of Matrices

レベル : / 実行時間制限 : 1ケース 3.500秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 16
作問者 : 👑 p-adic / テスター : Shirotsume
お気に入りにしたユーザー ProblemId : 9388 / 自分の提出
問題文最終更新日: 2023-10-11 13:13:54
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence. Back to the original
yukicoder contest 429 (順位表) の他の問題:

Note

The execution time limit for this problem is 3500[ms].

Problem Statement

You are given as input a positive integer $B$ and a positive integer $C$ that is a divisor of $B$.

 

Define an undirected graph $G_{B,C} = (V_{B,C},E_{B,C})$ with infinitely many vertices and infinitely many edges, having no self-loops or multiple edges, as follows:

  • The vertex set $V_{B,C}$ of $G_{B,C}$ is the set of all square matrices of order $2$ with integer coefficients $\displaystyle \left( \begin{array}{cc} a & b \\ c & d \end{array} \right) $ that satisfy all of the following $4$ conditions.
    • $a$ is coprime to $B$ (that is, no prime number divides both).
    • $b \equiv 0 \pmod{C}$.
    • $c \equiv 0 \pmod{B}$.
    • $d \equiv 1 \pmod{B}$.
  • The edge set $E_{B,C}$ of $G_{B,C}$ is the set of all edges $\{P,Q\}$ connecting $2$ distinct points $P,Q$ of $V_{B,C}$ that satisfy the following condition.
    • There exists a point $R$ of $V_{B,C}$ that satisfies at least one of the following $2$ conditions.
      • Every entry of $PR - RQ$ is a multiple of $B$.
      • Every entry of $QR - RP$ is a multiple of $B$.

Then, as non-trivial facts,

  • $G_{B,C}$ has only finitely many connected components, and
  • each connected component of $G_{B,C}$ is a complete graph,

can both be proved. Determine whether the number of connected components of $G_{B,C}$ is greater than $100$, and if it is at most $100$, also find its value.

Background

This section explains the background for those familiar with group theory. First, let $\overline{G}_{B,C}$ be the set of all invertible square matrices of order $2$ with coefficients in $\mathbb{Z}/B \mathbb{Z}$ whose $(1,2)$ entry is a multiple of $C + B \mathbb{Z}$ and whose row $2$ is $(0 + B \mathbb{Z},1 + B \mathbb{Z})$. Then $\overline{G}_{B,C}$ forms a group under matrix multiplication.

Furthermore, for any vertex $P$ of $G_{B,C}$, taking the remainder of each entry of $P$ modulo $B$ gives an element $\overline{P}$ of $\overline{G}_{B,C}$. This correspondence defines a map $G_{B,C} \to \overline{G}_{B,C}$. In fact, a subset $S$ of $G_{B,C}$ is connected if and only if any $2$ elements of the image of $S$ under this map are conjugate in the group $\overline{G}_{B,C}$.

In other words, this problem is equivalent to determining whether the total number of conjugacy classes of the group $\overline{G}_{B,C}$ is greater than $100$, and finding the total number of conjugacy classes if it is at most $100$. It is known that the total number of conjugacy classes of a finite group corresponds to the count of isomorphism classes of complex irreducible representations, which makes it a very important value in representation theory.

Input

The input is given from standard input on $1$ line in the following format:

$B$ $C$
  • Line $1$ contains $B,C$ separated by a half-width space.

Constraints

The input satisfies the following constraints:

  • $B$ is an integer satisfying $1 \leq B \leq 6 \times 10^2$.
  • $C$ is a divisor of $B$ satisfying $1 \leq C \leq B$.

Output

If the number of connected components of $G_{B,C}$ is greater than $100$, print 100+; if it is at most $100$, print that value on $1$ line.

Print a newline at the end.

Sample

Sample 1
Input
1 1
Output
1

Here $(B,C) = (1,1)$. For example, the identity matrix $E$ of order $2$ with integer coefficients is a vertex of $G_{1,1}$, so $G_{1,1}$ has at least $1$ connected component.

On the other hand, for any vertex $P$ of $G_{1,1}$, if we set $Q = E$ and $R = E$, then every coefficient of $PR - RQ = P - E$ is a multiple of $B = 1$, so $P$ and $E$ belong to the same connected component.

Therefore, the number of connected components of $G_{1,1}$ is $1$.

Sample 2
Input
3 3
Output
2

Here $(B,C) = (3,3)$. For example, define the square matrices of order $2$ with integer coefficients $P$ and $Q$ by

$\displaystyle P = \left( \begin{array}{cc} 2 & 9 \\ -6 & 4 \end{array} \right), \ Q = \left( \begin{array}{cc} 1 & -12 \\ 3 & -2 \end{array} \right) $

Then these are vertices of $G_{3,3}$ and belong to mutually different connected components. There are no connected components other than the ones these belong to. Therefore, the number of connected components of $G_{3,3}$ is $2$.

Sample 3
Input
24 2
Output
30

Here $(B,C) = (24,2)$. The number of connected components of $G_{24,2}$ is $30$.

Sample 4
Input
80 2
Output
100+

Here $(B,C) = (80,2)$. The number of connected components of $G_{80,2}$ is $110$. Since this is greater than $100$, print 100+.

提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。