Skip to content

Commit 9113fb6

Browse files
committed
LCS and MCM Programs added
1 parent 85e74ec commit 9113fb6

File tree

6 files changed

+44
-0
lines changed

6 files changed

+44
-0
lines changed

Graph Generated/LCS.png

14.4 KB
Loading

Graph Generated/MCM.png

15.3 KB
Loading

LCS_analysis.txt

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Number_of_Input Time_Taken
2+
Best_Case 5000 170447100
3+
Best_Case 6000 223739300
4+
Best_Case 7000 303067100
5+
Best_Case 8000 386325700
6+
Best_Case 10000 678055200

MCM_analysis.txt

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
Number_of_Input Time_Taken
2+
Best_Case 100 4462400
3+
Best_Case 200 3145200
4+
Best_Case 250 6412500
5+
Best_Case 300 10870100
6+
Best_Case 350 17545000
7+
Best_Case 400 28782700
8+
Best_Case 450 39651300
9+
Best_Case 500 52723600
10+
Best_Case 600 95118100
11+
Best_Case 800 240673800
12+
Best_Case 900 327570700
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# -*- coding: utf-8 -*-
2+
"""
3+
Created on Mon Nov 16 21:18:32 2020
4+
5+
@author: RS
6+
"""
7+
8+
9+
import pandas as pd
10+
import matplotlib.pyplot as mp
11+
12+
df=pd.read_csv("D:\Algorithm time Complexity analysis\\LCS_analysis.txt",sep="\t")
13+
14+
avg=[]
15+
print(df)
16+
17+
for i in range(df.shape[0]):
18+
avg.append([df.iloc[i,1],df.iloc[i,2]])
19+
20+
21+
mp.plot([i[0] for i in avg],[i[1] for i in avg],'go--')
22+
mp.xlabel("Number of Input")
23+
mp.ylabel("Time Taken")
24+
mp.title("Longest Common Subsequence")
25+
mp.legend()
26+
mp.grid(True,color='k')

0 commit comments

Comments
 (0)