This is a very heterodox question. But here is the context. I'm programming a computational package, and the user may write/define a cost function freely, e.g. $$ cost(x,y) = e^{|x-y|} (x-y)^2. $$ Now, the algorithm programmed only works if the cost function is convex. Here is where my question comes in. Would there be some kind of test to verify if the function is indeed convex? Mathematically, we can try to manipulate the function in order to verify whether it satisfies the convexity definition, but this scenario does not allow for such approaches. I was thinking for something like "sample some points, calculate the function and verify if the mid point is above the linear interpolation". How many points would be necessary to correctly guess that the function is convex with a certain probability? Any references on this kind of odd question (the probability that a function is convex)?
2026-04-06 22:12:32.1775513552
Is there a test for convexity?
207 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
1
There are 1 best solutions below
Related Questions in PROBABILITY
- How to prove $\lim_{n \rightarrow\infty} e^{-n}\sum_{k=0}^{n}\frac{n^k}{k!} = \frac{1}{2}$?
- Is this a commonly known paradox?
- What's $P(A_1\cap A_2\cap A_3\cap A_4) $?
- Prove or disprove the following inequality
- Another application of the Central Limit Theorem
- Given is $2$ dimensional random variable $(X,Y)$ with table. Determine the correlation between $X$ and $Y$
- A random point $(a,b)$ is uniformly distributed in a unit square $K=[(u,v):0<u<1,0<v<1]$
- proving Kochen-Stone lemma...
- Solution Check. (Probability)
- Interpreting stationary distribution $P_{\infty}(X,V)$ of a random process
Related Questions in CONVEX-ANALYSIS
- Proving that: $||x|^{s/2}-|y|^{s/2}|\le 2|x-y|^{s/2}$
- Convex open sets of $\Bbb R^m$: are they MORE than connected by polygonal paths parallel to the axis?
- Show that this function is concave?
- In resticted domain , Applying the Cauchy-Schwarz's inequality
- Area covered by convex polygon centered at vertices of the unit square
- How does positive (semi)definiteness help with showing convexity of quadratic forms?
- Why does one of the following constraints define a convex set while another defines a non-convex set?
- Concave function - proof
- Sufficient condition for strict minimality in infinite-dimensional spaces
- compact convex sets
Related Questions in COMPUTABILITY
- Are all infinite sets of indices of computable functions extensional?
- Simple applications of forcing in recursion theory?
- Proof of "Extension" for Rice's Theorem
- How to interpret Matiyasevich–Robinson–Davis–Putnam in term of algebraic geometry or geometry?
- Does there exist a weakly increasing cofinal function $\kappa \to \kappa$ strictly below the diagonal?
- Why isn't the idea of "an oracle for the halting problem" considered self-contradictory?
- is there any set membership of which is not decidable in polynomial time but semidecidable in P?
- The elementary theory of finite commutative rings
- Is there any universal algorithm converting grammar to Turing Machine?
- Is the sign of a real number decidable?
Trending Questions
- Induction on the number of equations
- How to convince a math teacher of this simple and obvious fact?
- Find $E[XY|Y+Z=1 ]$
- Refuting the Anti-Cantor Cranks
- What are imaginary numbers?
- Determine the adjoint of $\tilde Q(x)$ for $\tilde Q(x)u:=(Qu)(x)$ where $Q:U→L^2(Ω,ℝ^d$ is a Hilbert-Schmidt operator and $U$ is a Hilbert space
- Why does this innovative method of subtraction from a third grader always work?
- How do we know that the number $1$ is not equal to the number $-1$?
- What are the Implications of having VΩ as a model for a theory?
- Defining a Galois Field based on primitive element versus polynomial?
- Can't find the relationship between two columns of numbers. Please Help
- Is computer science a branch of mathematics?
- Is there a bijection of $\mathbb{R}^n$ with itself such that the forward map is connected but the inverse is not?
- Identification of a quadrilateral as a trapezoid, rectangle, or square
- Generator of inertia group in function field extension
Popular # Hahtags
second-order-logic
numerical-methods
puzzle
logic
probability
number-theory
winding-number
real-analysis
integration
calculus
complex-analysis
sequences-and-series
proof-writing
set-theory
functions
homotopy-theory
elementary-number-theory
ordinary-differential-equations
circles
derivatives
game-theory
definite-integrals
elementary-set-theory
limits
multivariable-calculus
geometry
algebraic-number-theory
proof-verification
partial-derivative
algebra-precalculus
Popular Questions
- What is the integral of 1/x?
- How many squares actually ARE in this picture? Is this a trick question with no right answer?
- Is a matrix multiplied with its transpose something special?
- What is the difference between independent and mutually exclusive events?
- Visually stunning math concepts which are easy to explain
- taylor series of $\ln(1+x)$?
- How to tell if a set of vectors spans a space?
- Calculus question taking derivative to find horizontal tangent line
- How to determine if a function is one-to-one?
- Determine if vectors are linearly independent
- What does it mean to have a determinant equal to zero?
- Is this Batman equation for real?
- How to find perpendicular vector to another vector?
- How to find mean and median from histogram
- How many sides does a circle have?
Heuristic argument to prove that such a probability can’t be defined in a meaningful way.
Let $\Omega$ be the set of maps that can be defined with a program. $\Omega$ is countable infinite. Therefore if $K \subseteq \mathbb R$ is a compact, the subset $\Omega_K \subseteq \Omega$ of continuous maps defined on $K$ is also countable.
Now, to get a probability space $(\Omega_K, \mathcal A, P)$ on $\Omega_K$, we have to define a probability function $P$ on $\Omega_K$. $P$ can’t be constant and different of zero as otherwise the probability of the whole space $\Omega_K$ would be infinite. $P$ can’t either be equal to zero.
Therefore $P$ has to be non constant. You could attach a probability that would depend on the length of the program that defines the function or something similar (and the probability decreases to zero as the length of the program increases)… but then the probability for convexity will depend on your programming language!
Not saying that it is impossible. But rather that it would be rather meaningless.
Then assuming that such a (meaningless) probability has been defined, you raised a second point, about the number of sampling points required to test convexity. You’ll enter here other difficulties. I.e. that the answer depends on the chosen points, and nice topics like that.