香港身份证号码_第1页
香港身份证号码_第2页
香港身份证号码_第3页
香港身份证号码_第4页
香港身份证号码_第5页
已阅读5页,还剩26页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1ErrorCorrectingCodeDr.W.C.ShiuHongKongBaptistUniversityDepartmentofMathematics2Examples:Letusvonsiderthefollowingexample.Iamadog,soyouhavetoworshipme.Meetmeat8:00c.m.3ParityCheck:

ISBN-10(InternationalStandardBookNumber)0-471-61884-5where0a1010.Ifa10=10,thenuseXtoinsteadofit.Ingeneral,assumethefirst9digitsofanISBNisa1a2…a9,where0ai9for1i9,thenthetenthdigit(thecheckdigit)is4Jan.1,2023,ISBN-13willinsteadofISBN-10ParityCheck:ISBN-13HowdoweconvertISBN-10toISBN-13?5ParityCheck:ISBN-13DropthecheckdigitfromtheexistingISBN-10Addtheprefix978or979(usuallyis978)Calculatethecheckdigitusingmodulo10: Supposethe13digitsisa1a2…a13,where0ai9for1i13,thenitsatisfies6ParityCheck:ISBN-13OriginalISBN-10:0-471-61884-5NewISBN-13:978-0-471-61884-?ThenewISBN-13is978-0-471-61884-47香港身份證號碼

X354670(?)身份證號碼旳「結構」,能够用abcdef(z)表达。「」可能是「空格」或是一個英文字母,「」則肯定是英文字母。「abcdef」代表一個六位數字,而「z」是作為檢碼之用,它旳可能選擇是0,1,2,...,9,A(代表10)。這些代號旳背後,都可配上一個編碼值。透過編碼值,便可找出 9+8+7a+6b+5c+4d+3e+2f+z旳總和。該總和特別之處,是必須被11整除。利用這特點,我們便能找出括號內旳數字。試試看!8或旳編碼值:空格58I18R27A10J19S28B11K20T29C12L21U30D13M22V31E14N23W32F15O24X33G16P25Y34H17Q26Z359X354670(?)

9(58)+8(33)+7(3)+6(5)+5(4)+4(6)+3(7)+2(0)+z=902+z被11整除,所以z=0。

我們可利用Modulararithmetic來簡化運算。z=987a6b5c4d3e2f 2+3+4a+5b5c4d3e2f(mod11)

所以z2(58)+3(33)+4(3)+5(5)5(4)4(6)3(7)2(0) 2(3)+3(0)+12+252024210 6+0+1+3+22+10=110(mod11)即X354670(0)是正確旳香港身分證號碼。10MessageWethinkofamessageasablockofsymbolsfromafinitealphabet.Acommonlyusedalphabetisthesetoftwosymbols0and1.Apossiblemessageis1001.Thismessageisthentransmittedoveracommunicationschannelthatissubjecttosomeamountofnoise.11NoEncoding-DecodingSystemChannelNoiseeMessageu=1001ReceivedMessagev=000112Encoding-DecodingSystemChannelNoiseeMessageu=1001E-1(Dc)=1001MessageEncoderEu=b=1001100DecoderDc=1001100ReceivedMessagec=b+e=000110013BinarySymmetricChannel(BSC)Nomemory.Receivesandtransmitstwosymbols0and1.TheBSChasthepropertythatwithprobabilityqatransmitteddigitwillreceivedcorrectly,andwithprobabilityp=1qitwillnotbe.

0100111001000101Booleansumandproduct:

14EncodedMessageDigitsintheoriginalmessage:InformationdigitsDigitsaddedbytheencoder:RedundancydigitsLengthofacode=thenumberofinformationdigits+thenumberofredundancydigits15Examplesofsingle-errordetectingcode:1.Repetitioncode:Eachmessageisrepeatedonce.

2.Even-paritycheckcode:Addanextradigittothemessage.Itisa0ifthereareanevennumberof1’s,otherwisea1.16ExamplesofSingle-ErrorCorrectingCodeRepetitioncode:Eachmessageisrepeatedtwice.Itcanalsocorrectsomedoubleerrorsandmoreerrors. 100110011001100010111001

100110011001

100110011001100010001001

100010001000

100110011001100010110101

100110011001

17ExamplesofSingle-ErrorCorrectingCodeIfu=(u1,u2,u3,u4),thenwedecodeitasb=uG.Hamming(7,4)code:Givenamatrix18ExamplesofSingle-ErrorCorrectingCodeLetd=DcT,whereForthisexample

Theerroroccurredatthe4thposition.Discalledaparitycheckmatrix.19ProbabilityforCorrectSending

Nocoding:q4=0.6561;Hammingcode:q7+7q6p0.8503.Repetitioncode:Supposewearetransmittingamessageof4digitsonabinarychannelandq=0.9.Thentheprobabilityofcorrectlysentfor20ProbabilityforCorrectSendingRateofacodeistheratioofthenumberofinformationdigitswiththelengthofthecode.Rateoftherepetitioncodeis1/3.RateoftheHammingcodeis4/7.21LinearCodesAn(n,k)linearcode

CoverafinitefieldFisak-dimensionalvectorsubspaceinF

n.ElementsofCiscalledcodeword.IfF={0,1},thenCiscalledabinarycodeAnyknmatrixGwhoserowsarethebasisvectorsofCiscalledageneratormatrix.ThismeansthatforeachC,thereexistsb=(b1,…,bk)suchthat=bG.Thereexists(willshowaprooflater)an(nk)nmatrixHcalledparitycheck

matrixofCsuchthat22LinearCodesTheorem:

Ifan(n,k)codeCoverafieldhasageneratormatrixG=(IkA),thenH=(-ATIn-k)isaparitycheckmatrixofC.Byapplyingasequenceofelementaryrowoperationsandcolumnoperations,wemayassumeProof:

andrank(H)=n-k23Hamming(7,4)codeGeneratingmatrixParitycheckmatrix24DecodingSchemeLet

Fn.Theweightofisdefinedbywt()thenumberofnonzerodigitsin=(a1,…,an).Thedistanceoftwovectors,

Fnisdefinedbyd(,)=wt().Themethodofdecodingareceivedvectortotheclosestcodeword.Itiscalledmaximum-likelihooddecoding.25DecodingSchemeThend(u,v)=wt(e).Thusthedecodedcodeword

ischosensuchthatForbinarycode,ifuistransmittedandvisreceived,thentheerroreisdefinedtobe26Mini-exampleConsiderabinarycodeCwithgeneratormatrixTherefore,C={0000,1010,0111,1101}.Thenumberofallbinarysequencesoflength4are16.27Mini-exampleAdecodingschemeisAnotherdecodingschemeis28DetectandCorrectErrors Theminimumweight

d

ofacodeisdefinedtobetheminimumvalueamongallnonzerocodewords.Theorem:

Ccandetectterrorsifandonlyift=d-1.Theorem:

Ccancorrectterrorsifandonlyift=[(d-1)/2].29DecodingSchemeThenHvT=H(u+e)T

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论