当前位置:网站首页>Distance measurement - Hamming distance
Distance measurement - Hamming distance
2022-07-01 23:22:00 【Fanyi】
Python Learning Series : Catalog

List of articles
One 、 summary
Hamming distance (Hamming Distance), Is the number of replacements required to change one string into another .
Two 、 Calculation method
for instance ,
1011101And1001001Of Hamming distance by 2
| type 1 | 1 | 0 | 1 | 1 | 1 | 0 | 1 |
|---|---|---|---|---|---|---|---|
| type 2 | 1 | 0 | 0 | 1 | 0 | 0 | 1 |
As long as type 1 Just change the red part .
2143896And2233786Of Hamming distance by 3
| type 1 | 2 | 1 | 4 | 3 | 8 | 9 | 6 |
|---|---|---|---|---|---|---|---|
| type 2 | 2 | 2 | 3 | 3 | 7 | 9 | 6 |
As long as type 1 Just change the red part .
helloworldAndhollowoold
| type 1 | h | e | l | l | o | w | o | r | l | d |
|---|---|---|---|---|---|---|---|---|---|---|
| type 2 | h | o | l | l | o | w | o | o | l | d |
As long as type 1 Just change the red letter of the bid .
3、 ... and 、 Hamming weight
Hamming weight Is the Hamming distance of a string relative to a zero string of the same length ; in other words , It's the number of non-zero elements in a string : For binary strings , Namely 1 The number of , therefore 11101 The weight of Han Ming is 4.
therefore , If the elements in vector space a and b The Hamming distance between them is equal to the difference of their Hamming weight a-b.

边栏推荐
- 认识--Matplotlib
- Daily three questions 6.29
- Typescript enumeration
- CKS CKA CKAD 将终端更改为远程桌面
- Istio、eBPF 和 RSocket Broker:深入研究服务网格
- Summary of "performance testing" of software testing, novice will know the knowledge points on the road
- 物联网现状及未来发展趋势
- Who do you want to know when opening a stock account? Is it safe to open an account online?
- Linux基础 —— CentOS7 离线安装 MySQL
- SWT/ANR问题--SWT 导致 low memory killer(LMK)
猜你喜欢

Copy ‘XXXX‘ to effectively final temp variable

mysql binlog的清理

Istio、eBPF 和 RSocket Broker:深入研究服务网格

AirServer最新Win64位个人版投屏软件

flutter Unable to load asset: assets/images/888. png

神经网络物联网的未来趋势与发展

Zhao Fuquan: to ensure supply in the short term, we should build a safe, efficient and resilient supply chain in the long term

Redis~02 缓存:更新数据时如何保证MySQL和Redis中的数据一致性?

Aaai22 | structural tagging and interaction modeling: a "slim" network for graph classification

Wechat personal small store one click opening assistant applet development
随机推荐
[micro service sentinel] sentinel integrates openfeign
window安装wsl(二)
【小程序】通过scroll-view组件实现左右【滑动】列表
2022 safety officer-c certificate examination question simulation examination question bank and simulation examination
AirServer最新Win64位个人版投屏软件
mysql binlog的清理
Redis data types and application scenarios
【微服务|Sentinel】sentinel整合openfeign
What is mosaic?
Jielizhi, production line assembly link [chapter]
为什么PHP叫超文本预处理器
Timer和ScheduledThreadPoolExecutor的区别
共享电商的背后: 共创、共生、共享、共富,共赢的共富精神
Rank ranking with MySQL 5.7
【Swoole系列1】在Swoole的世界中,你将学习到什么?
[MySQL] database optimization method
rviz打开后如何显示实时2D地图
数字化转型道阻且长,如何迈好关键的第一步
CKS CKA ckad change terminal to remote desktop
Daily three questions 6.29