When Wolfram's technical support cannot help
- To: mathgroup at smc.vnet.net
- Subject: [mg105255] When Wolfram's technical support cannot help
- From: "Ant King" <mathstutoring at ntlworld.com>
- Date: Wed, 25 Nov 2009 06:14:07 -0500 (EST)
Hi I sent this email to technical support (as I hold a premier licence) I am looking for a single function that will extract the cyclic part of (a) a completely cyclic sequence and (b) an eventually cyclic sequence. So if data1={1,2,3,1,2,3,1,2,3,1,2,3} then cyclicpart[data1] should return {1,2,3} And if data2={5,9,11,8,1,2,3,1,2,3,1,2,3,1,2,3} then cyclicpart[data2] should also return {1,2,3} And this was the reply that I got Here is one way to extract out the cyclic part: lis = Flatten[Join[Table[{1, 2, 3}, {8}]]] p = Position[Table[BitXor[lis, RotateLeft[lis, i]], {i, 1, 10}], ConstantArray[0, Length[lis]]][[1]] /. {a_} -> a lis[[1 ;; p]] The above however will only work for case where the list always contains the repeated pattern. There is no built-in function as such that will extract out the pattern automatically. I have filed a suggestion with our developers and you will be notified when this suggestion gets implemented. Again, my apologies for the delay and my thanks for your patience. Now I don't believe that. I think that it should be quite achievable. Anyone got any ideas Thanks a lot Ant
- Follow-Ups:
- Re: When Wolfram's technical support cannot help
- From: Andrzej Kozlowski <akoz@mimuw.edu.pl>
- Re: When Wolfram's technical support cannot help
- From: Daniel Lichtblau <danl@wolfram.com>
- Re: When Wolfram's technical support cannot help
- From: DrMajorBob <btreat1@austin.rr.com>
- Re: When Wolfram's technical support cannot help