text:
# A researcher studying the nutritional value of a new candyplaces a 5.70 g sample of the candy inside a bombcalorimeter

###### Question:

A researcher studying the nutritional value of a new candy places a 5.70 g sample of the candy inside a bomb calorimeter and combusts it in excess oxygen. The observed temperature increase is 2.89 âˆ˜C. If the heat capacity of the calorimeter is 42.20 kJâ‹…Kâˆ’1, how many nutritional Calories are there per gram of the candy?

#### Similar Solved Questions

##### In the table below provides sample times nour fer prccessing shipping orders irom Web-besed retailer The retailer advertise: Inar Order are shipped wthin four hours ef receipt What the capability cf the process to acnieve this standard? Do nct round inermediaze Iculations Round Your Jnswen three decima acesData2.6133.0 3.5 3.6 3.3 1.4 3.8 3.5 2.8 3.2 1.6 3.9 3.0 0,5 2.5 1.7 1,0 3.7 3.3 1.5 2.4 1.5 3.3 3.7 1.9 3 2.8 1 3.2 3.2 1.5 3.3 3.3 3.8 2.1 2.9 2.1 1.6 1.5 0 2.6 : 22 1,8 2.9 3,3 2,6 2.4 3.8
In the table below provides sample times nour fer prccessing shipping orders irom Web-besed retailer The retailer advertise: Inar Order are shipped wthin four hours ef receipt What the capability cf the process to acnieve this standard? Do nct round inermediaze Iculations Round Your Jnswen three dec...
##### Question 2.6 Circle the locations on the plot that indicate where the nuclei are. Question 2.7...
Question 2.6 Circle the locations on the plot that indicate where the nuclei are. Question 2.7 Estimate the separation between the two nuclei. Question 2.8 Identify and shade the region(s) of the plot where both electrons are located between the two nuclei. Figure 2: The radial distribution function...
##### Of 0.2) Use 58, 46, The UseWhacnenoar 55, weeks 8 is shown number of pizzas ordered [ 54, below. 55, for pizzas 52 smoothing with smoothing constants of 2 order for week on Friday evenings 5 (Use between and 3 8 t0 and exponential smoothing forecast a 6.30 at a pizza value for smoothing eek delivery location ! Ieeeo ran fortheCheck
of 0.2) Use 58, 46, The UseWhacnenoar 55, weeks 8 is shown number of pizzas ordered [ 54, below. 55, for pizzas 52 smoothing with smoothing constants of 2 order for week on Friday evenings 5 (Use between and 3 8 t0 and exponential smoothing forecast a 6.30 at a pizza value for smoothing eek delivery...
##### Compute the planar density of tungsten (W) of the (110) plane 0 129 atomsinm 14. 1...
Compute the planar density of tungsten (W) of the (110) plane 0 129 atomsinm 14. 1 atomsinn? 10.8 atomsinn 9.02 atomsinnt...
##### L 1 } syscemn945G8v 241
L 1 } syscemn 945 G8v 241...
##### Part Il: ApplicationFor each of the following, convert the word equation into formula equation, BUI dhet palancela) Barium chlorate & Barium chloride Oxygenb) Chlorine Potassium nitride & Nitrogen Potassium chlorideAluminum bromate a Aluminum nitride Sodium bromate Sodium nitride
Part Il: Application For each of the following, convert the word equation into formula equation, BUI dhet palancel a) Barium chlorate & Barium chloride Oxygen b) Chlorine Potassium nitride & Nitrogen Potassium chloride Aluminum bromate a Aluminum nitride Sodium bromate Sodium nitride...
##### Problem 2-29 (Algo) Changes in Cost Structure; Break-Even Analysis; Operating Leverage; Margin of Safety [LO2-4, LO2-5,...
Problem 2-29 (Algo) Changes in Cost Structure; Break-Even Analysis; Operating Leverage; Margin of Safety [LO2-4, LO2-5, LO2-7, LO2-8] Morton Company's contribution format income statement for last month is given below: $Sales (43,000 units X$22 per unit) Variable expenses Contribution margin F...
##### 17 (3.38) NOTE: The numerical values in this problem have been modified for testing purposes. In...
17 (3.38) NOTE: The numerical values in this problem have been modified for testing purposes. In its Fuel Economy Guide for 2014 model vehicles, the Environmental Protection Agency gives data on 1160 vehicles. There are a number of high outliers, mainly hybrid gas-electric vehicles. If we ignore the...
##### PLUS HM Aboul D,il 112
PLUS H M Aboul D, il 1 1 2...
##### The Pacific hallbut fishery has been modeled kx1differentia equationJunere yt)biomass (the tota Iassthe members the population) kilogramsrime(measuredvears), the carrying capacity estimated7 * 107 kg0.79 per vear(a) If Y(o)107 kg find the biomass Vear ater (Rouno Your answer 107 kgdecima places )(b) How longtake for the biomass to reach107 kg? (Round your answer Lwo decimal pluces
The Pacific hallbut fishery has been modeled kx1 differentia equation Junere yt) biomass (the tota Iass the members the population) kilograms rime (measured vears), the carrying capacity estimated 7 * 107 kg 0.79 per vear (a) If Y(o) 107 kg find the biomass Vear ater (Rouno Your answer 107 kg decima...
##### Two Lens SystemA diverging lens located in the y-z plane at x = 0 forms an image of an arrow at X = 330.- cm The image of the tip of the arrow is located at y = =Yz 5.9 cm The magnitude of the focal length of the diverging lens is 51.1 cmlight (X Yz)What is X1, the X CO-ordinate of the object arrow?77.35cm SubmitYour submissions:77.35Computed value: -77.35 Submitted: Monday; May 11 at 2:10 AM Feedback: Your answer has been judged correct; the exact answer is: 76.9004901960784.2) What is Y1, the
Two Lens System A diverging lens located in the y-z plane at x = 0 forms an image of an arrow at X = 330.- cm The image of the tip of the arrow is located at y = =Yz 5.9 cm The magnitude of the focal length of the diverging lens is 51.1 cm light (X Yz) What is X1, the X CO-ordinate of the object arr...
##### Flexible Budgets and Variance Analysis
Sinclair and Reid, an accounting firm, has budgeted $200 000 in fixed expenses per month for the tax department. It has also budgeted variable costs of$10 per tax return prepared for supplies, $70 per return for labour, and$20 per return for computer time. The firm expects revenue from tax return ...
##### Calculate the standard cell potential for thefollowing reaction:J4+ (aq) + 2Q (s) -->J2+ (aq) + 2Q+ (aq)Given:J4+ (aq) + 2e- --> J2+ (aq) +0.15 VJ2+ (aq) + 2e- --> J(s) -0.14VQ+ (aq) + e- --> Q (s) -2.93 V -3.08 V +2.78 V +6.00 V -2.78 V +3.08 V
Calculate the standard cell potential for the following reaction: J4+ (aq) + 2Q (s) --> J2+ (aq) + 2Q+ (aq) Given: J4+ (aq) + 2e- --> J2+ (aq) +0.15 V J2+ (aq) + 2e- --> J (s) -0.14 V Q+ (aq) + e- --> Q (s) -2.93 V -3.08 V +2.78 V +6.00 V -2.78 ...
##### McGill and Smyth have capital balances on January 1 of $60,000 and$48,000, respectively. The partnership...
McGill and Smyth have capital balances on January 1 of $60,000 and$48,000, respectively. The partnership income-sharing agreement provides for (1) annual salaries of $16,000 for McGill and$20,000 for Smyth, (2) interest at 10% on beginning capital balances, and (3) remaining income or loss to be s...
Suppose a Cobb-Douglas Production function is given by the following: where L is units of labor, K is units of capital, and P(L, K) is total units that can be produced with this labor/capital combination. Suppose each unit of labor costs $300 and each unit of capital costs$1,200. Further suppose a ...

format: plain


text:
# Help with finding normal modes of a bar swinging on a string

1. Apr 9, 2013

### BiotFartLaw

1. The problem statement, all variables and given/known data
A bar with mass m and length l is attached at one end to a string (also length l) and is swinging back and forth. Find the normal modes of oscillation.

2. Relevant equations
L=T-U, and the Lagrange-euler equation, I=(1/12)ml^2

3. The attempt at a solution
So my idea is this. Use the two angles $\theta$ (angle of string from the vertical) and $\phi$ (angle of the bar from the vertical) as the generalized coordinates and set up a Lagrangian to get two (probably coupled) differential equations. THen I'm guessing two different eigenfrequencies will pop out when I solve them.

My problem is that I'm not sure what the (translational) kinetic energy is. (The rotational would just be I*ω^2 and this ω^2 would, in the end, give me the two frequencies [?]) I've tried finding $\dot{x}$ and $dot{y}$ using sines and cosines of the angles, but when I do (and I make appropriate approximations) I'm left with no $dot{\theta}$ or $dot{\phi}$terms which doesn't seem right.
But I'm also not sure if it's as simple as $T=ml^2(dot{\theta}+dot{phi})$.

Thanks

Last edited: Apr 9, 2013
2. Apr 9, 2013

### vela

Staff Emeritus
The easiest thing to do is simply write down the x and y coordinates of the center of mass of the rod in terms of the two angles and then calculate $\frac{1}{2}(\dot{x}^2+\dot{y}^2)$.

3. Apr 9, 2013

### BiotFartLaw

Thanks. A new question though:

What is ω (from the rotational KE) in terms of the two angles? Usually $\omega = dot{\theta}$. But that's only for one angle. Because if ω isn't in terms of the angle(s) then the rotational KE drops out when you take the derivatives for L which doesn't seem right.

Thanks again.

4. Apr 9, 2013

### vela

Staff Emeritus
From the way you defined the angles, you should have $\omega=\dot{\phi}$, right? Changing that angle corresponds to the bar rotating whereas changing $\theta$ only causes translation of the bar.


text:
# Finding primes

Number Theory Level pending

Let $$P(N)$$ be the probability that a randomly chosen integer, $$N$$, is prime. If $$P(N) = x/(6\ln N)$$ Then find the value of $$x$$ where $$x$$ is an integer.

Note: Assume that $$N$$ is very large, and ignore terms in your answer that are of subleading order in $$N$$. Also, make the assumption that the probability that $$N$$ is divisible by a prime $$p$$ is exactly $$1/p$$ (which is essentially true, for a large enough sample size of numbers).

×


text:
show that the units for all 3 terms in bernouliis equation are the same

1. The problem statement, all variables and given/known data

bernouliis equaton

P + 1/2 Rho v^2 + Rho g h = constant

find the units of the three terms on the left hand side & show they are the same and then the units of the constant on the right

3. The attempt at a solution

all i can think to do here is check the SI units for each term

units for pressure = Pa or NM^-2
units for density = kg/m^3
units for velocity =m/s
units for g = m/s
units for h = m

but i cant see how i combine them or how they all come out the same ?
 PhysOrg.com science news on PhysOrg.com >> Intel's Haswell to extend battery life, set for Taipei launch>> Galaxies fed by funnels of fuel>> The better to see you with: Scientists build record-setting metamaterial flat lens
 Recognitions: Homework Help Pressure P = NM^-2 = kg*M*s^-2*M^-2 = kg*M^-1*s^-2. Similarly work out for the other two expression. You can see that all the tree terms have the same dimensions.

Mentor
Blog Entries: 1
 Quote by victoriafello but i cant see how i combine them or how they all come out the same ?
Express each factor in terms of the basic units: m, kg, s. Then work out the units of each term in the equation by multiplying the units of each factor.
 units for pressure = Pa or NM^-2
Hint: Express the pressure in terms of those three basic units.
 units for g = m/s
Those units should be ms^-2.

show that the units for all 3 terms in bernouliis equation are the same

Ok so pressure becomes kgm^-1 s^-2, then the other terms expressed in
M , kg, s are

½ pv^2 is Kg m^-3 m/s^-1
Pgh is kg m^-3 m/2^2

I think I am still having a problem with the powers thou, I am not combining the units correctly

Mentor
Blog Entries: 1
 Quote by victoriafello Ok so pressure becomes kgm^-1 s^-2,
Good.
 then the other terms expressed in M , kg, s are ½ pv^2 is Kg m^-3 m/s^-1 Pgh is kg m^-3 m/2^2
Show how you got these.

What are the units for density? For v?
 density is mass / volume so its units are Kg m^-3 for velocity units are m/s^-1 so combined you get Kg m^-3 m/s^-1 and for the second part density - Kg m^-3 units for g = m/s^-2 units for h - m combines to give Kg m^-3 m/s^-2 i must be getting this wrong but i have re read my text book and i cant see where to correct it,
 The dimensions of velocity are $$[L]^1\times [T]^{-1}$$ The dimensions of velocity squared are $$[L]^2 \times [T]^{-2}$$

Mentor
Blog Entries: 1
 Quote by victoriafello density is mass / volume so its units are Kg m^-3 for velocity units are m/s^-1
The density units are correct, but velocity has units of m/s or m*s^-1.

 so combined you get Kg m^-3 m/s^-1
Not quite. The units for ½ρv² would be:
[kg*m^-3]*[m*s^-1]² = [kg*m^-3]*[m*s^-1]*[m*s^-1]

See if you can simplify that by collecting all the powers of m and s. (For example, what's m^-3*m*m simplify to?)
 Ok I think I see it now, So m^-3*m*m simplifies to m^-1 And s^-1*s^-1 simplifies to s^-2 So the units for ½ρv² would be kg m^-1s^-2 Then for the second term Units for density are kg*m^-3 Units for g are m*s^-2 Units for h are m This is [kg*m^-3]*[m*s^-2]*[m] Collecting the m terms gives m^-1 so the units are Kg m^-1s^-2 Then all I need is the units for the constant at the end, if the three terms all have the same units then the constant must be in the same units to the power 3, like if you have a volume then m*m*m the result is m^3 ? if so how do I do this for kg m^-1s^-2 ?

Mentor
Blog Entries: 1
 Quote by victoriafello Ok I think I see it now, So m^-3*m*m simplifies to m^-1 And s^-1*s^-1 simplifies to s^-2 So the units for ½ρv² would be kg m^-1s^-2 Then for the second term Units for density are kg*m^-3 Units for g are m*s^-2 Units for h are m This is [kg*m^-3]*[m*s^-2]*[m] Collecting the m terms gives m^-1 so the units are Kg m^-1s^-2
Good.

 Then all I need is the units for the constant at the end, if the three terms all have the same units then the constant must be in the same units to the power 3, like if you have a volume then m*m*m the result is m^3 ?
Don't confuse three terms (which add) with three factors (which multiply). All the terms have the same units, including the constant. So you're done.
 thanks so much for your help !!


text:
$$\renewcommand\AA{\unicode{x212B}}$$

# CalculateCarpenterSampleCorrection v1¶

## Summary¶

Calculates both absorption and multiple scattering corrections, originally used to correct vanadium spectrum at IPNS.

## Properties¶

Name

Direction

Type

Default

Description

InputWorkspace

Input

MatrixWorkspace

Mandatory

The name of the input workspace.

OutputWorkspaceBaseName

Output

WorkspaceGroup

Mandatory

Basename of the output workspace group for corrections.Absorption suffix = ‘_abs’. Multiple Scattering suffix = ‘_ms’.

AttenuationXSection

Input

number

2.8

Coefficient 1, absorption cross section / 1.81 if not set with SetSampleMaterial

ScatteringXSection

Input

number

5.1

Coefficient 3, total scattering cross section if not set with SetSampleMaterial

SampleNumberDensity

Input

number

0.0721

Coefficient 2, density if not set with SetSampleMaterial

Input

number

0.3175

Absorption

Input

boolean

True

If True then calculates the absorption correction.

MultipleScattering

Input

boolean

True

If True then calculates the multiple scattering correction.

## Description¶

This algorithm is a port to C++ of a multiple scattering absorption correction, used to correct the vanadium spectrum for the GPPD instrument at the IPNS. The correction calculation was originally worked out by Jack Carpenter and Asfia Huq and implemented in Java by Alok Chatterjee. The java code was translated to C++ in Mantid by Dennis Mikkelson.

• Elastic scattering is assumed

In [1] we see that the calculation of the attenuation factor F involves an integral over the sample cylinder. By expanding the integrands as a power series, we can factor out any dependence on scattering cross section and radius. These integral terms are denoted by $$Z_{mn}$$ and so we may write:

$\frac{1}{F} = \sum_{m=0}^\infty\sum_{n=0}^\infty\frac{(-1)^{m+n}}{m!n!}(\mu R)^{m+n} Z_{mn}(\theta)$

where $$\mu$$ is the inverse scattering length.

The functions $$Z_{mn}(\theta)$$ are written in terms of Chebyshev expansion coefficients:

$Z_{mn}(\theta) = \sum_{s=0}^\infty c_{s}(m,n)cos(s\theta)$

where the Chebyshev coefficients $$c_{s}(m,n)$$ up to m + n $$\leqslant$$ 5 have been tabulated and are stored as an array by the algorithm.

This version of the correction follows the implementation in [1] in that it only calculates for the correction in-plane, unlike [2], [3] that generalizes the correction to out-of-plane.

This algorithm calculates and outputs the absorption and/or multiple scattering correction workspaces to be applied to the InputWorkspace. Thus, there are, at most, two workspaces in the OutputWorkspaceBaseName group workspace. This allows for flexibility of applying either correction to a workspace without having to apply both (as is the case with CarpenterSampleCorrection v1). For the case where both corrections are calculated, the output will be the following:

1. The absorption correction workspace will be OutputWorkspaceBaseName + _abs and will be in .getItem(0).

2. The multiple scattering correction workspace will be OutputWorkspaceBaseName + _ms and will be in .getItem(1).

This is the child algorithm that CarpenterSampleCorrection v1 (previously known as MultipleScatteringCylinderAbsorption) uses to calculate and apply the correction to a sample workspace.

## Usage¶

Example: Calculate corrections for a simple cylindrical sample

ws = CreateSampleWorkspace("Histogram",NumBanks=1,BankPixelWidth=1)
ws = ConvertUnits(ws,"Wavelength")
ws = Rebin(ws,Params=[1])
SetSampleMaterial(ws,ChemicalFormula="V")

#restrict the number of wavelength points to speed up the example

Output:

Absorption Correction Output:  [ 0.85283805  0.79620318  0.74348494  0.69440412  0.64870017  0.62121997]
Multiply Scattering Correction Output:  [ 0.09633662  0.09991619  0.1034959   0.10705826  0.11058382  0.11280196]

To reproduce what CarpenterSampleCorrection v1 does, you can calculate and apply the correction as follows

Example: Apply correction for a simple cylindrical sample using getItem

ws = CreateSampleWorkspace("Histogram",NumBanks=1,BankPixelWidth=1)
ws = ConvertUnits(ws,"Wavelength")
ws = Rebin(ws,Params=[1])
SetSampleMaterial(ws,ChemicalFormula="V")

# Get absorption correction
absCorr = corrections.getItem(0)

# Get multiple scattering correction
msFactor  = corrections.getItem(1)
msCorr = Multiply(ws, msFactor)

# Apply absorption correction to workspace
ws_abs_corrected = Divide(ws, absCorr)

# Apply multiple scattering correction to workspace
ws_ms_corrected = Minus(ws, msCorr)

# Apply both corrections
wsOut = Minus(ws_abs_corrected, msCorr)

Output:

Absorption Corrected Output:  [  6.66892661   7.14329517  21.0999759    8.1904963    8.76755487
2.51509668]
Multiple Scattering Corrected Output:  [  5.13959844   5.11923959  14.06392099   5.07861898   5.05856725
1.38618331]
Combined Corrected Output:  [  6.1210107    6.57502041  19.47638255   7.58160094   8.13860778
2.33885171]

Example: Apply correction for a simple cylindrical sample using getItem

ws = CreateSampleWorkspace("Histogram",NumBanks=1,BankPixelWidth=1)
ws = ConvertUnits(ws,"Wavelength")
ws = Rebin(ws,Params=[1])
SetSampleMaterial(ws,ChemicalFormula="V")

#restrict the number of wavelength points to speed up the example
basename = "corrections"
CalculateCarpenterSampleCorrection(ws,OutputWorkspaceBaseName=basename,

# Get absorption correction
absCorr = mtd[basename+"_abs"]

# Get multiple scattering correction
msFactor = mtd[basename+"_ms"]
msCorr = Multiply(ws, msFactor)

# Apply absorption correction to workspace
ws_abs_corrected = Divide(ws, absCorr)

# Apply multiple scattering correction to workspace
ws_ms_corrected = Minus(ws, msCorr)

# Apply both corrections
wsOut = Minus(ws_abs_corrected, msCorr)

Output:

Absorption Corrected Output:  [  6.66892661   7.14329517  21.0999759    8.1904963    8.76755487
2.51509668]
Multiple Scattering Corrected Output:  [  5.13959844   5.11923959  14.06392099   5.07861898   5.05856725
1.38618331]
Combined Corrected Output:  [  6.1210107    6.57502041  19.47638255   7.58160094   8.13860778
2.33885171]


text:
# Connected components of schemes over $\mathbb{F}_1$

I'm reading Deitmar's paper on Schemes over $\mathbb{F}_1$. Proposition 2.4. states that for a scheme $X$ over $\mathbb{F}_1$ there is a bijection between $X(\mathbb{F}_1)$ and the set of connected components of $X$. I don't understand the proof, which is quite sketchy. Here is what I think:

Elements of $X(\mathbb{F}_1)$ correspond to morphisms $\mathrm{Spec}(\mathbb{F}_1) \to X$, where $\mathrm{Spec}(F_1)$ is the point together with the trivial monoid sheaf $1$. These morphisms correspond to a point $x \in X$ together with a local homomorphism $\mathcal{O}_{X,x} \to \{1\}$. But this is unique and exists iff $\mathcal{O}_{X,x} = \mathcal{O}_{X,x}^*$, i.e. iff the stalk is actually a group. Now to such a point we should associate to irreducible closed subset $\overline{\{x\}} \subseteq X$. But why should it be a connected component, and why does every one arise this way?

I can show that every irreducible scheme over $\mathbb{F}_1$ has exactly one generic point. So perhaps Proposition 2.4 should talk about irreducible components? I'm a bit confused. Also Deitmar's proof suggests implicitly that every $X$ is the disjoint union of its connected components, i.e. that they are open - but why should this be true? For ordinary schemes this is true at least in the noetherian case.

-

I think this is a simple topological statement using the following facts:

1. Every affine set has a unique generic point.

2. Every open set contains an affine open subset.

Let $X$ be a scheme over $F_1$. If $U$ and $V$ are affine open subsets with $U\cap V\ne \emptyset$, then their generic points coincide, as both generic points also form a generic point of any affine subset of $V\cap U$, which is unique.

Let now $U$ be an affine open subset of $X$ with generic point $\eta$. Let $Y$ be the union of all open affine subsets $V\subset X$ which contain $\eta$. Then every open subset of $Y$ contains $\eta$, which implies that $Y$ is connected. Further, $Y$ is open. We show that it also is closed. Let $Z$ be its complement and let $z\in Z$ a point. Let $W$ be an affine neighborhood of $z$. If $W$ has non-empty intersection with $Y$, then the generic point of $W$ coincides with $\eta$, therefore $W$ is a subset of $Y$ by the definition of $Y$. Hence $W\cap Y=\emptyset$, so $W\subset Z$, and $Z$ contains an open neighborhood of each of its points, so $Z$ is open.

We therefore get a bijection between the set of connected components of $X$ and the set of generic points of affine open subschemes.

Next for any affine open subscheme $U$ there is a unique morphism from $Spec(F_1)$ to $U$ mapping the unique point of $Spec(F_1)$ to the generic point of $U$.

We conclude that $Hom(Spec(F_1),X)$ stands in bijection to $\pi_0(X)$.

-
What do you mean by a generic point? If $k$ is a field, how many generic points does the affine scheme ${\rm Spec}(k+k)$ have? – M P Feb 4 '12 at 16:55
A generic point of a topological space is a point that is contained in every non-empty open subset. – Anton Feb 4 '12 at 17:29
@Xogn: Thank you! One also has to show that the sets $Y_{\eta}$ you describe partition $X$, but this is easy. And the $\eta$ correspond to the points I mention in my question, this gives an alternative finish for the proof. @MP: A point $x \in X$ is called generic if $\{x\}$ is dense in $X$. For a scheme $\mathrm{Spec}(A)$ over $\mathbb{Z}$, this point exists and is unique iff $\mathrm{rad}(A)$ is a prime ideal. For a scheme $\mathrm{Spec}(A)$ over $\mathbb{F}_1$ à la Deitmar, this always exists and is given by the prime ideal $\emptyset \subseteq A$. – Martin Brandenburg Feb 4 '12 at 17:41


text:
# Algebra/Topology seminar

Speaker: Pavel Safronov (Zurich).

Title: Categorified Grothendieck—Riemann—Roch theorem.

Abstract: The Grothendieck--Riemann--Roch theorem compares the Chern character of pushforward of a coherent sheaf along a smooth and proper map of varieties to the pushforward of the Chern character. Following the work of several people, it was understood in terms of functoriality of traces in symmetric monoidal categories. In this talk I will describe a categorification of the GRR theorem where one replaces coherent sheaves by quasi-coherent sheaves of categories. This is joint work with Marc Hoyois, Sarah Scherotzke and Nicolo Sibilla.


text:
## Cryptology ePrint Archive: Report 2005/462

A Simplified Quadratic Frobenius Primality Test

Martin Seysen

Abstract: The publication of the quadratic Frobenius primality test by Grantham, 1998 has stimulated a lot of researchin this area. In this test as well as in the Miller-Rabin test a composite number may be declared as probably prime. Repeating several tests decreases that error probability. While most research papers in this subject focus on minimising the error probability as a function of the number of tests (or, more generally, of the computational effort) asymptotically, we present a simplified variant SQFT of the quadratic Frobenius test. This test is so simple that it can easily be implemented on a smart card.

During prime number generation, a large number of composite numbers must be tested before a (probable) prime is found. Therefore we need a fast test, such as the Miller-Rabin test with a small basis, to rule out most prime candidates quickly before a promising candidate will be tested with a more sophisticated variant of the QFT. Our test SQFT makes optimum use of the information gathered by a previous Miller-Rabin test. It has run time equivalent to two Miller-Rabin tests; and it achieves a worst-case error probability of $2^{-12t}$ with $t$ tests.

Most cryptographic standards require an average-case error probability of at most $2^{-80}$ or $2^{-100}$, when prime numbers are generated in public key systems. Our test SQFT achieves an average-case error probability of $2^{-134}$ with two test rounds for $500-$bit primes. We also present a more sophisticated version SQFT3 of our test that has run time and worst-case error probability comparable to the test EQFTwc by Damgå rd and Frandsen, 2003, in all cases. Our test SQFT3 avoids the computation of cubic residuosity symbols, as required in the test EQFTwc.

Category / Keywords: implementation / primality testing, quadratic Frobenius test


text:
# Phylogenetic tree reconstruction

/ [practicals]   / #genetics #evolution #influenza

This practical aims to illustrate the basics of phylogenetic reconstruction using R, with an emphasis on how the methods work, how their results can be interpreted, and the relative advantages and limitations of the methods. Three main classes of phylogenetic approaches are introduced, namely distance-based, maximum parsimony, and maximum likelihood methods. We also illustrate how to assess the reliability of individual nodes using bootstrap, and show how a simple linear model can be used to estimate a molecular clock in rooted phylogenies. Methods are illustrated using a dataset of seasonal influenza isolates sampled in the US from 1993 to 2008.

# Introduction

## Phylogenetics in a nutshell

The reconstruction of evolutionary relationships of a set of organisms can be a tricky task, and has led to the development of a variety of methods over the last decades, implemented in an even larger number of software. However, these methods can be classified into three main categories:

• distance-based methods: compute a matrix of pairwise genetic distances between the studied taxa, and summarize it using a hierarchical clustering algorithm such as UPGMA or Neighbour-Joining. Advantages: fast (the fastest) and flexible (different genetic distances allow to account for different features of DNA sequence evolution). Limitations: no model comparison (can’t test for the ‘best’ tree, or the ‘best’ model of evolution); may be inaccurate and highly dependent on the distance and clustering algorithm chosen.

• maximum parsimony: seeks the tree with the smallest number of overall genetic changes between the taxa. This is achieved by changing randomly the topology of the tree until parsimony is no longer improved. Advantages: intuitive interpretation (assumes that the simplest scenario is the most likely), usually accurate when the amount of genetic changes is small. Limitations: computer-intensive, simplistic model of evolution, no model comparison, inaccurate when substantial evolution takes place, and when heterogeneous mutation rates exist in different parts of the tree.

• likelihood-based method: based on a model of sequence evolution which allows to compute a likelihood, that is, the probability of observing the data given the model and a set of parameters. There are two main branches of likelihood-based methods: maximum likelihood and Bayesian methods. The first seeks the ‘best’ tree and parameter values, i.e. the one maximizing the likelihood. The second derives samples of trees and model parameters which are the most consistent with the data and possible prior knowledge about the tree/parameters. Advantages: flexible (any model of evolution can be used), usually accurate, model selection possible, measure of uncertainty (in Bayesian approaches). Limitations: computer-intensive, model selection possibly cumbersome.

The R software implements one of the largest selections of phylogenetic methods, including all of the above except for Bayesian reconstruction.

## Required packages

This practical requires a working version of ~ (R Core Team 2017) greater than or equal to 2.15.2. It uses the following packages: stats implements basic hierarchical clustering routines, ade4 (Dray, Dufour, and Chessel 2007) and adegenet (Jombart 2008; Jombart and Ahmed 2011) are here used essentially for their graphics, ape [Paradis, Claude, and Strimmer (2004); Popescu2012-ct] is the core package for phylogenetics, and phangorn (Schliep 2011) implements parsimony and likelihood-based methods. Make sure that the dependencies are installed as well when installing the packages:

install.packages("adegenet", dep=TRUE)
install.packages("phangorn", dep=TRUE)

library(stats)
library(ape)
library(phangorn)

## The data

The data used in this practical are DNA sequences of seasonal influenza (H3N2) downloaded from Genbank http://www.ncbi.nlm.nih.gov/genbank/. Alignments have been realized beforehand using standard tools (Clustalw2 for basic alignment and Jalview for refining the results). We selected 80 isolates genotyped for the hemagglutinin (HA) segment sampled in the US from 1993 to 2008. The dataset consists of two files: i) usflu.fasta, a file containing aligned DNA sequences and ii) usflu.annot.csv, a comma-separated file containing useful annotations of the sequences.

First download these files (right-click → Save Link As…) and store them in a folder data/ in your working directory. To read the DNA sequences into R, we use fasta2DNAbin from the adegenet package:

dna <- fasta2DNAbin(file = "data/usflu.fasta")
dna
class(dna)
##
##  Converting FASTA alignment into a DNAbin object...
##
##
##  Finding the size of a single genome...
##
##
##  genome size is: 1,701 nucleotides
##
## ( 30  lines per genome )
##
##  Importing sequences...
## ........................................................................................................................................................................................................................................................................................................................................................................
##  Forming final object...
##
## ...done.
## 80 DNA sequences in binary format stored in a matrix.
##
## All sequences of same length: 1701
##
## Labels:
##  CY013200
##  CY013781
##  CY012128
##  CY013613
##  CY012160
##  CY012272
## ...
##
## Base composition:
##     a     c     g     t
## 0.335 0.200 0.225 0.239
## [1] "DNAbin"

Sequences are stored as DNAbin objects, an efficient representation of DNA/RNA sequences which use bytes (as opposed to character strings) to code nucleotides, resulting in considerable savings in terms of memory required to store the data. While the present dataset is very small, such compression can become essential for larger genomes (bacterial genomes are typically a few millions of nucleotides long). Note that for even larger datasets, more efficient data reduction can be achieved using the bit-level coding of polymorphic sites implemented in adegenet (Jombart and Ahmed 2011).

The annotation file is read in R using the standard procedure:

annot <- read.csv("data/usflu.annot.csv",
header = TRUE, row.names = 1, stringsAsFactors = FALSE)
head(annot)
##   accession year                        misc
## 1  CY013200 1993 (A/New York/783/1993(H3N2))
## 2  CY013781 1993 (A/New York/802/1993(H3N2))
## 3  CY012128 1993 (A/New York/758/1993(H3N2))
## 4  CY013613 1993 (A/New York/766/1993(H3N2))
## 5  CY012160 1993 (A/New York/762/1993(H3N2))
## 6  CY012272 1994 (A/New York/729/1994(H3N2))
dim(annot)
## [1] 80  3

accession contains the Genbank accession numbers, which are unique sequence identifiers; year is the year of collection of the isolates; misc contains other possibly useful information. Before going further, we check that isolates are identical in both files (accession numbers are used as labels for the sequences):

dim(dna)
## [1]   80 1701
dim(annot)
## [1] 80  3
all(annot$accession == rownames(dna)) ## [1] FALSE table(annot$year)
##
## 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007
##    5    5    5    5    5    5    5    5    5    5    5    5    5    5    5
## 2008
##    5

Good! The data we will analyse are 80 isolates (5 per year) typed for the same 1701 nucleotides.

# Distance-based phylogenies

Distance-based phylogenetic reconstruction consists in i) computing pairwise genetic distances between individuals (here, isolates), ii) representing these distances using a tree, and iii) evaluating the relevance of this representation.

