PermutationList[perm]
返回置换 perm 的置换列表表示.
PermutationList[perm,len]
返回长度为 len 的置换列表.
PermutationList
PermutationList[perm]
返回置换 perm 的置换列表表示.
PermutationList[perm,len]
返回长度为 len 的置换列表.
更多信息
- 输入置换 perm 可以由置换列表或不相交轮换的形式给出.
- 对于轮换形式的输入 Cycles[{cyc1,cyc2,…}],轮换 cyci 必须是代表置换 perm 作用区域上点的正整数的列表. 轮换不能有公共点.
- PermutationList 返回一个置换列表,它是连续整数 {1,2,…,len} 的一个重新排列. 默认时,长度 len 是输入perm 中的最大整数.
- 对于一个输入的轮换 {p1,p2,…,pm}, 产生的置换列表的点 pi+1 处于位置 pi, 而点 p1 处于位置pm.
- PermutationList 也可用于 SparseArray 对象.
范例
打开所有单元 关闭所有单元基本范例 (2)
范围 (3)
PermutationList[Cycles[{{1, 5}, {2, 9, 3}}]]PermutationList[Cycles[{}]]PermutationList[Cycles[{}], 10]PermutationList[{3, 5, 2, 4, 1}]PermutationList[{3, 5, 2, 4, 1}, 8]PermutationList 对于大的输入效率很高:
PermutationCycles[list = RandomSample[Range[10000000]]];PermutationList[%] === list// Timing属性和关系 (4)
PermutationList 的一个简单的 Wolfram 语言实现,不过要求有单元集出现:
fromcycles[cycs_List] := Map[Last, Sort[Transpose[Map[Flatten, {Map[RotateRight, cycs], cycs}]]]]fromcycles[{{3, 2}, {4}, {1, 5, 6}}]% == PermutationList[Cycles[{{3, 2}, {1, 5, 6}}]]PermutationList 和 PermutationCycles 互为逆运算函数(反函数):
PermutationList[PermutationCycles[{6, 3, 5, 4, 2, 7, 8, 1}]]PermutationList 返回有序整数范围的图像列表:
PermutationList[Cycles[{{1, 2, 3}, {4, 5}}]]使用更一般的函数 PermutationReplace 可以得到相同的结果:
PermutationReplace[Range[5], Cycles[{{1, 2, 3}, {4, 5}}]]PermutationMatrix[Cycles[{{1, 5, 6}, {2, 4}}]]用 PermutationMatrix 的 "PermutationList" 属性获取对应的置换列表:
%["PermutationList"]这相当于直接对轮换应用 PermutationList:
PermutationList[Cycles[{{1, 5, 6}, {2, 4}}]]可能存在的问题 (2)
技术笔记
-
▪
- 置换列表
相关指南
-
▪
- 置换
文本
Wolfram Research (2010),PermutationList,Wolfram 语言函数,https://reference.wolfram.com/language/ref/PermutationList.html (更新于 2012 年).
CMS
Wolfram 语言. 2010. "PermutationList." Wolfram 语言与系统参考资料中心. Wolfram Research. 最新版本 2012. https://reference.wolfram.com/language/ref/PermutationList.html.
APA
Wolfram 语言. (2010). PermutationList. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/ref/PermutationList.html 年
BibTeX
@misc{reference.wolfram_2026_permutationlist, author="Wolfram Research", title="{PermutationList}", year="2012", howpublished="\url{https://reference.wolfram.com/language/ref/PermutationList.html}", note=[Accessed: 01-November-2026]}
BibLaTeX
@online{reference.wolfram_2026_permutationlist, organization={Wolfram Research}, title={PermutationList}, year={2012}, url={https://reference.wolfram.com/language/ref/PermutationList.html}, note=[Accessed: 01-November-2026]}