SlideShare a Scribd company logo
1 of 16
Information Technology Department
Active Learning Assignment
Akshay Patel (150120116051)
Prof. Alpa Oza
1
BINARY CODE
 We went to find a binary code that will represent the
sequence X in a unique and efficient manner.
 Arithmetic coding is lossless data compression
technique for generating binary code.
 Algorithm Implementation is also the another technique
which is use to generate the binary code.
 It is variable length coding.
 Requires knowledge of symbol probabilities.
 CDF:- Commutative Distributive Function
2
 ln = ln-1 + (un-1 - ln-1) * Fx (xn-1)
 un = ln-1 + (un-1 - ln-1) * Fx (xn)
Where,
 ln → Lower limit after considering nth symbol.
 un → Upper limit after considering nth symbol.
 ln-1 → Lower limit before considering nth symbol.
 un-1 → Upper limit before considering nth symbol.
 Fx (xn) → CDF of nth symbol
 Fx (xn-1) → CDF of symbol before nth symbol
 Range = High – Low
 High = Low + Range * Highrange(C)
 Low = Low + Range * Lowrange(C)
FORMULA:- ENCODING
3
 We wish to encode the sequence “1321”
P(1)=0.8, P(1)=0.02, P(1)=0.18
 First element is 1
Range = H – L =1–0 =1
Low = L + R*L =0+1*0 =0
High = L + R*H =0+1*0.8 =0.8
EXAMPLE
1
(0.8)
2
(0.02)
3
(0.18)
1
0
4
1
(0.8)
2
(0.02)
3
(0.18)
1
0 0
0.8
 Second element is 3
Range = H – L =0.8-0 =0.8
Low = L + R*L =0+0.8*0.82 =0.656
High = L + R*H =0+0.8*1 =0.8
5
 Third element is 2
Range = H – L =0.8-0.656 =0.144
Low = L + R*L =0.656+0.144*0.8 =0.7712
High = L + R*H =0.656+0.144*0.82 =0.77408
1
(0.8)
2
(0.02)
3
(0.18)
1
0 0
0.8
0.656
0.8
6
 Last element is 1
Range = H – L =0.77408-0.7712 =0.00288
Low = L + R*L =0.7712+0.00288*0 =0.7712
High = L + R*H =0.7712+0.00288*0.8 =0.773504
 Tag value = (H+L)/2 = 0.772352
1
(0.8)
2
(0.02)
3
(0.18)
1
0 0
0.8
0.656
0.8
0.7712
0.77408
0.7712
0.773504
7
ALGORITHM IMPLEMENTATION
 ln = ln-1 + (un-1 - ln-1) * Fx (xn-1)
 un = ln-1 + (un-1 - ln-1) * Fx (xn)
 E1 = [0.0,5) → [0,1); E1(x) = 2x
 E2 = [0.5,1) → [0,1); E2(x) = 2(x-0.5)
 [l(n), u(n)] ᴄ [0.0,5) →0, Then perform E1 Rescale
 [l(n), u(n)] ᴄ [0.5,1) →1, Then perform E2 Rescale
 l(n) ϵ [0.0,5) , u(n) ϵ [0.5,1) → Output Undetermined
8
EXAMPLE
 ln = ln-1 + (un-1 - ln-1) * Fx (xn-1)
 un = ln-1 + (un-1 - ln-1) * Fx (xn)
 First element is 1
 l=0+(1-0)*0 =0
 h=0+(1-0)*0.8 =0.8
 [l(n), u(n)] = [0,0.8) So, Output Undetermined
 Second element is 3
 l=0+(0.8-0)*0.82 =0.656
 h=0+(0.8-0)*1 =0.8
[0.656,0.8) ᴄ [0.5,1) So, Transmit 1 and Rescale by E2
 l=2(x-0.5) =2(0.656-0.5) =0.312
 h=2(x-0.5) =2(0.8-0.5) =0.6
[0.312,0.6) So, Output Undetermined
1
(0.8)
2
(0.02)
3
(0.18)
10
9
 Third element is 2
 l=0.312+(0.6-0.312)*0.8 =0.5424
 h=0312+(0.6-0.312)*0.82 =0.54816
[0.5424, 0.54816) ᴄ [0.5,1) So, Transmit 1 and Rescale by E2
 l=2(0.5424 -0.5) =0.0848
 h=2(0.54816 -0.5) =0.09632
[0.0848, 0.09632) ᴄ [0,0.5) So, Transmit 0 and Rescale by E
 l=2(0.0848) =0.1696
 h=2(0.09632) =0.19264
