Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please Solve Problem 1 (LCS) in Python3 programming language (mandatory). Read the description first then solve the question and give the code here typed with

Please Solve Problem 1 (LCS) in Python3 programming language (mandatory).

Read the description first then solve the question and give the code here typed with proper screenshots.

IMPORTANT NOTE: You have to take input as inoput.txt file and output will come out as output.txt file. This is a must do work. Input must should be taken as input.txt and output must come as output.txt.

image text in transcribed

image text in transcribed

Problem Description: The following tasks needed to be solved by using dynamic Programming. Dynamic programming is a way of finding the optimal solution of a problem where it reduces the call of functions by storing their results in every sequence. It compares the results of every step and from the comparison finds out the optimal solution. Longest common subsequence (LCS) is such an algorithm that functions as a dynamic approach. It basically finds out the longest subsequence which is common to the given sequences. Read the task descriptions carefully and implement the algorithm using either Java or Python or any language you are comfortable with. The output format MUST match exactly as shown in each task. Problem 1 (LCS) [10 Marks): PUBGM (Player Unknown's BattleGrounds Mobile) is one of the most popular online battle royale games. PMPL (PUBGM Pro League) is the biggest tournament of south asia and Future Station a team from Bangladesh has qualified for the final round of the tournament. Magnet also known as "The zone magnet for his accuracy of in-game zone predictions is the IGL (Team leader) of the team and he predicted the zone sequence before a match in the finals. For the match of map Erangel his prediction was, Zone number Zone center Keyword 1 Y Yasnaya Pochinki 2 P 3 School S 4 Rozhok R 5 Farm F 6 Myita M 7 Shelter . 8 Prison 1 On that match the team had a very good result and actual zone sequence of that match was: Zone number Zone center Keyword Y 1 Yasnaya Rozhok 2 R 3 School S 4 P Pochinki Farm 5 F 6 Myita M 7 Shelter H 8 Prison 1 Now, you have to find out the longest common zone sequence from Magnet's prediction and actual match by using LCS (Longest Common Subsequence) algorithm. Then verify the correctness of Magnet's prediction. For correctness you will use the formula given below. Correctness = (Length of longest common zone sequence * 100) + Number of zones Note: Zone meta given here is completely fictional. Please do not match it with the real game zone meta. Hint: You have to store zone center values according to keywords first. You can use the following pseudo code of LCS algorithm. LCS(X, Y): m = c(1)-1): [1.]

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_step_2

Step: 3

blur-text-image_step3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

1. Why is cash flow so important for a new business?

Answered: 1 week ago

Question

8-2 What is the business value of security and control?

Answered: 1 week ago

Question

1. Diagnose and solve a transfer of training problem.

Answered: 1 week ago