text:
# KustinMiller -- Unprojection and the Kustin-Miller complex construction

## Description

This package implements the construction of the Kustin-Miller complex [1]. This is the fundamental construction of resolutions in unprojection theory [2]. For details on the computation of the Kustin-Miller complex see [3].

Gorenstein rings with an embedding codimension at most 2 are known to be complete intersections, and those with embedding codimension 3 are described by the theorem of Buchsbaum and Eisenbud as Pfaffians of a skew-symmetric matrix; general structure theorems in higher codimension are lacking and the main goal of unprojection theory is to provide a substitute for a structure theorem.

Unprojection theorey has been applied in various cases to construct new varieties, for example, in [4] in the case of Campedelli surfaces and [5] in the case of Calabi-Yau varieties.

We provide a general command kustinMillerComplex for the Kustin-Miller complex construction and demonstrate it on several examples connecting unprojection theory and combinatorics such as stellar subdivisions of simplicial complexes [6], minimal resolutions of Stanley-Reisner rings of boundary complexes $\Delta(d,m)$ of cyclic polytopes of dimension d on m vertices [7], and the classical (non-monomial) Tom example of unprojection [2].

This package requires the package SimplicialComplexes.m2 version 1.2 or higher, so install this first.

References:

For the Kustin-Miller complex see:

[1] A. Kustin and M. Miller, Constructing big Gorenstein ideals from small ones, J. Algebra 85 (1983), 303-322.

[2] S. Papadakis, Kustin-Miller unprojection with complexes, J. Algebraic Geometry 13 (2004) 249-268, http://arxiv.org/abs/math/0111195

[3] J. Boehm, S. Papadakis: Implementing the Kustin-Miller complex construction, http://arxiv.org/abs/1103.2314

For constructing new varieties see for example:

[4] J. Neves and S. Papadakis, A construction of numerical Campedelli surfaces with ZZ/6 torsion, Trans. Amer. Math. Soc. 361 (2009), 4999-5021.

[5] J. Neves and S. Papadakis, Parallel Kustin-Miller unprojection with an application to Calabi-Yau geometry, preprint, 2009, 23 pp, http://arxiv.org/abs/0903.1335

For the stellar subdivision case see:

[6] J. Boehm, S. Papadakis: Stellar subdivisions and Stanley-Reisner rings of Gorenstein complexes, http://arxiv.org/abs/0912.2151

For the case of cyclic polytopes see:

[7] J. Boehm, S. Papadakis: On the structure of Stanley-Reisner rings associated to cyclic polytopes, http://arxiv.org/abs/0912.2152, to appear in Osaka J. Math.

Examples:

Cyclic Polytopes -- Minimal resolutions of Stanley-Reisner rings of boundary complexes of cyclic polytopes

Stellar Subdivisions -- Stellar subdivisions and unprojection

Tom -- The Tom example of unprojection

Jerry -- The Jerry example of unprojection

Key user functions:

The central function of the package is:

kustinMillerComplex -- The Kustin-Miller complex construction

Also important is the function to represent the unprojection data as a homomorphism:

unprojectionHomomorphism -- Compute the homomorphism associated to an unprojection pair

Functions used in the examples to compare with the combinatorics:

delta -- The boundary complex of a cyclic polytope

stellarSubdivision -- Compute the stellar subdivision of a simplicial complex

## Certification

Version 1.4 of this package was accepted for publication in volume 4 of The Journal of Software for Algebra and Geometry: Macaulay2 on 2012-05-07, in the article Implementing the Kustin-Miller complex construction. That version can be obtained from the journal or from the Macaulay2 source code repository.

## Version

This documentation describes version 1.4 of KustinMiller.

## Source code

The source code from which this documentation is derived is in the file KustinMiller.m2.

## Exports

• Functions and commands
• delta -- Boundary complex of cyclic polytope.
• isExactRes -- Test whether a chain complex is an exact resolution.
• kustinMillerComplex -- Compute Kustin-Miller resolution of the unprojection of I in J
• resBE -- Buchsbaum-Eisenbud resolution
• stellarSubdivision -- Compute the stellar subdivision of a simplicial complex.
• unprojectionHomomorphism -- Compute the homomorphism associated to an unprojection pair
• Methods
• "delta(ZZ,PolynomialRing)" -- see delta -- Boundary complex of cyclic polytope.
• "isExactRes(ChainComplex)" -- see isExactRes -- Test whether a chain complex is an exact resolution.
• "kustinMillerComplex(ChainComplex,ChainComplex,PolynomialRing)" -- see kustinMillerComplex -- Compute Kustin-Miller resolution of the unprojection of I in J
• "kustinMillerComplex(Ideal,Ideal,PolynomialRing)" -- see kustinMillerComplex -- Compute Kustin-Miller resolution of the unprojection of I in J
• "resBE(Matrix)" -- see resBE -- Buchsbaum-Eisenbud resolution
• "stellarSubdivision(SimplicialComplex,Face,PolynomialRing)" -- see stellarSubdivision -- Compute the stellar subdivision of a simplicial complex.
• "unprojectionHomomorphism(Ideal,Ideal)" -- see unprojectionHomomorphism -- Compute the homomorphism associated to an unprojection pair
• Symbols
• Jerry -- The Kustin-Miller complex for Jerry
• Tom -- The Kustin-Miller complex for Tom

## For the programmer

The object KustinMiller is .


text:
# Thabit Pair/Examples/9,363,584-9,437,056

## Example of Thabit Pair

$9 \, 363 \, 584$ and $9 \, 437 \, 056$ form a Thabit pair.

## Proof

Let $n = 7$.

Then we have:

 $\displaystyle 2^7$ $=$ $\displaystyle 128$ $\displaystyle a$ $=$ $\displaystyle 3 \times 2^7 - 1$ $\displaystyle$ $=$ $\displaystyle 383$ $\displaystyle b$ $=$ $\displaystyle 3 \times 2^{7 - 1} - 1$ $\displaystyle$ $=$ $\displaystyle 191$ $\displaystyle c$ $=$ $\displaystyle 9 \times 2^{2 \times 7 - 1} - 1$ $\displaystyle$ $=$ $\displaystyle 9 \times 8192 - 1$ $\displaystyle$ $=$ $\displaystyle 73 \, 727$

Each of $a, b, c$ are prime.

Thus:

 $\displaystyle 2^7 a b$ $=$ $\displaystyle 2^7 \times 383 \times 191$ $\displaystyle$ $=$ $\displaystyle 9 \, 363 \, 584$ $\displaystyle 2^7 c$ $=$ $\displaystyle 2^7 \times 73 \, 727$ $\displaystyle$ $=$ $\displaystyle 9 \, 437 \, 056$

Hence by Thabit's Rule, $9 \, 363 \, 584$ and $9 \, 437 \, 056$ form a Thabit pair.

$\blacksquare$

## Historical Note

The Thabit pair $\tuple {9 \, 363 \, 584, 9 \, 437 \, 056}$ was originally discovered by Thabit ibn Qurra, as a result of applying Thabit's Rule using $n = 7$.

It was rediscovered by René Descartes, who also rediscovered Thabit's Rule.

format: plain


text:
# Proof for the p.d.f of minimum and maximum of a sample

The following is a question from a past paper for one of my university statistical inference modules, and I know how to use the formula for each the max/min, but

Assume that the sample $X_1, X_2, . . . , X_n$ comes from a continuous distribution with cumulative distribution function $F(x)$ and probability density function $f(x)$. Show that the probability density functions of the maximum $(z)$ and minimum $(w)$ of the sample are respectively given by:

$$g(z) = nf(z)[F(z)]^{n−1}$$

and

$$h(w) = nf(w)[1 − F(w)]^{n-1}.$$

If someone could provide a proof for one, or both, that would be much appreciated.

Thank you

• Please add the [self-study] tag & read its wiki. Then tell us what you understand thus far, what you've tried & where you're stuck. We'll provide hints to help you get unstuck. – gung - Reinstate Monica Jun 2 '15 at 17:30
• Hint: differentiate the CDFs. One will be slightly easier to do than the other, but once you have the PDF for one extreme, it is simple to obtain the PDF for the other extreme: just negate the variable. – whuber Jun 2 '15 at 17:37

I'll do the maximum one. Let $Z = \max\{X_1, \ldots X_n\}$. First we find the cdf of $Z$, $F_Z(z)$. $P(Z \le z) = P(X_1 \le z \cap \cdots \cap X_n \le z) = \prod_{i=1}^nP(X_i \le z) = [F_X(z)]^n$. Where the second equality follows from independence.


text:
Top

Grade 5 is important for students and in this standard; they need to cover each basic subject in a right manner. Class 5 Math syllabus is well-structured and students need to cover each topic of Math repeatedly to make a good grounding in this subject. TutorVista offers well-geared learning sessions for students of class 5. To avail these sessions, students need to login and schedule their sessions at their convenient time. Moreover, they can take demo learning session, as well.

Mental arithmetic, numbers and operations, fractional numbers, data handling, measurements are some interesting Math topics that students should learn in a detailed manner. Math worksheets designed for class 5 are also worthwhile for students. Students can take free demo session for each Math topic, as well. By using the whiteboard and chat option, students can share each Math problem in an easy manner. Most importantly, virtual tutors associated with TutorVista are well-trained and they guide students throughout the session.

You can also avail to our other grade math programs:

### Math topics for grade 5:

