function checkstricture0 n = 7; global A for t=1:1 aa = randn(n,1); bb = randn(n,1); H = []; TH = 0:.01:1; for i=1:length(TH) th = TH(i); %h = sum(abs(aa*th+bb)); % GOOD h = max(abs(aa*th+bb)); % BAD H(end+1)=h; end [x,y] = max(H); if ((y>1)&(y1)&(yh1+1e-10) %[b,margin,x] = is_increasing([h2 h3 h4 h5]); %if (margin < -1e-10) if ~b keyboard end end return function A = collapse(A,th) %th = rand; % mixing coeff [n,n] = size(A); % collapse states n-1 and n A(n-1,:) = A(n-1,:) + A(n,:); A(:,n-1) = th*A(:,n-1) + (1-th)*A(:,n); A = A(1:n-1,1:n-1); return function h = strict(A) [n,n] = size(A); d = 0; for i=1:n for j=i+1:n x = A(:,i); y = A(:,j); d = max(d,.5*sum(abs(x-y))); % this stricture has the VERY NICE property % of not increasing after state collapse %d = max(d,max(abs(x-y))); % this is the OLD, BAD stricture def. % that's the problem that Sinai was so quick to point out % in my terminology, this stricture might increase after collapse end end h=d; return function b=compallpairs(A,B) global n [n,n] = size(A); b = 1; for i=1:n for j=i+1:n for k=1:n a1 = A(k,i); a2 = A(k,j); da = abs(a1-a2); b1 = B(ci(k),ci(i)); b2 = B(ci(k),ci(j)); db = abs(b1-b2); b = b & (db <= da); end end end return function i = ci(i) global n if i==n i=n-1; end return