## Computing genetic distances

We first compute genetic distances using *ape*’s dist.dna, which proposes no less than 15 different genetic distances (see ?dist.dna for details). Here, we use Tamura and Nei 1993’s model (Tamura and Nei 1993) which allows for different rates of transitions and transversions, heterogeneous base frequencies, and between-site variation of the substitution rate.

D <- dist.dna(dna, model = "TN93")
class(D)
## [1] "dist"
length(D)
## [1] 3160

D is an object of class dist which contains the distances between every pairs of sequences.

Now that genetic distances between isolates have been computed, we need to visualize this information. There are n(n-1)/2 distances for n sequences; here, n=80 so that the genetic relationships between the sampled isolates are described by 80 79 / 2 = 3160 pairwise distances. Most of the time, summarising such information is not entirely trivial. The simplest approach is plotting directly the matrix of pairwise distances:

temp <- as.data.frame(as.matrix(D))
table.paint(temp, cleg = 0, clabel.row = .5, clabel.col = .5)

Darker shades of grey represent greater distances. Note that to use image to produce similar plots, data need to be transformed first; for instance:

temp <- t(as.matrix(D))
temp <- temp[,ncol(temp):1]
par(mar = c(1,5,5,1))
image(x = 1:80, y = 1:80, temp, col = rev(heat.colors(100)),
xaxt = "n", yaxt = "n", xlab="",ylab="")
axis(side = 2, at = 1:80, lab = rev(rownames(dna)), las = 2, cex.axis = .5)
axis(side = 3, at = 1:80, lab = rownames(dna), las = 3, cex.axis = .5)

