text:
# Probability of success in Fudge/ Fate dice rolls considering failures

I'm creating a game system based on Fudge/Fate dice rolls and I need to validate if a have a fair distribution. Since I don't have much contact with this for a long time (since high school), I figure that someone here could help me with this.

For those that don't know, a Fudge/Fate dice is a common 6 sided die (d6) where you have 2 faces for each value (-1, 0, +1): (-1, -1, 0, 0, +1, +1). In a Fudge/Fate die, -1 represents a failure and +1 represents a success and for each roll, a failure cancels a success (and 0 means neither).

Then, consider that we always sum the results.
For example, rolling 4 dices (dices are always rolled simultaneously):

• 4dF {0, 0, +1, -1} = 0
• 4dF {0, 0, +1, +1} = +2
• 4dF {0, 0, -1, -1} = -2

I'm trying to discover the probability of getting, for example, at least +20 in 100 rolls. I want to make a spreadsheet where I have the Y-axis as the number of rolls and X-axis as the desired number.

My goal with that is to establish the player range of success based on the number of rolls he has available.

• For the "getting $20$ in $100$ rolls" question, does that mean at least $20$, or exactly $20$? – quasi Jun 12 '18 at 20:23
• @quasi Yes, thanks for noticing that, I was reviewing the post and hit save by accident :) It means 20 success or more (+20, +21, +30...). – Thiago M Jun 12 '18 at 20:23
• Also, if the player's goal is, say $20$, and $100$ rolls are available, can the player stop on $20$ if the goal is achieved in less than $100$ rolls? – quasi Jun 12 '18 at 20:25
• @quasi He will roll all dices at the same time. So the player will not have control over this to stop when he achieves the "goal". Meaning that in a 10dF I want 5 success or higher to be considered a "true success". – Thiago M Jun 12 '18 at 20:26
• Got it -- simultaneous rolls. The notation 10dF" means $10$ dice are rolled, but what does "F" mean? – quasi Jun 12 '18 at 20:28

For nonnegative integers $n$, and integers $x$, let $p(n,x)$ be the probability of getting a score of at least $x$ in $n$ rolls.

Then we have the recursion $$p(n,x)= \begin{cases} 0&\;\;\;\text{if}\;\,n < x\\[4pt] 1&\;\;\;\text{if}\;\,-n \ge x\\[4pt] \frac{1}{3}p(n-1,x-1)+ +\frac{1}{3}p(n-1,x)+ +\frac{1}{3}p(n-1,x+1) &\;\;\;\text{otherwise}\\ \end{cases}$$ Implementing the recursion in Maple, we get $$p(100,20)=\frac{a}{b}\approx .008336093451$$ where $a,b$ are given by \begin{align*} a&=159119821311220187192678211640711891517682398\\[4pt] b&=19088056323407827075424486287615602692670648963 \end{align*}

Note:$\;$The above recursion yields an exact answer as a fraction, but as you can see, the numerators and denominators can be huge, so this method would require a programming language implementation, e.g., Python, or a CAS, such as Maple, rather than, say, Excel.

Here's an implementation in Maple . . .

Here is a table showing the approximate values of $p(100,x)$, for $1\le x \le 100$ . . .

• Wow, this surely seems a very complete answer. But since my knowledge is very limited I have to admit I understood very little of it. Could you elaborate a bit in the methodology you are using to solve this? I barely know the notation, but I'm more concerned of getting the grasp of the approach. I have to make an observation: In my scenario a player will rarely have to roll more than 100 dices. – Thiago M Jun 13 '18 at 0:05
• If $n < x$, you can't win, since even if all $n$ rolls come up with value $1$, your score (starting at 0) would be $n$, which is less than the needed value of $x$. – quasi Jun 13 '18 at 0:14
• If $-n \ge x$, you can't lose, since even if all $n$ rolls come up with value $-1$, your score (starting at 0) would be $-n$, which is at least $x$ (so you win). – quasi Jun 13 '18 at 0:16
• Finally, in all other cases, after rolling once, there are $n-1$ rolls remaining, and 3 possible results for the score after the roll, each with probability $\frac{1}{3}$. – quasi Jun 13 '18 at 0:19
• So the basic idea is that the probability of winning is either immediately $0$ or $1$, in the cases where $n < x$, or $-n \ge x$, or else the probability is the sum of the weighted probabilities of the $3$ subcases, based on the results of the next roll (where in this case, the weights are all $\frac{1}{3}$). – quasi Jun 13 '18 at 0:23

You are really rolling a d3 with results of $-1,0,+1$. For reasonable numbers of dice the normal approximation is a good one. The mean of a single roll is $0$, so the mean of a number of rolls is as well. The variance of a single roll is $\frac 23$ so the variance of $n$ rolls will be $\frac {2n}3$. If we take those as the parameters of a normal distribution, the variance of $100$ rolls is about $66.67$ and the standard deviation is about $8.165$. Getting $+20$ on $100$ rolls is then about $+2.45 \sigma$. From a cumulative z-score table the chance of doing this well or better is about $0.00714$ or a chance in $140$. If you want to generate this in Excel the Wikipedia article gives it in terms of the error function, which Excel supplies.

• Yes, the probability is the same as a d3, I was just giving the context as the dice has actually 6 sides. I'm sorry I can't contribute too much to the discussion since my knowledge is very limited. Just wanna ask: Are you considering that when summing the results, a +1 roll will be canceled by a -1 too? For example, let's say a player has 5 available rolls, and for him, to succeed he needs to roll at least +2, that means: {0,0,0,+1,+1} or {0, +1,-1,+1, +1} and so on. – Thiago M Jun 12 '18 at 20:51
• Yes. Considering the variance of the sum takes care of all combinations of $\pm 1$ with the same sum – Ross Millikan Jun 12 '18 at 21:55
• It is the central limit theorem which says the sum of independent random variables approaches the normal distribution when there are lots of them. Once you know how many standard deviations you are away from the mean you can use the z-score in this approximation. I am surprised the approximation is so bad comparing to quasi's exact result. – Ross Millikan Jun 12 '18 at 23:53
• I like that your aproach seems very objective. Is there a formula for that? I'd like a little more direction on the solution since I'm very lay in the subject. I didn't understand, is the cumulative z-score a technique for those scenarios? – Thiago M Jun 12 '18 at 23:53

This is really a comment on quasi's answer, but it won't fit in a comment.

Unless you are considering very large numbers of dice, you can do the calculations in floating point, without appreciable loss of accuracy. Here's a python implementation:

cache = dict()
def p(n,x):
if n < x: return 0
if -n >= x: return 1
if (n,x) in cache:
return cache[n,x]
cache[n,x]= (p(n-1,x-1)+p(n-1, x)+p(n-1,x+1))/3
return cache[n,x]
print(p(100,20))

0.008336093451070253

The function evaluation is instantaneous, and as you see, the answer agrees with all $12$ decimal places given in quasi's answer.


text:
# how to calculate the number of binary  operations on any set A , say of 4 elements?

Let S be a finite set having n elements.

Then S × S has n2 elements.

Since a binary operation on S is a function from S × S to S.

∴ Total number of binary operations on S is equal to the number of functions from S × S to S.

Also, cardinality of domain (i.e. S × S) is n2 and cardinality of co-domain (i.e. S) is n.

So, total number of functions from S × S to S are

∴ Total number of binary operations on set S having n elements is .

Now, you are saying that on any set A (i.e. S is given to be A here) having 4 elements (i.e. value of n is 4)

Using the formula derived above, The number of binary operations on

Set A =  =

• 42
What are you looking for?

format: plain


text:
Search by Topic

Resources tagged with Visualising similar to Griddy Region:

Filter by: Content type:
Stage:
Challenge level:

There are 188 results

Broad Topics > Using, Applying and Reasoning about Mathematics > Visualising

Stage: 4 Challenge Level:

In this problem we are faced with an apparently easy area problem, but it has gone horribly wrong! What happened?

Coke Machine

Stage: 4 Challenge Level:

The coke machine in college takes 50 pence pieces. It also takes a certain foreign coin of traditional design. Coins inserted into the machine slide down a chute into the machine and a drink is duly. . . .

All Tied Up

Stage: 4 Challenge Level:

A ribbon runs around a box so that it makes a complete loop with two parallel pieces of ribbon on the top. How long will the ribbon be?

Chords

Stage: 4 Challenge Level:

Two intersecting circles have a common chord AB. The point C moves on the circumference of the circle C1. The straight lines CA and CB meet the circle C2 at E and F respectively. As the point C. . . .

An Unusual Shape

Stage: 3 Challenge Level:

Can you maximise the area available to a grazing goat?

Rolling Around

Stage: 3 Challenge Level:

A circle rolls around the outside edge of a square so that its circumference always touches the edge of the square. Can you describe the locus of the centre of the circle?

On the Edge

Stage: 3 Challenge Level:

Here are four tiles. They can be arranged in a 2 by 2 square so that this large square has a green edge. If the tiles are moved around, we can make a 2 by 2 square with a blue edge... Now try to. . . .

Trice

Stage: 3 Challenge Level:

ABCDEFGH is a 3 by 3 by 3 cube. Point P is 1/3 along AB (that is AP : PB = 1 : 2), point Q is 1/3 along GH and point R is 1/3 along ED. What is the area of the triangle PQR?

Just Rolling Round

Stage: 4 Challenge Level:

P is a point on the circumference of a circle radius r which rolls, without slipping, inside a circle of radius 2r. What is the locus of P?

Zooming in on the Squares

Stage: 2 and 3

Start with a large square, join the midpoints of its sides, you'll see four right angled triangles. Remove these triangles, a second square is left. Repeat the operation. What happens?

Efficient Packing

Stage: 4 Challenge Level:

How efficiently can you pack together disks?

Isosceles Triangles

Stage: 3 Challenge Level:

Draw some isosceles triangles with an area of $9$cm$^2$ and a vertex at (20,20). If all the vertices must have whole number coordinates, how many is it possible to draw?

Dissect

Stage: 3 Challenge Level:

It is possible to dissect any square into smaller squares. What is the minimum number of squares a 13 by 13 square can be dissected into?

Fence It

Stage: 3 Challenge Level:

If you have only 40 metres of fencing available, what is the maximum area of land you can fence off?

Intersecting Circles

Stage: 3 Challenge Level:

Three circles have a maximum of six intersections with each other. What is the maximum number of intersections that a hundred circles could have?

Tied Up

Stage: 3 Challenge Level:

In a right angled triangular field, three animals are tethered to posts at the midpoint of each side. Each rope is just long enough to allow the animal to reach two adjacent vertices. Only one animal. . . .

Take Ten

Stage: 3 Challenge Level:

Is it possible to remove ten unit cubes from a 3 by 3 by 3 cube made from 27 unit cubes so that the surface area of the remaining solid is the same as the surface area of the original 3 by 3 by 3. . . .

Muggles Magic

Stage: 3 Challenge Level:

You can move the 4 pieces of the jigsaw and fit them into both outlines. Explain what has happened to the missing one unit of area.

Contact

Stage: 4 Challenge Level:

A circular plate rolls in contact with the sides of a rectangular tray. How much of its circumference comes into contact with the sides of the tray when it rolls around one circuit?

The Cantor Set

Stage: 3 Challenge Level:

Take a line segment of length 1. Remove the middle third. Remove the middle thirds of what you have left. Repeat infinitely many times, and you have the Cantor Set. Can you picture it?

Framed

Stage: 3 Challenge Level:

Seven small rectangular pictures have one inch wide frames. The frames are removed and the pictures are fitted together like a jigsaw to make a rectangle of length 12 inches. Find the dimensions of. . . .

Tetra Square

Stage: 3 Challenge Level:

ABCD is a regular tetrahedron and the points P, Q, R and S are the midpoints of the edges AB, BD, CD and CA. Prove that PQRS is a square.

Rati-o

Stage: 3 Challenge Level:

Points P, Q, R and S each divide the sides AB, BC, CD and DA respectively in the ratio of 2 : 1. Join the points. What is the area of the parallelogram PQRS in relation to the original rectangle?

Is There a Theorem?

Stage: 3 Challenge Level:

Draw a square. A second square of the same size slides around the first always maintaining contact and keeping the same orientation. How far does the dot travel?

Changing Places

Stage: 4 Challenge Level:

Place a red counter in the top left corner of a 4x4 array, which is covered by 14 other smaller counters, leaving a gap in the bottom right hand corner (HOME). What is the smallest number of moves. . . .

