D:\SixCocos2d-xVC2012\Cocos2d-x\XWH\cstest>csc FiniteGroup.cs Un.cs
Microsoft (R) Visual C# Compiler version 4.6.1055.0
for C# 5
Copyright (C) Microsoft Corporation. All rights reserved.
This compiler is provided as part of the Microsoft (R) .NET Framework, but only supports language versions up to C# 5, which is no longer th
e latest version. For compilers that support newer versions of the C# programming language, see http://go.microsoft.com/fwlink/?LinkID=53324
0
D:\SixCocos2d-xVC2012\Cocos2d-x\XWH\cstest>FiniteGroup D4.txt
0=>0
1=>1
2=>2
3=>3
4=>4
5=>6
6=>5
7=>7
1 2 3 4 5 6 7 8
2 1 4 3 6 5 8 7
3 4 1 2 7 8 5 6
4 3 2 1 8 7 6 5
5 7 6 8 1 3 2 4
6 8 5 7 2 4 1 3
7 5 8 6 3 1 4 2
8 6 7 5 4 2 3 1
中心:0 3
1 2
2 1
换位子群:0 3
1 2
2 1
D:\SixCocos2d-xVC2012\Cocos2d-x\XWH\cstest>csc /d:TESTUN Un.cs
Microsoft (R) Visual C# Compiler version 4.6.1055.0
for C# 5
Copyright (C) Microsoft Corporation. All rights reserved.
This compiler is provided as part of the Microsoft (R) .NET Framework, but only supports language versions up to C# 5, which is no longer th
e latest version. For compilers that support newer versions of the C# programming language, see http://go.microsoft.com/fwlink/?LinkID=53324
0
D:\SixCocos2d-xVC2012\Cocos2d-x\XWH\cstest>Un 8
0->ZmodnZobj(1,8)=>0->ZmodnZobj(1,8)
1->ZmodnZobj(3,8)=>1->ZmodnZobj(3,8)
2->ZmodnZobj(5,8)=>2->ZmodnZobj(5,8)
3->ZmodnZobj(7,8)=>3->ZmodnZobj(7,8)
1 2 3 4
2 1 4 3
3 4 1 2
4 3 2 1
D:\SixCocos2d-xVC2012\Cocos2d-x\XWH\cstest>Un 15
0->ZmodnZobj(1,15)=>0->ZmodnZobj(1,15)
1->ZmodnZobj(2,15)=>4->ZmodnZobj(8,15)
2->ZmodnZobj(4,15)=>2->ZmodnZobj(4,15)
3->ZmodnZobj(7,15)=>6->ZmodnZobj(13,15)
4->ZmodnZobj(8,15)=>1->ZmodnZobj(2,15)
5->ZmodnZobj(11,15)=>5->ZmodnZobj(11,15)
6->ZmodnZobj(13,15)=>3->ZmodnZobj(7,15)
7->ZmodnZobj(14,15)=>7->ZmodnZobj(14,15)
1 2 3 4 5 6 7 8
2 3 5 8 1 4 6 7
3 5 1 7 2 8 4 6
4 8 7 3 6 2 1 5
5 1 2 6 3 7 8 4
6 4 8 2 7 1 5 3
7 6 4 1 8 5 3 2
8 7 6 5 4 3 2 1
using System;
using System.Collections.Generic;
namespace gap
{
interface IGroup
{
void printSet();
void printTable();
int mul(int a,int b);
int size();
int inv(int a);
}
// (Z/nZ)^*
class Un:IGroup
{
// 静态函数
public static List<int> Order(IGroup g,int m){
List<int> ret=new List<int>();
int mi=m;
int m0=0;
ret.Add(m0);
while(mi!=m0){
ret.Add(mi);
mi=g.mul(mi,m);
}
return ret;
}
public static List<Tuple<int,int>> Order(Tuple<int,int> m){
List&