Number and Operations
• Read, write, count numbers from 0 to 9,999,999 and identify, compare, order, represent estimates, equivalency or place value using models.
• Positive Fractional Numbers (proper, mixed and improper).
• Understanding of place value to the right and left of 0 - 4 places and be able to apply four operations on decimals.
• Problems involving multiple operations on whole numbers or the use of the properties of factors, multiples, prime, or composite numbers, and addition or subtraction
of fractions (proper) and decimals to the hundredths place.
• LCM, GCF, ratios and select the appropriate problem solving methods in word problems.
Geometry and Measurement
• Identify, sort, classify, construct, measure, and apply a variety of geometric shapes and figures on the basis of properties of angles or sides of triangles (right, acute, obtuse, equiangular, or equilateral) or quadrilaterals (rectangles, squares, rhombus, trapezoids, or parallelograms) or 3-dimensional shapes (rectangular prisms, triangular prisms,cylinders, spheres, pyramids, or cones).
• Uses properties to identify, compare, or describe three-dimensional shapes (rectangular prisms, triangular prisms, cylinders, or spheres.
• Understanding of similar and congruent figures applying characteristics of similar figures and using reflections, translations, or rotations.
• Classify triangles by side properties and types (obtuse, isosceles) etc. Measure and construct a variety of triangle and angles.
• Perimeter of polygons, area of rectangle or right triangle and volume or cube.
• Appropriately and consistently use of units of measures, and makes conversions within systems when solving problem.

Functions and Algebra

• Identify, create, analyze, and extend patterns and describe the rules with more than one variable.
• Determine the values in linear algebraic expressions when there are missing terms in the four operations and provide the rules.
• Determine the amount in missing values when given an equation that involve more than one operation.
• Demonstrate equivalence in equations with the four operations.

Data, Statistics, and Probability

• Analyze the data to formulate or justify conclusions, to make predictions, or to solve problems.
• Conduct surveys and experiments and represent the collected data using tables, line plots, bar graphs, and pictographs.
• Mean, Median and Mode.
• Counting Techniques to solve Problems (Combinations or simple permutations and variety of strategies).
• Probability: Predicts and determines event in which the sample space may or may not contain equally likely outcomes.

Understand each tough Math problem by getting adequate learning help from TutorVista. Its online sessions are well-designed and comprehensive. Hence, students prefer to take these sessions as per their learning requirements. Moreover, with this session, they can revise each Math topic in a requisite manner. Apart from this, they can solve worksheets with experienced Math tutors. In this way, they can not only enhance their subject knowledge, but also can handle their exam stress before tests. Online 5 grade homework help designed by TutorVista is also worthy for students.

Choose online 5th grade homework help and solve your all complex homework problems in a systematic manner. In short, get informative online sessions with TutorVista and make your learning process interesting.

### Solved Examples

Question 1: Write the place value of 4,

8,345,632
Solution:

Given, 8,345,632

=> Place value of 4 = 40,000.

Question 2: Solve 5234.34 + 345.6 + 786.03
Solution:

5 2 3 4 . 3 4
+  0  3 4 5 . 6 0
0  7 8 6 . 0 3
------------------------
6 3 6 5 . 9 7
------------------------

Question 3: Find the area and perimeter of circle having radius 2 m.

Solution:

Radius of the circle (r) = 2

Area = $\pi$ r2

Circumference = 2 $\pi$ r

=> Area of circle = $\pi \times 2 \times 2$

= 4 $\pi$

and Circumference of the circle = 2 $\times \pi \times$ 2

= 4 $\pi$

=> Area of circle = 4 $\pi$ square mtr

and Circumference of the circle = 4 $\pi$ mtr

Question 4: Solve the equation for x, 32x - 46 = 12x + 20

Solution:

Given, 32x - 46 = 12x + 20

32x - 46 = 12x + 20

=> 32x - 12x = 20 + 46

=> (32 - 12)x = 66

=> 20x = 66

=> x = $\frac{66}{20}$

or x = $\frac{33}{10}$

Question 5: Bob drive 1.6 miles to the bakery, 2.6 miles to the store and 6.3 miles to the library. From there he go 0.7 to the Church. How far did he travel?

Solution:

Distance covered by Bob to bakery = 1.6

Distance covered by Bob to store = 2.6

Distance covered by Bob to library = 6 .3

Distance covered by Bob to the Church = 0.7

=> Total distance he covered = 1.6 + 2.6 + 6.3 + 0.7

= 11.2 miles

Hence Bob  traveled 11.2 miles.


text:
# Free idempotent generated semigroups

YANG, DANDAN (2014) Free idempotent generated semigroups. PhD thesis, University of York.

The study of the free idempotent generated semigroup IG$(E)$ over a biordered set $E$ began with the seminal work of Nambooripad in the 1970s and has seen a recent revival with a number of new approaches, both geometric and combinatorial. Given the universal nature of free idempotent generated semigroups, it is natural to investigate their structure. A popular theme is to investigate the maximal subgroups. It was thought from the 1970s that all such groups would be free, but this conjecture was false. The first example of a non-free group arising in this context appeared in 2009 in an article by Brittenham, Margolis and Meakin. After that, Gray and Ru\v{s}kuc in 2012 showed that {\em any} group occurs as a maximal subgroup of some $\ig(E)$. Following this discovery, another interesting question comes out very naturally: for a particular biordered $E$, which groups can be the maximal subgroups of $\ig(E)$? Several significant results for the biordered sets of idempotents of the full transformation monoid $\mathcal{T}_n$ on $n$ generators and the matrix monoid $M_n(D)$ of all $n\times n$ matrices over a division ring $D,$ have been obtained in recent years, which suggest that it may well be worth investigating maximal subgroups of $\ig(E)$ over the biordered set $E$ of idempotents of the endomorphism monoid of an independence algebra of finite rank $n$. To this end, we investigate another important example of an independence algebra, namely, the free (left) $G$-act $F_n(G)$ of rank $n$, where $n\in \mathbb{N}$, $n\geq 3$ and $G$ is a group. It is known that the endomorphism monoid $\en F_n(G)$ of $F_n(G)$ is isomorphic to a wreath product $G\wr \mathcal{T}_n$. We say that the {\em rank} of an element of $\en F_n(G)$ is the minimal number of (free) generators in its image. Let $E$ be the biordered set of idempotents of $\en F_n(G)$, let $\varepsilon\in E$ be a rank $r$ idempotent, where $1\leq r\leq n.$ For rather straightforward reasons it is known that if $r=n-1$ (respectively, $n$), then the maximal subgroup of $\ig(E)$ containing $\varepsilon$ is free (respectively, trivial). We show, in a transparent way, that, if $r=1$ then the maximal subgroup of IG$(E)$ containing $\varepsilon$ is isomorphic to that of $\en F_n(G)$ and hence to $G$. As a corollary we obtain the 2012 result of Gray and Ru\v{s}kuc that {\em any} group can occur as a maximal subgroup of {\em some} $\ig(E)$. Unlike their proof, ours involves a natural biordered set and very little machinery. However, for higher ranks, a more sophisticated approach is needed, which involves the presentations of maximal subgroups of $\ig(E)$ obtained by Gray and Ru\v{s}kuc, and a presentation of $G\wr\mathcal{S}_r$, where $\mathcal{S}_r$ is the symmetric group on $r$ elements. We show that for $1\leq r\leq n-2$, the maximal subgroup of $\ig(E)$ containing $\varepsilon$ is isomorphic to that of $\en F_n(G)$, and hence to $G\wr\mathcal{S}_r$. By taking $G$ to be trivial, we obtain an alternative proof of the 2012 result of Gray and Ru\v{s}kuc for the biordered set of idempotents of $\mathcal{T}_n.$ After that, we focus on the maximal subgroups of $\ig(E)$ containing a rank 1 idempotent $\varepsilon\in E$, where $E$ is the biordered set of idempotents of the endomorphism monoid $\en \mathbf{A}$ of an independence algebra $\mathbf{A}$ of rank $n$ with no constants, where $n\in \mathbb{N}$ and $n\geq 3.$ It is proved that the maximal subgroup of $\ig(E)$ containing $\varepsilon$ is isomorphic to that of $\en \mathbf{A},$ the latter being the group of all unary term operations of $\mathbf{A}.$ Whereas much of the former work in the literature of $\ig(E)$ has focused on maximal subgroups, in this thesis we also study the general structure of the free idempotent generated semigroup $\ig(B)$ over an arbitrary band $B$. We show that $\ig(B)$ is {\it always} a weakly abundant semigroup with the congruence condition, but not necessarily abundant. We then prove that if $B$ is a quasi-zero band or a normal band for which $\ig(B)$ satisfying Condition $(P)$, then $\ig(B)$ is an abundant semigroup. In consequence, if $Y$ is a semilattice, then $\ig(Y)$ is adequate, that is, it belongs to the quasivariety of unary semigroups introduced by Fountain over 30 years ago. Further, the word problem of $\ig(B)$ is solvable if $B$ is quasi-zero. We also construct a 10-element normal band $B$ for which $\ig(B)$ is not abundant.


text:
# What is 0.24 divided by 0.6?

Jul 20, 2016

$\frac{2.4}{6} = 0.4$

#### Explanation:

You can't divide BY a decimal, although you can divide INTO a decimal. We need to change the 0.6 to a whole number. This can be done by multiplying it by 10.

This is seen easier if we write the division in the form of a fraction.

$\frac{0.24 \times 10}{0.6 \times 10} = \frac{2.4}{6} \text{ Note that} \frac{10}{10} = 1$

$= \frac{2.4}{6} = 0.4$


text:
# Lorentz invariants

1. Homework Statement

The Field strength tensor Fuv encodes the electric and magnetic fields via:
Ei=-cF0i, Bi=-1/2 eijkFjk, i=1,2,3 Show that E^2-c^2B^2 and cE.B are invariant under lorentze transformations, by writing them explicitly as invariant contractions using the tensors Fuv and euvab

2. Homework Equations

3. The Attempt at a Solution
What does write the explicitly as invariant contractions mean?

Related Advanced Physics Homework Help News on Phys.org
fzero
Homework Helper
Gold Member
3. The Attempt at a Solution
What does write the explicitly as invariant contractions mean?
A Lorentz invariant quantity can't have any free index. A quantity like $$A_{\mu\nu\rho}v^\mu}B^{\nu\rho}$$ would be invariant, but $$A_{\mu\nu\rho}B^{\nu\rho}$$ would not.

ok so for the first one E^2-c^2B^2 how would I start the problem. I know the equation for E and B are given in terms of the metric tensor so I would write them out but what would be the next step

fzero
Homework Helper
Gold Member
Well what sort of contractions can you form from $$F^{\mu\nu}$$ and $$\epsilon_{\mu\nu ab}$$? Note that the quantities you're supposed to obtain are quadratic in the fields.

I know I can contract FuvUb=Va but not sure how to proceed at all

fzero
Homework Helper
Gold Member
I know I can contract FuvUb=Va but not sure how to proceed at all
The expression you've written has free indices $$\mu, \nu$$ and $$b$$ on the LHS and an index $$a$$ on the RHS, so it is incorrect. Also U and V are undefined and have nothing to do with the question. You do not need any other tensors other than $$F^{\mu\nu}$$ and $$\epsilon_{\mu\nu ab}$$. Try to form contractions that have no free indices. For example, $$\epsilon_{\mu\nu ab} \epsilon^{\mu\nu ab}$$ is a Lorentz invariant, but it's not one of the ones you're looking for.

so does euvxy=euvexy make more sense? are these correct? I know these are still not what I used in the question but is the idea right here. Then FuvFuv

so does euvxy=euvexy make more sense? are these correct? I know these are still not what I used in the question but is the idea right here. Then FuvFuv
sorry that isn't right I think maybe this is euveuvexyexy

fzero
Homework Helper
Gold Member
$$\epsilon^{\mu\nu a b}$$ is the Levi-Civita symbol, you might want to brush up on what it means here: http://en.wikipedia.org/wiki/Levi-Civita_symbol You can't write $$\epsilon^{\mu\nu a b} =\epsilon_{\mu\nu} \epsilon_{ a b}$$ for any definition of $$\epsilon_{\mu\nu}$$, the RHS does not have all of the symmetries that the LHS does.

I wrote the expression with 2 $$\epsilon$$'s to illustrate a Lorentz-invariant combination, don't get hung up on trying to rewrite that. You mentioned $$F^{\mu\nu}F_{\mu\nu}$$. Why don't you try writing that in terms of E and B?

hi so if I write FuvFuv in terms of E and B I get FuvFuv=FolFol+FijFij=cE.B is this correct?

Then to get the other one I can write 1/2euvxyFuvFxy in terms of E and B

fzero
Homework Helper
Gold Member
hi so if I write FuvFuv in terms of E and B I get FuvFuv=FolFol+FijFij=cE.B is this correct?
No, that's not right. Remember that Ei=-cF0i, Bi=-1/2 eijkFjk, i=1,2,3.

Then to get the other one I can write 1/2euvxyFuvFxy in terms of E and B
That's one of the invariants that you need. You should see what expression that gives in terms of E and B.

No, that's not right. Remember that Ei=-cF0i, Bi=-1/2 eijkFjk, i=1,2,3.

That's one of the invariants that you need. You should see what expression that gives in terms of E and B.
So for the first bit if I write FuvFuv=F0iF0i+FjkFjk is that better. sorry i'm having quite a lot of trouble with these

fzero


text:
# Gradient Pystan log_prob: constrained versus unconstrained

I’m having an issue where the gradients I calculate across models with constrained and unconstrained parameters don’t seem to match, even after I transform my variables to be on the unconstrained scale.

Suppose I specify a model:

data {
int<lower=0> N;
real y[N];
}
parameters {
real mu;
real sigma;
}
model {
y ~ normal(mu, sigma);
}

then I calculate the gradient in Pystan of the log probability assuming data:

 {'N':1, 'y':[0]}

then I obtain,

stanfit.grad_log_prob([1, 2]) [= (-1/4,-3/8)]

which I can match by hand, so this looks fine.

If I instead allow sigma to be constrained and repeat the exercise using the following model:

data {
int<lower=0> N;
real y[N];
}
parameters {
real mu;
real<lower=0> sigma;
}
model {
y ~ normal(mu, sigma);
}

then calculating the gradients, I obtain:

stanfit.grad_log_prob([1, np.log(2)], adjust_transform=True) [=(-1/4,1/4)]

So neither of the gradients for sigma match what I had when using the unconstrained model, which seems weird.

Am I misinterpreting something here?

The gradient is not with respect to \sigma but the unconstrained u (where \sigma = \exp(u)). Per chain rule

\frac{d}{du}\log p = \frac{d\sigma}{du}\times\frac{d}{d\sigma}\log p = \sigma\times\frac{d}{d\sigma}\log p

If I’m reading this right your adjust_transform=False result should be 2\times-\frac{3}{8}=-\frac{3}{4}.
Double-check the sign, other than that looks as expected.

adjust_transform=True adds the log-determinant of the Jacobian of the constraining transform which in this case is \log \sigma(=u) and that should add +1 to the gradient.

1 Like

Thank you very much. You’re quite right: it was -3/4.

I feel like perhaps adding this to the documentation for the function would help quite a few users. Namely, that the result of grad_log_prob is on the unconstrained scale (of course, I know that users should probably know this but I feel like it would avoid confusion like mine). Anyway, just a thought!


text:
# hybrid car idea

Discussion in 'Architecture & Engineering' started by vslayer, Apr 23, 2008.

Not open for further replies.
1. ### MetaKronRegistered Senior Member

Messages:
5,502
They're screwing us over royally.

Messages:
12,061
"Where do you even get a suitable electric motor?"

Surplus military aircraft starter-generators.

"How do you attach it to the transmission?"

There is none: 4 starter-generators get mated directly to the wheel hubs.

I have access to more than enough tooling and brains to integrate and build these. All electrical gear is off-the-shelf stuff. Chassis/cabin/comforts are part of any good vehicle for transplant. I'm starting with a 1968 VW bug.

5. ### MetaKronRegistered Senior Member

Messages:
5,502
Hype, there is prior art on this and I suppose that you have actually done this research. It still looks like a lot of unslung weight, taking the long way around, and very hard to do right. How do you get the front two right for steering? I would take the lazy way out and hook the motor to the driveshaft of a rear-drive car, hopefully with a posi-trak differential. Either that or I would find a way to use the transmission of a front-wheel drive car, and yes, there is also prior art for doing that.

7. ### Echo3RomeoOne man wolfpackRegistered Senior Member

Messages:
1,196
Reducing unsprung weight is an axiomatically good thing, as it benefits a wheel's bump-following ability over road surface irregularities as well as the transient response time on turn-in (especially important in performace driving). As a general rule of thumb, a pound of unsprung mass equates to ten times that of sprung mass as far as its effects on handling, acceleration, and braking are concerned.

Of course, I sort of doubt people who are in the market for an economy vehicle care much about such things.

8. ### MetaKronRegistered Senior Member

Messages:
5,502
Well, a 6 volt 1000 amp motor costs a huge amount of money and for good reasons. I thought that a three phase motor could be run using solid state controllers and moderately high voltages. It would be cheaper because a lower amperage motor uses a lot less copper. It would also weigh less. Even the $9,000 conversion kit is a lot cheaper than the crap hybrids that sell for$29,000 also.

9. ### kmguruStaff Member

Messages:
11,757
I just learned that you can strip hydrogen from Steam cheaply using a catalyst. Perhaps that would be another way for a zero carbon footprint....

10. ### MetaKronRegistered Senior Member

Messages:
5,502
If we take the carbon dioxide out of the air the plant life will die off.

11. ### kmguruStaff Member

Messages:
11,757
If we put too much than plants can consume (like breathing pure oxygen for humans) that would not help either....

12. ### MetaKronRegistered Senior Member

Messages:
5,502
I suspect that the plants are already consuming as much as we can put out.

Messages:
12,061
Metachron: "How do you get the front two right for steering?"

It's all Amps, and all easy. You can program an inverter to provide constant even power and/or braking to all 4 wheels as required within microseconds. Power and braking are even mixed slightly in sharp turns.

Forget everything you know about cars with (heavy energy-robbing) transmissions.

14. ### MetaKronRegistered Senior Member

Messages:
5,502
Hypewaders, if the inside wheel on a turn pulls with as much force as the outside wheel, the car will skitter all over the place. Ever drive a four-wheel drive vehicle on pavement in the wrong setting?

15. ### Echo3RomeoOne man wolfpackRegistered Senior Member

Messages:
1,196
I'm sure it could be done. Ever drive a Mitsubishi Evo? The electronic AWD uses Active Yaw Control to stabilize the vehicle during hard cornering by modulating the clutches between the diffs and each halfshaft. The result is a very precise amount of torque arriving at each tire, exactly when it is needed, in order to keep the car on the tarmac and pointed in the right direction.

You can see AYC in action here: http://youtube.com/watch?v=L69Qxy6OFvs

I certainly wouldn't want to try something like this on a homebrew EV unless I could use someone else's modules and programming, because the effort to DIY would be simply heroic not to mention requiring encyclopedic knowledge of controller design. And again, if the traction motors are mounted directly to the hubs (unsprung weight) then the car is going to handle like a 5,000lb boulevard queen SUV, negating any possible handling benefit. It is a neat idea though.

16. ### Billy TUse Sugar Cane Alcohol car FuelValued Senior Member

Messages:
23,198

Messages:
12,061
Controlling AC motor/generators is easy to do smoothly and reliably through a wide range of RPM and torque, with active compensation for traction and cornering challenges. Mostly vestigial disc brakes take over in emergency or parking. All other braking goes back to the inverter for processing and storage. Energy is becoming transferable just like memory, people. Wake up.

I'm talking homebuilt car here- Because of the corporate structure of design/engineering, they are years behind implementing off-the-shelf solid-state, bullet-proof industrial controls that are already certified and reliable in equipment very similar, and equally as critical in terms of safety.

Military surplus AC starter-generators, programmable controllers, and lotsa batteries (lead acid will do for up to 80 miles at 75 mph). Want more performance? Buy more expensive batteries, or a Honda Generator on a lightweight trailer that plugs into the car and gets 60 mpg.

Off the shelf is now off the charts in terms of value.

I wouldn't lie to you- All of this is off the shelf now.

Messages:
12,061
Did I mention that in the case of a US plug-in car, the average residential power customer gets his transportation energy for the equivalent of around 30 cents/gallon. Which many typical contemporary roof or yard-mounted PV arrays can provide even off grid.

Ponder that.

19. ### Billy TUse Sugar Cane Alcohol car FuelValued Senior Member

Messages:
23,198

I don't doubt what you say about making your own car, but let me warn you:

One summer I worked directly under a man who did. He bought the steel chasic from Ford and perhaps parts of motor and transmission - I forget the details. When he went to register it (in an office, car not visible to the clerk) the clerk asked: "What make is it?" My boss replied: "It's a McCulla." as that was my boss's name.

Big mistake. - The correct response was: "It is a customized Ford." That McCulla needed everything your can think of, but they did wave the crash test data requirements, after a year or so. etc. and several years later it was legally on the road.

Messages:
12,061
Put 3 wheels on it, 2 front, 1 rear.

Not only is it lighter and more stable, there are no crash tests or standards required in any US State. None.

21. ### Billy TUse Sugar Cane Alcohol car FuelValued Senior Member

Messages:
23,198
Good idea. Where should the motor be, if there is only one, instead of three? In rear wheel, or near CoG, over the front wheels? - you thoughts - just courious, not about to make a three wheeler (or any car).

Messages:
11,757
23. ### draqonBannedBanned

Messages:
35,006
Actually they got a mass produced 3-wheeler called T-rex


text:
# Definition:Set Intersection/Class

## Definition

Let $A$ be a class.

The intersection of $A$ is:

$\ds \bigcap A := \set {x: \forall y \in A: x \in y}$

That is, the class of all elements which belong to all the elements of $A$.

## Also see

• Results about set intersection can be found here.


text:
# [Scribus] SVG paths closing

Khiraly khiraly123
Sun Apr 18 22:09:48 CEST 2004

Hi!

Im just new on the list. I have readed few messages in the
archive:(http://nashi.altmuehlnet.de/pipermail/scribus/)
But I didnt found where can I search in the archive ...

So my question:
I have exactly the same problem as the writer of this article:
http://www.atlantictechsolutions.com/scribusdocs/files2.html

Quote:

''Interestingly, I found in the *drawing editor palette*, some of the
paths were not yet closed. Click on the *close path* and voila, the
colors appeared. A few minutes of clicking and closing paths and I had
the Scribus logo in Scribus, as SVG.''

I didnt found the ''drawing editor palette'' and the ''close path''
option.
Is it in scribus, or sodipodi?

In sodipodi I have found only one way to solve this problem.
Open the XML-editor, and the path attribute I add a letter 'z':
M 56.29179 32 L 46.00000 68 L 67 68 z

But its really hard to find the paths they are not closed(this path are
normally no ''stroke outline''. And it sodipodi looks like a closed (and
filled) path.

Have  anybody any idea where can I find the tools appropriate for the
article?

----------------------
Proposition:
Can it add some (La)TeX feature to scribus?(or xhtml syntax)
So for instance I cant make italic some word in my text, just when I
create a new paragraph. So I cant change the tex-style in my text.
So it would be good to have some ''scribus-command'' to calling the
appropriate text-style.

Example:
a) Scribus Desktop(<i>DTP</i>) publishing
b) Scribus Desktop(\emph{DTP}) publishing


text:
location:  Publications → journals
Search results

Search: All articles in the CJM digital archive with keyword shape

 Expand all        Collapse all Results 1 - 2 of 2

1. CJM 2011 (vol 64 pp. 1058)

Plakhov, Alexander
 Optimal Roughening of Convex Bodies A body moves in a rarefied medium composed of point particles at rest. The particles make elastic reflections when colliding with the body surface, and do not interact with each other. We consider a generalization of Newton's minimal resistance problem: given two bounded convex bodies $C_1$ and $C_2$ such that $C_1 \subset C_2 \subset \mathbb{R}^3$ and $\partial C_1 \cap \partial C_2 = \emptyset$, minimize the resistance in the class of connected bodies $B$ such that $C_1 \subset B \subset C_2$. We prove that the infimum of resistance is zero; that is, there exist "almost perfectly streamlined" bodies. Keywords:billiards, shape optimization, problems of minimal resistance, Newtonian aerodynamics, rough surfaceCategories:37D50, 49Q10

2. CJM 1998 (vol 50 pp. 342)

Giraldo, Antonio
 Shape fibrations, multivalued maps and shape groups The notion of shape fibration with the near lifting of near multivalued paths property is studied. The relation of these maps---which agree with shape fibrations having totally disconnected fibers---with Hurewicz fibrations with the unique path lifting property is completely settled. Some results concerning homotopy and shape groups are presented for shape fibrations with the near lifting of near multivalued paths property. It is shown that for this class of shape fibrations the existence of liftings of a fine multivalued map, is equivalent to an algebraic problem relative to the homotopy, shape or strong shape groups associated. Keywords:Shape fibration, multivalued map, homotopy groups, shape, groups, strong shape groupsCategories:54C56, 55P55, 55Q05, 55Q07, 55R05


text:
Abstract: Helmholtz established the field of hydrodynamic stability with his pioneering work in 1868. From then on, hydrodynamic stability became a important tool in understanding various fundamental phenomena in aeronautics, meteorology, plasma physics, geophysics, biophysics, etc. However, there are many discrepancies between hydrodynamic stability theory and experiments. In this talk, I will formulate a framework for generalized hydrodynamic stability. I will show that there is much more information in the linearization of Navier-Stokes equations, than purely eigen values, as the operator is non normal and uncertain. Even though the linearization is stable, the existence of large transients ($H_2$ norm), large frequency singular plots ($H_\infty$ norm ), small stability margins with respect to unmodelled dynamics, and large amplification of disturbances, are all features which are more important in prediction of the response of Navier-Stokes equations. A host of new techniques will be introduced in this new framework of generalized hydrodynamic stability. The above ideas are applied to understanding some of the mysteries in transition to turbulence in shear flows. Spectral computations done on Couette flow will be presented.

Bio: Kumar Manoj Bobba got his bachelor's degree in Aerospace Engineering from Indian Institute of Technology-Madras in 1998. He got his master of science degree from California Institute of Technology in Aeronautics, in 1999. He will be graduating in june of 2003 with Ph.D in Aeronautics, Applied and Computational Mathematics, and Control and Dynamical Systems from California Institute of Technology. His current research interests are turbulence, thermal fluid sciences, vortex dynamics, generalized hydrodynamic stability, multi-scale computations, robust and non-linear control theory, and modern applied mathematics.


text:
Home | About | Browse | Latest Additions | Advanced Search | Contact | Help

# Structure and temperature dependence of conductivity of $Ag_{2.5}Se-Se$ composite

Vitta, Satish (1990) Structure and temperature dependence of conductivity of $Ag_{2.5}Se-Se$ composite. In: Journal of Applied Physics, 68 (7). pp. 3413-3417.

 PDF Structure_and_temperature.pdf - Published Version Restricted to Registered users only Download (1MB) | Request a copy

## Abstract

Rapid solidification of $Ag$-53 at. % Se alloy resulted in the formation of a composite mixture of $Ag_{2.5}Se$ and $Se$. The microstructure consists of spherical $Se$ grains of $2–20 \mu m$ size, randomly distributed in a matrix of $Ag_{2.5}Se$. The $Se$ grains were found to be layered hexagonal while the $Ag_{2.5}Se$ had an orthorhombic crystal structure. The unit cell size of this phase, however, was twice that reported for the equilibrium orthorhombic $Ag_2Se$ compound. The conductivity sigma variation with temperature in the range 80–320 K was found to be similar to that observed in degenerate semiconductors. The sigma decreased from $295 \Omega^{-1} cm^{-1}$ at room temperature to a saturation value of $70\Omega^{-1} cm^{-1}$ for temperatures <80 K. The results are discussed in terms of percolation conduction in the $Ag_{2.5}Se$ phase.

Item Type: Journal Article Journal of Applied Physics American Institute Of Physics Copyright of this article belongs to American Institute of Physics. Division of Chemical Sciences > Materials Research Centre 03 Jul 2007 20 Jan 2012 06:15 http://eprints.iisc.ac.in/id/eprint/11384

### Actions (login required)

 View Item


text:
Dear friends, Please read our latest blog post for an important announcement about the website. ❤, The Socratic Team

# What is a prime number between 10 and 20?

Then teach the underlying concepts
Don't copy without citing sources
preview
?

#### Explanation

Explain in detail...

#### Explanation:

I want someone to double check my answer

16
May 22, 2016

The numbers $11$, $13$, $17$ and $19$ are all prime numbers between $10$ and $20$.

#### Explanation:

A prime number is a number that is only divisible by itself and $1$.

To say that a number is even is to say that it is divisible by $2$. As a result, the only even prime number is $2$ itself.

So the only possibilities to consider are the odd numbers between $10$ and $20$, namely:

$11$, $13$, $15$, $17$, $19$

Of these, all are prime except $15$:

$15$ is divisible by $15$, $5$, $3$ and $1$, so is not a prime number.

• 13 minutes ago
• 17 minutes ago
• 18 minutes ago
• 33 minutes ago
• 2 minutes ago
• 3 minutes ago
• 4 minutes ago
• 7 minutes ago
• 10 minutes ago
• 12 minutes ago
• 13 minutes ago
• 17 minutes ago
• 18 minutes ago
• 33 minutes ago


text:
Chestnuts

Mary harvested 45 chestnuts. Christian harvested 56 chestnuts more. How many chestnuts gathered together?

Correct result:

x =  146

Solution:

$x=45+45+56=146$

We would be pleased if you find an error in the word problem, spelling mistakes, or inaccuracies and send it to us. Thank you!

Next similar math problems:

• Chestnuts
Three divisions of nature protectors participated in the collection of chestnut trees.1. the division harvested 1250 kg, the 2nd division by a fifth more than the 1st division and the 3rd division by a sixth more than the second division. How many tons of
• Flowers & garden
The garden grows 5 white flowers. Yellow 7 more than white. Blue 4 fewer than yellow. How many flowers grow together in the garden?
• Children in the classroom
How many children are in the classroom, where Ladislav is 10th lightest and 16th heaviest in class?
• Shoes
Joseph had one pair of sandals, one pair of hiking shoes, 1 pair of botas, one pair of church shoes. How many pieces of shoes had together?
• Microsaving
Honza saved 72 crowns. Pepík saved 9 crowns more than Honza. How many crowns saved Pepík?
• Hugo has
Hugo has 12 apples, Julka has seven more than Hugo and six less than Anna. How many apples have Anna and how many Julka?
• CDs
Adam has 6 CDs more than Filip and 7 CDs less than Dominica. Filip has 6 CDs. How many CDs has Adam and how many CDs has Dominika?
• Seals
There are 10 seals on floe. a) On Wednesday arrived a six and departed 2 seals. How many seals are on the floe? b) on Thursday arrived a 5 seals more then departed. How many seals are on the floe?
• Apples
Hanka has 6 apples more than Juro and 7 apples less than Mirka. Mirka has 23 apples. How many apples has Hanka and how many Juro?
• Letters
The school children have written 20 letters afternoon and then threw 20 letters and then the teacher counted the children and the children were 22 so they went to throw for 2 sheets. How many letters sent together?
• Free postage
Dad found out that when ordering goods over the Internet and will pay more than 60 euros do not pay a fee for postal delivery. He chose goods for 10, 20 and 15 euros. How many euros do we have pay for goods for free postage?
• Grandma
Grandma bought two 10 pack of eggs. She used 8 eggs on the cake, 2 times less on the omelette and 4 more eggs for breakfast. How many eggs did it stand for?
• Fruit candies
Zuzka and Janka ate fruit candies. Zuzka ate 10 and Janka ate 3 times more. How many sweets did both girls eat together?
• Eight chairs
There are eight chairs by the table and one more child sitting on each one. There are two times more girls than boys. How many girls and how many boys can there be?
• Swallows
7 swallows 8 tits and 8 sparrows sitting on a wire. How many total flyoff bird sitting on a wire?
• Playing Cards
Kara has 2 times more cards than Dana, Dana has 4× less than Mary. Together they have 728 cards. How many cards has each of them?
• Cents
Julka has 3 cents more than Hugo. Together they have 27 cents. How many cents has Julka and how many Hugo?


