0% found this document useful (0 votes)
91 views28 pages

Mathematics As A Tool: Coding Theory: Math & Physics Department

Coding theory involves encoding messages for transmission by adding redundancy to allow for error detection and correction. Common coding techniques include parity checks, which add an extra bit to detect errors, and repetition codes, which repeat the message multiple times. During decoding, the most common bits are used at each position to determine the original message. Coding theory is important for reliable communication in the presence of noise.

Uploaded by

Tawki Baki
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
91 views28 pages

Mathematics As A Tool: Coding Theory: Math & Physics Department

Coding theory involves encoding messages for transmission by adding redundancy to allow for error detection and correction. Common coding techniques include parity checks, which add an extra bit to detect errors, and repetition codes, which repeat the message multiple times. During decoding, the most common bits are used at each position to determine the original message. Coding theory is important for reliable communication in the presence of noise.

Uploaded by

Tawki Baki
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 28

MATHEMATICS AS A TOOL:

Coding Theory

Math & Physics Department MATM 111


LEARNING OUTLINES
1. Components of Communication
2. Coding Theory (Encoding – Decoding)

Prepared by Sir Ron


MATM111 – Mathematics in the Modern World
IT’S ALL ABOUT
COMMUNICATION

Prepared by Sir Ron


MATM111 – Mathematics in the Modern World
1.1 COMPONENTS OF
COMMUNICATION

Prepared by Sir Ron


MATM111 – Mathematics in the Modern World
4 Components of Communication

Sender MESSAGE Receiver

Channel
(Medium)

Prepared by Sir Ron


1.2 CODING THEORY

Prepared by Sir Ron


MATM111 – Mathematics in the Modern World
CODING THEORY
Coding theory is the study of the properties of codes and their
respective fitness for specific applications. Codes are used for data
compression, cryptography, error detection and correction, data
transmission and data storage.

Codes are studied by various scientific disciplines—such as information


theory, electrical engineering, mathematics, linguistics, and computer
science—for the purpose of designing efficient and reliable data
transmission methods.

Prepared by Sir Ron


This typically involves the removal of redundancy and the correction or
detection of errors in the transmitted data.
CODING THEORY
There are four types of coding:[1]
• Data compression (or source coding)
• Error control (or channel coding)
• Cryptographic coding
• Line coding

Prepared by Sir Ron


- Wikipedia
CODING – the process of encoding and decoding
information

Two Process of Coding:


1. Encoding – to convert source information
into another form or code thru a channel
2. Decoding – to convert from an encrypted

Prepared by Sir Ron


form to plain text
CODING THEORY
DATA COMPRESSION OR SOURCE ENCODING is defined as converting the
message from the sender into bits suitable to the communication channel.
- bit (short for "binary digit") is the smallest unit of measurement
used to quantify computer data. It contains a single binary value of 0 or
1.
An example of this is the ASCII (AMERICAN STANDARD CODE) that
converts each character in the message to a byte of 8 bits.

Prepared by Sir Ron


- In most computer systems, a byte is a unit of data that is eight binary
digits long. A byte is the unit most computers use to represent a character
such as a letter, number or typographic symbol.
Source Coding – converting the messages from sender
into bits suitable to the communication channel

(Communication
(Source Encoder) (Source Decoder)
Channel)

Prepared by Sir Ron


NOISES –
any disturbances that alter the message
which cause disruption and error in the message

Prepared by Sir Ron


Example of Coded Message

Message Encoded Bits


(Directions) (Source Coding)

N – North 00
S – South 01
E – East 10

Prepared by Sir Ron


W – West 11
(Communication
(Source Encoder) (Source Decoder)
Channel)

00 Noisy Channel 01

Prepared by Sir Ron


Coding theory
is to detect, or even correct errors in
communication

Prepared by Sir Ron


ENCODING

Prepared by Sir Ron


Channel coding – adding some form of redundancy
to the source encoded message so that errors can
be detected or corrected.
Sender Receiver

Source code Noise/distractions Source decoder

Prepared by Sir Ron


