Algorithm and complexity questions

 Hello there, I have done the first question but stuck in other. Could you please help me?

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper

Thank you

Assessment 3 HIT220

cat.kutay

September 2020

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper

1

Rubric

1. Pseudo code should be written according to guidelines supplied at
https://www.geeksforgeeks.org/how-to-write-a-pseudo-code/.
If there is no structure or the explanation is at too high a level to implement directly in code your
pseud code is not sufficient.

2. This document is available https://www.overleaf.com/read/jmczmkhsnfzc

3. Submit as a pdf on Learnline

4. Hand drawings can be scanned and inserted

5. Marking rubric for each question:
Marks will be awarded for accuracy, completeness, and well communicated reasoning which demon-
strates your depth of understanding of the subject matter.
Unless otherwise divided up marking is:

• Half marks will be given for right answer
• Half marks will be given for working shown with verbal explanation of working

Note: For proving and disproving include an example where you look at how the claim works with
a specific set

All question totals are shown

2 Questions

1. (6 points) Graphs and Trees

a) Draw three small example connected graphs, each of which has n vertices and n-1 edges. Vary the
value of n for each example. What kind of graphs are these?

b) Is it possible to draw a connected graph with n vertices and n edges but no cycles? Explain your
answer.

c) Draw a simple Graph G, which is a Forest that has 12 vertexes and at least 8 edges.

d) How many connected components does graph G have? How does this relate to the number of
vertices and edges?

e) If the sum of the degree of all vertex is 24 in a graph with 12 vertices, what else can we say about
the graph?

1

2. (6 points) Topological Sort
List a topological order for the following graphs. When you have a choice of path, choose the lower
alphanumeric vertex.
Provide pseudo code to provide a topological sort for the graphs given (this may not generalise)

3. (6 points) Shortest Path
Apply Dijkstra’s Algorithm to each of the graphs shown below. Include the table of vertex labels at
each stage and draw the spanning tree. Use the alphanumeric conventions for ordering of the vertices
and start the algorithm at the smallest vertex.

Page 2

4. (6 points) Matrix Graphs Use the following graph for this problem.

a) Draw both the adjacency matrix and adjacency list representations of the graph (A) and (B) above.

b) For graph (A), what is the worst case big-O running time of the following operations (use V and E
rather than N in your answers).

A. Operation: Find the degree of a single vertex whose graph is stored in an adjacency matrix.
Explain your answer.

B. Operation: Find the opposite vertex of u along the edge e in a graph which is stored in an
adjacency list. Explain your answer.

Page 3

5. (6 points) Sorting
Use the following sequence as the list to sort: [ M,A,U,N,G,K,P,R,T,J,Y] You need to display the contents
of the list during the execution of the algorithm.

a) Sort the list using selection sort.
Provide the pseudo code

b) Sort the list using heap sort. You do not need to draw the heap diagram unless you find it helpful,
but you must still show the contents on the list during execution.
Provide the pseudo code

c) What is the worst-case runtime complexity of selection sort?

d) What is the worst-case runtime complexity of heap sort?

Page 4

Calculate your order
Pages (275 words)
Standard price: $0.00
Client Reviews
4.9
Sitejabber
4.6
Trustpilot
4.8
Our Guarantees
100% Confidentiality
Information about customers is confidential and never disclosed to third parties.
Original Writing
We complete all papers from scratch. You can get a plagiarism report.
Timely Delivery
No missed deadlines – 97% of assignments are completed in time.
Money Back
If you're confident that a writer didn't follow your order details, ask for a refund.

Calculate the price of your order

You will get a personal manager and a discount.
We'll send you the first draft for approval by at
Total price:
$0.00
Power up Your Academic Success with the
Team of Professionals. We’ve Got Your Back.
Power up Your Study Success with Experts We’ve Got Your Back.

Order your essay today and save 30% with the discount code ESSAYHELP