Sliced

Stage: 4 Challenge Level:

An irregular tetrahedron has two opposite sides the same length a and the line joining their midpoints is perpendicular to these two edges and is of length b. What is the volume of the tetrahedron?

Inside Out

Stage: 4 Challenge Level:

There are 27 small cubes in a 3 x 3 x 3 cube, 54 faces being visible at any one time. Is it possible to reorganise these cubes so that by dipping the large cube into a pot of paint three times you. . . .

Dice, Routes and Pathways

Stage: 1, 2 and 3

This article for teachers discusses examples of problems in which there is no obvious method but in which children can be encouraged to think deeply about the context and extend their ability to. . . .

Sliding Puzzle

Stage: 1, 2, 3 and 4 Challenge Level:

The aim of the game is to slide the green square from the top right hand corner to the bottom left hand corner in the least number of moves.

Coordinate Patterns

Stage: 3 Challenge Level:

Charlie and Alison have been drawing patterns on coordinate grids. Can you picture where the patterns lead?

Seven Squares - Group-worthy Task

Stage: 3 Challenge Level:

Choose a couple of the sequences. Try to picture how to make the next, and the next, and the next... Can you describe your reasoning?

Bands and Bridges: Bringing Topology Back

Stage: 2 and 3

Lyndon Baker describes how the Mobius strip and Euler's law can introduce pupils to the idea of topology.

Square It

Stage: 1, 2, 3 and 4 Challenge Level:

Players take it in turns to choose a dot on the grid. The winner is the first to have four dots that can be joined to form a square.

Khun Phaen Escapes to Freedom

Stage: 3 Challenge Level:

Slide the pieces to move Khun Phaen past all the guards into the position on the right from which he can escape to freedom.

Cubic Net

Stage: 4 and 5 Challenge Level:

This is an interactive net of a Rubik's cube. Twists of the 3D cube become mixes of the squares on the 2D net. Have a play and see how many scrambles you can undo!

Circuit Training

Stage: 4 Challenge Level:

Mike and Monisha meet at the race track, which is 400m round. Just to make a point, Mike runs anticlockwise whilst Monisha runs clockwise. Where will they meet on their way around and will they ever. . . .

Frogs

Stage: 2 and 3 Challenge Level:

How many moves does it take to swap over some red and blue frogs? Do you have a method?

Picturing Triangle Numbers

Stage: 3 Challenge Level:

Triangle numbers can be represented by a triangular array of squares. What do you notice about the sum of identical triangle numbers?

Picturing Square Numbers

Stage: 3 Challenge Level:

Square numbers can be represented as the sum of consecutive odd numbers. What is the sum of 1 + 3 + ..... + 149 + 151 + 153?

Painted Cube

Stage: 3 Challenge Level:

Imagine a large cube made from small red cubes being dropped into a pot of yellow paint. How many of the small cubes will have yellow paint on their faces?

Rolling Triangle

Stage: 3 Challenge Level:

The triangle ABC is equilateral. The arc AB has centre C, the arc BC has centre A and the arc CA has centre B. Explain how and why this shape can roll along between two parallel tracks.

Icosagram

Stage: 3 Challenge Level:

Draw a pentagon with all the diagonals. This is called a pentagram. How many diagonals are there? How many diagonals are there in a hexagram, heptagram, ... Does any pattern occur when looking at. . . .

Stage: 3 Challenge Level:

Four rods, two of length a and two of length b, are linked to form a kite. The linkage is moveable so that the angles change. What is the maximum area of the kite?

One and Three

Stage: 4 Challenge Level:

Two motorboats travelling up and down a lake at constant speeds leave opposite ends A and B at the same instant, passing each other, for the first time 600 metres from A, and on their return, 400. . . .

Weighty Problem

Stage: 3 Challenge Level:

The diagram shows a very heavy kitchen cabinet. It cannot be lifted but it can be pivoted around a corner. The task is to move it, without sliding, in a series of turns about the corners so that it. . . .

Tetrahedra Tester

Stage: 3 Challenge Level:

An irregular tetrahedron is composed of four different triangles. Can such a tetrahedron be constructed where the side lengths are 4, 5, 6, 7, 8 and 9 units of length?

Three Frogs

Stage: 4 Challenge Level:

Three frogs hopped onto the table. A red frog on the left a green in the middle and a blue frog on the right. Then frogs started jumping randomly over any adjacent frog. Is it possible for them to. . . .

Floating in Space

Stage: 4 Challenge Level:

Two angles ABC and PQR are floating in a box so that AB//PQ and BC//QR. Prove that the two angles are equal.

The Spider and the Fly

Stage: 4 Challenge Level:

A spider is sitting in the middle of one of the smallest walls in a room and a fly is resting beside the window. What is the shortest distance the spider would have to crawl to catch the fly?

Jam

Stage: 4 Challenge Level:

A game for 2 players


text:
# Matt's arXiv selection: week ending 15th May 2007.

From: Matthew Davis <mdavis_at_physics.uq.edu.au>
Date: Fri, 1 Jun 2007 12:16:57 +1000 (EST)

The following message was sent to the matts_arxiv list by Matthew Davis <mdavis_at_physics.uq.edu.au>

For this week there were 22 new abstracts and only 5 replacements:

------------------------------------------------------------------------------
\\
arXiv:0705.1647
Date: Fri, 11 May 2007 13:36:29 GMT (134kb)

