Adjacency matrix and shortest path

Assignment Help C/C++ Programming
Reference no: EM13943136

Task Background: Graphs and Trees are useful in visualizing data and the relations within and between data sets. Conversely, it is also important to be able to represent graphs as databases or arrays, so that programs for processing the data can be written.

Part I: Adjacency Matrix and Shortest Path

Construct a graph based on the adjacency matrix that appears below. Label all nodes with indices consistent with the placement of numbers within the matrix.

⌈0 6 0 5 0⌉
| 6 0 1 0 |
| 0 1 0 4 |
| 5 0 4 0 0 |
⌊0 3 8 0 0⌋
  • Describe the graph and why it is consistent with the matrix.
  • How many simple paths are there from vertex 1 to vertex 5? Explain.Which is the shortest of those paths?

Part II: Trees

  • Construct and describe a tree that indicates the following: A college president has 2 employees who answer directly to him or her, namely a vice president and provost. The vice president and provost each have an administrative assistant. Three deans answer to the provost, and the heads of finance and alumni relations answer to the vice president. Each dean oversees three department chairpersons, and each department chair oversees several faculty in each of their respective departments.
  • Suppose that the professional correspondences are the same as above, with the addition that there is also a direct working relationship between the college president and the head of alumni relations (it is not necessary to draw this). Would the graph still be a tree? Why or why not?

Reference no: EM13943136

Questions Cloud

Describe three approaches to organizing programming teams : Briefly describe direct, parallel, and phased installation. What are the advantages and disadvantages of each installation approach?
Weekly report to be used by all secretaries : Can you design a weekly report to be used by all secretaries. Ensure the presentation compliments other report templates and follows the corporate style guidelines. Include a heading at the top which says Environmental Challenges Australia.
Declare two character arrays : Write a C program for Code warrior, to declare two character arrays called list1 and list2. Initialize list1 with your first and last name. Write the main code to copy list1 to list2.
What are the major reasons for it project failures : Why do you believe some projects do not meet their objective or scope?
Adjacency matrix and shortest path : Construct a graph based on the adjacency matrix that appears below. Label all nodes with indices consistent with the placement of numbers within the matrix.
What is the name for the alkaline hydrolysis of an ester : What is the name for the alkaline hydrolysis of an ester? Discuss the solubility of covalent compounds vs ionic compounds in polar and non polar media respectively.
How would you define an enterprise : How does this guide or limit the scope of an enterprise system implementation project?
Fitted with a jacket over a straight section : A jacketed vessel is to be used as a reactor. the vessel has an internal diameter of 2m & it fitted with a jacket over a straight section 1.5m long. both the vessel & jacket walls are 25mm thick.
Explain the generation of a lifting force : You can also view it at http://www.pbs.org/wgbh/nova/space/lift-drag.html. Next, describe the way in which one could use both Newton's Third Law of Motion and the Bernoulli Effect to explain the generation of a lifting force when air passes over ..

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Csc302 make any dfa in jflap software and run for several

make any dfa in jflap software and run for several inputs. take a screen shot and include in your assignment. keep in

  The rpn calculator program

The RPN calculator program should read the RPN expression as an entire line from stdin.Input will consist of a single line. After completing the evaluation of the expression, the program should print the contents of the entire stack, starting with th..

  Using a for loop, print the contents of the array.

Write the code to update every other element within the array with a lowercase x.

  Implement class bankacct for bank usq

Implement class BankAcct, for Bank of USQ, using bankacct.cpp and bankacct.h and Implement an application bankUSQ_app.cpp

  Design a class box that defines a box on a floor

Design a class box that defines a box on a floor. A box has a number and an (a,b) location where a and b are numbers between -5, and 5.

  Program that loads the keywords and definitions

1) Develop the part of the program that loads the keywords and definitions from the external file

  The grid is populated randomly

Initially, the grid is populated randomly with occupied and empty cells. Once the initial grid has been created, the program loops. Each iteration of the loop represents a tick or time step in the environment.

  Write a student class in java that implements the interface

A public int compareTo(Object object) that will compare two Student objects based on their student Ids.

  Create a funcion called max

Create a funcion called max().

  Develop a simple poker game

Develop a simple poker game

  Extract individual digits or sequences of digits from it.

Given a large number we sometimes need to extract individual digits or sequences of digits from it. For example, given a four-digit year (2010) we may need to extract just the two-digit year or the century.

  Which of the following assignments are valid

Which of the following assignments are valid? If an assignment is not valid, state the reason.When not given, assume that each variable is declared.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd