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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T16:17:23+00:00 2026-06-07T16:17:23+00:00

I have an iteration algorithm, where at each iteration the amount of computation decrease

  • 0

I have an iteration algorithm, where at each iteration the amount of computation decrease gradually. Here is an illustration of my algorithm:

Input size: n and Total iteration = k

iter 1: time taken -> f1 * n
iter 2: time taken -> f2 * n
iter 3: time taken -> f3 * n
...
iter k: time taken -> fk * n

where f1 > f2 > f3 >...> fk and 0 <= f1, f2,...,fk <= 1

Question: What is the time complexity of this algorithm? is it Big-O(klog n)

Update:

I think the question seems vague. I’ll explain it in words:

Input for my algorithm is n and I’ll run it over k iterations. but on each iteration the input size reduces by a factor which is unknown. there is no pattern in the reduction.

eg :

iter 1: input size = n (always n)
iter 2: input size = n/2 (can change)
iter 3: input size = n/5 (can change)
iter 4: input size = n/8 (can change)
...
iter k: input size = n/10 (can change)
  • 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-07T16:17:25+00:00Added an answer on June 7, 2026 at 4:17 pm

    EDIT

    More specifically:

    If the denominators of your example:

    iter 1: input size = n (always n)
    iter 2: input size = n/2 (can change)
    iter 3: input size = n/5 (can change)
    iter 4: input size = n/8 (can change)
    ...
    iter k: input size = n/10 (can change)
    

    are strictly integers, then it is O(n*log k ).

    Here’s why. For a sequence Xn to be O(Yn), there must exists some M, a real number, and m, an integer, such that Xn < M*|Yn| for all n > m.

    Now consider the sequence K = {1, 1/2, 1/3, … 1/k}. Also consider the sequence N = {1, 2, 3, 4…}.

    Now let’s let Yn = N^t * K (that’s the outer left product of N and K). This sequence Yn is always greater than your sequence, regardless of the values of the fi’s.

    So Xn < 1 * |Yn|, where Yn is the harmonic series times n. As amit pointed out, Yn falls into O(n*log k), so Xn does also. Since we couldn’t have bounded Xn any closer above, our best limiting approximation for Xn is also O(n*log k).

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

Sidebar

Related Questions

I have an algorithm which is executted in task from tpl. From each iteration
I have implemented an iterative algorithm, where each iteration involves a pre-order tree traversal
I have loop and each iteration of Hash looks like this: [1, {:clid=>1, :nvz=>4,
I have some code that runs a model in a loop. Each iteration of
I have to implement the value iteration algorithm for finding the optimal policy for
I have a list iteration in python defined like this: for i in range(5):
I'm trying to query by iteration but our iteration names have special characters (e.g.
I have read that LinkedHashMap has faster iteration speed than HashMap because its elements
After some recursive function I have an array: first iteration: Array ( [category_id] =>
I have a list of objects of type A. In a first iteration I

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.