text:
# Inscribed Equilateral Triangle Trig - Expression for P/A

Problem: The vertices of an equilateral triangle, with perimeter P and area A, lie on a circle with radius r. Find an expression for $$\frac{P}{A}$$ in the form $$\frac{r}{k}$$, where k ∈ Z+.

Hi, I'm having a bit of trouble solving this problem. What I've tried is using the formula for the area of an equilateral triangle (a = $$\frac{3\sqrt{3}}{4}$$$$r^2$$). Since one side is equal to $$\frac{P}{3}$$, I inserted that into the formula a = $$2rsin(60)$$ to get $$P=3(2rsin(60))$$. That meant that $$\frac{P}{A}$$ -> $$\frac{3(2rsin(60))}{\frac{3\sqrt{3}}{4}r^2}$$ = $$\frac{2\sqrt{3}}{3\sqrt{3}r}$$ = $$\frac{2}{3r}$$. But I don't think this is the correct answer because when I put them back into the formulas I get different values for the radius! If anyone can help and explain what I did wrong it would help a lot. Thanks!

I get that $$A = \frac{P^2\sqrt{3}}{36}$$. Also, $$r = \frac{P}{3\sqrt{3}} \implies P = 3\sqrt{3}r$$. This effectively matches what your results. Thus,
$$\frac{P}{A} = \frac{36}{\sqrt{3}P} = \frac{36}{9r} = \frac{4}{r} \tag{1}\label{eq1}$$
In your calculations, $$\sin(60^{0}) = \frac{\sqrt{3}}{2}$$, so $$3(2r\sin(60)) = 3\sqrt{3}r$$. You multiplied by $$4$$ from the denominator, which should give $$12\sqrt{3}$$, so perhaps you just dropped the initial $$1$$ digit to get $$2\sqrt{3}$$. Multiplying your result by $$6$$ to compensate gives $$\frac{12}{3r} = \frac{4}{r}$$, i.e., my result in \eqref{eq1}.
Another issue is that the $$r$$ is in the denominator, not the numerator as your question asks. Perhaps one of the $$2$$ fractions were meant to be their reciprocal, i.e., $$\frac{A}{B}$$ or $$\frac{k}{r}$$, so then $$k = 4$$?
• Ah I'm sorry for the typo, the question does ask for $\frac{k}{r}$. I don't know why that wasn't an obvious mistake. Thank you so much for the clarification! – James R Aug 9 at 2:27
• @JamesR You're welcome for the clarification. Also, I hope my answer resolved your main question. Although I expressed $A$ and $P$ somewhat differently than you did (I just calculated them using symmetry and various $30-60-90$ triangles), as I stated and you can verify if you wish, they are basically the same results as you obtained. – John Omielan Aug 9 at 2:31


