<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Sharon Olivia on Medium]]></title>
        <description><![CDATA[Stories by Sharon Olivia on Medium]]></description>
        <link>https://medium.com/@sharonolivia_chintala?source=rss-90b38d98305b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*Jqqn7guESixgdBKR</url>
            <title>Stories by Sharon Olivia on Medium</title>
            <link>https://medium.com/@sharonolivia_chintala?source=rss-90b38d98305b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 23:39:01 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sharonolivia_chintala/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[BURROWS-WHEELER TRANSFORMATION ALGORITHM]]></title>
            <link>https://medium.com/@sharonolivia_chintala/burrows-wheeler-transformation-algorithm-a7b13d144f58?source=rss-90b38d98305b------2</link>
            <guid isPermaLink="false">https://medium.com/p/a7b13d144f58</guid>
            <category><![CDATA[burrows-wheeler]]></category>
            <category><![CDATA[advanced-data-structures]]></category>
            <dc:creator><![CDATA[Sharon Olivia]]></dc:creator>
            <pubDate>Sat, 20 Apr 2024 16:59:12 GMT</pubDate>
            <atom:updated>2024-04-20T16:59:12.002Z</atom:updated>
            <content:encoded><![CDATA[<p>The Burrows-Wheeler Transform (BWT) is a data transformation algorithm which is used to rearrange the characters of a string in such a way that the transformed string is more compressible. Technically, it is a lexicographical reversible permutation of the characters of a string.</p><p>It is a reversible transformation meaning ,you can trace back the original string. There is no loss of data.</p><p>BWT algorithm is generally used in conjunction with Move-to-front algorithm and Huffman coding (which are data compression algorithms).</p><p>In the following reading we will talk about:<br>1. How BWT works .<br>2. Pseudocode.<br>3. Execution.<br>4. Complexity.<br>5. Real-life applications.<br>6. Challenges.<br>7. Conclusion.</p><p><strong>1.HOW BURROWS-WHEELER TRANSFORM WORKS</strong></p><p>Let’s understand the algorithm using the example input “Strange”.</p><p><strong>STEP-1: </strong>Generate the cyclic rotations of the input string</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*C-oc7iwchWG2XVkm5bJ_Xg.png" /><figcaption>List of Cyclic rotations of the input string.</figcaption></figure><p><strong>STEP-2: </strong>Sort all the cyclic rotations of the given string lexicographically.</p><p><strong>STEP-3: </strong>The last column of the matrix is taken as Burrows-wheeler Transform</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3O3uCPnCPWWHsfJliFSrJQ.png" /><figcaption>Lexicographically sorted list of the rotations of the input string.</figcaption></figure><p><strong>2.PSEUDOCODE</strong></p><p>Here, I have provided the pseudocode for BWT.</p><pre>Function burrowsWheelerTransform(text):<br>    n = length of text<br>    Create an empty array rotations of size n<br><br>    // Generate indices of cyclic rotations<br>    For i from 0 to n-1:<br>        rotations[i].index = i<br>        rotations[i].rotation = text[i:] + text[0:i]<br><br>    // Sort the indices based on the corresponding cyclic rotations using Suffix Array<br>    Sort rotations using compareSuffix function<br><br>    // Extract the last characters of each rotation<br>    Create an empty string transformedText<br>    For i from 0 to n-1:<br>        Append rotations[i].rotation[n-1] to transformedText<br><br>    Return transformedText<br><br>// Function to compare two RotationIndex objects based on their rotation strings<br>Function compareSuffix(a, b):<br>    Return a.rotation &lt; b.rotation<br></pre><p>For implementation, Below you will find a GitHub link provided which has everything in detail .</p><p><strong>3.EXECUTION</strong></p><p>Sample outputs of C++ code(I have implemented the code in C,C++ and python. Please use the GitHub link below to check them out).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*opVTk-2kBaSPWCWm1-IURg.png" /><figcaption>Primary Input</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GhGCeZXEhrU6p5i2ERs6BQ.png" /><figcaption>Secondary Input</figcaption></figure><p><strong>4. COMPLEXITY :<br></strong>Overall,<br><strong>Time Complexity</strong>: O(n*log(n))<br><strong>Space Complexity</strong>: O(n²)</p><p><strong>5. REAL-LIFE APPLICATIONS :</strong></p><p>A few applications of BWT are,</p><p><strong>Data Compression:</strong><br>BWT serves as the foundation for various compression algorithms, including the popular Burrows-Wheeler Compression (BWC) and the bzip2 utility. By exploiting redundancy and patterns in the data, BWT achieves significant compression ratios, making it indispensable in scenarios where storage or bandwidth is limited.</p><p><strong>DNA Sequencing:</strong><br>In bioinformatics, BWT plays a pivotal role in DNA sequencing algorithms. It helps in aligning sequences, identifying similarities, and detecting mutations with high efficiency and accuracy.</p><p><strong>Pattern Matching:</strong><br>BWT, coupled with the FM-index, enables efficient pattern matching in large datasets. Applications range from text searching in documents to genome analysis in bioinformatics.</p><p><strong>6. CHALLENGES:</strong><br>While BWT offers remarkable capabilities, it’s not without challenges. Scaling BWT to handle massive datasets efficiently remains a topic of ongoing research. Optimizing BWT algorithms for faster execution on modern hardware architectures remains an ongoing challenge.</p><p><strong>CONCLUSION:</strong></p><p>The Burrows-Wheeler Transform is a simple yet versatile algorithm pivotal in data compression and bioinformatics. As research progresses, the BWT continues to inspire innovation, promising new possibilities in data manipulation.</p><p>Its reversible nature ensures data integrity, while its role in genomic analysis highlights its importance in scientific research. In conclusion, the Burrows-Wheeler Transform stands as a fundamental tool, driving advancements and shaping the future of data processing.</p><p>For more understanding, you may also visit GitHub where you will find the implementation of this algorithm using C ,C++ and python . I have also provided youtube link for a detailed explanation</p><p><strong>GITHUB LINK :</strong><br><a href="https://github.com/SharonOliv/Burrow-Wheeler-s-Transform">https://github.com/SharonOliv/Burrow-Wheeler-s-Transform</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a7b13d144f58" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>