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

  Difference between the effects of the given two declarations

What is the difference between the effects of the following two declarations: Ratio y(x); Ratio y = x; What is the difference between the effects of the following two lines: Ratio y = x; Ratio y; y = x;

  C++ pointer function synopsis

C++ pointer Function Synopsis: char *amonthLess(char *dateString) Description: Variable dataString is a valid date in a form of mm/dd/yyyy Given the above information, write a main() program that asks a user to enter a date in a form of mm/dd/yyyy..

  Write the two redox half-reactions

How would I write the two redox half-reactions for these: Ag/Ag+| | H+/H2 Cu/Cu2+| | H+/H2 H2/H+| | Zn2+/Zn

  Preparing a high level language program

Describe the purpose of each step in preparing a high level language program for execution (editing, compiling, linking, and loading).  Include in your description the types of files created with each of the first three steps.?

  C program that compare the time required

Write a C program that compare the time required to compute the product of two 10,000 x 10,000 matrices with and without optimization for locality.

  Compound and nested if statements

Compound and Nested If Statements- Suggest one (1) example of a problematic programming situation or scenario that the use or implementation of a compound if statement could resolve. Justify your response

  Write a function name is prime

Write a function name is Prime, which takes an integer as an argument and returns true if the argument is a prime number, or false otherwise. Demonstrate the function in a complete program.

  A robot can take steps of 1 meter

A robot can take steps of 1 meter, 2 meters, or 3 meters. Write a recursive function to calculate the number of ways the robot can walk n meters. (n is an integer obtained from user.) As example:

  What is normalization and what is functional dependency

How does Tuple-oriented relational calculus differ from domain-oriented relational calculus. What is normalization? What is Functional Dependency?

  Returns the number of days in a month

Using only "If" statements.  Returns the number of days in a month.  Each month will be shown by a corresponding integer. This is not the most correct calculation, but Leap Year will be calculated using (Year/4) to determine if the input year is a..

  Linked list in c++

If the following C++ code is valid, show the output. If it is invalid, explain why.

  1 recursive sorts are easier to write in functional style

1 recursive sorts are easier to write in functional style than others. two recursive sorts are quicksort and mergesort.

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