Recent Question/Assignment

Please complete the following questions using Python programming
1. Write the code for finding the Longest Common Sub sequence. Make sure you output the Matrix C and the longest sub sequence. Test your code with various use-cases.
LP
1. Have a look at associated ipynb and reflect on the code given to you for graphical solution of LP.
2. Solve the following LP problem graphically using the level curves in this weeks lab notebook:
max 4Xi + 5X2
subject to 2%i + 3X2 120
4Xi + 3X2 140
Xi + X2 80
Xi 0 X2 0
Greedy algorithms
5. Have a look at the associated ipython notebook and run the code for building Prefix Code Trees. Demonstrate your understanding of the code by (doing some of the following activities):
a. Running the code with many different test-cases.
b. Alter the code and obtain some desired functionality.
c. Find errors in the code, or
d. Expand the code.
6. Have a look at the associated ipython notebook and run the code for slow and optimized versions of Prims Algorithm. Demonstrate your understanding of the code by (doing some of the following activities):
a. Running the code with many different test-cases.
b. Alter the code and obtain some desired functionality.
c. Find errors in the code, or
d. Expand the code.
7. In this weeks lab, based on the code given to you for Prims Algorithm, develop an algorithm to implement Kruskals Algorithm.