text:
View Single Post
2018-03-20, 14:59   #353
kriesel

"TF79LL86GIMPS96gpu17"
Mar 2017
US midwest

116348 Posts

Quote:
 Originally Posted by SELROC What is the use of the -step argument in gpuOwl ?
It seems to me after a quick look at the source, the ability for the user to override the automatic program behavior, with a specified constant step count between Gerbicz checks. I interpret this to mean -step requires a step count parameter in the range 1000 to 500000 that are 1, 2, or 5 times a power of ten; 1000 or 2000 or 5000 or 10000 ... 500000. Or perhaps larger also.

args.h excerpt:
Code:
else if (!strcmp(arg, "-step")) {
if (i < argc - 1) {
step = atoi(argv[++i]);
if (step <= 0 || step % 1000) {
log("invalid -step '%s', must be positive and multiple of 1000.\n", argv[i]);
return false;
}
} else {
log("-step expects <N> argument\n");
return false;
}
}
gpuowl.cpp excerpt:
Code:
int autoStep(int nIters, int nErrors, int blockSize) {
int x = nIters / (100 + nErrors * 1000);
int steps[] = {1, 2, 5, 10, 20, 50, 100, 200, 500};
for (int i = 0; i < size(steps) - 1; ++i) {
if (x < steps[i] * steps[i + 1]) { return std::max(steps[i] * 1000, blockSize * 2); }
}
return steps[size(steps) - 1] * 1000;
}
gpuowl.cpp again:
Code:
  auto getCheckStep = [forceStep = args.step, startK = k, startErrors = nErrors, blockSize](int currentK, int currentErrors) {
return forceStep ? forceStep : autoStep(currentK - startK, currentErrors - startErrors, blockSize);
};
Two use cases I've run into are:
1) Hardware and software are very stable, exponent is far from an fft length limit, overhead of starting at small step sizes is not necessary, run a large step size from the start. (This case might benefit from adaptive step size after starting large if an error occurs during the run. Also user settable number of consecutive retries if an error occurs)
2) Repeatable error has occurred, such as the exponent is slightly too large for the fft length, I'd like to determine as finely as possible, at what iteration it occurs, with a rerun from last known good save file, using minimum step size until encountering the error again. (This case might benefit from a user set limit of retries 0 - ~9) before giving up on the exponent and starting or resuming the next worktodo entry.)

Last fiddled with by kriesel on 2018-03-20 at 15:05


text:
# How to simplify policy gradient theoram to $E_{\pi}[G_t \frac{\nabla_{\theta}\pi(a|S_t,\theta)}{\pi(a|S_t,\theta)}]$?

In "Introduction to Reinforcement Learning" (Richard Sutton) section 13.3(Reinforce algorithm) they have the following equation:

\begin{align} \nabla_{\theta}J &\propto \sum_s \mu(s) \sum_a q_{\pi}(s,a)\nabla_{\theta}\pi(a|s,\theta) \\ &= E_{\pi}[\sum_a q_{\pi}(S_t,a) \nabla_{\theta}\pi(a|S_t,\theta)] \tag{1}\label{1} \end{align} But in my opinion equation 1 should be expectation over state distribution: $$E_{\mu}[\sum_a q_{\pi}(S_t,a) \nabla_{\theta}\pi(a|S_t,\theta)]$$ If I am right here then the rest of the lines follows like this: \begin{align} \nabla_{\theta}J &= E_{\mu}[\sum_a q_{\pi}(S_t,a) \nabla_{\theta}\pi(a|S_t,\theta)] \\ &= E_{\mu}[\sum_a \pi(a|S_t,\theta) q_{\pi}(S_t,a) \frac{\nabla_{\theta}\pi(a|S_t,\theta)}{\pi(a|S_t,\theta)}] \\ &= E_{\mu}[E_{\pi}[q_{\pi}(S_t,A_t)\frac{\nabla_{\theta}\pi(A_t|S_t,\theta)}{\pi(A_t|s,\theta)}]]\\ &= E_{\mu}[E_{\pi}[G_t\frac{\nabla_{\theta}\pi(a|S_t,\theta)}{\pi(a|S_t,\theta)}]] \end{align} Now the final update rule using stochastic gradient descent will be: $$\triangle \theta = \alpha E_{\pi}[G_t\frac{\nabla_{\theta}\pi(A_t|S_t,\theta)}{\pi(A_t|S_t,\theta)}] \tag{2}$$ I think I am doing something wrong here because this equation 2 does not match with book also with other materials. Can anyone please show me where I am doing wrong?

• It's explained in the book literally above the equation: "Notice that the right-hand side of the policy gradient theorem is a sum over states weighted by how often the states occur under the target policy $\pi$, if $\pi$ is followed, then states will be encountered in these proportions". Mar 30 at 16:53
• Can you please explain this to me ? Mar 30 at 17:45

When the authors write go from $$\nabla_{\theta}J \propto \sum_s \mu(s) \sum_a q_{\pi}(s,a)\nabla_{\theta}\pi(a|s;\theta)\;$$ to $$\nabla_{\theta}J = E_{\pi}\left[\sum_a q_{\pi}(S_t,a) \nabla_{\theta}\pi(a|S_t;\theta)\right]\;$$ they are simply taking an expectation where the only random variable is the state $$S_t$$. This is because, as they say in the book, the Policy Gradient Theorem is a sum over a state distribution, therefore it can be written as an expectation. The expectation is over the states wrt the state distribution; the $$\pi$$ subscript here does not mean we are taking expectation with respect to the action policy $$\pi$$, they use the notation $$\pi$$ to emphasise that the state distribution is induced by the current policy $$\pi$$ -- this is what makes REINFORCE an on-policy algorithm because the state distribution with which we take the expectation must come from the current policy $$\pi$$, not some arbitrary distribution.

Now, as you don't seem to understand how they go from this to the Stochastic Gradient Ascent (SGA) (NOT descent as you keep referring to it as) update rule in the book, I will explain further. As you rightly say we can go from my previous equation to the following $$\nabla_{\theta}J = E_{\pi}\left[G_t \nabla_{\theta}\log\pi(A_t|S_t;\theta)\right]\;$$ by doing some re-arranging and noting that $$G_t$$ is an unbiased estimate of $$q_\pi(s, a)$$ when taking expectation over the actions and states. Now, this expectation we have is with respect to the actions and states; your first mistake is that you have made it an expectation over the actions without signifying that the action is now a random variable (maybe you could look up expectations and random variables to understand really what this means).

Your second mistake is by not seeing how you can use this gradient to optimise the policy parameters. As we want to maximise this objective we want to perform SGA to it; that is we want to perform $$\theta = \theta + \alpha \nabla_\theta J\;;$$ but $$\nabla_\theta J$$ is an expectation. It would be costly to evaluate this at every single state-action pair that we see in an episode, thus we only perform SGA for one state-action tuple at a time. Now, you might think that this is not correct, but it is in fact an unbiased estimate as we will sample lots of state-action pairs; this kind of estimation is known as Monte Carlo Sampling. Therefore, we can write our REINFORCE update rule as

$$\theta = \theta + \alpha G_t \nabla_\theta \log \pi(A_t | S_t; \theta)\;;$$

which is exactly the update rule in the book.

Note that at the start of the chapter in Sutton and Barto they also make it clear that we wish to perform $$\theta = \theta + \alpha \hat{\nabla J(\theta)} \;;$$ where $$\hat{\nabla J(\theta)}$$ is a stochastic estimate whose expectation approximates the true gradient; this is exactly what we are doing, $$G_t \nabla_\theta \log \pi(A_t | S_t; \theta)$$ is our stochastic estimate.

• Comments are not for extended discussion; this conversation has been moved to chat.
– nbro
Mar 31 at 12:13

format: plain


text:
Stock-Flow Consistent (SFC) model generation

## Introduction

Creation and solution of stock-flow consistent (SFC) models. Currently under construction.

At present, the module sfc_models.iterative_machie_generator.py imports a text block of equations, and then writes a python module that implements that system of equations.

Although such functionality is nice, the objective is to build modules that generate the systems of equations. That is, the user will specify the high-level sector description of the economy (which may include multiple countries), and the high-level description will be parsed to generate the low-level equations.

For another take on SFC models in Python see: https://github.com/kennt/monetary-economics

Developed under Python 3.4, and is compatible with Python 2.7.

## Sub-package: gl_book

The subpackage sfc_models.gl_book contains code to generate models from the text “Monetary Economics” by Wynne Godley and Marc Lavoie. Since the ultimate objective is to generate the equations algorithmically, these models are only used for comparative purposes.

The previously mentioned GitHub package by “kennt” consists of well-documented solutions of those models in IPython notebooks.

## Solution Method

The single-period solution of a SFC model relies on market-clearing (not necessarily relying on price adjustments, unlike mainstream models). Market clearing relies on solving many simultaneous equations.

At present, the machine-generated code uses an iterative approach to solve x = f(x) (where x is a vector). We just passing an initial guess vector trhough f(x) and hope it converges.

This works for the simple models tested so far. The objective is to augment this by a brute-force search technique that relies upon economic intuition to reduce the dimension of the search space.

## Dependencies

• matplotlib: for plots in examples. (May be required later.)

Documentation will be placed in the “docs” directory.

Examples are in the examples sub-package. Currently, in the form of scripts in examples.scripts; will develop a deployment function later.

