Question 1
Given A = {1,2,3}, we construct a partial order set (POSET) as (P(A),).
- Draw the Hasse diagram.
- Is it a lattice?
- Find the maximal elements.
- Find the minimal elements.
- Is there a greatest element?
- Is there a least element?
- Find Least Upper Bounds (LUBs) of {1} and {3}.
Question 2
Consider the graph G in Figure 1 to answer the following questions. Explain all the answers.
- What is the sum of degrees of all nodes of G?
- What is the number of non-zero entries in the adjacency matrix representation of G?
- What is the number of non-zero entries in the incidence matrix representation of G?
- Does G have a complete graph with at least three vertices as a subgraph? If yes, draw this subgraph.
- Is G a bipartite graph? If yes, explain briefly; if no, remove the edges such that the resulting subgraph of G will be a bipartite graph.
- How many directed graphs are there that have G as their underlying undirected graph?
- What is the length of the simple longest path in G? Explain your answer.
- What is the number of connected components of G? Explain your answer.
- Is there an Euler circuit in G? If yes, give such a circuit; if no, state the reason.
- Is there an Euler path in G? If yes, give such a path; if no, state the reason.
- Does G have a Hamilton circuit? If yes, find such a circuit; if no, justify your answer.
- Does G have a Hamilton path? If yes, find such a path; if no, justify your answer.
Question 3
(a) G (b) H
Figure 2: Graph G and H in Q3.
Determine whether G and H are isomorphic, or not. Explain your answer.
Question 4
Find the shortest path from vertex a to vertex j in the following weighted graph G (see Figure 3) using Dijkstras algorithm. Describe the steps clearly.
Question 5
Use either Kruskals or Prims algorithm to find a minimum spanning tree for the graph G given below (Figure 4). Please state the algorithm you choose at the beginning of your solution.
- Write the order in which the edges are added to the tree.
- Draw the minimum spanning tree.
- Is the minimum spanning tree unique? Justify your answer.
Question 6
Answer the following questions using the binary tree T in Figure 5. Note that T has the vertex p as its root. Use the notational conventions in your textbook to decide whether a vertex is left or right child of some vertex whenever applicable.
- What are the number of vertices, the number of edges and the height of T?
- Carry out a postorder traversal of T and write down the order in which vertices are visited.
- Carry out an inorder traversal of T and write down the order in which vertices are visited.
- Carry out a preorder traversal of T and write down the order in which vertices are visited.
- Is T a full binary tree? Justify your answer.
Reviews
There are no reviews yet.