<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE document PUBLIC "-//CNX//DTD CNXML 0.5//EN" "http://cnx.rice.edu/cnxml/0.5/DTD/cnxml_mathml.dtd">
<document xmlns="http://cnx.rice.edu/cnxml" xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="none">
	<name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">Árvores binárias de pesquisa</name>
	<metadata xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">
  <md:version xmlns:bib="http://bibtexml.sf.net/">**new**</md:version>
  <md:created xmlns:bib="http://bibtexml.sf.net/">2004/09/22 09:32:10.476 GMT-5</md:created>
  <md:revised xmlns:bib="http://bibtexml.sf.net/">2004/09/22 09:35:22.851 GMT-5</md:revised>
  <md:authorlist xmlns:bib="http://bibtexml.sf.net/">
      <md:author xmlns:bib="http://bibtexml.sf.net/" id="andre">
      <md:firstname xmlns:bib="http://bibtexml.sf.net/">Andre</md:firstname>
      
      <md:surname xmlns:bib="http://bibtexml.sf.net/">Campos</md:surname>
      <md:email xmlns:bib="http://bibtexml.sf.net/">andre@dimap.ufrn.br</md:email>
    </md:author>
  </md:authorlist>

  <md:maintainerlist xmlns:bib="http://bibtexml.sf.net/">
    <md:maintainer xmlns:bib="http://bibtexml.sf.net/" id="andre">
      <md:firstname xmlns:bib="http://bibtexml.sf.net/">Andre</md:firstname>
      
      <md:surname xmlns:bib="http://bibtexml.sf.net/">Campos</md:surname>
      <md:email xmlns:bib="http://bibtexml.sf.net/">andre@dimap.ufrn.br</md:email>
    </md:maintainer>
  </md:maintainerlist>
  
  <md:keywordlist xmlns:bib="http://bibtexml.sf.net/">
    <md:keyword xmlns:bib="http://bibtexml.sf.net/">árvores binárias</md:keyword>
    <md:keyword xmlns:bib="http://bibtexml.sf.net/">árvores de pesquisa</md:keyword>
  </md:keywordlist>

  <md:abstract xmlns:bib="http://bibtexml.sf.net/">Este módulo apresenta os conceitos iniciais de árvores binárias de pesquisa. Ele inclui algoritmos de busca, inserção e remoção.</md:abstract>
</metadata>
	<content xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">
		<section xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="s1">
			<name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">Árvores de pesquisa</name>
			<para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="p1">Ah! este parágrafo é necessário para que a seção tenha algo a dizer. Vejam! e a fonte é diferente!</para>
		</section>
		<para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="p2">Suponha que você tenha um conjunto de elementos a armazenar no seu computador, de forma que possa realizar inúmeras buscas sobre esses elementos. Suponha agora que você utilize, como estrutura de dados para armazenar esses elementos, uma lista encadeada. Como vocês devem lembrar, a complexidade de busca em uma lista encadeada é (no pior caso) O(n), onde n é o número de elementos da lista. Isso ocorre porque precisamos percorrer a lista, no pior caso (caso onde o elemento a ser procurado se encontra no final da lista), do início (cabeça da lista) até o final. E se pudéssemos dar “saltos” nessa procura?</para>
		<para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="p3">Claro que podemos dar “saltos” em uma procura. Alias, essa é a forma natural de otimizar processos. Para melhor visualizar esse processo, imagine uma busca de um número no intervalo de 0 a 100. Ao invés de iniciar sua busca no 0 e se estender até o 100, você pode testar o médio, 50, e verificar se o número a ser encontrado é maior ou menor. Se for menor, podemos então desprezar todos os números acima de 50 e recomeçar a busca no intervalo de 0 a 50. Esse procedimento deverá se repetir até que o número correspondente seja encontrado. Esse procedimento gerou implicitamente uma árvore de busca, conforme ilustrado na figura .</para>
		<para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="p4"><figure xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="f1">
				<code xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" type="inline">para todo vértice além-mar faça com  </code>
			</figure></para>
		<para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="p5">Responda a pergunta do exercício  para melhor fixar seu conteúdo.</para>
	</content>
	<glossary xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">
		<definition xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="d1">
			<term xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">Árvore binária estrita</term>
			<meaning xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">Árvore binária onde cada nó não-folha possui os dois filhos</meaning>
		</definition>
	</glossary>
	<bib:file>
		<bib:entry id="b1">
			<bib:book>
				<bib:author>André Campos</bib:author>
				<bib:title>Algoritmos e estruturas de dados em Java</bib:title>
				<bib:publisher/>
				<bib:year>2002</bib:year>
			</bib:book>
		</bib:entry>
	</bib:file>
</document>