The test coverage on the “master” branch is 100%, and the objective is to hold that standard. (There are some sections that are effectively untestable, and there appears to be issues with some lines that are undoubtedly hit as being marked as unreached; they have been eliminated with:: # pragma: no cover

## Change Log

• Version 0.2 (Should have been 0.2.0 - oops) First deployment of package to PyPi. Base functionality operational, little documentation.

• Earlier versions: Only available as source on Github.

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

## Project details

Uploaded py2 py3


text:
# Schedule for: 16w5112 - Theoretical and Computational Aspects of Nonlinear Surface Waves

Beginning on Sunday, October 30 and ending Friday November 4, 2016

All times in Banff, Alberta time, MDT (UTC-6).

Sunday, October 30
16:00 - 17:30 Check-in begins at 16:00 on Sunday and is open 24 hours (Front Desk - Professional Development Centre)
17:30 - 19:30 Dinner
A buffet dinner is served daily between 5:30pm and 7:30pm in the Vistas Dining Room, the top floor of the Sally Borden Building.
(Vistas Dining Room)
20:00 - 22:00 Informal gathering (Corbett Hall Lounge (CH 2110))
Monday, October 31
07:00 - 08:45 Breakfast
Breakfast is served daily between 7 and 9am in the Vistas Dining Room, the top floor of the Sally Borden Building.
(Vistas Dining Room)
08:45 - 09:00 Introduction and Welcome by BIRS Station Manager (TCPL 201)
09:00 - 09:30 Jerry Bona: Higher-order Hamiltonian Models for Water Waves
Higher-order models for unidirectional propagation of long-crested water waves will be introduced and their analysis sketched.
(TCPL 201)
09:30 - 10:00 Daniel Ratliff: The Emergence of Higher Order Dispersion from Periodic Waves
Following the method of Bridges (2013, PRSA), it is demonstrated how one may derive PDEs with fifth order dispersion from periodic waves (and, in general, relative equilibrium). Many of the coefficients of the emerging nonlinear approximations are directly related to the system's conservation laws, and those of the dispersive terms are tied to a Jordan chain analysis. Examples illustrating how the theory applies will also be discussed.
(TCPL 201)
10:00 - 10:30 Coffee Break (TCPL Foyer)
10:30 - 11:00 Walter Craig: Hamiltonians and normal forms for water waves
It was shown by V. E. Zakharov that the equations for water waves can be posed as a Hamiltonian dynamical system, and that the equilibrium solution is an elliptic stationary point. This talk will discuss two aspects of the water wave equations in this context. Firstly, we generalize the formulation of Zakharov to include overturning wave profiles, answering a question posed by T. Nishida. Secondly, we will discuss the question of Birkhoff normal forms for the water waves equations in the setting of spatially periodic solutions, including the function space mapping properties of these transformations.
(TCPL 201)
11:00 - 11:30 Mariana Haragus: Counting unstable eigenvalues in Hamiltonian spectral problems via commuting operators
We present a general counting result for the unstable eigenvalues of linear operators of the form JL in which J and L are skew- and self-adjoint operators, respectively. Assuming that there exists a self-adjoint operator K such that the operators JL and JK commute, we prove that the number of unstable eigenvalues of JL is bounded by the number of nonpositive eigenvalues of K. As an application, we discuss the transverse stability of one-dimensional periodic traveling waves in the classical KP-II (Kadomtsev-Petviashvili) equation.
(TCPL 201)
11:30 - 13:00 Lunch (Vistas Dining Room)
13:00 - 14:00 Guided Tour of The Banff Centre
Meet in the Corbett Hall Lounge for a guided tour of The Banff Centre campus.
(Corbett Hall Lounge (CH 2110))
14:00 - 14:20 Group Photo
Meet in foyer of TCPL to participate in the BIRS group photo. The photograph will be taken outdoors, so dress appropriately for the weather. Please don't be late, or you might not be in the official group photo!
(TCPL Foyer)
14:30 - 15:00 Alexander Korotkevich: Circular instability of a standing surface wave: numerical simulation and wavetank experiment
It is shown that standing wave is unstable if we consider four wave nonlinear processes. We compare numerical simulation of instability of weakly nonlinear standing waves on the surface of deep fluid in the framework of the primordial dynamical equations and in a laboratory wave tank experiment. The instability offers a new approach for generation of nearly isotropic spectrum using parametric excitation. Direct measurements of spacial Fourier spectrum confirm existence of the instability in a real life conditions for gravity-capillary surface waves. This is a joint work with Sergei Lukaschuk (The University of Hull, UK).
(TCPL 201)
15:00 - 15:30 Coffee Break (TCPL Foyer)
15:30 - 16:00 Emilian Parau: Stability of capillary waves on fluid sheets
The linear stability of finite-amplitude capillary waves on inviscid sheets of fluid is investigated. Superharmonic and subharmonic perturbations are considered and a conformal mapping technique is used. The instability results are also checked by time integration of the fully nonlinear unsteady equations. This is joint work with Mark Blyth (UEA).
(TCPL 201)
16:00 - 16:30 Jean-Marc Van-den-Broeck: A numerical investigation of non-symmetric nonlinear water waves
Nonlinear waves travelling at a constant velocity at the surface of a fluid of finite depth are considered. The fluid is assumed to be incompressible and inviscid and the flow to be irrotational. Gravity and surface tension are taken into account. Both two and three dimensional waves are studied. Classical solutions usually assume that the waves are symmetric. We show that there are in addition an infinite number of branches of non-symmetric waves. These include periodic waves, solitary waves and generalised solitary waves. As time permits extensions to hydroelastic waves will be presented.
(TCPL 201)
16:30 - 17:00 Christian Klein: Multidomain spectral method for Schrödinger equations
A multidomain spectral method with compactified exterior domains combined with stable second and fourth order time integrators is presented for Schrödinger equations. The numerical approach allows high precision numerical studies of solutions on the whole real line or in higher dimensions. At examples for the linear and cubic nonlinear Schrödinger equation, this code is compared to transparent boundary conditions and perfectly matched layers approaches. The code can deal with asymptotically non vanishing solutions as the Peregrine breather being discussed as a model for rogue waves. It is shown that the Peregrine breather can be numerically propagated with essentially machine precision, and that localized perturbations of this solution can be studied
(TCPL 201)
17:00 - 17:30 Katie Oliveras: Relationships between pressure, bathymetry, and wave-height
A new method is proposed to relate the pressure at the bottom of a fluid, the shape of the bathymetry, and the surface elevation of a wave for steady flow or traveling waves. Given a measurement of any one of these physical quantities (pressure, bathymetry, or surface elevation), a numerical representation of the other two quantities is obtained via a nonlocal nonlinear equation obtained from the Euler formulation of the water-wave problem without approximation. From this new equation, a variety of different asymptotic formulas are derived. The nonlocal equation and the asymptotic formulas are compared with both numerical data and physical experiments. This is joint work with Vishal Vasan and Daniel Ferguson.
(TCPL 201)
17:30 - 19:30 Dinner
A buffet dinner is served daily between 5:30pm and 7:30pm in the Vistas Dining Room, the top floor of the Sally Borden Building.
(Vistas Dining Room)
Tuesday, November 1
07:00 - 09:00 Breakfast (Vistas Dining Room)
09:00 - 09:30 Sijue Wu: On the Motion of a Self-Gravitating Incompressible Fluid with Free Boundary
We consider the motion of the interface separating a vacuum from an inviscid, incompressible, and irrotational fluid subject to self-gravitational force and neglecting surface tension in two space dimensions. We show that for smooth data which are size $\epsilon$ perturbations of an equilibrium state, the solution exists and remains smooth for time of at least $O(\epsilon^{-2})$. This should be compared with the lifespan $O(\epsilon^{-1})$ provided by local well-posedness. The key to the proof is to find a nonlinear transformation of the unknown function and a coordinate change, such that the equation for the new unknown in the new coordinate system has no quadratic nonlinear terms. This is a joint work with Lydia Bieri, Shuang Miao and Sohrab Shahshahani.
(TCPL 201)
09:30 - 10:00 Mihaela Ifrim: Constant vorticity water waves
The talk is concerned with the incompressible, infinite depth water wave equation in two space dimensions, with gravity and constant vorticity but with no surface tension. We consider this problem expressed in position-velocity potential holomorphic coordinates, and prove local well-posedness for large data, as well as cubic lifespan bounds for small data solutions.
(TCPL 201)
10:00 - 10:30 Coffee Break (TCPL Foyer)
10:30 - 11:00 Daniel Tataru: Long time solutions for finite bottom gravity waves
I will provide an overview of recent work, joint with Benjamin Harrop-Griffiths and Mihaela Ifrim, concerning enhanced lifespan bounds for small data gravity waves in the presence of a flat bottom. This work is based on two key ideas, (i) the use of holomorphic coordinates, and (ii) our modified energy method, a quasilinear alternative to normal forms.
(TCPL 201)
11:00 - 11:30 Steve Shkoller: Nonuniqueness of weak solutions to the SQG equation
We prove that weak solutions of the inviscid surface quasi-geostrophic (SQG) equation are not unique, thereby answering an open problem posed by De Lellis and Szekelihidi. Moreover, we also show that weak solutions of the dissipative SQG equation are not unique, even if the fractional dissipation is stronger than the square root of the Laplacian. This is joint work with T. Buckmaster and V. Vicol.
(TCPL 201)
11:30 - 13:30 Lunch (Vistas Dining Room)
13:30 - 14:00 Henrik Kalisch: On Existence and Uniqueness of Singular Solutions for Systems of Conservation Laws
Existence and admissibility of delta-shock solutions is discussed for hyperbolic systems of conservation laws. One of the systems discussed is fully nonlinear, and does not admit a classical Lax-admissible solution to certain Riemann problems. By introducing complex-valued corrections in the framework of the weak asymptotic method, we show that a compressive delta-shock wave solution resolves such Riemann problems. By letting the approximation parameter tend to zero, the corrections become real valued and the resulting distributions fit into a generalized concept of singular solutions [V. G. Danilov and V. M. Shelkovich, Dynamics of propagation and interaction of delta-shock waves in hyperbolic systems, J. Differential Equations 211 (2005), 333-381]. In this framework, it can be shown that every 2x2 system of conservation laws admits delta-shock solutions. As an example, it is shown that the combination of discontinuous free-surface solutions and bottom step transitions naturally leads to singular solutions featuring Dirac delta distributions in the context of shallow-water flows.
(TCPL 201)
14:00 - 14:30 John Carter: Frequency Downshifting in a Viscous Fluid
Frequency downshift, i.e. a shift in the spectral peak to a lower frequency, in a train of nearly monochromatic gravity waves was first reported by Lake et al. (1977). Even though it is generally agreed upon that frequency downshifting (FD) is related to the Benjamin-Feir instability and many physical phenomena (including wave breaking and wind) have been proposed as mechanisms for FD, its precise cause remains an open question. Dias et al. (2008) added a viscous correction to the Euler equations and derived the dissipative NLS equation (DNLS). In this talk, we introduce a higher-order generalization of the DNLS equation, which we call the viscous Dysthe equation. We outline the derivation of this new equation and present many of its properties. We establish that it predicts FD in both the spectral mean and spectral peak senses. Finally, we demonstrate that predictions obtained from the viscous Dysthe equation accurately model data from experiments in which frequency downshift occurred.
(TCPL 201)
14:30 - 15:00 Vera Mikyoung Hur: Wave breaking and modulational instability in full-dispersion shallow water models
In the 1960s, Benjamin and Feir, and Whitham, discovered that a Stokes wave would be unstable to long wavelength perturbations, provided that (the carrier wave number) $\times$ (the undisturbed water depth) $> 1.363....$ In the 1990s, Bridges and Mielke studied the corresponding spectral instability in a rigorous manner. But it leaves some important issues open, such as the spectrum away from the origin. The governing equations of the water wave problem are complicated. One may resort to simple approximate models to gain insights. I will begin by Whitham's shallow water equation and the wave breaking conjecture, and move to the modulational instability index for small-amplitude periodic traveling waves, the effects of surface tension and constant vorticity. I will then discuss higher order corrections, extension to bidirectional propagation and two-dimensional surfaces. This is based on joint works with Jared Bronski (Illinois), Mat Johnson (Kansas), Ashish Pandey (Illinois), and Leeds Tao (UC Riverside).
(TCPL 201)
15:00 - 15:30 Coffee Break (TCPL Foyer)
15:30 - 16:00 Rosa Vargas-Magana: A Whitham-Boussinesq long-wave model for variable topography
We study the propagation of water waves in a channel of variable depth using the long-wave asymptotic regime. We use the Hamiltonian formulation of the problem in which the non-local Dirichlet-Neumann (DN) operator appears explicitly in the Hamiltonian and due to the complexity of the expressions of the asymptotic expansion associated with this operator in the presence of a non-trivial bottom topography. We perform an ad-hoc modification of these terms using a pseudo differential operator (PDO) associated with the bottom topography. In this talk we propose a Whitham-Boussinesq model for bidirectional wave propagation in shallow water that involves a PDO that consider explicitly the expression for the depth profile. The model generalizes the Boussinesq system, as it includes the exact dispersion relation in the case of constant depth. We will introduce an accurate and efficient numerical method that has been developed to compute this PDO. We present the results for the normal modes and eigen-frequencies of the linearized problem for families of different topographies. We also present some experiments of the evolution of some initial wave profiles over different topographies. Due to the ad-hoc nature of this simplified model we present some comparisons between the full expression of the first term of the asymptotic expansion of the DN operator given by Craig, Guyenne, Nicholls, and Sulem and our PDO approach for some specific topographies.
(TCPL 201)
16:00 - 16:30 Mats Ehrnstrom: On waves of greatest height in fully dispersive equations
Starting from the nonlocal Whitham equation with its fully dispersive linear operator, we consider the existence of periodic traveling waves that are not small, albeit connected to the line of vanishing solutions. Of particular interest is the existence of a highest, $C^{1/2}$-cusped, traveling wave solution, which is obtained as a limiting case at the end of the main bifurcation branch of $P$-periodic traveling wave solutions. We prove that this regularity is optimal. Given that the Euler equations admits a highest wave that is not cusped, but Lipschitz continuous, it is an interesting question whether a bidirectional Whitham equation, which carries the full two-way dispersion relation from the Euler equations, could encompass a Lipschitz wave as well. Due to reasons to be explained in the talk, it however turns out that the highest wave for the bidirectional Whitham equation, which we prove to exist, is not Lipschitz --- nor is its optimal regularity described by Hölder or Zygmund spaces. We characterize its behaviour near the wave crest. At the end we outline the first steps towards a more general theory. Our interest is a somewhat general large-amplitude theory for nonlinear dispersive equations. The talk is based on joint works with E. Wahlén, Lund, M. A. Johnson and K. M. Claassen, both Kansas.
(TCPL 201)
16:30 - 17:00 Gabriele Bruell: On symmetry and decay of traveling wave solutions to the Whitham equation
The Whitham equation is a nonlocal, nonlinear dispersive wave equation introduced by G. B. Whitham as an alternative wave model equation to the Korteweg-de Vries equation, describing the wave motion at the surface on shallow water. The existence of supercritical solitary wave solutions to the Whitham equation has been shown by Ehrnström, Groves, and Wahlén in 2012. We prove that any such solution decays exponentially, is symmetric and has exactly one crest. Moreover, the structure of the Whitham equation allows to conclude that conversely any classical, symmetric solution constitutes a traveling wave. In fact, the latter result holds true for a large class of partial differential equations sharing a certain structure.
(TCPL 201)
17:00 - 17:30 Dag Nillson: Solitary waves of a class of Green-Naghdi type systems
We consider a class of Green-Naghdi type systems and prove the existence of solitary wave solutions. The solutions are identifed as critical points of a scalar functional and we are able to show that there exist minimizers of this functional, under certain constraints. A key component of the proof is the use of the concentration compactness principle. The talk is based upon a work in progress with Erik Wahlen (Lund University) and Vincent Duchene (University of Rennes).
(TCPL 201)
17:30 - 19:30 Dinner (Vistas Dining Room)
Wednesday, November 2
07:00 - 09:00 Breakfast (Vistas Dining Room)
09:00 - 09:30 John Grue: Ship generated tsunamis: linearity vs. nonlinearity
Very long waves running ahead of ships is a recent phenomenon in the Oslofjord in Norway. The waves are triggered when the new very large and relatively fast cruiseferries are running across significant depth changes in the shallow fjord. An asymptotic linear analysis expressing the upstream wave field in terms of a pressure impulse at the depth change is complemented by fully dispersive calculations of the upstream waves. At very shallow positions the local ship speed becomes critical where the effect of nonlinearity is analyzed. A wave length of 700 m, wave height at the shore of 1 m, average depth of the fjord of 35 m, depth change similar to the average depth, ship length of 200 m, moving at subcritical speed, are typical characteristics.
(TCPL 201)
09:30 - 10:00 Onno Bokhove: Variational coupling of nonlinear water wave and ship dynamics: continuum and finite element modelling
We report on the mathematical and numerical modelling of (non)linear ship motion in (non)linear water waves. We derive a coupled model for the wave-ship dynamics following a variational methodology, in order to ensure zero numerical damping which is important for wave propagation. The final system of evolution equations comprises the classical water-wave equations for incompressible and irrotational waves, and a set of equations describing the dynamics of the ship. The novelty in our model is in the presence of a physical restriction on the water height under the ship, which is enforced through an inequality constraint via a Lagrange multiplier. The model is solved numerically using a variational (dis)continuous Galerkin finite element method with special, new and robust time integration methods. Here we aim to show numerical results for the dynamics of the coupled system in a hierarchy of increasing complexity: linear water-wave and linear ship dynamics, and potentially also fully coupled (non)linear water-wave and nonlinear ship dynamics.
(TCPL 201)
10:00 - 10:30 Coffee Break (TCPL Foyer)
10:30 - 11:00 David Lannes: On the dynamics of floating structures
The goal of this talk is to derive some equations describing the interaction of a floating solid structure and the surface of a perfect fluid. This is a double free boundary problem since in addition to the water waves problem (determining the free boundary of the fluid region), one has to find the evolution of the contact line between the solid and the surface of the water. The so-called floating body problem has been studied so far as a three-dimensional problem. Our first goal is to reduce it to a two-dimensional problem that takes the form of a coupled compressible-incompressible system. We will also show that the hydrodynamic forces acting on the solid can be partly put under the form of an added mass-inertia matrix, which turns out to be affected by the dispersive terms of the equations.
(TCPL 201)
11:00 - 11:30 Harry Bingham: Stable, high-order finite difference methods for nonlinear wave-structure interaction in a moving reference frame
This talk will focus on high-order finite difference methods for solving potential flow approximations of nonlinear surface waves interacting with marine structures. Of special interest is the loading and wave-induced response of sailing ships, where it is convenient to work in a reference frame which is translating at constant speed. This introduces non-linear convective terms into the free-surface boundary conditions which are found to require nonlinear numerical schemes to achieve robust and stable solutions. The work builds on the basic numerical solution strategy described in [1, 2]. Inspired by work reviewed for example by Shu [4], we have developed a simplified version of the Weighted Essentially Non-Oscillatory (WENO) scheme which is only slightly more diffusive than the equivalent order centered finite difference scheme. The equations are then put into Hamilton-Jacobi form, and the WENO convective approximations are combined using the Roe-Fix numerical flux proposed by Shu & Osher [5]. In contrast to a simple upwinding strategy, this approach is found to give accurate and stable solutions for all combinations of wave celerity and ship forward speed. To introduce the ship geometry into the numerical solution, we have developed an Immersed Boundary Method based on Weighted Least-Squares difference approximations. This scheme will be described and some preliminary results will be presented. Challenges with respect to tracking the body-free surface intersection line, and treating wave-breaking in a rational way will be raised for discussion.

References:
1. H. B. Bingham and H. Zhang. On the accuracy of finite difference solutions for nonlinear water waves. J. Engineering Math., 58:211-228, 2007.
2. A. P. Engsig-Karup, H. B. Bingham, and O. Lindberg. An efficient flexible-order model for 3D nonlinear water waves. J. Comput. Phys., 228:2100-2118, 2009.
3. A. P. Engsig-Karup, H. B. Bingham, O. Lindberg, and B. T. Paulsen. OceanWave3D; an efficient coastal engineering tool for nonlinear waves., 2015. https://github.com/apengsigkarup/OceanWave3D-Fortran90.
4. C.-W. Shu. High order weighted essentially non-oscillatory schemes for convection dominated problems. SIAM Review, 51(1):82-126, 2009.
5. C.-W. Shu and S. Osher. Essentially Non-Oscillatory and Weighted Essentially Non-Oscillatory Schemes for hyperbolic conservation laws. J. Comput. Phys., 77(2):439-471, 1989.
(TCPL 201)
11:30 - 13:30 Lunch (Vistas Dining Room)
13:30 - 17:30 Free Afternoon (Banff National Park)
17:30 - 19:30 Dinner (Vistas Dining Room)
Thursday, November 3
07:00 - 09:00 Breakfast (Vistas Dining Room)
09:00 - 09:30 David Ambrose: Sufficiently strong dispersion removes ill-posedness of truncated series models of water waves
We have previously, in joint work with Jerry Bona, David Nicholls, and Michael Siegel, demonstrated that truncated series models of gravity water waves exhibit ill-posedness. In joint work with Shunlian Liu, we show that the addition of sufficiently strong dispersion makes such a system well-posed. Physically, this strong dispersion can be relevant, for instance, for hydroelastic waves. The proof uses techniques of paradifferential calculus.
(TCPL 201)
09:30 - 10:00 Paul Milewski: Computational exploration of water waves in two acts. 1. Diving under rotational water waves and 2. Wave collapse for ripples.
Act 1: We consider periodic traveling waves in a flow with constant vorticity and look in detail at the internal structure of the flow, including particle paths, stagnation points and pressure fields. The results illustrate some of the known theoretical results and also point to new interesting features.

Act 2: Capillary gravity wave packets are described asymptotically by the focussing 2D NLS equation. This equation has solutions that blow up in finite time. We explore the dynamics of blowup initial data under the full Euler equations.
(TCPL 201)
10:00 - 10:30 Coffee Break (TCPL Foyer)
10:30 - 11:00 Mark Groves: Fully localised solitary gravity-capillary water waves
We consider the classical gravity-capillary water-wave problem in its usual formulation as a three-dimensional free-boundary problem for the Euler equations for a perfect fluid. A solitary wave is a solution representing a wave which moves in a fixed direction with constant speed and without change of shape; it is fully localised if its profile decays to the undisturbed state of the water in every horizontal direction. The existence of fully localised solitary waves has been predicted on the basis of simpler model equations, namely the Kadomtsev-Petviashvili (KP) equation in the case of strong surface tension and the Davey-Stewartson (DS) system in the case of weak surface tension. In this talk we confirm the existence of such waves as solutions to the full water-wave problem and give rigorous justification for the use of the model equations. This is joint work with Boris Buffoni and Erik Wahlen.
(TCPL 201)
11:00 - 11:30 Samuel Walsh: Existence and qualitative theory of stratified solitary water waves
In this talk, we will report some recent results concerning two-dimensional gravity solitary water waves with hereogeneous density. The fluid domain is assumed be bounded below by an impenetrable flat ocean bed, while the interface between the water and vacuum above is a free boundary. Our main existence result states that, for any smooth choice of upstream velocity and streamline density function, there exists a path connected set of such solutions that includes large-amplitude surface waves. Indeed, this solution set can be continued up to (but does not include) an extreme wave that possess a stagnation point. We will also discuss a number of results characterizing the qualitative features of solitary stratified waves. In part, these include bounds on the Froude number from above and below that are new even for constant density flow; an a priori bound on the velocity field and lower bound on the pressure; a proof of the nonexistence of monotone bores for stratified surface waves; and a theorem ensuring that all supercritical solitary waves of elevation have an axis of even symmetry. This is joint work with R. M. Chen and M. H. Wheeler.
(TCPL 201)
11:30 - 13:30 Lunch (Vistas Dining Room)
13:30 - 14:00 David Henry: Nonlinear water waves and wave-current interactions
This talk will examine the nonlinear water waves, and wave-current interactions, which may be prescribed by Gerstner-like exact and explicit solutions to the geophysical $\beta-$plane equations in the equatorial region. In particular, I will present recent work which highlights the role played by the typically-neglected centripetal force terms in describing such physical processes
(TCPL 201)
14:00 - 14:30 Anna Geyer: On periodic traveling waves of the Camassa-Holm equation
In this talk we are concerned with the wave length $\lambda$ of smooth periodic traveling wave solutions of the Camassa-Holm equation. The set of these solutions can be parametrized using the wave height $a$. Our main result establishes monotonicity properties of the map $a\mapsto \lambda(a)$ i.e., the wave length as a function of the wave height. We obtain the explicit bifurcation values, in terms of the parameters associated with the equation, which distinguish between the two possible qualitative behaviours of $\lambda(a)$, namely monotonicity and unimodality. The key point is to relate $\lambda(a)$ to the period function of a planar differential system with a quadratic-like first integral, and to apply a criterion which bounds the number of critical periods for this type of systems.
(TCPL 201)
14:30 - 15:00 Miles Wheeler: Global bifurcation of rotating vortex patches
We construct continuous curves of rotating vortex patch solutions to the two-dimensional Euler equations. These curves are large in that, as the parameter tends to infinity, the minimum value on the boundary of the relative angular fluid velocity becomes arbitrarily small. This is joint work with Zineb Hassainia and Nader Masmoudi.
(TCPL 201)
15:00 - 15:30 Coffee Break (TCPL Foyer)
15:30 - 16:00 Christopher Curtis: Surface and Interfacial Waves over Currents and Point-Vortices
The computation of surface and interfacial waves is a central problem in fluid mechanics. While much has been done, the effect of vorticity on surface and internal wave propagation is still poorly understood. To address this, we first look at shallow-water propagation in density stratified fluids with piecewise linear shear profiles. We show that by allowing for jumps in the shear across the interface, strong nonlinear responses can be generated resulting in phenomena like dispersive shock waves. Thus depth varying currents could play a larger role in interface dynamics than is currently understood. Second, we study the problem of collections of irrotational point vortices underneath a free fluid surface. We present a derivation of a model and numerical scheme which allows for arbitrary numbers of vortices in a shallow-water limit. While we are able to recreate much of the classical results for how surface waves form over two counter-propagating vortices, we go beyond this case and look at an example involving four vortices. Again, our approach allows for any number of vortices to be present, and this lets us provide some hint as to how underwater eddies might generate free surface waves.
(TCPL 201)
16:00 - 16:30 Guyenne Philippe: Nonlinear waves in ice sheets
This talk concerns the mathematical modeling and numerical simulation of waves in ice sheets as occurring, e.g., in polar regions. A three-dimensional Hamiltonian formulation for ice sheets deforming on top of an ideal fluid of arbitrary depth is presented and nonlinear wave solutions are examined. In certain asymptotic regimes, analytical solutions are derived and compared with fully nonlinear solutions obtained numerically by a pseudospectral method.
(TCPL 201)
16:30 - 17:00 Olga Trichtchenko: Computing Three-Dimensional Flexural-Gravity Water Waves
The goal of this work is to build on previous results by Parau et al. [1, 2, 3, 4] and produce a more efficient and accurate method for computing solutions to Euler's equations for water waves underneath an ice sheet in three dimensions. As was previously done, we solve the equations via a numerically implemented boundary integral equations method and utilize some high performance computing techniques. In this talk, we give details of the current methods and compare solutions for different models of the ice sheet. This is a joint work with Emilian Parau, Jean-Marc Vanden-Broeck and Paul Milewski.

References:
1. E. I. Parau, and J.-M. Vanden-Broeck Nonlinear two- and three-dimensional free surface flows due to moving disturbances. Eur. J. Mech. B Fluid, Vol 21 (2002), pp. 643-656.
2. E. I. Parau, J.-M. Vanden-Broeck and M. J. Cooker Three-dimensional gravity-capillary solitary waves in water of finite depth and related problems. Physics of Fluids, Vol 17 (2005), pp. 1-9.
3. E. I. Parau, J.-M. Vanden-Broeck and M. J. Cooker Nonlinear three- dimensional gravity-capillary solitary waves. J. Fluid Mech., Vol 536 (2005), pp. 99-105.
4. E. I. Parau, and J.-M. Vanden-Broeck Three-dimensional waves beneath an ice sheet due to a steadily moving pressure. Philos. Trans. R. Soc. Lond. Ser. A Math. Phys. Eng. Sci., Vol 369 (2011), pp. 2973-2988.
(TCPL 201)
17:00 - 17:30 Erik Wahlen: Variational existence and stability theory for hydroelastic solitary waves
I will present an existence and stability theory for solitary waves at the interface between a thin ice sheet and an ideal fluid, which is based on minimising the total energy subject to the constraint of fixed total horizontal momentum. The ice sheet is modelled using the Cosserat theory of hyperelastic shells. Since the energy functional is quadratic in the highest derivatives, stronger results are obtained than in the case of capillary-gravity waves. This is joint work with Mark Groves and Benedikt Hewer.
(TCPL 201)
17:30 - 19:30 Dinner (Vistas Dining Room)
Friday, November 4
07:00 - 09:00 Breakfast (Vistas Dining Room)
09:00 - 10:00 Free discussion and research in groups (TCPL)
10:00 - 10:30 Coffee Break (TCPL Foyer)
10:30 - 11:00 Free discussion and research in groups (TCPL)
11:30 - 12:00 Checkout by Noon
5-day workshop participants are welcome to use BIRS facilities (BIRS Coffee Lounge, TCPL and Reading Room) until 3 pm on Friday, although participants are still required to checkout of the guest rooms by 12 noon.
(Front Desk - Professional Development Centre)
12:00 - 13:30 Lunch from 11:30 to 13:30 (Vistas Dining Room)


text:
Rotational Velocity & Acceleration Video Lessons

Concept

# Problem: Your roommate is working on his bicycle and has the bike upside down. He spins the 62.0 cm-diameter wheel, and you notice that a pebble stuck in the tread goes by three times every second.What is the pebble's speed? and what is the pebbles acceleration?

###### FREE Expert Solution

Tangential speed:

$\overline{){\mathbf{v}}{\mathbf{=}}{\mathbf{r}}{\mathbf{\omega }}}$, where r is the radius of rotation and ω is the angular speed.

81% (397 ratings)
###### Problem Details

Your roommate is working on his bicycle and has the bike upside down. He spins the 62.0 cm-diameter wheel, and you notice that a pebble stuck in the tread goes by three times every second.

What is the pebble's speed? and what is the pebbles acceleration?


text:
# Can I be a NASA astronaut as a 5 feet 6 inches 16-year-old Bangladeshi girl with eyesight problems?

I'm a 16-year-old Bangladeshi girl. I want to be a NASA astronaut. Currently my height is 5 feet 6 inches and weight is 40 kg. I have eyesight problem. Does that matter for becoming an astronaut?

• NASA astronauts must be US citizens. Here are the other requirements nasa.gov/audience/forstudents/postsecondary/features/… – Organic Marble Mar 6 at 15:07
• NASA won't be the only game in town for too much longer. Prepare as if you were going to get the job - it will be worthwhile either way. – Chris B. Behrens Mar 6 at 15:16
• @ChrisB.Behrens from a global perspective, NASA hasn't been the only game in town for decades. – Organic Marble Mar 6 at 15:23
• Some astronauts in space wear glasses, even in a space suit. I’m not sure what the eyesight threshold to prevent being an astronaut. It probably varies with the sponsoring agency. I’m guessing that if your eyesight can’t be corrected by some means (e.g. lenses, surgery, etc...), it is probably a disqualifier by some agencies (maybe NASA too). – Paul Mar 6 at 16:46
• @uhoh: That is a commercial space flight, so it has no bearing on what it takes to qualify as a professional astronaut. – TonyK Mar 7 at 0:29

