0% found this document useful (0 votes)
35 views

Dsal-211 Assignment 1

The document is a computer science assignment from Malawi University of Science and Technology that contains 4 questions: 1) Prove two mathematical equations using induction; 2) Explain greedy and dynamic programming algorithm design approaches; 3) Use Dijkstra's algorithm to find the shortest path between two nodes in a graph; 4) Outline an algorithm to detect cycles in an undirected graph using depth first search. Students must answer all questions individually and submit their work by the given deadline.

Uploaded by

Kutemwa Mithi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views

Dsal-211 Assignment 1

The document is a computer science assignment from Malawi University of Science and Technology that contains 4 questions: 1) Prove two mathematical equations using induction; 2) Explain greedy and dynamic programming algorithm design approaches; 3) Use Dijkstra's algorithm to find the shortest path between two nodes in a graph; 4) Outline an algorithm to detect cycles in an undirected graph using depth first search. Students must answer all questions individually and submit their work by the given deadline.

Uploaded by

Kutemwa Mithi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

MALAWI UNIVERSITY OF SCIENCE AND TECHNOLOGY

MALAWI INSTITUTE OF TECHNOLOGY

COMPUTER SCIENCE AND INFORMATION TECHNOLOGY DEPARTMENT

DSAL-211 ASSIGNMENT 1

DUE DATE: Friday, 8th February 2019 Time: 5 P.M

INSTRUCTIONS

1. Answer ALL questions. Marks will only be awarded for correct answers that demonstrate
independence of thought, thorough research and comprehensive understanding of the
subject

2. This is an individual assignment, hence, you are NOT allowed to work in groups. Content
that demonstrates similarities shall be penalized

3. Submit your work not later than the deadline in Admin Block Room 87 or at the Reception
via Mr. Gondwe’s pigeonhole.
1. Prove the following by mathematical induction:
𝑛
a. ∑𝑘=1 2𝑘 = 2𝑛+1 − 2, 𝑓𝑜𝑟 𝑎𝑙𝑙 𝑛 > 0 [8 marks]
b. 7𝑘 − 1 𝑖𝑠 𝑑𝑖𝑣𝑖𝑠𝑖𝑏𝑙𝑒 𝑏𝑦 6 for all positive integers k [6 marks]

2. Explain how the following algorithm design approaches work


a. Greedy algorithm [3 marks]
b. Dynamic programming [3 marks]

3. Dijkstra’s algorithm is a shortest-path graph algorithm with many applications in


optimization. Use your knowledge of the algorithm to find the shortest path from node A to
node I in the graph given below. Outline all steps. [10 marks]

4. Outline an algorithm for detecting a cycle in an undirected graph using depth first search
(DFS) [10 marks]

You might also like