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

  • SEARCH
  • Home
  • 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 8682431
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T21:46:21+00:00 2026-06-12T21:46:21+00:00

I read this statement in Hitchhiker’s guide to algorithms. But, I’m not able to

  • 0

I read this statement in “Hitchhiker’s guide to algorithms”. But, I’m not able to visualize it as in a LIS problem all we have is a sequence of numbers. How can I modulate it as a graph problem?

  • 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-12T21:46:22+00:00Added an answer on June 12, 2026 at 9:46 pm

    Imagine the problem of a 2D grid. You’re on the bottom left square and you need to get to the top right square. Can you imagine an acyclic DAG out of this scheme?

    Now imagine some of the squares are forbidden. Making squares forbidden may lead to a ‘lock’ (you might find yourself trapped), and now chosing which paths to follow is actually important.
    In terms of graph, you can think of forbidding squares as removing vertices, and your goal is go from the root to one specific node (the sink).

    Now let’s go back to the LIS. When solving the LIS, what you actually need to do is decide which numbers you’ll pick, and which you won’t. The restriction is that whenever you pick one number, you can’t pick any number which is smaller than this one (you pick the numbers in order).

    Now we can mix both things. Imagine that you’ll build a graph out of your sequence of numbers:

    • Every number will be a node.
    • Number-node A has an edge to number-node B iff
      • B comes after A in the sequence
      • B is greater than A in value
    • There’s a special node end
    • Every node has an edge to end

    Every path on this graph is a valid increasing subsequence. The problem of finding the LIS is now the problem of finding the longest path on this graph.

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

Sidebar

Related Questions

I have this statement: pn = r.notFound == true ? Not currently assigned :
I am little bit confused about this statement that I read in a book
i read this statement from a book i read The Document Object Model or
I just read this statement in a java book saying Objects in java reside
I have one table reports, which contains all info and read reports which just
So I read this guide a while ago and I stopped using semicolons after
According to this Wikipedia article on Google App Engine : Developers have read-only access
Please read this statement carefully: let's assume before ANY elements are added to the
On http://code.google.com/p/modwsgi/ one can read this statement Daemon mode of mod_wsgi will however only
I read this article: Logical Processing Order of the SELECT statement in end of

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.