tl;dr From Space With Love has compiled detailed requirements from various space agencies.

Your height is good. Eyesight is not a problem as long as it can be corrected to 20/20. Glasses are fine. Speaking perfect English is required.

Right now to be a NASA astronaut you need to...

• Be a U.S. citizen.
• Possess a master's degree (or equivalent) in a STEM (Science Technology Engineering and Mathematics) field, including engineering, biological science, physical science, computer science or mathematics, from an accredited institution.
• Have at least two years of related professional experience obtained after degree completion or at least 1,000 hours pilot-in-command time on jet aircraft.
• Be able to pass the NASA long-duration flight astronaut physical.

But these requirements change. NASA has reading and videos about How To Be An Astronaut. Including 10 Ways Students Can Prepare to #BeAnAstronaut.

That's not the only way to ride into space with NASA, and NASA is no longer the only game in town.

# Be a NASA Specialist

NASA will, from time to time, select non-astronauts who had special skills related to the mission: specialists. When they were flying the space shuttle they were payload specialists. These people were not required to be US citizens and did not need the pilot experience. I don't believe they are currently selecting non-astronauts as specialists, but things change.

# Be an Astronaut For Another Country

NASA is not the only way to get into space. Other countries have their own human space flight program, and even if they don't have their own they can get a ride with someone who does.

