<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE article  PUBLIC "-//NLM//DTD Journal Publishing DTD v3.0 20080202//EN" "http://dtd.nlm.nih.gov/publishing/3.0/journalpublishing3.dtd"><article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" dtd-version="3.0" xml:lang="en" article-type="research article"><front><journal-meta><journal-id journal-id-type="publisher-id">AM</journal-id><journal-title-group><journal-title>Applied Mathematics</journal-title></journal-title-group><issn pub-type="epub">2152-7385</issn><publisher><publisher-name>Scientific Research Publishing</publisher-name></publisher></journal-meta><article-meta><article-id pub-id-type="doi">10.4236/am.2015.612174</article-id><article-id pub-id-type="publisher-id">AM-61023</article-id><article-categories><subj-group subj-group-type="heading"><subject>Articles</subject></subj-group><subj-group subj-group-type="Discipline-v2"><subject>Physics&amp;Mathematics</subject></subj-group></article-categories><title-group><article-title>
 
 
  An Algorithm to Generate Probabilities with Specified Entropy
 
</article-title></title-group><contrib-group><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>m</surname><given-names>Parkash</given-names></name><xref ref-type="aff" rid="aff1"><sup>1</sup></xref></contrib><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Priyanka</surname><given-names>Kakkar</given-names></name><xref ref-type="aff" rid="aff1"><sup>1</sup></xref></contrib></contrib-group><aff id="aff1"><addr-line>Department of Mathematics, Guru Nanak Dev University, Amritsar, India</addr-line></aff><pub-date pub-type="epub"><day>09</day><month>11</month><year>2015</year></pub-date><volume>06</volume><issue>12</issue><fpage>1968</fpage><lpage>1976</lpage><history><date date-type="received"><day>8</day>	<month>September</month>	<year>2015</year></date><date date-type="rev-recd"><day>accepted</day>	<month>8</month>	<year>November</year>	</date><date date-type="accepted"><day>11</day>	<month>November</month>	<year>2015</year></date></history><permissions><copyright-statement>&#169; Copyright  2014 by authors and Scientific Research Publishing Inc. </copyright-statement><copyright-year>2014</copyright-year><license><license-p>This work is licensed under the Creative Commons Attribution International License (CC BY). http://creativecommons.org/licenses/by/4.0/</license-p></license></permissions><abstract><p>
 
 
  The present communication offers a method to determine an unknown discrete probability distribution with specified Tsallis entropy close to uniform distribution. The relative error of the distribution obtained has been compared with the distribution obtained with the help of mathematica software. The applications of the proposed algorithm with respect to Tsallis source coding, Huffman coding and cross entropy optimization principles have been provided.
 
