intro aux codes détecteurs et correcteurs d'erreur

This commit is contained in:
Florent Madelaine 2023-03-08 09:47:39 +01:00
parent f823733962
commit 3be82a22bc
4 changed files with 307 additions and 0 deletions

View File

@ -20,3 +20,19 @@ This is essentially a practical version of Shannon's noisy-channel coding theore
[Details here](https://en.wikipedia.org/wiki/Binary_symmetric_channel)
So in a nutshell, we can tranform a binary symmetric channel with this repetition trick into a binary symmetric chanel with an arbitrary low error rate.
It is not very practical because, it is achieved at a very high cost in terms of transmited of information compared with the actual information we wish to send.We shall therefore look for cheaper alternatives.
## Detection
If we are ready to forget about correction and concentrate on detection there is a very simple trick.
We transmit some bits of information $b_1\ldots b_n$ with *one additionnal bit*
$c$ that is computed via a very simple method from these bits, that is a certain function $f$ of $n$ arguments such that $f(b_1\ldots b_n)=c$.
At reception of some word $b'_1\ldots b'_nc'$ we check whether $f(b'_1\ldots b'_n)=c'$. If it does we assume that there is no error (we might be wrong here), it it does not we assume that there is an error and ask for retransmission of this message (we are correct here).
This is used for low level transmission of information, in particular for ascii characters (since we tend to use powers of 2 when transmitting and storing information and we have one available bit when storing the 7 bits of the ascii encoding).
[Details here](https://en.wikipedia.org/wiki/Parity_bit)

BIN
1InformationTheory.ods Normal file

Binary file not shown.

18
Grepregexp/commandes.txt Normal file
View File

@ -0,0 +1,18 @@
ls answers.txt
cd ..
ls
cd Grepregexp/
ls
more answers.txt
tail answers.txt
wc -l answers.txt
grep [^star][^star][^star][^star][^star] answers.txt
grep [^star][^star][^star][^star][^star] answers.txt | wc -l
grep [^star][^star][^star][^star][^stare] answers.txt | wc -l
grep [^star][^star][^star][^star][^stare] answers.txt
grep [^star][^star][^star][^star][^stare] answers.txt | grep e
grep [^star][^star][^star][^star][^stare] answers.txt | grep e | wc -l
grep [^star][^star][^star][^star][^stare] answers.txt | grep e | more
grep [^starpoxye][^starpoxy][^starpoxy][^starpoxy][^starepoxy] answers.txt | grep e | wc -l
grep [^starpoxye][^starpoxy][^starpoxy][^starpoxy][^starepoxy] answers.txt | grep e
grep [^starpoxyefil][^starpoxyfil][^starpoxyfile][^starpoxyfil][^starepoxyfil] answers.txt | grep e | grep d

View File

@ -0,0 +1,273 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!--Created with JFLAP 7.1.--><structure>
<type>turing</type>
<tapes>3</tapes>
<automaton>
<!--The list of states.-->
<state id="0" name="q0">
<x>358.0</x>
<y>213.0</y>
<initial/>
</state>
<state id="1" name="ret 0">
<x>642.0</x>
<y>206.0</y>
</state>
<state id="2" name="ret 1">
<x>972.0</x>
<y>206.0</y>
</state>
<state id="3" name="Halt">
<x>809.0</x>
<y>410.0</y>
<final/>
</state>
<!--The list of transitions.-->
<transition>
<from>1</from>
<to>3</to>
<read tape="1"/>
<write tape="1"/>
<move tape="1">R</move>
<read tape="2"/>
<write tape="2"/>
<move tape="2">R</move>
<read tape="3"/>
<write tape="3"/>
<move tape="3">R</move>
</transition>
<transition>
<from>1</from>
<to>2</to>
<read tape="1">1</read>
<write tape="1">1</write>
<move tape="1">L</move>
<read tape="2">1</read>
<write tape="2">1</write>
<move tape="2">L</move>
<read tape="3"/>
<write tape="3">0</write>
<move tape="3">L</move>
</transition>
<transition>
<from>0</from>
<to>0</to>
<read tape="1">1</read>
<write tape="1">1</write>
<move tape="1">R</move>
<read tape="2"/>
<write tape="2">0</write>
<move tape="2">R</move>
<read tape="3"/>
<write tape="3"/>
<move tape="3">R</move>
</transition>
<transition>
<from>1</from>
<to>1</to>
<read tape="1">0</read>
<write tape="1">0</write>
<move tape="1">L</move>
<read tape="2">0</read>
<write tape="2">0</write>
<move tape="2">L</move>
<read tape="3"/>
<write tape="3">0</write>
<move tape="3">L</move>
</transition>
<transition>
<from>0</from>
<to>0</to>
<read tape="1"/>
<write tape="1">0</write>
<move tape="1">R</move>
<read tape="2">0</read>
<write tape="2">0</write>
<move tape="2">R</move>
<read tape="3"/>
<write tape="3"/>
<move tape="3">R</move>
</transition>
<transition>
<from>0</from>
<to>0</to>
<read tape="1">0</read>
<write tape="1">0</write>
<move tape="1">R</move>
<read tape="2">0</read>
<write tape="2">0</write>
<move tape="2">R</move>
<read tape="3"/>
<write tape="3"/>
<move tape="3">R</move>
</transition>
<transition>
<from>0</from>
<to>0</to>
<read tape="1">0</read>
<write tape="1">0</write>
<move tape="1">R</move>
<read tape="2">1</read>
<write tape="2">1</write>
<move tape="2">R</move>
<read tape="3"/>
<write tape="3"/>
<move tape="3">R</move>
</transition>
<transition>
<from>0</from>
<to>0</to>
<read tape="1">1</read>
<write tape="1">1</write>
<move tape="1">R</move>
<read tape="2">0</read>
<write tape="2">0</write>
<move tape="2">R</move>
<read tape="3"/>
<write tape="3"/>
<move tape="3">R</move>
</transition>
<transition>
<from>0</from>
<to>0</to>
<read tape="1">1</read>
<write tape="1">1</write>
<move tape="1">R</move>
<read tape="2">1</read>
<write tape="2">1</write>
<move tape="2">R</move>
<read tape="3"/>
<write tape="3"/>
<move tape="3">R</move>
</transition>
<transition>
<from>0</from>
<to>0</to>
<read tape="1"/>
<write tape="1">0</write>
<move tape="1">R</move>
<read tape="2">1</read>
<write tape="2">1</write>
<move tape="2">R</move>
<read tape="3"/>
<write tape="3"/>
<move tape="3">R</move>
</transition>
<transition>
<from>0</from>
<to>1</to>
<read tape="1"/>
<write tape="1"/>
<move tape="1">L</move>
<read tape="2"/>
<write tape="2"/>
<move tape="2">L</move>
<read tape="3"/>
<write tape="3"/>
<move tape="3">L</move>
</transition>
<transition>
<from>2</from>
<to>3</to>
<read tape="1"/>
<write tape="1"/>
<move tape="1">R</move>
<read tape="2"/>
<write tape="2"/>
<move tape="2">R</move>
<read tape="3"/>
<write tape="3">1</write>
<move tape="3">S</move>
</transition>
<transition>
<from>1</from>
<to>1</to>
<read tape="1">1</read>
<write tape="1">1</write>
<move tape="1">L</move>
<read tape="2">0</read>
<write tape="2">0</write>
<move tape="2">L</move>
<read tape="3"/>
<write tape="3">1</write>
<move tape="3">L</move>
</transition>
<transition>
<from>1</from>
<to>1</to>
<read tape="1">0</read>
<write tape="1">0</write>
<move tape="1">L</move>
<read tape="2">1</read>
<write tape="2">1</write>
<move tape="2">L</move>
<read tape="3"/>
<write tape="3">1</write>
<move tape="3">L</move>
</transition>
<transition>
<from>2</from>
<to>2</to>
<read tape="1">1</read>
<write tape="1">1</write>
<move tape="1">L</move>
<read tape="2">1</read>
<write tape="2">1</write>
<move tape="2">L</move>
<read tape="3"/>
<write tape="3">1</write>
<move tape="3">L</move>
</transition>
<transition>
<from>0</from>
<to>0</to>
<read tape="1">0</read>
<write tape="1">0</write>
<move tape="1">R</move>
<read tape="2"/>
<write tape="2">0</write>
<move tape="2">R</move>
<read tape="3"/>
<write tape="3"/>
<move tape="3">R</move>
</transition>
<transition>
<from>2</from>
<to>2</to>
<read tape="1">0</read>
<write tape="1">0</write>
<move tape="1">L</move>
<read tape="2">1</read>
<write tape="2">1</write>
<move tape="2">L</move>
<read tape="3"/>
<write tape="3">0</write>
<move tape="3">L</move>
</transition>
<transition>
<from>2</from>
<to>2</to>
<read tape="1">1</read>
<write tape="1">1</write>
<move tape="1">L</move>
<read tape="2">0</read>
<write tape="2">0</write>
<move tape="2">L</move>
<read tape="3"/>
<write tape="3">0</write>
<move tape="3">L</move>
</transition>
<transition>
<from>2</from>
<to>1</to>
<read tape="1">0</read>
<write tape="1">0</write>
<move tape="1">L</move>
<read tape="2">0</read>
<write tape="2">0</write>
<move tape="2">L</move>
<read tape="3"/>
<write tape="3">1</write>
<move tape="3">L</move>
</transition>
</automaton>
</structure>