{"title":"生成随机排列","authors":"C. Martínez, A. Panholzer, H. Prodinger","doi":"10.1137/1.9781611972986.7","DOIUrl":null,"url":null,"abstract":"In this short note, we propose a simple and efficient algorithm to generaterandom derangements, that is, permutations without fixed points. We discuss the algorithm correctness and its performance and compare it to other alternatives. We find that the algorithm has expected linear complexity, works in-place with little additional auxiliary memory and qualitatively behaves like the well-known Fisher-Yates shuffle for random permutations or Sattolo's algorithm for random cyclic permutations.","PeriodicalId":340112,"journal":{"name":"Workshop on Analytic Algorithmics and Combinatorics","volume":"47 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2008-01-19","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"22","resultStr":"{\"title\":\"Generating Random Derangements\",\"authors\":\"C. Martínez, A. Panholzer, H. Prodinger\",\"doi\":\"10.1137/1.9781611972986.7\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"In this short note, we propose a simple and efficient algorithm to generaterandom derangements, that is, permutations without fixed points. We discuss the algorithm correctness and its performance and compare it to other alternatives. We find that the algorithm has expected linear complexity, works in-place with little additional auxiliary memory and qualitatively behaves like the well-known Fisher-Yates shuffle for random permutations or Sattolo's algorithm for random cyclic permutations.\",\"PeriodicalId\":340112,\"journal\":{\"name\":\"Workshop on Analytic Algorithmics and Combinatorics\",\"volume\":\"47 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2008-01-19\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"22\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Workshop on Analytic Algorithmics and Combinatorics\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1137/1.9781611972986.7\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Workshop on Analytic Algorithmics and Combinatorics","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1137/1.9781611972986.7","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
In this short note, we propose a simple and efficient algorithm to generaterandom derangements, that is, permutations without fixed points. We discuss the algorithm correctness and its performance and compare it to other alternatives. We find that the algorithm has expected linear complexity, works in-place with little additional auxiliary memory and qualitatively behaves like the well-known Fisher-Yates shuffle for random permutations or Sattolo's algorithm for random cyclic permutations.