当前位置:网站首页>Lyndon breaks down learning notes
Lyndon breaks down learning notes
2022-06-22 11:47:00 【caoyang1123】
False template question ,b Stand and look jls With a call lyndon The decomposing immortal algorithm kills this problem , So I went to learn lyndon decompose , As a result, I found that after I wrote it, I just made a random data hack It fell off ( By the way b Station comments hack A wave of jls, Replied ,XD), The author may have never thought that someone would use such an unpopular algorithm ......
lyndon Decomposition means that each string , Can be uniquely divided into a series of substrings s1,s2,s3...sk, Satisfy the following two properties
1)si yes lyndon strand ,lyndon A string is defined as a string whose minimum suffix is itself , Such as ab、aab yes ,aa,ba No
2) The dictionary order of the divided substrings is monotonic ( That is, non strictly increasing ).
Such as aa It can be divided into a|a, bcbca It can be divided into bc|bc|a
Find this decomposition , If you want to be lazy , Obviously you can use the well-known suffix array , Each time, the minimum suffix position that still exists can be used as a division position ( In fact, it can also be explained by this lyndon Existence of decomposition , The uniqueness should be proved by the method of counter evidence )
But there are also special algorithms , And it is constructed recursively , Useful in some topics . Consider maintaining the last one that has been divided lyndon Decomposition end i, Currently under construction lydon Disassemble the position of the previous cycle section j, Currently under construction lyndon Decomposition end position k, And then according to j,k Dictionary order relation can deal with all kinds of situations .
The question at the top seems to work lyndon Decompose to do , Using strings border Can be divided into log The properties of a sequence of arithmetical numbers ( See jcvb String selection of ), But is jls Yes , I haven't realized , The simple way is to divide the hash into dictionary order ( look for lcp Next position ).
边栏推荐
- IO之Reader案例
- 【软工】计划和项目管理
- Matlab的KNN分類使用(附源碼),實現像素分類(自己設置訓練集比例),打印測試精度
- 鉴权之cookie、session、JWT
- TiFlash 函数下推必知必会丨十分钟成为 TiFlash Contributor
- Reader case of IO
- Typical life cycle model of information system project
- Add custom fields to the time synchronization message based on uavcan protocol in Px4 code learning
- 牛客练习赛94F题解
- 【软工】 软件体系结构
猜你喜欢

Development technology of NFT trading platform digital collection system

CF751E Phys Ed Online

Puzzle (019) plane forward problem

Solution to 55e of Niuke challenge

APM set pitch four rotor control mode

【软工】计划和项目管理

Typical life cycle model of information system project

Matlab的KNN分類使用(附源碼),實現像素分類(自己設置訓練集比例),打印測試精度

Should the theme of the IDE be bright or dark? Here comes the ultimate answer!

Cloud minimalist deployment svelte3 chat room
随机推荐
【软工】获取需求
lyndon分解学习笔记
Puzzle (019) plane forward problem
Attack and defense drill | threat hunting practice case based on att & CK
MATLAB中cellstr函数的使用
IO之Reader案例
SQLMap-hh
Noun analysis: ETL
奋斗吧,程序员——第三十九章 人生不失意,焉能慕知己
CF751D Difficult Mountain
Niuke challenge 53e problem solution & Notes on learning with flowers and trees
“中国巴菲特”段永平:投资有道
Solution to 94d problem of Niuke practice match
Two ways of traversing binary tree: preorder, inorder and postorder
迪利克雷前缀和学习笔记
Cookies and sessions for answers to common interview questions
奋斗吧,程序员——第四十五章 柔情似水,佳期如梦
electron添加SQLite數據庫
Application of divide and conquer in massive data processing
牛客挑战赛54F题解 & 李超树学习笔记