(see image.plot in the package fields for similar plots with a legend).

Since the data are roughly ordered by year, we can already see some genetic structure appearing, but this is admittedly not the most satisfying or informative approach, and tells us little about the evolutionary relationships between our isolates.

## Building trees

We use trees to get a better representation of the genetic distances between individuals. It is important, however, to bear in mind that the obtained trees are not necessarily efficient representations of the original distances, and information can (and likely will) be lost in the process.

A wide array of algorithms for constructing trees from a distance matrix are available in R, including:

• nj (ape package): the classical Neighbor-Joining algorithm.

• bionj (ape): an improved version of Neighbor-Joining.

• fastme.bal and fastme.ols (ape): minimum evolution algorithms. hclust (stats): classical hierarchical clustering algorithms including single linkage, complete linkage, UPGMA, and others.

Here, we go for the standard:

tre <- nj(D)
class(tre)
## [1] "phylo"
tre
##
## Phylogenetic tree with 80 tips and 78 internal nodes.
##
## Tip labels:
##   CY013200,  CY013781,  CY012128,  CY013613,  CY012160,  CY012272, ...
##
## Unrooted; includes branch lengths.
plot(tre, cex = .6)
title("A simple NJ tree")

Trees created in the package ape are instances of the class phylo. See ?read.tree for a description of this class.

