Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8021555
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T22:01:12+00:00 2026-06-04T22:01:12+00:00

When creating a suffix tree of the string ABAB I get only 2 nodes:

  • 0

When creating a suffix tree of the string “ABAB” I get only 2 nodes:

ABAB and BAB

The longest repeatead substring (“AB”) should be located by “the deepest node with at least k descendants” but this is not the case with my string, what’s wrong here?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T22:01:13+00:00Added an answer on June 4, 2026 at 10:01 pm

    If you are using some form of suffix tree which has only two nodes for the string ABAB, then it won’t work directly with the algorithm you quoted. This is what the suffix tree should look like, with O representing the nodes and $ used to mark the end of the string.

             O
            / \
           /   \
          B     AB
         /       \
        O         O
       / \       / \
      $  AB$    $  AB$
     /     \   /     \
    O       O O       O
    

    The key feature here (and which is missing from the tree you are using) is that each leaf node corresponds to a suffix of the string.

    The deepest node with at least two leaf descendants is at path AB (the depth is the substring length needed to reach that node from the root, in this case 2), and that is indeed the longest repeated substring.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Creating liquid layouts is an immense pain. Now, I totally understand that tables should
Creating a simple RPG game, first time using XNA. Trying to get my character
When creating a view and setting group by value some field, it groups only
Creating Traversals for Binary Search Tree with Recursion. void inOrder(void (*inOrderPtr)(T&)) { if(this->left !=
Creating a google map with store locations within 50 miles of user entered address.
(creating a separate question after comments on this: Javascript redeclared global variable overrides old
Creating a server-side socket will fail if I'm trying to use the same port
Creating a JApplet I have 2 Text Fields, a button and a Text Area.
When creating a new service in a WCF service project, Visual Studio will automatically
When creating iPhone apps in simulator, I sometimes see messages like Springboard failed to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.