<div id="pf1" class="pf w0 h0" data-page-no="1"><div class="pc pc1 w0 h0"><img class="bi x0 y0 w1 h1" alt="" src="https://files.passeidireto.com/0dc5b438-093d-4c28-a737-488353a5d7c6/bg1.png"><div class="c x1 y1 w2 h2"><div class="t m0 x2 h3 y2 ff1 fs0 fc0 sc0 ls0 ws0">PROJETO DE ALGORITMOS</div></div><div class="c x1 y3 w2 h4"><div class="t m0 x2 h3 y4 ff1 fs0 fc0 sc0 ls0 ws0">PROJETO DE ALGORITMOS</div></div><div class="t m0 x3 h5 y5 ff2 fs1 fc1 sc0 ls0 ws0">Prof. Anderson Ribeiro <span class="_0 blank"></span>da Costa</div><div class="t m0 x4 h5 y6 ff2 fs1 fc1 sc0 ls0 ws0">E-mail: </div></div><div class="pi" data-data='{"ctm":[0.000000,-1.000000,1.000000,0.000000,0.000000,595.000000]}'></div></div> <div id="pf2" class="pf w0 h0" data-page-no="2"><div class="pc pc2 w0 h0"><img class="bi x0 y0 w1 h6" alt="" src="https://files.passeidireto.com/0dc5b438-093d-4c28-a737-488353a5d7c6/bg2.png"><div class="c x5 y7 w3 h7"><div class="t m0 x2 h8 y8 ff2 fs0 fc1 sc0 ls0 ws0">ORDENAÇÃO EM MEMÓRIA EXT<span class="_1 blank"></span>ERNA</div></div><div class="c x5 y9 w3 h9"><div class="t m0 x2 h8 ya ff2 fs0 fc1 sc0 ls0 ws0">ORDENAÇÃO EM MEMÓRIA EXT<span class="_1 blank"></span>ERNA</div></div><div class="c x6 y1 w4 ha"><div class="t m0 x2 hb yb ff3 fs2 fc2 sc0 ls0">\ue001</div></div><div class="c x7 y1 w5 hc"><div class="t m0 x2 hd yb ff4 fs3 fc0 sc0 ls1 ws0">É para ordenar arquivos de tamanho maior </div></div><div class="c x6 yc w4 he"><div class="t m0 x2 hb yd ff3 fs2 fc2 sc0 ls0">\ue001</div></div><div class="c x7 ye w5 hf"><div class="t m0 x2 hd yf ff4 fs3 fc0 sc0 ls1 ws0">É para ordenar arquivos de tamanho maior </div></div><div class="t m0 x7 hd y10 ff4 fs3 fc0 sc0 ls0 ws0">que a memória <span class="_1 blank"></span>interna disp<span class="_1 blank"></span>onível.</div><div class="c x6 y11 w4 h10"><div class="t m0 x2 hb y12 ff3 fs2 fc2 sc0 ls0">\ue001</div></div><div class="c x7 y11 w6 h11"><div class="t m0 x2 hd y12 ff4 fs3 fc0 sc0 ls1 ws0">São bem diferentes da ordenação interna.</div></div><div class="c x6 y13 w4 h12"><div class="t m0 x2 hb y14 ff3 fs2 fc2 sc0 ls0">\ue001</div></div><div class="c x7 y15 w6 h13"><div class="t m0 x2 hd y16 ff4 fs3 fc0 sc0 ls1 ws0">São bem diferentes da ordenação interna.</div></div><div class="t m0 x6 hd y17 ff3 fs2 fc2 sc0 ls2">\ue001<span class="ff4 fs3 fc0 ls0 ws0">Para ganhar per<span class="_1 blank"></span>formance, d<span class="_1 blank"></span>eve diminuir <span class="_1 blank"></span>o </span></div><div class="c x7 y18 w7 h14"><div class="t m0 x2 hd y19 ff4 fs3 fc0 sc0 ls1 ws0">número de acesso as unidades de memória </div></div><div class="c x7 y1a w7 h15"><div class="t m0 x2 hd y1b ff4 fs3 fc0 sc0 ls1 ws0">número de acesso as unidades de memória </div></div><div class="t m0 x7 hd y1c ff4 fs3 fc0 sc0 ls0 ws1">externa.</div></div><div class="pi" data-data='{"ctm":[0.000000,-1.000000,1.000000,0.000000,0.000000,595.000000]}'></div></div> <div id="pf3" class="pf w0 h0" data-page-no="3"><div class="pc pc3 w0 h0"><img fetchpriority="low" loading="lazy" class="bi x0 y0 w1 h6" alt="" src="https://files.passeidireto.com/0dc5b438-093d-4c28-a737-488353a5d7c6/bg3.png"><div class="c x5 y7 w3 h7"><div class="t m0 x2 h8 y8 ff2 fs0 fc1 sc0 ls0 ws0">ORDENAÇÃO EM MEMÓRIA EXT<span class="_1 blank"></span>ERNA</div></div><div class="c x5 y9 w3 h9"><div class="t m0 x2 h8 ya ff2 fs0 fc1 sc0 ls0 ws0">ORDENAÇÃO EM MEMÓRIA EXT<span class="_1 blank"></span>ERNA</div></div><div class="c x6 y1 w4 ha"><div class="t m0 x2 hb yb ff3 fs2 fc2 sc0 ls0">\ue001</div></div><div class="c x7 y1 w8 hc"><div class="t m0 x2 hd yb ff4 fs3 fc0 sc0 ls0 ws0">Os dados são armazenado<span class="_1 blank"></span>s como um arq<span class="_1 blank"></span>uivo </div></div><div class="c x6 yc w4 he"><div class="t m0 x2 hb yd ff3 fs2 fc2 sc0 ls0">\ue001</div></div><div class="c x7 ye w8 hf"><div class="t m0 x2 hd yf ff4 fs3 fc0 sc0 ls0 ws0">Os dados são armazenado<span class="_1 blank"></span>s como um arq<span class="_1 blank"></span>uivo </div></div><div class="t m0 x7 hd y10 ff4 fs3 fc0 sc0 ls1 ws2">sequencial.</div><div class="c x6 y11 w4 h10"><div class="t m0 x2 hb y12 ff3 fs2 fc2 sc0 ls0">\ue001</div></div><div class="c x7 y11 w9 h11"><div class="t m0 x2 hd y12 ff4 fs3 fc0 sc0 ls0 ws0">Existe a restrição de acessar<span class="_1 blank"></span> apenas um </div></div><div class="c x6 y13 w4 h12"><div class="t m0 x2 hb y14 ff3 fs2 fc2 sc0 ls0">\ue001</div></div><div class="c x7 y15 w9 h13"><div class="t m0 x2 hd y16 ff4 fs3 fc0 sc0 ls0 ws0">Existe a restrição de acessar<span class="_1 blank"></span> apenas um </div></div><div class="t m0 x7 hd y1d ff4 fs3 fc0 sc0 ls0 ws0">registro em um dad<span class="_1 blank"></span>o momento.</div><div class="c x6 y18 w4 h16"><div class="t m0 x2 hb y19 ff3 fs2 fc2 sc0 ls0">\ue001</div></div><div class="c x7 y18 wa h14"><div class="t m0 x2 hd y19 ff4 fs3 fc0 sc0 ls0 ws0">Esta restrição é forte se comparada <span class="_1 blank"></span>com as </div></div><div class="c x6 y1e w4 h17"><div class="t m0 x2 hb y1f ff3 fs2 fc2 sc0 ls0">\ue001</div></div><div class="c x7 y1a wa h15"><div class="t m0 x2 hd y1b ff4 fs3 fc0 sc0 ls0 ws0">Esta restrição é forte se comparada <span class="_1 blank"></span>com as </div></div><div class="t m0 x7 hd y1c ff4 fs3 fc0 sc0 ls0 ws0">possibilidad<span class="_1 blank"></span>es de acesso<span class="_1 blank"></span> em um vetor<span class="_2 blank"></span>.</div><div class="c x6 y20 w4 h18"><div class="t m0 x2 hb y21 ff3 fs2 fc2 sc0 ls0">\ue001</div></div><div class="c x7 y20 wb h19"><div class="t m0 x2 hd y21 ff4 fs3 fc0 sc0 ls1 ws0">Técnicas de ordenação completamente </div></div><div class="c x6 y22 w4 h1a"><div class="t m0 x2 hb y23 ff3 fs2 fc2 sc0 ls0">\ue001</div></div><div class="c x7 y24 wb h1b"><div class="t m0 x2 hd y25 ff4 fs3 fc0 sc0 ls1 ws0">Técnicas de ordenação completamente </div></div><div class="t m0 x7 hd y26 ff4 fs3 fc0 sc0 ls0 ws0">diferentes devem <span class="_1 blank"></span>ser utilizadas.</div></div><div class="pi" data-data='{"ctm":[0.000000,-1.000000,1.000000,0.000000,0.000000,595.000000]}'></div></div> <div id="pf4" class="pf w0 h0" data-page-no="4"><div class="pc pc4 w0 h0"><img fetchpriority="low" loading="lazy" class="bi x0 y0 w1 h6" alt="" src="https://files.passeidireto.com/0dc5b438-093d-4c28-a737-488353a5d7c6/bg4.png"><div class="c x5 y7 w3 h7"><div class="t m0 x2 h8 y8 ff2 fs0 fc1 sc0 ls0 ws0">ORDENAÇÃO EM MEMÓRIA EXT<span class="_1 blank"></span>ERNA</div></div><div class="c x5 y9 w3 h9"><div class="t m0 x2 h8 ya ff2 fs0 fc1 sc0 ls0 ws0">ORDENAÇÃO EM MEMÓRIA EXT<span class="_1 blank"></span>ERNA</div></div><div class="c x6 y1 w4 ha"><div class="t m0 x2 hb yb ff3 fs2 fc2 sc0 ls0">\ue001</div></div><div class="c x7 y1 wc hc"><div class="t m0 x2 hd yb ff4 fs3 fc0 sc0 ls0 ws0">Fatores que determi<span class="_1 blank"></span>nam as difer<span class="_1 blank"></span>enças das </div></div><div class="c x6 yc w4 he"><div class="t m0 x2 hb yd ff3 fs2 fc2 sc0 ls0">\ue001</div></div><div class="c x7 ye wc hf"><div class="t m0 x2 hd yf ff4 fs3 fc0 sc0 ls0 ws0">Fatores que determi<span class="_1 blank"></span>nam as difer<span class="_1 blank"></span>enças das </div></div><div class="t m0 x7 hd y10 ff4 fs3 fc0 sc0 ls1 ws0">técnicas de ordenação externa:</div><div class="c x7 y11 wd h1c"><div class="t m0 x2 h1d y27 ff3 fs4 fc3 sc0 ls0">\ue001</div></div><div class="c x8 y11 we h1e"><div class="t m0 x2 h1f y27 ff4 fs1 fc1 sc0 ls0 ws0">1. Custo para acessar um item é algumas ordens </div></div><div class="c x7 y28 wd h20"><div class="t m0 x2 h1d y29 ff3 fs4 fc3 sc0 ls0">\ue001</div></div><div class="c x8 y2a we h21"><div class="t m0 x2 h1f y2b ff4 fs1 fc1 sc0 ls0 ws0">1. Custo para acessar um item é algumas ordens </div></div><div class="t m0 x8 h1f y2c ff4 fs1 fc1 sc0 ls3 ws0">de grandeza <span class="_0 blank"></span>maior<span class="_2 blank"></span>.</div><div class="t m0 x7 h1d y2d ff3 fs4 fc3 sc0 ls0">\ue001</div><div class="c x8 y18 wf h22"><div class="t m0 x2 h1f y2e ff4 fs1 fc1 sc0 ls0 ws0">2. O custo principal na ordenação externa é </div></div><div class="c x8 y2f wf h23"><div class="t m0 x2 h1f y30 ff4 fs1 fc1 sc0 ls0 ws0">2. O custo principal na ordenação externa é </div></div><div class="t m0 x8 h1f y31 ff4 fs1 fc1 sc0 ls0 ws0">relacionado a <span class="_0 blank"></span>transferência de dados entre <span class="_0 blank"></span>a </div><div class="t m0 x8 h1f y32 ff4 fs1 fc1 sc0 ls0 ws0">memória interna e externa.</div><div class="c x8 y20 w10 h24"><div class="t m0 x2 h1f y33 ff4 fs1 fc1 sc0 ls0 ws0">3. Existem restrições severas de acesso aos </div></div><div class="t m0 x7 h1d y34 ff3 fs4 fc3 sc0 ls0">\ue001</div><div class="c x8 y35 w10 h25"><div class="t m0 x2 h1f y36 ff4 fs1 fc1 sc0 ls0 ws0">3. Existem restrições severas de acesso aos </div></div><div class="t m0 x8 h1f y37 ff4 fs1 fc1 sc0 ls3 ws3">dados.</div></div><div class="pi" data-data='{"ctm":[0.000000,-1.000000,1.000000,0.000000,0.000000,595.000000]}'></div></div> <div id="pf5" class="pf w0 h0" data-page-no="5"><div class="pc pc5 w0 h0"><img fetchpriority="low" loading="lazy" class="bi x0 y0 w1 h6" alt="" src="https://files.passeidireto.com/0dc5b438-093d-4c28-a737-488353a5d7c6/bg5.png"><div class="c x5 y7 w3 h7"><div class="t m0 x2 h8 y8 ff2 fs0 fc1 sc0 ls0 ws0">ORDENAÇÃO EM MEMÓRIA EXT<span class="_1 blank"></span>ERNA</div></div><div class="c x5 y9 w3 h9"><div class="t m0 x2 h8 ya ff2 fs0 fc1 sc0 ls0 ws0">ORDENAÇÃO EM MEMÓRIA EXT<span class="_1 blank"></span>ERNA</div></div><div class="t m0 x7 h1f y38 ff3 fs4 fc3 sc0 ls4">\ue001<span class="ff4 fs1 fc1 ls0 ws0">4. O desenvolvimento de <span class="_0 blank"></span>métodos de ordenação </span></div><div class="t m0 x8 h1f y39 ff4 fs1 fc1 sc0 ls3 ws0">externa é muito depend<span class="_0 blank"></span>ente <span class="_0 blank"></span>do estado atual <span class="_0 blank"></span>da </div><div class="t m0 x8 h1f y3a ff4 fs1 fc1 sc0 ls0 ws4">tecnologia.</div><div class="c x8 y11 w11 h26"><div class="t m0 x2 h1f y3b ff4 fs1 fc1 sc0 ls0 ws0">5. <span class="_2 blank"></span>A<span class="_2 blank"></span> variedade de tipos de unidades <span class="_0 blank"></span>de memória </div></div><div class="t m0 x7 h1d y3c ff3 fs4 fc3 sc0 ls0">\ue001</div><div class="c x8 y3d w11 h27"><div class="t m0 x2 h1f y3e ff4 fs1 fc1 sc0 ls0 ws0">5. <span class="_2 blank"></span>A<span class="_2 blank"></span> variedade de tipos de unidades <span class="_0 blank"></span>de memória </div></div><div class="t m0 x8 h1f y3f ff4 fs1 fc1 sc0 ls0 ws0">externa torna os métodos dependentes de vários </div><div class="c x8 y18 w12 h28"><div class="t m0 x2 h1f y40 ff4 fs1 fc1 sc0 ls0 ws4">parâmetros.</div></div><div class="c x8 y41 w12 h29"><div class="t m0 x2 h1f y42 ff4 fs1 fc1 sc0 ls0 ws4">parâmetros.</div></div></div><div class="pi" data-data='{"ctm":[0.000000,-1.000000,1.000000,0.000000,0.000000,595.000000]}'></div></div> <div id="pf6" class="pf w0 h0" data-page-no="6"><div class="pc pc6 w0 h0"><img fetchpriority="low" loading="lazy" class="bi x0 y0 w1 h6" alt="" src="https://files.passeidireto.com/0dc5b438-093d-4c28-a737-488353a5d7c6/bg6.png"><div class="c x5 y7 w3 h7"><div class="t m0 x2 h8 y8 ff2 fs0 fc1 sc0 ls0 ws0">ORDENAÇÃO EM MEMÓRIA EXT<span class="_1 blank"></span>ERNA</div></div><div class="c x5 y9 w3 h9"><div class="t m0 x2 h8 ya ff2 fs0 fc1 sc0 ls0 ws0">ORDENAÇÃO EM MEMÓRIA EXT<span class="_1 blank"></span>ERNA</div></div><div class="c x6 y1 w4 ha"><div class="t m0 x2 hb yb ff3 fs2 fc2 sc0 ls0">\ue001</div></div><div class="c x7 y1 w13 hc"><div class="t m0 x2 hd yb ff4 fs3 fc0 sc0 ls0 ws0">O método mais utilizado é<span class="_1 blank"></span> a ordenação <span class="_1 blank"></span>por </div></div><div class="c x6 yc w4 he"><div class="t m0 x2 hb yd ff3 fs2 fc2 sc0 ls0">\ue001</div></div><div class="c x7 ye w13 hf"><div class="t m0 x2 hd yf ff4 fs3 fc0 sc0 ls0 ws0">O método mais utilizado é<span class="_1 blank"></span> a ordenação <span class="_1 blank"></span>por </div></div><div class="t m0 x7 hd y10 ff4 fs3 fc0 sc0 ls0 ws1">intercalação<span class="_1 blank"></span>.</div><div class="c x6 y11 w4 h10"><div class="t m0 x2 hb y12 ff3 fs2 fc2 sc0 ls0">\ue001</div></div><div class="c x7 y11 w14 h11"><div class="t m0 x2 hd y12 ff4 fs3 fc0 sc0 ls0 ws1">Deve</div></div><div class="c x9 y11 w15 h11"><div class="t m0 x2 hd y12 ff4 fs3 fc0 sc0 ls0">-</div></div><div class="c xa y11 w16 h11"><div class="t m0 x2 hd y12 ff4 fs3 fc0 sc0 ls0 ws0">se combinar d<span class="_1 blank"></span>ois ou mais bloco<span class="_1 blank"></span>s </div></div><div class="c x6 y13 w4 h12"><div class="t m0 x2 hb y14 ff3 fs2 fc2 sc0 ls0">\ue001</div></div><div class="c x7 y15 w14 h13"><div class="t m0 x2 hd y16 ff4 fs3 fc0 sc0 ls0 ws1">Deve</div></div><div class="c x9 y15 w15 h13"><div class="t m0 x2 hd y16 ff4 fs3 fc0 sc0 ls0">-</div></div><div class="c xa y15 w16 h13"><div class="t m0 x2 hd y16 ff4 fs3 fc0 sc0 ls0 ws0">se combinar d<span class="_1 blank"></span>ois ou mais bloco<span class="_1 blank"></span>s </div></div><div class="t m0 x7 hd y1d ff4 fs3 fc0 sc0 ls1 ws0">ordenados em um único bloco ordenado.</div><div class="c x6 y18 w4 h16"><div class="t m0 x2 hb y19 ff3 fs2 fc2 sc0 ls0">\ue001</div></div><div class="c x7 y18 w17 h14"><div class="t m0 x2 hd y19 ff4 fs3 fc0 sc0 ls0 ws0">A<span class="_2 blank"></span> <span class="_0 blank"></span>intercalaç<span class="_1 blank"></span>ão é utilizada<span class="_1 blank"></span> como uma operaç<span class="_1 blank"></span>ão </div></div><div class="c x6 y1e w4 h17"><div class="t m0 x2 hb y1f ff3 fs2 fc2 sc0 ls0">\ue001</div></div><div class="c x7 y1a w17 h15"><div class="t m0 x2 hd y1b ff4 fs3 fc0 sc0 ls0 ws0">A<span class="_2 blank"></span> <span class="_0 blank"></span>intercalaç<span class="_1 blank"></span>ão é utilizada<span class="_1 blank"></span> como uma operaç<span class="_1 blank"></span>ão </div></div><div class="t m0 x7 hd y1c ff4 fs3 fc0 sc0 ls1 ws0">auxiliar na ordenação.</div></div><div class="pi" data-data='{"ctm":[0.000000,-1.000000,1.000000,0.000000,0.000000,595.000000]}'></div></div> <div id="pf7" class="pf w0 h0" data-page-no="7"><div class="pc pc7 w0 h0"><img fetchpriority="low" loading="lazy" class="bi x0 y0 w1 h6" alt="" src="https://files.passeidireto.com/0dc5b438-093d-4c28-a737-488353a5d7c6/bg7.png"><div class="c x5 y7 w3 h7"><div class="t m0 x2 h8 y8 ff2 fs0 fc1 sc0 ls0 ws0">ORDENAÇÃO EM MEMÓRIA EXT<span class="_1 blank"></span>ERNA</div></div><div class="c x5 y9 w3 h9"><div class="t m0 x2 h8 ya ff2 fs0 fc1 sc0 ls0 ws0">ORDENAÇÃO EM MEMÓRIA EXT<span class="_1 blank"></span>ERNA</div></div><div class="c x6 y1 w4 ha"><div class="t m0 x2 hb yb ff3 fs2 fc2 sc0 ls0">\ue001</div></div><div class="c x7 y1 w18 hc"><div class="t m0 x2 hd yb ff4 fs3 fc0 sc0 ls0 ws1">Princípios:</div></div><div class="c x6 yc w4 he"><div class="t m0 x2 hb yd ff3 fs2 fc2 sc0 ls0">\ue001</div></div><div class="c x7 ye w18 hf"><div class="t m0 x2 hd yf ff4 fs3 fc0 sc0 ls0 ws1">Princípios:</div></div><div class="t m0 x7 h1f y43 ff3 fs4 fc3 sc0 ls4">\ue001<span class="ff4 fs1 fc1 ls0 ws0">1. Quebre o arquivo em blocos do tamanho <span class="_0 blank"></span>da </span></div><div class="t m0 x8 h1f y44 ff4 fs1 fc1 sc0 ls0 ws0">memória interna disponível.</div><div class="t m0 x7 h1f y45 ff3 fs4 fc3 sc0 ls4">\ue001<span class="ff4 fs1 fc1 ls0 ws0">2. Ordene cada bloco na <span class="_0 blank"></span>memória interna.</span></div><div class="c x7 y18 wd h2a"><div class="t m0 x2 h1d y46 ff3 fs4 fc3 sc0 ls0">\ue001</div></div><div class="c x8 y18 w19 h2b"><div class="t m0 x2 h1f y46 ff4 fs1 fc1 sc0 ls0 ws0">3. Intercale os blocos ordenados, <span class="_0 blank"></span>fazendo várias </div></div><div class="c x7 y47 wd h2c"><div class="t m0 x2 h1d y48 ff3 fs4 fc3 sc0 ls0">\ue001</div></div><div class="c x8 y49 w19 hf"><div class="t m0 x2 h1f y30 ff4 fs1 fc1 sc0 ls0 ws0">3. Intercale os blocos ordenados, <span class="_0 blank"></span>fazendo várias </div></div><div class="t m0 x7 h1f y4a ff3 fs4 fc3 sc0 ls4">\ue001<span class="ff4 fs1 fc1 ls0 ws0">passadas sobre <span class="_0 blank"></span>o arquivo.</span></div><div class="c x7 y20 wd h2d"><div class="t m0 x2 h1d y4b ff3 fs4 fc3 sc0 ls0">\ue001</div></div><div class="c x8 y20 w1a h2e"><div class="t m0 x2 h1f y4b ff4 fs1 fc1 sc0 ls0 ws0">4. <span class="_2 blank"></span>A<span class="_2 blank"></span> cada passada são criados blocos <span class="_0 blank"></span>ordenados </div></div><div class="c x7 y4c wd h2f"><div class="t m0 x2 h1d y4d ff3 fs4 fc3 sc0 ls0">\ue001</div></div><div class="c x8 y4e w1a h30"><div class="t m0 x2 h1f y4f ff4 fs1 fc1 sc0 ls0 ws0">4. <span class="_2 blank"></span>A<span class="_2 blank"></span> cada passada são criados blocos <span class="_0 blank"></span>ordenados </div></div><div class="t m0 x8 h1f y50 ff4 fs1 fc1 sc0 ls0 ws0">cada. <span class="_2 blank"></span>A<span class="_2 blank"></span> cada passada são criados <span class="_0 blank"></span>blocos </div><div class="t m0 x8 h1f y51 ff4 fs1 fc1 sc0 ls0 ws0">ordenados <span class="_0 blank"></span>cada vez maiores, até que todo o </div><div class="c x8 y52 w1b h31"><div class="t m0 x2 h1f y53 ff4 fs1 fc1 sc0 ls3 ws0">arquivo <span class="_0 blank"></span>esteja ordenado.</div></div><div class="c x8 y54 w1b h32"><div class="t m0 x2 h1f y55 ff4 fs1 fc1 sc0 ls3 ws0">arquivo <span class="_0 blank"></span>esteja ordenado.</div></div></div><div class="pi" data-data='{"ctm":[0.000000,-1.000000,1.000000,0.000000,0.000000,595.000000]}'></div></div> <div id="pf8" class="pf w0 h0" data-page-no="8"><div class="pc pc8 w0 h0"><img fetchpriority="low" loading="lazy" class="bi x0 y0 w1 h6" alt="" src="https://files.passeidireto.com/0dc5b438-093d-4c28-a737-488353a5d7c6/bg8.png"><div class="c x5 y7 w3 h7"><div class="t m0 x2 h8 y8 ff2 fs0 fc1 sc0 ls0 ws0">ORDENAÇÃO EM MEMÓRIA EXT<span class="_1 blank"></span>ERNA</div></div><div class="c x5 y9 w3 h9"><div class="t m0 x2 h8 ya ff2 fs0 fc1 sc0 ls0 ws0">ORDENAÇÃO EM MEMÓRIA EXT<span class="_1 blank"></span>ERNA</div></div><div class="c x6 y1 w4 ha"><div class="t m0 x2 hb yb ff3 fs2 fc2 sc0 ls0">\ue001</div></div><div class="c x7 y1 w1c hc"><div class="t m0 x2 hd yb ff4 fs3 fc0 sc0 ls0 ws0">Os algoritmos para or<span class="_1 blank"></span>denação <span class="_1 blank"></span>externa devem </div></div><div class="c x6 yc w4 he"><div class="t m0 x2 hb yd ff3 fs2 fc2 sc0 ls0">\ue001</div></div><div class="c x7 ye w1c hf"><div class="t m0 x2 hd yf ff4 fs3 fc0 sc0 ls0 ws0">Os algoritmos para or<span class="_1 blank"></span>denação <span class="_1 blank"></span>externa devem </div></div><div class="t m0 x7 hd y10 ff4 fs3 fc0 sc0 ls0 ws0">reduzir sobre <span class="_1 blank"></span>o arquivo.</div><div class="c x6 y11 w4 h10"><div class="t m0 x2 hb y12 ff3 fs2 fc2 sc0 ls0">\ue001</div></div><div class="c x7 y11 w1d h11"><div class="t m0 x2 hd y12 ff4 fs3 fc0 sc0 ls1 ws0">Uma boa medida de complexidade de um </div></div><div class="c x6 y13 w4 h12"><div class="t m0 x2 hb y14 ff3 fs2 fc2 sc0 ls0">\ue001</div></div><div class="c x7 y15 w1d h13"><div class="t m0 x2 hd y16 ff4 fs3 fc0 sc0 ls1 ws0">Uma boa medida de complexidade de um </div></div><div class="t m0 x7 hd y1d ff4 fs3 fc0 sc0 ls1 ws0">algoritmo de ordenação por intercalação é o </div><div class="c x7 y18 w1e h33"><div class="t m0 x2 hd y56 ff4 fs3 fc0 sc0 ls0 ws0">número de v<span class="_1 blank"></span>ezes que um item é lido <span class="_1 blank"></span>ou </div></div><div class="c x7 y57 w1e h34"><div class="t m0 x2 hd y58 ff4 fs3 fc0 sc0 ls0 ws0">número de v<span class="_1 blank"></span>ezes que um item é lido <span class="_1 blank"></span>ou </div></div><div class="t m0 x7 hd y59 ff4 fs3 fc0 sc0 ls0 ws0">escrito na memória <span class="_1 blank"></span>auxiliar<span class="_2 blank"></span>.</div></div><div class="pi" data-data='{"ctm":[0.000000,-1.000000,1.000000,0.000000,0.000000,595.000000]}'></div></div> <div id="pf9" class="pf w0 h0" data-page-no="9"><div class="pc pc9 w0 h0"><img fetchpriority="low" loading="lazy" class="bi x0 y0 w1 h6" alt="" src="https://files.passeidireto.com/0dc5b438-093d-4c28-a737-488353a5d7c6/bg9.png"><div class="t m0 x5 h8 y5a ff2 fs0 fc1 sc0 ls0 ws0">INTERCALAÇÃO BALANCEADA DE </div><div class="c x5 y7 w1f h7"><div class="t m0 x2 h8 y8 ff2 fs0 fc1 sc0 ls0 ws0">VÁRIOS CAMINHOS</div></div><div class="c x5 y9 w1f h9"><div class="t m0 x2 h8 ya ff2 fs0 fc1 sc0 ls0 ws0">VÁRIOS CAMINHOS</div></div><div class="c x6 y1 w4 ha"><div class="t m0 x2 hb yb ff3 fs2 fc2 sc0 ls0">\ue001</div></div><div class="c x7 y1 w20 hc"><div class="t m0 x2 hd yb ff4 fs3 fc0 sc0 ls0 ws0">Exemplo </div></div><div class="c xb y1 w15 hc"><div class="t m0 x2 hd yb ff4 fs3 fc0 sc0 ls0">-</div></div><div class="c xc y1 w21 hc"><div class="t m0 x2 hd yb ff4 fs3 fc0 sc0 ls0 ws0">Fita: </div></div><div class="c xd y1 w22 h35"><div class="t m0 x2 h36 yb ff4 fs5 fc0 sc0 ls5 ws5">NTERCALACAOBALANCEADA</div></div><div class="c x6 yc w4 he"><div class="t m0 x2 hb yd ff3 fs2 fc2 sc0 ls0">\ue001</div></div><div class="c x7 ye w20 hf"><div class="t m0 x2 hd yf ff4 fs3 fc0 sc0 ls0 ws0">Exemplo </div></div><div class="c xb ye w15 hf"><div class="t m0 x2 hd yf ff4 fs3 fc0 sc0 ls0">-</div></div><div class="c xc ye w21 hf"><div class="t m0 x2 hd yf ff4 fs3 fc0 sc0 ls0 ws0">Fita: </div></div><div class="c xd y5b w22 h37"><div class="t m0 x2 h36 y5c ff4 fs5 fc0 sc0 ls5 ws5">NTERCALACAOBALANCEADA</div></div><div class="t m0 x6 hd y5d ff3 fs2 fc2 sc0 ls2">\ue001<span class="ff4 fs3 fc0 ls0 ws0">Objetivo: <span class="fs5">Ordenar os 22 registros e colocá-los em </span></span></div><div class="c x7 y11 w23 h38"><div class="t m0 x2 h36 y5e ff4 fs5 fc0 sc0 ls0 ws0">uma fita de saída.</div></div><div class="c x7 y5f w23 h39"><div class="t m0 x2 h36 y60 ff4 fs5 fc0 sc0 ls0 ws0">uma fita de saída.</div></div><div class="t m0 x6 hd y61 ff3 fs2 fc2 sc0 ls2">\ue001<span class="ff4 fs3 fc0 ls0 ws0">Os registros são lidos um após<span class="_1 blank"></span> o outro.</span></div><div class="c x6 y18 w4 h3a"><div class="t m0 x2 hb y62 ff3 fs2 fc2 sc0 ls0">\ue001</div></div><div class="c x7 y18 w24 h3b"><div class="t m0 x2 hd y62 ff4 fs3 fc0 sc0 ls0 ws0">Memória inte<span class="_1 blank"></span>rna com capaci<span class="_1 blank"></span>dade para <span class="_1 blank"></span>três </div></div><div class="c x6 y63 w4 h3c"><div class="t m0 x2 hb y1f ff3 fs2 fc2 sc0 ls0">\ue001</div></div><div class="c x7 y64 w24 h3d"><div class="t m0 x2 hd y1b ff4 fs3 fc0 sc0 ls0 ws0">Memória inte<span class="_1 blank"></span>rna com capaci<span class="_1 blank"></span>dade para <span class="_1 blank"></span>três </div></div><div class="t m0 x7 hd y65 ff4 fs3 fc0 sc0 ls0 ws1">registros.</div><div class="c x6 y20 w4 h3e"><div class="t m0 x2 hb y66 ff3 fs2 fc2 sc0 ls0">\ue001</div></div><div class="c x7 y20 w25 h3f"><div class="t m0 x2 hd y66 ff4 fs3 fc0 sc0 ls0 ws0">Considerar <span class="_1 blank"></span>seis fitas disponíveis.</div></div><div class="c x6 y67 w4 h40"><div class="t m0 x2 hb y23 ff3 fs2 fc2 sc0 ls0">\ue001</div></div><div class="c x7 y68 w25 h41"><div class="t m0 x2 hd y25 ff4 fs3 fc0 sc0 ls0 ws0">Considerar <span class="_1 blank"></span>seis fitas disponíveis.</div></div></div><div class="pi" data-data='{"ctm":[0.000000,-1.000000,1.000000,0.000000,0.000000,595.000000]}'></div></div> <div id="pfa" class="pf w0 h0" data-page-no="a"><div class="pc pca w0 h0"><img fetchpriority="low" loading="lazy" class="bi x0 y0 w1 h6" alt="" src="https://files.passeidireto.com/0dc5b438-093d-4c28-a737-488353a5d7c6/bga.png"><div class="t m0 x5 h8 y5a ff2 fs0 fc1 sc0 ls0 ws0">INTERCALAÇÃO BALANCEADA DE </div><div class="c x5 y7 w1f h7"><div class="t m0 x2 h8 y8 ff2 fs0 fc1 sc0 ls0 ws0">VÁRIOS CAMINHOS</div></div><div class="c x5 y9 w1f h9"><div class="t m0 x2 h8 ya ff2 fs0 fc1 sc0 ls0 ws0">VÁRIOS CAMINHOS</div></div><div class="c x6 y1 w4 ha"><div class="t m0 x2 hb yb ff3 fs2 fc2 sc0 ls0">\ue001</div></div><div class="c x7 y1 w26 hc"><div class="t m0 x2 hd yb ff4 fs3 fc0 sc0 ls1 ws0">Fase de criação dos blocos ordenados:</div></div><div class="c x6 yc w4 he"><div class="t m0 x2 hb yd ff3 fs2 fc2 sc0 ls0">\ue001</div></div><div class="c x7 ye w26 hf"><div class="t m0 x2 hd yf ff4 fs3 fc0 sc0 ls1 ws0">Fase de criação dos blocos ordenados:</div></div><div class="t m0 x7 h1f y43 ff3 fs4 fc3 sc0 ls4">\ue001<span class="ff4 fs1 fc1 ls0 ws0">Fita 1: <span class="_3 blank"> </span>INT<span class="_4 blank"> </span>ACO<span class="_5 blank"> </span>ADE</span></div><div class="c x7 y11 wd h2d"><div class="t m0 x2 h1d y69 ff3 fs4 fc3 sc0 ls0">\ue001</div></div><div class="c x8 y11 w27 h2e"><div class="t m0 x2 h1f y69 ff4 fs1 fc1 sc0 ls0 ws0">Fita 2: </div></div><div class="c xe y11 w28 h2e"><div class="t m0 x2 h1f y69 ff4 fs1 fc1 sc0 ls0 ws4">CER</div></div><div class="c xf y11 w29 h2e"><div class="t m0 x2 h1f y69 ff4 fs1 fc1 sc0 ls0 ws4">ABL</div></div><div class="c x10 y11 w2a h2e"><div class="t m0 x2 h1f y69 ff4 fs1 fc1 sc0 ls0">A</div></div><div class="c x7 y6a wd h2f"><div class="t m0 x2 h1d y29 ff3 fs4 fc3 sc0 ls0">\ue001</div></div><div class="c x8 y6b w27 h30"><div class="t m0 x2 h1f y2b ff4 fs1 fc1 sc0 ls0 ws0">Fita 2: </div></div><div class="c xe y6b w28 h30"><div class="t m0 x2 h1f y2b ff4 fs1 fc1 sc0 ls0 ws4">CER</div></div><div class="c xf y6b w29 h30"><div class="t m0 x2 h1f y2b ff4 fs1 fc1 sc0 ls0 ws4">ABL</div></div><div class="c x10 y6b w2a h30"><div class="t m0 x2 h1f y2b ff4 fs1 fc1 sc0 ls0">A</div></div><div class="t m0 x7 h1f y6c ff3 fs4 fc3 sc0 ls4">\ue001<span class="ff4 fs1 fc1 ls0 ws0">Fita 3: <span class="_3 blank"> </span>AAL<span class="_6 blank"> </span>ACN</span></div><div class="t m0 x7 h1f y6d ff4 fs1 fc1 sc0 ls0 ws0">* Na primeira fase, observe que os blocos foram </div><div class="c x8 y20 w2b h2e"><div class="t m0 x2 h1f y4b ff4 fs1 fc1 sc0 ls0 ws0">divididos <span class="_0 blank"></span>em três e estão ordenados.</div></div><div class="c x8 y4e w2b h30"><div class="t m0 x2 h1f y4f ff4 fs1 fc1 sc0 ls0 ws0">divididos <span class="_0 blank"></span>em três e estão ordenados.</div></div></div><div class="pi" data-data='{"ctm":[0.000000,-1.000000,1.000000,0.000000,0.000000,595.000000]}'></div></div>
Compartilhar