## Plotting trees

The plotting method offers many possibilities for plotting trees; see ?plot.phylo for more details. Functions such as tiplabels, nodelabels, edgelabels and axisPhylo can also be useful to annotate trees. For instance, we may simply represent years using different colors (red = ancient; blue = recent):

plot(tre, show.tip = FALSE)
title("Unrooted NJ tree")
myPal <- colorRampPalette(c("red","yellow","green","blue"))
tiplabels(annot$year, bg = num2col(annot$year, col.pal = myPal),
cex=.5)
temp <- pretty(1993:2008, 5)
legend("bottomleft", fill = num2col(temp, col.pal = myPal),
leg = temp, ncol = 2)

This illustrates a common mistake when interpreting phylogenetic trees. In the above figures, we tend to assume that the left-side of the phylogeny is ancestral’, while the right-side is ‘recent’. This is wrong (as suggested by the colors) unless the phylogeny is actually rooted, i.e. some external taxa has been used to define what is the most ‘ancient’ split in the tree. The present tree is not rooted, and should be better represented as such:

plot(tre, type = "unrooted", show.tip = FALSE)
title("Unrooted NJ tree")
tiplabels(tre$tip.label, bg = num2col(annot$year, col.pal = myPal),
cex = .5)

In the present case, a sensible rooting would be any of the most ancient isolates (from 1993). We can take the first one:

head(annot)
##   accession year                        misc
## 1  CY013200 1993 (A/New York/783/1993(H3N2))
## 2  CY013781 1993 (A/New York/802/1993(H3N2))
## 3  CY012128 1993 (A/New York/758/1993(H3N2))
## 4  CY013613 1993 (A/New York/766/1993(H3N2))
## 5  CY012160 1993 (A/New York/762/1993(H3N2))
## 6  CY012272 1994 (A/New York/729/1994(H3N2))
tre2 <- root(tre, out = 1)
tre2 <- ladderize(tre2)

and plot the result:

plot(tre2, show.tip = FALSE, edge.width = 2)
title("Rooted NJ tree")
tiplabels(tre$tip.label, bg = transp(num2col(annot$year, col.pal = myPal),.7),
cex = .5, fg = "transparent")
axisPhylo()
temp <- pretty(1993:2008, 5)
legend("topright",
fill = transp(num2col(temp, col.pal = myPal),.7),
leg = temp, ncol = 2)

The phylogeny is now rooted. The shape of this tree is typical of influenza. What can you say about the evolution of influenza and the fitness of different viral lineages, based on this tree? What does the ‘trunk’ of this tree represent? Would there be any interest in predicting the genome of the trunk?

## Estimating a molecular clock

Rooted trees are also useful for assessing the rate of evolution of a given gene. We call molecular clock the accumulation of mutations over time. Can you visually assess if there are signs of a molecular clock in this tree? A quantitative analysis is very easy to perform, and merely relies on regressing the number of mutations from the root to the time of divergence from the root:

mutFromRoot <- as.matrix(dist.dna(dna, model = "N"))[1,]
yearFromRoot <- annot$year - annot$year[1]
plot(mutFromRoot ~ yearFromRoot, xlab = "Years from the root",
ylab = "Mutations from the root", main = "H3N2 molecular clock")
lm.clock <- lm(mutFromRoot ~ -1 + yearFromRoot)
abline(lm.clock, col = "blue",lwd = 2)

summary(lm.clock)
##
## Call:
## lm(formula = mutFromRoot ~ -1 + yearFromRoot)
##
## Residuals:
##     Min      1Q  Median      3Q     Max
## -12.327  -1.577   1.004   6.386  13.000
##
## Coefficients:
##              Estimate Std. Error t value Pr(>|t|)
## yearFromRoot  7.73274    0.07443   103.9   <2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 5.86 on 79 degrees of freedom
## Multiple R-squared:  0.9927, Adjusted R-squared:  0.9926
## F-statistic: 1.079e+04 on 1 and 79 DF,  p-value: < 2.2e-16
lm.clock$coefficients ## yearFromRoot ## 7.732742 lm.clock$coefficients/ncol(dna)
## yearFromRoot
##  0.004545998
365/ lm.clock$coefficients ## yearFromRoot ## 47.20189 What is the substitution rate per year for the HA segment? What is the substitution rate per year and per site? On average, how many days would you expect to wait before observing one mutation on a transmission chain? Knowing that the generation time of influenza is roughly around 2-3 days, would you recommend using HA sequences for reconstructing transmission trees of influenza epidemics? What alternative would you suggest? ## Assessing the quality of a phylogeny Many genetic distances and hierarchical clustering algorithms can be used to build trees; not all of them are appropriate for a given dataset. Genetic distances rely on hypotheses about the evolution of DNA sequences which should be taken into account. For instance, the mere proportion of differing nucleotides between sequences (model = 'raw} in dist.dna) is easy to interprete, but only makes sense if all substitutions are equally frequent. In practice, simple yet flexible models such as that of Tamura and Nei (Tamura and Nei 1993) are probably fair choices. At the very least, the genetic distance used should allow different rates for transitions (a <-> g, c <-> t) and transversions (other changes). Once one has chosen an appropriate genetic distance and built a tree using this distance, an essential yet most often overlooked question is whether this tree actually is a good representation of the original distance matrix. This is easily investigated using simple biplots and correlation indices. The function cophenetic is used to compute distances between the tips of the tree. Note that more distances are available in the adephylo package (see distTips function). x <- as.vector(D) y <- as.vector(as.dist(cophenetic(tre2))) plot(x, y, xlab = "original pairwise distances", ylab = "pairwise distances on the tree", main = "Is NJ appropriate?", pch = 20, col = transp("black",.1), cex = 3) abline(lm(y~x), col = "red") cor(x,y)^2 ## [1] 0.9975154 As it turns out, our Neighbor-Joining tree (tre2) is a very good representation of the chosen genetic distances. Things would have been different had we chosen, for instance, UPGMA: tre3 <- as.phylo(hclust(D,method = "average")) y <- as.vector(as.dist(cophenetic(tre3))) plot(x, y, xlab = "original pairwise distances", ylab = "pairwise distances on the tree", main = "Is UPGMA appropriate?", pch = 20, col = transp("black",.1), cex = 3) abline(lm(y~x), col = "red") cor(x,y)^2 ## [1] 0.7393009 In this case, UPGMA is a poor choice. Why is this? A first explanation is that UPGMA forces ultrametry (all the tips are equidistant to the root): plot(tre3, cex = .5) title("UPGMA tree") The underlying assumption is that all lineages have undergone the same amount of evolution, which is obviously not the case in seasonal influenza sampled over 16 years. Another validation of phylogenetic trees, much more commonly used, is bootstrap. Bootstrapping a phylogeny consists in sampling the nucleotides with replacement, rebuilding the phylogeny, and checking if the original nodes are present in the bootstrapped trees. In practice, this procedure is repeated a large number of times (e.g. 100, 1000), depending on how computer-intensive the phylogenetic reconstruction is. The underlying idea is to assess the variability in the obtained topology which results from conducting the analyses on a random sample the genome. Note that the assumption that the analysed sequences represent a random sample of the genome is often dubious. For instance, this is not the case in our toy dataset, since HA segment has a different rate of evolution and experiences different selective pressures from other segments of the influenza genome. We nonetheless illustrate the procedure, implemented by boot.phylo: myBoots <- boot.phylo(tre2, dna, function(e) root(nj(dist.dna(e, model = "TN93")),1)) myBoots The output gives the number of times each node was identified in bootstrapped analyses (the order is the same as in the original object). It is easily represented using nodelabels: plot(tre2, show.tip = FALSE, edge.width = 2) title("NJ tree + bootstrap values") tiplabels(frame = "none", pch = 20, col = transp(num2col(annot$year, col.pal = myPal),.7),
cex = 3, fg = "transparent")
axisPhylo()
temp <- pretty(1993:2008, 5)
legend("topright", fill = transp(num2col(temp, col.pal = myPal),.7),
leg = temp, ncol = 2)
nodelabels(myBoots, cex = .6)

