嗨...我可以获得有关3重量法的更多信息 [英] Hi... Can I get more info on the the 3 weight method

查看:108
本文介绍了嗨...我可以获得有关3重量法的更多信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

此信息的参考或来源确实会有所帮助。



3重量法

3重量方法也是被称为银行业使用的电子资金转帐路由号码方案。它是一个基于mod 10的系统,但它不是作为一个整数操作,而是在点积(即数字n的各个数字)上运行。



所以,给定一个8位数的路由号码,校验位c = n·(7,3,9,7,3,9,7,3),mod 10.换句话说,让ai为第i位n(最重要到最不重要)。然后



c = 7a1 + 3a2 + 9a3 + 7a4 + 3a5 + 9a6 + 7a7 + 3a8 mod 10


$ b $然后将bc连接到8位数路由,形成一个9位数的路由号码



该方案基于乘法模10产生10位小数的排列这一事实如果乘法因子是集合{1,3,7,9}的数字,则为数字;但如果因子为5或偶数,则只有十进制数字的子集。此系统无法检测相差5的相邻换位数。



3-Weight方法不使用简单的模块缩减,因此不需要c = 10-c保持平等。



读者应该发现以下检查方程式成立(其中a9是-c):



0 = 7a1 + 3a2 + 9a3 + 7a4 + 3a5 + 9a6 + 7a7 + 3a8 + a9 mod 10



3重量计划如下所示。正如读者所看到的,它可以很容易地推广到任意长度的数字。但是,如果读者需要一个系统用于非常长的数据集,或者二进制数据集考虑使用CRC或Alder校验和,或基于散列的校验和。



我尝试了什么:







我试过但我还没有除了本网站之外,我们已成功获取此信息的来源。之前是否研究过3重量法?请指出我正确的方向,以便我可以阅读更多相关信息。

A reference or a source of this information would really help.

3-Weight Method
The 3-Weight Methods is also known as the Electronic Funds Transfer Routing Number Scheme used by the banking industry. It is a mod 10 based system, but rather than operating on n as a whole number, it operates on a dot product (i.e., the individual digits of the number n).

So, given an 8 digit routing number, the check digit c = n · (7, 3, 9, 7, 3, 9, 7, 3), mod 10. Stated another way, let ai be the ith digit of n (most significant to least significant). Then

c = 7a1 + 3a2 + 9a3 + 7a4 + 3a5 + 9a6 + 7a7 + 3a8 mod 10

c is then concatenated to the 8 digit route, forming a 9 digit routing number

This scheme is based on the fact that multiplication modulo 10 yields a permutation of the 10 decimal digits if the multiplication factor is a digit of the set { 1, 3, 7, 9 }; but only a subset of the decimal digits if the factor is 5 or an even digit. This system cannot detect adjacent transpositions of digits that differ by 5.

The 3-Weight method does not use simple modular reductions, so c = 10 - c is not needed to hold the equality.

The reader should find the following check equation holds true (where a9 is -c):

0 = 7a1 + 3a2 + 9a3 + 7a4 + 3a5 + 9a6 + 7a7 + 3a8 + a9 mod 10

The 3-Weight Scheme is presented below. As the reader can see, it generalizes to a arbitrary length of digits easily. However, if the reader desires a system for very long datasets, or binary data sets consider using a CRC or Alder checksums, or a hash-based checksum.

What I have tried:

yes

I have tried but I have not been successful in obtaining the source of this information apart from this website. Has the 3 - weight method been studied before? Kindly point me in the right direction so that I can read more about it.

推荐答案

公式相对容易计算校验位。



路由号码是一个8位数字,数字9是校验位。在我的例子中,我将使用变量d1-d9来表示各个数字



计算校验位:
The formula is relatively easy to calculate the check digit.

The routing number is an 8 digit number, and digit number 9 is the check digit. In my example I will be using the variables d1-d9 to represent the individual digits

To calculate the check digit:
int d9 = 3(d1+d4+d7) + 7(d2+d5+d8) + 1(d3+d6+d9) MOD 10



验证号码:


To validate the number:

bool IsValid = (3(d1+d4+d7) + 7(d2+d5+d8) + 1(d3+d6+d9) MOD 10  = 0)



更多信息: ABA路由转接号码 - 维基百科 [ ^ ]


这篇关于嗨...我可以获得有关3重量法的更多信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