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 8482373
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T19:48:36+00:00 2026-06-10T19:48:36+00:00

Reading algorithms by self using Robert Sedwick book in C++ A recursive function that

  • 0

Reading algorithms by self using Robert Sedwick book in C++

A recursive function that divides a problem of size N into two
independent (nonempty) parts that it solves recursively calls itself
less than N times.

If the parts are one of size k and one of size N-k, then the total
number of recursive calls that we use is T(n) = T(k) + T(n-k) + 1, for
N>=1 with T(1) = 0.

The solution T(N) = N-1 is immediate by induction. If the sizes sum to
a value less than N, the proof that the number of calls is less than
N-1 follows from same inductive argument.

My questions on above text are

  1. How author came with solution T(N) = N-1 by induction? Please help me to understand.
  2. What does author mean by “If the sizes sum to a value less than N, the proof that the number of calls is less than N-1 follows from same inductive argument” ?

I am new to mathematical induction so having difficulty in understanding.

Thanks for your time and help

  • 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-10T19:48:38+00:00Added an answer on June 10, 2026 at 7:48 pm

    (1) By induction:

    T(1) = 0 (base)
    T(N) = T(k) + T(N-k) + 1 (definition of problem)
    

    We assume for each n < N, we get T(n) = n-1

    Since both k and N-k are smaller then N, we get from the induction hypothesis:

    T(N) = (k-1) + (N-k-1) + 1 = N-1
             ^        ^
            T(k)    T(N-k)
    

    (2)
    Using the same argument:
    if

    T(N) = T(k) + T(m) + 1 where k+m < N
    

    Then the same proof will lead to T(N) < N-1

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

Sidebar

Related Questions

I am reading Algorithms book written by Robert Sedwick. Note: s is source and
I am reading about queues in robert sedwick book on algorithms When the items
I am reading a book by Robert Sedwick Algorithms in C++. Following is example
I'm reading about STL algorithms and the book pointed out that algorithms like find
I have question that comes from a algorithms book I'm reading and I am
I've just now started reading an Algorithms book that defined Graphs as follows: Graphs
I am reading about list traversals in Algorithms book by RobertSedwick. Function definitions are
I am reading about network flow algorithms in Robert Sedwicks book on Graph algorithms.
I'm reading the Cormen algorithms book (binary search tree chapter) and it says that
So I'm reading Robert Sedgewick's Algorithms 4th ed. book and the methods for finding

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.