As we can see, some nodes are very poorly supported. One common practice is to collapse these nodes into multifurcations. There is no dedicated method for this in ape, but one simple workaround consists in setting the corresponding edges to a length of zero (here, with bootstrap <70%), and then collapsing the small branches:

temp <- tre2
N <- length(tre2$tip.label) toCollapse <- match(which(myBoots<70)+N, temp$edge[,2])
temp$edge.length[toCollapse] <- 0 tre3 <- di2multi(temp, tol = 0.00001) The new tree might be slightly less informative, but more robust than the previous one: plot(tre3, show.tip = FALSE, edge.width = 2) title("NJ tree after collapsing weak nodes") tiplabels(tre3$tip.label, bg = transp(num2col(annot$year, col.pal = myPal), .7), cex = .5, fg = "transparent") axisPhylo() temp <- pretty(1993:2008, 5) legend("topright", fill = transp(num2col(temp, col.pal = myPal), .7), leg = temp, ncol = 2) # Maximum parsimony phylogenies ## Introduction Phylogenetic reconstruction based on parsimony seeks trees which minimize the total number of changes (substitutions) from ancestors to descendents. While a number of criticisms can be made to this approach, it is a simple way to infer phylogenies for data which display low divergence (i.e. most taxa differ from each other by only a few nucleotides, and the overall substitution rate is low). In practice, there is often no way to perform an exhaustive search amongst all possible trees to find the most parsimonious one, and heuristic algorithms are used to browse the space of possible trees. The strategy is fairly simple: i) initialize the algorithm using a tree and ii) make small changes to the tree and retain those leading to better parsimony, until the parsimony score stops improving. ## Implementation Parsimony-based phylogenetic reconstruction is implemented in the package phangorn. It requires a tree (in *ape*’s format, i.e. a phylo object) and the original DNA sequences in *phangorn*’s own format, phyDat. We convert the data and generate a tree to initialize the method: dna2 <- as.phyDat(dna) class(dna2) ## [1] "phyDat" dna2 ## 80 sequences with 1701 character and 269 different site patterns. ## The states are a c g t tre.ini <- nj(dist.dna(dna,model = "raw")) tre.ini ## ## Phylogenetic tree with 80 tips and 78 internal nodes. ## ## Tip labels: ## CY013200, CY013781, CY012128, CY013613, CY012160, CY012272, ... ## ## Unrooted; includes branch lengths. The parsimony of a given tree is given by: parsimony(tre.ini, dna2) ## [1] 422 Then, optimization of the parsimony is achieved by: tre.pars <- optim.parsimony(tre.ini, dna2) ## Final p-score 420 after 2 nni operations tre.pars ## ## Phylogenetic tree with 80 tips and 78 internal nodes. ## ## Tip labels: ## CY013200, CY013781, CY012128, CY013613, CY012160, CY012272, ... ## ## Unrooted; no branch lengths. Here, the final result is very close to the original tree. The obtained tree is unrooted and does not have branch lengths, but it can be plotted as previously: plot(tre.pars, type = "unr", show.tip = FALSE, edge.width = 2) title("Maximum-parsimony tree") tiplabels(tre.pars$tip.label, bg = transp(num2col(annot$year, col.pal = myPal),.7), cex = .5, fg = "transparent") temp <- pretty(1993:2008, 5) legend("bottomright", fill = transp(num2col(temp, col.pal = myPal),.7), leg = temp, ncol = 2, bg = transp("white")) In this case, parsimony gives fairly consistent results with other approaches, which is only to be expected whenever the amount of divergence between the sequences is fairly low, as is the case in our data. # Maximum likelihood phylogenies ## Introduction Maximum likelihood phylogenetic reconstruction is somehow similar to parsimony methods in that it browses a space of possible tree topologies looking for the ‘best’ tree. However, it offers far more flexibility in that any model of sequence evolution can be taken into account. Given one model of evolution, one can compute the likelihood of a given tree, and therefore optimization procedures can be used to infer both the most likely tree topology and model parameters. As in distance-based methods, model-based phylogenetic reconstruction requires thinking about which parameters should be included in a model. Usually, all possible substitutions are allowed to have different rates, and the substitution rate is allowed to vary across sites according to a gamma distribution. We refer to this model as GTR + Γ(4) (GTR: global time reversible). More information about phylogenetic models can be found in (Kelchner and Thomas 2007). ## Getting a ML tree Likelihood-based phylogenetic reconstruction is implemented in the package phangorn. As in the previous section, we use the data dna2, converted into *phangorn*’s format. We choose a Neighbor-Joining tree of Tamura and Nei’s 1993 distance to get an initial tree. class(dna2) ## [1] "phyDat" dna2 ## 80 sequences with 1701 character and 269 different site patterns. ## The states are a c g t tre.ini <- nj(dist.dna(dna,model = "TN93")) tre.ini ## ## Phylogenetic tree with 80 tips and 78 internal nodes. ## ## Tip labels: ## CY013200, CY013781, CY012128, CY013613, CY012160, CY012272, ... ## ## Unrooted; includes branch lengths. This tree is most likely not the ML tree, but we need it as a ‘reasonable’ starting point to initialize the optimization procedure. The likelihood of this initial tree is computed using pml: fit.ini <- pml(tre.ini, dna2, k = 4) ## negative edges length changed to 0! fit.ini ## ## loglikelihood: -5641.785 ## ## unconstrained loglikelihood: -4736.539 ## Discrete gamma model ## Number of rate categories: 4 ## Shape parameter: 1 ## ## Rate matrix: ## a c g t ## a 0 1 1 1 ## c 1 0 1 1 ## g 1 1 0 1 ## t 1 1 1 0 ## ## Base frequencies: ## 0.25 0.25 0.25 0.25 We now have all the information needed for seeking a maximum likelihood solution using optim.pml; we specify that we want to optimize tree topology (optNni = TRUE), base frequencies (optBf = TRUE), the rates of all possible subtitutions (optQ = TRUE), and use a gamma distribution to model variation in the substitution rates across sites (optGamma = TRUE): fit <- optim.pml(fit.ini, optNni = TRUE, optBf = TRUE, optQ = TRUE, optGamma = TRUE) fit ## ## loglikelihood: -5325.723 ## ## unconstrained loglikelihood: -4736.539 ## Discrete gamma model ## Number of rate categories: 4 ## Shape parameter: 0.2676999 ## ## Rate matrix: ## a c g t ## a 0.0000000 1.9788788 6.6454555 0.6487415 ## c 1.9788788 0.0000000 0.1715952 8.2484828 ## g 6.6454555 0.1715952 0.0000000 1.0000000 ## t 0.6487415 8.2484828 1.0000000 0.0000000 ## ## Base frequencies: ## 0.3368452 0.1978542 0.2244658 0.2408349 class(fit) ## [1] "pml" names(fit) ## [1] "logLik" "inv" "k" "shape" "Q" "bf" "rate" ## [8] "siteLik" "weight" "g" "w" "eig" "data" "model" ## [15] "INV" "ll.0" "tree" "lv" "call" "df" "wMix" ## [22] "llMix" fit is a list with class pml storing various useful information about the model parameters and the optimal tree (stored in fit$tree). In this example, we can see from the output that transitions (a <-> g and c <-> t) are much more frequent than transversions (other changes), which is consistent with biological expectations (transversions induce more drastic changes of chemical properties of the DNA and are more prone to purifying selection). One advantage of using probabilistic models of evolution is that different models can be compared formally. For instance, here, we can verify that the optimized tree is indeed better than the original one using standard likelihood ratio tests and AIC:

anova(fit.ini, fit)
## Likelihood Ratio Test Table
##   Log lik.  Df Df change Diff log lik. Pr(>|Chi|)
## 1  -5641.8 158
## 2  -5325.7 166         8        632.13  < 2.2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
AIC(fit.ini)
## [1] 11599.57
AIC(fit)
## [1] 10983.45

Both the likelihood ratio test (highly significant, function anova) and the AIC (lower = better) indicate that the new tree is a better model of the data than the initial one.

We can extract and plot the tree as we did before with other methods:

