FindTransientRepeat

FindTransientRepeat[list,n]

returns a pair of lists {transient,repeat} where the elements of repeat occur successively at least n times after the elements of the transient part of list.

FindTransientRepeat[string,n]

returns a pair of strings {transient,repeat}.

Details and Options

  • In FindTransientRepeat[list,n], n must be a positive integer.
  • FindTransientRepeat[list,1] returns {{},repeat}, where repeat is the shortest repeated part found in list, or list itself if no repetition is found.
  • FindTransientRepeat[list,n,SameTest->test] applies test to each pair of elements in list to determine whether they should be considered the same.

Examples

open all close all

Basic Examples  (2)

Find the transient and repeated parts of a list:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=

Find the transient and repeated parts of a string:

In[1]:=
Click for copyable input
Out[1]=

Scope  (4)

Generalizations & Extensions  (1)

Options  (3)

Applications  (7)

Properties & Relations  (4)

Introduced in 2016
(10.4)