1
$\begingroup$

Given an integer monotone sequence that only changes by 1, is there a "simple" mathematical function that returns the lengths of the constant subsequences?

E.g., [1,1,1,2,2,3,3,3,3,3,...] -> [3,2,5,...]

By "simple" I sort of mean something that can be used analytically. Obviously it is not difficult to write a function in code that returns the lengths but I'm wondering if there is something that potentially can be used algebraically. Not sure how to express exactly what I mean but something that is more "standard" and open to directly mathematical analysis than some procedure in code.

$\endgroup$
2
  • 1
    $\begingroup$ I don't see how to get rid of min and argmin or cardinality but this is interesting (+1) although I would think that the answer is no. It is not bad news since tropical geometry (I believe) uses max and mins to replace some arithmetic operations $\endgroup$ Commented Jun 23, 2023 at 22:40
  • $\begingroup$ The answer depends on what is "straight forward" and "simple" for you. You can obviously write this function in the form of a recursive function and then analyze it by applying recursive function theory. For people that work in this field this may seem "straight forward" and "simple", and for others, it may seem difficult. So the best answer is: It depends. $\endgroup$
    – Xaver
    Commented Jun 24, 2023 at 17:32

0

You must log in to answer this question.

Browse other questions tagged .