Currently, Russia and China have human space flight programs. India is working on their own. Iran has proposed their own.

Right in the name, the International Space Station (ISS) is international and, as of this writing, has been visited by 242 people from 19 different countries. Mostly the US and Russia. Not Bangladesh... yet.

# Be an Astronaut For a Private Company

Getting to space is hard, but it's getting easier. Getting into space is no longer limited to the US, nor even to governments. Private companies are launching rockets and developing their own spaceships.

SpaceX has their Crew Dragon which is working to take people to the ISS, Boeing is working on their Starliner, Virgin Galactic is working on Launcher One, Blue Origin is working on their Blue Moon lunar lander.

It's not all the US. In New Zealand, Rocket Lab has been launching small rockets and just announced their Neutron rocket capable of sending humans into space (and the CEO literally ate his hat).

All this has happened very quickly! In 2008 SpaceX put the first privately funded rocket into orbit. Now they're flying people to the space station. They went from crashing rockets to landing a starship... umm, almost. By the time you have your master's degree, there will be many companies sending people into space.

# Be Rich

You can buy your way into space. It's very, very expensive, and you still need to be in good physical shape. Space Adventures will get you into space, even onto the ISS, or a trip around the Moon, if you pay millions.

A bit cheaper is Virgin Galactic. If all goes according to plan they will soon take bookings to fly into space (not into orbit yet) for about $US 250,000. # Get a STEM Degree Space is hard. Less than 600 people have been into space, mostly from the US and Russia. But space is getting easier! Right now, the best thing you can do is to get a STEM degree, keep practicing English, stay in good physical shape, try to get an aerospace internship, play space simulation games like Kerbal Space Program, and Keep Looking Up! • This answer is better than what I was going to say. But just because you get into space with aerospace, I'm not sure that's the best study for a future astronaut. Study the kinds of things they do up there, like botany, medicine, materials science, and pursue a career on Earth that you can point to as a qualification to do science in space. – Greg Mar 6 at 20:55 • Note that fluency in English isn't exclusive to space travel - it's the universal language of aviation. – Vikki - formerly Sean Mar 6 at 23:58 • @duofilm That's an "or". You can have two years of "related professional experience after degree completion". – Schwern Mar 7 at 3:22 • I would be a huge disclaimer on the link to "From Space with Love." That looks like an ad to me: they sell a slide deck that should provide insights into the ESA selection process, but they remind the purchasers that they are not affiliated with ESA and have no insider knowledge. – ChrisR Mar 7 at 4:27 • One very important point that was missed: be very very lucky. This is roughly on the same order of magnitude as being a professional sports star-- even with the right skills and qualifications it is still much more likely that you are rejected than accepted. Of course this could change but it still emphasizes that you should not plan your life around it and instead do something you like and hope it can tie into space in the future. – eps Mar 8 at 13:46 How about ESA? This sentence catches the eye: Applications from women are strongly encouraged There is a single space station right now. Both NASA and ESA astronauts work at ISS. Low body weigth and height (to some extent) are actually an advantage in aerospace. You will probably not be exactly the same in the years to come anyway. Eyesight (if problems are moderate and correctable) is not a big issue. What matters is: 1. Education. Any math-intense field will do. Get a degree. Become a scientist or a high-profile engineer. The education can help you in becoming a citizen of a country with a manned space program as well. You can try to become an airspace pilot instead. Being an experienced pilot can be a substitute for a science degree for going to space, but this will get less important in the years to come. And it takes generally as much years and effort in general. 1. Health. An astronaut spends extended periods in space in a rather demanding environment and away from medical services. Most teenagers are negligent to their health and they sorry pretty much at later age, even if they are far from an astronaut carrer. 2. Don't get in any trouble with the law. Anything else is quite probable to change as a requirement for an astronaut in the next 10 or 15 years when your probable astronaut carrer is expected to start. P.S. Try to learn what exactly astronauts do. Most people have quite a romantic image of their work. • @duofilm you lie very easy to check lies when applying to a very high-profile position. What exactly do you expect? When I receive such a garbage (yes, I do receive a lot of it) I consider it an abuse of my sanity and I just throw it away (swearing under my breath). When a multi-national organization gets the same, they at least try to be polite with a boilerplate answer. At least for ESA, I am sure there are formal selection criteria and they are either published or available on request. That's how EU-funded things work. – fraxinus Mar 7 at 22:27 • @duofilm Academia is a small place, and people with legitimate academic qualifications tend to know who the other people in their field are - and even if they don't know you, they'll be able to check your scientific publications. Making up fake CVs is just going to get the academics at the ESA to look up your papers, finding out that you don't have any, and then scratching their heads and going "who is this person?" before throwing your CVs in the trash. – nick012000 Mar 8 at 4:24 • I am seeing that there exists a small misunderstanding. My purpose was not really to get an interview but to verify the seriousness of these space agencies. The conclusion is that they simply reject everybody, who applies online, and only accept people with strong recommendations like a sum of$50-80 millions paid by a country to have an astronaut sent to the ISS. Somebody living in Europe (except Russia) has much more chances to become the president or prime minister of his country than an astronaut. (the evidence is here: en.wikipedia.org/wiki/European_Astronaut_Corps). – duofilm Mar 8 at 7:47
• @duofilm: TBH, becoming a president does not require you to be a scientist, although lying about your scientific credentials would probably still get you into troubles. Just ask the Germans. As a taxpayer, I'm happy that the astronaut selection process is efficient and not wasting effort on fairly obvious fakes. There are indeed thousands of scientists with real degrees and real publications. – MSalters Mar 8 at 16:11
• This answer spreads a very common misconception: ESA is independent from the EU. Though the EU pays for ESA to do certain work (e.g. Galileo), most of the ESA budget comes from member states directly. As examples, the UK and Switzerland are ESA members but not EU, while Slovakia and Lithuania are EU members but not ESA. – user71659 Mar 8 at 20:42