text:
# Definite integrals

1. Mar 28, 2005

### macarroni

I don't know how to solve this really easy integral.

suppose: $$a=2 m/s^2$$

$$a = dv / dt$$

$$\int^b_a a \ dt = \int^b_a dv$$

$$\int^b_a 2 \ dt = v_{b} - v_{a}$$

$$2t_{b} - 2t_{a} = v_{b} - v_{a}$$

$$v_{b} = v_{a} + 2t_{b} - 2t_{a}$$

I hope everything is ok up to this point. Then I want to know the position: r, and I need to use the same b and a that I have already use before, but...

$$v = dr / dt$$

$$\int^b_a v \ dt = \int^b_a dr$$

$$\int^b_a ( v_{a} + 2t_{b} - 2t_{a} ) \ dt = r_{b} - r_{a}$$

$$v_{a}t_{b} - v_{a}t_{b} ...... \ ??? = r_{b} - r_{a}$$

2. Mar 28, 2005

### James R

In your first expression for a, is m the mass and s the displacement? Or is s just a constant?

3. Mar 28, 2005

### StatusX

It looks like you're trying to find the velocity and position of an object under accelaeration 2 m/sec^2 at a time tb in terms of its velocity at some earlier time ta. If so, you found vb correctly. But to get the position, you need to integrate the velocity as a function of time, not the velocity at tb. To get v(t), just replace tb with the variable t.

4. Mar 28, 2005

### Gamma

a = 2 m/s^2

First part is OK. But when you did the second part you need a general form of v to do the diferentiation. This is how I would do this:

$$d^2 r/dt^2 = a$$

Integrating once, you have

$$dr/dt = a t + A$$ --------------------(1)

where A is a constant and we can find A using the boundary conditions. You have been given at time t = ta , v = va.

so, $$v_a = a t_a + A => A = v_a - a t_a$$

so $$v(t) = at + ( v_a - a t_a)$$

Integrate (1) wrt t

