[r-t] Jump change notation

Chris02 chris02 at shropshirelad.plus.com
Wed May 27 18:12:01 UTC 2015


Don Morrison wrote:
> With that emendation, that interior places that are being made must
> always be specified explicitly just as with ordinary place notation, I
> *think* I see an algorithm for turning such extended place notation
> into a permutation. It is rather more complex than I'd like, but I
> think it works.
>
> Given how helpful Ander's recent comments have been, I'm afraid I'm
> going to bother you all again, and ask anyone interested to pass their
> eyes over this and tell me if it seems right to you. It's complicated
> enough it seems unlikely I haven't gotten something wrong. And if
> anyone sees an easier way to do this, please do speak up!

It did occur to me that swapping adjacent bells could be considered as a jump change of distance 1. (As opposed to the more normal ones which are distance 2.) So how about enhancing your Insert(x,y) routine so it could handle not only the bell doing the jump, but also the ones shuffling up/down. It could then be used to handle swapping adjacent bells. (eg. Insert(3,4) to swap 3rds and 4ths place bell.) It could also be called to put in 1st place if needed and last place if needed. This would keep all the setting of the permutation array and all the error checking in one fairly simple routine.


Using an Insert(x,y) routine of this type would then be as follows:
1. Scan through place notation calling Insert(x,y) to set places and jumps

2. Check if the first non-null element in permutation array is odd or even to determine if 1st place is needed. Call Insert(0,0) if 1sts needed.
3. Scan through permutation array as far as n-2 calling Insert(i, i+1) for each null element
4. If last element of permutation array is null call Insert(n-1,n-1) 

(I did mean to reply earlier, but a plumbing problem got in the way.)

Chris Adams



-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2015.0.5961 / Virus Database: 4354/9870 - Release Date: 05/26/15
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://bellringers.net/pipermail/ringing-theory/attachments/20150527/fc29d790/attachment-0004.html>


More information about the ringing-theory mailing list