probability , expectations in $L^1$ - probability

I found this in another language. I am wondering if anyone could find this in a English book please. Or if anyone know how to prove this please. Preferably one could tell me a reference book. Thank you very much.
Let $(\Omega, F, P)$ be a probability space. and let $g$ and $h $ be functions such that $\int_A g,dP\leqslant \int_A h,dP $ for all $A \in F$, then for $g,h \in \mathbb{L}^1(P)$, $g\leqslant h$

You will need to use measure theory. If it is the opposite case, you can find a contradiction.

Related

Forced-Directed-Graph Fruchterman and Reingold t and disp (number and vector?)

I am trying to implement the algorithm of Fruchterman and Reingold and have a problem in understanding the types of the "t" (temperature) and "disp" (displacement) because on the last loop they calcualte the minimum of t and disp. Is t not a number and disp a vector? How can I calculate the minimum of a number and a vector?
Link: www.cs.brown.edu/people/rtamassi/gdhandbook/chapters/force-directed.pdf#page=5
As a disclaimer, I have no previous experience of this algorithm, but it seems to me as if you are right and that this is a typo, where actually min(|v.disp|, t) was meant.
I find some support for my claim looking at an implementation here, which recognises some typos in the original pseudo-code. Please verify yourself before taking my word for it.

Show whether f is Big Oh of g with logarithmic equations

Hello, how would you do whether f is Big Oh of g. I know how to do this for simple exponential functions but when it comes to logs, I have no idea what to do. Can anyone help?
You should use the properties of the logarithm. For example, for your second case, you can use the fact that:
So in big O notation:
Regarding the first case, my advice is to read this document, specially the section 4, labeled "Growth Rate of Standard Functions", where you will find a bullet titled "Any polylog grows slower than any polynomial".

Lagrange's four-square Implementation

I am learning about Lagrange theorem , According to which every number can be represent a sum of square , But how do i implement this algorithm , i have search the web but i could not find any relevant material on this. Can anyone help me implement this algorithm or provide some reference ?
It doesn't look like there's an easy answer for this. Here are some references I think will help, though.
https://math.stackexchange.com/questions/483101/rabin-and-shallit-algorithm
https://cs.stackexchange.com/questions/2988/how-fast-can-we-find-all-four-square-combinations-that-sum-to-n

Knapsack formula using only weights as the recursion variable

I have developed a recursive formula for knapsack problem on my own without any knowledge of present solutions. Please tell me whether it is right or wrong and correct it.Thanks in advance.
B(S) = max (B (s-w(i)) + b(w(i)) )
for all i belonging to n;
notations are as usual . S is capacity,B is the answer to knapsack.
I do not want to give you straight answer, but to direct you on the flaws of your formula, and let you figure out how to solve them.
Well, if you do not address the value, something must be wrong - otherwise, you just simply lose information. If you chose to "take" the item (B(s-w(i))) what happens to the current value?
In addition, what is i? How do you change i over time?
When talking about recursive formula, you must also mention a stop clause for it.

Greedy algorithm and coins algorithm

First, yes it's my HW and I find it hard so I'll really appreciate some guidance.
I need to prove that for denomination of 1,x,x2...xn when x>=1 the greedy algorithm for the coins problem always work .
We will always get the amount of money we need in minimal coins number when we always pick the maximal coin that smaller from the amount.
Thank you.
As this is your homework I will not provide a complete answer but will rather try to guide you:
First as it usually happens for problems of that type try and prove for yourself that the statement is true for the first few natural numbers. Try to summarize what you use to make the proof for them. This usually will give you some guidance of the correct approach.
I would use induction for this one.
Another option that might help you - represent all the numbers in numerical system with base x. This should make it clearer why the statement is true.
Hope this helps you.

Resources