Question
list = { 2, 8, 3, 2, 9, 8, 6, 3, 4, 6, 1, 9 } where n = 12. List elements are numbered starting
list = { 2, 8, 3, 2, 9, 8, 6, 3, 4, 6, 1, 9 } where n = 12. List elements are numbered starting at 0. We define a run up to be a (k+1)-length subsequence listi, listi+1, listi+2, ..., listi+k, that is monotonically increasing (i.e., listi+j listi+j-1 for each j = 1, 2, 3, ..., k). Similarly, a run down is a (k+1)-length subsequence listi, listi+1, listi+2, ..., listi+k, that is monotonically decreasing (i.e., listi+j-1 listi+j for each j = 1, 2, 3, ..., k). For the above example list we have these runs up and runs down: Runs Up list0 through list1 = { 2, 8 }; k = 1 list2 = { 3 }; k = 0
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started