Professional Documents
Culture Documents
Nociones Básicas: Gregorio Hernández UPM
Nociones Básicas: Gregorio Hernández UPM
Nociones básicas
Gregorio Hernández
UPM
Teoría de Grafos
Euler 1736
Isómeros químicos
Cayley 1857
REDES DE ORDENADORES
Organización de exámenes
Asignación de frecuencias de radio
¡Sólo DOS días!
12
A B
vértices = asignaturas
peso = alumnos comunes
8 14
18
22
E C
15 6
Organización de exámenes
Organización de
¡Sólo DOS días! exámenes
12
vértices = asignaturas
8
vértices = asignaturas
14
18 peso = alumnos comunes peso = alumnos comunes
22
14 + 22 + 18 = 54
15 6 ¡Sólo 3 días!
12
8 14 18 + 8 + 6 = 32
18
22
15 6
Organización de SWERC’07
exámenes
EMPAREJAMIENTOS ESTABLES
vértices = asignaturas Problem I – Ladies’ Choice
Background
peso = alumnos comunes Teenagers from the local high school have asked you to help them with the organization of
next year’s Prom. The idea is to find a suitable date for everyone in the class in a fair and
civilized way. So, they have organized a web site where all students, boys and girls, state
¡Sólo 3 días! their preferences among the class members, by ordering all the possible candidates. Your
mission is to keep everyone as happy as possible. Assume that there are equal numbers of
boys and girls.
Problem
Given a set of preferences, set up the blind dates such that there are no other two people of
opposite sex who would both rather have each other than their current partners. Since it was
decided that the Prom was Ladies' Choice, we want to produce the best possible choice for
the girls.
a b a b
aristas
adyacentes vértice y arista
incidentes
c d c d
a b a b
c d c d
Grafo G=(V,A)
• Número de vértices |V| = n Teorema de Euler
v ∈V
Σ d(v) = 2q
• Número de aristas |A| = q
Notación
• Grado de un vértice v d(v)
Consecuencia
En un grafo, el nº de vértices de grado impar es siempre un nº par
d(a)=3 a b d(b)=4
∑ d ( v ) = ∑ d ( v ) + ∑ d ( v ) = 2q
v∈V d ( v ) impar d ( v ) par
4, 4, 4, 3, 3, 3, 3, 2 a b
c a→4 1
G b→1
¿La sucesión determina el grafo? c→3
G’ 4
a d→2
d e 3, 2, 2, 2, 1 ¡NO!
b c d 2
3
g
h G y G’ son isomorfos si
f existe f: V → V’ que conserva la adyacencia
≈ Grafo de Petersen
• Grafos completos Kn
..... V1
G=(V1∪V2, A)
C3 C4 C5 V2
• Caminos Pn
Grafo bipartido completo
..... K3,4
P1 P2 P3 P4
• Grafos Qn Subgrafos
011 111
01 11 G=(V,A)
a b H=(V1,A1)=G-{b}
0 1 010 110 a
001 10 1
Q1 00 10
000 10 0
Q2
c d c d
Q3
Q4 ? Vértices: Cuaternas de 0’s y 1’s a b
a b
Adyacencia: Si difieren sólo en un dígito
H’=(V2,A2)=G-{bd}
H’’=(V3,A3)
Qn es n-regular, tiene 2n vértices y n2n-1 aristas
c d c d
Qn es bipartido
Subgrafos inducidos por vértices Subgrafos inducidos por aristas
a b a a b a b
c d c d c d d
a b Orden en V: a, b, c, d
a b
a b
1 2 3 4
c d Matriz de G:
c d
a b c d
G=(V,A) 0 1 1 1
1 0 0 1
G=(V,A) 1 0 0 1
c d 1 1 1 0
Listas de adyacencia
a b Caminos y conexión a, b,f
Orden en V: a, b, c, d Recorrido: a,d,c,g,a,b,f
c
a segunda comp. b
d e
b d
Un vértice u de G es vértice-corte si G – u
g h si tiene más componentes conexas que G
f tercera comp.
h
f
Teorema Sea uv ∈ A u
G es bipartido ⇔ G no tiene ciclos de longitud impar z puede coincidir
z
x con x, con u, o
Dem. con v
C1 C2 C3 C4 C1 C2 C3 C4
F1
F2
F3
F1 F2 F3
C1 C2 C3 C4
C1 C2 C3 C4
NO se deforma F1
F2
F3
F1 F2 F3
C1 C2 C3 C4 C1 C2 C3 C4
F1
F2
F3
F1 F2 F3
NO CONEXO
C1 C2 C3 C4
C1 C2 C3 C4
F1
F2
F3
F1 F2 F3
SÍ CONEXO