计算一个二进制串的Lempel-谢夫(LZ)复杂性(又名序列复杂性) [英] calculating Lempel-Ziv (LZ) complexity (aka sequence complexity) of a binary string

查看:198
本文介绍了计算一个二进制串的Lempel-谢夫(LZ)复杂性(又名序列复杂性)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要计算一个二进制字符串的LZ复杂性。 LZ的复杂度是遇到作为流differencet子的数量从开始时到结束时被观看。作为一个例子:

S = 1001111011000010

在不同的子标记序列的复杂性C(S)= 6: S = 1/0/01 /一千一分之一千一百一十/ 0010 /

有人可以指导我找到一个简单的解决方案?我相信应该有一些很直接的实现这一众所周知的问题,但我也很难找到他们。能不能做到简单地构建后缀树或类似的东西做的。如果是的话,究竟怎么了?和我应该怎么办?

有人知道的任何C / C ++源$ C ​​$ C来完成任务?

在此先感谢。

要明确的答案提出的树的构建。请问树是这个样子?

  0
       / \
      ○○
     / \ / \
    ○○○○
       / /
      ○○
 

解决方案

1 0 01 11 10 110 00 010
序列的复杂性是8,因为分区8不是6 - 1/0/01/11/10/110/00/010

I need to calculate the LZ-complexity of a binary string. The LZ-complexity is the number of differencet substrings encountered as the stream is viewed from begining to the end. As an example:

s = 1001111011000010

Marking in the different substrings the sequence complexity c(s) = 6: s = 1 / 0 / 01 / 1110 / 1100 / 0010 /

can someone guide me to find a simple solution for that? I am sure there should be some very straight-forward implementations for this well-known problem, but I have difficulty finding them. Can it be done simply done with constructing a suffix tree or something similar. If yes, exactly how? and what should I do?

anyone knows of any c/c++ source code to accomplish the task?

thanks in advance.

to clarify the construction of the tree suggested in the answers. Does the tree looks like this?

         o
       /   \
      o     o
     / \   / \
    o   o o   o
       /     /
      o     o

解决方案

1 0 01 11 10 110 00 010
Complexity of sequence is 8 because the partitions are 8 not 6 - 1/0/01/11/10/110/00/010

这篇关于计算一个二进制串的Lempel-谢夫(LZ)复杂性(又名序列复杂性)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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