[0.1696, 0.19264) ᴄ [0,0.5) So, Transmit 0 and Rescale by E
 l=2(0.1696) =0.3392
 h=2(0.19264) =0.38528
[0.3392, 0.38528) ᴄ [0,0.5) So, Transmit 0 and Rescale by E
10
 l=2(0.3392) =0.6784
 h=2(0.38528) =0.77056
[0.6784, 0.77056) ᴄ [0.5,1) So, Transmit 1 and Rescale by E2
 Third element is 2
 l=2(0.6784-0.5) =0.3568
 h=2(0.77056-0.5) =0.54112
[0.3568, 0.54112) Output Undetermined
 Last element is 1
 l=0.3568+(0.54112-0.3568)*0 =0.3568
 h=0.3568+(0.54112-0.3568)*0.8 =0.504256
[0.3568, 0.504256) Output Undetermined
 Answer = 110001
11
 Six bit of Tag value = 110001 → 0.765625
 0.765625 is in range of 1 so first element is 1.
 l=0.+(1-0)*0 =0
 h=0+(1-0)*0.8 =0.8
[0, 0.8) Undetermined
 So the tag value is t*=(tag - l(k-1))/(u(k-1) -l(k-1))
=(0.765625-0)/(0.8-0)
=0.9579
 0.9579 is in range of 3 so second element is 3.
 l=0+(0.8-0)*0.82 =0.656
 h=0+(0.8-0)*1 =0.8
 [0.656, 0.8) ᴄ [0.5,1) So, Rescale by E2
 l=2(0.656-0.5) =0.656
 h=2(0.8-0.5) =0.8
[0.656, 0.8) Undetermined
DECODING
 Six bit of Tag value = 100011 → 0.546875
 So the tag value is t*=(tag - l(k-1))/(u(k-1) -l(k-1))
=(0.546875-0.312)/(0.6-0.312)
=0.8155
 0.8155 is in range of 2 so third element is 2.
 l=0.312+(0.6-0.312)*0.8 =0.5424
 h=0.312+(0.6-0.312)*0.82 =0.54816
 [0.5424, 0.54816) ᴄ [0.5,1) So, Rescale by E2
 l=2(0.5424-0.5) =0.0848
 h=2(0.54816-0.5) =0.09632
 [0.0848, 0.09632) ᴄ [0,0.5) So, Rescale by E1
 l=2(0.0848) =0.1696
 h=2(0.09632) =0.19264
 [0.1696, 0.19264) ᴄ [0,0.5) So, Rescale by E1
 l=2(0.1696) =0.3392
 h=2(0.19264) =0.38528
 [0.3392,0.38528) ᴄ [0,0.5) So, Rescale by E1
 l=2(0.3392) =0.6784
 h=2(0.38528) =0.77056
 [0.6784, 0.77056) ᴄ [0.5,1) So, Rescale by E2
 l=2(0.6784-0.5) =0.3568
 h=2(0.77056-0.5) =0.54112
[0.3568, 0.54112) Undetermined
 Six bit of Tag value = 100000 → 0.5
 So the tag value is t*=(tag - l(k-1))/(u(k-1) -l(k-1))
=(0.5-0.3568)/(0.54112-0.3568)
=0.72690972
 0.72690972 is in range of 1 so last element is 1.
 So the answer is 1321
REFERENCES
 Book
15
16

More Related Content

What's hot

What's hot (15)

C++ Returning Objects
C++ Returning ObjectsC++ Returning Objects
C++ Returning Objects
 
Lec3
Lec3Lec3
Lec3
 
Lec5
Lec5Lec5
Lec5
 
Java introduction
Java introductionJava introduction
Java introduction
 
Types by Adform Research
Types by Adform ResearchTypes by Adform Research
Types by Adform Research
 
Daa chapter5
Daa chapter5Daa chapter5
Daa chapter5
 
The RSA Algorithm
The RSA AlgorithmThe RSA Algorithm
The RSA Algorithm
 
Lec16
Lec16Lec16
Lec16
 
Unbounded Error Communication Complexity of XOR Functions
Unbounded Error Communication Complexity of XOR FunctionsUnbounded Error Communication Complexity of XOR Functions
Unbounded Error Communication Complexity of XOR Functions
 
Chapter 2: Boolean Algebra and Logic Gates
Chapter 2: Boolean Algebra and Logic GatesChapter 2: Boolean Algebra and Logic Gates
Chapter 2: Boolean Algebra and Logic Gates
 
