2075 8

CSC165 · 2075 · 5 marks

Define Euler path and Hamilton path with examples. Draw the Hasse diagram for the divisibility relation on the set {1,2,5,8,16,32} and find the maximal, minimal, greatest and least element if exist.

Define Euler path and Hamilton path with examples. Draw the Hasse diagram for the divisibility relation on the set {1,2,5,8,16,32} and find the maximal, minimal, greatest and least element if exist. [5]

Discrete StructuresChapter 6: Relations and GraphsEuler and Hamiltonian Path and CircuitsNumerical: Hasse diagram poset elements

Euler Path, Hamilton Path, and Hasse Diagram

Part 1: Euler Path and Hamilton Path

Euler Path

Definition: An Euler path is a walk in a graph that traverses every edge exactly once (vertices may repeat). If it starts and ends at the same vertex, it is an Euler circuit.

Existence condition: A connected graph has an Euler path iff it has exactly 0 or 2 vertices of odd degree (2 odd-degree vertices give an open Euler path; 0 gives an Euler circuit).

Example:

Vertices ${A,B,C,D}$, edges: $A\text{-}B,\ B\text{-}C,\ C\text{-}D,\ D\text{-}A,\ A\text{-}C$.

Degrees: $\deg(A)=3,\ \deg(B)=2,\ \deg(C)=3,\ \deg(D)=2$. Two odd-degree vertices $(A,C)$, so an Euler path exists:

$$A \to B \to C \to D \to A \to C$$

This uses each of the 5 edges exactly once.

Hamilton Path

Definition: A Hamilton path is a path that visits every vertex exactly once. If it returns to the starting vertex, it is a Hamiltonian circuit (cycle).

Note: There is no simple necessary-and-sufficient condition for a Hamilton path (unlike Euler paths).

Example: Same graph as above:

$$A \to B \to C \to D$$

visits all 4 vertices exactly once, so it is a Hamilton path.

Key Difference

PropertyEuler PathHamilton Path
VisitsEvery edge onceEvery vertex once
Condition0 or 2 odd-degree verticesNo simple general condition

Part 2: Hasse Diagram for Divisibility on ${1,2,5,8,16,32}$

Step 1: Divisibility relations (a | b)

  • $1 \mid$ everything
  • $2 \mid 8,\ 2 \mid 16,\ 2 \mid 32$
  • $8 \mid 16,\ 8 \mid 32$
  • $16 \mid 32$
  • $5$: divides nothing else in the set (since $8,16,32$ are not multiples of 5)

Step 2: Cover relations (remove transitive edges)

  • $1 \lessdot 2$, $1 \lessdot 5$
  • $2 \lessdot 8$ (since $4 \notin$ set)
  • $8 \lessdot 16$
  • $16 \lessdot 32$

Step 3: Hasse Diagram

        32
        |
        16
        |
        8
        |
        2       5
         \     /
            1

Step 4: Maximal, Minimal, Greatest, Least

Minimal element: element with nothing below it. $1$ is the only minimal element.

Maximal elements: elements with nothing above them. $32$ (top of chain) and $5$ (dead-end, divides nothing else). $$\text{Maximal} = {5,\ 32}$$

Least element: divides every element $\Rightarrow$ $1$ divides all. $$\text{Least} = 1$$

Greatest element: must be divisible by all others. $32$ is not divisible by $5$, and no single element is above all others $\Rightarrow$ no greatest element.

Summary Table

PropertyElementExists?
Minimal${1}$Yes
Maximal${5, 32}$Yes
Least$1$Yes
GreatestNoneNo

For the Hasse diagram the minimal element is ${1}$, the maximal elements are ${5,32}$, the least element is $1$ and there is no greatest element. On the Euler path, a route such as $A \to B \to C \to A \to D \to C$ is invalid because it repeats an edge and skips another; the valid path is $A \to B \to C \to D \to A \to C$. The Euler condition should also include the "0 odd vertices" case for completeness.

Short on time? The 1, 5 and 10 mark versions of this answer, flashcards and practice sets come with a program pass.