NASA is a US government agency - only US citizens can be NASA astronauts, and that's not likely to change. (Of course you could move to the US and become a citizen, but that's difficult and takes a long time.)

However being small is an advantage, and being female is an advantage. If your vision can be corrected with glasses, and if you're smart and work really hard, you can definitely be an astronaut. You were born at just the right time - there will be more astronaut jobs in the next 20 years than there ever have been before. By a lot!

Go to university and get a PhD in engineering - something related to space. Be good at it - top of your class!

By the time you graduate with that PhD there will be lots of companies hiring commercial astronauts - to construct and maintain things in space, to operate complex equipment in space, and more.

• Become a US citizen may be difficult and take a long time, but still less difficult and less time than becoming an austronaut. It's not a significant obstacle to clear. – Zeus Mar 9 at 1:50
• @Zeus Becoming a US citizen (less difficult) will not get you an astronaut job. Doing the other things I suggested (very difficult), will. Doing both still doesn't get you to be a NASA astronaut. I suspect there will be very few NASA astronauts (where you have to be a US national) vs. commercial astronauts (where it doesn't matter). – nerdfever.com Mar 10 at 19:03


text:
# Documentation

### This is machine translation

Translated by
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

# psi

Digamma function

## Syntax

`psi(x)psi(k,x)`

## Description

`psi(x)` computes the digamma function of `x`.

`psi(k,x)` computes the polygamma function of `x`, which is the `k`th derivative of the digamma function at `x`.

## Input Arguments

 `x` Symbolic number, variable, expression, or a vector, matrix, or multidimensional array of these. `k` Nonnegative integer or vector, matrix or multidimensional array of nonnegative integers. If `x` is nonscalar and `k` is scalar, then `k` is expanded into a nonscalar of the same dimensions as `x` with each element being equal to `k`. If both `x` and `k` are nonscalars, they must have the same dimensions.

## Examples

Compute the digamma and polygamma functions for these numbers. Because these numbers are not symbolic objects, you get the floating-point results.

`[psi(1/2) psi(2, 1/2) psi(1.34) psi(1, sin(pi/3))]`
```ans = -1.9635 -16.8288 -0.1248 2.0372```

Compute the digamma and polygamma functions for the numbers converted to symbolic objects.

`[psi(sym(1/2)), psi(1, sym(1/2)), psi(sym(1/4))]`
```ans = [ - eulergamma - 2*log(2), pi^2/2, - eulergamma - pi/2 - 3*log(2)]```

For some symbolic (exact) numbers, `psi` returns unresolved symbolic calls.

`psi(sym(sqrt(2)))`
```ans = psi(2^(1/2))```

Compute the derivatives of these expressions containing the digamma and polygamma functions.

```syms x diff(psi(1, x^3 + 1), x) diff(psi(sin(x)), x)```
```ans = 3*x^2*psi(2, x^3 + 1) ans = cos(x)*psi(1, sin(x))```

Expand the expressions containing the digamma functions.

```syms x expand(psi(2*x + 3)) expand(psi(x + 2)*psi(x))```
```ans = psi(x + 1/2)/2 + log(2) + psi(x)/2 +... 1/(2*x + 1) + 1/(2*x + 2) + 1/(2*x) ans = psi(x)/x + psi(x)^2 + psi(x)/(x + 1)```

Compute the limits for expressions containing the digamma and polygamma functions.

```syms x limit(x*psi(x), x, 0) limit(psi(3, x), x, inf)```
```ans = -1 ans = 0```

Compute the digamma function for elements of matrix `M` and vector `V`.

```M = sym([0 inf; 1/3 1/2]); V = sym([1, inf]); psi(M) psi(V)```
```ans = [ Inf, Inf] [ - eulergamma - (3*log(3))/2 - (pi*3^(1/2))/6, - eulergamma - 2*log(2)] ans = [ -eulergamma, Inf]```

Compute the polygamma function for elements of matrix `M` and vector `V`. The `psi` function acts elementwise on nonscalar inputs.

```M = sym([0 inf; 1/3 1/2]); polyGammaM = [1 3; 2 2]; V = sym([1, inf]); polyGammaV = [6 6]; psi(polyGammaM,M) psi(polyGammaV,V)```
```ans = [ Inf, 0] [ - 26*zeta(3) - (4*3^(1/2)*pi^3)/9, -14*zeta(3)] ans = [ -720*zeta(7), 0]```

Because all elements of `polyGammaV` have the same value, you can replace `polyGammaV` by a scalar of that value. `psi` expands the scalar into a nonscalar of the same size as `V` and computes the result.

```V = sym([1, inf]); psi(6,V)```
```ans = [ -720*zeta(7), 0]```

## More About

collapse all

### Digamma Function

The digamma function is the first derivative of the logarithm of the gamma function:

`$\psi \left(x\right)=\frac{d}{dx}\mathrm{ln}\Gamma \left(x\right)=\frac{{\Gamma }^{\prime }\left(x\right)}{\Gamma \left(x\right)}$`

### Polygamma Function

The polygamma function of the order k is the (k + 1)th derivative of the logarithm of the gamma function:

`${\psi }^{\left(k\right)}\left(x\right)=\frac{{d}^{k+1}}{d{x}^{k+1}}\mathrm{ln}\Gamma \left(x\right)=\frac{{d}^{k}}{d{x}^{k}}\psi \left(x\right)$`

## Tips

• Calling `psi` for a number that is not a symbolic object invokes the MATLAB® `psi` function. This function accepts real nonnegative arguments `x`. If you want to compute the polygamma function for a complex number, use `sym` to convert that number to a symbolic object, and then call `psi` for that symbolic object.

• `psi(0, x)` is equivalent to `psi(x)`.

## See Also

#### Introduced in R2011b

Was this topic helpful?

Watch now


text:
# What is dbt?

dbt enables analytics engineers to transform data in their warehouses by simply writing select statements. dbt handles turning these select statements into tables and views.

dbt does the T in ELT (Extract, Load, Transform) processes – it doesn’t extract or load data, but it’s extremely good at transforming data that’s already loaded into your warehouse.

The role of dbt within a modern data stack is discussed in more detail here.

dbt also enables analysts to work more like software engineers, in line with the dbt Viewpoint.

## How do I use dbt?

### dbt Projects

A dbt project is a directory of .sql and .yml files. The directory must contain at a minimum:

• Models: A model is a single .sql file. Each model contains a single select statement that either transforms raw data into a dataset that is ready for analytics, or, more often, is an intermediate step in such a transformation.
• A project file: a dbt_project.yml file which configures and defines your dbt project.

Projects typically contain a number of other resources as well, including tests, snapshots, and seed files (see below).

Whether you are starting a project from scratch, or if your organization already has a dbt project, see the docs on projects for more information on getting started.

##### Check out our sample dbt project

Want to check out a sample project? Have a look at our Jaffle Shop project on GitHub!

### Database Connections

dbt connects to your data warehouse to run data transformation queries. As such, you’ll need a data warehouse with source data loaded in it to use dbt. dbt natively supports connections to Snowflake, BigQuery, Redshift and Postgres data warehouses, and there’s a number of community-supported adapters for other warehouses (see Supported Data Platforms).

When you define your connection, you’ll also be able to specify the target schema where dbt should create your models as tables and views. See Managing environments for more information on picking target schema names.

### dbt Commands

A command is an instruction to execute dbt which compiles and runs SQL against the database.

When you issue a dbt command, such as run, dbt:

1. Determines the order to execute the models in your project in.
2. Generates the DDL required to build the model, as per the model's materialization
3. Executes the compiled queries against your data warehouse, using the credentials specified in the target defined in your profile. Executing these queries creates relations in the target schema in your data warehouse. These relations contain transformed data, ready for analysis.

A list of commands can be found in the Command reference section of these docs.

## What does the workflow for using dbt look like?

There’s two main ways of working with dbt -- using the web-based Integrated Development Environment (IDE) in dbt Cloud, or using the Command Line Interface (CLI).

### Developing locally with the Command Line Interface (CLI)

To use the CLI:

1. Follow these instructions to install the dbt CLI
2. Set up a profile to connect to your data warehouse
3. Build your dbt project in a code editor, like Atom or VSCode
4. Execute commands using your terminal
##### Developing locally?

If you’re developing your dbt project locally, we recommend checking out this article to understand how we set up our computers.

## What makes dbt so powerful?

As a dbt user, your main focus will be on writing models (i.e. select queries) that reflect core business logic – there’s no need to write boilerplate code to create tables and views, or to define the order of execution of your models. Instead, dbt handles turning these models into objects in your warehouse for you.

dbt handles boilerplate code to materialize queries as relations. For each model you create, you can easily configure a materialization.

A materialization represents a build strategy for your select query – the code behind a materialization is robust, boilerplate SQL that wraps your select query in a statement to create a new, or update an existing, relation.

dbt ships with the following built-in materializations:

• view (default): The model is built as a view in the database.
• table: The model is built as a table in the database.
• ephemeral: The model is not directly built in the database, but is instead pulled into dependent models as common table expressions.
• incremental: The model is initially built as a table, and in subsequent runs, dbt inserts new rows and updates changed rows in the table.

Custom materializations can also be built if required.

dbt determines the order of model execution. Often when transforming data, it makes sense to do so in a staged approach. dbt provides a mechanism to implement transformations in stages through the ref function.

Rather than selecting from existing tables and views in your warehouse, you can select from another model, like so:

/models/orders.sql
select  orders.id,  orders.status,  sum(case when payments.payment_method = 'bank_transfer' then payments.amount else 0 end) as bank_transfer_amount,  sum(case when payments.payment_method = 'credit_card' then payments.amount else 0 end) as credit_card_amount,  sum(case when payments.payment_method = 'gift_card' then payments.amount else 0 end) as gift_card_amount,  sum(amount) as total_amountfrom {{ ref('base_orders') }} as ordersleft join {{ ref('base_payments') }} as payments on payments.order_id = orders.id

When compiled to executable SQL, dbt will replace the model specified in the ref function with the relation name.

Importantly, dbt also uses the ref function to determine the sequence in which to execute the models – in the above example, base_orders and base_payments need to be built prior to building the orders model.

A DAG for a simple dbt project

dbt builds a directed acyclic graph (DAG) based on the interdependencies between models – each node of the graph represents a model, and edges between the nodes are defined by ref functions, where a model specified in a ref function is recognized as a predecessor of the current model.

When dbt runs, models are executed in the order specified by the DAG – there’s no need to explicitly define the order of execution of your models. Building models in staged transformations also reduces the need to repeat SQL, as a single transformation (for example, renaming a column) can be shared as a predecessor for a number of downstream models.

##### Want to see a DAG visualization for your project?

Check out the Documentation Website docs

## What else can dbt do?

dbt has a number of additional features that make it even more powerful, including:

Code compiler: In dbt, SQL files can contain Jinja, a lightweight templating language. Using Jinja in SQL provides a way to use control structures (e.g. if statements and for loops) in your queries. It also enables repeated SQL to be shared through macros.

The power of using Jinja in your queries is discussed in Using Jinja.

Documentation: dbt provides a mechanism to write, version-control, and share documentation for your dbt models. Descriptions (in plain text, or markdown) can be written for each model and field.

These descriptions, along with additional implicit information (for example, the model lineage, or the field data type and tests applied), can be generated as a website and shared with your wider team, providing an easily referenceable databook for anyone that interacts with dbt models.

Tests: SQL can be difficult to test, since the underlying data is frequently changing. dbt provides a way to improve the integrity of the SQL in each model by making assertions about the results generated by a model. Out of the box, you can test whether a specified column in a model only contains:

• Non-null values
• Unique values
• Values that have a corresponding value in another model (e.g. a customer_id for an order corresponds to an id in the customers model)
• Values from a specified list

Tests can be easily extended to suit business logic specific to your organization – any assertion that you can make about your model in the form of a select query can be turned into a test.

Package management: dbt ships with a package manager, which allows analysts to use and publish both public and private repositories of dbt code which can then be referenced by others.

This means analysts can leverage libraries that provide commonly-used macros like dbt_utils, or dataset-specific projects for software services like Snowplow and Stripe, to hit the ground running.

Seed file loader: Often in analytics, raw values need to be mapped to a more readable value (e.g. converting a country-code to a country name) or enriched with static, or infrequently changing data (e.g. using revenue targets set each year to assess your actuals).

These data sources, known as seed files, can be saved as a CSV file in your project and loaded into your data warehouse through use of the seed command.

The documentation for the seed command can be found here.

Data snapshots: Often, records in a data source are mutable, in that they change over time. This can be difficult to handle in analytics if you want to reconstruct historic values.

dbt provides a mechanism to snapshot raw data for a point in time, through use of snapshots.

Understand raw data sources: Since dbt selects from raw data already loaded in your data warehouse, it's useful to understand the role of these tables and schemas within your warehouse. Defining raw data as a Source in dbt allows you to:

• Document and test the data that is loaded into your warehouse
• Check the freshness of your data against specified limits, to help identify upstream issues.
• Understand which models depend on each data source.

Check out the documentation on Sources.

## Who should use dbt?

dbt is appropriate for anyone who interacts with a data warehouse. It can be used by data engineers, data analysts and data scientists, or anyone that knows how to write select queries in SQL.

For dbt users that are new to programming, you may also need to spend some time getting to know the basics of the command line, and familiarizing yourself with git.

To make full use of dbt, it may also be beneficial to know some programming basics, such as for loops and if statements, to use Jinja effectively in your models.


text:
# Predicting a coin toss

June 14, 2016

I flip a coin and it comes up heads. What is the probability it will come up heads the next time I flip it?

“Fifty percent,” you say. “The coin tosses are independent events; the coin doesn’t have a memory.”

Now I flip a coin ten times, and ten times in a row it comes up heads. Same question: what is the probability it will come up heads the next time?

You pause for a second, if only because you are not used to getting heads ten times in a row.

But, after some hesitation, you convince yourself that this is no different from the first experiment. The coin still has got no memory, and the chances are still 50-50.

Or you become suspicious that something is not right with the coin. Maybe it is biased, or maybe it has two heads and no tails. In that case, your answer may be something like 95% for heads, where the remaining 5% account for the chance that the coin is only somewhat biased and tails are still possible.

This sounds paradoxical: coin tosses are independent, yet the past outcomes influence the probability of the future ones. We can explain this by switching from frequentist to Bayesian statistics. Bayesian statistics lets us model the coin bias (the probability of getting a single outcome of heads) itself as a random variable, which we shall call $\theta$. It is random simply because we don’t know its true value, and not because it varies from one experiment to another. Consequently, we will update its probability distribution after every experiment because we gain more information, not because it affects the coin itself.

Let $X_i\in\{H,T\}$ be the outcome of $i$th toss. If we know $\theta$, we automatically know the distribution of $X_i$:

$p(X_i=H|\theta)=\theta.$

As before, the coin has no memory, so for any given $\theta$, the tosses are independent: $p(X_i \wedge X_j|\theta)=p(X_i|\theta)p(X_j|\theta)$. But they are independent only when conditioned on $\theta$, and that resolves the paradox. If we don’t assume that we know $\theta$, then $X$s are dependent, because the earlier observations affect what we know about $\theta$, and $\theta$ affects the probability of the future observations.

A model with conditionally independent variables is called a Bayesian network or probabilistic graphical model, and it can be represented by a directed graph as shown on the right. The arrows point from causes to effects, and the absence of an edge indicates conditional independence.

Based on our evidence of 10 heads in a row, the Bayes’ theorem lets us estimate the distribution of $\theta$. All we need is a prior distribution – what did we think about the coin before we tossed it?

For coin tossing and other binary problems, it is customary to take the Beta distribution as the prior distribution, as it makes the calculations very easy. Often such choice is justified, but in our case it would be a terrible one. Almost all coins we encounter in our lives are fair. To make the beta distribution centered at $\theta=0.5$ and low variance, we would need to set its parameters, $\alpha$ and $\beta$, to large equal numbers. The resulting distribution would assign non-trivial probability only to low deviations from $\theta=0.5$, and the distribution would be barely affected by our striking evidence.

Instead, let’s engineer our prior distribution from scratch. Double-sided coins may be rare in everyday life, but they are easy to buy on eBay. When someone approaches us out of the blue and starts flipping coins, there’s a fair chance they’ve got one of those. Still, we believe in humanity, so let’s assign a point probability of just $1\%$ to $\theta=0$ and $\theta=1$. What about biased coins, such as coins with $\theta=0.83$? Turns out they are unlikely to exist. Nevertheless, the Bayesian statistics teaches to be reluctant to assign zero probabilities to events, since then no amount of evidence can prove us wrong. So let’s take $0.1\%$ and spread it uniformly across the interval $[0;1]$. The remaining $97.9\%$ will be the probability of a fair coin.

Formally, our prior distribution over $\theta$ can be specified by its probability density as

$p(\theta)=0.979\delta(\theta-0.5)+0.01\delta(\theta)+0.01\delta(\theta-1)+0.001,$

where $\delta$ is the Dirac delta function used to specify point probabilities.

Let $D$ refer to the event that $X_i=H$, $i=1,2,\ldots,10$. Then $p(D|\theta)=\theta^{10}$. By Bayes’ theorem,

$p(\theta|D)=\frac{p(D|\theta)p(\theta)}{\int_0^1 p(D|\theta)p(\theta)d\theta} = \frac{\theta^{10}p(\theta)}{\int_0^1 \theta^{10}p(\theta)d\theta}.$

Now we need to do a bit of calculation by hand:

$\begin{multline} \int_0^1 \theta^{10}p(\theta)d\theta=0.979\cdot0.5^{10}+0.01\cdot 1^{10}+0.01 \cdot 0^{10} + 0.001\int_0^1 \theta^{10}d\theta \\ = 9.56\cdot 10^{-4} + 0.01 + 9.09\cdot 10^{-5}=0.0110; \end{multline}$ $p(\theta|D)=0.087\delta(\theta-0.5)+0.905\delta(\theta-1)+0.091\theta^{10}.$

Thus, we are $90.5\%$ sure that the coin is double-headed, but we also allow $8.7\%$ for pure coincidence and $0.8\%$ for a biased coin.

Now back to our question: how likely is it that the next toss will produce heads?

$\begin{multline} p(X_{11}=H|D) = \int_0^1 p(X_{11}=H|D,\theta)p(\theta|D)d\theta = \int_0^1 \theta \, p(\theta|D)d\theta \\ = 0.087\cdot 0.5+0.905\cdot 1+0.091\cdot \int_0^1\theta^{11}d\theta = 0.956. \end{multline}$

Very likely indeed. Notice, by the way, how we used the conditional independence above to replace $p(X_{11}=H|D,\theta)$ with $p(X_{11}=H|\theta)=\theta$.

Bayesian statistics is a powerful tool, but the prior matters. Before you reach for the conjugate prior, consider whether it actually represents your beliefs.

A couple of exercises:

1. How does our prior distribution change after a single coin toss (either heads or tails)?
2. How does our prior distribution change after ten heads and one tails?


text:
• 生物工程 •

### 耐热克鲁维酵母和粟酒裂殖酵母顺序接种发酵对美乐干红葡萄酒品质的影响

1. 甘肃农业大学食品科学与工程学院，甘肃省葡萄与葡萄酒工程学重点实验室，甘肃省葡萄与葡萄酒产业技术研发中心，甘肃 兰州 730070
• 出版日期:2019-04-25 发布日期:2019-05-05
• 基金资助:
甘肃省教育厅科研项目（2018A-033）；甘肃省商务厅2017年葡萄酒产业发展项目（2017-1-09）

### Effect of Sequential Fermentation with Lachancea thermotolerans and Schizosaccharomyces pombe on the Quality of Merlot Dry Red Wine

WANG Yuhua, SHENG Wenjun, LI Min, MI Lan, JIANG Yumei, WANG Jing

1. Gansu Key Lab of Viticulture and Enology, Research and Development Center of Wine Industry, Gansu Province, College of Food Science and Engineering, Gansu Agricultural University, Lanzhou 730070, China
• Online:2019-04-25 Published:2019-05-05

Abstract: This study aimed to evaluate the sensory quality of Merlot dry red wine produced by sequential inoculation of Lachancea thermotolerans and Schizosaccharomyces pombe instead of malolactic fermentation, in order to provide technical support for the application of non-Saccharomyces cerevisiae strains in quality improvement of dry red wine. In this work, Merlot grapes from Wuwei region of Gansu province were used for wine-making. Sequential inoculation of one of three strains of L. thermotolerans and one strain of S. pombe at intervals of 4 days and single inoculation of S. pombe were conducted as experimental treatments, and single inoculation of S. cerevisiae was taken as control. Yeast populations were monitored during the fermentation process, and the main physicochemical indexes, flavor components and sensory quality of wine were analyzed. The results showed that the treatment groups completed the alcoholic fermentation in 16 days. The viable cell population of S. pombe was stable until the alcoholic fermentation started. The population of L. thermotolerans reached the maximum on the 4th day, and it decreased significantly after the addition of S. pombe and disappeared completely from the 10th to 12th day. L-lactic acid concentrations in three sequential inoculation groups were not significantly different (2.46–2.86 g/L), but they were significantly higher than that in the control group (P < 0.05). Sequential inoculation reduced the volatile acidity by 0.11–0.16 g/L and increased the total acidity by 0.96–1.97 g/L. In addition, it increased the color aroma and decreased the hue. The production of esters, higher alcohols and acids in the sequential inoculation groups were decreased by 38.46%–49.34%, 13.36%–19.42%, and 46.84%–49.71%, respectively, compared with the control. However, the concentrations of terpenes, phenylethyl alcohol and damascene were increased and the aroma complexity was enhanced. Sensory analysis showed that the wines produced by sequential fermentation were more acidic than the control, while they had a better color appearance and stronger fruity and flowery aroma. These results indicated that sequential inoculation of L. thermotolerans and S. pombe is a potential alternative to malolactic fermentation and has a positive effect in improving the acidity and sensory quality of wine.


text:
# Tag Info

2

The standard TeX code for given task is: \def\something#1{\def\internal{#1}% \ifx\internal\empty the parameter is empty.\else it is nonempty.\fi } The problem of this code (above) is that the macro \something isn't expandable because it includes \def assignment. If you need expandable macro with the same test then you need to choose the token never ...

7

You can test macro-to-macro using \ifx. That is, \ifx<csA><csB><true>\else<false>\fi will test whether the definition of <csA> matches that of <csB> and execute <true>, or <false> otherwise: \documentclass{article} \makeatletter \newcommand{\@emptymacro}{}% Used to test against an empty macro ...

1

You can load the package scrextend with the option cleardoublepage=plain. To get an empty page right after the titlepage use \cleardoubleoddemptypage after the titlepage environment or as last command inside this environment. \documentclass{book} \usepackage[cleardoublepage=plain]{scrextend} \usepackage{fancyhdr} \pagestyle{fancy} \usepackage{blindtext}% ...

2

Here is a solution Edit: more explanation pagestyle is fancy, pages between chapters are set to plain by redefining \cleardoublepage (this last command is used by \part and \chapter) the page after part page is set to plain by redefining \@endpart the page after title page is set to empty by this pagestyle{empty} just after titlepage environment ...

2

You probably need to redefine your titlepage environment. Mine is like this, and the first page after titlepage is empty and the following are numbered correctly. \newenvironment{titlepage} {% \if@openright \cleardoublepage \else \clearpage \fi% \newpage \thispagestyle{empty}% \setcounter{page}\@ne }% {\newpage \thispagestyle{empty} ...

2

Perhaps you can use the "ifdraft" package and use one of these: \ifdraft{draftcase}{finalcase} \ifoptiondraft{option draft is given}{option draft is not given} \ifoptionfinal{option final is given}{option final is not given}

1

the draft option just does \setlength\overfullrule{5pt}} so you can use the test \ifdim\overfullrule>0pt not draft \else draft \fi

2

The following code \documentclass{article} \usepackage{ifthen} \newcommand{\foo}[1]{% \ifthenelse{\equal{#1}{True}}{gagagag}{blablabla}% } \begin{document} \foo{\val} \end{document} yields gagagag when compiled with pdflatex '\def\val{True}\input' file.tex and blablabla when compiled with pdflatex '\def\val{something else}\input' temp.tex ...

5

Maybe better than \newcommand[1]... is usage of toks registers: \newtoks\institution \newtoks\datesattended \newtoks\degree If user says \institution{Ministry of Silly Walks} then you can use this value in your macros as: \the\institution If you need to test, if the value of the "variable" was already set, you can do: \if\relax\the\degree\relax ...

8

There is nothing special about \@variable commands. They are just macros, for storing content rather than performing other operations. As such it's possible to test for being defined, by using \ifdefined, a (e-TeX) primitive. \documentclass[11pt,a4paper]{article} \makeatletter \newcommand{\@institutionname}{Ministry of Silly Walks} ...

3

Since you may want to set a pretty small threshold, it is not efficient to try out combinations like 30*##1<3E-6. Simply enable fpu and use \ifpgfmathfloatcomparison. (The latter seems to be undocumented. And its friend \ifpgfmathcomparison is mentioned once. However you may take a look at pgfmathfloat.code.tex.) columns/B/.style={column type=c,column ...

7

In your last test, when the macro is expanded TeX is doing \ifxquote''\relax which of course returns true, because \ifx compares the two backquotes. The code \ifx#1\relax can be relied upon only if #1 consists of just one token. You could do \ifx\relax#1; in this case the last test would do \ifx\relaxquote'' and `quote'' would disappear as part of ...

6

Use the max function provided by expl3 in the fp module: \documentclass{article} \usepackage{xparse} \ExplSyntaxOn \NewDocumentCommand{\findLargest}{ om } { \IfNoValueTF{#1} {% separator is a comma, directly use \fp_eval:n { max ( #2 ) } \engbird_compute_max:n { #2 } } {% we need to pass the separator \engbird_find_largest:nn { #1 } { ...

2

I added a *-variant that prints the citation anyway, and it doesn't count as the first (maybe you want it in the introduction or later in the document). \begin{filecontents*}{\jobname.bib} @Manual{vcd, title = "vcd: Visualizing Categorical Data", author = "David Meyer and Achim Zeileis and Kurt Hornik", year = "2015", note = ...

1

3

May be you need this: \def\pkg#1{\textsf{#1}\ixp{#1}~\citex{#1}} \def\citex#1{\expandafter\ifx\csname cit:#1\endcsname\relax \expandafter\gdef\csname cit:#1\endcsname{}% \citep{#1}% \else \nocite{#1}% \fi } The \citex macro tests if the parameter was used before, i.e. if the control sequence \cit:parameter is defined. If not, then ...

0

This is not a direct answer, but perhaps you would find it useful. Here is a package I wrote, but never published to serve a similar but not identical purpose. The purpose of this package is to make it easier to write articles on programming languages. To reference a language such as Java, you write \Java in your input. It would add the citation, but only if ...

1

The expansion of ifthen macros causes problems in the auxiliary files. You either need to \protect them ... \caption[\protect\vlabel{numbersa}]{\vlabel{numbersa}} ... or use an alternative: \documentclass{article} \newcommand{\vlabel}[1]{% \ifnum\pdfstrcmp{#1}{numbersa}=0 Numbers A% \fi } \begin{document} \listoftables% LoF \begin{table} ...

1

The solution by Steven is based on the fact that the parameter is processed. I show another solution here: the parameter is only scanned token by token. The solution is based on the code available at OPmac tricks www page. Only few lines are added in order to implement the actual task here. %% the code from http://petr.olsak.net/opmac-tricks-e.html#readtoks ...

3

Since counters are global quantities in LaTeX, I decided to use them to approach your problem. This doesn't give quite the answer you requested, because it prints the innermost result before it prints the outermost result in the nest. That means, for your first example, that the output is "0 1" rather than "1 0". But I'm thinking that, for what you want ...

Top 50 recent answers are included


text:
### 기초과학VOD

BASIC SCI VOD

•   >
• 연구동향
•   >
• 기초과학VOD
Super Title Title 2017 Discrete Math 세미나 Negative correlation and Hodge-Riemann relations 허준이 ( Institute for Advanced Study, Princeton, NJ, USA ) 2017-07-12 KAIST KAIST All finite graphs satisfy the two properties mentioned in the title. I will explain what I mean by this, and speculate on generalizations and interconnections. This talk will be non-technical: Nothing will be assumed beyond basic linear algebra.

이 페이지에서 제공하는 정보에 만족하십니까?