$$r = at^2/2 + At + B$$ -----------------(2)

where B is a constant and can be found as earlier using Boundary conditions. at t=ta, r = ra .

$$r_a = at_a^2/2 + At_a + B$$

Solve for B and subtitute in (2) to get an expression for r(t)

5. Mar 28, 2005

### xanthym

.

Because velocity "v" is a function of time "t", which is indicated by writing it "v(t)", you need to maintain the functional dependence of v(t) into the second set of integrations. Your original work is rewritten below in a manner to do that. Also, equations become more managable if {ta=0}.

QUESTION: What is the distance "r(t)" traveled from time t=0 to time "t" (for constant acceleration "a")??

$$a \ = \ dv/dt$$

$$\int^{t}_{0} a \ dt \ = \ \int^{v(t)}_{v(0)} \ dv$$

$$at \ = \ v(t) - v(0)$$

$$\color{blue} v(t) \ = \ v(0) + at$$

$$v \ = \ dr/dt$$

$$\int^{t}_{0} v(t) \ dt \ = \ \int^{r(t)}_{r(0)} \ dr$$

$$\int^{t}_{0} \color{blue}\left( v(0) + at \right)\color{black} \ dt \ = \ r(t) - r(0)$$

$$v(0)t + (1/2)at^{2} \ = \ r(t) - r(0)$$

$$\color{red} r(t) \ = \ r(0) + v(0)t + (1/2)at^{2}$$

Now place {a=(2 m/sec^2)} and values for "r(0)" and "v(0)" into the equation for the final result.

~~

Last edited: Mar 29, 2005
6. Mar 29, 2005

### Nylex

. Those are units..

7. Mar 29, 2005

### James R

Ah! I completely misread. It's a = 2 metres per second squared. Silly me! I think I just assumed that since the rest of the post was in terms of variables, the acceleration was in terms of variables, too.

I'd do this similarly to how Gamma did it, above.


text:
# Thwart Lepton compression

Dropbox recently released Lepton (GitHub), a method that losslessly compresses JPEG images round-trip, saving an average of 22%.

Because of the pigeonhole principle, any general compression algorithm cannot be guaranteed to result in a smaller file (general because it doesn't apply to inputs constrained to a specific format). Lepton exploits common characteristics about JPEGs, which if subverted, might pigeonhole it to produce a file larger than the source.

# Requirements

Write a program that generates:

• A valid JPEG/JFIF image,
• with a size between 0.5 MB and 1 MB,
• no smaller than 256 × 256 px,
• no larger than 4096 × 4096 px,
• recognizable by Lepton (it can successfully "compress" to a .lep image), and
• decompresses to an identical .jpg (as the input).
• APPx, COM, and other metadata, non-graphical marker sections are restricted in the JPEG (injecting arbitrary amounts of random bytes into the image to asymptotically approach 1:1 compression is lame.)
• an APP0 JFIF marker is permitted but no thumbnail is allowed (should be exactly 16 bytes)
• tl;dr If you're not intentionally shoving metadata into an EXIF segment and you disable any sort of thumbnail your language library of choice wants to put into the image, that should be OK.

Post the code and image.

If you want to write a program that produces a Lepton image that when converted yields a JPEG meeting the criteria, that's fine. It must remain identical across arbitrarily many JPEG → Lepton → JPEG → ... cycles.

# Scoring

The byte size of the Lepton image divided by the source JPEG image. Higher (worse Lepton compression) is better. Run Lepton with default flags and switches.

# Getting Lepton

A 5-second crash-course to build Lepton:

git clone https://github.com/dropbox/lepton.git
cd lepton
./autogen.sh && ./configure && make

# fish shell: ./autogen.sh ;and ./configure ;and make

Then ./lepton --help should tell you things.

• I think this could be retooled to a code golf challenge where you write code that generates an image that fails compression by at least some constant. Actually, it may just suffice to just put an upper bound on the code size that's much smaller than the size to hardcode the jpeg, but big enough for an reasonable program. – xnor Jul 15 '16 at 8:55
• Is there any reason to expect that uniformly random pixels aren't the best answer? – feersum Jul 15 '16 at 14:19
• @feersum you mean just like my example? – Nick T Jul 15 '16 at 15:26
• Also, because JPEG is a lossy format, there are many, many ways (e.g. "quality" among other things) to compress a given image. Each JPEG file includes a couple tables that dictate how the rest of the image is decoded, and those tables can basically be whatever. If you save a BMP image in different programs, it'll probably be identical. If you save a JPG in different programs, unless they use the same back-end library, probably not. – Nick T Jul 15 '16 at 15:38
• @feersum uniformly random input to a JPEG compressor doesn't result in uniformly random output, and that output is what lepton works on. If you can come up with an input that causes a JPEG compressor to produce uniformly random output, that would probably be useful here and elsewhere. – Sparr Jul 26 '16 at 1:05

# Python 3 + mozjpeg + /dev/urandom, 720×720: avg. score 102%

Depends on the mozjpeg package, the code assumes it's installed into /usr/local/opt/mozjpeg. (on OS X it's trivial to install, just run brew install mozjpeg)

Also it depends on /dev/urandom special file, it's used for generating random data.

The code simply feeds random data to mozjpeg compressor (in TGA format, because cjpeg understands it and it has very simple header), and lets it create an optimized jpeg file. Quality is set to the maximum because it makes DCT coefficients the least compressable, and it doesn't matter much what algorithm is used to compress uncompressable data.

I checked that the jpeg->lepton->jpeg cycle is lossless — it is true.

import subprocess
from subprocess import PIPE

c_mozjpeg_path = '/usr/local/opt/mozjpeg/bin/cjpeg'
cjpeg_params = '-quality 100 -dc-scan-opt 2 -dct float -targa'
image_size = 720

def write_random_tga_image(w, h, of, rf):
def wb(value, size):
of.write(int.to_bytes(value, size, 'little'))

wb(0, 2)
wb(3, 1)
wb(0, 9)
wb(w, 2)
wb(h, 2)
wb(8, 1)
wb(0, 1)

data_size = w * h
while data_size > 0:

def main():
with open('/dev/urandom', 'rb') as rf:
with open('oops.jpg', 'wb') as f:
p = subprocess.Popen((c_mozjpeg_path,) + tuple(cjpeg_params.split(' ')), stdin=PIPE, stdout=f)
write_random_tga_image(image_size, image_size, p.stdin, rf)
p.communicate()

if __name__ == '__main__':
main()

Code is not golfed, obviously.

Example image:

Fun fact: generated JPEG file is larger than the source uncompressed TGA image, even though JPEG uses lossy compression.

Fun fact 2: Imgur (the default image hosting for SO) does very bad job at this file — for some reason it recompresses it to lower quality, even though it's less than 1MB. So I used Github to upload the example image.

Fun fact 3: In general, mozjpeg indeed does better JPEG compression while staying compatible with existing JPEG decoders. And it also has tool to losslessly optimize JPEG files, too — jpegtran.

• I could use a cross-platform RNG (SystemRandom class for example) but I were too lazy. It's trivial and it should give similar results. – Display Name Aug 24 '16 at 5:32

# Naive Noise, 1024 × 1024: score 85.55%

A compliant example in Python to get the ball rolling. Not optimized in any way; probable shortcomings:

• No idea what the default quality setting is.
• Each 8x8 block has practically the exact same average value (~50%) to the one adjacent to it: Lepton says that they use that information to save space.
• Totally default quantization and Huffman tables (whatever the library decides to use).

import numpy as np
from PIL import Image

np.random.seed(0) # make sure it's repeatable.

size = 1024

imgr = np.random.randint(0, 0xFF, (size, size, 3)).astype('uint8')
pimg = Image.fromarray(imgr)
pimg.save('noise.jpg')

Then some bash to do the thing:

./lepton noise.jpg noise.lep 2>\dev\null # vomits out a lot of technobabble
./lepton noise.lep noise-out.jpg 2>\dev\null

diff -qs noise.jpg noise-out.jpg

SIZE1=$(stat -f "%z" noise.jpg) # http://superuser.com/a/570920/18931 SIZE2=$(stat -f "%z" noise.lep)
RATIO=$(bc <<< "scale=4;$SIZE2/$SIZE1") echo "$SIZE2/$SIZE1 =$RATIO"

# Files noise.jpg and noise-out.jpg are identical
# 538817/629769 = .8555


text:
Special random variables Chapter 5 Some discrete or continuous probability distributions.

Presentation on theme: "Special random variables Chapter 5 Some discrete or continuous probability distributions."— Presentation transcript:

Special random variables Chapter 5 Some discrete or continuous probability distributions

Some special random variables Bernoulli Binomial Poisson Hypergeometric Uniform Normal and its derivatives Chi-square T-distribution F-distribution Exponential Gamma

Bernoulli random variable A random variable X is said to be a Bernoulli random variable if its probability mass function is given as the following: P{X=0}=1-p, P{X=1}=p; (you may assume X=1 when the experimental outcome is successful and X=0 when it is failed.) E[X]=1×P{X=1}+0×P{X=0}=p Var[X]=E[X2]-E[X]2 =p(1-p)

Binomial random variable Suppose there are n independent Bernoulli trials, each of which results in a “ success ” with the probability p. If X represents the number of successes that occur in the n trials, then X is said to be a binomial random variable with parameters (n,p). P{X=i}= n!/[(n-i)! ×i!] × pn(1-p)(n-i), i=0, 1, 2, … n

The expectation of binomial random variable The Binomial random X is composed of n independent Bernoulli trials ∴ X=Σ 1~n x i, x i =1 when the i th trial is a success or x i =0 otherwise E[X]=Σ 1~n E[x i ]=n×p Var[X]=Σ 1~n Var[x i ]=np(1-p)

Patterns of binomial distribution If p=0.5, then X will distribute symmetrically If p>0.5, then X will be a left-skewed distribution If p<0.5, then X will be a right-skewed distribution If n  ∞, then X will distribute as a symmetric bell/normal pattern

Poisson random variable The random variable X is a Poisson distribution if its prob. mass function is given by (By the Taylor series)

Expectation and variance of Poisson distribution By using the moment generating function

Poisson vs. Binomial A binomial distribution, (n,p),  a Poisson with meanλ=np, when n is large and p is small. In other words, if the successful probability of trial is very small, then the accumulative many trials distribute as a Poisson. The probability of one person living over 100 years of age is 0.01, then the mean number of over-100-year-old persons 10 may occur within 1000 elders. λ means the average occurrence among a large number of experiments, in contrast to, p means the occurring chance of every trial

Comparisons A binomial random variable with p near to 0.5 A Poisson random variable approximates to a binomial distribution when n becomes large.

Hypergeometric random variable There are N+M objects, of which N are desirable and the other M are defective. A sample size n is randomly chosen from N+M without replacements. Let X be the number of desirable within n chosen objects. Its probability mass function as the following. We said X is a hypergeometric distribution with parameters (N,M,n)

Expectation & variance of hypergeometric distribution

Expectation & variance of hypergeometric distribution (cont.) Moreover, if N+M increases to ∞, then Var(X) converges to np(1-p), which is the variance of a binomial random variable with parameters (n,p).

hypergeometric vs. binomial Let X, and Y be independent binomial random variables having respective parameters (n,p) and (m,p). The conditional p.m.f. of X given that X+Y=k is a hypergeometric distribution with parameters (n,m,k).

The Uniform random variable A random variable X is said to be uniformly distributed over the interval [α,β] if its p.d.f. is given by

Pattern of uniform distribution

Expectation and variance of uniform distribution E[X]=∫ α~ β x [1/(β-α)]d x =(α+β)/2 Var(X)=E[X2]-E[X]2 =(β-α)2/12 P.161, Example 5.4b

