Exemplo n.º 1
0
 def test_schreier_graph_construction(self):
     s1 = Permutation.read_cycle_form([[2,3]], 4)
     s2 = Permutation.read_cycle_form([[1,2,4]], 4)
     gens = [s1,s2]
     identity = Permutation([1,2,3,4])
     s_g = _schreier_graph(2, gens, identity)
     self.assertEqual(s_g, [s2,identity,s1,s2])
Exemplo n.º 2
0
 def test_coset_reps(self):
     s1 = Permutation.read_cycle_form([[2,3]], 4)
     s2 = Permutation.read_cycle_form([[1,2,4]], 4)
     gens = [s1,s2]
     identity = Permutation([1,2,3,4])
     s_g = _schreier_graph(2, gens, identity)
     cosets = _coset_reps(s_g, identity)
     self.assertEqual(cosets, [Permutation.read_cycle_form([[1,4,2]], 4),identity,s1,s2])
Exemplo n.º 3
0
 def test_schreier_generators(self):
     s1 = Permutation.read_cycle_form([[2,3]], 4)
     s2 = Permutation.read_cycle_form([[1,2,4]], 4)
     gens = [s1,s2]
     identity = Permutation([1,2,3,4])
     s_g = _schreier_graph(2, gens, identity)
     cosets = _coset_reps(s_g, identity)
     s_gen = _schreier_generators(2, cosets, gens, identity)
     gen_1 = Permutation.read_cycle_form([[3,4]], 4)
     gen_2 = Permutation.read_cycle_form([[1,3,4]], 4)
     gen_3 = Permutation.read_cycle_form([[1,3]], 4)
     self.assertEqual(s_gen, [gen_1, gen_2, gen_3])