tre4 <- root(fit$tree,1) tre4 <- ladderize(tre4) plot(tre4, show.tip = FALSE, edge.width = 2) title("Maximum-likelihood tree") tiplabels(annot$year,
bg = transp(num2col(annot\$year, col.pal = myPal), .7),
cex = .5, fg = "transparent")
axisPhylo()
temp <- pretty(1993:2008, 5)
legend("topright", fill = transp(num2col(temp, col.pal = myPal), .7),
leg = temp, ncol = 2)`

This tree is statistically better than the original NJ tree based on Tamura and Nei’s distance (Tamura and Nei 1993). However, we can note that it is remarkably similar to the ‘robust’ version of this distance-based tree (after collapsing weakly supported nodes). The structure of this dataset is fairly simple, and all methods give fairly consistent results. In practice, different methods can lead to different interpretations, and it is often worth exploring different approaches before drawing conclusions on the data.

## Contributors

• Thibaut Jombart: initial version

Contributions are welcome via pull requests. The source file if this document can be found here.

# References

Dray, Stéphane, Anne B Dufour, and Daniel Chessel. 2007. “The Ade4 package-II: Two-Table and K-Table Methods.” R News 7 (2):47–52.

Jombart, Thibaut. 2008. “Adegenet: A R Package for the Multivariate Analysis of Genetic Markers.” Bioinformatics 24 (11):1403–5.

Jombart, Thibaut, and Ismaïl Ahmed. 2011. “Adegenet 1.3-1: New Tools for the Analysis of Genome-Wide SNP Data.” Bioinformatics 27 (21):3070–1.

Kelchner, Scot A, and Michael A Thomas. 2007. “Model Use in Phylogenetics: Nine Key Questions.” Trends Ecol. Evol. 22 (2):87–94.

Paradis, Emmanuel, Julien Claude, and Korbinian Strimmer. 2004. “APE: Analyses of Phylogenetics and Evolution in R Language.” Bioinformatics 20 (2):289–90.

R Core Team. 2017. “R: A Language and Environment for Statistical Computing.” Vienna, Austria: R Foundation for Statistical Computing.

Schliep, Klaus Peter. 2011. “Phangorn: Phylogenetic Analysis in R.” Bioinformatics 27 (4):592–93.

Tamura, K, and M Nei. 1993. “Estimation of the Number of Nucleotide Substitutions in the Control Region of Mitochondrial DNA in Humans and Chimpanzees.” Mol. Biol. Evol. 10 (3):512–26.


text:
# plotnine.facets.facet_wrap¶

class plotnine.facets.facet_wrap(facets=None, nrow=None, ncol=None, scales='fixed', shrink=True, labeller='label_value', as_table=True, drop=True, dir='h')[source]

Wrap 1D Panels onto 2D surface

Parameters
facetsformula | tuple | list

Variables to groupby and plot on different panels. If a formula is used it should be right sided, e.g '~ a + b', ('a', 'b')

nrowint, optional

Number of rows

ncolint, optional

Number of columns

scalesstr in ['fixed', 'free', 'free_x', 'free_y']

Whether x or y scales should be allowed (free) to vary according to the data on each of the panel. Default is 'fixed'.

shrinkbool

Whether to shrink the scales to the output of the statistics instead of the raw data. Default is True.

labellerstr | function

How to label the facets. If it is a str, it should be one of 'label_value' 'label_both' or 'label_context'. Default is 'label_value'

as_tablebool

If True, the facets are laid out like a table with the highest values at the bottom-right. If False the facets are laid out like a plot with the highest value a the top-right. Default it True.

dropbool

If True, all factor levels not used in the data will automatically be dropped. If False, all factor levels will be shown, regardless of whether or not they appear in the data. Default is True.

dirstr in ['h', 'v']

Direction in which to layout the panels. h for horizontal and v for vertical.


text:
Converting Ed25519 public key to a Curve25519 public key

$$x_{montgomery} = \frac{1 + y_{edwards}}{1 - y_{edwards}}$$

Using the libsodium ed25519 implementation, I have tried to write the following:

void keypair_2(unsigned char *pk, unsigned char *sk)
{
ge_p3 A;
int i;

sk[0] &= 248;
sk[31] &= 63;
sk[31] |= 64;

ge_scalarmult_base(&A,sk); // generate ed25519 public from sk.

fe one;
fe u, v, vinv;
fe montx;
fe_1(one);
fe_sub(v, one, A.Y); //v = 1-y
fe_add(u, A.Y, one); //u = y+1
fe_invert(vinv, v); //vinv = v^(-1) = (1-y)^(-1)
fe_mul(montx, u, vinv); //montx = u/v = (y+1)/(1-y)
fe_tobytes(pk, montx);
}

And I have compared this against the curve25519 implementation, but I am getting differing results.

I am unsure as to my error.

-
In my own application I chose to use Ed25519 public keys in the public API, even for key-exchange. Then convert the public key to montgomery during key-exchange. That's slightly more expensive, but makes the API nicer since there is only one kind of public key visible to the consumer. I also think that it's possible to convert the key-exchange to use Ed25519 natively, removing the performance penalty, but didn't get around to investigating that yet. –  CodesInChaos Aug 2 '13 at 12:10
@CodesInChaos - I am doing the same (using Ed25519 as the public key). It is probably possible to implement DH in Ed25519 natively, but I am not sufficiently confident in my ability to do so without messing up. I understand ImperialViolet has such an implementation? –  user7868 Aug 2 '13 at 12:18
You can add github.com/nightcracker/ed25519/blob/master/src/key_exchange.c to your project. It should be compatible with the rest of your implementation. It takes an Ed25519 public key, converts it to montgomery, and then computes a scalar multiplication. Don't forget to add a hashing step in the end, preferably one that's compatible with NaCl. That's what I do in my C# port. –  CodesInChaos Aug 2 '13 at 12:22

ge_scalarmult_base returns GroupElementP3 which doesn't have (x, y) as members. It has X, Y, Z from which you can compute x = X / Z and y = Y / Z.

So you have two choices:

1. Compress the point with ge_tobytes:

byte[32] Abytes;
fe y;

ge_scalarmult_base(&A,sk);

ge_tobytes(Abytes, &A);
fe_frombytes(&y, Abytes);

// your code here using y instead of A.Y

The downside of this technique is that it costs two field inversions. So I'd only use it if the input is a compressed point.

2. Modify the formula to work with X, Y, Z coordinates:

$$x_{mont} = \frac{1+y_{ed}}{1-y_{ed}} = \frac{1+\frac{Y}{Z}}{1-\frac{Y}{Z}} = \frac{Z+Y}{Z-Y}$$

fe_sub(v, A.Z, A.Y); //v = Z - Y
fe_add(u, A.Y, A.Z); //u = Z + Y

This solution is preferable if you just computed the point without having reduced yet. Typically directly after a scalar multiplication.

-
Thanks very much! Both solutions were helpful. –  user7868 Aug 2 '13 at 12:03

Support for this has now (2014-08-05) been added to Sodium.

Implement ed25519 -> curve25519 keys conversion

Look at test/default/ed25519_convert.c for some example code.

-


text:
# Extended NPDA implementation

In Formal Grammars course we have a task to implement an extended NPDA (a pushdown automata where taking any amount of symbols from the stack is allowed (including ε) and it can be in several configurations at the same time) in any programming language. It can be one that accepts with a state or an empty stack.

I have looked around and all implementation algorithms I have found do not allow for transitions like (ε/ε)/A (read nothing, take out of stack nothing, just add A to stack). The problem of course is that there is (as far as I know) no sure way to terminate this kind of branch and, if indeed, input string does not belong to this language, it would just infinitely try to loop and loop these kinds of transitions.

So, my question is - how to implement an extended NPDA? How to know when to stop generating a branch and say "this branch goes nowhere, terminate it"?

Here is an example automata - accepts palindromes.

• A related post, Is it decidable for a NPDA to halt? May 20 at 18:01
• It looks like you are asking how we can know when to stop extending a branch and say this branch can be ignored. Given an extended npda, there should be a constant $c$ and $k$ such that for any $w$ that is accepted, there is a branch that accepts it with no more than $c|w|^k$ steps. In this sense, every extended npda is effective. Can $k\le3$ or even $k=1$? May 20 at 18:03


text:
phased.RangeResponse

Range response

Description

The phased.RangeResponse System object™ performs range filtering on fast-time (range) data, using either a matched filter or an FFT-based algorithm. The output is typically used as input to a detector. Matched filtering improves the SNR of pulsed waveforms. For continuous FM signals, FFT processing extracts the beat frequency of FMCW waveforms. Beat frequency is directly related to range.

The input to the range response object is a radar data cube. The organization of the data cube follows the Phased Array System Toolbox™ convention.

• The first dimension of the cube represents the fast-time samples or ranges of the received signals.

• The second dimension represents multiple spatial channels, such as different sensors or beams.

• The third dimension, slow-time, represent pulses.

Range filtering operates along the fast-time dimension of the cube. Processing along the other dimensions is not performed. If the data contains only one channel or pulse, the data cube can contain fewer than three dimensions. Because this object performs no Doppler processing, you can use the object to process noncoherent radar pulses.

The output of the range response object is also a data cube with the same number of dimensions as the input. Its first dimension contains range-processed data but its length can differ from the first dimension of the input data cube.

To compute the range response:

1. Define and set up your phased.RangeResponse System object. See Construction.

2. Call the step method to compute the range response using the properties you specify for the phased.RangeResponse System object.

Note

Instead of using the step method to perform the operation defined by the System object, you can call the object with arguments, as if it were a function. For example, y = step(obj,x) and y = obj(x) perform equivalent operations.

Construction

response = phased.RangeResponse creates a range response System object, response.

response = phased.RangeResponse(Name,Value) creates a System object, response, with each specified property Name set to the specified Value. You can specify additional name and value pair arguments in any order as (Name1,Value1,...,NameN,ValueN).

Properties

expand all

Range processing method, specified as 'Matched filter' or 'FFT'.

• 'Matched filter' — The object match-filters the incoming signal. This approach is commonly used for pulsed signals, where the matched filter is the time reverse of the transmitted signal.

• 'FFT' — The object applies an FFT to the input signal. This approach is commonly used for chirped signals such as FMCW and linear FM pulsed signals.

Example: 'Matched filter'

Data Types: char

Signal propagation speed, specified as a real-valued positive scalar. Units are in meters per second. The default propagation speed is the value returned by physconst('LightSpeed').

Example: 3e8

Data Types: single | double

Signal sample rate, specified as a positive real-valued scalar. Units are in hertz.

Example: 1e6

Data Types: single | double

Linear FM sweep slope, specified as a scalar. The fast-time dimension of the signal input argument to step must correspond to sweeps having this slope.

Example: 1.5e9

Dependencies

To enable this property, set the RangeMethod property to 'FFT'.

Data Types: single | double

Option to enable dechirping of input signals, specified as false or true. Set this property to false to indicate that the input signal is already dechirped and no dechirp operation is necessary. Set this property to true when the input signal requires dechirping.

Dependencies

To enable this property, set the RangeMethod property to 'FFT'.

Data Types: logical

Decimation factor for dechirped signals, specified as a positive integer. The decimation algorithm uses a 30th-order FIR filter generated by fir1(30,1/D), where D is the decimation factor. The default value of 1 implies no decimation.

When processing FMCW signals, decimating the dechirped signal is useful for reducing the load on A/D converters.

Dependencies

To enable this property, set the RangeMethod property to 'FFT' and the DechirpInput property to true.

Data Types: single | double

Source of the FFT length used for the range processing of dechirped signals, specified as 'Auto' or 'Property'.

• 'Auto' — The FFT length equals the length of the fast-time dimension of the input data cube.

• 'Property' — Specify the FFT length by using the RangeFFTLength property.

Dependencies

To enable this property, set the RangeMethod property to 'FFT'.

Data Types: char

FFT length used for range processing, specified as a positive integer.

Dependencies

To enable this property, set the RangeMethod property to 'FFT' and the RangeFFTLengthSource property to 'Property'

Data Types: single | double

FFT weighting window for range processing, specified as 'None', 'Hamming', 'Chebyshev', 'Hann', 'Kaiser', 'Taylor', or 'Custom'.

If you set this property to 'Taylor', the generated Taylor window has four nearly constant sidelobes next to the mainlobe.

Dependencies

To enable this property, set the RangeMethod property to 'FFT'.

Data Types: char

Sidelobe attenuation for range processing, specified as a positive scalar. Attenuation applies to Kaiser, Chebyshev, or Taylor windows. Units are in dB.

Dependencies

To enable this property, set the RangeMethod property to 'FFT' and the RangeWindow property to 'Kaiser', 'Chebyshev', or 'Taylor'.

Data Types: single | double

Custom window for range processing, specified as a function handle or a cell array containing a function handle as its first entry. If you do not specify a window length, the object computes the window length and passes that into the function. If you specify a cell array, the remaining cells of the array can contain arguments to the function. If you use only the function handle without passing in arguments, all arguments take their default values.

If you write your own window function, the first argument must be the length of the window.

Note

Instead of using a cell array, you can pass in all arguments by constructing a handle to an anonymous function. For example, you can set the value of CustomRangeWindow to @(n)taylorwin(n,nbar,sll), where you have previously set the values of nbar and sll.

Example: {@taylor,5,-35}

Dependencies

To enable this property, set the RangeMethod property to 'FFT' and the RangeWindow property to 'Custom'.

Data Types: function_handle | cell

Set reference range at center of range grid, specified as true or false. Setting this property to true enables you to set the reference range at the center of the range grid. Setting this property to false sets the reference range to the beginning of the range grid.

Dependencies

To enable this property, set the RangeMethod to 'FFT'.

Data Types: logical

Reference range of the range grid, specified as a nonnegative scalar.

• If you set the RangeMethod property to 'Matched filter', the reference range is set to the start of the range grid.

• If you set the RangeMethod property to 'FFT', the reference range is determined by the ReferenceRangeCentered property.

• When you set the ReferenceRangeCentered property to true, the reference range is set to the center of the range grid.

• When you set the ReferenceRangeCentered property to false, the reference range is set to the start of the range grid.

Units are in meters.

This property is tunable.

Example: 1000.0

Data Types: single | double

The source of the maximum number of samples the input signal, specified as 'Auto' or 'Property'. When you set this property to 'Auto', the object automatically allocates enough memory to buffer the first input signal. When you set this property to 'Property', you specify the maximum number of samples in the input signal using the MaximumNumInputSamples property. Any input signal longer than that value is truncated.

To use this object with variable-size input signals in a MATLAB® Function Block in Simulink®, set the MaximumNumInputSamplesSource property to 'Property' and set a value for the MaximumNumInputSamples property.

Example: 'Property'

Maximum number of samples in the input signal, specified as a positive integer. Any input signal longer than this value is truncated. The input signal is the first argument to the step method. The number of samples is the number of rows in the input.

Example: 2048

Dependencies

To enable this property, set the RangeMethod property to 'Matched filter' and set the MaximumNumInputSamplesSource property to 'Property'.

Data Types: single | double

Methods

 plotResponse Plot range response step Range response
Common to All System Objects
release

Allow System object property value changes

Examples

collapse all

Compute the radar range response of three targets by using the phased.RangeResponse System object™. The transmitter and receiver are collocated isotropic antenna elements forming a monostatic radar system. The transmitted signal is a linear FM waveform with a pulse repetition interval of 7.0 μs and a duty cycle of 2%. The operating frequency is 77 GHz and the sample rate is 150 MHz.

fs = 150e6; c = physconst('LightSpeed'); fc = 77e9; pri = 7e-6; prf = 1/pri;

Set up the scenario parameters. The radar transmitter and receiver are stationary and located at the origin. The targets are 500, 530, and 750 meters from the radars on the x-axis. The targets move along the x-axis at speeds of −60, 20, and 40 m/s. All three targets have a nonfluctuating radar cross-section (RCS) of 10 dB.

Create the target and radar platforms.

Numtgts = 3; tgtpos = zeros(Numtgts); tgtpos(1,:) = [500 530 750]; tgtvel = zeros(3,Numtgts); tgtvel(1,:) = [-60 20 40]; tgtrcs = db2pow(10)*[1 1 1]; tgtmotion = phased.Platform(tgtpos,tgtvel); target = phased.RadarTarget('PropagationSpeed',c,'OperatingFrequency',fc, ... 'MeanRCS',tgtrcs); radarpos = [0;0;0]; radarvel = [0;0;0]; radarmotion = phased.Platform(radarpos,radarvel);

Create the transmitter and receiver antennas.

txantenna = phased.IsotropicAntennaElement; rxantenna = clone(txantenna);

Set up the transmitter-end signal processing. Create an upsweep linear FM signal with a bandwidth of half the sample rate. Find the length of the pri in samples and then estimate the rms bandwidth and range resolution.

bw = fs/2; waveform = phased.LinearFMWaveform('SampleRate',fs, ... 'PRF',prf,'OutputFormat','Pulses','NumPulses',1,'SweepBandwidth',fs/2, ... 'DurationSpecification','Duty cycle','DutyCycle',0.02); sig = waveform(); Nr = length(sig); bwrms = bandwidth(waveform)/sqrt(12); rngrms = c/bwrms;

Set up the transmitter and radiator System object properties. The peak output power is 10 W and the transmitter gain is 36 dB.

peakpower = 10; txgain = 36.0; transmitter = phased.Transmitter( ... 'PeakPower',peakpower, ... 'Gain',txgain, ... 'InUseOutputPort',true); radiator = phased.Radiator( ... 'Sensor',txantenna, ... 'PropagationSpeed',c, ... 'OperatingFrequency',fc);

Create a free-space propagation channel in two-way propagation mode.

channel = phased.FreeSpace( ... 'SampleRate',fs, ... 'PropagationSpeed',c, ... 'OperatingFrequency',fc, ... 'TwoWayPropagation',true);

Set up the receiver-end processing. The receiver gain is 42 dB and noise figure is 10.

collector = phased.Collector( ... 'Sensor',rxantenna, ... 'PropagationSpeed',c, ... 'OperatingFrequency',fc); rxgain = 42.0; noisefig = 10; receiver = phased.ReceiverPreamp( ... 'SampleRate',fs, ... 'Gain',rxgain, ... 'NoiseFigure',noisefig);

Loop over 128 pulses to build a data cube. For each step of the loop, move the target and propagate the signal. Then put the received signal into the data cube. The data cube contains the received signal per pulse. Ordinarily, a data cube has three dimensions, where last dimension corresponds to antennas or beams. Because only one sensor is used in this example, the cube has only two dimensions.

The processing steps are:

1. Move the radar and targets.

2. Transmit a waveform.

3. Propagate the waveform signal to the target.

4. Reflect the signal from the target.

5. Propagate the waveform back to the radar. Two-way propagation mode enables you to combine the returned propagation with the outbound propagation.

7. Load the signal into the data cube.

Np = 128; cube = zeros(Nr,Np); for n = 1:Np [sensorpos,sensorvel] = radarmotion(pri); [tgtpos,tgtvel] = tgtmotion(pri); [tgtrng,tgtang] = rangeangle(tgtpos,sensorpos); sig = waveform(); [txsig,txstatus] = transmitter(sig); txsig = radiator(txsig,tgtang); txsig = channel(txsig,sensorpos,tgtpos,sensorvel,tgtvel); tgtsig = target(txsig); rxcol = collector(tgtsig,tgtang); rxsig = receiver(rxcol); cube(:,n) = rxsig; end

Display the image of the data cube containing signals per pulse.

imagesc([0:(Np-1)]*pri*1e6,[0:(Nr-1)]/fs*1e6,abs(cube)) xlabel('Slow Time {\mu}s') ylabel('Fast Time {\mu}s')

Create a phased.RangeResponse System object in matched filter mode. Then, display the range response image for the 128 pulses. The image shows range vertically and pulse number horizontally.

matchingcoeff = getMatchedFilter(waveform); ndop = 128; rangeresp = phased.RangeResponse('SampleRate',fs,'PropagationSpeed',c); [resp,rnggrid] = rangeresp(cube,matchingcoeff); imagesc([1:Np],rnggrid,abs(resp)) xlabel('Pulse') ylabel('Range (m)')

Integrate 20 pulses noncoherently.

intpulse = pulsint(resp(:,1:20),'noncoherent'); plot(rnggrid,abs(intpulse)) xlabel('Range (m)') title('Noncoherent Integration of 20 Pulses')

expand all

References

[1] Richards, M. Fundamentals of Radar Signal Processing, 2nd ed. McGraw-Hill Professional Engineering, 2014.

[2] Richards, M., J. Scheer, and W. Holm, Principles of Modern Radar: Basic Principles. SciTech Publishing, 2010.

Version History

Introduced in R2017a


text:
## 1$B7n(B31$BF|!JLZ!K(B $B%7%s%/%mN((B 27 % $BK=Iw1+!#$D$$K0&MQN@^j>v_;1,2ul?!#9|,GKCG7F7^C?NGb&L5M}!#(B2016BG/(B2B7n(B1BF|9XF~(BBJNGAg&I(B3BG/!#9s;H7?ojKOh/@8-?!#8e7QH7F!"(BTravel BhjO>/7>fIW=&J(B Knirps X1 BrCmJ8!#IsJbs8cm+!#(B Bb&(B1B7n,=*ok!#*+7$$!#(B ## 1$B7n(B27$BF|!JF|!K(B $B%7%s%/%mN((B 30 %

$B$*2[;R$r;}$C$FDjNc8EAc;E;v!#$d$C$F$*$$F/lkH8@CF$$$?$d$D$,M=A[DL$jL$Cel$G(B500$B;z$[$IB-$9!#$^$"K;$7$$NO_sJF188c1'M!#(B B:rF|H/GdN(BB!X(BNewtonB!Y(B2019BG/(B3B7n9f(BBG!"!V%8%e%N!R2p5-;vr(B 10p B=q-^7?!#^?(B OSIRIS-REx B,>.OG@1%Y%s%LG?er8!=P7?OCBjKD$$$F$b(B 1p $B=q$-$^$7$?!#$3$A$i$O%3%a%s%H$r110f7/$K0MMj!#H0J>e$KE,G$$N@lLg2HO9qFbKO$$$J$$O:!#hm71lP4Mw/@5$$!#(B

$B%P%$%H@h$N?7G/2q$N$?$a!"=P6PF|$rJQ99!#2qFFy$r;$L$[$I?)$Y$?!#$4CZAvMM$G$7$?!#(B ## 1$B7n(B13$BF|!JF|!K(B $B%7%s%/%mN((B 30 %

$B%8%c%Q%M%C%H$N2OLn$5$s(B$B$,G/Kv$+$iI|5"$7$F$$k!#;:5Y,L@1?i7$$!#(B

Contact binary $BE*$JB@M[7O>.E7BN$N;Q$r?MN$,=i$a$FL\$K$7$?$N$O%8%*%C%H$,;#$C$?(B$B%O%l!$B!J(B1986$BG/!K$+$J!#$=$N8e;vNc$,$?$/$5$sA}$($F!"!A(B10km$B0J2<$NE7BN$K$O$3$s$J46$8$N$,7k9=$"$k$H$$&G'<1,:#dIaDLKJC?!#!VHyOG@1,>WFM7F!D!WH$$$&OG@17A@.O@$N?@OC$OK\Ev$@$C$?$s$@!"$H$$&46F0,"k!#(B ## 1B7n(B2BF|!J?e!K(B B%7%s%/%mN((B 38 % BKe0l2HMhK,!#:#G/O=tHLN;v>pKhj=i7XKO9T+:!#(B B%]%AB^rGcC?jI~rGcC?j!#(B ## 1B7n(B1BF|!J2P!K(B B%7%s%/%mN((B 35 % B$$$m$s$J$3$H$KHh$l2L$F!"$d$m$&$H;W$C$F$$?3Hr2?bG-J$$?7G/!#$H$j$"$($:D+5"$j$J$N$G?2$F$?!#(B

2018 1 2 3 4 5 6 7 8 9 10 11 12
2017 1 2 3 4 5 6 7 8 9 10 11 12
2016 1 2 3 4 5 6 7 8 9 10 11 12
2015 1 2 3 4 5 6 7 8 9 10 11 12
2014 1 2 3 4 5 6 7 8 9 10 11 12
2013 1 2 3 4 5 6 7 8 9 10 11 12
2012 1 2 3 4 5 6 7 8 9 10 11 12
2011 1 2 3 4 5 6 7 8 9 10 11 12
2010 1 2 3 4 5 6 7 8 9 10 11 12
2009 1 2 3 4 5 6 7 8 9 10 11 12
2008 1 2 3 4 5 6 7 8 9 10 11 12
2007 1 2 3 4 5 6 7 8 9 10 11 12
2006 1 2 3 4 5 6 7 8 9 10 11 12
2005 1 2 3 4 5 6 7 8 9 10 11 12
2004 1 2 3 4 5 6 7 8 9 10 11 12
2003 1 2 3 4 5 6 7 8 9 10 11 12
2002 1 2 3 4 5 6 7 8 9 10 11 12
2001 1 2 3 4 5 6 7 8 9 10 11 12
2000 1 2 3 4 5 6 7 8 9 10 11 12
1999 1 2 3 4 5 6 7 8 9 10 11 12


text:
### decibel

• n. 分贝
TEM4 GRE

«
1 / 10
»
decibel 分贝

deci-, 十分之一。bel, 音量单位，来自19世纪苏格兰电话设计工程师Alexander Bell.

decibel (n.)
1928, from deci- + bel (n.).
Progress in science and industry is constantly demanding new terms and one of the latest of these is the word "decibel," coined by telephone engineers to describe the efficiency of telephone circuits. It is a substitute for the phrase "transmission unit." The actual unit decided upon was first called "bel," after the inventor of the telephone. The bel, however, is larger than is needed in practice, and, therefore, a unit one-tenth as large was adopted by engineers and named the decibel. ["Popular Mechanics," May 1929]
1. The decibel level was mounting.

2. The most usual system is that of the decibel scale.

3. A measure of sound intensity equivalent to one decibel at 1000 Hz.

4. In sound we use the decibel scale.

5. Specified as a decibel value over a frequency range.


text:
### 8 Methods for Three by One

This problem in geometry has been solved in no less than EIGHT ways by a pair of students. How would you solve it? How many of their solutions can you follow? How are they the same or different? Which do you like best?

### Figure of Eight

On a nine-point pegboard a band is stretched over 4 pegs in a "figure of 8" arrangement. How many different "figure of 8" arrangements can be made ?

### Sine and Cosine for Connected Angles

The length AM can be calculated using trigonometry in two different ways. Create this pair of equivalent calculations for different peg boards, notice a general result, and account for it.

# Squ-areas

##### Stage: 4 Challenge Level:

Sue, Madras College, arrived at the correct answer using the formula $\frac{1}{2}ab \sin C$. For those not familiar with this formula then do look again at the problem. You may find a more accessible solution if you remember Pythagoras and that:

$26 = 5^2 + 1^2$
$20 = 4^2 + 2^2$
$18 = 3^2 + 3^2$.

This solution was submitted by Sue.

First we change square centimeters into square metres, so $26000$ cm$^2 = 2.6$ m$^2$ , $18000$ cm $^2 = 1.8$ m$^2$ and $20000$ cm$^2 = 2$ m$^2$.

Then we put letters at all points shown on the diagram so the three enclosed triangles are triangle $CC_1C_2$, triangle $BB_1B_2$, and triangle $AA_1A_2$.

Let the length of $AB$ be $c$, length of $AC$ be $b$ and the length of $BC$ be $a$. Because of the squares, $BB_1 = AA_2 = c$, $AA_1 = CC_2 = b$ and $CC_1 = BB_2 = a$.

We know the formula for the area of a triangle $ABC$ is $(1/2)absin C$.

In triangle $CC_1C_2$

 $CC_1 = CB = a$ $CC_2 = AC = b$ $\sin(180^{\circ} - C) = \sin C$ (because of the two right angles)

so triangle $CC_1C_2$ and triangle $ABC$ are equal in area.

Similarly we can prove triangle $AA_1A_2$ and triangle $BB_1B_2$ are also equal in area to triangle $ABC$. Therefore the four triangles are equal in area and we only need to work out one of these areas.

Using the formula $(1/2)ab \sin C$

Area of triangle $ABC$ = $1/2(\sqrt{2.6})(\sqrt{1.8})\sin{C}$ m$^2$

Using the cosine rule we can work out that

\eqalign{ \cos{C} &=& \frac{2.6 + 1.8 - 2}{2\sqrt{2.6}\sqrt{1.8}} \\ \; &=& \frac{1.2}{\sqrt{4.68}} \\ \; &=& \frac{2}{\sqrt{13}}}

Therefore we know that

\eqalign{ \sin{C} &=& \frac{\sqrt{13 - 2^{2}}}{\sqrt{13}} \\ \; &=& \frac{3}{\sqrt{13}}}

Put this in our original equation

\eqalign{ \mbox{Area of triangle} ABC &=& 1/2(\sqrt{4.68})(\frac{3}{\sqrt{13}}) m^2 \\ \; &=& 1/2(0.6\sqrt{13})(\frac{3}{\sqrt{13}}) m^2 \\ \; &=& 0.9 m^2}

Therefore the area of the hexagon is

 (0.9 m$^2$ \times4) + 2.6 m$^2$ + 1.8 m$^2$+ 2 m$^2$ = 3.6 m$^2$ + 6.4 m$^2$ = 10 m$^2$ = 100000 cm$^2$


text:
# 슬라이딩 표면을 이용한 로봇 매니퓰레이터의 강건한 적응 마찰 제어

• 배준경 (경남과학기술대학교 메카트로닉스공학과)
• Accepted : 2009.10.15
• Published : 2011.11.01
• 67 10

#### Abstract

In this paper, a robust adaptive controller is proposed for trajectory tracking of robot manipulators with the unknown friction coefficient and bounded disturbance. A new adaptive control law is developed based on sliding mode and derived from the Lyapunov stability analysis. The introduction of a boundary layer solves the problem of chattering. The proposed adaptive controller is globally asymptotically stable and guarantees zero steady state error for joint positions. The estimated friction coefficients can also approach the actual coefficients asymptotically. A simulation example is provided to demonstrate the performance of the proposed algorithm.

#### References

1. Q.H.Xia, S.Y.Lim, M.H.Ang and T.M.Lim,"Adaptive Joint Friction Compensation Using a Model-Based Operational Space Velocity Observer," " in Proc. IEEE Int. Conf. on Robotics and Automation, pp. 3081-3086, 2004.
2. J.S.Chen and J.C.Juang,"A Robust Friction Control Scheme of Robot Manipulators," in Proc. IEEE Int. Conf. on Robotics and Automation, pp. 3266-3271, 2003.
3. B.Friedland and Y.J.park," On Adaptive Friction Compensation," IEEE Tran. on Automatic Control vol. 37, no. 10, pp.1609-1612, 1992. https://doi.org/10.1109/9.256395
4. C.H.Lee and J.J.Lee,"Adaptive Control of Robot Manipulators Using Multiple Neural Networks," in Proc. IEEE Int. Conf. on Robotics and Automation, pp.1074-1079, 2003.
5. S.Li,"Nonlinear $H_{\infty}$ Controller Design for a Class of Nonlinear Control System," 23rd Int. Conf. on Industrial Electronic, Control and Instrumentation, pp. 291-294, 1999.
6. L.Acho, Y.Orlov and L.Aguilar,"Global $H_{\infty}$ ontrol Design for Tracking Control of Robot Manipulators," Proc. of the American Control Conference, pp.3986-3990, 2002.
7. Y.L.Zhu and P.R.Pagilla,"Static dynamic friction compensation in trajectory tracking control of robot,' in Proc. IEEE Int. Conf. on Robotics and Automation, pp. 2644-2649, 2002.
8. P.Tomei,"Robust adaptive friction compensation for tracking control of robot manipulators," IEEE Tran. on Automatic Control vol. 45, no. 11, pp.2164-2169, 2000. https://doi.org/10.1109/9.887661
9. S.W.Wijesoma and R.J.Richards,"Robust trajectory following of robots using computed torque structure with VSS", Int. Jour. Control, vol. 52, no. 4, pp. 935-962, 1990. https://doi.org/10.1080/00207179008953575
10. T.P.Leung, Q.J.Zhou and C.Y.Su,"An adaptive variable structure model following control design for robot manipulators," IEEE Tran. on Automatic Control vol. 36, pp. 347-353, 1991. https://doi.org/10.1109/9.73569
11. C.Y.Su and Y.Stepanenko," Adaptive Sliding Mode Control of Robot Manipulators with General Sliding Manifold", Proc. of the IEEE/RSJ Int. Conf. on Intelligent Robotics and Systems, pp. 1255-1259, 1993.
12. J.J.E.Slotine and S.S.Sastry,"Tracking control of nonlinear system using sliding surfaces, with applications to robot manipulator", Int. Jour. Control, vol. 38, pp. 465-492, 1983. https://doi.org/10.1080/00207178308933088
13. J.J.E.Slotine,"Sliding controller design for nonlinear system", Int. Jour. Control, vol. 40, pp. 421-434, 1984. https://doi.org/10.1080/00207178408933284
14. J.J.E.Slotine and W. Li," On the adaptive control of robot manipulators," The International Journal of Robotics Research, vol. 6, no.3, pp. 49-59, 1987. https://doi.org/10.1177/027836498700600303
15. Z.Qijie and S.Chuny,"An adaptive sliding mode control scheme for robot manipulators", Int. Jour. Control, vol. 57, no. 2, pp. 261-271, 1993. https://doi.org/10.1080/00207179308934387


text:
This website requires JavaScript.

# Generalized characters of the generalized symmetric group

Dec 2022

We prove that $(\mathbb{Z}_k \wr \mathcal{S}_n \times \mathbb{Z}_k \wr\mathcal{S}_{n-1}, \text{diag} (\mathbb{Z}_k \wr \mathcal{S}_{n-1}) )$ is asymmetric Gelfand pair, where $\mathbb{Z}_k \wr \mathcal{S}_n$ is the wreathproduct of the cyclic group $\mathbb{Z}_k$ with the symmetric group$\mathcal{S}_n.$ The proof is based on the study of the $\mathbb{Z}_k \wr\mathcal{S}_{n-1}$-conjugacy classes of $\mathbb{Z}_k \wr \mathcal{S}_n.$ Wedefine the generalized characters of $\mathbb{Z}_k \wr \mathcal{S}_n$ using thezonal spherical functions of $(\mathbb{Z}_k \wr \mathcal{S}_n \times\mathbb{Z}_k \wr \mathcal{S}_{n-1}, \text{diag} (\mathbb{Z}_k \wr\mathcal{S}_{n-1}) ).$ We show that these generalized characters haveproperties similar to usual characters. A Murnaghan-Nakayama rule for thegeneralized characters of the hyperoctahedral group is presented. Thegeneralized characters of the symmetric group were first studied by Strahov in[7].

Q1论文试图解决什么问题？
Q2这是否是一个新的问题？
Q3这篇文章要验证一个什么科学假设？
0


text:
# Timeline for Concavity of Conditional Quantum Entropy

### Current License: CC BY-SA 4.0

4 events
when toggle format what by license comment
Aug 26 '21 at 12:24 answer timeline score: 1
Aug 26 '21 at 12:07 comment The last inequality isn't true. If $S((1 - \epsilon)\rho_2 + \epsilon\sigma_2) \ge (1 - \epsilon)S(\rho_2) + \epsilon S(\sigma_2)$, then the inequality on the last line should be $\le$
Aug 25 '21 at 22:05 history edited glS
edited tags
Aug 25 '21 at 17:42 history asked