Circular convolution Using DFT Matlab Code
Circular convolution Using DFT Matlab CodeCircular convolution Using DFT Matlab Code
Circular convolution Using DFT Matlab Code
 
Anlysis and design of algorithms part 1
Anlysis and design of algorithms part 1Anlysis and design of algorithms part 1
Anlysis and design of algorithms part 1
 
Ch01 basic concepts_nosoluiton
Ch01 basic concepts_nosoluitonCh01 basic concepts_nosoluiton
Ch01 basic concepts_nosoluiton
 
Arrays
ArraysArrays
Arrays
 
Week7
Week7Week7
Week7
 

Similar to DCDR

Tail Probabilities for Randomized Program Runtimes via Martingales for Higher...
Tail Probabilities for Randomized Program Runtimes via Martingales for Higher...Tail Probabilities for Randomized Program Runtimes via Martingales for Higher...
Tail Probabilities for Randomized Program Runtimes via Martingales for Higher...Satoshi Kura
 
Chapter 1 digital systems and binary numbers
Chapter 1 digital systems and binary numbersChapter 1 digital systems and binary numbers
Chapter 1 digital systems and binary numbersMohammad Bashartullah
 
Application of Module Structure of Algebra in Homomorphic Signal Processing
Application of Module Structure of Algebra in Homomorphic Signal ProcessingApplication of Module Structure of Algebra in Homomorphic Signal Processing
Application of Module Structure of Algebra in Homomorphic Signal Processingijsrd.com
 
Quick sort Algorithm Discussion And Analysis
Quick sort Algorithm Discussion And AnalysisQuick sort Algorithm Discussion And Analysis
Quick sort Algorithm Discussion And AnalysisSNJ Chaudhary
 
Cyclic code non systematic
Cyclic code non systematicCyclic code non systematic
Cyclic code non systematicNihal Gupta
 
Ch 04 Arithmetic Coding (Ppt)
Ch 04 Arithmetic Coding (Ppt)Ch 04 Arithmetic Coding (Ppt)
Ch 04 Arithmetic Coding (Ppt)anithabalaprabhu
 
Ch 04 Arithmetic Coding ( P P T)
Ch 04  Arithmetic  Coding ( P P T)Ch 04  Arithmetic  Coding ( P P T)
Ch 04 Arithmetic Coding ( P P T)anithabalaprabhu
 
chapter1digitalsystemsandbinarynumbers-151021072016-lva1-app6891.pptx
chapter1digitalsystemsandbinarynumbers-151021072016-lva1-app6891.pptxchapter1digitalsystemsandbinarynumbers-151021072016-lva1-app6891.pptx
chapter1digitalsystemsandbinarynumbers-151021072016-lva1-app6891.pptxSurendra Loya
 
Unit 1 PDF.pptx
Unit 1 PDF.pptxUnit 1 PDF.pptx
Unit 1 PDF.pptxChandraV13
 
DAA-Divide and Conquer methodology, DAA 2024
DAA-Divide and Conquer methodology, DAA 2024DAA-Divide and Conquer methodology, DAA 2024
DAA-Divide and Conquer methodology, DAA 2024RUHULAMINHAZARIKA
 
About the computer of the important field
About the computer               of the important fieldAbout the computer               of the important field
About the computer of the important fieldshubhamgupta7133
 
Chapter_1_Digital_Systems_and_Binary_Numbers2.ppt
Chapter_1_Digital_Systems_and_Binary_Numbers2.pptChapter_1_Digital_Systems_and_Binary_Numbers2.ppt
Chapter_1_Digital_Systems_and_Binary_Numbers2.pptDavid Louie Bedia
 
Introduction to Artificial Neural Networks
Introduction to Artificial Neural NetworksIntroduction to Artificial Neural Networks
Introduction to Artificial Neural NetworksStratio
 
K10692 control theory
K10692 control theoryK10692 control theory
K10692 control theorysaagar264
 
digital-systems-and-binary-numbers1.pptx
digital-systems-and-binary-numbers1.pptxdigital-systems-and-binary-numbers1.pptx
digital-systems-and-binary-numbers1.pptxRameshK531901
 

Similar to DCDR (20)

Tail Probabilities for Randomized Program Runtimes via Martingales for Higher...
Tail Probabilities for Randomized Program Runtimes via Martingales for Higher...Tail Probabilities for Randomized Program Runtimes via Martingales for Higher...
Tail Probabilities for Randomized Program Runtimes via Martingales for Higher...
 
