Está en la página 1de 4

INTELIGENCIA ARTIFICIAL – 3RA SESION

01/09/2014

BUSQUEDAS / ARBOLES BINARIOS

Árbol binario (estructura de datos, donde el padre puede tener hasta 2 hijos)

2 3

4 5 6 7

8 9 10 11 12 13

14 15 16

- INPUT (árbol binario y número a buscar)


- OUTPUT (posición)
- Heurística

1. BUSQUEDA POR PROFUNDIDAD (PADRE, IZQ, DER)


1 2 4 8 5 9 14
2. BUSQUEDA POR NIVELES O AMPLITUD
1 2 3 4 5 6 7 8 9 10 11 12 13 14
EJEMPLO:

R I

B O R

L K M

1. BUSQUEDA POR PROFUNDIDAD (PADRE, IZQ, DER)


ARBOL
2. BUSQUEDA POR NIVELES O AMPLITUD
ARIBORL
3. BUSQUEDA POR PROFUNDIDAD (PADRE, IZQ, DER)
ARBOLIR
4. BUSQUEDA POR NIVELES O AMPLITUD
ARIBOR
Árbol binario sensible al texto / contexto:

Mosqueda

Alarcon Tadeo

Abanto Condori Olortegui Vasquez

Mallma Turpo Villa

Leandro Zegarra

Gordillo Llasaca

Gastañadui Junco

Escobedo

Árbol binario es donde las búsquedas son rápidas:

BUSQUEDAS:

Mosqueda, Alarcon, Abanto, Condori, Mallma (PROFUNDIDAD)

Mosqueda, Alarcon, Tadeo, Abanto, Condori, Olortegui, Vasquez, Mallma, Turpo (AMPLITUD)
1

2 3

4 5 6

7 8 9

(P RI RD)

(1 (2 4 (5 7)) (3 (6 8 9)))

2 3

4 5

6 7

(1 (2 (4 6 7)) (3 5))

También podría gustarte