Normal random variable A continuous r.v X has a normal distribution with parameter μ and σ2 if its probability density function is given by: We write X~N(μ,σ2) By using the M.G.F., we obtain E[X]=ψ ’ (0)=μ, and Var[X]=ψ ” (0)-ψ ’ (0)2=σ2

Standard normal distribution The Cumulative Distribution function of Z

Percentiles of the normal distribution Suppose that a test score distributes as a normal distribution with mean 500 and standard deviation of 100. What is the 75th percentile score of this test?

Characteristics of Normal distribution P{ ∣ X-μ ∣ <σ}=ψ(-1<X-μ/σ<1)=ψ(-1<Z<1)= ψ(1)-ψ(-1)=2ψ(1) -1=2× 0.8413-1 P{ ∣ X-μ ∣ <2σ}=ψ(-2<X-μ/σ<2)=ψ(-2<Z<2)= ψ(2)-ψ(-2)=2ψ(2) -1=2× 0.9772-1 P{ ∣ X-μ ∣ <3σ}=ψ(-3<X-μ/σ<3)=ψ(-3<Z<3)= ψ(3)-ψ(-3)=2ψ(3) -1=2× 0.9987-1

The pattern of normal distribution

Exponential random variables A nonnegative random variable X with a parameter λ obeying the following pdf and cdf is called an exponential distribution. The exponential distribution is often used to describe the distribution of the amount of time until some specific event occurs. The amount of time until an earthquake occurs The amount of time until a telephone call you receive turns to be the wrong number

Pattern of exponential distribution

Expectation and variance of exponential distribution E[X]=ψ ’ (0)=1/λ E[X] means the average cycle time, λ presents the occurring frequency per time interval Var(X)=ψ ” (0)-ψ ’ (0)2=1/λ2 The memoryless property of X P{X>s+t/X>t}=P{X>s}, if s, t ≧ 0; P{X>s+t}=P{X>s} ×P{X>t}

Poisson vs. exponential Suppose that independent events are occurring at random time points, and let N(t) denote the number of event that occurs in the time interval [0,t]. These events are said to constitute a Poisson process having rate λ, λ>0, if N(0)=0; The distribution of number of events occurring within an interval depends on the time length and not on the time point. lim h  0 P{N(h)=1}/h=λ lim h  0 P{N(h) ≧ 2}/h=0

Poisson vs. exponential (cont.) P{N(t)=k}=P{k of the n subintervals contain exactly 1 event and the other n-k contain 0 events} P{ecactly 1 event in a subinterval t/n} ≒ λ(t/n) P{0 events in a subinterval t/n} ≒ 1-λ(t/n) P{N(t)=k} ≒, a binomial distribution with p=λ(t/n) A binomial distribution approximates to a Poisson distribution with k=n(λt/n) when n is large and p is small.

Poisson vs. exponential (cont.) Let X 1 is the time of first event. P{X 1 >t }=P{N(t)=0} (0 events in the first t time length)=exp(-λt) ∵ F(t)=P{X 1 ≦ t }=1- exp(-λt) with mean 1/λ ∴ X 1 is an exponential random variable Let X n is the time elapsed between (n-1)st and nth event. P{X n >t/ X n-1 =s}=P{N(t)=0} =exp(-λt) ∵ F(t)=P{X n ≦ t }=1- exp(-λt) with mean 1/λ ∴ X n is also an exponential random variable

Gamma distribution See the gamma definition and proof in p.182-183 If X 1 and X 2 are independent gamma random variables having respective parameters (α 1,λ) and (α 2,λ), then X 1 +X 2 is a gamma random variable with (α 1 +α 2,λ) The gamma distribution with (1,λ) reduces to the exponential with the rate λ. If X 1, X 2, … X n are independent exponential random variables, each having rate λ, then X 1 + X 2 + … +X n is a gamma random variable with parameters (n,λ)

Expectation and variance of Gamma distribution The gamma distribution with (α,1) reduces to the normal distribution when α becomes large. The patters of gamma distribution move from right-skewed toward symmetric as α increases. See p.183, using the G.M.F. to compute E[X]=α/λ Var(X)=α/(λ2 )

Patterns of gamma distribution

Derivatives from the normal distribution The chi-square distribution The t distribution The F distribution

The Chi-square distribution If Z 1, Z 2, … Z n are independent standard normal random variables, the X, defined by X=Z12+Z22+ … Zn2, is called chi-square distribution with n degrees of freedom, and denoted by X~Xn2 If X 1 and X 2 are independent chi-square random variables with n 1 and n 2 degrees of freedom, respectively, then X 1 +X 2 is chi-square with n 1 +n 2 degrees of freedom.

p.d.f. of Chi-square The probability density function for the distribution with r degrees of freedom is given by

The relation between chi-square and gamma A chi-square random variable with n degrees of freedom is identical to a gamma random variable with (n/2,1/2), i.e., α=n/2,λ=1/2 The expectation of chi-square distribution E[X] is the same as the expectation of gamma withα=n/2,λ=1/2, so E[X]=α/λ=n (degrees of freedom) The variance of chi-square distribution Var(X)=α/(λ 2 )=2n The chi-square distribution moves from right- skewed toward symmetric as the degree of freedom n increases.

Patterns of chi-square distribution

The t distribution If Z and Xn2 are independent random variables, with Z having a std. normal dist. And Xn2 having a chi-square dist. with n degrees of freedom, then T n defined by For large n, the t distribution approximates to the standard normal distribution The t distribution move from flatter and having thicker tails toward steeper and having thinner tails as n increases.

p.d.f. of t-distribution B(p,q) is the beta functionbeta function

Patterns of t distribution

The F distribution If Xn2 and Xm2 are independent chi-square random variables with n and m degrees of freedom, respectively, then the random variable F n,m defined by F n,m is said an F-distribution with n and m degrees of freedom F 1,m is the same as the square of t-distribution, ( T m ) ²

p.d.f of F-distribution where is the gamma function, B(p,q) is the beta function,gamma functionbeta function

Patterns of F-distribution

Relationship between different random variables Gamma(α, λ) Poisson(λ) Exponential(λ) Normal (μ,σ2) Binomial (n, p)Bernoulli (p) Z (0, 1) n  ∞ p  0 λ=np n  ∞, p  0.5 Repeated trials Standardization Z=(X-μ)/σ The very small time partition α=1 Chi-square (n) t distribution F distribution λ=1, α  ∞ α=n/2 λ=1/2

Homework #4 Problem 5,12,27,31,39,44

Download ppt "Special random variables Chapter 5 Some discrete or continuous probability distributions."

Similar presentations


text:
## anonymous one year ago Evaluate S5 for 600 + 300 + 150 + … and select the correct answer below.

1. welshfella

this is another geometric series:- r will be second term / first term

2. anonymous

What would the equation for this one be?

3. SolomonZelman

you can use the formula $$\large\color{black}{ \displaystyle {\rm Sum} _{\rm ~(when~~adding~~some~~n~~number~~of~~terms)} \displaystyle =\frac{({\rm 1st~ term)\times (1-{\rm r}^n)}}{1-{\rm r}}}$$

4. welshfella

r = 300 / 600 = ?

5. anonymous


text:
The learner will multiply fractions.

## Multiplying Fractions

Multiply. Give the result as a whole number, proper fraction, or mixed number in simplest form.

## Correct!

Multiply. Give the result as a whole number, proper fraction, or mixed number in simplest form.

Next Question

## Incorrect

Multiply. Give the result as a whole number, proper fraction, or mixed number in simplest form.

Next Question

## Multiplying Fractions

Multiply. Give the result as a whole number, proper fraction, or mixed number in simplest form.

## Correct!

Multiply. Give the result as a whole number, proper fraction, or mixed number in simplest form.

Next Question

## Incorrect

Multiply. Give the result as a whole number, proper fraction, or mixed number in simplest form.

Next Question

## Multiplying Fractions

Multiply. Give the result as a whole number, proper fraction, or mixed number in simplest form.

## Correct!

Multiply. Give the result as a whole number, proper fraction, or mixed number in simplest form.

Next Question

## Incorrect

Multiply. Give the result as a whole number, proper fraction, or mixed number in simplest form.

Next Question

## Multiplying Fractions

Multiply. Give the result as a whole number, proper fraction, or mixed number in simplest form.

## Correct!

Multiply. Give the result as a whole number, proper fraction, or mixed number in simplest form.

Next Question

## Incorrect

Multiply. Give the result as a whole number, proper fraction, or mixed number in simplest form.

Next Question

## Multiplying Fractions

Multiply. Give the result as a whole number, proper fraction, or mixed number in simplest form.

## Correct!

Multiply. Give the result as a whole number, proper fraction, or mixed number in simplest form.

Next Question

## Incorrect

Multiply. Give the result as a whole number, proper fraction, or mixed number in simplest form.

Next Question

## Multiplying Fractions

Multiply. Give the result as a whole number, proper fraction, or mixed number in simplest form.

## Correct!

Multiply. Give the result as a whole number, proper fraction, or mixed number in simplest form.

Next Question

## Incorrect

Multiply. Give the result as a whole number, proper fraction, or mixed number in simplest form.

Next Question

## Multiplying Fractions

Multiply. Give the result as a whole number, proper fraction, or mixed number in simplest form.

## Correct!

Multiply. Give the result as a whole number, proper fraction, or mixed number in simplest form.

Next Question

## Incorrect

Multiply. Give the result as a whole number, proper fraction, or mixed number in simplest form.

Next Question

## Multiplying Fractions

Multiply. Give the result as a whole number, proper fraction, or mixed number in simplest form.

## Correct!

Multiply. Give the result as a whole number, proper fraction, or mixed number in simplest form.

Next Question

## Incorrect

Multiply. Give the result as a whole number, proper fraction, or mixed number in simplest form.

Next Question

## Multiplying Fractions

Multiply. Give the result as a whole number, proper fraction, or mixed number in simplest form.

## Correct!

Multiply. Give the result as a whole number, proper fraction, or mixed number in simplest form.

Next Question

## Incorrect

Multiply. Give the result as a whole number, proper fraction, or mixed number in simplest form.

Next Question

## Multiplying Fractions

Multiply. Give the result as a whole number, proper fraction, or mixed number in simplest form.

## Correct!

Multiply. Give the result as a whole number, proper fraction, or mixed number in simplest form.

Next Question

## Incorrect

Multiply. Give the result as a whole number, proper fraction, or mixed number in simplest form.

Next Question

## Multiplying Fractions

Multiply. Give the result as a whole number, proper fraction, or mixed number in simplest form.

## Correct!

Multiply. Give the result as a whole number, proper fraction, or mixed number in simplest form.

Next Question

## Incorrect

Multiply. Give the result as a whole number, proper fraction, or mixed number in simplest form.

Next Question

## Multiplying Fractions

Multiply. Give the result as a whole number, proper fraction, or mixed number in simplest form.

## Correct!

Multiply. Give the result as a whole number, proper fraction, or mixed number in simplest form.

Next Question

## Incorrect

Multiply. Give the result as a whole number, proper fraction, or mixed number in simplest form.

Next Question

## Multiplying Fractions

Multiply. Give the result as a whole number, proper fraction, or mixed number in simplest form.

## Correct!

Multiply. Give the result as a whole number, proper fraction, or mixed number in simplest form.

Next Question

## Incorrect

Multiply. Give the result as a whole number, proper fraction, or mixed number in simplest form.

Next Question

## Multiplying Fractions

Multiply. Give the result as a whole number, proper fraction, or mixed number in simplest form.

## Correct!

Multiply. Give the result as a whole number, proper fraction, or mixed number in simplest form.

Next Question

## Incorrect

Multiply. Give the result as a whole number, proper fraction, or mixed number in simplest form.