Chapter 1 digital systems and binary numbers
Chapter 1 digital systems and binary numbersChapter 1 digital systems and binary numbers
Chapter 1 digital systems and binary numbers
 
Application of Module Structure of Algebra in Homomorphic Signal Processing
Application of Module Structure of Algebra in Homomorphic Signal ProcessingApplication of Module Structure of Algebra in Homomorphic Signal Processing
Application of Module Structure of Algebra in Homomorphic Signal Processing
 
Quick sort Algorithm Discussion And Analysis
Quick sort Algorithm Discussion And AnalysisQuick sort Algorithm Discussion And Analysis
Quick sort Algorithm Discussion And Analysis
 
Randomized algorithms ver 1.0
Randomized algorithms ver 1.0Randomized algorithms ver 1.0
Randomized algorithms ver 1.0
 
Cyclic code non systematic
Cyclic code non systematicCyclic code non systematic
Cyclic code non systematic
 
Ch 04 Arithmetic Coding (Ppt)
Ch 04 Arithmetic Coding (Ppt)Ch 04 Arithmetic Coding (Ppt)
Ch 04 Arithmetic Coding (Ppt)
 
Ch 04 Arithmetic Coding ( P P T)
Ch 04  Arithmetic  Coding ( P P T)Ch 04  Arithmetic  Coding ( P P T)
Ch 04 Arithmetic Coding ( P P T)
 
Understanding Reed-Solomon code
Understanding Reed-Solomon codeUnderstanding Reed-Solomon code
Understanding Reed-Solomon code
 
chapter1digitalsystemsandbinarynumbers-151021072016-lva1-app6891.pptx
chapter1digitalsystemsandbinarynumbers-151021072016-lva1-app6891.pptxchapter1digitalsystemsandbinarynumbers-151021072016-lva1-app6891.pptx
chapter1digitalsystemsandbinarynumbers-151021072016-lva1-app6891.pptx
 
Digital logic design part1
Digital logic design part1Digital logic design part1
Digital logic design part1
 
Unit 1 PDF.pptx
Unit 1 PDF.pptxUnit 1 PDF.pptx
Unit 1 PDF.pptx
 
DAA-Divide and Conquer methodology, DAA 2024
DAA-Divide and Conquer methodology, DAA 2024DAA-Divide and Conquer methodology, DAA 2024
DAA-Divide and Conquer methodology, DAA 2024
 
About the computer of the important field
About the computer               of the important fieldAbout the computer               of the important field
About the computer of the important field
 
Chapter_1_Digital_Systems_and_Binary_Numbers2.ppt
Chapter_1_Digital_Systems_and_Binary_Numbers2.pptChapter_1_Digital_Systems_and_Binary_Numbers2.ppt
Chapter_1_Digital_Systems_and_Binary_Numbers2.ppt
 
Introduction to Artificial Neural Networks
Introduction to Artificial Neural NetworksIntroduction to Artificial Neural Networks
Introduction to Artificial Neural Networks
 
K10692 control theory
K10692 control theoryK10692 control theory
K10692 control theory
 
digital-systems-and-binary-numbers1.pptx
digital-systems-and-binary-numbers1.pptxdigital-systems-and-binary-numbers1.pptx
digital-systems-and-binary-numbers1.pptx
 
dld.ppt
dld.pptdld.ppt
dld.ppt
 
Digital signal processing
Digital signal processingDigital signal processing
Digital signal processing
 

More from Paneliya Prince

More from Paneliya Prince (20)

140120107044 ins ala.ppt
140120107044 ins ala.ppt140120107044 ins ala.ppt
140120107044 ins ala.ppt
 
To create a web service
To create a web serviceTo create a web service
To create a web service
 
Session and state management
Session and state managementSession and state management
Session and state management
 
Master pages
Master pagesMaster pages
Master pages
 
Master page
Master pageMaster page
Master page
 
Managing states
Managing statesManaging states
Managing states
 
Introduction to ado.net
Introduction to ado.netIntroduction to ado.net
Introduction to ado.net
 
Grid view control
Grid view controlGrid view control
Grid view control
 
Asp.net validation
Asp.net validationAsp.net validation
Asp.net validation
 
Asp.net control
Asp.net controlAsp.net control
Asp.net control
 
Wt oep visiting card
Wt oep visiting cardWt oep visiting card
Wt oep visiting card
 
SE OEP online car service booking
SE OEP online car service bookingSE OEP online car service booking
SE OEP online car service booking
 