</p></abstract><kwd-group><kwd>Entropy</kwd><kwd> Source Coding</kwd><kwd> Kraft’s Inequality</kwd><kwd> Huffman Code</kwd><kwd> Mean Codeword Length</kwd><kwd> Uniquely Decipherable Code</kwd></kwd-group></article-meta></front><body><sec id="s1"><title>1. Introduction</title><p>After the publication of his first paper “A mathematical theory of communication”, Shannon [<xref ref-type="bibr" rid="scirp.61023-ref1">1</xref>] made a remarkable discovery of entropy theory which immediately caught the interest of engineers, mathematicians and other scientists from various disciplines. Naturally one had speculated before Shannon about the nature of information but at the qualitative level but it was Shannon who for the first time introduced the following quantitative measure of information in a statistical framework:</p><disp-formula id="scirp.61023-formula363"><label>(1)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/2-7402894x6.png"  xlink:type="simple"/></disp-formula><p>with the convention<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x7.png" xlink:type="simple"/></inline-formula>.</p><p>Shannon’s main focus was related with the type of communication problems related with engineering sciences but as the field of information theory progressed, it became clear that Shannon ’s entropy was not the only feasible information measure. Indeed, many modern communication processes, including signals, images and coding systems, often operate in complex environments dominated by conditions that do not match the basic tenets of Shannon ’s communication theory. For instance, coding can have a non-trivial cost functions, codes might have variable lengths, sources and channels may exhibit memory or losses, etc. Post-Shannon developments of non-parametric entropy, it was realized that generalized parametric measures of entropy can play a significant role to deal with the prevailing situations, since these measures introduce flexibility in the system and also helpful towards maximization problems.</p><p>An extension to the Shannon entropy proposed by Renyi [<xref ref-type="bibr" rid="scirp.61023-ref2">2</xref>] , is given by</p><disp-formula id="scirp.61023-formula364"><label>(2)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/2-7402894x8.png"  xlink:type="simple"/></disp-formula><p>The Renyi entropy offers a parametric family of measures, from which the Shannon entropy is accessible as a special case when<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x9.png" xlink:type="simple"/></inline-formula>.</p><p>Another information theorist Tsallis [<xref ref-type="bibr" rid="scirp.61023-ref3">3</xref>] introduced his measure of entropy, given by</p><disp-formula id="scirp.61023-formula365"><label>(3)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/2-7402894x10.png"  xlink:type="simple"/></disp-formula><p>When q → 1, the Tsallis entropy recovers the Shannon entropy for any probability distribution. The Tsallis [<xref ref-type="bibr" rid="scirp.61023-ref4">4</xref>] entropy has been postulated to form the ground of a nonextensive generalization to statistical mechanics. Tsallis pioneering work has stimulated the exploration of the properties of other generalized or alternative information measures [<xref ref-type="bibr" rid="scirp.61023-ref5">5</xref>] [<xref ref-type="bibr" rid="scirp.61023-ref6">6</xref>] . Oikonomou and Bagci [<xref ref-type="bibr" rid="scirp.61023-ref7">7</xref>] maximized the Tsallis entropy based on complete deformed functions to show that the escort distributions are redundant. Bercher [<xref ref-type="bibr" rid="scirp.61023-ref8">8</xref>] showed that Tsallis distributions can be derived from the standard (Shannon) maximum entropy setting, by incorporating a constraint on the divergence between the distribution and another distribution imagined as its tail.</p><p>Information theory provides a fundamental performance limits pertaining to certain tasks of information pro- cessing, such as data compression, error-correction coding, encryption, data hiding, prediction, and estimation of signals or parameters from noisy observations. Shannon [<xref ref-type="bibr" rid="scirp.61023-ref1">1</xref>] provided an operational meaning to his entropy through a source coding theorem by establishing the limits to possible data compression. Bercher [<xref ref-type="bibr" rid="scirp.61023-ref9">9</xref>] discussed the interest of escort distributions and R&#233;nyi entropy in the context of source coding whereas Parkash and Kakkar [<xref ref-type="bibr" rid="scirp.61023-ref10">10</xref>] developed new mean codeword lengths and proved source coding theorems. Huffman [<xref ref-type="bibr" rid="scirp.61023-ref11">11</xref>] introduced a procedure for designing a variable length source code which achieves performance close to Shannon’s entropy bound. Baer [<xref ref-type="bibr" rid="scirp.61023-ref12">12</xref>] provided new lower and upper bounds for the compression rate of binary prefix codes optimized over memoryless sources. Mohajer et al. [<xref ref-type="bibr" rid="scirp.61023-ref13">13</xref>] studied the redundancy of Huffman codes whereas Walder et al. [<xref ref-type="bibr" rid="scirp.61023-ref14">14</xref>] provided algorithms for fast decoding of variable length codes.</p><p>In Section 2, we have provided an algorithm to find a discrete distribution closer to uniform distribution with specified Tsallis [<xref ref-type="bibr" rid="scirp.61023-ref3">3</xref>] entropy. We have proved the acceptability of the algorithm by comparing the relative error of the probability distribution generated through algorithm with the probability distribution generated through Mathematica software through an example. Section 3 provides the brief introduction to source coding and the study of source coding with the Tsallis entropy. Also, we have extended the applications of the algorithm with respect to Tsallis source coding, Huffman coding and cross entropy optimization principles.</p></sec><sec id="s2"><title>2. Generating Probability Distribution Closer to Uniform Distribution with Known Entropy</title><p>Tsallis introduced the generalized q-logarithm function is defined as</p><disp-formula id="scirp.61023-formula366"><label>(4)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/2-7402894x11.png"  xlink:type="simple"/></disp-formula><p>which for<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x12.png" xlink:type="simple"/></inline-formula>, becomes the common natural logarithm. Its inverse is the generalized q-exponential function, given by</p><disp-formula id="scirp.61023-formula367"><label>(5)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/2-7402894x13.png"  xlink:type="simple"/></disp-formula><p>which becomes the exponential function for<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x14.png" xlink:type="simple"/></inline-formula>.</p><p>The q-logarithm satisfies the following pseudo additive law</p><disp-formula id="scirp.61023-formula368"><label>(6)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/2-7402894x15.png"  xlink:type="simple"/></disp-formula><p>It is to be noted that the classical power and the additive laws for the logarithm and exponential do no longer hold for (4) and (6). Except for<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x16.png" xlink:type="simple"/></inline-formula>, in general <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x17.png" xlink:type="simple"/></inline-formula></p><p>The Tsallis entropy (3) can be written as an expectation of the generalized q-logarithm as</p><disp-formula id="scirp.61023-formula369"><graphic  xlink:href="http://html.scirp.org/file/2-7402894x18.png"  xlink:type="simple"/></disp-formula><p>Let us suppose that there are <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x19.png" xlink:type="simple"/></inline-formula> probabilities to be found. Separating the <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x20.png" xlink:type="simple"/></inline-formula> probability and renaming it<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x20.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x21.png" xlink:type="simple"/></inline-formula>, that is, <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x20.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x21.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x22.png" xlink:type="simple"/></inline-formula>, we have</p><disp-formula id="scirp.61023-formula370"><graphic  xlink:href="http://html.scirp.org/file/2-7402894x23.png"  xlink:type="simple"/></disp-formula><p>Multiplying and dividing by <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x24.png" xlink:type="simple"/></inline-formula> (assuming<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x24.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x25.png" xlink:type="simple"/></inline-formula>, that is,<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x24.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x25.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x26.png" xlink:type="simple"/></inline-formula>) yields</p><disp-formula id="scirp.61023-formula371"><graphic  xlink:href="http://html.scirp.org/file/2-7402894x27.png"  xlink:type="simple"/></disp-formula><p>Defining<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x28.png" xlink:type="simple"/></inline-formula>, the above expression can be written as</p><disp-formula id="scirp.61023-formula372"><label>(7)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/2-7402894x29.png"  xlink:type="simple"/></disp-formula><p>Since <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x30.png" xlink:type="simple"/></inline-formula> form a full set of probabilities, we have<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x30.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x31.png" xlink:type="simple"/></inline-formula>.Thus, the above expression (7) becomes</p><disp-formula id="scirp.61023-formula373"><label>(8)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/2-7402894x32.png"  xlink:type="simple"/></disp-formula><p>where <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x33.png" xlink:type="simple"/></inline-formula> is the expression for Tsallis entropy of the <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x33.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x34.png" xlink:type="simple"/></inline-formula>-ary vector r and <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x33.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x34.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x35.png" xlink:type="simple"/></inline-formula> is the binary entropy function</p><disp-formula id="scirp.61023-formula374"><graphic  xlink:href="http://html.scirp.org/file/2-7402894x36.png"  xlink:type="simple"/></disp-formula><p>Rearranging the terms in Equation (8) gives</p><disp-formula id="scirp.61023-formula375"><label>(9)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/2-7402894x37.png"  xlink:type="simple"/></disp-formula><p>Thus,</p><disp-formula id="scirp.61023-formula376"><label>(10)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/2-7402894x38.png"  xlink:type="simple"/></disp-formula><p>where <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x39.png" xlink:type="simple"/></inline-formula></p><p>The maximum value of Tsallis entropy subject to natural constraint, that is, <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x40.png" xlink:type="simple"/></inline-formula>is given by</p><disp-formula id="scirp.61023-formula377"><graphic  xlink:href="http://html.scirp.org/file/2-7402894x41.png"  xlink:type="simple"/></disp-formula><p>which is obtained at uniform distribution<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x42.png" xlink:type="simple"/></inline-formula>.</p><p>So, we have</p><disp-formula id="scirp.61023-formula378"><graphic  xlink:href="http://html.scirp.org/file/2-7402894x43.png"  xlink:type="simple"/></disp-formula><p>In a similar way, <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x44.png" xlink:type="simple"/></inline-formula>, being the entropy of <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x44.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x45.png" xlink:type="simple"/></inline-formula> variables with the probability vector r must satisfy</p><disp-formula id="scirp.61023-formula379"><graphic  xlink:href="http://html.scirp.org/file/2-7402894x46.png"  xlink:type="simple"/></disp-formula><p>Hence, <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x47.png" xlink:type="simple"/></inline-formula>must satisfy the requirements</p><disp-formula id="scirp.61023-formula380"><label>(11)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/2-7402894x48.png"  xlink:type="simple"/></disp-formula><disp-formula id="scirp.61023-formula381"><label>(12)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/2-7402894x49.png"  xlink:type="simple"/></disp-formula><p>The objective of present paper is to find <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x50.png" xlink:type="simple"/></inline-formula> subject to conditions (11) and (12) so as to obtain next stage entropy<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x50.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x51.png" xlink:type="simple"/></inline-formula>, that is,<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x50.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x51.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x52.png" xlink:type="simple"/></inline-formula>. It is to be noted that the next iteration’s entropy<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x50.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x51.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x52.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x53.png" xlink:type="simple"/></inline-formula>, may be larger or</p><p>smaller than<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x54.png" xlink:type="simple"/></inline-formula>. The procedure may be iterated until only two variables remain, <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x54.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x55.png" xlink:type="simple"/></inline-formula>and<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x54.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x55.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x56.png" xlink:type="simple"/></inline-formula>. The remaining</p><p>entropy for these normalized variables, <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x57.png" xlink:type="simple"/></inline-formula>satisfies the usual binary entropy function</p><disp-formula id="scirp.61023-formula382"><label>(13)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/2-7402894x58.png"  xlink:type="simple"/></disp-formula><p>To finish the selection of the<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x59.png" xlink:type="simple"/></inline-formula>, take <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x59.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x60.png" xlink:type="simple"/></inline-formula> and <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x59.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x60.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x61.png" xlink:type="simple"/></inline-formula> as one of the two solutions of (13). The set of scaled values <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x59.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x60.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x61.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x62.png" xlink:type="simple"/></inline-formula> through <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x59.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x60.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x61.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x62.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x63.png" xlink:type="simple"/></inline-formula> is obtained at the end. Swaszek and Wali [<xref ref-type="bibr" rid="scirp.61023-ref15">15</xref>] made use of Shannon’s entropy and to find the probability distribution for the same, provided the following relation between<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x59.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x60.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x61.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x62.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x63.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x64.png" xlink:type="simple"/></inline-formula>’s and<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x59.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x60.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x61.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x62.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x63.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x64.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x65.png" xlink:type="simple"/></inline-formula>’s after recursing through the sequential definitions of r vectors.</p><disp-formula id="scirp.61023-formula383"><label>(14)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/2-7402894x66.png"  xlink:type="simple"/></disp-formula><p>We also use relation (14) to find probability distribution <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x67.png" xlink:type="simple"/></inline-formula> for Tsallis entropy which is close to uniform distribution.</p><sec id="s2_1"><title>2.1. Method A</title><p>1) For given<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x68.png" xlink:type="simple"/></inline-formula>, find the solutions of the following equation <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x68.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x69.png" xlink:type="simple"/></inline-formula></p><p>2) Pick the solution <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x70.png" xlink:type="simple"/></inline-formula> that lies in<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x70.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x71.png" xlink:type="simple"/></inline-formula>.</p><p>3) Generate the random number <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x72.png" xlink:type="simple"/></inline-formula> in the interval <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x72.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x73.png" xlink:type="simple"/></inline-formula> for which<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x72.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x73.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x74.png" xlink:type="simple"/></inline-formula>.</p><p>4) Repeat the above three steps for<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x75.png" xlink:type="simple"/></inline-formula>.</p><p>5) For<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x76.png" xlink:type="simple"/></inline-formula>, solve Equation (13) for getting <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x76.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x77.png" xlink:type="simple"/></inline-formula> and<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x76.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x77.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x78.png" xlink:type="simple"/></inline-formula>.</p><p>6) Take <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x79.png" xlink:type="simple"/></inline-formula> and<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x79.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x80.png" xlink:type="simple"/></inline-formula>.</p><p>7) Use equation (14) to get probability distribution <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x81.png" xlink:type="simple"/></inline-formula> closer to uniform distriburtion.</p><p>Note: Before specifying the value of parameter q and entropy<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x82.png" xlink:type="simple"/></inline-formula>, make sure to choose that value of q for which value given entropy is less than or equal to its maximum value which is obtained at uniform distribution, that is,</p><p><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x83.png" xlink:type="simple"/></inline-formula>.</p></sec><sec id="s2_2"><title>2.2. Numerical</title><p>Let<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x84.png" xlink:type="simple"/></inline-formula>. Applying above method gives <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x84.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x85.png" xlink:type="simple"/></inline-formula> and<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x84.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x85.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x86.png" xlink:type="simple"/></inline-formula>. Proceeding on similar lines, we obtain remaining probabilities as depicted in the following <xref ref-type="table" rid="table1">Table 1</xref>.</p><p>Note that the values <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x87.png" xlink:type="simple"/></inline-formula> and <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x87.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x88.png" xlink:type="simple"/></inline-formula> do not lie in the neighbourhood of <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x87.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x88.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x89.png" xlink:type="simple"/></inline-formula> because they are exact solutions of</p><p>equation of (13) and hence is the case for the values <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x90.png" xlink:type="simple"/></inline-formula> and<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x90.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x91.png" xlink:type="simple"/></inline-formula>. With this exception, the other values, that is, <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x90.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x91.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x92.png" xlink:type="simple"/></inline-formula>are very close to the uniform distribution and the associated entropy is 4.5 bits.</p></sec><sec id="s2_3"><title>2.3. Use of Mathematica Software</title><p>The above mentioned problem is also solved using the Mathematica software by using the same input. NMinimize command is used for this purpose which has several inbuilt optimization methods available. Since the problem is to find the discrete distribution <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x93.png" xlink:type="simple"/></inline-formula> having a specific Tsallis entropy closer to the</p><p>discrete uniform distribution<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x94.png" xlink:type="simple"/></inline-formula>, therefore the optimization problem becomes:</p><p>Minimize <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x95.png" xlink:type="simple"/></inline-formula> subject to constraints</p><disp-formula id="scirp.61023-formula384"><graphic  xlink:href="http://html.scirp.org/file/2-7402894x96.png"  xlink:type="simple"/></disp-formula><table-wrap id="table1" ><label><xref ref-type="table" rid="table1">Table 1</xref></label><caption><title> Probabilities obtained through method A</title></caption><table><tbody><thead><tr><th align="center" valign="middle" >n</th><th align="center" valign="middle" >q</th><th align="center" valign="middle" ><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x97.png" xlink:type="simple"/></inline-formula></th><th align="center" valign="middle" ><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x98.png" xlink:type="simple"/></inline-formula></th><th align="center" valign="middle" ><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x99.png" xlink:type="simple"/></inline-formula></th></tr></thead><tr><td align="center" valign="middle" >8</td><td align="center" valign="middle" >0.3</td><td align="center" valign="middle" >4.5</td><td align="center" valign="middle" >q<sub>8</sub> = 0.109755</td><td align="center" valign="middle" >p<sub>8</sub> = 0.109755</td></tr><tr><td align="center" valign="middle" >7</td><td align="center" valign="middle" >0.3</td><td align="center" valign="middle" >3.94803</td><td align="center" valign="middle" >q<sub>7</sub> = 0.139772</td><td align="center" valign="middle" >p<sub>7</sub> = 0.124431</td></tr><tr><td align="center" valign="middle" >6</td><td align="center" valign="middle" >0.3</td><td align="center" valign="middle" >3.36823</td><td align="center" valign="middle" >q<sub>6</sub> = 0.14697</td><td align="center" valign="middle" >p<sub>6</sub> = 0.112552</td></tr><tr><td align="center" valign="middle" >5</td><td align="center" valign="middle" >0.3</td><td align="center" valign="middle" >2.75961</td><td align="center" valign="middle" >q<sub>5</sub> = 0.172774</td><td align="center" valign="middle" >p<sub>5</sub> = 0.112867</td></tr><tr><td align="center" valign="middle" >4</td><td align="center" valign="middle" >0.3</td><td align="center" valign="middle" >2.11183</td><td align="center" valign="middle" >q<sub>4</sub> = 0.201015</td><td align="center" valign="middle" >p<sub>4</sub> = 0.108628</td></tr><tr><td align="center" valign="middle" >3</td><td align="center" valign="middle" >0.3</td><td align="center" valign="middle" >1.41409</td><td align="center" valign="middle" >q<sub>3</sub> = 0.281574</td><td align="center" valign="middle" >p<sub>3</sub> = 0.121574</td></tr><tr><td align="center" valign="middle" >2</td><td align="center" valign="middle" >0.3</td><td align="center" valign="middle" >0.631956</td><td align="center" valign="middle" >q<sub>2</sub> = 0.921147 q<sub>1</sub> = 0.0788534</td><td align="center" valign="middle" >p<sub>2</sub> = 0.285733 p<sub>1</sub> = 0.0244598</td></tr></tbody></table></table-wrap><disp-formula id="scirp.61023-formula385"><graphic  xlink:href="http://html.scirp.org/file/2-7402894x100.png"  xlink:type="simple"/></disp-formula><disp-formula id="scirp.61023-formula386"><graphic  xlink:href="http://html.scirp.org/file/2-7402894x101.png"  xlink:type="simple"/></disp-formula><p>The solution obtained is <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x102.png" xlink:type="simple"/></inline-formula> for<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x102.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x103.png" xlink:type="simple"/></inline-formula>.</p></sec><sec id="s2_4"><title>2.4. Relative Errors</title><p>The relative error is calculated using the formula<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x104.png" xlink:type="simple"/></inline-formula>. It is found that relative error in case of probabi-</p><p>lity distribution found by mathematica software is <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x105.png" xlink:type="simple"/></inline-formula> whereas it is <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x105.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x106.png" xlink:type="simple"/></inline-formula> in case of method A. This implies that method A provides an acceptable discrete distribution and hence the method itself is acceptable.</p></sec></sec><sec id="s3"><title>3. Source Coding</title><p>In source coding, one considers a set of symbols <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x107.png" xlink:type="simple"/></inline-formula> and a source that produces symbols <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x107.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x108.png" xlink:type="simple"/></inline-formula></p><p>from X with probabilities <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x109.png" xlink:type="simple"/></inline-formula> where<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x109.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x110.png" xlink:type="simple"/></inline-formula>. The aim of source coding is to encode the source using an al-</p><p>phabet of size D, that is to map each symbol <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x111.png" xlink:type="simple"/></inline-formula> to a codeword <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x111.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x112.png" xlink:type="simple"/></inline-formula> of length <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x111.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x112.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x113.png" xlink:type="simple"/></inline-formula> expressed using the D letters of the alphabet. It is known that if the set of lengths <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x111.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x112.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x113.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x114.png" xlink:type="simple"/></inline-formula> satisfies the Kraft’s [<xref ref-type="bibr" rid="scirp.61023-ref16">16</xref>] inequality</p><disp-formula id="scirp.61023-formula387"><label>, (15)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/2-7402894x115.png"  xlink:type="simple"/></disp-formula><p>then there exists a uniquely decodable code with these lengths, which means that any sequence <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x116.png" xlink:type="simple"/></inline-formula> can be decoded unambiguously into a sequence of symbols <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x116.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x117.png" xlink:type="simple"/></inline-formula> Furthermore, any uniquely decodable code satisfies the Kraft’s inequality (15).</p><p>The Shannon [<xref ref-type="bibr" rid="scirp.61023-ref1">1</xref>] source coding theorem indicates that the mean codeword length</p><disp-formula id="scirp.61023-formula388"><label>(16)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/2-7402894x118.png"  xlink:type="simple"/></disp-formula><p>is bounded below by the entropy of the source, that is, Shannon’s entropy<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x119.png" xlink:type="simple"/></inline-formula>, and that the best uniquely decodable code satisfies</p><disp-formula id="scirp.61023-formula389"><graphic  xlink:href="http://html.scirp.org/file/2-7402894x120.png"  xlink:type="simple"/></disp-formula><p>where the logarithm in the definition of the Shannon entropy is taken in base D. This result indicates that the Shannon entropy <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x121.png" xlink:type="simple"/></inline-formula> is the fundamental limit on the minimum average length for any code constructed for the source. The lengths of the individual codewords, are given by</p><disp-formula id="scirp.61023-formula390"><label>. (17)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/2-7402894x122.png"  xlink:type="simple"/></disp-formula><p>The characteristic of these optimum codes is that they assign the shorter codewords to the most likely symbols and the longer codewords to unlikely symbols.</p>Source Coding with Campbell Measure of Length<p>Implicit in the use of average codeword length (16) as a criteria of performance is the assumption that cost varies linearly with code length. But this is not always the case. Campbell [<xref ref-type="bibr" rid="scirp.61023-ref17">17</xref>] introduced the mean codeword length which implies that cost is an exponential function of code length. The cost of encoding the source is expressed by the exponential average</p><disp-formula id="scirp.61023-formula391"><label>(18)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/2-7402894x123.png"  xlink:type="simple"/></disp-formula><p>where <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x124.png" xlink:type="simple"/></inline-formula> is some parameter related to cost.</p><p>Minimizing the cost is equivalent to minimizing the monotonic increasing function of <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x125.png" xlink:type="simple"/></inline-formula> defined as</p><disp-formula id="scirp.61023-formula392"><graphic  xlink:href="http://html.scirp.org/file/2-7402894x126.png"  xlink:type="simple"/></disp-formula><p>So, <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x127.png" xlink:type="simple"/></inline-formula>is the exponentiated mean codeword length given by Campbell [<xref ref-type="bibr" rid="scirp.61023-ref12">12</xref>] which approaches to L as<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x127.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x128.png" xlink:type="simple"/></inline-formula>.</p><p>Campbell proved that Renyi [<xref ref-type="bibr" rid="scirp.61023-ref2">2</xref>] entropy forms a lower bound to the exponentiated codeword length <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x129.png" xlink:type="simple"/></inline-formula> as</p><disp-formula id="scirp.61023-formula393"><label>(19)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/2-7402894x130.png"  xlink:type="simple"/></disp-formula><p>where <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x131.png" xlink:type="simple"/></inline-formula> or equivalently</p><disp-formula id="scirp.61023-formula394"><label>(20)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/2-7402894x132.png"  xlink:type="simple"/></disp-formula><p>subject to Kraft’s inequality (15) with optimal lengths given by</p><disp-formula id="scirp.61023-formula395"><label>(21)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/2-7402894x133.png"  xlink:type="simple"/></disp-formula><p>By choosing a smaller value of<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x134.png" xlink:type="simple"/></inline-formula>, the individual lengths can be made smaller than the Shannon lengths<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x134.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x135.png" xlink:type="simple"/></inline-formula>, specially for small<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x134.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x135.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x136.png" xlink:type="simple"/></inline-formula>.</p><p>Similar approach is applied to provide an operational significane to Tsallis [<xref ref-type="bibr" rid="scirp.61023-ref3">3</xref>] entropy through a source coding problem.</p><p>From Renyi’s entropy of order <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x137.png" xlink:type="simple"/></inline-formula> where logarithm is taken to the base D, we have</p><disp-formula id="scirp.61023-formula396"><label>(22)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/2-7402894x138.png"  xlink:type="simple"/></disp-formula><p>Substituting (22) in (3) where parameter q is replaced by <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x139.png" xlink:type="simple"/></inline-formula> gives</p><disp-formula id="scirp.61023-formula397"><graphic  xlink:href="http://html.scirp.org/file/2-7402894x140.png"  xlink:type="simple"/></disp-formula><p>or equivalently</p><disp-formula id="scirp.61023-formula398"><label>(23)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/2-7402894x141.png"  xlink:type="simple"/></disp-formula><p>Equation (23) establishes a relation between Renyi’s entropy and Tsallis entropy.</p><p>From (20), we have</p><p><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x142.png" xlink:type="simple"/></inline-formula>where</p><p>Case-I Now, when <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x144.png" xlink:type="simple"/></inline-formula></p><disp-formula id="scirp.61023-formula399"><label>(24)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/2-7402894x145.png"  xlink:type="simple"/></disp-formula><p>Case-II when <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x146.png" xlink:type="simple"/></inline-formula></p><disp-formula id="scirp.61023-formula400"><label>(25)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/2-7402894x147.png"  xlink:type="simple"/></disp-formula><p>From (24) and (25), it is observed that Tsallis entropy <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x148.png" xlink:type="simple"/></inline-formula> forms a lower bound to <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x148.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x149.png" xlink:type="simple"/></inline-formula> which is nothing but the new generalized length and is a monotonic increasing function of<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x148.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x149.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x150.png" xlink:type="simple"/></inline-formula>. It reduces to mean codeword length L</p><p>when<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x151.png" xlink:type="simple"/></inline-formula>. The optimal codeword lengths are given by <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x151.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x152.png" xlink:type="simple"/></inline-formula> which is similar as in case of Campbell’s mean codeword length. <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x151.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x152.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x153.png" xlink:type="simple"/></inline-formula>is not an average of the type <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x151.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x152.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x153.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x154.png" xlink:type="simple"/></inline-formula> as introduced by Kolmogorov [<xref ref-type="bibr" rid="scirp.61023-ref18">18</xref>] and Nagumo [<xref ref-type="bibr" rid="scirp.61023-ref19">19</xref>] but is a simple expression of the q-deformed logarithm.</p></sec><sec id="s4"><title>4. Application of Method A</title><p>1) Huffman [<xref ref-type="bibr" rid="scirp.61023-ref11">11</xref>] introduced a method for designing variable length source code in which he showed that the average length of a Huffman code is always within one unit of source entropy, that is, <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x155.png" xlink:type="simple"/></inline-formula>where L is defined by (16) and <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x155.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x156.png" xlink:type="simple"/></inline-formula> is defined by (1). By using method A as mentioned in Section 2, different sets of probability distributions can be generated which are closer to uniform distribution and which has same Tsallis entropy. The probability distributions thus generated can be used to develop Huffman code and to see that whether the lengths of Huffman codewords satisfies relation (24) or (25) where the Tsallis entropy forms a lower bound to generalized length<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x155.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x156.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x157.png" xlink:type="simple"/></inline-formula>. Thus, performance of Huffman algorithm can be judged in case of source coding with Tsallis entropy.</p><p>In the following example, Huffman code is constructed using the probability distribution obtained in <xref ref-type="table" rid="table1">Table 1</xref>. Let <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x158.png" xlink:type="simple"/></inline-formula> be an array of symbols with probabilities in decreasing order as shown below where Huffman method is employed to construct an optimal code.</p><disp-formula id="scirp.61023-formula401"><graphic  xlink:href="http://html.scirp.org/file/2-7402894x159.png"  xlink:type="simple"/></disp-formula><p>Optimal code is obtained as follows</p><disp-formula id="scirp.61023-formula402"><graphic  xlink:href="http://html.scirp.org/file/2-7402894x160.png"  xlink:type="simple"/></disp-formula><p>Hence the optimal code is <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x161.png" xlink:type="simple"/></inline-formula> and the lengths of the codewords are<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x161.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x162.png" xlink:type="simple"/></inline-formula>.</p><p>So, using the probability distribution generated in <xref ref-type="table" rid="table1">Table 1</xref> along with known value of <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x163.png" xlink:type="simple"/></inline-formula> and above mentioned codeword lengths, value of <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x163.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/2-7402894x164.png" xlink:type="simple"/></inline-formula> is obtained as 6.2327 which is greater that Tsallis entropy (=4.5 bits), thus satisfies relation (24).</p><p>2) The problem of determining an unknown discrete distribution closer to uniform distribution with known Tsallis entropy as discussed in Section 2 can be looked upon as minimum cross entropy principle which states that given any priori distribution, we should choose that distribution which satisfies the given constraints and which is closest to priori distribution. So, cross entropy optimization principles offer a relevant context for the application of method A.</p></sec><sec id="s5"><title>Acknowledgements</title><p>The authors are thankful to University Grants Commission and Council of Scientific and Industrial Research, New Delhi, for providing the financial assistance for the preparation of the manuscript.</p></sec><sec id="s6"><title>Cite this paper</title><p>OmParkash,PriyankaKakkar, (2015) An Algorithm to Generate Probabilities with Specified Entropy. Applied Mathematics,06,1968-1976. doi: 10.4236/am.2015.612174</p></sec></body><back><ref-list><title>References</title><ref id="scirp.61023-ref1"><label>1</label><mixed-citation publication-type="other" xlink:type="simple">Shannon, C.E. (1948) A Mathematical Theory of Communication. Bell System Technical Journal, 27, 379-423.  
http://dx.doi.org/10.1002/j.1538-7305.1948.tb01338.x</mixed-citation></ref><ref id="scirp.61023-ref2"><label>2</label><mixed-citation publication-type="journal" xlink:type="simple"><name name-style="western"><surname>Renyi</surname><given-names> A. </given-names></name>,<etal>et al</etal>. (<year>1961</year>)<article-title>On Measures of Entropy and Information</article-title><source> Proceedings of the 4th Berkeley Symposium on Mathematical Statistics and Probability</source><volume> 1</volume>,<fpage> 547</fpage>-<lpage>561</lpage>.<pub-id pub-id-type="doi"></pub-id></mixed-citation></ref><ref id="scirp.61023-ref3"><label>3</label><mixed-citation publication-type="other" xlink:type="simple">Tsallis, C. (1988) Possible Generalization of Boltzmann-Gibbs Statistics. Journal of Statistical Physics, 52, 479-487.  
http://dx.doi.org/10.1007/BF01016429</mixed-citation></ref><ref id="scirp.61023-ref4"><label>4</label><mixed-citation publication-type="other" xlink:type="simple">Tsallis, C. (2009) Introduction to Nonextensive Statistical Mechanics. Springer, New York.</mixed-citation></ref><ref id="scirp.61023-ref5"><label>5</label><mixed-citation publication-type="other" xlink:type="simple">Papa, A.R.R. (1998) On One-Parameter-Dependent Generalizations of Boltzmann Gibbs Statistical Mechanics. Journal of Physics A: Mathematical and General, 31, 5271-5276. http://dx.doi.org/10.1088/0305-4470/31/23/009</mixed-citation></ref><ref id="scirp.61023-ref6"><label>6</label><mixed-citation publication-type="other" xlink:type="simple">Abe, S. (1997) A Note on the q-Deformation-Theoretic Aspect of the Generalized Entropies in Nonextensive Physics. Physics Letters A, 224, 326-330. http://dx.doi.org/10.1016/S0375-9601(96)00832-8</mixed-citation></ref><ref id="scirp.61023-ref7"><label>7</label><mixed-citation publication-type="other" xlink:type="simple">Oikonomou, T. and Bagci, G.B. (2010) The Maximization of Tsallis Entropy with Complete Deformed Functions and the Problem of Constraints. Physics Letters A, 374, 2225-2229. http://dx.doi.org/10.1016/j.physleta.2010.03.038</mixed-citation></ref><ref id="scirp.61023-ref8"><label>8</label><mixed-citation publication-type="other" xlink:type="simple">Bercher, J.F. (2008) Tsallis Distribution as a Standard Maximum Entropy Solution with “Tail” Constraint. Physics Letters A, 372, 5657-5659. http://dx.doi.org/10.1016/j.physleta.2008.06.088</mixed-citation></ref><ref id="scirp.61023-ref9"><label>9</label><mixed-citation publication-type="other" xlink:type="simple">Bercher, J.F. (2009) Source Coding with Escort Distributions and Renyi Entropy Bounds. Physics Letters A, 373, 3235-3238. http://dx.doi.org/10.1016/j.physleta.2009.07.015</mixed-citation></ref><ref id="scirp.61023-ref10"><label>10</label><mixed-citation publication-type="other" xlink:type="simple">Parkash, O. and Kakkar, P. (2012) Development of Two New Mean Codeword Lengths. Information Sciences, 207, 90-97. http://dx.doi.org/10.1016/j.ins.2012.04.020</mixed-citation></ref><ref id="scirp.61023-ref11"><label>11</label><mixed-citation publication-type="other" xlink:type="simple">Huffman, D.A. (1952) A Method for the Construction of Minimum Redundancy Codes. Proceedings of the IRE, 40, 1098-1101. http://dx.doi.org/10.1109/JRPROC.1952.273898</mixed-citation></ref><ref id="scirp.61023-ref12"><label>12</label><mixed-citation publication-type="other" xlink:type="simple">Baer, M.B. (2011) Redundancy-Related Bounds for Generalized Huffman Codes. IEEE Transactions on Information Theory, 57, 2278-2290. http://dx.doi.org/10.1109/TIT.2011.2110670</mixed-citation></ref><ref id="scirp.61023-ref13"><label>13</label><mixed-citation publication-type="other" xlink:type="simple">Mohajer, S., Pakzad, P. and Kakhbod, A. (2012) Tight Bounds on the Redundancy of Huffman Codes. IEEE Transactions on Information Theory, 58, 6737-6746. http://dx.doi.org/10.1109/TIT.2012.2208580</mixed-citation></ref><ref id="scirp.61023-ref14"><label>14</label><mixed-citation publication-type="other" xlink:type="simple">Walder, J., Kratky, M., Baca, R., Platos, J. and Snasel, V. (2012) Fast Decoding Algorithms for Variable-Lengths Codes. Information Sciences, 183, 66-91. http://dx.doi.org/10.1016/j.ins.2011.06.019</mixed-citation></ref><ref id="scirp.61023-ref15"><label>15</label><mixed-citation publication-type="other" xlink:type="simple">Swaszek, P.F. and Wali, S. (2000) Generating Probabilities with Specified Entropy. Journal of the Franklin Institute, 337, 97-103. http://dx.doi.org/10.1016/S0016-0032(00)00010-7</mixed-citation></ref><ref id="scirp.61023-ref16"><label>16</label><mixed-citation publication-type="other" xlink:type="simple">Kraft, L.G. (1949) A Device for Quantizing Grouping and Coding Amplitude Modulated Pulses. M.S. Thesis, Electrical Engineering Department, MIT.</mixed-citation></ref><ref id="scirp.61023-ref17"><label>17</label><mixed-citation publication-type="other" xlink:type="simple">Campbell, L.L. (1965) A Coding Theorem and Renyi’s Entropy. Information and Control, 8, 423-429.  
http://dx.doi.org/10.1016/S0019-9958(65)90332-3</mixed-citation></ref><ref id="scirp.61023-ref18"><label>18</label><mixed-citation publication-type="other" xlink:type="simple">Kolmogorov, A. (1930) Sur la notion de la moyenne. Atti R. Accad. Naz. Lincei, 12, 388.</mixed-citation></ref><ref id="scirp.61023-ref19"><label>19</label><mixed-citation publication-type="journal" xlink:type="simple"><name name-style="western"><surname>Nagumo</surname><given-names> M. </given-names></name>,<etal>et al</etal>. (<year>1930</year>)<article-title>Uber eine Klasse der Mittelwerte</article-title><source> Japanese Journal of Mathematics</source><volume> 7</volume>,<fpage> 71</fpage>-<lpage>79</lpage>.<pub-id pub-id-type="doi"></pub-id></mixed-citation></ref></ref-list></back></article>