Title: FPU phenomenon for generic initial data
Authors: A. Carati, L. Galgani, A. Giorgilli, S. Paleari
Categories: cond-mat.stat-mech
\\
The well known FPU phenomenon (lack of attainment of equipartition of the
mode--energies at low energies, for some exceptional initial data) suggests
that the FPU model does not have the mixing property at low energies. We give
numerical indications that this is actually the case. This we show by computing
orbits for sets of initial data of full measure, sampled out from the
microcanonical ensemble by standard Montecarlo techniques. Mixing is tested by
looking at the decay of the autocorrelations of the mode--energies, and it is
found that the high--frequency modes have autocorrelations that tend instead to
positive values. Indications are given that such a nonmixing property survives
in the thermodynamic limit. It is left as an open problem whether mixing
obtains within time--scales much longer than the presently available ones.
\\ ( http://arxiv.org/abs/0705.1647 , 134kb)
------------------------------------------------------------------------------
\\
arXiv:0705.1661
Date: Fri, 11 May 2007 14:25:16 GMT (76kb)

Title: Functional renormalization for quantum phase transitions
Authors: C.Wetterich
Categories: cond-mat.supr-con cond-mat.str-el
\\
Functional renormalization yields a simple unified description of bosons at
zero temperature, in arbitrary space dimension $d$ and for $M$ complex fields.
We concentrate on nonrelativistic bosons and an action with a linear time
derivative. The ordered phase can be associated with a nonzero density of
(quasi) particles $n$. As long as the momentum $k_{ph}$ characteristic for an
experiment remains larger than $n^{1/d}$ the quantum phase transition is
simple, with the same mean field'' critical exponents for all $d$ and $M$. On
the other hand, the Goldstone regime'' $k_{ph}\ll n^{1/d}$ reveals a rather
rich spectrum of features, depending on $d$ and $M$. In this regime one
observes for $d\lesssim 2.5$ a crossover to a relativistic action with second
time derivatives. This admits order for $d>1$, whereas $d=1$ shows a behavior
similar to the low temperature phase of the classical $O(2M)$-models.
\\ ( http://arxiv.org/abs/0705.1661 , 76kb)
------------------------------------------------------------------------------
\\
arXiv:0705.1668
Date: Fri, 11 May 2007 15:13:54 GMT (28kb)

Title: Dipolar gases in quasi one-dimensional geometries
Authors: S. Sinha and L. Santos
Categories: cond-mat.other
Comments: 4 pages, 3 eps figures
\\
We analyze the physics of cold dipolar gases in quasi one-dimensional
geometries, showing that the confinement-induced scattering resonances produced
by the transversal trapping are crucially affected by the dipole-dipole
interaction. As a consequence, the dipolar interaction may drastically change
the properties of quasi-1D dipolar condensates, even for situations in which
the dipolar interaction would be completely overwhelmed by the short-range
interactions in a 3D environment.
\\ ( http://arxiv.org/abs/0705.1668 , 28kb)
------------------------------------------------------------------------------
\\
arXiv:0705.1616
Date: Fri, 11 May 2007 10:14:19 GMT (498kb)

Title: Non-Markovian dynamics in atom-laser outcoupling from a double-well
Bose-Einstein condensate
Authors: C. Lazarou, G. M. Nikolopoulos, P. Lambropoulos
Categories: quant-ph
Comments: 21 pages, 9 figure, to appear in J. Phys. B
\\
We investigate the dynamics of a continuous atom laser based on the merging
of independently formed atomic condensates. In a first attempt to understand
the dynamics of the system, we consider two independent elongated Bose-Einstein
condensates which approach each other and focus on intermediate inter-trap
distances so that a two-mode model is well justified. In the framework of a
mean-field theory, we discuss the quasi steady-state population of the traps as
well as the energy distribution of the outcoupled atoms.
\\ ( http://arxiv.org/abs/0705.1616 , 498kb)
------------------------------------------------------------------------------
\\
arXiv:0705.1604
Date: Fri, 11 May 2007 08:53:10 GMT (12kb)

Title: Accurate long-range coefficients for two excited like isotope He atoms:
He($2 ^1P$)--He($2 ^1P$), He($2 ^1P$)--He($2 ^3P$), and He($2 ^3P$)--He($2 ^3P$)
Authors: J.-Y. Zhang, Z.-C. Yan, D. Vrinceanu, J. F. Babb, and H. R. Sadeghpour
Categories: physics.atom-ph physics.comp-ph
\\
A general formalism is used to express the long-range potential energies in
inverse powers of the separation distance between two like atomic or molecular
systems with $P$ symmetries. The long-range molecular interaction coefficients
are calculated for the molecular symmetries $\Delta$, $\Pi$, and $\Sigma$,
arising from the following interactions: He($2 ^1P$)--He($2 ^1P$), He($2 ^1P$)--He($2 ^3P$), and He($2 ^3P$)--He($2 ^3P$). The electric
quadrupole-quadrupole term, $C_{5}$, the van der Waals (dispersion) term
$C_{6}$, and higher-order terms, $C_{8}$, and $C_{10}$, are calculated
\textit{ab initio} using accurate variational wave functions in Hylleraas
coordinates with finite nuclear mass effects. A comparison is made with
previously published results where available.
\\ ( http://arxiv.org/abs/0705.1604 , 12kb)
------------------------------------------------------------------------------
\\
arXiv:0705.1671
Date: Fri, 11 May 2007 15:28:53 GMT (600kb)

Title: All optical sensor for automated magnetometry based on Coherent
Population Trapping
Authors: J.Belfi, G.Bevilacqua, V.Biancalana, Y.Dancheva, L.Moi
Categories: physics.atom-ph physics.ins-det
Comments: 8 pages, 10 figures, appearing in JOSA B (7?) 2007
\\
An automated magnetometer suitable for long lasting measurement under stable
and controllable experimental conditions has been implemented. The device is
based on Coherent Population Trapping (CPT) produced by a multi-frequency
excitation. CPT resonance is observed when a frequency comb, generated by diode
laser current modulation, excites Cs atoms confined in a
$\pi/4\times(2.5)^2\times1 \textrm{cm}^3$, 2 Torr $N_2$ buffered cell. A fully
optical sensor is connected through an optical fiber to the laser head allowing
for truly remote sensing and minimization of the field perturbation. A detailed
analysis of the CPT resonance parameters as a function of the optical detuning
has been made in order to get high sensitivity measurements. The magnetic field
monitoring performances and the best sensitivity obtained in a balanced
differential configuration of the sensor are presented.
\\ ( http://arxiv.org/abs/0705.1671 , 600kb)
------------------------------------------------------------------------------
\\
arXiv:0705.1802
Date: Sat, 12 May 2007 21:11:30 GMT (313kb)

Title: On-top fragmentation stabilizes atom-rich attractive Bose-Einstein
condensates
Authors: Lorenz S. Cederbaum, Alexej I. Streltsov, and Ofir E. Alon
Categories: cond-mat.other
\\
It is well known that attractive condensates do not posses a stable ground
state in three dimensions. The widely used Gross-Pitaevskii theory predicts the
existence of metastable states up to some critical number
$N_{\mathrm{cr}}^{\mathrm{GP}}$ of atoms. It is demonstrated here that
fragmented metastable states exist for atom numbers well above
$N_{\mathrm{cr}}^{\mathrm{GP}}$. The fragments are strongly overlapping in
space. The results are obtained and analyzed analytically as well as
numerically. The implications are discussed.
\\ ( http://arxiv.org/abs/0705.1802 , 313kb)
------------------------------------------------------------------------------
\\
arXiv:0705.1888
Date: Mon, 14 May 2007 08:25:58 GMT (527kb)

Title: Novel Quantum Phases of Ultracold Bosonic Atoms in Optical Superlattices
Authors: Jing-Min Hou
Categories: cond-mat.other
\\
We study quantum phases of ultracold bosonic atoms in a two-dimensional
optical superlattice. The extended Bose-Hubbard model derived from the system
of ultracold bosonic atoms in an optical superlattice is solved numerically
with Gutzwiller approach. We find that supersolid(SS), density-wave(DW) phases
appear in some regimes of parameters, addition to Mott-insulator (MI) phase,
while the superfluid phase, which conventionally appears in optical
lattice-cold atom systems, is absent in this system. The experimental detection
of the first order correlations and the second order correlations of different
quantum phases with time-of-flight and noise-correlation techniques is
proposed.
\\ ( http://arxiv.org/abs/0705.1888 , 527kb)
------------------------------------------------------------------------------
\\
arXiv:0705.2015
Date: Mon, 14 May 2007 20:00:04 GMT (42kb)

Title: Dynamics of excitations in a one-dimensional Bose liquid
Authors: M. Khodas, M. Pustilnik, A. Kamenev, L.I. Glazman
Categories: cond-mat.stat-mech cond-mat.mes-hall
\\
We show that the dynamic structure factor of a one-dimensional Bose liquid
has a power-law singularity defining the main mode of collective excitations.
Using the Lieb-Liniger model, we evaluate the corresponding exponent as a
function of the wave vector and the interaction strength.
\\ ( http://arxiv.org/abs/0705.2015 , 42kb)
------------------------------------------------------------------------------
\\
arXiv:0705.2027
Date: Mon, 14 May 2007 20:54:13 GMT (199kb)

Title: Measuring Electric Fields From Surface Contaminants with Neutral Atoms
Authors: J.M. Obrecht, R.J. Wild, E.A. Cornell
Categories: cond-mat.soft
Comments: Submitted to Physical Review A
\\
In this paper we demonstrate a technique of utilizing magnetically trapped
neutral $^{87}$Rb atoms to measure the magnitude and direction of electric
fields emanating from surface contaminants. We apply an alternating external
electric field that adds to (or subtracts from) the surface field in such a way
as to resonantly drive the trapped atoms into a mechanical dipole oscillation.
The growth rate of the oscillation's amplitude provides information about the
magnitude and sign of the surface field gradient. Using this measurement
technique, we are able to vectorially reconstruct the electric field produced
by surface contaminants. In addition, we can accurately measure the electric
fields generated from adsorbed atoms purposely placed onto the surface and
account for their systematic effects, which can plague a precision
surface-force measurement. We show that baking the substrate can reduce the
electric fields emanating from adsorbate, and that the mechanism for reduction
is likely surface diffusion, not desorption.
\\ ( http://arxiv.org/abs/0705.2027 , 199kb)
------------------------------------------------------------------------------
\\
arXiv:0705.2069
Date: Tue, 15 May 2007 02:21:36 GMT (99kb)

Title: Spectroscopic signatures of nonequilibrium pairing in atomic Fermi gases
Authors: M. Dzero, E. A. Yuzbashyan, B. L. Altshuler and P. Coleman
Categories: cond-mat.supr-con cond-mat.str-el
\\
We determine the radio-frequency (RF) spectra for non-stationary states of a
fermionic condensate produced by a rapid switch of the scattering length. The
RF spectrum of the nonequilibrium state with constant BCS order parameter has
two features in contrast to equilibrium where there is a single peak. The
additional feature reflects the presence of excited pairs in the steady state.
In the state characterized by periodically oscillating order parameter
RF-absorption spectrum contains two sequences of peaks spaced by the frequency
of oscillations. Satellite peaks appear due to a process where an RF photon in
addition to breaking a pair emits/absorbs oscillation quanta.
\\ ( http://arxiv.org/abs/0705.2069 , 99kb)
------------------------------------------------------------------------------
\\
arXiv:0705.2077
Date: Tue, 15 May 2007 03:36:46 GMT (941kb)

Title: Analogue model of a FRW universe in Bose-Einstein condensates:
Application of the classical field method
Authors: Piyush Jain, Silke Weinfurtner, Matt Visser, C. W. Gardiner
Categories: cond-mat.other
\\
Analogue models of gravity have been motivated by the possibility of
investigating phenomena not readily accessible in their cosmological
counterparts. In this paper, we investigate the analogue of cosmological
particle creation in a Friedmann-Robertson-Walker universe by numerically
simulating a Bose-Einstein condensate with a time-dependent scattering length.
In particular, we focus on a two-dimensional homogeneous condensate using the
classical field method via the truncated Wigner approximation. We show that for
various forms of the scaling function the particle production is consistent
with the underlying theory in the long wavelength limit. In this context, we
further discuss the implications of modified dispersion relations that arise
from the microscopic theory of a weakly interacting Bose gas.
\\ ( http://arxiv.org/abs/0705.2077 , 941kb)
------------------------------------------------------------------------------
\\
arXiv:0705.2080
Date: Tue, 15 May 2007 04:42:13 GMT (198kb)

Title: Phases and Transitions in the Spin-1 Bose-Hubbard Model: Systematics of
a Mean-field Theory
Authors: Ramesh V. Pai, K. Sheshadri and Rahul Pandit
Categories: cond-mat.stat-mech cond-mat.other
\\
We generalize the mean-field theory for the spinless Bose-Hubbard model to
account for the different types of superfluid phases that can arise in the
spin-1 case. In particular, our mean-field theory can distinguish polar and
ferromagnetic superfluids, Mott insulators which arise at integer fillings at
zero temperature, and normal Bose liquids into which the Mott insulators evolve
at finite temperatures. We find, in contrast to the spinless case, that several
of the superfluid-Mott insulator transitions are first-order at finite
temperatures. Our systematic study yields rich phase diagrams that include,
first-order and second-order transitions, and a variety of tricritical points.
We discuss the possibility of realizing such phase diagrams in experimental
systems.
\\ ( http://arxiv.org/abs/0705.2080 , 198kb)
------------------------------------------------------------------------------
\\
arXiv:0705.2023
Date: Mon, 14 May 2007 20:22:29 GMT (184kb)

Title: Recovery of Hidden Interference in Mott Insulators
Authors: L. Tian, F. Fujiwara, T. Byrnes, and Y. Yamamoto
Categories: quant-ph
\\
Particle statistics plays a crucial role in a strongly interacting quantum
many-body system. Here, we study the Hubbard model for distinguishable
particles at unit filling. Starting from the superfluid-like state in the
strong tunneling limit and gradually reducing the tunneling so that the on-site
repulsive interaction dominates, the state ends up in a symmetric superposition
of Mott insulator states. This result can be experimentally confirmed by the
recovery of interference patterns in the density correlation functions. We also
show that this state is a maximally entangled state, in contrast to the
standard picture.
\\ ( http://arxiv.org/abs/0705.2023 , 184kb)
------------------------------------------------------------------------------
\\
arXiv:0705.2319
Date: Wed, 16 May 2007 10:03:45 GMT (195kb)

Title: Coherence Properties of a Bose-Einstein Condensate in an Optical
Superlattice
Authors: Aranya B Bhattacherjee
Categories: cond-mat.stat-mech
\\
We study the effect of a one dimensional optical superlattice on the
superfluid fraction, number squeezing, dynamic structure factor and the
quasi-momentum distribution of the Mott-insulator. We show that due to the
secondary lattice,there is a decrease in the superfluid fraction and the number
fluctuation. The dynamic structure factor which can be measured by Bragg
spectroscopy is also suppressed due to the addition of the secondary lattice.
The visibility of the interference pattern (the quasi-momentum distribution)of
the Mott-insulator is found to decrease due to the presence of the secondary
lattice. Our results have important implications in atom interferometry and
quantum computation in optical lattices.
\\ ( http://arxiv.org/abs/0705.2319 , 195kb)
------------------------------------------------------------------------------
\\
arXiv:0705.2320
Date: Wed, 16 May 2007 11:13:51 GMT (7kb)

Title: The Localization Length of Stationary States in the Nonlinear
Schreodinger Equation
Authors: Alexander Iomin and Shmuel Fishman
Categories: cond-mat.dis-nn
\\
For the nonlinear Schreodinger equation (NLSE), in presence of disorder,
exponentially localized stationary states are found. In the present Letter it
is demonstrated analytically that the localization length is typically
independent of the strength of the nonlinearity and is identical to the one
found for the corresponding linear equation. The analysis makes use of the
correspondence between the stationary NLSE and the Langevin equation as well as
of the resulting Fokker-Planck equation. The calculations are performed for the
white noise'' random potential and an exact expression for the exponential
growth of the eigenstates is obtained analytically. It is argued that the main
conclusions are robust.
\\ ( http://arxiv.org/abs/0705.2320 , 7kb)
------------------------------------------------------------------------------
\\
arXiv:0705.2324
Date: Wed, 16 May 2007 10:46:46 GMT (25kb)

Title: Finite temperature effects in light scattering off Cooper-paired Fermi
atoms
Authors: Bimalendu Deb
Categories: cond-mat.other cond-mat.supr-con
Comments: 18 pages, 4 figures, Accepted in J. Phys. B: At. Mol. & Opt. Phys
\\
We study stimulated light scattering off a superfluid Fermi gas of atoms at
finite temperature. We derive response function that takes into account vertex
correction due to final state interactions; and analyze finite temperature
effects on collective and quasiparticle excitations of a uniform superfluid
Fermi gas. Light polarization is shown to play an important role in
excitations. Our results suggest that it is possible to excite
Bogoliubov-Anderson phonon at a large scattering length by light scattering.
\\ ( http://arxiv.org/abs/0705.2324 , 25kb)
------------------------------------------------------------------------------
\\
arXiv:0705.2227
Date: Tue, 15 May 2007 20:00:29 GMT (65kb)

Title: Conditions for the Quantum to Classical Transition: Trajectories vs.
Phase Space Distributions
Authors: Benjamin D. Greenbaum, Kurt Jacobs, Bala Sundaram
Categories: quant-ph
Comments: 6 pages, revtex4, 2 eps figures
\\
We contrast two sets of conditions that govern the transition in which
classical dynamics emerges from the evolution of a quantum system. The first
was derived by considering the trajectories seen by an observer (dubbed the
"strong" transition) [Bhattacharya et al., Phys. Rev. Lett. 85, 4852 (2000)],
and the second by considering phase-space densities (the weak'' transition)
[Greenbaum et al., Chaos 15, 033302 (2005)]. On the face of it these conditions
appear rather different. We show, however, that in the semiclassical regime, in
which the action of the system is large compared to hbar, and the environmental
(or measurement) noise is small, they have an almost identical form. In this
regime, the weak conditions dominate while in the opposite regime where the
action is not much larger that hbar, the strong conditions dominate.
\\ ( http://arxiv.org/abs/0705.2227 , 65kb)
------------------------------------------------------------------------------
\\
arXiv:0705.2401
Date: Wed, 16 May 2007 17:17:35 GMT (725kb)

Title: Pulsed beams as field probes for precision measurement
Authors: J. J. Hudson, H. T. Ashworth, D. M. Kara, M. R. Tarbutt, B. E. Sauer,
E. A. Hinds
Categories: physics.atom-ph
Comments: 6 pages, 12 figures. Figures heavily compressed to comply with
arxiv's antediluvian file-size policy
\\
We describe a technique for mapping the spatial variation of static electric,
static magnetic, and rf magnetic fields using a pulsed atomic or molecular
beam. The method is demonstrated using a beam designed to measure the electric
dipole moment of the electron. We present maps of the interaction region,
showing sensitivity to (i) electric field variation of 1.5 V/cm at 3.3 kV/cm
with a spatial resolution of 15 mm; (ii) magnetic field variation of 5 nT with
25 mm resolution; (iii) radio-frequency magnetic field amplitude with 15 mm
resolution. This new diagnostic technique is very powerful in the context of
high-precision atomic and molecular physics experiments, where pulsed beams
have not hitherto found widespread application.
\\ ( http://arxiv.org/abs/0705.2401 , 725kb)
------------------------------------------------------------------------------
\\
arXiv:0705.2426
Date: Wed, 16 May 2007 20:04:00 GMT (31kb)

Title: Vortex Lattice Locking in Rotating Two-Component Bose-Einstein
Condensates
Authors: Ryan Barnett, Gil Refael, Mason A. Porter, Hans Peter Buchler
Categories: cond-mat.str-el cond-mat.mes-hall
\\
We examine the effect of vortex locking in two-component Bose-Einstein
condensates composed of atoms with different masses. For the case of negative
interspecies interaction g_{12}<0, we demonstrate the stability of locked
phases, in which the vortices of the two components form bound pairs. We show
that such a state requires that the superfluids of both components and the
vortex lattice all rotate at different rates. We find that the Magnus force
pulling apart bound pairs of vortices increases linearly with the distance from
the center of the condensate and eventually overwhelms the restoring force
arising from the interspecies interaction. We provide a prediction for the
critical radius at which vortices become unbound and support our analysis with
numerical minimizations.
\\ ( http://arxiv.org/abs/0705.2426 , 31kb)
------------------------------------------------------------------------------
\\
arXiv:0705.2518
Date: Thu, 17 May 2007 11:43:29 GMT (125kb)

Title: Spectroscopy of Strong-Pulse Superradiance in a Bose-Einstein condensate
Authors: Nir Bar-Gill, Eitan E. Rowen and Nir Davidson
Categories: cond-mat.other
\\
We study experimentally superradiance in a Bose-Einstein condensate using a
two-frequency pump beam. By controlling the frequency difference between the
beam components, we measure the spectrum of the backward (energy-mismatched)
superradiant atomic modes. In addition, we show that the populations of these
modes display coherent time-dynamics. These results are compared to a
semi-classical model based on coupled Schroedinger-Maxwell equations.
\\ ( http://arxiv.org/abs/0705.2518 , 125kb)
------------------------------------------------------------------------------
\\
arXiv:0705.2569
Date: Thu, 17 May 2007 17:38:21 GMT (488kb)

Title: A self-biased permanent magnet atom chip for Bose-Einstein condensation
Authors: T. Fernholz, R. Gerritsma, S. Whitlock, I. Barb, R. J. C. Spreeuw
Categories: cond-mat.other
\\
We describe a self-biased, fully permanent magnet atom chip used to study
ultracold atoms and to produce a Bose-Einstein condensate (BEC). The magnetic
trap is loaded efficiently by adiabatic transport of a magnetic trap via the
application of uniform external fields. Radio frequency spectroscopy is used
for in-trap analysis and to determine the temperature of the atomic cloud. The
formation of a Bose-Einstein condensate is observed in time of flight images
and as a narrow peak appearing in the radio frequency spectrum.
\\ ( http://arxiv.org/abs/0705.2569 , 488kb)
------------------------------------------------------------------------------

Replacements:

------------------------------------------------------------------------------
\\
arXiv:cond-mat/0512018
replaced with revised version Mon, 14 May 2007 16:34:50 GMT (214kb)

Title: Fourier synthesis of optical potentials for atomic quantum gases
Authors: Gunnar Ritt, Carsten Geckeler, Tobias Salger, Giovanni Cennini, Martin
Weitz
Categories: cond-mat.other
Journal-ref: Phys. Rev. A 74, 063622 (2006)
DOI: 10.1103/PhysRevA.74.063622
\\ ( http://arxiv.org/abs/cond-mat/0512018 , 214kb)
------------------------------------------------------------------------------
\\
arXiv:cond-mat/0610798
replaced with revised version Mon, 14 May 2007 02:49:36 GMT (278kb)

Title: Large-N expansion for unitary superfluid Fermi gases
Authors: M. Y. Veillette, D. E. Sheehy, and L. Radzihovsky
Categories: cond-mat.other
Journal-ref: Phys. Rev. A 75, 043614 (2007).
DOI: 10.1103/PhysRevA.75.043614
\\ ( http://arxiv.org/abs/cond-mat/0610798 , 278kb)
------------------------------------------------------------------------------
\\
arXiv:cond-mat/0702191
replaced with revised version Mon, 14 May 2007 10:16:55 GMT (71kb)

Title: Phase Transitions and Pairing Signature in Strongly Attractive Fermi
Atomic Gases
Authors: X W Guan, M T Batchelor, C Lee and M Bortz
Categories: cond-mat.str-el cond-mat.stat-mech
and figures
\\ ( http://arxiv.org/abs/cond-mat/0702191 , 71kb)
------------------------------------------------------------------------------
\\
arXiv:cond-mat/0702569
replaced with revised version Mon, 14 May 2007 09:39:55 GMT (20kb)

Title: Quantum rearrangement and self-consistent BCS-BEC crossover
thermodynamics
Authors: Ji-sheng Chen, Chuan-ming Cheng, Jia-rong Li, Yan-ping Wang
Categories: cond-mat.stat-mech hep-ph nucl-th
Comments: 5 pages, 1 figure; shortened version with typos fixed and references
updated
\\ ( http://arxiv.org/abs/cond-mat/0702569 , 20kb)
------------------------------------------------------------------------------
\\
arXiv:0704.0289
replaced with revised version Thu, 17 May 2007 19:56:57 GMT (339kb)

Title: Vortex proliferation in the Berezinskii-Kosterlitz-Thouless regime on a
two-dimensional lattice of Bose-Einstein condensates
Authors: V. Schweikhard, S. Tung, and E. A. Cornell
Categories: cond-mat.mes-hall
Comments: changed title; changed definition of vortex density surrogate "D";
additional data in Fig. 3; text revisions
\\ ( http://arxiv.org/abs/0704.0289 , 339kb)
------------------------------------------------------------------------------

Till next time,
Matt.

--
=========================================================================
Dr M. J. Davis,               Senior Lecturer in Physics
School of Physical Sciences,  email: mdavis_at_physics.uq.edu.au
University of Queensland,     ph   : +61 7 334 69824
Brisbane, QLD 4072,           fax  : +61 7 336 51242
Australia.                    http://www.physics.uq.edu.au/people/mdavis/
=========================================================================
Matt's arXiv selection: weekly summary of cold-atom papers from arXiv.org
http://www.physics.uq.edu.au/people/mdavis/matts_arXiv/
=========================================================================
Legal stuff: Unless stated otherwise, this e-mail represents only the
views of the sender and not the views of the University of Queensland
=========================================================================

Received on Fri Jun 01 2007 - 12:16:57 EST

This archive was generated by hypermail 2.2.0 : Thu May 08 2008 - 11:51:41 EST


text:
# Revision history [back]

You can use the .slice() method. For the frac function, you may have to decide wether you want to keep the precision of your adic number or if you want to reset it to 1:

sage: floor_adic = lambda a : a.slice(0, a.precision_absolute())
sage: frac_adic = lambda a : a - a.slice(0, a.precision_absolute())
sage: frac_adic_noprec = lambda a : a.slice(a.valuation(), 0)

sage: K = Qp(11); K
11-adic Field with capped relative precision 20
sage: b = K(3211/11^2); b
10*11^-2 + 5*11^-1 + 4 + 2*11 + O(11^18)


text:
# Probability for high z-scores

Where can I find a z-table (or app or whatever) that will give me the probability associated with very high z-scores (e.g. 12 or 15)?

• These typically aren't tabulated, in part because they are straightforward to compute: see stats.stackexchange.com/questions/7200/….
– whuber
Feb 1, 2019 at 21:29
• As you probably know, most printed tables don't go much beyond $\pm 3.5.$ Areas beyond values farther into the tails are very small, and the corresponding probabilities are of limited interest in most applications. First, because it is usually enough to know that such a probability is 'extremely close to 0', second, because normal models are often approximate and one does not trust the values far out in normal tails to be descriptive of reality. // Roughly one can say US men have hts in dist'd NORM(69", 3.5"). Strictly speaking this would imply a tiny probability below 0; neg hts impossible. Feb 1, 2019 at 21:30
• Such extreme tail calculations are nearly always nonsense anyway. Extreme tail probabilities are very sensitive to the (almost certainly false) model assumption, where even fairly modest deviations from the supposed distribution will lead to many orders of magnitude difference in the tail probability -- how could such calculations carry any value? It would be spurious precision. ... ctd Feb 2, 2019 at 1:18
• ctd... Even the 2-3 figure accuracy in an upper-tail approximation like $1-\Phi(x)\approx \phi(x)/x$ is ludicrously precise that far out when the inaccuracy caused by even slightly incorrect distributional and dependence assumptions looms much, much larger Feb 2, 2019 at 1:23

Various kinds of statistical software give exact values for far-tail standard normal probabilities. If $$Z \sim \mathsf{Norm}(0,1),$$ then R software gives values as shown below for $$P(Z > v).$$ (Ignore row numbers in brackets [ ].)

v = 1:7;  pr = 1-pnorm(v);  cbind(v, pr)
v           pr
[1,] 1 1.586553e-01
[2,] 2 2.275013e-02
[3,] 3 1.349898e-03
[4,] 4 3.167124e-05
[5,] 5 2.866516e-07
[6,] 6 9.865877e-10
[7,] 7 1.279865e-12

Values of $$P(Z > 10),$$ and so on are so near to 0 that R does not print them.

Notes: (1) Some of the most extreme values may be beyond the numerical accuracy of R. I cannot promise that all decimal places given for the last few entries are exactly accurate. (2) R software is available free of change: r-project.org. (3) Perhaps see this link. But notice that no authoritative references are given there concerning methods or accuracy. (For those see details in @whuber's link.)

• R will print the values of $\Pr(Z\gt z)$ up to the point where they completely underflow IEEE floats, which occurs where $z$ equals -qnorm(2^(-2^10 + 1 - 51)), approximately $38.46.$ Up to -qnorm(2^(-2^10 + 1)), or approximately $37.54,$ there should be nearly full precision in the result (around 14 to 15 decimal digits). This can be verified by computing using the partial fraction expansion of Mills Ratio: seven terms suffice for $z \gt 24.$ No software can give truly "exact" values, but some software will compute them to arbitrary precision.
– whuber
Feb 1, 2019 at 22:31


text:
# Legends in Externalized Graphics with TikZ

I've used tikz to build all the charts in a manuscript I'm preparing for submission to a journal. As a last step prior to submission, I wanted to take all the tikz code out and just \includegraphics the externalized graphic files. The problem is that several of my graphics are groupplots where several plots share a common legend. I've accomplished this using legend to name=xxx and then placing \ref{xxx} after the figure. Here's an example. If you want to build it yourself the data is here and here

\documentclass{article}

\usepackage{pgfplots}
\usepgfplotslibrary{groupplots}
\usetikzlibrary{pgfplots.groupplots}
\usetikzlibrary{plotmarks}
\usetikzlibrary{patterns}
\usepgfplotslibrary{external}
\tikzexternalize

\pgfplotsset{compat = 1.12}

\begin{document}

\begin{figure}
\centering
\begin{tikzpicture}
\begin{groupplot}[
group style={group size=2 by 1,
xlabels at=edge bottom,
ylabels at=edge left},
xlabel = {\footnotesize $\alpha_{++}$},
ylabel = {\footnotesize Departure Rate},
view={0}{90},
colorbar horizontal,
colorbar to name=ContourColorbar,
colormap/blackwhite,
y tick label style={/pgf/number format/.cd,
fixed,
fixed zerofill,
precision=2,
/tikz/.cd},
x tick label style={/pgf/number format/.cd,
fixed,
fixed zerofill,
precision=0,
/tikz/.cd}]
\nextgroupplot[title={\scriptsize Come and Go}]
\nextgroupplot[title={\scriptsize ++Resources}]
\end{groupplot}
\end{tikzpicture}
\ref{ContourColorbar}
\caption{++Resources and Come and Go}
\label{HeatMap}
\end{figure}

\end{document}

This code produces the following document, which is fine.

But the externally generated image is this

Note, no colorbar.

The TikZ manual 50.4.1 offers this advice if there is a \ref inside of externalized graphics:

"Thus: if you have \ref inside of external graphics, consider using mode=list and make or copy-paste the system call for the image(s) and issue it manually."

At this point I'm out of my depth. I'm using MikTex and TexNicCenter and that's the only way I've ever used Latex. I'm not really sure what "using mode=list and make or copy-paste the system call" even means. Is there a guide someone could point me to that spells this out? I did try some googling and found some references to using Make, but again I have no experience with this.

Alternatively, is there another method to achieve a single legend in a groupplot that avoids the \ref in the externalized image? I have several of these in this document in addition to the one shown here.

Thanks!

Addition: As I try to figure this out, I found this question whose answer boiled down to

\pgfkeys{
/tikz/external/mode=list and make
}

And then run make -B -f <filename>.makefile after the first compile run

So I download GNU make and tried this. After the first compile run, there is indeed a file called MWE.makefile. From the command prompt, I ran make -B -f MWE.makefile and I get the following output

process_begin: CreateProcess(NULL, cat mwe.figlist, ...) failed.
process_begin: CreateProcess(NULL, cat mwe.figlist, ...) failed.
All images exist now.  Use make -B to re-generate them.

The resulting pdf file looks like this

So....any suggestions on how to proceed? Am I doing something wrong? Are there issues with make on a windows system?

Second addition: I'm piling on the questions here as I try to puzzle this out. I can't imagine I'm the first person to encounter this...maybe I'm just really dumb.

In another post here I found a very similar problem, just not using a groupplot. The solution involved inserting a node and replacing the \ref. Combing the MWE from that post with the changes provided in its answer provides the following code.

\documentclass{standalone}
\usepackage{tikz,pgfplots}
\pgfplotsset{compat=1.12}
\usetikzlibrary{external}
\tikzexternalize
\begin{document}
\begin{tikzpicture}
\begin{axis}[%
legend entries={$\sin(x)$},
legend to name = named,
name = plt
]
\end{axis}
\node[at=(plt.south),anchor=north] {\pgfplotslegendfromname{named}};
\end{tikzpicture}
\end{document}

I thought I had my answer...except that I can't figure out how to "name" a groupplot. You'll note in the above code the line name = plt in the axis environment. This allows you to later use node[at=(plt.south). Although the manual indicates that the groupplot environment should function basically the same as the axis environment, I can't figure out how to achieve that naming. And so I when I try to build I get No shape named plt is known. So if anyone knows how THAT can be accomplished then maybe that's my answer...

Third edit, I guess it's a process. Above I said I'd been unable to name a group plot. Figured that one out, but still no joy. Code now looks like this

\documentclass{article}

\usepackage{pgfplots}
\usepgfplotslibrary{groupplots}
\usetikzlibrary{pgfplots.groupplots}
\usetikzlibrary{plotmarks}
\usetikzlibrary{patterns}
\usepgfplotslibrary{external}
\tikzexternalize
%\pgfkeys{/tikz/external/mode=list and make}

\pgfplotsset{compat = 1.12}

\begin{document}

\begin{figure}
\centering
\begin{tikzpicture}
\begin{groupplot}[group style={group size=2 by 1,
group name = plots,
xlabels at=edge bottom,
ylabels at=edge left},
xlabel = {\footnotesize $\alpha_{++}$},
ylabel = {\footnotesize Departure Rate},
view={0}{90},
colorbar horizontal,
colorbar to name=ContourColorbar,
colormap/blackwhite,
y tick label style={
/pgf/number format/.cd,
fixed,
fixed zerofill,
precision=2,
/tikz/.cd
},
x tick label style={
/pgf/number format/.cd,
fixed,
fixed zerofill,
precision=0,
/tikz/.cd
}]
\nextgroupplot[title={\scriptsize Come and Go}]
\nextgroupplot[title={\scriptsize ++Resources}]
\end{groupplot}
\node[at=(plots c2r1.south),anchor=north] {\pgfplotslegendfromname{ContourColorbar}};
\end{tikzpicture}
%\ref{ContourColorbar}
\caption{++Resources and Come and Go}
\label{HeatMap}
\end{figure}

\end{document}

And the output looks like this

I'm guessing the ?? is my node with no colorbar.

• Normally a legend is written to the aux file (as a huge macro definition), which shows up as ?? the first run. I have no idea what externalize does for an aux file. – John Kormylo May 18 '15 at 3:12
• Just asking out of curiosity: why do you use the external library in the standalone document? Does it have to do with compiling the standalone-.tex in the figures subfolder? – henry May 18 '15 at 7:34

A possible solution would be to get externalize to compile twice to insert the reference on the second run. I could not figure out how to do this automatically.

But I can offer an alternative externalization using the tcolorbox package. This alternative may be used parallel to the TikZ way or as replacement.

In the following examples, I used the parallel setup. For this, the correct sequence of \tcbEXTERNALIZE and \tikzexternalize is important. \tikzexternalize is NOT needed for the following examples, but I left it in case you want to externalize other pictures the TikZ way.

The first variant encloses the picture plus legend with an tcbexternal environment:

\documentclass{article}

\usepackage[width=18cm]{geometry}
\usepackage{pgfplots,lipsum}
\usepgfplotslibrary{groupplots}
\usetikzlibrary{pgfplots.groupplots}
\usetikzlibrary{plotmarks}
\usetikzlibrary{patterns}
\usepgfplotslibrary{external}

\usepackage[external]{tcolorbox}
\tcbset{
external/prefix=\jobname-,
external/safety=0mm,
external/input source on error=false,
}

\pgfplotsset{compat = 1.12}

%--- use this AFTER \pgfplotsset and BEFORE \tikzexternalize
\tcbEXTERNALIZE
%---

\tikzexternalize
\pgfkeys{/tikz/external/mode=list and make}

\begin{document}

\begin{figure}
\begin{tcbexternal}[minipage,runs=2]{contour}
\centering
\begin{tikzpicture}
\begin{groupplot}[group style={group size=2 by 1,
group name = plots,
xlabels at=edge bottom,
ylabels at=edge left},
xlabel = {\footnotesize $\alpha_{++}$},
ylabel = {\footnotesize Departure Rate},
view={0}{90},
colorbar horizontal,
colorbar to name=ContourColorbar,
colormap/blackwhite,
y tick label style={
/pgf/number format/.cd,
fixed,
fixed zerofill,
precision=2,
/tikz/.cd
},
x tick label style={
/pgf/number format/.cd,
fixed,
fixed zerofill,
precision=0,
/tikz/.cd
}]
\nextgroupplot[title={\scriptsize Come and Go}]
\nextgroupplot[title={\scriptsize ++Resources}]
\end{groupplot}
\end{tikzpicture}
\ref{ContourColorbar}
\end{tcbexternal}
\caption{++Resources and Come and Go}
\label{HeatMap}
\end{figure}

\lipsum[1]

\end{document}

The second variant puts the legend as node inside the picture and replaces tikzpicture by extikzpicture:

\documentclass{article}

\usepackage[width=18cm]{geometry}
\usepackage{pgfplots,lipsum}
\usepgfplotslibrary{groupplots}
\usetikzlibrary{pgfplots.groupplots}
\usetikzlibrary{plotmarks}
\usetikzlibrary{patterns}
\usepgfplotslibrary{external}

\usepackage[external]{tcolorbox}
\tcbset{
external/prefix=\jobname-,
external/safety=0mm,
external/input source on error=false,
}

\pgfplotsset{compat = 1.12}

%--- use this AFTER \pgfplotsset and BEFORE \tikzexternalize
\tcbEXTERNALIZE
%---

\tikzexternalize
\pgfkeys{/tikz/external/mode=list and make}

\begin{document}

\begin{figure}
\centering
\begin{extikzpicture}[runs=2]{contour}
\begin{groupplot}[group style={group size=2 by 1,
group name = plots,
xlabels at=edge bottom,
ylabels at=edge left},
xlabel = {\footnotesize $\alpha_{++}$},
ylabel = {\footnotesize Departure Rate},
view={0}{90},
colorbar horizontal,
colorbar to name=ContourColorbar,
colormap/blackwhite,
y tick label style={
/pgf/number format/.cd,
fixed,
fixed zerofill,
precision=2,
/tikz/.cd
},
x tick label style={
/pgf/number format/.cd,
fixed,
fixed zerofill,
precision=0,
/tikz/.cd
}]
\nextgroupplot[title={\scriptsize Come and Go}]
\nextgroupplot[title={\scriptsize ++Resources}]
\end{groupplot}
\node[at=(plots c1r1.south),below=1cm] {\ref{ContourColorbar}};
\end{extikzpicture}
\caption{++Resources and Come and Go}
\label{HeatMap}
\end{figure}

\lipsum[1]

\end{document}

Note the run=2 option which compiles the snippet twice to get the legend reference correct. contour is the name part for the externalized snippet which will be \jobname-contour.pdf

• Tried the first method and bizarrely it worked fine for some of the plots, and for some it stuck the legend off to the right hand side. I'll try the second approach tomorrow. Thanks for your help! – jerH May 19 '15 at 3:04
• @user1922959 The second approach has the advantage that the legend can be placed quite arbitrarily using node coordinates. Maybe, that's what you need. – Thomas F. Sturm May 19 '15 at 7:15

Finally managed to work it out based on Thomas' answer with a few modifications to the second variant.

First, I didn't use mode=list and make. For whatever reason I was never able to do anything with the makefile that generated. Second, had to usetikzlibrary{calc} so that I could manipulate the node positions to get some of the legends to line up where I wanted them. So code that looks like

\documentclass{article}

\usepackage[width=18cm]{geometry}
\usepackage{caption}
\usepackage{placeins}
\usepackage{pgfplots}
\usepgfplotslibrary{groupplots}
\usetikzlibrary{pgfplots.groupplots}
\usetikzlibrary{plotmarks}
\usetikzlibrary{patterns}
\usetikzlibrary{calc}
\usepgfplotslibrary{external}

\usepackage[external]{tcolorbox}
\tcbset{
external/prefix=\jobname-,
external/safety=0mm,
external/input source on error=false,
}

\pgfplotsset{compat = 1.12}

\tcbEXTERNALIZE

\tikzexternalize

\begin{document}

\begin{figure}
\centering
\begin{extikzpicture}[runs=2]{fig4}
\begin{groupplot}[
legend columns=5,
legend entries={{\tiny +Method},{\tiny Hold All},{\tiny Random},{\tiny Come and Go}},
legend to name=CombinedLegendAlpha,
group style={
group name = fig4_plots,
group size=2 by 1,
xlabels at=edge bottom,
ylabels at=edge left
},
legend style={draw=none},
%legend style={at={(0.98,0.825)}},
xlabel = {\footnotesize $\alpha_{+}$},
ylabel = {\footnotesize Avg Portfolio Value},
]
\nextgroupplot[title={\scriptsize +Cost Method},
y tick label style={
font=\tiny,
/pgf/number format/.cd,
fixed,
fixed zerofill,
precision=0,
/tikz/.cd
},
footnotesize,
x tick label style={
font=\tiny,
/pgf/number format/.cd,
fixed,
fixed zerofill,
precision=1,
/tikz/.cd
}]
\addplot+[black, mark=o,line join=round, mark repeat=15] table[col sep=comma, y=PlusCost, x=CostAlpha]{PlusMethodsAlpha.csv};
\addplot+[black, mark=x,line join=round, mark repeat=15] table[col sep=comma, y=HoldAll, x=CostAlpha]{PlusMethodsAlpha.csv};
\addplot+[black, mark=|,line join=round, mark repeat=15] table[col sep=comma, y=Random, x=CostAlpha]{PlusMethodsAlpha.csv};
\addplot+[black, mark=square,line join=round, mark repeat=15] table[col sep=comma, y=ComeAndGo, x=CostAlpha]{PlusMethodsAlpha.csv};
\nextgroupplot[title={\scriptsize +FTE Method},
y tick label style={
font=\tiny,
/pgf/number format/.cd,
fixed,
fixed zerofill,
precision=0,
/tikz/.cd
},
footnotesize,
x tick label style={
font=\tiny,
/pgf/number format/.cd,
fixed,
fixed zerofill,
precision=0,
/tikz/.cd
}]
\addplot+[black, mark=o,line join=round, mark repeat=15] table[col sep=comma, y=PlusFTE, x=FTEAlpha]{PlusMethodsAlpha.csv};
\addplot+[black, mark=x,line join=round, mark repeat=15] table[col sep=comma, y=HoldAll, x=FTEAlpha]{PlusMethodsAlpha.csv};
\addplot+[black, mark=|,line join=round, mark repeat=15] table[col sep=comma, y=Random, x=FTEAlpha]{PlusMethodsAlpha.csv};
\addplot+[black, mark=square,line join=round, mark repeat=15] table[col sep=comma, y=ComeAndGo, x=FTEAlpha]{PlusMethodsAlpha.csv};
\end{groupplot}
%\node[at=(fig4_plots c1r1.south),below=1cm]{\ref{CombinedLegendAlpha}};
\node (fig4_Legend) at ($(fig4_plots c1r1.center)!0.5!(fig4_plots c2r1.center)-(0,2.5cm)$){\ref{CombinedLegendAlpha}};
\end{extikzpicture}
\caption{Triage+ Performance}
\label{PlusAlpha}
\end{figure}

\end{document}

Gives me a pdf file containing

which is exactly what I need. Ignore the red box...it's an artifact of the pdf viewer.

Thanks so much for the help!


text:
# Particle flux diagnostics

#Introduction

Particle flux diagnostics, more commonly called probes, are a type of edge diagnostic which finds great importance in today’s plasma physics research. Probes offer fast sampling, good spatial resolution and a very low initial cost. On the other hand, interpretation of probe data is notoriously difficult.

“It’s a piece of wire that you stick inside the plasma. Out of it you get two numbers: a voltage and a current. But figuring out what those two mean, that’s the real mastery.”
- Ing. Kateřina Jiráková, leader of the probe section on tokamak GOLEM, 5 March 2019

Contrary to this quote, not all probes are a piece of wire. They come in all shapes and sizes, such as the ball-pen probe, the tunnel probe, the Mach probe and many more. The probe shape and size greatly influence what the probe measures and how it can be interpreted. But, in essence, all probes are the same: a piece of conductor measuring in direct contact with the plasma.

#Probes on GOLEM

Tokamak GOLEM doesn’t reach very high plasma parameters (central electron temperature $$\sim 40$$ eV and line-averaged density $$\sim 0.5 \times 10^{10}$$ m$$^{-3}$$), which are poor conditions for fusion, but excellent conditions for probe measurements. In other tokamaks, inserting a probe too deep into the plasma has detrimental effects both on the probe and on the plasma. At GOLEM, one can easily insert a double rake probe up to the centre of the plasma column and observe only a slight increase in the loop voltage, as evidenced by the experiments conducted in the plasma practica course.

Note: Do not take this experiment as an example. It is prudent to measure only up to $$r \approx 60$$ mm.

There is a number of probe heads on tokamak GOLEM, featuring various probe types. These are:

• combined ball-pen and Langmuir probe head, featuring a ball-pen probe and a Langmuir probe (perk: measurements of $$T_e$$ with high temporal resolution)
• double rake probe, featuring 16 Langmuir probes (perk: cross-correlation measurements of the poloidal plasma velocity $$v_p$$)
• Mach probe ring, featuring 8 Mach probes (perk: poloidally resolved measurement of the Mach number $$M$$)
• (single) rake probe, featuring 16 Langmuir probes (perk: radial profile measurements in a large range of $$r$$ within a single discharge)
• (double) tunnel probe, featuring two tunnel probes (perk: measurements of $$T_e$$ with high temporal resolution, also measurements of the Mach number $$M$$)
• strip detector (a semiconductor detector developed by Peter Svihra)
• Tsviatko’s probe, featuring bent wires
• petiprobe, a combination of the ball-pen+Langmuir probe and the (double) tunnel probe

Aside from these built and functioning probes, this wiki mentions:

• runaway electron probe, featuring scintillators (it is currently in the design stage, responsible person being Pravesh Dhyani)
• triple probe (a makeshift probe constructed by Marco Martinez in 2012 and later thrown out)

#Currently installed

The data here might be outdated. Always check the last update of this page.

• double rake probe
• petiprobe

#Past experiments

Check out the probe history article or the experiment records.

#Library and references - two excerpts from IAEA reports - Robert L. Merlino, Understanding Langmuir probe current-voltage characteristics, American Journal of Physics 75/12 (December 2007)


text:
# Using "softmax" (non-linear) vs "linear" activation function in Deep Reinforcement Learning

I am following the tutorial in this video: https://youtu.be/cO5g5qLrLSo which implements deep reinforcement learning (DQN) to balance cart pole in OpenAI default environment.

The DQN model looks like as follows:

model = Sequential()

The implemented code is also available on Google Collabs for you to run/test here: https://colab.research.google.com/drive/1oQILItVu6Y8jOCprzwMGzwlztYmVKK-F?usp=sharing

I do understand the concept and mathematics behind using "linear" vs "non-linear" (softmax) activation function in the output layer.

But, what I am struggling to understand is that why in this target application linear activation function is used in the output layer instead of softmax? Can someone specify how to realize that which type of activation function will be the best for what type of target application using DQN?

P.S. I tried to change the activation function to softmax instead and got completely different result. Hence, I am confused as to why changing the activation function in the output layer could generate completely opposite results.

The normal use case for softmax in the output layer is for a classification problem, where the output is an array of probabilities for each class.

The normal use case for a linear output is for a regression problem, where the output is an array of floating point numbers that are estimates for some measurement.

In a DQN, the desired output for the neural network is the action values (or Q values) for each action. The action value is the expected sum of future rewards given the starting condition of state and action choice, plus following the current target policy from that point onwards (this is a little self-referential in DQN in that the target policy is defined by taking the action with the highest action value in all states).

It is entirely possible for this predicted action value to be greater than $$1$$ or less than $$0$$, and there is also no reason to expect a the set of action values for all actions possible in a specific state to sum to $$1$$. This is a regression problem, and you should generally use a linear output for such problems.

Some Deep RL will learn a policy function, either instead of, or in addition to the value function - for example REINFORCE or A3C. In that case, if the action space is discrete, then the policy function will behave a lot like a classifier (it classifies the preferred action for a given state), and you would use a softmax output for that network. Other action spaces may be described differently though, so you are not guaranteed to see softmax used in output layer of policy function networks.

• Hello Neil, thank you for your answer on this. Will it be possible to elaborate why we would use softmax with an example of REINFORCE or A3C? Because we can also use linear in that case as well, isn't it? Or am I missing something? Feb 18 at 14:56
• You would not use linear activation to define a policy for REINFORCE or A3C, at least not for discrete action space. However, some action spaces can be described using linear outputs - the output might be the mean and variance for a Normal distribution for example. Feb 18 at 14:58
• @SomdipDey I don't understand sorry. The phrase "the RL has a policy on it" does not make sense to me. In general, you should understand first what the neural network is doing inside the agent before choosing the activation function, because it makes a big difference. Different RL methods, and different action spaces will affect this. If you want to experiment by changing the activation functions, that is fine and might help you learn what they do. Mostly, inside RL agents, you will discover the activation function is constrained by what it is modelling, and changing it will break it. Feb 18 at 15:37


text:
1
JEE Main 2022 (Online) 29th June Evening Shift
Numerical
+4
-1

The Vernier constant of Vernier callipers is 0.1 mm and it has zero error of ($$-$$0.05) cm. While measuring diameter of a sphere, the main scale reading is 1.7 cm and coinciding vernier division is 5. The corrected diameter will be _________ $$\times$$ 10$$-$$2 cm.

2
JEE Main 2022 (Online) 28th June Evening Shift
Numerical
+4
-1

A student in the laboratory measures thickness of a wire using screw gauge. The readings are 1.22 mm, 1.23 mm, 1.19 mm and 1.20 mm. The percentage error is $${x \over {121}}\%$$. The value of x is ____________.

3
JEE Main 2022 (Online) 26th June Evening Shift
Numerical
+4
-1

A travelling microscope is used to determine the refractive index of a glass slab. If 40 divisions are there in 1 cm on main scale and 50 Vernier scale divisions are equal to 49 main scale divisions, then least count of the travelling microscope is __________ $$\times$$ 10$$-$$6 m.

4
JEE Main 2022 (Online) 26th June Morning Shift
Numerical
+4
-1

In a vernier callipers, each cm on the main scale is divided into 20 equal parts. If tenth vernier scale division coincides with nineth main scale division. Then the value of vernier constant will be _________ $$\times$$ 10$$-$$2 mm.

JEE Main Subjects
Physics
Mechanics
Electricity
Optics
Modern Physics
Chemistry
Physical Chemistry
Inorganic Chemistry
Organic Chemistry
Mathematics
Algebra
Trigonometry
Coordinate Geometry
Calculus
EXAM MAP
Joint Entrance Examination


text:
# [luatex] Absolute beginners questions

Keith J. Schultz schultzk at gmx.net
Fri Sep 30 10:55:55 CEST 2011

Hi Peter,

I like I said I am a seasoned programmer.
I know that declaring something local makes it local to its scope.

At this point I am just curious, what might be possible so that I can better plan.

You have basically answered my questions.

thanx again,

regards
Keith.

Am 30.09.2011 um 09:26 schrieb Paul Isambert:

> Le 30/09/2011 08:53, Keith J. Schultz a écrit :
>> Hi Peter,
>>
>> I am so to say an very advanced programmer, but I have never liked
>> the TeX way of doing things nor have I tried to really learn TeX.
>
> So welcome to LuaTeX :)
> (Although the TeX way was a good source of amusing puzzles; and might not fade so soon.)
>
>> I had seen the reference, but as you said it is quite low level and more aimed
>> towards the TeX use.
>
> The wiki lists other sources of info (and don't forget the wiki itself): http://wiki.luatex.org/index.php/Documentation_and_help
>
>> My main interest is what I have to pass to the lua interpreter
>
> This depends on what you want to do. Without an example, it is hard to say what you "have to" pass.
>
>>  and what I can access from
>> with in it.
>
> TeX internals (baselineskip, maxdepth and the likes), plus all count/box/... registers, plus callbacks and lists of nodes (the most interesting part). Also, again, without an example, it's a bit hard to make a sensible answer.
>
>>   Here the Lua(La)TeX documentation is so what vague. It seem also to suggest
>> that each call to lua are singular and can not themselves share their state between them and
>> if the globals where glaobals to TeX or the lua interpreter.
>
> \directlua calls are Lua chunk, meaning what is local in a \directlua call is undefined in other calls; otherwise global variables are accessible from all chunks. See for instance:
>
> \directlua{%
>  local foo = "foo" % Local variable
>  bar = "bar" % Global variable
>  }
> \directlua{
>  texio.write_nl(foo or "nothing") % Prints "nothing"
>  texio.write_nl(bar or "nothing") % Prints "bar"
>  }
>
> As for the globals being globals to TeX or Lua, I'll admit I don't understand the question. Globals in TeX and globals in Lua are different things and do not interact; the former are related to TeX groups, the latter to Lua chunks.
>
>> For right know all I need to do is inject the proper commands into the TeX engine.
>
> Again, "proper" without an example is a bit vague. Could you be more precise?
>
> Best,
> Paul


text:
Inspired by Generate Keyboard Friendly Numbers.

## Background

Many number pads have the following layout:

789

456

123

0

We define a number's neighborhood as the set of cells orthogonally adjacent to it on the numpad shown, including itself. For example, 2's neighborhood is {1,5,3,0,2} and 0's neighborhood is {1,2,0}. There is a list of each number's neighborhood below, above test cases.

We define a numpad friendly number as a positive integer where, when written in decimal without leading zeroes, each digit except for the first is in the neighborhood of the previous digit.

For example,

• 7856 is a numpad friendly number because 8 is in the neighborhood of 7, 5 is in the neighborhoood of 8, and 6 is in the neighborhood of 5.
• 1201 is a numpad friendly number because 2 is in the neighborhood of 1, 0 is in the neighborhood of 2, and 1 is in the neighborhood of 0.
• 82 is not a numpad friendly number because 2 is not in the neighborhood of 8.
• 802 is not a numpad friendly number because 0 is not in the neighborhood of 8 (neighborhoods don't wrap around).

Related OEIS Sequence. Note that this related sequence is distinct because it counts 0 as adjacent to 7 instead of 1 and 2.

# Challenge

Given a positive integer n, return the n-th or the first n numpad friendly numbers, where the first is 1. You may use 0-based indexing, where the 0-th numpad friendly number would be 1.

# Neighborhoods

Each digits's neighborhood is listed here:

0:{0,1,2}
1:{0,1,2,4}
2:{0,1,2,3,5}
3:{2,3,6}
4:{1,4,5,7}
5:{2,4,5,6,8}
6:{3,5,6,9}
7:{4,7,8}
8:{5,7,8,9}
9:{6,8,9}

# Test Cases / Sequence

These are the first 100 terms

[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 20, 21, 22, 23, 25, 32, 33, 36, 41, 44, 45, 47, 52, 54, 55, 56, 58, 63, 65, 66, 69, 74, 77, 78, 85, 87, 88, 89, 96, 98, 99, 100, 101, 102, 110, 111, 112, 114, 120, 121, 122, 123, 125, 141, 144, 145, 147, 200, 201, 202, 210, 211, 212, 214, 220, 221, 222, 223, 225, 232, 233, 236, 252, 254, 255, 256, 258, 320, 321, 322, 323, 325, 332, 333, 336, 363, 365, 366, 369, 410, 411, 412, 414, 441, 444, 445, 447]

• I like how this challenge only considers positive integers (which keeps the essence and allows more languages to participate) and allows displaying either the n-th or the first n outputs for flexibility – Luis Mendo Sep 25 '17 at 9:59
• I completely misread the challenge, here's an "is this term valid in the sequence" script: Try it online! – Magic Octopus Urn Sep 27 '17 at 20:04

# JavaScript (ES6), 1049389 88 bytes

Returns the N-th term of the sequence, 1-indexed.

f=(i,k,n=k,N=n/5>>1)=>(N?8530025>>(n%10*6191^N%10*6191)%26&1:!i--)?N?f(i,k,N):k:f(i,-~k)

### Demo

f=(i,k,n=k,N=n/5>>1)=>(N?8530025>>(n%10*6191^N%10*6191)%26&1:!i--)?N?f(i,k,N):k:f(i,-~k)

for(n = 1; n <= 50; n++) {
console.log('a(' + n + ') = ' + f(n))
}

• Best I could get is 151 k=(n,a=1)=>n?k(n-([...(x=a+[]).slice(0,-1)].reduce((a,c)=>a*!!~"012 0124 01235 236 1457 24568 3569 478 5789 689".split [c].indexOf(x[i++]),i=1)),a+1):a-1 maybe something there helps, my test is probably too long – Conor O'Brien Sep 25 '17 at 0:03
• This answer brings the concept of magic numbers to a whole new level... I don't even understand how you found them o_O – scottinet Sep 27 '17 at 20:59
• @scottinet To a large extent, my explanation for this answer applies to this one as well. The absolute difference didn't work very well on that one, so I tried with XOR instead. As a side note, I found another formula that worked in 96% of cases without the need for a lookup bitmask. But processing the remaining 4% separately was too costly in JS. I didn't try in Jelly, and now I don't remember the formula anyway... ¯\_(ツ)_/¯ – Arnauld Sep 27 '17 at 22:13
• Thanks for the explanations. This is still impressive :-) – scottinet Sep 28 '17 at 4:36

# Perl 5, 123 + 1 (-p) = 124 bytes

while($_){$r=@d=++$\=~/./g;map$r&&=(120,1240,12350,236,1457,24568,3569,478,5789,689)[$d[$_-1]]=~/$d[$_]/,1..$#d;$r&&$_--}}{  Try it online! # Jelly, 27 24 bytes Returns the N first terms of the sequence. D⁽ÞȦ×^2\%26“⁷wð’æ»ḂẠ 1Ç#  Try it online! This is a port of my JS answer. D⁽ÞȦ×^2\%26“⁷wð’æ»ḂẠ - helper link: test numpad-friendliness of a number, e.g. 1257 D - get decimal digits -> [1, 2, 5, 7] × - multiply by ... ⁽ÞȦ - ... the integer 6191 -> [6191, 12382, 30955, 43337] ^2\ - bitwise XOR overlapping reduce -> [10353, 18613, 53666] %26 - modulo 26 -> [5, 23, 2] æ» - right-shift by each value ... “⁷wð’ - ... the integer 8530025 -> [266563, 1, 2132506] Ḃ - isolate the LSB -> [1, 1, 0] which means that 1->2 and 2->5 are OK and 5->7 is not Ạ - all (0 if there's any 0) -> 0, i.e. not numpad-friendly :'( 1Ç# - main link: return the [input] first matching numbers, using our helper link as a monad and starting with 1  # 05AB1E, 24 23 bytes µNSü‚εW_iO<ë<3BÆ}ÄR2‹}P  Try it online! Returns the nth number in the sequence. Explanations: µNSü‚εW_iO<ë<3BÆ}ÄR2‹}P Full program µ Until counter is equal to input N Push current iteration number (e.g. 1025) S Split to a list of chars (-> ['1', '0', '2', '5']) ü‚ Group into pairs (-> ['1', '0'], ['0', '2'], ['2', '5']) ε For each pair W_ Is smallest digit equal to 0? iO< True: sum all digits and decrement ë False: < - decrement all digits 3B - convert to base 3 Æ - reduced substraction } End if Ä Absolute value R Reverse 2‹ 1 if result is < 2, 0 otherwise } End for each P Cumulative product (1 if all pair results are 1, 0 otherwise) -- implicit counter increment if stack value is 1  The main idea is that, apart from the 0 key, any digit decremented and converted to base 3 has the following properties: • left and right neighbours have an absolute difference of 1 • up and down neighbours have an absolute difference of 10 which, reversed, is conveniently equal to 1 • any other pair of numpad keys result in different values, even when reversed Of course we need a if statement to handle the 0 numpad key. • Solid answer, came to offer more improvements, can't find any. Oooo... and that pairwise put you in the lead too :). – Magic Octopus Urn Oct 6 '17 at 19:52 • I don't think I would've been able to come up with those 3 rules, pretty impressive tbh; what gave you the idea? – Magic Octopus Urn Oct 6 '17 at 20:01 # MATL, 29 27 bytes @J3:qEt!J*+hYAd|2>~A?@]NG-  Outputs the first n numpad-friendly numbers. Try it online! ### Explanation Each digit from 1 to 9 is encoded as a complex number representing its position in the numpad, using in a step-2 grid, where real part represents vertical position and imaginary part represents horizontal position. So 1 is 0+0j, 2 is 0+2j, 3 is 0+4j, 4 is 2+0j, ..., 9 is 4+4j. Digit 0 is encoded as 0+1j, i.e. as if it were placed exactly between 1 and 2. For each candidate numpad-friendly number, a "decimal" base conversion is applied using the above complex numbers instead of the digits 0, 1, ..., 9. This gives an array, of which the absolute consecutive differences are computed. The candidate number is numpad-friendly if and only if all absolute differences are at most 2 (i.e. the grid step). If that's the case, the number is left on the stack. The code uses a do...while loop, which is exited when the amount of numbers in the stack equals the input n. A unit grid would have been a more natural choice. Digits 1, 2 and 0 would then correspond to 0+0j, 1+0j and 0.5+0j respecrively. But it's golfier to use a step-2 grid, because multiplying by 2 (function E) and pushing 0+1j (function J) is one byte shorter than pushing 0+0.5j (J2/ or .5j) # Jelly, 26 bytes ’d-,.⁸?3µ€ạ/S Dṡ2Ç€<2Ạ 1Ç#  Try it online! -2 bytes thanks to caird coinheringaahing -2 bytes thanks to Erik the Outgolfer # Explanation ’d-,.⁸?3µ€ạ/S Helper Link; compute the distance between two keys z = [x, y] ? Switch: ⁸ If z (is not 0): ’ Decrement d Divmod by: -,. Else: [-1, 0.5] (special position for 0) 3 3; right argument for divmod otherwise ignored µ Begin a new monadic link / end this link € Compute the position for each [x, y] / Reduce on ạ Absolute Difference S Sum (this gives the Manhattan Distance) Dṡ2Ç€<2Ạ Helper Link; determine if a number <z> is numpad friendly D Convert number to decimal digits ṡ Slice into overlapping slices of length 2 2 (pairs) € For each pair, Ç The distance between the keys <2 Compare with 2 (the distance between two adjacent keys is 1; corners 2; 0 - 1 and 0 - 2 are 1.5) Ạ All; either all of the distances are less than 2 or there were no distances 1Ç# Main Link; find the first (input) numpad friendly numbers # nfind; counting up from _ collect the first _______ matches that are 1 1 (input) Ç Numpad Friendly  # Python 2, 134 bytes g=lambda n,k=1:n and g(n-(lambda l:all(abs(a-b)<1.2for a,b in zip(l,l[1:])))([~-d%3+~-d/3*1j-d/~d*1.5for d in map(int,k)]),k+1)or~-k  Try it online! • As you define f and then use it once, you could inline it and save two bytes. – Jonathan Frech Sep 25 '17 at 13:16 # Mathematica, 249234 202 bytes (a=o=1;While[a<=#,s=IntegerDigits@o;t=1;p=0;While[t+p<Length@s,If[!FreeQ[(IntegerDigits/@{210,4210,53210,632,7541,86542,9653,874,9875,986})[[s[[t]]+1]],s[[t+1]]],t++,p++]];If[t==Length@s,a++];o++];o-1)&  thanks user202729 for compressing data (-32 bytes) My results: 100 ->447 1000 ->20023 10000 ->788777 • I think you can compress the data by using IntegerDigits : IntegerDigits/@{210,4210,53210,632,7541,86542,9653,874,9875,986}, and use FreeQ, Tr, use Do instead of For, use infix notation for AppendTo and use Do instead of While to repeat Tr[1^s] times, also eliminate the variable p. Also you haven't proven that the algorithm is correct, that is, the resulting number is always less than its index squared, which is necessary to make an answer valid. – user202729 Sep 25 '17 at 0:36 • @user202729 I changed a lot of things.My answer is definately valid. I'll compress the data now. – J42161217 Sep 25 '17 at 0:39 • why the downvote? – J42161217 Sep 25 '17 at 8:43 # PHP, 124+1 bytes while($argn-=$r)for($p=$r=~0,$x=++$n;$x>=1;$p=[7,23,47,76,178,372,616,400,928,832][$c],$x/=10)$r&=!!($p&1<<$c=$x%10);echo$n;

Run as pipe with -nR or try it online.

# Java 8, 192 190 bytes

n->{int r=1,p;a:for(;n>0;){p=-1;for(int c:(r+++"").getBytes())if(p>-1&!"012;0124;01235;236;1457;24568;3568;478;5789;689".split(";")[c-=48].contains(p+""))continue a;else p=c;n--;}return~-r;}

Returns the (1-indexed) n'th number in the sequence.

This was surprisingly harder than I thought.. Probably just having some brain-farts this afternoon..

Explanation:

Try it here.

n->{                 // Method with integer as both parameter and return-type
int r=1,           //  Return-integer
p;             //  Previous digit
a:for(;n>0;){      //  Loop (1) as long as the input is larger than 0
p=-1;            //   Start p at an integer that is not 0-9 (-1 in this case)
for(int c:(r+++"").getBytes())
//   Loop (2) over the digits of the current number
if(p>=0        //    If this is not the first digit (p != -1),
&!"012;0124;01235;236;1457;24568;3568;478;5789;689".split(";")[c-=48]
.contains(p+""))
//    and the adjacent digits are NOT part of a NumberPad-Friendly Nr:
continue a;  //     Go to the next iteration of loop (1)
else           //    Else:
p=c;         //     Set p to the current digit for the next iteration
//   End of loop (2) (implicit / single-line body)
n--;           //   If we haven't encountered the continue, decrease n by 1
}                  //  End of loop (1)
return~-r;         //  Return the result-integer - 1
}                    // End of method
`


text:
# ALGEBRAIC COMBINATORICS

An involution on RC-graphs and a conjecture on dual Schubert polynomials by Postnikov and Stanley
Algebraic Combinatorics, Volume 3 (2020) no. 3, pp. 593-602.

In this paper, we provide explicit formula for the dual Schubert polynomials of a special class of permutations using certain involution principals on RC-graphs, resolving a conjecture by Postnikov and Stanley.

Revised: 2019-11-29
Accepted: 2019-12-15
Published online: 2020-06-02
DOI: https://doi.org/10.5802/alco.105
Classification: 05E05,  14N15
Keywords: Schubert polynomial, dual Schubert polynomial, Bruhat chains
@article{ALCO_2020__3_3_593_0,
author = {Gao, Yibo},
title = {An involution on RC-graphs and a conjecture on dual Schubert polynomials by Postnikov and Stanley},
journal = {Algebraic Combinatorics},
publisher = {MathOA foundation},
volume = {3},
number = {3},
year = {2020},
pages = {593-602},
doi = {10.5802/alco.105},
language = {en},
url = {alco.centre-mersenne.org/item/ALCO_2020__3_3_593_0/}
}
Gao, Yibo. An involution on RC-graphs and a conjecture on dual Schubert polynomials by Postnikov and Stanley. Algebraic Combinatorics, Volume 3 (2020) no. 3, pp. 593-602. doi : 10.5802/alco.105. https://alco.centre-mersenne.org/item/ALCO_2020__3_3_593_0/

[1] Bergeron, Nantel; Billey, Sara C. RC-graphs and Schubert polynomials, Exp. Math., Volume 2 (1993) no. 4, pp. 257-269 | Article | MR 1281474 | Zbl 0803.05054

[2] Billey, Sara C.; Jockusch, William; Stanley, Richard P. Some combinatorial properties of Schubert polynomials, J. Algebr. Comb., Volume 2 (1993) no. 4, pp. 345-374 | Article | MR 1241505 | Zbl 0790.05093

[3] Fomin, Sergey; Kirillov, Anatol N. Yang–Baxter equation, symmetric functions and Grothendieck polynomials (1993) (arXiv preprint https://arxiv.org/abs/hep-th/9306005)

[4] Fomin, Sergey; Stanley, Richard P. Schubert polynomials and the nil-Coxeter algebra, Adv. Math., Volume 103 (1994) no. 2, pp. 196-207 | Article | MR 1265793 | Zbl 0809.05091

[5] Gaetz, Christian; Gao, Yibo Padded Schubert polynomials and weighted enumeration of Bruhat chains (2019) (arXiv preprint https://arxiv.org/abs/1905.00047)

[6] Gaetz, Christian; Gao, Yibo A combinatorial duality between the weak and strong Bruhat orders, J. Comb. Theory, Ser. A, Volume 171 (2020), pp. 105-178 | Article | MR 4040744 | Zbl 07172386

[7] Manivel, Laurent Symmetric functions, Schubert polynomials and degeneracy loci, SMF/AMS Texts and Monographs, Volume 6, American Mathematical Society, Providence, RI; Société Mathématique de France, Paris, 2001, viii+167 pages (Translated from the 1998 French original by John R. Swallow, Cours Spécialisés [Specialized Courses], 3) | MR 1852463 | Zbl 0998.14023

[8] Postnikov, Alexander; Stanley, Richard P. Chains in the Bruhat order, J. Algebr. Comb., Volume 29 (2009) no. 2, pp. 133-174 | Article | MR 2475632 | Zbl 1238.14036

[9] Stembridge, John R. A weighted enumeration of maximal chains in the Bruhat order, J. Algebr. Comb., Volume 15 (2002) no. 3, pp. 291-301 | Article | MR 1900629 | Zbl 1008.20037


text:
# Math Help - Density Question

1. ## Density Question

1) Assume that (X,Y) has the following density function
f(x,y) = 2e^-(x+y) when 0 < x < y
a) Find the marginal density function fx(x) and fy(y)
b) Find the probability that P (Y < 2X)
c) Find P(Y < 1 given X < 1)
d) Find P(Y < 1 given X = 1/2). Also the E(Y given X=1/2).

2. a) $f_X(x)=2e^{-x}\int_x^{\infty}e^{-y}dy$ and $f_Y(y)=2e^{-y}\int_0^ye^{-x}dx$

b) Draw and integrate

c) Use $P(A|B)={P(AB)\over P(B)}$

d) Find f(y|x) and integrate.

3. For b), what do I draw?

For c), isnt it P(A union B)/ P(B)? And how do I know what something like P(B) is? Integrate from 0 to 1 with X? Not exactly sure what to ask, but I'm still confused.

And for d), for the expectation part, do I just integrate with y * f(Y given x)?

4. Originally Posted by Janu42
For b), what do I draw? Mr F says: Integrate f(x, y) over the region that is under the line y = 2x but above the line y = 0 (that is, the x-axis).

For c), isnt it P(A union B)/ P(B)? Mr F says: No it's not. Did you look in your class notes at all. It's intersection (which is what matheagle's notation says) not union.

And how do I know what something like P(B) is? Integrate from 0 to 1 with X? Mr F says: Yes. Use the marginal density function.

Not exactly sure what to ask, but I'm still confused.

And for d), for the expectation part, do I just integrate with y * f(Y given x)? Mr F says: What do your class notes say to do?
..

5. Originally Posted by mr fantastic
..

Sorry, yeah I meant intersection, but OK. I was just confused because it says AB and doesn't have the intersection symbol but I get it thanks.


text:
# Classification on multivariate time series

My dataset:

• 121 individuals characterized by a categorical variable let’s say Y (so 121 values of Y {low, medium, high})

• for each individual, I have 5 time series, let’s say $X_1$, $X_2$, $X_3$, $X_4$, $X_5$.

• each time series contains 6000 points.

All the time series increase over time, with abrupt changes, and end with a plateau.

I want to build a classification model to understand which time series (or features of the time series, like abrupt changes, or combination of these features) explain and then predict the best the variable Y.

I am not used to work with time series, and I have found that the "Time series" analysis models are mostly around forecasting from existing data, and so I spent time looking for a clear procedure explaining how to handle this type of data for this specific purpose without much success.

What I have tested (see below) is always based on one time serie (matrix of 121 * 6000) at once since I do not understand how to deal with several time series:

• unsupervised clustering of each time serie (hclust and kmeans): in order to see if we retrieve the groups of Y {low, medium, large}
• a Discrete Wavelet Transform (DWT) to extract features and application of a decision tree on the extracted features. Here I do not understand how to interpret the features (wavelet coefficients and scaling coefficient) regarding to the initial data.

Please see the image below to understand data


text:
Expected area of a random triangle with fixed perimeter

I'm trying to calculate the expected area of a random triangle with a fixed perimeter of 1.

My initial plan was to create an ellipse where one point on the ellipse is moved around and the triangle that is formed with the foci as the two other vertices (which would have a fixed perimeter) would have all the varying areas. But then I realized that I wouldn't account for ALL triangles using that method. For example, an equilateral triangle with side lengths one third would not be included.

Can anyone suggest how to solve this problem? Thanks.

• How is the triangle randomly selected? Perhaps you could choose the length of each side uniformly on the remaining perimeter – John Fernley Jul 25 '14 at 13:11
• I think there is a close relationship with a frequently asked question here and at sci.math, about the probability that a "broken stick" will result in three pieces that form a triangle. – hardmath Jul 25 '14 at 13:12
• Searching here at Math.SE for "broken stick triangle" will discover several related posts, posing various ways (or emphasizing the importance of varying ways) to choose the lengths. – hardmath Jul 25 '14 at 13:25
• Use the broken stick triangle as mentioned + the Heron formula – Matt B. Jul 25 '14 at 13:29
• @MattB. It is not so straightforward, since the broken stick problem just gives the expected values of the lenghts of the shortest, middle and longest side, but you cannot compute the expected value of the area by just applying the Heron's formula to these three expected values. – Jack D'Aurizio Jul 25 '14 at 13:34

Since the Heron's formula gives: $$A=\frac{1}{4}\sqrt{(a^2+b^2+c^2)^2-2(a^4+b^4+c^4)},$$ assuming that the random choice is made accordingly to the broken stick model (notice that not every choice for the side lengths satisfies the triangle inequality, hence for such cases we set the area as zero): $$\begin{eqnarray*}\mathbb{E}[A]&=&\frac{1}{2}\int_{0}^{1}\int_{x}^{1}\sqrt{\max\left[0,(x^2+(y-x)^2+(1-y)^2)^2-2(x^4+(y-x)^4+(1-y)^4)\right]}\,dy\,dx\\&=&0.00747998\ldots\end{eqnarray*}$$ A random model that makes more sense is to choice a random point (with respect to the uniform measure) on the set $T=\{(u,v,w):u,v,w\geq 0, u+v+w=\frac{1}{2}\}$, then pick the side lengths as $a=v+w,b=u+w,c=u+v$. In such a way the triangle inequality is always fullfilled and the Heron's formula gives simply: $$A = \sqrt{\frac{uvw}{2}},$$ so: $$\mathbb{E}[A]=\frac{8}{\sqrt{6}}\int_{T}\sqrt{uvw}\,d\mu=\frac{1}{\sqrt{3}}\int_{0}^{\pi/2}\int_{0}^{\pi/2}\sin^5\theta \cos^2\theta\sin^4\phi\, d\theta \,d\phi=\frac{\pi}{70\sqrt{3}}.$$

• I have a different solution, not sure why we don't have the same numbers. – Matt B. Jul 25 '14 at 15:04
• I believed this depends on the fact that you manually imposed that the sum of two lengths must be greater than the third one, but not imposed that their difference must be smaller than the third side. Anyway, this is just accounted by the Heron's formula. Three positive sides satisfy the triangle inequality if and only if the contribute they give under the square root is positive. This is the reason why I considered $\sqrt{\max{[0,\ldots]}}$. – Jack D'Aurizio Jul 25 '14 at 15:09
• And you did not take into account cases like $u=1/5,v=2/5$. – Jack D'Aurizio Jul 25 '14 at 15:11
• I did, by multiplying by 2, as $u,v$ play a symmetric role. It is not directly obvious to me that the Heron's formula will have a positive contribution simply from sides satisfying the triangle inequality (would need to think about it). – Matt B. Jul 25 '14 at 16:07
• One interpretation of the problem excludes outcomes where the side lengths fail the triangle inequality, since the statement asks about "a random triangle with a fixed perimeter of 1". Including the failed triangles as having zero area will bias the expected area downward, but by a factor corresponding to the known likelihood of a broken stick forming a triangle. – hardmath Jul 25 '14 at 16:46

My solution:

Let $U,V \sim \mathcal{U}[0,1]$ be 2 sides of your triangle, and $1-u-v$ being the other one (as by definition they add up to 1).

Not every pair $(u,v)$ is acceptable, as they need to form a triangle. The condition for that is that the biggest vertex is smaller than the sum of the two other sides, that is:

$$\max(u,v,1-u-v) > 1 - \max(u,v,1-u-v) \Leftrightarrow \max(u,v,1-u-v) < \frac{1}{2}$$

The quantity you're after here is the area, so using Heron's formula, you're looking at:

$\int\int_{(u,v)\in[0,1]^2} \sqrt{0.5(0.5-u)(0.5-v)(u+v-0.5)}\chi(\max(u,v,1-u-v) < \frac{1}{2}) dudv \ = \int_{u=0}^1\int_{v=0}^u 2\sqrt{0.5(0.5-u)(0.5-v)(u+v-0.5)}\chi(\max(u,1-u-v) < \frac{1}{2}) dudv \\ = \int_{u=0}^\frac{1}{2}\int_{v=0}^u 2\sqrt{0.5(0.5-u)(0.5-v)(u+v-0.5)}\chi(1-u-v < \frac{1}{2})\chi(v < u)\chi(u < \frac{1}{2}) dudv \\ = \int_{u=\frac{1}{4}}^\frac{1}{2}\int_{v=\frac{1}{2}-u}^u 2\sqrt{0.5(0.5-u)(0.5-v)(u+v-0.5)} dudv \\ =0.00586765$

Using the feedback given in the comments, I've got a proposal for a solution. I must say that I am not very certain of whether it is correct or not.

Let $0<x<y<1$ be the points at which the "stick is broken", and so $x, y-x, 1-y$ are the lengths of the three segments. For a triangle to be formed, the sum of any two sides must be greater than the third side. Therefore we get the following inequalities: $$x+(y-x)>1-y \\ (y-x)+(1-y)>x \\ (1-y)+x>y-x$$ Plotting these on a coordinate system gives a triangular region with vertices $(0, 1/2), (1/2, 1/2), (1/2, 1)$. So any pair $(x, y)$ contained within that region results in a triangle of perimeter 1. I parameterize these pairs: $$\left(\frac{a_1}{2}, \frac{1+a_2}{2}\right),$$ for $0<a_2<a_1<1$. Now these can be plugged in Heron's formula (and simplified): $$A(a_1, a_2)=\frac{1}{4}\sqrt{(1-a_1)(a_1-a_2)(a_2)}$$ Taking the integral for the average value: $$E(A)=\frac{1}{A(R)}\int_0^1\!\!\!\int_0^{a_1}A(a_1, a_2)\,da_2da_1=0.0299199$$ I'm uncertain about whether the distribution is unbiased and uniform. Anyone who can verify this?