Channel encoder Communication channel Channel decoder
1. Parity Check –
a single bit is added to the message as
redundancy bit to detect further errors

Odd parity – total number of 1’s in the message is an odd number


Ex. 10011011
Even parity – total number of 1’s in the message is an odd number

Prepared by Sir Ron


Ex. 10011010
MESSAGE CHANNEL ENCODING
Source Parity Check (bit size 1)
Code Odd Even
1) 00 001 000
2) 01 010 011
3) 10 100 101
4) 11 111 110
5) 101101 1011011 1011010

Prepared by Sir Ron


6) 10001 100011 100010
2. REPETITION CODE

- The encoding process is performed by taking


the k bits,
then repeat it (2r + 1) times,
where r ≥ 1 is a fixed number.

Prepared by Sir Ron


- Where r = k minus 1
MESSAGE CHANNEL ENCODING
Source repetition (2r + 1) times
Code

1) 101 k=3 101 101 101 101 101 5x

2) 10 r=3 10 10 10 10 10 10 10 7x

Prepared by Sir Ron


3) 011 r=2 011 011 011 011 011 5x

Remember: r = k -1
MESSAGE CHANNEL ENCODING
Source repetition (2r + 1) times
Code

4) 0101 r=1 0101 0101 0101 3x

5) 01 k=4 01 01 01 01 01 01 7x

Prepared by Sir Ron


6) 101 k=3 101 101 101 101 101 6x

Remember: r = k -1
DECODING

Prepared by Sir Ron


REPETITION CODE
- Assume that the message transmitted through a noisy channel and distorted.
Let say there are 15 digits, and k = 3
If k=3, it means that the original coded message has a size of 3 bits.

The decoding process will be done in this manner.


a) k will determine the number of original bits
b) number of digits per set of bit = received digits divide k bits

i.e. 15 ÷ 3 = 5 (it means 5 digits per bit group)

Prepared by Sir Ron


Consider the positions of the received message:
First Bit - Consider the most frequent bit in positions 1,4,7,10, and 13
Second Bit - Consider the most frequent bit in positions 2,5,8,11,and 14
Third Bit - Consider the most frequents bit in positions 3, 6, 9, 12, and 15
MESSAGE CHANNEL DECODING
Received (k=3) (original message)
(THRU A NOISY CHANNEL)
123 456 789 101112 131415

1) 111 101 100 011 100 101

Let say positions:


1, 4, 7, 10, 13 –11101 1 is the most appearing
2, 5, 8, 11, 14 – 10010 0 is the most appearing

Prepared by Sir Ron


3, 6, 9, 12, 15 – 11010 1 is the most appearing
Assume that the message transmitted through a noisy channel and
distorted.
Channel Encoding Channel Decoding
Received Message (Source Code) (decoded message)
a) 111001101110010 Repetition code uses k = 3 111
b) 100001010111 Repetition code uses k = 4 0101

SOLUTION (b)
SOLUTION (a)
1000 / 0101 / 0111
111 / 001 / 101 / 110 / 010 1234 / 5678 /9101112

Prepared by Sir Ron


123 / 456 / 789 / 101112 / 131415 159 = 100 =0
1471013 = 10110 =1 2610 = 011 =1
3711 = 001 =0
2581114 = 10011 =1
4812 = 011 =1
3601215 = 11100 =1
Assume that the message transmitted through a noisy channel and
distorted.
Channel Encoding Channel Decoding
Received Message (Source Code) (decoded message)
a) 10100110101001 Repetition code uses k = 2 10
b) 101001001101011 Repetition code uses k = 5 10011

SOLUTION (b)
SOLUTION (a) 10100/10011/01011
12345 / 678910/ 1112131415
10 /10 / 01 / 10 / 10 / 10/ 10 / 01 1611 = 110 =1

Prepared by Sir Ron


135791113 / 2468101214 2712 = 001 =0
3813 = 100 =0
135791113 = 11011110 = 1 4914 = 011 =1
2468101214 = 00100001 = 0 51015 = 011 =1

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy