Draw a graph that models the connecting relationships in the floorplan below. The vertices represent the...
5. EULER CIRCUITS (a) The graph below models scenic landmarks in a national park and the edges represent walkways between the scenic landmarks. A security guard must patrol the walkways to ensure safety. List out a sequence of vertices which uses all of the edges exactly once. Is this an Euler Circuit or an Euler Trail? H A B G С Ꭰ . E F (b) In the picture below, we can model the connections between land masses, A, B,...
question 1 and 2 please, thank you. 1. In the following graph, suppose that the vertices A, B, C, D, E, and F represent towns, and the edges between those vertices represent roads. And suppose that you want to start traveling from town A, pass through each town exactly once, and then end at town F. List all the different paths that you could take Hin: For instance, one of the paths is A, B, C, E, D, F. (These...
Write down true (T) or false (F) for each statement. Statements are shown below If a graph with n vertices is connected, then it must have at least n − 1 edges. If a graph with n vertices has at least n − 1 edges, then it must be connected. If a simple undirected graph with n vertices has at least n edges, then it must contain a cycle. If a graph with n vertices contain a cycle, then it...
Answer each question in the space provided below. 1. Draw a simple graph with 6 vertices and 10 edges that has an Euler circuit. Demonstrate the Euler circuit by listing in order the vertices on it. 2. For what pairs (m,n) does the complete bipartite graph, Km,n contain an Euler circuit? Justify your answer. (Hint: If you aren't sure, start by drawing several eramples) 3. For which values of n does the complete graph on n vertices, Kn, contain a...
This project requires you to develop object oriented programs of a graph that can achieve the following functions. A graph can be empty with no vertex or edge. A graph can be either a directed graph or an undirected graph. A graph can be added in vertices and edges. A vertex of a graph can contain values - in theory, the values can be of any type. A graph can be displayed by listing all the possible paths, each linking...
North Bank South Bank How many vertices are in your graph? How many edges are in your graph? Give the degree of each vertex: deg(A) = , deg(B) = , deg(C) = , deg(North) = deg(South) = Does this graph have an Euler Circuit, an Euler Path, or Neither?
6. (a) Decide if there exists a full binary tree with twelve vertices. If so, draw the tree. If not explain why not. (b) Let G be a finite simple undirected graph in which each vertex has degree at least 2. Prove that G must contain a simple circuit (c) Let G be a graph with 2 vertices of degree 1, 3 of degree 2, and 2 of degree 3. Prove that G cannot be a tree
1. Consider a directed graph with distinct and non-negative edge lengths and a source vertex s. Fix a destination vertex t, and assume that the graph contains at least one s-t path. Which of the following statements are true? [Check all that apply.] ( )The shortest (i.e., minimum-length) s-t path might have as many as n−1 edges, where n is the number of vertices. ( )There is a shortest s-t path with no repeated vertices (i.e., a "simple" or "loopless"...
A 2-coloring of an undirected graph with n vertices and m edges is the assignment of one of two colors (say, red or green) to each vertex of the graph, so that no two adjacent nodes have the same color. So, if there is an edge (u,v) in the graph, either node u is red and v is green or vice versa. Give an O(n + m) time algorithm (pseudocode!) to 2-colour a graph or determine that no such coloring...
10) Shortest Paths (10 marks) Some pseudocode for the shortest path problem is given below. When DIJKSTRA (G, w,s) is called, G is a given graph, w contains the weights for edges in G, and s is a starting vertex DIJKSTRA (G, w, s) INITIALIZE-SINGLE-SOURCE(G, s) 1: RELAX (u, v, w) 1: if dlv] > dlu (u, v) then 2d[v] <- d[u] +w(u, v) 3 4: end if 4: while Q φ do 5: uExTRACT-MIN Q) for each vertex v...