creating jdbc connection
creating jdbc connectioncreating jdbc connection
creating jdbc connection
 
processing control input
processing control inputprocessing control input
processing control input
 
static dictionary technique
static dictionary techniquestatic dictionary technique
static dictionary technique
 
Ajava oep
Ajava oep Ajava oep
Ajava oep
 
Ajava oep shopping application
Ajava oep shopping applicationAjava oep shopping application
Ajava oep shopping application
 
creating jdbc connection
creating jdbc connectioncreating jdbc connection
creating jdbc connection
 
static dictionary
static dictionarystatic dictionary
static dictionary
 
ADO.net control
ADO.net controlADO.net control
ADO.net control
 

Recently uploaded

Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Bookingroncy bisnoi
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdfankushspencer015
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . pptDineshKumar4165
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)simmis5
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756dollysharma2066
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfKamal Acharya
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...roncy bisnoi
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01KreezheaRecto
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptMsecMca
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXssuser89054b
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Christo Ananth
 
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Bookingroncy bisnoi
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfRagavanV2
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTbhaskargani46
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapRishantSharmaFr
 

Recently uploaded (20)

(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
 
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdf
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 

DCDR

  • 1. Information Technology Department Active Learning Assignment Akshay Patel (150120116051) Prof. Alpa Oza 1
  • 2. BINARY CODE  We went to find a binary code that will represent the sequence X in a unique and efficient manner.  Arithmetic coding is lossless data compression technique for generating binary code.  Algorithm Implementation is also the another technique which is use to generate the binary code.  It is variable length coding.  Requires knowledge of symbol probabilities.  CDF:- Commutative Distributive Function 2
  • 3.  ln = ln-1 + (un-1 - ln-1) * Fx (xn-1)  un = ln-1 + (un-1 - ln-1) * Fx (xn) Where,  ln → Lower limit after considering nth symbol.  un → Upper limit after considering nth symbol.  ln-1 → Lower limit before considering nth symbol.  un-1 → Upper limit before considering nth symbol.  Fx (xn) → CDF of nth symbol  Fx (xn-1) → CDF of symbol before nth symbol  Range = High – Low  High = Low + Range * Highrange(C)  Low = Low + Range * Lowrange(C) FORMULA:- ENCODING 3
  • 4.  We wish to encode the sequence “1321” P(1)=0.8, P(1)=0.02, P(1)=0.18  First element is 1 Range = H – L =1–0 =1 Low = L + R*L =0+1*0 =0 High = L + R*H =0+1*0.8 =0.8 EXAMPLE 1 (0.8) 2 (0.02) 3 (0.18) 1 0 4
  • 5. 1 (0.8) 2 (0.02) 3 (0.18) 1 0 0 0.8  Second element is 3 Range = H – L =0.8-0 =0.8 Low = L + R*L =0+0.8*0.82 =0.656 High = L + R*H =0+0.8*1 =0.8 5
  • 6.  Third element is 2 Range = H – L =0.8-0.656 =0.144 Low = L + R*L =0.656+0.144*0.8 =0.7712 High = L + R*H =0.656+0.144*0.82 =0.77408 1 (0.8) 2 (0.02) 3 (0.18) 1 0 0 0.8 0.656 0.8 6
  • 7.  Last element is 1 Range = H – L =0.77408-0.7712 =0.00288 Low = L + R*L =0.7712+0.00288*0 =0.7712 High = L + R*H =0.7712+0.00288*0.8 =0.773504  Tag value = (H+L)/2 = 0.772352 1 (0.8) 2 (0.02) 3 (0.18) 1 0 0 0.8 0.656 0.8 0.7712 0.77408 0.7712 0.773504 7
  • 8. ALGORITHM IMPLEMENTATION  ln = ln-1 + (un-1 - ln-1) * Fx (xn-1)  un = ln-1 + (un-1 - ln-1) * Fx (xn)  E1 = [0.0,5) → [0,1); E1(x) = 2x  E2 = [0.5,1) → [0,1); E2(x) = 2(x-0.5)  [l(n), u(n)] ᴄ [0.0,5) →0, Then perform E1 Rescale  [l(n), u(n)] ᴄ [0.5,1) →1, Then perform E2 Rescale  l(n) ϵ [0.0,5) , u(n) ϵ [0.5,1) → Output Undetermined 8
  • 9. EXAMPLE  ln = ln-1 + (un-1 - ln-1) * Fx (xn-1)  un = ln-1 + (un-1 - ln-1) * Fx (xn)  First element is 1  l=0+(1-0)*0 =0  h=0+(1-0)*0.8 =0.8  [l(n), u(n)] = [0,0.8) So, Output Undetermined  Second element is 3  l=0+(0.8-0)*0.82 =0.656  h=0+(0.8-0)*1 =0.8 [0.656,0.8) ᴄ [0.5,1) So, Transmit 1 and Rescale by E2  l=2(x-0.5) =2(0.656-0.5) =0.312  h=2(x-0.5) =2(0.8-0.5) =0.6 [0.312,0.6) So, Output Undetermined 1 (0.8) 2 (0.02) 3 (0.18) 10 9
  • 10.  Third element is 2  l=0.312+(0.6-0.312)*0.8 =0.5424  h=0312+(0.6-0.312)*0.82 =0.54816 [0.5424, 0.54816) ᴄ [0.5,1) So, Transmit 1 and Rescale by E2  l=2(0.5424 -0.5) =0.0848  h=2(0.54816 -0.5) =0.09632 [0.0848, 0.09632) ᴄ [0,0.5) So, Transmit 0 and Rescale by E  l=2(0.0848) =0.1696  h=2(0.09632) =0.19264 [0.1696, 0.19264) ᴄ [0,0.5) So, Transmit 0 and Rescale by E  l=2(0.1696) =0.3392  h=2(0.19264) =0.38528 [0.3392, 0.38528) ᴄ [0,0.5) So, Transmit 0 and Rescale by E 10
  • 11.  l=2(0.3392) =0.6784  h=2(0.38528) =0.77056 [0.6784, 0.77056) ᴄ [0.5,1) So, Transmit 1 and Rescale by E2  Third element is 2  l=2(0.6784-0.5) =0.3568  h=2(0.77056-0.5) =0.54112 [0.3568, 0.54112) Output Undetermined  Last element is 1  l=0.3568+(0.54112-0.3568)*0 =0.3568  h=0.3568+(0.54112-0.3568)*0.8 =0.504256 [0.3568, 0.504256) Output Undetermined  Answer = 110001 11
  • 12.  Six bit of Tag value = 110001 → 0.765625  0.765625 is in range of 1 so first element is 1.  l=0.+(1-0)*0 =0  h=0+(1-0)*0.8 =0.8 [0, 0.8) Undetermined  So the tag value is t*=(tag - l(k-1))/(u(k-1) -l(k-1)) =(0.765625-0)/(0.8-0) =0.9579  0.9579 is in range of 3 so second element is 3.  l=0+(0.8-0)*0.82 =0.656  h=0+(0.8-0)*1 =0.8  [0.656, 0.8) ᴄ [0.5,1) So, Rescale by E2  l=2(0.656-0.5) =0.656  h=2(0.8-0.5) =0.8 [0.656, 0.8) Undetermined DECODING
  • 13.  Six bit of Tag value = 100011 → 0.546875  So the tag value is t*=(tag - l(k-1))/(u(k-1) -l(k-1)) =(0.546875-0.312)/(0.6-0.312) =0.8155  0.8155 is in range of 2 so third element is 2.  l=0.312+(0.6-0.312)*0.8 =0.5424  h=0.312+(0.6-0.312)*0.82 =0.54816  [0.5424, 0.54816) ᴄ [0.5,1) So, Rescale by E2  l=2(0.5424-0.5) =0.0848  h=2(0.54816-0.5) =0.09632  [0.0848, 0.09632) ᴄ [0,0.5) So, Rescale by E1  l=2(0.0848) =0.1696  h=2(0.09632) =0.19264
  • 14.  [0.1696, 0.19264) ᴄ [0,0.5) So, Rescale by E1  l=2(0.1696) =0.3392  h=2(0.19264) =0.38528  [0.3392,0.38528) ᴄ [0,0.5) So, Rescale by E1  l=2(0.3392) =0.6784  h=2(0.38528) =0.77056  [0.6784, 0.77056) ᴄ [0.5,1) So, Rescale by E2  l=2(0.6784-0.5) =0.3568  h=2(0.77056-0.5) =0.54112 [0.3568, 0.54112) Undetermined  Six bit of Tag value = 100000 → 0.5  So the tag value is t*=(tag - l(k-1))/(u(k-1) -l(k-1)) =(0.5-0.3568)/(0.54112-0.3568) =0.72690972  0.72690972 is in range of 1 so last element is 1.  So the answer is 1321
  • 16. 16