Path: news.mathworks.com!not-for-mail
From: "Bruno Luong" <b.luong@fogale.findmycountry>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Derangement: efficient full permutation
Date: Tue, 1 Feb 2011 13:09:04 +0000 (UTC)
Organization: FOGALE nanotech
Lines: 7
Message-ID: <ii90lg$qmd$1@fred.mathworks.com>
References: <ii8ut8$3fb$1@fred.mathworks.com>
Reply-To: "Bruno Luong" <b.luong@fogale.findmycountry>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1296565744 27341 172.30.248.35 (1 Feb 2011 13:09:04 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 1 Feb 2011 13:09:04 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 390839
Xref: news.mathworks.com comp.soft-sys.matlab:707416


> 
> BUT: All who had participated in the former discussion (Jos, Derek, me, ...) had suggested algorithm with bugs. Therefore I hope, that somebody can confirm, that this method creates all derangements without a bias - or point me to the errors, before I publish the mexed version in the FEX.

Your algorithm surely has BUG, e.g., n = 1 it generate a derangement 1, which is impossible.

Bruno