Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The strings X [1 ... n] and Y [1 ... m] are given. Our goal is to convert the string X [1 ... n] to

The strings X [1 ... n] and Y [1 ... m] are given. Our goal is to convert the string X [1 ... n] to the string Y [1 ... m] with the least cost. The cost of adding a new character is K Dollars, the cost of deleting an existing character is T Dollar, and the cost of converting an x character to a y character is f (x, y) Dollar. Here K and T are given positive integers, and f (x, y) is a positive integer value function. a) Write down the recurrence required to solve the problem with dynamic programming method. b) Write the pseudo code of the algorithm you designed with dynamic programming method. c) Let K = 2, T = 1 and f (x, y) function given by the table below. (In this table, the x variable is given in the column and the y variable is given in the row.)

Calculate the minimum cost of converting the word ARABA to the word BASAR by applying the algorithm you wrote.

image text in transcribed

Please use keyboard and answer all question don't answer with missing parts

A B $ R 0 1 1 1 1 A 2 0 2 1 4 B$ 22 2 1 04 40 1 4 R 2 4 1 4 0

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: 3

blur-text-image

Ace Your Homework with AI

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

Get Started

Recommended Textbook for

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2014 Nancy France September 15 19 2014 Proceedings Part 2 Lnai 8725

Authors: Toon Calders ,Floriana Esposito ,Eyke Hullermeier ,Rosa Meo

2014th Edition

3662448505, 978-3662448502

More Books

Students also viewed these Databases questions