Next Question

## Multiplying Fractions

Multiply. Give the result as a whole number, proper fraction, or mixed number in simplest form.

## Correct!

Multiply. Give the result as a whole number, proper fraction, or mixed number in simplest form.

Finish

## Incorrect

Multiply. Give the result as a whole number, proper fraction, or mixed number in simplest form.

### $2\tfrac{4}{15}$

Finish
##### Question 1 of 10
Multiplying Fractions

# Score

You have answered 5 of 10 questions correctly.

50%

Author
Published
3/13/2014
Last Updated
3/13/2014
Tags


text:
Monday, 2 May 2011

C Program Structure

C Program Structure

A C program basically has the following form:

* Preprocessor Commands
* Type definitions
* Function prototypes -- declare function types and variables passed to function.
* Variables
* Functions

We must have a main() function.

A function has the form:

type function_name (parameters)
{
local variables
C Statements
}

If the type definition is omitted C assumes that function returns an integer type. NOTE: This can be a source of problems in a program.

So returning to our first C program:

/* Sample program */

main()
{
printf( I Like C $\backslash$n'' );
exit ( 0 );
}
NOTE:
* C requires a semicolon at the end of every statement.
* printf is a standard C function -- called from main.
* $\backslash$n signifies newline. Formatted output -- more later.
* exit() is also a standard function that causes the program to terminate.

Strictly speaking it is not needed here as it is the last line of main() and the program will terminate anyway.

Let us look at another printing statement:
printf(.$\backslash$n.1$\backslash$n..2$\backslash$n...3$\backslash$n'');

The output of this would be:
.
.1
..2
...3

Variables

C has the following simple data types:

The Pascal Equivalents are:

On UNIX systems all ints are long ints unless specified as short int explicitly.

NOTE: There is NO Boolean type in C -- you should use char, int or (better) unsigned char.

Unsigned can be used with all char and int types.

To declare a variable in C, do:

var_type list variables;

e.g. int i,j,k;
float x,y,z;
char ch;

Defining Global Variables

Global variables are defined above main() in the following way:-

short number,sum;
int bignumber,bigsum;
char letter;

main()
{

}

It is also possible to pre-initialise global variables using the = operator for assignment.

NOTE: The = operator is the same as := is Pascal.

For example:-

float sum=0.0;
int bigsum=0;
char letter=A';

main()
{

}

This is the same as:-

float sum;
int bigsum;
char letter;
main()
{
sum=0.0;
bigsum=0;
letter=A';
}

...but is more efficient.

C also allows multiple assignment statements using =, for example:

a=b=c=d=3;

...which is the same as, but more efficient than:

a=3;
b=3;
c=3;
d=3;

This kind of assignment is only possible if all the variable types in the statement are the same.

You can define your own types use typedef. This will have greater relevance later in the course when we learn how to create more complex data structures.

As an example of a simple use let us consider how we may define two new types real and letter. These new types can then be used in the same way as the pre-defined C types:

typedef real float;
typedef letter char;

Variables declared:
real sum=0.0;
letter nextletter;

Printing Out and Inputting Variables

C uses formatted output. The printf function has a special formatting character (%) -- a character following this defines a certain format for a variable:

%c -- characters
%d -- integers
%f -- floats

e.g. printf(%c %d %f'',ch,i,x);

NOTE: Format statement enclosed in ...'', variables follow after. Make sure order of format and variable data types match up.

scanf() is the function for inputting values to a data structure: Its format is similar to printf:

i.e. scanf(%c %d %f'',&ch,&i,&x);

NOTE: & before variables. Please accept this for now and remember to include it. It is to do with pointers which we will meet later (Section 17.4.1).

Constants

ANSI C allows you to declare constants. When you declare a constant it is a bit like a variable declaration except the value cannot be changed.

The const keyword is to declare a constant, as shown below:

int const a = 1;
const int a =2;

Note:

* You can declare the const before or after the type. Choose one an stick to it.
* It is usual to initialise a const with a value as it cannot get a value any other way.

The preprocessor #define is another more flexible (see Preprocessor Chapters) method to define constants in a program.

You frequently see const declaration in function parameters. This says simply that the function is not going to change the value of the parameter.

The following function definition used concepts we have not met (see chapters on functions, strings, pointers, and standard libraries) but for completenes of this section it is is included here:

void strcpy(char *buffer, char const *string)

The second argiment string is a C string that will not be altered by the string copying standard library function.

Arithmetic Operations

As well as the standard arithmetic operators (+ - * /) found in most languages, C provides some more operators. There are some notable differences with other languages, such as Pascal.

Assignment is = i.e. i = 4; ch = y';

Increment ++, Decrement -- which are more efficient than their long hand equivalents, for example:-- x++ is faster than x=x+1.

The ++ and -- operators can be either in post-fixed or pre-fixed. With pre-fixed the value is computed before the expression is evaluated whereas with post-fixed the value is computed after the expression is evaluated.

In the example below, ++z is pre-fixed and the w-- is post-fixed:

int x,y,w;
main()
{
x=((++z)-(w--)) % 100;
}

This would be equivalent to:

int x,y,w;
main()
{
z++;
x=(z-w) % 100;
w--;
}

The % (modulus) operator only works with integers.

Division / is for both integer and float division. So be careful.

The answer to: x = 3 / 2 is 1 even if x is declared a float!!

RULE: If both arguments of / are integer then do integer division.

So make sure you do this. The correct (for division) answer to the above is x = 3.0 / 2 or x= 3 / 2.0 or (better) x = 3.0 / 2.0.

There is also a convenient shorthand way to express computations in C.

It is very common to have expressions like: i = i + 3 or x = x*(y + 2)

This can written in C (generally) in a shorthand form like this:

$\mbox{{\em expr}}_{1} \: \mbox{{\em op}} \: = \:\mbox{{\em expr}}_{2}$

which is equivalent to (but more efficient than):

$\mbox{{\em expr}}_{1} \: = \: \mbox{{\em expr}}_{1} \: \mbox{{\em op}} \: \mbox{{\em expr}}_{2}$

So we can rewrite i = i + 3 as i += 3

and x = x*(y + 2) as x *= y + 2.

NOTE: that x *= y + 2 means x = x*(y + 2) and NOT x = x*y + 2.

Comparison Operators

To test for equality is ==

