Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Define a function MetricEntropy ( w , alphabetSize ) that computes the metric entropy of w if it is assumed that the alphabet has size

Define a function MetricEntropy (w, alphabetSize) that computes the metric entropy of w if it is assumed that the alphabet has size alphabetSize (that is |A|= alphabetSize). You must code this function for yourself and cannot use a built-in "Entropy" function.
Use MatLab
Definition 2.1 For A={a1,a2,dots,an} and Pai the probability of occurrence in winA** of ai, then metric entropy of w is given by
H(w)=-i=1nPailog(Pai)
For example, if w= AAAACCCGGT, then |w|=10,PA=410,PC=
310,PG=210, and PT=110. So then
H(w)=-(410log(410)+310log(310)+210log(210)+110log(110))=1.27985
image text in transcribed

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

MySQL/PHP Database Applications

Authors: Brad Bulger, Jay Greenspan, David Wall

2nd Edition

ISBN: 0764549634, 9780764549632

More Books

Students also viewed these Databases questions

Question

Identify the limits of our short-term memory.

Answered: 1 week ago