#OK to post homework #Ariana Yousafzai, 10/25/2020, Assignment 14 1. #CountRuns(L,k): inputs a list L of numbers (or for that matter, any objects) and outputs the #number of "runs" of length k in L CountRuns:=proc(L,k) local fa,L1,T1,T2,t2: option remember: if not type(L,list) then ERROR(`Bad input`): fi: if k=0 then RETURN({{}}): fi: if ( k>nops(S) or k<0 or not type(k,integer) ) then RETURN({}): fi: fa:=L[1]: L1:=S minus {fa}: T1:=CountRuns(L1,k): T2:=CountRuns(L1,k-1): T1 union { seq(t2 union {fa}, t2 in T2) }: end: 6. Assume a list of length 2*n+1 with n+1 2s and n (-1)s Suppose L is equal to its cyclic shifts L=L1 k times Sum(L) = Sum(L1)*k, where Sum(L1) is an integer and k is an integer If a and b are integers and a*b = 1, then a = 1 and b =1.