<a name="docA001">Index beginIndex this file
2009-06-08-19-10 start
This file http://freeman2.com/tute0008.htm
is Freeman's reading notes. Although Freeman
always keep correct view point. But Freeman's
capability is limited, plus no one proofread
this file. Then you can still find wrong view
point. When read, please put question mark as
often as possible. If you suspect any view
point wrong, please ask a math expert near by.
<a name="docA002">,<a name="textbook">
This file is a note for reading inequality
book written by ProfessorJ. MichaelSteeleThe Cauchy-Schwarz Master Class★★★★★
Below use 'textbook' as abbreviation.
Freeman also read web pages online, and will
indicate the source URL at discussion point.
<a name="docA003">
Freeman study mechanical engineering.
Engineering mathematics do not teach
inequality. Above book is first inequality
book. First time read, it was very hard.
Although high school time learned
a*a + b*b >= 2*a*b
But this little knowledge do not help.
<a name="docA004">
This file follow textbook chapter section
order, but not continuous, Freeman skip
those uncertain sections/problems.
This file first function is to learn
inequality. Second function is to learn
how to use html code to write math
equations.
<a name="docA005">Index beginIndex this file
On 2009-01-27-10-08 Freeman accessed
the next page
http://www.sftw.umac.mo/~fstitl/10mmo/inequality.html
save as sftw.umac.mo_text_math_eqn_good.htm
Above page is the main reference for html
math equation.
In order to let reader to build html math
equation, previous file tute0007.htm page
end has math symbol and internal code.
This file third function is to display how
to draw curves in web page. The main engine
is XYGraph v2.3 - Technical Figures
Thank you for read Freeman's inequality page.
2009-06-08-19-47 stop
<a name="docA006">
2009-08-23-15-00 start
□ Exercise 1.14 solution
Exercise 1.14 problem (a) is solved by hint
Exercise 1.14 problem (b) is out of LiuHH's
reach. What is "cardinality of a set B⊂Z3" ?
Without clear understand the definition,
LiuHH is unable to solve problem (b)
LiuHH major in mechanical engineering.
LiuHH is mathematics admirer and outsider.
<a name="docA007">
To solve problems in
The Cauchy-Schwarz Master Class
LiuHH's goal is to solve 50% of the exercise
problems. In reality, solve 40% is good enough.
Please do not be surprise that LiuHH skip some
text section, skip some problems.
2009-08-23-15-12 stop
2009-12-04-17-45
<a name="ch06a001">Index beginIndex this file
■■Chapter 06: Convexity ~~ The Third Pillar
■ Convex set and convex function
Many natural phenomenon can be described
by equilibrium equation. But they can
also be described by minimization theory.
Maximization or stationary theory are
equally well tool for different problem.
<a name="ch06a002">
If we have an object function, which is
to be minimized. In general case, there
are multiple solutions. Each solution
is a minimum value point relative to its
neighborhood. This mean that the solution
is a local solution, may not be global
minimum.
<a name="ch06a003">
For example, assume object function is
y(x)=sin(x) for x>=0, then
x=270,630 ... etc (degree) are minimum
value points. Minimum function value is
-1. If you are non-science major reader
please pay attention to next two lines
<a name="ch06a004">
Minimum value points are 270,630,... deg
above is first line, next is second line
Minimum function value is -1
Both line use 'minimum' as adjective.
First line is x=270 degree get minimum
Second line is sin(270)=-1 is smallest
y(x)=sin(x) value
First line is input for sin(x)
Second line is output from sin(x)
Both link to minimum,
one is where function is defined (input),
other one is function value (output).
<a name="ch06a005">
Above example is trivial, all minimum
are equal -1. In non-trivial case. We
can still find many local minimum value
answer. Which one is the global minimum?
We have to compare all local minimum and
find the global minimum.
Whether we found all possible local min.
whether there are other min. points we
missed?
These are general minimization process
headache points.
<a name="ch06a006">
Why convex set and convex function are
interesting?
If we have a minimization problem.
If we know this problem has convex set
as its objective function domain (input)
and if this problem has convex function
as its objective function (output) then
<a name="ch06a007">
there are theorems tell us that
convex minimization problem solution is
unique. (therefore global, no second!)
convex minimization is more restricted
than regular minimization. But if we
can formulate a problem as a convex
minimization equations, the answer is
worry-free.
2009-12-04-18-35 here
<a name="ch06a008">Index beginIndex this file
■ What is convex set, convex function?
Objective function's variables defined
region is called "domain". For example
function log(x) require x>0, so
log(x) domain is x>0. For a specific
problem, we can narrow down the domain.
The narrowed domain must stay in x>0.
<a name="ch06a009">
Convex set is a function's domain with
the following requirement:
If D1 is function f(x)'s domain,
if both xa and xb are in D1
if t is a real number in [0,1], then
the point
x0=t*xa+(1-t)*xb ---eqn.AP001
is also in domain D1.
(otherwise, it is not convex set,
click ConvexB for 1-D case)
<a name="ch06a010">
Above is one dimension,
next is two dimension.
If D2 is function f(x,y)'s domain,
if both (xa,ya) and (xb,yb) are in D2
if t is a real number in [0,1], then
the point (x0,y0) defined by next line
t*(xa,ya)+(1-t)*(xb,yb) ---eqn.AP002
is also in domain D2<a name="ch06a011">
eqn.AP002 can be written in two x,y
component equation
x0=t*xa+(1-t)*xb ---eqn.AP003
y0=t*ya+(1-t)*yb ---eqn.AP004
How about three dimension problem?
Add a z component. For high dimension
it is complicated to write each
component equation. Many use vector
x for [x,y,z] or [x1,x2,...,xn] for
higher dimension. Then
eqn.AP002 can be written as eqn.AP001
with the understanding that x is a
vector represent all variables.
2009-12-04-19-10 here
<a name="convex01"> 2009-12-04-20-30
Star that you can shape
Number of star corners
No chord
bottom to top ratio
<a name="ch06a012">
2009-12-05-10-42 start
Above is a drawing indicate
one dimensional convex set, red straight
line, whole domain only one section.
one dimensional non-convex set, blue
straight line, whole domain has two
sections. because of two disconnected
section, if pick first in-domain point
from left section and pick second in-
domain point from right section. Then
straight line connect these two points
must pass undefined section. This
situation cause non-convex set.
<a name="ch06a013">
First quadrant blue star has similar
situation. From two in-domain points
draw a straight line, not whole line
stay in domain. This situation cause
non-convex set.
Red circle (two dimensional domain)
and red line (one dimensional domain)
are all convex set.
2009-12-05-10-52 here
<a name="ch06a014">Index beginIndex this file
2009-12-05-18-22 start
■ What is the difference between
convex set
and
convex function ?
All function use parameter and give us
a result. Function parameter is input
values to function. The result we get
is function output.
<a name="ch06a015">
convex set is defined parameters which
satisfy convex set rules.
convex function is a transformation
formula which satisfy convex function
rules.
When we talk about convex set, we talk
about function input variables.
When we talk about convex function, we
talk about function output values.
<a name="ch06a016">
The definition of a convex set (input)
use a straight line.
The definition of a convex function
(output) also use a straight line.
Let us see convex set definition from
online professional web page.
(compare with LiuHH wrote eqn.AP001)
2009-12-05-18-38 here
<a name="ch06a017">
2009-12-03-13-04 LiuHH access next page
http://www.stanford.edu/class/cs229/section/cs229-cvxopt.pdf
page 1/14 (168,829 bytes)
[[
2 Convex Sets
We begin our look at convex optimization
with the notion of a convex set.
<a name="ch06a018">
Definition 2.1 A set C is convex if, for
any x, y ∈ C and θ ∈ R with 0 ≤ θ ≤ 1,
θx + (1 − θ)y ∈ C ---eqn.AP005
Intuitively, this means that if we take
any two elements in C, and draw a line
segment between these two elements, then
every point on that line segment also
belongs to C.
<a name="ch06a019">
Figure 1 shows an example of one convex
and one non-convex set. The point
θx+(1−θ)y ---eqn.AP006
is called a convex combination of the
points x and y.
]]
Figure 1 is same as ConvexA drawing
<a name="ch06a020">Index beginIndex this file
■ Straight line? what ill if use curve?
Here is a question:
Why use straight line to define convex
set? If use curve connect two in-domain
points and go around a corner, what is
the disappointing result?
<a name="ch06a021">
LiuHH found above question, search for
web pages, use Google exact key word
convex "Jensen's inequality" filetype:pdf
Results 1 - 30 of about 32,700 for convex "Jensen's inequality" filetype:pdf with Safesearch on. (0.43 seconds)
and
if "not a convex" set OR function filetype:pdf
Results 1 - 30 of about 1,700,000 for if set OR function "not a convex" filetype:pdf with Safesearch on. (0.49 seconds)
and
if "not a convex" optimiz OR minimiz filetype:pdf
Results 1 - 28 of 28 for if optimiz OR minimiz "not a convex" filetype:pdf with Safesearch on. (0.46 seconds)
and
if "were not convex" optimization OR minimization filetype:pdf
Results 1 - 23 of 23 for if optimization OR minimization "were not convex" filetype:pdf with Safesearch on. (0.38 seconds)
<a name="ch06a022">
read many pages, no one direct talk
about above question. However, from
reading, LiuHH understand few points
as following
1. if a problem use convex set (domain)
and use convex function. Then answer
is unique. No second answer.
2. if not use straight line to define
convex set. then unique answer is
NOT guaranteed.
<a name="ch06a023">
3. if not use straight line to define
convex function. then minimum answer
is NOT guaranteed. If we use a hill
top curve replace straight line to
define convex function, if function
is a smaller hill than the hill curve
we use, We could get a local maximum
when search for minimum.
<a name="ch06a024">
Next three drawing buttons "ConvexB",
"ConvexC", "ConvexD" illustrate above
point 1 and 2. Point three is easy to
realize.
2009-12-05-19-33 here
<a name="ch06a025">
"ConvexB" is one dimensional problem.
Function has just one variable x.
Constraint to x is
x*x>=1 ---eqn.AP007
x*x<=4 ---eqn.AP008
These two constraint created non-convex
domain [-2,-1] and [1,2]. Two sections
are disconnected. Each section has a
minimum function value point. Minimum
point is not unique.
<a name="ch06a026">Index beginIndex this file
"ConvexC" Draw an objective function
Obj1= x*x+y*y ---eqn.AP009
Here Obj1 value is non-constant.
If Obj1 were a constant, eqn.AP009
is an equality constraint equation.
Not an objective function any more!
If require Obj1=5, how can I minimize
a given 5 value? Objective function
value must be variable.
Each equal-value-objective contour is
a red dot circle. On the other hand
<a name="ch06a027">
constraint equation constant value
can NOT be changed ! We always see
objective function contour curves.
We never see constraint equation
"contour curves".
(just one value, contour what?)
<a name="ch06a028">
In the drawing (click ConvexC), the
thicker red circle tangent with blue
circle. This is minimum value answer.
Blue circle is function variable x,y
allowed region. It is called domain
of function Obj1.
<a name="ch06a029">
Blue circle is convex set. Any two
points in domain connect a straight
line. Whole line stay in domain.
We can find only one minimum value
point "A". Second minimum point is
impossible in convex minimization
problem.
<a name="ch06a030">
"ConvexD" same as "ConvexC" but blue
circle change to a new moon shape.
This is non convex set. Straight
line from point B to point A pass
undefined outside region.
Point A is a global minimum.
Point B is a local minimum.
Answer uniqueness disappeared.
If shorter arc between A and B change
to a straight line boundary, then
local minimum B can not hide from
global minimum A. Local minimum B
can not exist, we re-gain answer
uniqueness.
<a name="ch06a031">
"ConvexC" and "ConvexD" are top view
of a 3-D problem. Objective function
(red circles) look like an ice cream
cone. Blue domain is a cookie put next
to the cone. We want find lowest point
on the ice cream cone direct above the
cookie. (this is constraint)
<a name="ch06a032">
If function domain has no limit, then
global minimum is 0 at (x,y)=(0,0)
0*0+0*0=0. But with constraint (above
cookie), (x,y)=(0,0) is excluded. Must
find a different answer.
for "ConvexC" min f(x)=2.5 at point "A"
for "ConvexD" min f(x)=3.0 at point "A"
2009-12-05-20-12 stop
<a name="ch06a033">Index beginIndex this file
2009-12-06-09-50 start
■ convex set verify-equation is a
straight line
Now explain that convex set equation
x0=t*xa+(1-t)*xb ---eqn.AP001
is a straight line. Assume we have
3-D space point A=(xa,ya,za)
and space point B=(xb,yb,zb)
Above two points are given within a
function domain.
<a name="ch06a034">
For space point C=(xc,yc,zc) satisfy
convex set equation eqn.AP001,
we have
xc=t*xa+(1-t)*xb ---eqn.AP010
yc=t*ya+(1-t)*yb ---eqn.AP011
zc=t*za+(1-t)*zb ---eqn.AP012
Here point A and B are given, both
be constant. 't' is a variable, and
point C vary following 't'.
<a name="ch06a035">
If (xa,ya,za) and (xb,yb,zb) are
arbitrary, it is not an evident
explanation. We can
put point A at (xa,ya,za)=(0,0,0) and
put point B at (xb,yb,zb)=(1,0,0)
without loss generality.
<a name="ch06a036">
(or equivalently, to say
we put coordinate system original
point [0,0,0] on point A, and put
coordinate system [1,0,0] on B)
<a name="ch06a037">
eqn.AP010 to eqn.AP012 simplified to
xc=t*0+(1-t)*1 ---eqn.AP013
yc=t*0+(1-t)*0 ---eqn.AP014
zc=t*0+(1-t)*0 ---eqn.AP015
Point C's y component yc is always
zero, see eqn.AP014
and z component zc is always zero
see eqn.AP015.
<a name="ch06a038">
Point C vary on x-axis, eqn.AP013.
Therefore point C must stay on a
straight line between A and B.
(assume we have a straight x-axis)
2009-12-06-10-18 stop
<a name="ch06a039">Index beginIndex this file
2009-12-06-12-23 start
■ Straight line help proof, go
around the corner curve not help
Another reason that convex set
definition must use straight line
and can not use curve between A
and B, can not walk around the
corner. The reason is that to
prove convex problem (convex set
for domain and convex function for
output) has unique solution, we
<a name="ch06a040">
need draw a straight line from
point B to point A see ConvexD
drawing. Only straight line help
us finish the proof. Curve walk
around the corner can not prove
the uniqueness theory. Reader
can find this proof in any optimal
design textbook or linear/nonlinear
programming textbook.
2009-12-06-12-34 stop
<a name="ch06a041">
2009-12-06-10-55 start
Above is all about convex set.
A function variable defined space is
called domain. If a domain satisfy
eqn.AP001 or eqn.AP005 condition,
this domain is called convex set.
<a name="ch06a042">Index beginIndex this file
■ Convex set and convex function has
different dimension
convex set is function's input.
convex function is function's output.
they are quite different. For example
a gravity equation, input is distance
and mass, output is force. Second
example, if we use a salary function,
its input is working time in hour unit
its output is salary in dollar unit.
Input distance output force are different.
Input hour output dollar are different
Main point is that convex set and
convex function are two different
term dimension, in two different world.
<a name="ch06a043">
If a function can be expressed by a
mathematics equation, we can draw it.
Not all functions are convex. First,
we need to define what is a convex
function.
<a name="ch06a044">
2009-12-01-21-26 LiuHH accessed
http://www.cse.yorku.ca/~kosta/CompVis_Notes/jensen.pdf
page 1/2 has next ( 91,989 bytes)
[[
Definition Let f(x) be a real valued
function defined on the interval
I = [a, b]. f is said to be
convex if for every x1,x2 ∈ [a, b]
and 0 ≧ λ ≧ 1, (typing error, LiuHH note)
f(λx1 + (1 − λ)x2) ≧ λf(x1) + (1 − λ)f(x2)
<a name="ch06a045">LiuHH change from above to next
and 0 ≦ λ ≦ 1,
f(λx1 + (1 − λ)x2) ≦
λf(x1) + (1 − λ)f(x2) ---eqn.AP016
A function is said to be strictly convex
if the inequality is strict for x1≠x2.
(LiuHH inserted "in" at above line)
<a name="ch06a046">
Definition f(x) is said to be concave
(strictly concave) if −f(x) is convex
(strictly convex).
Intuitively, the definition of convexity
states that function falls below never
above the straight line between the
points (x1, f(x1)) to (x2, f(x2))
(see Fig. 1).
<a name="ch06a047">
Theorem 0.1 If f''(x) exists on [a, b]
and f''(x) ≧ 0 on [a, b] then f(x) is
convex on [a, b].
]]
2009-12-06-11-39 here
<a name="ch06a048">Index beginIndex this file
2009-12-06-12-03 start
Above section is copied from
http://www.cse.yorku.ca/~kosta/CompVis_Notes/jensen.pdf
LiuHH modified few points, reader should
judge whether these modifications are
correct.
<a name="ch06a049">
The reason to include yorku.ca/~kosta
page is that this file page 2/2 has a
nice graph
Figure 1: Illustrative example of convexity.
It point out
f(x2)
λf(x1) + (1 − λ)f(x2)
f(x1)
f(λx1 + (1 − λ)x2)
four value exact locations.
Not seen in other collected pages.
<a name="ch06a050">
Above is yorku.ca/~kosta web page.
Next is ee.ucla.edu/ee236b web page
2009-12-01-21-18 LiuHH accessed
http://www.ee.ucla.edu/ee236b/lectures/functions.pdf
page 1/16 has next (156,541 bytes)
[[
<a name="ch06a051">
Definition
f : Rn → R is convex if dom f is a
convex set and
f(θx + (1 − θ)y) ≤
θf(x) + (1 − θ)f(y) ---eqn.AP017
for all x, y ∈ dom f , 0 ≤ θ ≤ 1
graph here, can not copy
<a name="ch06a052">
• f is concave if −f is convex
• f is strictly convex if dom f is convex and
f(θx + (1 − θ)y) < θf(x) + (1 − θ)f(y)
for x, y ∈ dom f , x 6= y, 0 < θ < 1
Convex functions 3–2
]](last line is page bottom note)
<a name="ch06a053">Index beginIndex this file
■ Convex set straight line vs.
Convex function straight line
Convex set definition use straight line.
Convex function definition use straight
line too.
The difference is that
<a name="ch06a054">
Convex set definition straight line not
involve inequality. Just say all
points on line belong to domain.
Convex function definition straight line
DO involve inequality. Require
that function curve/surface below
straight line. Below is less than.
Below is inequality.
(certainly, Convex set straight line is
where you spend time work for living,
Convex function straight line is where
you receive your salary.)
2009-12-06-12-21 stop
Each seq. has
numbers
If sequence 1 proportional to sequence 2,
inequality become equality.
proportional
=
(box12 change)
Box11 for 0<m=x1≦x2≦...≦xn=M<∞
Box12 for p1+p2+...+pn=1 where pk≧0 for all k=1,2,...,n
x min:
, x max:
; y min:
, y max:
;
x min, x max, y min, y max is coordinate axis range
Graph title:
domain left:
,
domain right:
;
steps:
domain left and domain right is where function defined.
domain left <= x left <= x right <= domain right
If steps=60, draw one curve by 60 short lines. Fast vary function
need larger steps. For example gamma(x) in x=[-5,0]
x left, x right are chord two ends
W:
H:
x left:
, x right:
, t value:
t∈[0,1]
f(x) =
f'(x) =
f''(x)=
Show label
Example: convex,
concave,
; both,
You can not draw other curve here. But you can
goto [Modify 606] define your equation
and click [Draw] within yellow stripe.
(Do not click [Draw 606]) 2009-10-08-17-08
<a name="box23">
Box 23,
95,06,13,23,44
Javascript support the following math functions
[[
Math.E 2.718281828459045091 Euler's constant
Math.LN2 0.6931471805599452862 Natural log of 2
Math.LN10 2.302585092994045901 Natural log of 10
Math.LOG2E 1.442695040888963387 Log base-2 of E
Math.LOG10E 0.4342944819032518167 Log base-10 of E
Math.PI 3.141592653589793116 PI
Math.SQRT1_2 0.7071067811865475 Square root of 0.5
Math.SQRT2 1.414213562373095145 Square root of 2
Math.random() method takes no parameters
Math.abs(val) Absolute value of val
Math.acos(val) Arc cosine (in radians) of val
Math.asin(val) Arc sine (in radians) of val
Math.atan(val) Arc tangent (in radians) of val
Math.atan2(val1, val2) Angle of polar coordinates
Math.ceil(val) Next integer greater than or equal
Math.cos(val) Cosine of val
Math.exp(val) Euler's constant to the power of val
Math.floor(val) Next integer less than or equal to
Math.log(val) Natural logarithm (base e) of val
Math.max(val1, val2) The greater of val1 or val2
Math.min(val1, val2) The lesser of val1 or val2
Math.pow(val1, val2) Val1 to the val2 power
Math.random() Random number between 0 and 1
Math.round(val) N+1 when val >= n.5; otherwise N
Math.sin(val) Sine (in radians) of val
Math.sqrt(val) Square root of val
Math.tan(val) Tangent (in radians) of val
]]
for
hyperbolic cosine, use
0.5*(Math.exp(x)+Math.exp(-x))
hyperbolic sine, use
0.5*(Math.exp(x)-Math.exp(-x))
Step function: stepf(a,b)
If a<b return 0 (close)
otherwise return 1 (open)
Any number multiply by 0 get 0
that is to close.
Any number multiply by 1 get itself
that is to open.
Above is to multiply stepf()
If add or subtract stepf() then it
is shift curve up/down.
One of a,b must be variable. If
both a and b are constant, then
stepf() has no meaning. 9507211227
Gamma function gamma(t)
If t is an integer gamma(t) is (t-1)!
gamma(t) let factorial become
continuous.
gamma(t) is searched from Internet.
9507211232
2006-06-23-12-41 start
This program is received on 2006-06-12
2006-06-12-18-14
http://www.bigwebmaster.com/3051.html
2006-06-12-18-21
http://www.structura.info/XYGraph/XYGraph.zip
=====
2006-10-23-09-08 start
Start from 2006-10-17 write this program.
Its URL is
http://freeman2.com/graph09e.htm
This file has same source as previous
http://freeman2.com/graph03e.htm
Both from XYGraph v2.3
http://www.structura.info/XYGraph/XYGraphDemo.htm
Freeman take their source code write a
better version.
graph03e.htm is mainly introduction
All graph use one drawing board.
graph09e.htm is for application. Each
graph has its own drawing board.
"has its own drawing board" is Freeman's
need. This function allow user to draw
multiple graph in one web page. Now
upload this program to Internet let
everyone use. Please click "Draw 606"
to see how to use.
graph09e.htm can dynamically create input
form and also one more change
graph03e.htm must use "Math.cos(t)"
Where "Math." can not drop.
graph09e.htm allow to use cos(t)
"Math." can be dropped.
Because graph09e.htm add
[[
9510222211 use 'with(Math){' and '}'
]]
graph03e.htm follow XYGraph v2.3
must use "Math."
graph09e.htm modified by Freeman
no need to use "Math."
graph09e.htm still has limitation.
Curve allow maximum 5.
Arrow allow maximum 1.
Label allow maximum 1.
Equation can not be modified
Especially equation constant and
number of terms.
graph03e.htm allow variable constant
'a', 'b' to have five
different values. (one
equation family five
members)
graph09e.htm broader this property to
five arbitrary functions.
If you need function exceed above
limitation, you must write code for it.
Examples can be found at
http://freeman2.com/graph03e.htm
find function Calculate0(PlotID){.....}
five examples.
Expect graph09e.htm will be used in
http://freeman2.com/tutc0004.htm
This is Freeman's tutor page in Chinese.
Welcome visit Freeman site often.
Freeman 2006-10-24-18-01
<a name="ch06a055">Index beginIndex this file
2009-12-07-17-26 start
■ Two interpolations, one input, one output
Let us look at
f(θx + (1 − θ)y) ≤
θf(x) + (1 − θ)f(y) ---eqn.AP017
for all x, y ∈ dom f , 0 ≤ θ ≤ 1
AP017 and AP018 are same equation,
AP018 added sub 0 to distinguish x0
from general variable x and mid
point xe. AP018 is used in graph
ConvexE example 4.
<a name="ch06a056">
f(θx0 + (1 − θ)y0) ≤
θf(x0) + (1 − θ)f(y0) ---eqn.AP018
This equation is a linear interpolation
for input x as function of θ
θ*x0+(1−θ)*y0 ---eqn.AP019
x0 and y0 are given point on x-axis
x0, y0 are constant, can not be changed.
A linear interpolation for output
f(x) as function of θ
[ yes ! f(x) become f(θ) , x is locked
and θ is free to vary. f() always
serve for variables ! 200912081208]
f(θ)=θ*f(x0)+(1−θ)*f(y0) ---eqn.AP020
xe = θ * x0 +(1−θ)* y0 ---eqn.AP019
put them side by side for easy compare.
<a name="ch06a057">
eqn.AP019 generate a mid point xe,
which is in function domain (x-axis,
input, working hour.)
xe will be used to evaluate function
value
f(xe)=f(θx0+(1−θ)y0) ---eqn.AP021
[ f(xe) is on function axis, salary]
Since f(x) is a bowl shape curve.
f(xe) is on the curve
(point 'C' ConvexE example 4)
function curve is below straight
line between points A and B.
<a name="ch06a058">
Above find point 'C' on curve.
Below find point 'D' on straight
line AB
The expression
θf(x0) + (1 − θ)f(y0) ---eqn.AP022
say
at x=x0 get f(x)=f(x0) vertical pole
at x=y0 get f(x)=f(y0) vertical pole.
<a name="ch06a059">
Both pole are not moving (constant)
On two pole tops, connect a straight
line AB, and θ is a variable. When θ
change we have point move along AB.
Both AP021 and AP022 use same θ.
Both AP021 and AP022 are vertical
on/below each other.
<a name="ch06a060">
For a convex problem, we need convex set.
Straight line value eqn.AP022 is higher.
Curve function value eqn.AP021 is lower.
Bowl shaped f(x) is Jensen inequality's
basic reason.
2009-12-07-18-17 stop
<a name="ch06a061">Index beginIndex this file
2009-12-08-12-10 start
For a concave problem, we need convex set
and a concave function, that is
function curve go above of straight line.
Jensen inequality reverse direction.
If function vary like sine wave for many
period, then that is 'no problem' !
Jensen go home take a nap !
<a name="ch06a062">
■ Convexity summary
A problem is convex or concave or neither
it HIGHLY depends upon function domain
definition.
If function domain is a convex set AND
If f''(x) ≧ 0 for all x in function domain,
it is convex problem. OR
If f''(x) ≦ 0 for all x in function domain,
it is concave problem. OR
If f''(x) ≦and≧ 0 for x in function domain,
it is not convex and not concave problem.
2009-12-08-12-30 stop
2009-12-08-12-30 done proofread
2009-12-08-17-41 done spelling check
2009-12-10-16-41 start
<a name="ch06a063">
■ How to use Jensen's Inequality program
Suppose that f:[a,b]→real is a convex
function and suppose that the non-
negative real numbers pj, j=1,2,...,n
satisfy
p1+p2+...+pn=1 ---eqn.AQ010
show that for all xj in [a,b],
j=1,2,...,n one has
<a name="ch06a065">
eqn.6.2 is Jensen's Inequality.
On 2009-12-10 LiuHH rewrite from
Convex set and convex function
to
Jensen's Inequality Program
Add function to work with eqn.6.2.
To test Jensen's Inequality Program
work as following
<a name="ch06a066">
Please click "random#2" (below box11),
fill in 'x' array and 'p' array. Fill
convex/concave equation to [f(x) =] box,
or click example 0 to 6. Click "Draw
JensenA". Box 23 has debug, Box 24 has
Jensen output. Example '6' use gatef()
to combine two equations to one.
<a name="ch06a067">
An error occur (convex/concave reverse)
if use gatef(x, 4,8) and Box11 has x>8
Change gatef(x,4,8) to gatef(x,4,80)
or reduce x array to x<8, get correct
answer. If suspect convex/concave
reversed, use hand calculation to check,
that is best method.
If check [Show label] box you may need
to enlarge the x-axis/y-axis min/max
range. 9812111150
<a name="ch06a068">
If click [random#2] button,
Box11 get x-array, x points in domain.
Box12 get p-array, probability sum to 1
Then click [Example 0] button, program
draw f(x)=x*log(x). Now Box11, Box12 and
box [f(x)=] all filled test data. Click
[Draw JensenA] button. The drawing not
change, but Box 24 has output. Top five
lines give Jensen inequality answer.
<a name="ch06a069">
One test run get the next answer
[[
func0=x*log(x)
sumpx=6.2926119560716645
fsumx=11.574480918625841
sumpf=11.775958562069037
*** Convex: fsumx<sumpf
<a name="ch06a070">
iter, xarray, f(x); parray
0, 3.21, 3.7437297082255774; 0.1070806422626364
1, 5.36, 8.99924690644333; 0.3979098803576716
2, 7.65, 15.5654982059641; 0.3129361319736385
3, 7.8, 16.02216512282526; 0.1541786036070683
4, 7.87, 16.236266951318683; 0.027894741798985285
]]
<a name="ch06a071">
func0=x*log(x) is the function in test.
sumpx=6.2926 is p1x1+p2x2+...+pnxn
fsumx=11.574 is sumpx*log(sumpx)
sumpf=11.775 is p1f(x1)+p2f(x2)+...+pnf(xn)
Comparison take place between two
function evaluations fsumx and sumpf.
*** Convex: fsumx<sumpf
***Concave: fsumx>=sumpf
fsumx is eqn.6.2 left side value.
sumpf is eqn.6.2 right side value.
<a name="ch06a072">
When work with log function, x array
must be all positive number. If create
x array by random number, make sure
check [+/0] instead of [+/0/-].
Check box [123 , 321 , 213 ] let you
decide the random number arrangement.
[123 ] output sorted increase sequence.
[321 ] output sorted decrease sequence.
[213 ] output non-sorted sequence.
<a name="ch06a073">
[random#1] button make two sets random
numbers, store in box11 and box12. You
can use this output in other page.
[random#1] NO probability output.
<a name="ch06a074">
[random#2] button make two sets random
numbers, store in box11 and box12.
box11 is x array.
box12 is probability array.
[probab#3] button make one set proba-
bility output to box12.
<a name="ch06a075">
Although Liu,Hsinhan try to make every
output correct. But no proofread/use
and no test run for every possible case.
For those forgotten cases, output is
unpredictable.
2009-12-10-17-36 stop
<a name="docB001">
2009-12-07-18-22 start
From 2009-12-01 to 2009-12-04,
Liu,Hsinhan goto online find convex set
and convex function papers. Collected 28
pdf files. The following 8 files has a
short cut for them.
<a name="docB002">
2009-12-01-19-51
http://www.eecs.berkeley.edu/~wkahan/MathH110/Jensen.pdf
2009-12-01-20-05
http://www.recreatiimatematice.ro/arhiva/corespondente/RM22007STEPHAN.pdf
2009-12-01-20-32
http://www.math.ust.hk/excalibur/v5_n4.pdf
<a name="docB003">
2009-12-01-20-46
http://www.nzamt.org.nz/nzimo/wp-content/uploads/2009/01/convex-functions.pdf
2009-12-01-21-22
http://www.soe.ucsc.edu/classes/cmps290c/Spring08/solutions/hw2sol.pdf
2009-12-01-21-29
http://www.maths.bris.ac.uk/~maxmr/opt/convex.pdf
<a name="docB004">
2009-12-03-09-53
http://phildybvig.com/teaching/finopt/problems/finoptp4ans.pdf
2009-12-03-13-04
http://www.stanford.edu/class/cs229/section/cs229-cvxopt.pdf
<a name="docB005">
Recent read text books has
Applied Optimal Design,
ISBN 0-471-04170-x
Edward J. Haug & Jasbir S. Arora
Introduction to Optimal Design
ISBN 0-07-002460-x
Jasbir S. Arora
<a name="docB006">
Nonlinear Programming
ISBN 0-471-78610-1
Mokhtar S. Bazaraa & C.M. Shetty
Introduction to Linear and
Nonlinear Programming
ISBN 0-201-04347-5
David G Luenberger
<a name="docB007">
These are all textbook LiuHH bought
during University of Iowa studying
period. 1980 to 1990
LiuHH hope this page view points are
all right, but same as always,
2009-12-07-18-50 stop
<a name=20091217>
2009-12-17-11-09 start
Update 2009-12-17 change all tute*.htm
(from tute0007.htm to tute0023.htm)
first:
Correct 'Limit' link from '#docA06'
to '#docA006'
second:
Change Javascript index to read from
jslist1e.js so that update jslist1e.js
then update ALL tute*.htm.
2009-12-17-11-23 stop
<a name=20091224>
2009-12-24-21-54 start
Update 2009-12-24 add example 7, 8
for Problem 6.6 (AMM 2002)
2009-12-24-21-56 stop
<a name=20100122>
2010-01-22-17-57 start
After 'Update 2009-12-24', tute0022.htm
has following change
2009-12-26 update file, added example [9]
2010-01-04 update file, added example [10]
to [14]
Both update NOT change file top update
sign. Both update are still marked with
'Update 2009-12-24'
Now
'Update 2010-01-22' added example button
[15], [16], [17]
2010-01-22-18-06 stop