关于Generalised suffix tree

dracularking 2013-03-30 11:48:53


这个后缀树的用处是什么呢

来源:http://en.wikipedia.org/wiki/Longest_common_substring_problem

...全文
263 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
dracularking 2013-04-02
  • 打赏
  • 举报
回复
引用 7 楼 FancyMouse 的回复:
引用 6 楼 dracularking 的回复:引用 5 楼 FancyMouse 的回复:引用 4 楼 dracularking 的回复:引用 3 楼 FancyMouse 的回复:A-B-BA这是suffix tree经典做法啊,只有1个child的节点给压缩掉。否则后缀树是做不到线性空间/时间的。 谢谢,自己再查了下资料,大致了解了 那接下来通过suffix……
谢谢,接下来再仔细回看一下这一段,终于明白是啥意思了 The longest common substrings of a set of strings can be found by building a generalised suffix tree for the strings, and then finding the deepest internal nodes which have leaf nodes from all the strings in the subtree below it. The figure on the right is the suffix tree for the strings "ABAB", "BABA" and "ABBA", padded with unique string terminators, to become "ABAB$0", "BABA$1" and "ABBA$2". The nodes representing "A", "B", "AB" and "BA" all have descendant leaves from all of the strings, numbered 0, 1 and 2. 那接下来整个难点就是构建一棵GST和如何搜索
FancyMouse 2013-04-01
  • 打赏
  • 举报
回复
引用 6 楼 dracularking 的回复:
引用 5 楼 FancyMouse 的回复:引用 4 楼 dracularking 的回复:引用 3 楼 FancyMouse 的回复:A-B-BA这是suffix tree经典做法啊,只有1个child的节点给压缩掉。否则后缀树是做不到线性空间/时间的。 谢谢,自己再查了下资料,大致了解了 那接下来通过suffix tree来获得LCS,也就是这句话: The……
一个字符串是common substring当且仅当它对应的顶点下面的子树包含了所有的$,在这个例子里,只有一棵子树包含了所有的$0,$1,$2它才是3个串的common substring。
dracularking 2013-04-01
  • 打赏
  • 举报
回复
引用 5 楼 FancyMouse 的回复:
引用 4 楼 dracularking 的回复:引用 3 楼 FancyMouse 的回复:A-B-BA这是suffix tree经典做法啊,只有1个child的节点给压缩掉。否则后缀树是做不到线性空间/时间的。 谢谢,自己再查了下资料,大致了解了 那接下来通过suffix tree来获得LCS,也就是这句话: The nodes representing "A……
还是没搞明白0,1,2和它求取LCS有什么关系,比方说BA这个最长公共子串,它怎么求得的呢
FancyMouse 2013-04-01
  • 打赏
  • 举报
回复
引用 4 楼 dracularking 的回复:
引用 3 楼 FancyMouse 的回复:A-B-BA这是suffix tree经典做法啊,只有1个child的节点给压缩掉。否则后缀树是做不到线性空间/时间的。 谢谢,自己再查了下资料,大致了解了 那接下来通过suffix tree来获得LCS,也就是这句话: The nodes representing "A", "B", "AB" and "BA" al……
这里不是指单个节点。"The nodes representing"是指从根开始,对这个字符串走下来,走到的那个node,那个node满足"all have descendent..."那个性质。
FancyMouse 2013-03-31
  • 打赏
  • 举报
回复
A-B-BA这是suffix tree经典做法啊,只有1个child的节点给压缩掉。否则后缀树是做不到线性空间/时间的。
dracularking 2013-03-31
  • 打赏
  • 举报
回复
引用 3 楼 FancyMouse 的回复:
A-B-BA这是suffix tree经典做法啊,只有1个child的节点给压缩掉。否则后缀树是做不到线性空间/时间的。
谢谢,自己再查了下资料,大致了解了 那接下来通过suffix tree来获得LCS,也就是这句话: The nodes representing "A", "B", "AB" and "BA" all have descendant leaves from all of the strings, numbered 0, 1 and 2. 怎么理解呢(貌似根本就无AB这个节点)
dracularking 2013-03-31
  • 打赏
  • 举报
回复
引用 1 楼 FancyMouse 的回复:
The longest common substrings of a set of strings can be found by building a generalised suffix tree for the strings, and then finding the deepest internal nodes which have leaf nodes fro……
谢谢,这个我看过,现在的关键可能是不清楚为什么他要这样构造suffix tree 他里面是这样提到这棵树的构造的: The figure on the right is the suffix tree for the strings "ABAB", "BABA" and "ABBA", padded with unique string terminators, to become "ABAB$0", "BABA$1" and "ABBA$2". 先不说其它两个,就说ABBA在树中的位置就很奇怪
FancyMouse 2013-03-31
  • 打赏
  • 举报
回复
The longest common substrings of a set of strings can be found by building a generalised suffix tree for the strings, and then finding the deepest internal nodes which have leaf nodes from all the strings in the subtree below it. 从那个链接抄下来的

33,007

社区成员

发帖
与我相关
我的任务
社区描述
数据结构与算法相关内容讨论专区
社区管理员
  • 数据结构与算法社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