A warning: Beware of using ='' instead of `=='', such as writing accidentally

if ( i = j ) .....

This is a perfectly LEGAL C statement (syntactically speaking) which copies the value in "j" into "i", and delivers this value, which will then be interpreted as TRUE if j is non-zero. This is called assignment by value -- a key feature of C.

Not equals is: !=

Other operators < (less than) , > (grater than), <= (less than or equals), >= (greater than or equals) are as usual.

Logical Operators

Logical operators are usually used with conditional statements which we shall meet in the next Chapter.

The two basic logical operators are:

&& for logical AND, || for logical OR.

Beware & and | have a different meaning for bitwise AND and OR ( more on this later in Chapter 12).

Order of Precedence

It is necessary to be careful of the meaning of such expressions as a + b * c

We may want the effect as either

(a + b) * c

or

a + (b * c)
All operators have a priority, and high priority operators are evaluated before lower priority ones. Operators of the same priority are evaluated from left to right, so that

a - b - c

is evaluated as

( a - b ) - c

as you would expect.

From high priority to low priority the order for all C operators (we have not met all of them yet) is:

( ) [ ] -> .
! $\sim$ - * & sizeof cast ++ -
(these are right->left)
* / %
+ -
< <= >= >
== !=
&
$\wedge$ |
&&
||
?: (right->left)
= += -= (right->left)
, (comma)

Thus

a < 10 && 2 * b < c

is interpreted as
( a < 10 ) && ( ( 2 * b ) < c )

and

a =

b =
spokes / spokes_per_wheel
+ spares;
as
a =
( b =
( spokes / spokes_per_wheel )
+ spares
);


text:
# Can a matrix be invertible if it is not square?

Mar 20, 2018

No

#### Explanation:

Let's consider a non-square matrix that is dimension $M$ x $N$ where $M \ne N$. This means that the matrix maps an N dimensional space to an M dimensional space.

Logically, its inverse therefore maps an M dimensional space to an N dimensional space.

Since the inverse of the inverse is the original, let's just assume $M < N$ (if $M > N$, we can talk about the inverse instead, so this isn't a bad thing to do). That means that we're taking a higher dimensional space and mapping it to a smaller dimensional space.

By definition of a dimension (and linear span and eigenvalues), this cannot be invertible.

One can construct a trivial operator that can be inverted (such as x -> (x, 0), i.e. the matrix [1, 0]), but those represent a lower dimensional space, such as a plane or a line within 3-space.


text:
## 10.1.1 Model Definition

The formulation presented in this section is an extension of Formulation 2.3 that incorporates the effects of nature at every stage. Let denote a discrete state space, and let denote the set of actions available to the decision maker (or robot) from state . At each stage it is assumed that a nature action is chosen from a set . This can be considered as a multi-stage generalization of Formulation 9.4, which introduced . Now may depend on the state in addition to the action because both and are available in the current setting. This implies that nature acts with the knowledge of the action selected by the decision maker. It is always assumed that during stage , the decision maker does not know the particular nature action that will be chosen. It does, however, know the set for all and .

As in Section 9.2, there are two alternative nature models: nondeterministic or probabilistic. If the nondeterministic model is used, then it is only known that nature will make a choice from . In this case, making decisions using worst-case analysis is appropriate.

If the probabilistic model is used, then a probability distribution over is specified as part of the model. The most important assumption to keep in mind for this case is that nature is Markovian. In general, this means that the probability depends only on local information. In most applications, this locality is with respect to time. In our formulation, it means that the distribution over depends only on information obtained at the current stage. In other settings, Markovian could mean a dependency on a small number of stages, or even a local dependency in terms of spatial relationships, as in a Markov random field [231,377].

To make the Markov assumption more precise, the state and action histories as defined in Section 8.2.1 will be used again here. Let

 (10.1)

and

 (10.2)

These represent all information that is available up to stage . Without the Markov assumption, it could be possible that the probability distribution for nature is conditioned on all of and , to obtain . The Markov assumption declares that for all ,

 (10.3)

which drops all history except the current state and action. Once these two are known, there is no extra information regarding the nature action that could be gained from any portion of the histories.

The effect of nature is defined in the state transition equation, which produces a new state, , once , , and are given:

 (10.4)

From the perspective of the decision maker, is not given. Therefore, it can only infer that a particular set of states will result from applying and :

 such that (10.5)

In (10.5), the notation indicates a set of possible values for , given and . The notation will generally be used to indicate the possible values for that can be derived using the information that appears in the argument.

In the probabilistic case, a probability distribution over can be derived for stage , under the application of from . As part of the problem, is given. Using the state transition equation, ,

 (10.6)

can be derived, in which

 (10.7)

The calculation of simply involves accumulating all of the probability mass that could lead to from the application of various nature actions.

Putting these parts of the model together and adding some of the components from Formulation 2.3, leads to the following formulation:

Formulation 10..1 (Discrete Planning with Nature)
1. A nonempty state space which is a finite or countably infinite set of states.
2. For each state, , a finite, nonempty action space . It is assumed that contains a special termination action, which has the same effect as the one defined in Formulation 2.3.
3. A finite, nonempty nature action space for each and .
4. A state transition function that produces a state, , for every , , and .
5. A set of stages, each denoted by , that begins at and continues indefinitely. Alternatively, there may be a fixed, maximum stage .
6. An initial state . For some problems, this may not be specified, in which case a solution plan must be found from all initial states.
7. A goal set .
8. A stage-additive cost functional . Let denote the history of nature actions up to stage . The cost functional may be applied to any combination of state, action, and nature histories to yield

 (10.8)

in which . If the termination action is applied at some stage , then for all , , , and .

Using Formulation 10.1, either a feasible or optimal planning problem can be defined. To obtain a feasible planning problem, let for all , , and . Furthermore, let

 (10.9)

To obtain an optimal planning problem, in general may assume any nonnegative, finite value if . For problems that involve probabilistic uncertainty, it is sometimes appropriate to assign a high, finite value for if , as opposed to assigning an infinite cost for failing to achieve the goal.

Note that in each stage, the cost term is generally allowed to depend on the nature action . If probabilistic uncertainty is used, then Formulation 10.1 is often referred to as a controlled Markov process or Markov decision process (MDP). If the actions are removed from the formulation, then it is simply referred to as a Markov process. In most statistical literature, the name Markov chain is used instead of Markov process when there are discrete stages (as opposed to continuous-time Markov processes). Thus, the terms controlled Markov chain and Markov decision chain may be preferable.

In some applications, it may be convenient to avoid the explicit characterization of nature. Suppose that . If nondeterministic uncertainty is used, then can be specified for all and as a substitute for the state transition equation; this avoids having to refer to nature. The application of an action from a state directly leads to a specified subset of . If probabilistic uncertainty is used, then can be directly defined as the alternative to the state transition equation. This yields a probability distribution over , if is applied from some , once again avoiding explicit reference to nature. Most of the time we will use a state transition equation that refers to nature; however, it is important to keep these alternatives in mind. They arise in many related books and research articles.

As used throughout Chapter 2, a directed state transition graph is sometimes convenient for expressing the planning problem. The same idea can be applied in the current setting. As in Section 2.1, is the vertex set; however, the edge definition must change to reflect nature. A directed edge exists from state to if there exists some and such that . A weighted graph can be made by associating the cost term with each edge. In the case of a probabilistic model, the probability of the transition occurring may also be associated with each edge.

Note that both the decision maker and nature are needed to determine which vertex will be reached. As the decision maker contemplates applying an action from the state , it sees that there may be several outgoing edges due to nature. If a different action is contemplated, then this set of possible outgoing edges changes. Once nature applies its action, then the particular edge is traversed to arrive at the new state; however, this is not completely controlled by the decision maker.

Example 10..1 (Traversing the Number Line)   Let , , and . The action sets of the decision maker and nature are the same for all states. For the state transition equation, . For each stage, unit cost is received. Hence for all , , and . The initial state is , and the goal set is .

Consider executing a sequence of actions, , under the nondeterministic uncertainty model. This means that we attempt to move left two units in each stage. After the first is applied, the set of possible next states is . Nature may slow down the progress to be only one unit per stage, or it may speed up the progress so that is three units closer per stage. Note that after stages, the goal is guaranteed to be achieved, in spite of any possible actions of nature. Once is reached, should be applied. If the problem is changed so that , it becomes impossible to guarantee that the goal will be reached because nature may cause the goal to be overshot.

Now let and . Under nondeterministic uncertainty, the problem can no longer be solved because nature is now powerful enough to move the state completely in the wrong direction in the worst case. A reasonable probabilistic version of the problem can, however, be defined and solved. Suppose that for each . The transition probabilities can be defined from . For example, if and , then if , and otherwise. With the probabilistic formulation, there is a nonzero probability that the goal, , will be reached, even though in the worst-case reaching the goal is not guaranteed.

Example 10..2 (Moving on a Grid)   A grid-based robot planning model can be made. A simple example is shown in Figure 10.1. The state space is a subset of a integer grid in the plane. A state is represented as , in which ; however, the points in the center region (shown in Figure 10.1) are not included in .

Let be a set of actions, which denote stay,'' right,'' up,'' left,'' and down,'' respectively. Let . For each , let contain and whichever actions are applicable from (some are not applicable along the boundaries).

Let represent the set of all actions in that are applicable after performing the move implied by . For example, if and , then the robot is attempting to move to . From this state, there are three neighboring states, each of which corresponds to an action of nature. Thus, in this case is . The action does not appear because there is no state to the left of . Suppose that the probabilistic model is used, and that every nature action is equally likely.

The state transition function is formed by adding the effect of both and . For example, if , , and , then . If had been , then the two actions would cancel and . Without nature, it would have been assumed that . As always, the state never changes once is applied, regardless of nature's actions.

For the cost functional, let (unless ; in this case, ). For the final stage, let if ; otherwise, let . A reasonable task is to get the robot to terminate in in the minimum expected number of stages. A feedback plan is needed, which will be introduced in Section 10.1.3, and the optimal plan for this problem can be efficiently computed using the methods of Section 10.2.1.

This example can be easily generalized to moving through a complicated labyrinth in two or more dimensions. If the grid resolution is high, then an approximation to motion planning is obtained. Rather than forcing motions in only four directions, it may be preferable to allow any direction. This case is covered in Section 10.6, which addresses planning in continuous state spaces.

Steven M LaValle 2012-04-20


text:
# Recursive sequence question

1. ### happyxiong531

3
I want to prove that
if the sequence $a_n$ satisfy that
$a_{n+1}=a_n\left(1-c\frac{a_n}{1+a_n}\right)$
then $a_n*c*n\rightarrow 1$ for all positive $c$.

Like when $c=1$, then $a_n*n\rightarrow 1$,
but if $c\neq 1$, it's difficult to prove.

2. ### mathman

6,748
What makes you believe it is true? Your question implies $a_n*n ->\frac{1}{c}$. Doesn't look right, especially for large c.

Last edited: Sep 3, 2014
3. ### happyxiong531

3
I think it's correct.
First, I can have $a_n*n\rightarrow 1$ when $c=1$, from
$a_{n+1}=\frac{a_n}{1+a_n}=\frac{a_{n-1}}{1+2a_{n-1}}=\cdots=\frac{a_1}{1+(n+1)a_1}$

Then, let $ca_n=b_n$ if $c\neq 1$, $c$ is some constant. we can have $b_{n+1}=b_n\left(1-\frac{b_n}{1+b_n/c}\right)$.

Actually, it's easy to prove $a_n$ and $b_n$ will go to zero,
so, $\frac{b_n}{1+b_n/c}\sim\frac{b_n}{1+b_n}$, then$b_n*n\rightarrow 1$.

I have made a plot, it's correct no matter $c$ is larger or less than 1.
But I think my proof is not strict.

4. ### happyxiong531

3
Oh, I forget there is a condition that
the sequence should satisfy that$1-c\frac{a_1}{1+a_1}$>0,
so that all the elements in this sequence should be positive, and c cannot be too large.
I have made some plots like $c=0.5, c=2$, the conclusion is correct.
Thanks

6,748


text:
# combinatorics problem : How many different choice are there So that exactly 3 candidate get most vote.

I need to solve this problem about combination :

How many different choice are there in choice representative student group with five candidate and 40 students.(every student should be choose one candidate and one vote is just for one person )so that:

1)exactly 3 candidate get the maximum vote.

My attempt:

$x_1+x_2+x_3+x_4+x_5=40 \to x_1=x_2=x_3 \to \begin{cases} 3x_1+x_2+x_3=40 \\(x_1 \gt x_4 )and (x_1 \gt x_5) \end{cases}$

how to continue?

-
What does "exactly 3 candidate get most vote" mean? – wj32 Dec 15 '12 at 10:32
@wj32 "exactly 3 candidate earn maximum vote" – Minsin Minsini Dec 15 '12 at 10:34
is it an open vote-- is it known or does it matter who voted for who ? – ashley Dec 15 '12 at 10:40
What exactly is the protocol? Can one vote fr ore than one person? You have to add some details. – Michael Greinecker Dec 15 '12 at 10:41
@MichaelGreinecker "every student should be choose one candidate" and "one vote just for one person " – Minsin Minsini Dec 15 '12 at 10:46

There are $\binom53$ ways to choose which $3$ candidates come equal first. Since $5\cdot8=40$, their score must be at least $9$, and it can obviously be at most $13$. Now make a little table:

$$\begin{array}{c|l} \text{Top vote}&\text{Remaining votes}\\ \hline 9&8,5;\quad7,6\\ 10&9,1;\quad8,2;\quad7,3;\quad6,4;\quad5,5\\ 11&7,0;\quad6,1;\quad5,2;\quad4,3\\ 12&4,0;\quad3,1;\quad2,2\\ 13&1,0 \end{array}$$

If the top vote is $9$, the remaining votes must have been split either $8,5$ or $7,6$. That’s $2$ possibilities, and each can happen in $2$ ways, depending on which of the remaining two voters gets the larger number of votes. Thus, there are $\binom53\cdot2\cdot2=40$ ways to get the vote totals $9,9,9,8,5$ and $9,9,9,7,6$, corresponding to the $40$ distinguishable permutations of those five numbers.

If the top vote is $11$, there are $4$ different ways to split the remaining $7$ votes into two parts, and each of those can be assigned to the other two candidates in either order, so there are $\binom53\cdot4\cdot2=80$ ways to get three vote totals of $11$ and two more adding up to $7$.

That’s two of the five cases; the other three can be done similarly, so I’ll leave them for you to try.

-
Somehow you overlooked $8,5$ for case "9"? – Hagen von Eitzen Dec 15 '12 at 11:16
@Hagen: Thanks very much; fixed. (By the way, the English idiom is multiply by, not multiply with.) – Brian M. Scott Dec 15 '12 at 11:19
Thanks for nice way, Does answer is ${5 \choose 3}4+{ 5\choose 5}9+{5 \choose 3}8+{5 \choose 3}5+{5 \choose 3}2$ ? – Minsin Minsini Dec 15 '12 at 12:01
@Minsin: Yes, except that you have a typo in the second term: it should be $\binom539$. – Brian M. Scott Dec 15 '12 at 12:04

If invalid votes or abstentions don't occur, there are $5\choose 3$ ways to choose the winners $A,B,C$. If they obtain $k$ votes each, then $k\ge 9$ as otherwise one of the others ($D,E$) would have at least $8$ votes as well. And of course $k\le 13$. There are $40-3k$ votes to be split among the other two such that none of them gets $k$ or more votes.

• $k=9$: $13$ votes left, $D$ can obtain $5,\ldots,8$ votes, $E$ the rest
• $k=10$: $10$ votes left, $D$ can obtain $1,\ldots,9$ votes, $E$ the rest
• $11\le k\le 13$: $D$ can obtain $0,\ldots, 40-3k$ votes, $E$ the rest.

Sum up the possibilities and dont forget to multiply with $5\choose 3$.

-
Thanks for your way. – Minsin Minsini Dec 15 '12 at 12:03


text:
# Determining a Missing Data Value in Weighted Average

When dealing with weighted averages, how do you solve for X?

$$\frac{( 84X) + (40*16)}{100} = 10.5 .$$

• This is just a linear equation in $X$. You remember your algebra and perform the same operations on each side of the equation toward the goal of isolating $X = ...$. I edited your question to format the mathematics - that might help you. If you're really stuck and need to do this just once, try guess-and-check. When you're done, answer your own question (that's allowed on this site). – Ethan Bolker Dec 26 '16 at 19:34
• @EthanBolker Sadly I've forgotten far too much of my algebra to figure it out that way, and Google hasn't been much help in that regard ;-) – Chaya Cooper Dec 26 '16 at 20:10

1. Remove the fraction by multiplying both sides by $100$.
2. Isolate the $X$ term by subtracting the $(40*16)$ from both sides.
3. Remove the coefficient of $X$ by dividing both sides by $84$.
• @ChayaCooper And as written, that should be the correct answer. I'm not sure how one would be getting $5$ as an answer. – Simply Beautiful Art Jan 2 '17 at 19:26