Upperbound refers to the maximum limit or the highest capacity a system can handle.
Questions tagged [upperbound]
137 questions
2
votes
3 answers
Fast integer sqrt upper bound approximation
This is a question, regarding my homework, specifically on NASM.
I am writing an algorithm to find the least whole factor of a number. (Greater than 1)
In pseudo-code it can be summed up as:
if(n%2==0)
return 2;
for(i=3; i <= n/2; i+=2)
…

RuRo
- 311
- 4
- 17
2
votes
2 answers
upper_bound With binary_function Visual Studio 2008 Bug?
1st of all, yes, I am stuck using Visual Studio 2008, and I believe this bug is specific to Visual Studio 2008.
I'm trying to write a functor to compare just 1 member of my struct so I can do upper_bound on a vector of said structs which is sorted…

Jonathan Mee
- 37,899
- 23
- 129
- 288
2
votes
1 answer
FInding upperbound for a f(n)
I am trying to understand the concepts of programming from base. I encountered two examples.
case1: Find upper bound of f(n)=3n+8
Its very clear that f(n)->3 when n-> infinite.
So 3n+8 should be less than or equal to 4n . So I can take c as…

codeX
- 4,842
- 2
- 31
- 36
2
votes
2 answers
Algorithms, upper/lower bounds, and best/worst case
For algorithms, how are the bounds related to best/worst cases? Is the worst case synonymous with upper bound, and best case synonymous with lower bound? Or can you at least derive one from the other? Or are they not related at all?

K-Smoove
- 21
- 1
- 3
2
votes
1 answer
Distributing stones into buckets (not trivial) / Integer Bin Packing Upper bound
Suppose you have k stones and m stone types
You have f1 stones from the first type, f2 from the second and so on.
(i.e. sum(f_i) = k).
In addition, we are given a positive integer r.
What is the minimal number of buckets needed, such that we could…

user3095429
- 21
- 3
2
votes
3 answers
C++ STL Algorithms upper_bound() that is not strictly greater
Unlike lower_bound, upper_bound does not return an iterator to the element if it compares equivalent to value, but only if it compares strictly greater.
Is there an alternative if I want an upper_bound algorithm that is greater than or equal to.

user788171
- 16,753
- 40
- 98
- 125
1
vote
1 answer
Working with Generic Types in Java(comparing and sum using the same type)
I have been researching towards the answer to a tricky question in my first year java course, specifically i need to make a program capable of both summing the elements in a generic list, and finding the highest and lowest in the list.
I am…

user1297003
- 11
- 1
1
vote
1 answer
Lsqcurvefit, upper bounds that depend on other upper bounds
In trying to keep the question simple, I'm using MATLAB and trying to create an upper bound for lsqcurvefit to use where the sum of my upper boundaries on the parameters cannot exceed 100.
Something like
lb = [0, 0, 0];
ub = [a, b, c];
where a+b+c <…

BradyK
- 11
- 1
1
vote
1 answer
OutOfMemoryError when trying to find the largest kth element in a large array
I am trying to solve a task that asks me to find the largest kth element in an unsorted array of length n (n might be as large as 5,000,000; elements in the array are distinct). Due to the task limits, I cannot use any sorting method, PriorityQueue,…

user18512699
- 11
- 1
1
vote
2 answers
Lower bound from the right in a B-tree
I have a B-tree and I'd like to, given an arbitrary parameter key, figure out what the greatest data key less then or equal to the parameter key. In other words, I want it to look to the left to figure out what key it should use in O(log n).
I've…

Neil
- 1,767
- 2
- 16
- 22
1
vote
2 answers
incorrect output when using C++ lower/upper_bound function with custom compare operator
I've been experimenting with the "lower_bound()/upper_bound()" functions in C++ w.r.t. arrays/vectors, and I get incorrect results when applying custom compare operators to the function.
My current understanding (based on…

James Wang
- 11
- 1
1
vote
3 answers
Lower and Upper Bound in case of Decreasing/Non-ascending vector
I understood the concept of Lower and Upper found for an Increasing/Ascending array.
i.e
Lower Bound: iterator pointing to the first element in the range [first, last) >= Value
Upper Bound:
iterator pointing to the first element in the range…

MARCOS
- 21
- 1
- 7
1
vote
0 answers
How to get Confidence Interval For One Point On Regression Line using python?
How do I get the CI for one point on the regression line?I am using statsmodels library OLS function for my analysis. I am trying to draw the upper and lower bound of the confidence interval for one point first then draw it for all points of the…

Priya Malek
- 11
- 1
1
vote
1 answer
How do upper_bound and lower_bound work with comparator in c++?
I was just curious to know how lower_bound and upper_bound functions in C++ standard library work using comparators. I could not understand how they actually work using the documentation given at cppreference.com.
For ex.
vector arr = {1, 1, 2,…

Smile001
- 147
- 3
- 9
1
vote
1 answer
Is Collections.binarySearch(list,key)*-2 is lower_bound for key when key not found in java List?
Consider the following code .
List list = new Random().ints(10,1,50).boxed().collect(Collectors.toList());
list.sort(Comparator.naturalOrder());
System.out.println(list);
System.out.print("Enter key :");
…
user8838577