27.12.2014 Views

Lecţii complementare de teoria grafurilor

Lecţii complementare de teoria grafurilor

Lecţii complementare de teoria grafurilor

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Pe baza teoremei <strong>de</strong>monstrate anterior putem da algoritmul <strong>de</strong> construire a unui graf<br />

neorientat care are multisetul gra<strong>de</strong>lor egal cu un multiset dat ce în<strong>de</strong>plineşte condiţiile<br />

teoremei.<br />

Algoritmul II.1<br />

dacă ∑<br />

altfel<br />

<br />

<br />

1 2) STOP – nu e multisetul gra<strong>de</strong>lor unui graf neorientat<br />

ultimul_impar0 /* reţinem ultimul nod <strong>de</strong> grad impar rămas pentru a fi unit cu altul <strong>de</strong> grad impar */<br />

pentru i1, <br />

muchie <strong>de</strong> /2 ori<br />

dacă ultimul_impar=0<br />

/* dacă toate nodurile <strong>de</strong> grad impar <strong>de</strong> dinainte sunt legate în perechi, îl<br />

ultimul_impari memorăm pentru a fi legat cu următorul <strong>de</strong> grad impar, ca şi el */<br />

altfel<br />

/* legăm acest nod cu ultimul <strong>de</strong> dinaintea sa <strong>de</strong> grad impar,<br />

muchie _ memorat în ultimul_impar */<br />

ultimul_impar0<br />

Teorema I.2<br />

Un multiset = ≤ ≤ … ≤ ∈ (un<strong>de</strong> 2) este multisetul gra<strong>de</strong>lor<br />

unui graf neorientat fără bucle = , dacă şi numai dacă sunt în<strong>de</strong>plinite simultan<br />

următoarele condiţii:<br />

<br />

0 2;<br />

<br />

<br />

≤ .<br />

<br />

Demonstraţie: Începem cu implicaţia directă. Fie = , graf neorientat cu = .<br />

Proprietatea este, evi<strong>de</strong>nt, în<strong>de</strong>plinită.<br />

Dacă este graf neorientat fără bucle, însemnă că cel mai mare grad al unui nod din graf <br />

este mai mic <strong>de</strong>cât numărul <strong>de</strong> muchii existente în graf, ≤ || = ∑ <br />

<br />

<strong>de</strong> un<strong>de</strong> ≤<br />

∑<br />

<br />

.<br />

Reciproc, fie un multiset ce în<strong>de</strong>plineşte condiţiile , . Construim un graf<br />

= , neorientat, fără bucle, cu = . I<strong>de</strong>ea este aceea <strong>de</strong> a construi mai întâi un<br />

<br />

7

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!