Giter Site home page Giter Site logo

jakewilliami / codingtheory.jl Goto Github PK

View Code? Open in Web Editor NEW
5.0 2.0 1.0 379 KB

Pure Julia implementation of tools used in Coding Theory

License: MIT License

Julia 100.00%
codewords algorithms julia coding mathematics math maths julia-language julialang julia-package coding-theory

codingtheory.jl's Introduction

CodingTheory.jl

Dev CI Code Style: Blue Project Status

This is a minimal package for a pure Julia implementation of tools used in Coding Theory. This is the science of accurately transmitting information through a noisy channel.

Background

We assume that Alice and Bob communicate by sending sequences of symbols from a finite set Σ, which we call the alphabet. We always use q to stand for the size of the set of symbols, |Σ|. A word is a sequence of symbols from the alphabet Σ. If w1w2...wn is such a word, then n is its length. We use Σn to denote the set of words with length n using symbols in Σ. In general, the number of words in Σn is

n| = qn.

Block codes are codes in which Alice transmits words of a preditermined and fixed length. A code is a subset C ⊆ Σn. The words in C are called code words. We say that n is the block length. We use M to stand for |C|, the number of code words. Alice has a set , some of which she wants to send to Bob, so she has the bijective encoding function

E : ℳ ⟶ C.

Similarly, Bob has a decoding function

D : Σn ⟶ C ∪ {?},

Where Bob uses the ? symbol when he cannot confidently decode. So if Alice wishes to communicate a message, she transmits a code word w = E(M). w may be corrupted to w' ≠ w. Then Bob can decode w' as E-1(D(w)). If Bob is not certain how to decode, then D(w') may be '?', which means that Bob can tell an error has occurred but is not certain what that error is.

If ℳ ⊆ Σk is the set of messages, then k is the message length.

A note on the number of codewords in a code

We have some algorithms brute-force searching for the codewords in a [q, n, d]-code. These algorithms are brute-force as they do not assume that q is a prime power. Therefore, they go through all possible codewords of a [q, n]-code, and narrow down the code based on d. There algorithms are namely get_codewords_greedy and get_codewords_random, both of which using get_all_codewords. The get_codewords function iterates through possibilities of get_codeword_random and chooses the maximum of those iterations or the get_codeword_greedy length. Despite the name, get_codewords is only a probably candidate. Increate the keyword argument m to decrease the likelihood that there is a code with more codewords while maintaining the bound of the distance. Furthermore, there is a get_codewords method that lists all linear combinations of rows of a generator matrix.

codingtheory.jl's People

Contributors

dmipeck avatar github-actions[bot] avatar jakewilliami avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

esabo

codingtheory.jl's Issues

Refine code-word finding capabilities

  • Do NOT load into memory all codewords. Completed in 9a58d23, by @dmipeck.1 Redone using Iterators.product in 993ec21.
  • Define a cleverer algorithm for random searching.2
  • Refine code for performance consideration.3

1 Edited and refined in 02d911c, 2f6e6c5, 3fff9d6, and 6546206.
2 The current plan is to have a kind of mutating code. The problem with the random "algorithm" (as it were) is to balance it with the first point in this issue; we do not want to load the universe into memory. See below.
3 After the bad performance with the memory efficient iterator method, we should work as much on performance (regarding time) as we can. This does not mean we need to change the algorithm, it just means we need to be careful. Edited and refined in cebcd76, a5b8d4a, 77ee159, 37f6886, 70dbc29, and 267f501. See below.

Rename src/ files

The files in src are currently not very well named. For example, fields.jl has only polynomial fields in it, where messages.jl uses a lot of concepts from linear fields.

TagBot trigger issue

This issue is used to trigger TagBot; feel free to unsubscribe.

If you haven't already, you should update your TagBot.yml to include issue comment triggers.
Please see this post on Discourse for instructions and more details.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.