math

12

Click here to load reader

Upload: blackbox90s

Post on 07-Jul-2015

207 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Math

treeTAF 3053

Page 2: Math

EULAR • EULAR PATH:

• Eulerian path is a trail in a graph which visits every edge exactly once.

Page 3: Math

....• EULAR CIRCUITAn Euler circuit is a circuit that uses every edge of a graph exactly once.

• I An Euler circuit starts and ends at the same vertex.

Page 4: Math

2. Determine what are the properties that differentiate between a and b in Question 1?

• EULAR PATH:• Starting at initial vertex and ending at other vertex.

• Some degree vertex are odd.

• Odd degree vertex => 2.

• EULAR CIRCUIT: • Starting with initial vertex and ending at initial vertex.

• All degree vertex are even.

Page 5: Math

3. What are the algorithm or step by step to determine a and b in

Question 1?• Euler Path :

• Pick any vertex to start • From that vertex pick an edge to traverse

• Darken that edge, as a reminder that you can't traverse it again

• Travel that edge, coming to the next vertex • Repeat 2-4 until all edges have been traversed, and

you are back at the starting vertex

Page 6: Math

...• Euler Circuit • Step One: Randomly moves from node to node, until

stuck. Since all nodes had even degree, the circuit must have stopped at its starting point. (It is a circuit.)

• Step Two: If any of the arcs have not been included in our circuit, find an arc that touches our partial circuit, and add in a new circuit.

• Each time we add a new circuit, we have included more nodes.

• Since there are only a finite number of nodes, eventually the whole graph is included.

Page 7: Math

Hamilton

• Example:

• Hamilton circuit: a-b-e-d-c-a

Page 8: Math

..• Hamilton Path is a path visits each vertex of a graph once and only once.

• Not all edges is passes through because the vertex is passes olny once. 2) 1-2-3-4

• 1) A-B-E-C-D

Page 9: Math

5. Determine what are the properties that differentiate

between a and b in Question 4?• HAMILTON CIRCUIT:

• When this initial vertex is connected to each vertex until it meet the end at initial vertex

• HAMILTON PATH:• The initial vertex is connected each vertex

until it meet the last vertex before initial vertex

Page 10: Math

6. What are the algorithm or step by step to determine a and b in

Question 4?• TO DETERMINE HAMILTON CIRCUIT

• DIRAC’S THEOREM: If G is a simple graph with n vertices with n 3 such that the≥

• degree of every vertex in G is at least n/2, then G has a Hamilton circuit

• ORE’S THEOREM : If G is a simple graph with n vertices with n 3 such that≥

• deg(u) + deg(v) n for every pair of nonadjacent vertices u ≥and v in G, then G has a Hamilton circuit.

Page 11: Math

`• Randomized algorithm• A randomized algorithm for Hamiltonian path

that is fast on most graphs is the following: Start from a random vertex, and continue if there is a neighbor not visited. If there are no more unvisited neighbors, and the path formed isn't Hamiltonian, pick a neighbor uniformly at random, and rotate using that neighbor as a pivot. (That is, add an edge to that neighbor, and remove one of the existing edges from that neighbor so as not to form a loop.) Then, continue the algorithm at the new end of the path.

Page 12: Math

`