Алгоритмы сортировки

  • Published on
    14-Jul-2015

  • View
    422

  • Download
    1

Embed Size (px)

Transcript

<ul><li><p> . : , , , ,, .</p><p> -- , .</p></li><li> a</li><li> [a,b] [a - x1 - x2 - x3- - xn - b], f(x(i)*f(x(i+1))</li><li> . . f(x) [a,b] x*. , , b&gt;a.1: f(x) - f(a), f(b).2: x=(a+b)/2 f(x )3: f(a)* f(x ). f(a)* f(x )</li><li><p>abxf(a)f(b)f(x)abxf(a)f(x)f(b)abx</p></li><li><p> . .</p></li><li><p> : F(x) [a,b] . , , b&gt;a.1: x=(a+b)/2 , x1= x x2= x + . 2: F(x1) F(x2 ).3: F(x1) F(x2 ). F(x1) &lt; F(x2 ), b= x, a= x .4: . abs(b-a)&lt; abs(F(b)) &lt; abs (F(a))&lt; , 5, 2.5: xmin=(a+b)/2 F(xmin)</p></li><li><p>ax1 x x2 bax1 x x2 bax1 x x2 bF(x1)F(x2)F(x2)F(x1)</p></li><li><p> : . F(x) [a,b] . , , b&gt;a.</p></li><li><p>F(x1)F(x)F(x1)F(x) F(x2)f(x) F(x2)&gt;F(x) AX1XX2B</p></li><li><p>1: x=(a+b)/2 2: x1= x abs(b-a)/4 x2= x + abs(b-a)/4 . 3: F(x), F(x1) F(x2 ).4: F(x1) F(x ). F(x1) &lt; F(x ), b= x, x=x1 6, 5. 5: F(x2) F(x ). F(x2) &lt; F(x ), a= x, x=x2, a= x1, b= x2 6: . abs(b-a)&lt; (abs(F(b)) &lt; abs (F(a))&lt; , 7, 2.7: xmin=(a+b)/2 F(xmin)</p></li><li><p>F(X1)&lt; F(X), XX1, X2F(X), F(X1),F(X2)F(X2)&lt; F(X), abs(b-a)&lt; b= X, X=X1a= X, X=x2a= X1, b=X2Xmin, F( Xmin)</p></li><li><p>abx1xx2F(x1)F(x)F(x2)ababx1xx2F(x1)F(x)F(x2)x1x2</p></li><li><p> : . . AB</p><p> AC/AB=CB/AC, .. . =1, 0.62, 0.38. F(x) [a,b] . , .</p></li><li><p>1: k2=0.62, k1=0.38, [a,b] L=b-a.2: v=L*k1 w=L*k2 .3: b-a &lt; , 9, 44: F(v) F(w).5: F(w) F(v ). F(w) &lt; F(v ), a=v, v=w w:=a+(b-a)*k2; 7. 6: F(v )= F(w) F(w) 3.7: b=w, w=v v:=a+(b-a)*k1. 8: F(w )= F(v) F(v) 3.9: xmin=(a+b)/2 F(xmin)</p></li><li>F(w)F(v)F(v)&gt;F(w) aVWbF(w)F(v)F(v)</li><li><p> aVW aVWb aVWbbWV</p></li><li><p> . , (n+1)- .</p></li><li><p> 1: y1. F(x,y) x - F(x,y1) 2: F(x,y1) x1. 3: x1. F(x,y) y - F(x1,y) 4: F(x1,y) y2. 5: y2. F(x,y) x - F(x,y2) 6: F(x,y2) x2. 7: x2. F(x,y) x - F(x2,y) 8: F(x2,y) y3. : F(x,y) </p></li><li><p> f(x,y) y f(x,y) x </p></li><li><p> f(x,y) ( ) f(x,y) function </p></li><li><p> x y xy</p></li><li><p> 1: F(x,y). 2: 3: 4: 1-3 . : F(x,y) </p></li><li><p>-xyx1,y1x3,y3x2,y2</p></li></ul>