text:
# BitAssets and Black Swan Events

A black swan event is a very unlikely, yet possible event. The concept was first introduced by Nicholas Taleb in his book, "The Black Swan: The Impact of the Highly Improbable". All debts and contracts are vulnerable to sudden and unexpected movements in the market and investors would be unwise to fail to account for these events which are more common than we would like to believe. BitAssets, such as BitUSD and BitGold are no different than any other financial instrument and have limits beyond which they are unable to maintain their market peg. Today I would like to explore what scenarios would cause the peg to fail and how the BitShares network automatically responds to them.

## The Highly Improbable

By Wall Street standards, BitShares is extremely conservative in its ‘lending’ policies by only allowing users to borrow up to 33% of the value of their collateral. Most banks consider lending 80% the value of collateral to be conservative and often go almost to 100%. The loan is secure so long as the value of the collateral is greater than the amount borrowed.

In the case of BitShares we assumed the collateral (BTS) could easily be as volatile as Bitcoin on its worst days. On some days Bitcoin has lost 25% or more of its value. Recently Bitcoin lost 42% of its value over just 7 days and along with it so did almost all alt-coins. This level of movement is within the design tolerance of BitAssets, but did result in many short positions being margin called.

In order to break BitUSD the value of BitShares would have to fall by 67% in a market where no one was willing to sell enough BitUSD to allow all existing shorts to cover. For all practical purposes this fall would have to occur over just a few days, in thin markets, with no expectation for a rebound in value. This kind of event is possible and could be triggered by any number of events: most likely bugs, hacked wallets, or government actions.

As much as we would like to pretend these things would never happen, we can be sure they will happen at some point with some BitAssets because even if BTS didn't lose any value at all the value of gold or silver could grow by 300% while BitShares stays flat. So a Black Swan can occur due to no fault of BitShares or crypto currency in general.

## Handling a Black Swan

For BitAssets we define The Black Swan as any time the value of the least collateralized short position is less than the balance due according to the median price feed published by the delegates. Once this happens the network is unable to keep the peg without transferring wealth from shareholders or other shorts. Socializing this risk would punish shorts that were pro-active in maintaining their collateral or shareholders who were not actually party to the speculation. Considering the potential costs of maintaining the peg are unbounded, we opt to settle all BitUSD debts with the available collateral.

Rather than attempting to keep the peg “at all costs” BitShares chooses to define the ability to redeem BitUSD as the minimum value of about $1 or the collateral ratio of the least collateralized short position. It also chooses to define the terms of BitUSD such that it can be automatically converted to BTS at the ratio of the least collateralized short at any time. Anyone who is holding BitUSD at the moment of a Black Swan will have it instantly converted to BTS. The least collateralized short will get nothing back and all other shorts will get what ever collateral they have left after settling. Everyone settles at the same price. ## Impact of Price Feeds Deciding when a Black Swan has occurred is up to the price feeds of the top 101 delegates. Under normal market conditions almost all trades execute at a price approved by the individuals creating the orders. All shorts and relative orders specify limits that protect them from the delegates arbitrarily moving the price feed. Even margin calls cannot be executed unless the highest bid is below the margin call price and within 10% of the price feed. In effect, delegates can confirm a margin call, but they cannot create one unless the market agrees. In very thin markets delegates can trigger margin calls, but only by pretending the collateral is worth less than it really is. In the very unlikely event that they were able to manipulate the market and the feed they could trigger the Black Swan liquidation event. If this were to happen then it would be a wind fall to BitUSD holders which would receive BTS that had a real value far in excess of a dollar. This assumes the obvious “attack” didn’t result in BTS price actually falling, in which case it would be a real Black Swan. In other words, if the price feeds and market were compromised most of the risk of an artificial liquidation event falls on the shorts. Shorts are “super bulls” and thus implicitly trust the system more than those who want the stability of BitUSD. There is only one way that compromised price feeds could impact BitUSD holders. If a real Black Swan event did occur, the delegates could post-pone/prevent liquidation by failing to publish prices that reflect the new reality. If this were to happen the internal market would continue to operate, but almost all feed-relative bids, asks, and shorts would be canceled (or filled) leaving only BitUSD longs to trade against BTS longs. The trading price would likely hover around the expected liquidation price because most players would expect the feed to eventually be corrected and force everyone to liquidate. In short, pun intended, the price feeds alone are unable to harm shorts or longs and all market participants can predict with a high degree of confidence how to value BitUSD in any and all market conditions. ## What happens to BitUSD Yield As many of you know, BitUSD is currently paying about 1% APR yield to those who hold it. In the event of a Black Swan all BitUSD will be paid out all of the yield they would have expected over the course of a full year. So if you just purchased$100 a mere 10 seconds prior to a Black Swan event being detected then you would receive the BTS due for a full \$101. Any open shorts would immediately pay their full balance including the interest due.

In effect, the yield fund maintained for each BitAsset gives all BitUSD holders one last bit of protection from volatility by giving them an extra 1% (or more) a full year earlier than they had expected. The larger the APR the greater the Black Swan protection. In the grand scheme of things, if BTS has fallen by 67% an additional 1% protection is nice, but probably unable to cover all of your losses.

## Status (Jan 2015)

As of this writing a Black Swan event will simply halt the market until the settlement process defined above can be implemented. We expect to have a fully implemented and tested liquidation process by the end of March 2015. Hopefully, there will be no Black Swans between now and then. Even without this liquidation process being fully implemented, the value of BitUSD still carries almost the same guarantee. The only difference is how long you may have to wait for settlement.

http://freevisitorcounters.com


text:
DESeq2: one condition vs multiple combined
1
0
Entering edit mode
@konstantin-okonechnikov-11325
Last seen 10 months ago

I have multiple RNA-seq samples from 6 conditions and have to compare each condition against all the others: find genes dominant only in a specific group.

I tried two approaches.

First approach: separate all samples in 2 conditions: samples from one group vs samples from other groups, then repeat the operation 6 times switching the group against others.

Second approach: mark groups inside condition i.e.

 s1 g1 s2 g1 s3 g1 s4 g2 s5 g2 s6 g2 s7 g3 s8 g3 s9 g3 ... ...

Then run DESeq2 and perform final function with specific contrast. i.e

rds <- results(dds, contrast = list( c(g1),c(g2,g3,g4,g5,g6) ) )

In general, results were similar in both methods i.e. majority of the same genes were validated dominant using both approaches, however there were slight differences in lfcSE, p-values and q-values.

What is the most appropriate way to perform such analysis? Are there special settings to be applied for it? Is there a better method (i.e. ANOVA) to apply in this case?

rnaseq deseq2 • 7.7k views
0
Entering edit mode

Hi Michael and Konstantin Okonechnikov

I have a similar problem

I have 5 conditions lets call it phenotype: A, B, C, D and E. One of it is control. As like the post in this thread, I too have to compare each condition against all the others but before doing that, I have to control for Age, PMI, pH, and Batch. Which, when tested independently affect the expression.

I used the

dds <- DESeqDataSetFromMatrix(countData = countData, colData = colData, design = ~Age + PMI + pH + batch + phenotype) I believe this design will take care of the all the confounding variable (Age, PMI, pH, and Batch) and will give corrected expression for the phenotype.

but I am unable to use contrast in this case as the program is taking one of the phenotypes as a reference level and giving results in comparison to the reference

function resultsNames does not give the list which I want to compare.

I am aware of dds$group <- factor(paste0(dds$genotype, dds\$condition)) but this is not working for my case.

I want to test various combinations also, for instance, A+B vs C+D ; A+B+C vs D+E etc.

How should I make a design such that the phenotype is corrected for confounding variables and give contrast for various combinations.

Thanks

0
Entering edit mode

You may want to speak with a local statistician to discuss modeling. There are not individual coefficients representing these contrasts. It’s also not straightaway clear how to make a comparison like A+B vs C+D. This is why we don’t have these comparisons in the vignette. It’s important to discuss a plan with a statistician.

0
Entering edit mode

Thanks, Michael,

Sorry to bug you again, Can you tell the design to use in case I want to do something similar ?

i.e rds <- results(dds, contrast = list( c(g1),c(g2,g3,g4,g5,g6) ) )

Thanks

3
Entering edit mode
@mikelove
Last seen 13 hours ago
United States

Your second method, performing the contrast with list, is what I would do. Except you also need to add listValues=c(1,-1/5), so that you are contrasting the first group vs the average of the other groups. You could also specify this with a numeric contrast, e.g. contrast=c(0,1,-1/5,-1/5,-1/5,-1/5,-1/5). Whichever is easiest for you.

The reason it's preferable is that the estimate of within-group variance (dispersion) will be smaller, because the the different groups 2-6 have their own coefficients.

0
Entering edit mode

Thanks a lot for quick and detailed reply!

0
Entering edit mode

Hi, Dr love. I am wondering when I do oneVSmulitple like

rds <- results(dds,
contrast = list( c(g1),c(g2,g3,g4,g5,g6) ),
listValues = c(1,-1/5)
)

Does DESeq2 just consider the g2-g5 as a same group just like approach 1 or will consider something.

Because I think if just consider as a same group, there will be too much so-called outlier or too big variance in "g2-g5 group", and it will produced many NA in pvalue. But it seems that there are not too much NA in my results. So I am wondering whether DESeq2 consider something else.

Best wishes Guandong Shang

0
Entering edit mode

No, not considered as the same group, hence the last sentence in my post above.

0
Entering edit mode

format: plain


text:
# Revision history [back]

The solution is to explicitly declare T as a finite field with 241^32 elements:

sage: K.<x> = GF(241)[]
sage: T.<a> = GF(241^32, modulus=x^32+44)
sage: J.<s> = T[]
sage: G = s^32 + 7
sage: G.roots()
[(221*a^13, 1),
(190*a^13, 1),
...
(51*a^29, 1),
(20*a^29, 1)]

I would be great if Sage were able to detect that your construction is equivalent to mine, but it is unfortunately not the case (yet)!


text:
# How can I update an UpdatePanel programmatically?

     You can use the Update method of the UpdatePanel on the server-side. Make sure to set
the UpdateMode of the UpdatePanel to Conditional to get it work.

<asp:UpdatePanel UpdateMode="Conditional" ID="UpdatePanel1"...>

UpdatePanel1.Update()

You can also use triggers that will make sure the UpdatePanel listen to a control’s event and will do an update if the event if fired and caused by a postback. Example:

<asp:UpdatePanel ID="UpdatePanel1" runat="server">

<ContentTemplate>

...

</ContentTemplate>

<Triggers>

<asp:AsyncPostBackTrigger ControlID="Button1" EventName="Click" />

</Triggers>

</asp:UpdatePanel>

<asp:Button ID="Button1" runat="server" Text="Button" />

Reactions


text:
# Mass terms for scalar lagrangians?

First off, a pre-question: if I got this wrong, then probably the whole reasoning is wrong as well.

Studying the lagrangian for a two-particle scalar field with a quartic interaction in the context of SSB and Higgs mechanism, one can find many different cases:

• the only fields are the scalars, and the quadratic term is positive: there is no SSB, the fields have the same mass.
• the only fields are the scalars, but the quadratic term is negative: there is SSB, one field is massless (Goldstone mode), the other one gains more mass than the previous case.
• there is another, vector, field, and the quadratic term is positive: there is no SSB, I have now three particles (two massive scalars, one massless vector)
• there is another, vector, field, but the quadratic term is negative: there is SSB, and the Higgs mechanism makes the Goldstone mode disappear while the giving mass to the vector, so I have one massive scalar and one massive vector.

Is this correct?

Now, for the actual question: I want to find the masses of the particles in the various different cases. From what I understand, this means that I want to find the mass matrix elements $$m^2_{ab}=\frac{\partial^2V}{\partial\phi_a\partial\phi_b}\Big|_{min}$$ and when there is no SSB, I actually only have to take the second derivative and evaluate it to zero. When there is SSB, I firstly have to shift my fields so that they both have a $$VEV=0$$, and then do the same thing.

In my lecture notes, the first two cases are done with a $$O(2)$$ symmetry, with a lagrangian $$\mathcal{L}=\frac{1}{2}\partial_\mu\vec{\phi}\partial^\mu\vec{\phi}-\frac{\mu^2}{2}\vec{\phi}\cdot\vec{\phi}-\frac{\lambda}{4}(\vec{\phi}\cdot\vec{\phi})^2$$ and the calculations of $$m^2_{11}=\frac{\partial^2V}{\partial\phi_1^2}\Big|_{min}\quad m^2_{12}=\frac{\partial^2V}{\partial\phi_1\partial\phi_2}\Big|_{min}$$ etc lead to the masses I mentioned.

However, to treat the "scalar+vector" cases, in my notes it says that it's preferable to use the $$U(1)$$ symmetry with a lagrangian $$\mathcal{L}=\partial_\mu\phi^\dagger\partial^\mu\phi-\mu^2\phi^\dagger\phi-\lambda(\phi^\dagger\phi)^2$$ but in this case if I try to calculate the masses with $$m^2=\frac{\partial^2V}{\partial\phi^\dagger\partial\phi}\Big|_{min}$$I find that they don't change at all in the SSB case!

Is there something wrong with the reasoning, or should I just check my calculations better?

• Check your calculation. For SSB, at the bottom of the potential (point of contact of sombrero with the table) there is a massless Goldstone scalar and a massive one. Jul 8, 2020 at 14:49
• @CosmasZachos I know this, and it is the reason why I asked this question. Checking my calculation I find no errors, so I'm asking: should I just check better, or is there anything you can see in the question (definitions, formulas) that I got wrong? Jul 27, 2020 at 21:04
• ? I am not sure what you mean by "vector". You are describing the same situation in two different parameterizations. Of course you should check your calculations. Jul 27, 2020 at 21:12

I'm a little rusty on this (since 2008, it's 2022) and I am not an expert, but a vector boson should have a field $$A^\mu$$ or $$G_a^\mu$$ depending whether it's a photon or a gauge boson, where the $$\mu$$ refers to the component of the vector and the $$a$$ refers to the basis matrix of QCD. The Lagrangian should have an interaction component of $$\phi$$ with $$A^\mu$$ or $$G^\mu$$ for a scalar field coupled with a vector field. I'm not sure, it may take the form ($$\phi^\dagger\phi+\phi\phi^\dagger)(A+A^\dagger$$). This should give you a different minimum, I believe, when the entire Lagrangian's minimum is considered.


text:
# Modeling Steps 1 - 4¶

Content creators: Marius ‘t Hart, Megan Peters, Paul Schrater, Gunnar Blohm

Content reviewers: Eric DeWitt, Tara van Viegen, Marius Pachitariu

Production editors: Ella Batty

Note that this is the same as W1D2 Tutorial 1 - we provide it here as well for ease of access.

# Tutorial objectives¶

Yesterday you gained some understanding of what models can buy us in neuroscience. But how do you build a model? Today, we will try to clarify the process of computational modeling, by thinking through the logic of modeling based on your project ideas.

We assume that you have a general idea of a project in mind, i.e. a preliminary question, and/or phenomenon you would like to understand. You should have started developing a project idea yesterday with this brainstorming demo. Maybe you have a goal in mind. We will now work through the 4 first steps of modeling (Blohm et al., 2019):

Framing the question

2. understanding the state of the art

3. determining the basic ingredients

4. formulating specific, mathematically defined hypotheses

The remaining steps 5-10 will be covered in a second notebook that you can consult throughout the modeling process when you work on your projects.

Importantly, we will guide you through Steps 1-4 today. After you do more work on projects, you likely have to revite some or all of these steps before you move on the the remaining steps of modeling.

Note: there will be no coding today. It’s important that you think through the different steps of this how-to-model tutorial to maximize your chance of succeeding in your group projects. Also: “Models” here can be data analysis pipelines, not just computational models…

Think! Sections: All activities you should perform are labeled with Think!. These are discussion based exercises and can be found in the Table of Content on the left side of the notebook. Make sure you complete all within a section before moving on!

## Demos¶

We will demo the modeling process to you based on the train illusion. The introductory video will explain the phenomenon to you. Then we will do roleplay to showcase some common pitfalls to you based on a computational modeling project around the train illusion. In addition to the computational model, we will also provide a data neuroscience project example to you so you can appreciate similarities and differences.

Enjoy!

# Setup¶

# Imports

import numpy as np
import matplotlib.pyplot as plt

# for random distributions:
from scipy.stats import norm, poisson

# for logistic regression:
from sklearn.linear_model import LogisticRegression
from sklearn.model_selection import cross_val_score

## Plotting Functions¶

# @title Plotting Functions

def rasterplot(spikes,movement,trial):

[movements, trials, neurons, timepoints] = np.shape(spikes)

trial_spikes = spikes[movement,trial,:,:]

trial_events = [((trial_spikes[x,:] > 0).nonzero()[0]-150)/100 for x in range(neurons)]

plt.figure()
dt=1/100
plt.eventplot(trial_events, linewidths=1);
plt.title('movement: %d - trial: %d'%(movement, trial))
plt.ylabel('neuron')
plt.xlabel('time [s]')

def plotCrossValAccuracies(accuracies):
f, ax = plt.subplots(figsize=(8, 3))
ax.boxplot(accuracies, vert=False, widths=.7)
ax.scatter(accuracies, np.ones(8))
ax.set(
xlabel="Accuracy",
yticks=[],
title=f"Average test accuracy: {accuracies.mean():.2%}"
)
ax.spines["left"].set_visible(False)

## Generate Data¶

#@title Generate Data

def generateSpikeTrains():

gain        = 2
neurons     = 50
movements   = [0,1,2]
repetitions = 800

np.random.seed(37)

# set up the basic parameters:
dt = 1/100
start, stop = -1.5, 1.5
t = np.arange(start, stop+dt, dt)                                            # a time interval
Velocity_sigma = 0.5                                                         # std dev of the velocity profile
Velocity_Profile = norm.pdf(t,0,Velocity_sigma)/norm.pdf(0,0,Velocity_sigma) # The Gaussian velocity profile, normalized to a peak of 1

# set up the neuron properties:
Gains = np.random.rand(neurons) * gain          # random sensitivity between 0 and gain
FRs   = (np.random.rand(neurons) * 60 ) - 10    # random base firing rate between -10 and 50

# output matrix will have this shape:
target_shape = [len(movements), repetitions, neurons, len(Velocity_Profile)]

# build matrix for spikes, first, they depend on the velocity profile:
Spikes = np.repeat(Velocity_Profile.reshape([1,1,1,len(Velocity_Profile)]),len(movements)*repetitions*neurons,axis=2).reshape(target_shape)

# multiplied by gains:
S_gains = np.repeat(np.repeat(Gains.reshape([1,1,neurons]), len(movements)*repetitions, axis=1).reshape(target_shape[:3]), len(Velocity_Profile)).reshape(target_shape)
Spikes = Spikes * S_gains

# and multiplied by the movement:
S_moves = np.repeat( np.array(movements).reshape([len(movements),1,1,1]), repetitions*neurons*len(Velocity_Profile), axis=3 ).reshape(target_shape)
Spikes = Spikes * S_moves

# on top of a baseline firing rate:
S_FR = np.repeat(np.repeat(FRs.reshape([1,1,neurons]), len(movements)*repetitions, axis=1).reshape(target_shape[:3]), len(Velocity_Profile)).reshape(target_shape)
Spikes = Spikes + S_FR

# can not run the poisson random number generator on input lower than 0:
Spikes = np.where(Spikes < 0, 0, Spikes)

# so far, these were expected firing rates per second, correct for dt:
Spikes = poisson.rvs(Spikes * dt)

return(Spikes)

def subsetPerception(spikes):

movements = [0,1,2]
split     = 400
subset    = 40
hwin      = 3

[num_movements, repetitions, neurons, timepoints] = np.shape(spikes)

decision = np.zeros([num_movements, repetitions])

# ground truth for logistic regression:
y_train = np.repeat([0,1,1],split)
y_test  = np.repeat([0,1,1],repetitions-split)

m_train = np.repeat(movements, split)
m_test  = np.repeat(movements, split)

# reproduce the time points:
dt = 1/100
start, stop = -1.5, 1.5
t = np.arange(start, stop+dt, dt)

w_idx = list( (abs(t) < (hwin*dt)).nonzero()[0] )
w_0 = min(w_idx)
w_1 = max(w_idx)+1  # python...

# get the total spike counts from stationary and movement trials:
spikes_stat = np.sum( spikes[0,:,:,:], axis=2)
spikes_move = np.sum( spikes[1:,:,:,:], axis=3)

train_spikes_stat = spikes_stat[:split,:]
train_spikes_move = spikes_move[:,:split,:].reshape([-1,neurons])

test_spikes_stat = spikes_stat[split:,:]
test_spikes_move = spikes_move[:,split:,:].reshape([-1,neurons])

# data to use to predict y:
x_train = np.concatenate((train_spikes_stat, train_spikes_move))
x_test  = np.concatenate(( test_spikes_stat,  test_spikes_move))

# this line creates a logistics regression model object, and immediately fits it:
population_model = LogisticRegression(solver='liblinear', random_state=0).fit(x_train, y_train)

# solver, one of: 'liblinear', 'newton-cg', 'lbfgs', 'sag', and 'saga'
# some of those require certain other options
#print(population_model.coef_)       # slope
#print(population_model.intercept_)  # intercept

ground_truth = np.array(population_model.predict(x_test))
ground_truth = ground_truth.reshape([3,-1])

output = {}
output['perception'] = ground_truth
output['spikes']     = spikes[:,split:,:subset,:]

return(output)

def getData():

spikes = generateSpikeTrains()

dataset = subsetPerception(spikes=spikes)

return(dataset)

dataset = getData()
perception = dataset['perception']
spikes = dataset['spikes']

# Step 1: Finding a phenomenon and a question to ask about it¶

## Example projects step 1¶

# @title Example projects step 1
from ipywidgets import widgets
from IPython.display import Markdown

markdown1 = '''

## Step 1

The train illusion occurs when sitting on a train and viewing another train outside the window. Suddenly, the other train *seems* to move, i.e. you experience visual motion of the other train relative to your train. But which train is actually moving?

Often people have the wrong percept. In particular, they think their own train might be moving when it's the other train that moves; or vice versa. The illusion is usually resolved once you gain vision of the surroundings that lets you disambiguate the relative motion; or if you experience strong vibrations indicating that it is indeed your own train that is in motion.

We asked the following (arbitrary) question for our demo project: "How do noisy vestibular estimates of motion lead to illusory percepts of self motion?"

'''

markdown2 = '''
## Step 1

The train illusion occurs when sitting on a train and viewing another train outside the window. Suddenly, the other train *seems* to move, i.e. you experience visual motion of the other train relative to your train. But which train is actually moving?

Often people mix this up. In particular, they think their own train might be moving when it's the other train that moves; or vice versa. The illusion is usually resolved once you gain vision of the surroundings that lets you disambiguate the relative motion; or if you experience strong vibrations indicating that it is indeed your own train that is in motion.

We assume that we have build the train illusion model (see the other example project colab). That model predicts that accumulated sensory evidence from vestibular signals determines the decision of whether self-motion is experienced or not. We now have vestibular neuron data (simulated in our case, but let's pretend) and would like to see if that prediction holds true.

The data contains *N* neurons and *M* trials for each of 3 motion conditions: no self-motion, slowly accelerating self-motion and faster accelerating self-motion. In our data,
*N* = 40 and *M* = 400.

**So we can ask the following question**: "Does accumulated vestibular neuron activity correlate with self-motion judgements?"

'''

out2 = widgets.Output()
with out2:
display(Markdown(markdown2))

out1 = widgets.Output()
with out1:
display(Markdown(markdown1))

out = widgets.Tab([out1, out2])
out.set_title(0, 'Computational Model')
out.set_title(1, 'Data Analysis')

display(out)

You should already have a project idea from your brainstorming yesterday. Write down the phenomenon, question and goal(s) if you have them.

As a reminder, here is what you should discuss and write down:

• What exact aspect of data needs modeling?

• Answer this question clearly and precisely! Otherwise you will get lost (almost guaranteed)

• Write everything down!

• Also identify aspects of data that you do not want to address (yet)

• Define an evaluation method!

• How will you know your modeling is good?

• E.g. comparison to specific data (quantitative method of comparison?)

• For computational models: think of an experiment that could test your model

• You essentially want your model to interface with this experiment, i.e. you want to simulate this experiment

You can find interesting questions by looking for phenomena that differ from your expectations. In what way does it differ? How could that be explained (starting to think about mechanistic questions and structural hypotheses)? Why could it be the way it is? What experiment could you design to investigate this phenomenon? What kind of data would you need?

Make sure to avoid the pitfalls!

Question is too general

• Remember: science advances one small step at the time. Get the small step right…

Precise aspect of phenomenon you want to model is unclear

• You will fail to ask a meaningful question

You have already chosen a toolkit

• This will prevent you from thinking deeply about the best way to answer your scientific question

You don’t have a clear goal

• What do you want to get out of modeling?

You don’t have a potential experiment in mind

• This will help concretize your objectives and think through the logic behind your goal

Note

The hardest part is Step 1. Once that is properly set up, all other should be easier. BUT: often you think that Step 1 is done only to figure out in later steps (anywhere really) that you were not as clear on your question and goal than you thought. Revisiting Step 1 is frequent necessity. Don’t feel bad about it. You can revisit Step 1 later; for now, let’s move on to the nest step.

# Step 2: Understanding the state of the art & background¶

Here you will do a literature review (to be done AFTER this tutorial!).

## Example projects step 2¶

# @title Example projects step 2
from ipywidgets import widgets
from IPython.display import Markdown

markdown1 = '''

## Step 2

You have learned all about the vestibular system in the Intro video. This is also where you would do a literature search to learn more about what's known about self-motion perception and vestibular signals. You would also want to examine any attempts to model self-motion, perceptual decision making and vestibular processing.
'''

markdown21 = '''
## Step 2

While it seems a well-known fact that vestibular signals are noisy, we should check if we can also find this in the literature.

Let's also see what's in our data, there should be a 4d array called spikes that has spike counts (positive integers), a 2d array called perception with self-motion judgements (0=no motion or 1=motion). Let's see what this data looks like:

'''

markdown22 = '''

In the spikes array, we see our 3 acceleration conditions (first dimension), with 400 trials each (second dimensions) and simultaneous recordings from 40 neurons (third dimension), across 3 seconds in 10 ms bins (fourth dimension). The first two dimensions are also there in the perception array.

Perfect perception would have looked like [0, 1, 1]. The average judgements are far from correct (lots of self-motion illusions) but they do make some sense: it's closer to 0 in the no-motion condition and closer to 1 in both of the real-motion conditions.

The idea of our project is that the vestibular signals are noisy so that they might be mis-interpreted by the brain. Let's see if we can reproduce the stimuli from the data:

'''

markdown23 = '''

Blue is the no-motion condition, and produces flat average spike counts across the 3 s time interval. The orange and green line do show a bell-shaped curve that corresponds to the acceleration profile. But there also seems to be considerable noise: exactly what we need. Let's see what the spike trains for a single trial look like:

'''

markdown24 = '''

You can change the trial number in the bit of code above to compare what the rasterplots look like in different trials. You'll notice that they all look kind of the same: the 3 conditions are very hard (impossible?) to distinguish by eye-balling.

Now that we have seen the data, let's see if we can extract self-motion judgements from the spike counts.

'''

display(Markdown(r""))

out2 = widgets.Output()
with out2:
display(Markdown(markdown21))
print(f'The shape of spikes is: {np.shape(spikes)}')
print(f'The shape of perception is: {np.shape(perception)}')
print(f'The mean of perception is: {np.mean(perception, axis=1)}')
display(Markdown(markdown22))

for move_no in range(3):
plt.plot(np.arange(-1.5,1.5+(1/100),(1/100)),np.mean(np.mean(spikes[move_no,:,:,:], axis=0), axis=0), label=['no motion', '$1 m/s^2$', '$2 m/s^2$'][move_no])
plt.xlabel('time [s]');
plt.ylabel('averaged spike counts');
plt.legend()
plt.show()

display(Markdown(markdown23))

for move in range(3):
rasterplot(spikes = spikes, movement = move, trial = 0)
plt.show()

display(Markdown(markdown24))

out1 = widgets.Output()
with out1:
display(Markdown(markdown1))

out = widgets.Tab([out1, out2])
out.set_title(0, 'Computational Model')
out.set_title(1, 'Data Analysis')

display(out)

Here you will do a literature review (to be done AFTER this tutorial!). For the projects, do not spend too much time on this. A thorough literature review could take weeks or months depending on your prior knowledge of the field…

The important thing for your project here is not to exhaustively survey the literature but rather to learn the process of modeling. 1-2 days of digging into the literature should be enough!

Here is what you should get out of it:

• Survey the literature

• What’s known?

• What has already been done?

• Previous models as a starting point?

• What hypotheses have been emitted in the field?

• Are there any alternative / complementary modeling approaches?

• What skill sets are required?

• Do I need learn something before I can start?

• Ensure that no important aspect is missed

• Potentially provides specific data sets / alternative modeling approaches for comparison

Do this AFTER the tutorial

# Step 3: Determining the basic ingredients¶

## Example projects step 3¶

# @title Example projects step 3
from ipywidgets import widgets
from IPython.display import Markdown, Math

markdown1 = r'''

## Step 3

We determined that we probably needed the following ingredients for our model:

* Vestibular input: *v(t)*

* Binary decision output: *d* - time dependent?

* Decision threshold: θ

* A filter (maybe running average?): *f*

* An integration mechanism to get from vestibular acceleration to sensed velocity: ∫

'''

markdown2 = '''
## Step 3

In order to address our question we need to design an appropriate computational data analysis pipeline. We did some brainstorming and think that we need to somehow extract the self-motion judgements from the spike counts of our neurons. Based on that, our algorithm needs to make a decision: was there self motion or not? This is a classical 2-choice classification problem. We will have to transform the raw spike data into the right input for the algorithm (spike pre-processing).

So we determined that we probably needed the following ingredients:

* spike trains *S* of 3-second trials (10ms spike bins)
* ground truth movement *mr* (real) and perceived movement *mp*
* some form of classifier *C* giving us a classification *c*
* spike pre-processing

'''

# No idea why this is necessary but math doesn't render properly without it
display(Markdown(r""))

out2 = widgets.Output()
with out2:
display(Markdown(markdown2))

out1 = widgets.Output()
with out1:
display(Markdown(markdown1))

out = widgets.Tab([out1, out2])
out.set_title(0, 'Computational Model')
out.set_title(1, 'Data Analysis')

display(out)

## Think! 3: Determine your basic ingredients¶

This will allow you to think deeper about what your modeling project will need. It’s a crucial step before you can formulate hypotheses because you first need to understand what your modeling approach will need. There are 2 aspects you want to think about:

1. What parameters / variables are needed?]

• Constants?

• Do they change over space, time, conditions…?

• What details can be omitted?

• Constraints, initial conditions?

• Model inputs / outputs?

2. Variables needed to describe the process to be modelled?

• Brainstorming!

• What can be observed / measured? latent variables?

• Where do these variables come from?

• Do any abstract concepts need to be instantiated as variables?

• E.g. value, utility, uncertainty, cost, salience, goals, strategy, plant, dynamics

• Instantiate them so that they relate to potential measurements!

This is a step where your prior knowledge and intuition is tested. You want to end up with an inventory of specific concepts and/or interactions that need to be instantiated.

Make sure to avoid the pitfalls!

I’m experienced, I don’t need to think about ingredients anymore

• Or so you think…

I can’t think of any ingredients

• Think about the potential experiment. What are your stimuli? What parameters? What would you control? What do you measure?

I have all inputs and outputs

• Good! But what will link them? Thinking about that will start shaping your model and hypotheses

I can’t think of any links (= mechanisms)

• You will acquire a library of potential mechanisms as you keep modeling and learning
• But the literature will often give you hints through hypotheses
• If you still can't think of links, then maybe you're missing ingredients?

# Step 4: Formulating specific, mathematically defined hypotheses¶

## Example projects step 4¶

# @title Example projects step 4
from ipywidgets import widgets
from IPython.display import Markdown

# Not writing in latex because that didn't render in jupyterbook

markdown1 = r'''

## Step 4

Our main hypothesis is that the strength of the illusion has a linear relationship to the amplitude of vestibular noise.

Mathematically, this would write as

S = k ⋅ N

where *S* is the illusion strength and *N* is the noise level, and *k* is a free parameter.
>we could simply use the frequency of occurance across repetitions as the "strength of the illusion"

We would get the noise as the standard deviation of *v(t)*, i.e.

N = E[v(t)2],

where **E** stands for the expected value.

Do we need to take the average across time points?
> doesn't really matter because we have the generative process, so we can just use the σ that we define

'''

markdown2 = '''
## Step 4

We think that noise in the signal drives whether or not people perceive self motion. Maybe the brain uses the strongest signal at peak acceleration to decide on self motion, but we actually think it is better to accumulate evidence over some period of time. We want to test this. The noise idea also means that when the signal-to-noise ratio is higher, the brain does better, and this would be in the faster acceleration condition. We want to test this too.

We came up with the following hypotheses focussing on specific details of our overall research question:

* Hyp 1: Accumulated vestibular spike rates explain self-motion judgements better than average spike rates around peak acceleration.
* Hyp 2: Classification performance should be better for faster vs slower self-motion.

> There are many other hypotheses you could come up with, but for simplicity, let's go with those.

Mathematically, we can write our hypotheses as follows (using our above ingredients):
* Hyp 1: **E**(caccum) > **E**(cwin)
* Hyp 2: **E**(cfast) > **E**(cslow)

Where **E** denotes taking the expected value (in this case the mean) of its argument: classification outcome in a given trial type.

'''

# No idea why this is necessary but math doesn't render properly without it
display(Markdown(r""))

out2 = widgets.Output()
with out2:
display(Markdown(markdown2))

out1 = widgets.Output()
with out1:
display(Markdown(markdown1))

out = widgets.Tab([out1, out2])
out.set_title(0, 'Computational Model')
out.set_title(1, 'Data Analysis')

display(out)

## Think! 4: Formulating your hypothesis¶

Once you have your question and goal lines up, you have done a literature review (let’s assume for now) and you have thought about ingredients needed for your model, you’re now ready to start thinking about specific hypotheses.

Formulating hypotheses really consists of two consecutive steps:

1. You think about the hypotheses in words by relating ingredients identified in Step 3

• What is the model mechanism expected to do?

• How are different parameters expected to influence model results?

2. You then express these hypotheses in mathematical language by giving the ingredients identified in Step 3 specific variable names.

• Be explicit, e.g. $$y(t)=f(x(t),k)$$ but $$z(t)$$ doesn’t influence $$y$$

There are also “structural hypotheses” that make assumptions on what model components you hypothesize will be crucial to capture the phenomenon at hand.

Important: Formulating the hypotheses is the last step before starting to model. This step determines the model approach and ingredients. It provides a more detailed description of the question / goal from Step 1. The more precise the hypotheses, the easier the model will be to justify.

Make sure to avoid the pitfalls!

I don’t need hypotheses, I will just play around with the model

• Hypotheses help determine and specify goals. You can (and should) still play…

My hypotheses don’t match my question (or vice versa)

• This is a normal part of the process!
• You need to loop back to Step 1 and revisit your question / phenomenon / goals

I can’t write down a math hypothesis

• Often that means you lack ingredients and/or clarity on the hypothesis
• OR: you have a “structural” hypothesis, i.e. you expect a certain model component to be crucial in explaining the phenomenon / answering the question

# Summary¶

In this tutorial, we worked through some steps of the process of modeling.

• We defined a phenomenon and formulated a question (step 1)

• We collected information the state-of-the-art about the topic (step 2)

• We determined the basic ingredients (step 3), and used these to formulate a specific mathematically defined hypothesis (step 4)

You are now in a position that you could start modeling without getting lost. But remember: you might have to work through steps 1-4 again after doing a literature review and/or if there were other pitfalls you identified along the way (which is totally normal).

# Next steps¶

In a follow-up notebook, we will continue with the steps 5-10 to guide you through the implementation and completion stages of the projects. You can also find this in the Modeling Steps section of the Project Booklet.


text:
## Found 48 Documents (Results 1–48)

100
MathJax

Full Text:

Full Text:

Full Text:

### Formal contexts, formal concept analysis, and Galois connections. (English)Zbl 1464.68383

Banerjee, Anindya (ed.) et al., Semantics, abstract interpretation, and reasoning about programs: essays dedicated to David A. Schmidt on the occasion of his sixtieth birthday, Manhattan, Kansas, USA, September 19–20, 2013. Waterloo: Open Publishing Association (OPA). Electron. Proc. Theor. Comput. Sci. (EPTCS) 129, 105-120 (2013).
MSC:  68T30 06A15
Full Text:

### Representation of fuzzy concept lattices in the framework of classical FCA. (English)Zbl 1397.06015

MSC:  06D72 06A15 68T30
Full Text:

### Generalization of one-sided concept lattices. (English)Zbl 1413.06008

MSC:  06B23 06A15 68T30

### Concept lattices of a relational structure. (English)Zbl 1351.68277

Pfeiffer, Heather D. (ed.) et al., Conceptual structures for STEM research and education. 20th international conference on conceptual structures, ICCS 2013, Mumbay, India, January 10–12, 2013. Proceedings. Berlin: Springer (ISBN 978-3-642-35785-5/pbk; 978-3-642-35786-2/ebook). Lecture Notes in Computer Science 7735, 301-310 (2013).
Full Text:

### Multi-adjoint relation equations: definition, properties and solutions using concept lattices. (English)Zbl 1320.68173

MSC:  68T30 03E72 06A15
Full Text:

### Axiomatic characterizations of dual concept lattices. (English)Zbl 1316.68162

MSC:  68T30 06A15 06B23
Full Text:

### Fuzzy relation equations and Galois connections. (English)Zbl 1312.03035

MSC:  03E72 06A15 15B33

### Dual multi-adjoint concept lattices. (English)Zbl 1293.06001

MSC:  06B99 06A15 68T30
Full Text:

### Formal concept analysis and lattice-valued Chu systems. (English)Zbl 1320.06004

MSC:  06A15 06B75 68T30
Full Text:

### Note on formal contexts of generalized one-sided concept lattices. (English)Zbl 1299.06008

MSC:  06A15 06B23 68T30
Full Text:

### On some application of residuated mappings. (English)Zbl 1287.06006

MSC:  06B23 03E72 06A15
Full Text:

### Right and left closure operators. (English)Zbl 1295.03044

MSC:  03G25 06A15

### Closure-based constraints in formal concept analysis. (English)Zbl 1312.68180

MSC:  68T30 06A15
Full Text:

Full Text:

### Closures on partial partitions from closures on sets. (English)Zbl 1324.06004

MSC:  06A15 03E02 05A18
Full Text:

Full Text:

### On lattice-theoretical construction of matroids. (English)Zbl 1324.05019

MSC:  05B35 06A15 06B05
Full Text:

### Interior operators and topological separation. (English)Zbl 1284.54024

MSC:  54B30 54D10 18B30 06A15
Full Text:

Full Text:

### Closure operators and closure systems on quantaloid-enriched categories. (English)Zbl 1289.18007

MSC:  18D20 06A15
Full Text:

### Morphism classes producing (weak) Grothendieck topologies, (weak) Lawvere-Tierney topologies, and universal closure operations. (English)Zbl 1296.06005

MSC:  06A15 18F10

Full Text:

Full Text:

Full Text:

Full Text:

### Extensions of ordering sets of states from effect algebras onto their MacNeille completions. (English)Zbl 1270.06005

MSC:  06D35 06A15 81P10
Full Text:

Full Text:

### Lattice-valued topological systems as a framework for lattice-valued formal concept analysis. (English)Zbl 1403.06009

MSC:  06B23 06A15 06B30 18B30 68T30
Full Text:

### Recursive decomposition and bounds of the lattice of Moore co-families. (English)Zbl 1311.06003

MSC:  06A15 05A15 06B05
Full Text:

### Trijunctions and triadic Galois connections. (English. French summary)Zbl 1301.06017

MSC:  06A15 18A40 18B25

### Fuzzy bases of fuzzy domains. (English)Zbl 1266.06006

MSC:  06B35 06A15 06D22
Full Text:

Full Text:

### The prime stems of rooted circuits of closure spaces and minimum implicational bases. (English)Zbl 1264.06006

MSC:  06A15 52B40
Full Text:

Full Text:

### Concept-forming operators on multilattices. (English)Zbl 1396.06005

Cellier, Peggy (ed.) et al., Formal concept analysis. 11th international conference, ICFCA 2013, Dresden, Germany, May 21–24, 2013. Proceedings. Berlin: Springer (ISBN 978-3-642-38316-8/pbk). Lecture Notes in Computer Science 7880. Lecture Notes in Artificial Intelligence, 203-215 (2013).
MSC:  06B75 06A15 68T30
Full Text:

### Proper mergings of stars and chains are counted by sums of antidiagonals in certain convolution arrays. (English)Zbl 1396.06001

Cellier, Peggy (ed.) et al., Formal concept analysis. 11th international conference, ICFCA 2013, Dresden, Germany, May 21–24, 2013. Proceedings. Berlin: Springer (ISBN 978-3-642-38316-8/pbk). Lecture Notes in Computer Science 7880. Lecture Notes in Artificial Intelligence, 172-187 (2013).
Full Text:

### Contextual implications between attributes and some representation properties for finite lattices. (English)Zbl 1264.06007

Cellier, Peggy (ed.) et al., Formal concept analysis. 11th international conference, ICFCA 2013, Dresden, Germany, May 21–24, 2013. Proceedings. Berlin: Springer (ISBN 978-3-642-38316-8/pbk). Lecture Notes in Computer Science 7880. Lecture Notes in Artificial Intelligence, 1-27 (2013).
Full Text:

### Approximation of sets based on partial covering. (English)Zbl 1377.68236

Peters, James F. (ed.) et al., Transactions on Rough Sets XVI. Berlin: Springer (ISBN 978-3-642-36504-1/pbk). Lecture Notes in Computer Science 7736. Journal Subline, 144-220 (2013).
Full Text:

### The application of a characterization of adjunctions. (English)Zbl 1310.06005

MSC:  06A15 06A07 16Y60
Full Text:

Full Text:

### A Tannakian context for Galois theory. (English)Zbl 1303.18005

MSC:  18B25 06A15
Full Text:

all top 5

all top 3


text:
There is a newer version of this record available.

Preprint Open Access

# The P versus NP Problem

Frank Vega

### DataCite XML Export

<?xml version='1.0' encoding='utf-8'?>
<identifier identifierType="DOI">10.5281/zenodo.3239377</identifier>
<creators>
<creator>
<creatorName>Frank Vega</creatorName>
<nameIdentifier nameIdentifierScheme="ORCID" schemeURI="http://orcid.org/">0000-0001-8210-4126</nameIdentifier>
<affiliation>Joysonic</affiliation>
</creator>
</creators>
<titles>
<title>The P versus NP Problem</title>
</titles>
<publisher>Zenodo</publisher>
<publicationYear>2019</publicationYear>
<subjects>
<subject>Complexity Classes</subject>
<subject>Completeness</subject>
<subject>Polynomial Time</subject>
<subject>MONOTONE 1-IN-3 3SAT</subject>
<subject>2SET PACKING</subject>
</subjects>
<dates>
<date dateType="Issued">2019-06-02</date>
</dates>
<resourceType resourceTypeGeneral="Text">Preprint</resourceType>
<alternateIdentifiers>
<alternateIdentifier alternateIdentifierType="url">https://zenodo.org/record/3239377</alternateIdentifier>
</alternateIdentifiers>
<relatedIdentifiers>
<relatedIdentifier relatedIdentifierType="DOI" relationType="IsVersionOf">10.5281/zenodo.3237140</relatedIdentifier>
</relatedIdentifiers>
<rightsList>
<rights rightsURI="info:eu-repo/semantics/openAccess">Open Access</rights>
</rightsList>
<descriptions>
<description descriptionType="Abstract">
P versus NP is considered as one of the most important open problems in computer science. This consists in knowing the answer of the following question: Is P equal to NP? A precise statement of the P versus NP problem was introduced independently by Stephen Cook and Leonid Levin. Since that date, all efforts to find a proof for this problem have failed. To attack the P versus NP problem, the NP-completeness is a useful tool. We prove the known NP-complete problem MONOTONE 1-IN-3 3SAT can be polynomially reduced to the polynomial language 2SET PACKING. In this way, MONOTONE 1-IN-3 3SAT must be in P. If any NP-complete problem can be solved in polynomial time, then every language in NP has a polynomial time algorithm. Hence, we demonstrate the complexity class P is equal to NP.
</description>
</descriptions>
</resource>

124
89
views
All versions This version
Views 1249
Data volume 22.6 MB1.5 MB
Unique views 1009


text:
# Contents of /trunk/doc/cookbook/example10.tex

Revision 3308 - (show annotations)
Tue Oct 26 03:24:54 2010 UTC (10 years, 1 month ago) by jfenwick
File MIME type: application/x-tex
File size: 6619 byte(s)
Moved listing and class up a level.
Removed hackscore from cookbook.
Made cookbook use the new stuff - removed old stuff

 1 2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 3 % 4 % Copyright (c) 2003-2010 by University of Queensland 5 % Earth Systems Science Computational Center (ESSCC) 6 7 % 8 % Primary Business: Queensland, Australia 9 % Licensed under the Open Software License version 3.0 10 11 % 12 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 13 14 \section{Newtonian Potential} 15 16 In this chapter the gravitational potential field is developed for \esc. 17 Gravitational fields are present in many modelling scenarios, including 18 geophysical investigations, planetary motion and attraction and microparticle 19 interactions. Gravitational fields also presents the opportunity to demonstrate 20 the saving and visualisation of vector data for Mayavi. 21 22 The gravitational potential $U$ at a point $P$ due to a region with a mass 23 distribution of density $\rho(P)$, is given by Poisson's equation 24 \citep{Blakely1995} 25 \begin{equation} \label{eqn:poisson} 26 \nabla^2 U(P) = -4\pi\gamma\rho(P) 27 \end{equation} 28 where $\gamma$ is the gravitational constant. 29 Consider now the \esc general form, which can simply be related to 30 \autoref{eqn:poisson} using two coefficients. The result is 31 \begin{equation} 32 -\left(A_{jl} u_{,l} \right)_{,j} = Y 33 \end{equation} 34 one recognises that the LHS side is equivalent to 35 \begin{equation} \label{eqn:ex10a} 36 -\nabla A \nabla u 37 \end{equation} 38 If $A=\delta_{jl}$ then \autoref{eqn:ex10a} is equivalent to 39 \begin{equation*} 40 -\nabla^2 u 41 \end{equation*} 42 and thus Poisson's \autoref{eqn:poisson} satisfies the general form when 43 \begin{equation} 44 A=\delta_{jl} \text{ and } Y= 4\pi\gamma\rho 45 \end{equation} 46 At least one boundary point must be set for the problem to be solvable. For this 47 example we have set all of the boundaries to zero. The normal flux condition is 48 also zero by default. For a more realistic and complicated models it may be 49 necessary to give careful consideration to the boundary conditions of the model, 50 which can have an influence upon the solution. 51 52 Setting the boundary condition is relatively simple using the \verb!q! and 53 \verb!r! variables of the general form. First \verb!q! is defined as a masking 54 function on the boundary using 55 \begin{python} 56 q=whereZero(x[1]-my)+whereZero(x[1])+whereZero(x[0])+whereZero(x[0]-mx) 57 \end{python} 58 This identifies the points on the boundary and \verb!r! is simply 59 ser to \verb!r=0.0!. This is a dirichlet boundary condition. 60 61 \section{Gravity Pole} 62 \sslist{example10a.py} 63 A gravity pole is used in this example to demonstrate the radial directionality 64 of gravity, and also to show how this information can be exported for 65 visualisation to Mayavi or an equivalent using the VTK data format. 66 67 The solution script for this section is very simple. First the domain is 68 constructed, then the parameters of the model are set, and finally the steady 69 state solution is found. There are quite a few values that can now be derived 70 from the solution and saved to file for visualisation. 71 72 The potential $U$ is related to the gravitational response $\vec{g}$ via 73 \begin{equation} 74 \vec{g} = \nabla U 75 \end{equation} 76 This for example as a vertical component $g_{z}$ where 77 \begin{equation} 78 g_{z}=\vec{g}\cdot\hat{z} 79 \end{equation} 80 Finally, there is the magnitude of the vertical component $g$ of 81 $g_{z}$ 82 \begin{equation} 83 g=|g_{z}| 84 \end{equation} 85 These values are derived from the \esc solution \verb!sol! to the potential $U$ 86 using the following commands 87 \begin{python} 88 g_field=grad(sol) #The graviational accelleration g. 89 g_fieldz=g_field*[0,1] #The vertical component of the g field. 90 gz=length(g_fieldz) #The magnitude of the vertical component. 91 \end{python} 92 This data can now be simply exported to a VTK file via 93 \begin{python} 94 # Save the output to file. 95 saveVTK(os.path.join(save_path,"ex10a.vtu"),\ 96 grav_pot=sol,g_field=g_field,g_fieldz=g_fieldz,gz=gz) 97 \end{python} 98 99 \begin{figure}[ht] 100 \centering 101 \includegraphics[width=0.75\textwidth]{figures/ex10apot.png} 102 \caption{Newtonian potential with g field directionality.} 103 \label{fig:ex10pot} 104 \end{figure} 105 106 \section{Gravity Well} 107 \sslist{example10b.py} 108 Let us now investigate the effect of gravity in three dimensions. Consider a 109 volume which contains a sphericle mass anomaly and a gravitational potential 110 which decays to zero at the base of the anomaly. 111 112 The script used to solve this model is very similar to that used for the gravity 113 pole in the previous section, but with an extra spatial dimension. As for all 114 the 3D problems examined in this cookbook, the extra dimension is easily 115 integrated into the \esc solultion script. 116 117 The domain is redefined from a rectangle to a Brick; 118 \begin{python} 119 domain = Brick(l0=mx,l1=my,n0=ndx, n1=ndy,l2=mz,n2=ndz) 120 \end{python} 121 the source is relocated along $z$; 122 \begin{python} 123 x=x-[mx/2,my/2,mz/2] 124 \end{python} 125 and, the boundary conditions are updated. 126 \begin{python} 127 q=whereZero(x[2]-inf(x[2])) 128 \end{python} 129 No modifications to the PDE solution section are required. This make the 130 migration of 2D to a 3D problem almost trivial. 131 132 \autoref{fig:ex10bpot} illustrates the strength of a PDE solution. Three 133 different visualisation types help define and illuminate properties of the data. 134 The cut surfaces of the potential are similar to a 2D section for a given x or y 135 and z. The iso-surfaces illuminate the 3D shape of the gravity field, as well as 136 its strength which is give by the colour. Finally, the streamlines highlight the 137 directional flow of the gravity field in this example. 138 139 \begin{figure}[htp] 140 \centering 141 \includegraphics[width=0.75\textwidth]{figures/ex10bpot.png} 142 \caption{Gravity well with iso surfaces and streamlines of the vector 143 gravitational potential.} 144 \label{fig:ex10bpot} 145 \end{figure} 146 147 \section{Gravity Surface over a fault model.} 148 \sslist{example10c.py,example10m.py} 149 This model demonstrates the gravity result for a more complicated domain which 150 contains a fault. Additional information will be added when geophysical boundary 151 conditions for a gravity scenario have been established. 152 153 \begin{figure}[htp] 154 \centering 155 \subfigure[The geometry of the fault model in example10c.py.] 156 {\label{fig:ex10cgeo} 157 \includegraphics[width=0.8\textwidth]{figures/ex10potfaultgeo.png}} \\ 158 \subfigure[The fault of interest from the fault model in 159 example10c.py.] 160 {\label{fig:ex10cmsh} 161 \includegraphics[width=0.8\textwidth]{figures/ex10potfaultmsh.png}} 162 \end{figure} 163 164 \begin{figure}[htp] 165 \centering 166 \includegraphics[width=0.8\textwidth]{figures/ex10cpot.png} 167 \caption{Gravitational potential of the fault model with primary layers and 168 faults identified as isosurfaces.} 169 \label{fig:ex10cpot} 170 \end{figure} 171


text:
# Math Help - Proof Metric Spaces

1. ## Proof Metric Spaces

Let p be a fixed prime number, and de fine d : Z × Z → R by d(m;m) = 0 for all
m ∈ Z and d(m; n) = 1/r
r when m != n and p^(r-1) is the highest power of p which
divides m − n. Show that d is a metric on Z.

The 1st condition holds since d(m,m)=0

What I started to do is try and write r in terms m & n and then substitute that into d(m,n) =1/r... This seems wrong to me.. Im seriously stumped with this question.

2. Okay, you clearly have d(x,x)= 0 and that d(x,y)> 0 if $x\ne y$.

Also clear is that d(x,y)= d(y,x).

The only hard part is the "triangle inequality": $d(x,y)\le d(x,z)+ d(z,y)$

If x= y or z= y or x= z, that is trivial so you can assume they are all different.

I think the crucial part is to note that if $p^n$ divides both x- z and z- y then it also divides x- y= (x- z)+ (z- y).


text:
# Galois group of a biquadratic extension

This article proves that biquadratic extensions correspond precisely to Galois extensions with Galois group isomorphic to the Klein $4$-group $V_{4}$ (at least if the characteristic of the base field is not $2$). More precisely,

###### Theorem 1.

Let $F$ be a field of characteristic $\neq 2$ and $K$ a finite extension of $F$. Then the following are equivalent:

1. 1.

$K=F(\sqrt{D_{1}},\sqrt{D_{2}})$ for some $D_{1},D_{2}\in F$ such that none of $D_{1},D_{2}$, or $D_{1}D_{2}$ is a square in $F$.

2. 2.

$K$ is a Galois extension of $F$ with $\operatorname{Gal}(K/F)\cong V_{4}$;

Proof. Suppose first that condition (1) holds. Then $[F(\sqrt{D_{1}}):F]=[F(\sqrt{D_{2}}):F]=2$ since neither $D_{1}$ nor $D_{2}$ is a square in $F$. Now obviously

 $[K:F]=[F(\sqrt{D_{1}},\sqrt{D_{2}}):F(\sqrt{D_{1}})][F(\sqrt{D_{1}}):F]\leq 4$

and so $[K:F(\sqrt{D_{1}})]\leq 2$. If $K=F(\sqrt{D_{1}})$, then $\sqrt{D_{2}}\in F(\sqrt{D_{1}})$, so $\sqrt{D_{2}}=a+b\sqrt{D_{1}}$ and $D_{2}=a^{2}+b^{2}D_{1}+2ab\sqrt{D_{1}}$. Thus $a=0$ or $b=0$. If $b=0$, then $D_{2}$ is a square. If $a=0$, then $D_{1}D_{2}=b^{2}D_{1}^{2}$ is a square. In any case, this is a contradiction. Thus $K$ is a quadratic extension of $F(\sqrt{D_{1}})$. So $[K:F]=4$. But $K$ is the splitting field for $(x^{2}-D_{1})(x^{2}-D_{2})$, since the splitting field must contain both square roots, and the polynomial obviously splits in $K$, so $G=\operatorname{Gal}(K/F)$ has four elements

 $id$ $\sigma:\begin{cases}\sqrt{D_{1}}\mapsto-\sqrt{D_{1}}\\ \sqrt{D_{2}}\mapsto\sqrt{D_{2}}\end{cases}$ $\tau:\begin{cases}\sqrt{D_{1}}\mapsto\sqrt{D_{1}}\\ \sqrt{D_{2}}\mapsto-\sqrt{D_{2}}\end{cases}$ $\sigma\tau:\begin{cases}\sqrt{D_{1}}\mapsto-\sqrt{D_{1}}\\ \sqrt{D_{2}}\mapsto-\sqrt{D_{2}}\end{cases}$

and is thus isomorphic to $V_{4}$.

Now assume that condition (2) holds. Since $\operatorname{Gal}(K/F)\cong V_{4}$, there must be three intermediate subfields $E_{1},E_{2},E_{3}$ between $F$ and $K$ of degree $2$ over $F$ corresponding to the three subgroups of $V_{4}$ of order $2$. Thus each of these is a quadratic extension. Suppose $E_{1}=F(\sqrt{D_{1}}),E_{2}=F(\sqrt{D_{2}})$ where neither $D_{1}$ nor $D_{2}$ is a square in $F$. The fact that $E_{1}\neq E_{2}$ implies as above that $D_{1}D_{2}$ is also not a square in $F$ (in fact $E_{3}=F(\sqrt{D_{1}D_{2}})$. Thus $E_{1}E_{2}\supsetneq E_{1},E_{2}$, and is of degree $4$ over $F$, so $K=E_{1}E_{2}=F(\sqrt{D_{1}},\sqrt{D_{2}})$.

Title Galois group of a biquadratic extension GaloisGroupOfABiquadraticExtension 2013-03-22 17:44:06 2013-03-22 17:44:06 rm50 (10146) rm50 (10146) 5 rm50 (10146) Theorem msc 11R16


text:
Level pending

A non-conducting ring of Radius R and mass m having charge q uniformly distributed over its circumference is placed on a rough horizontal surface.A vertical time varying uniform magnetic field B= 4t^2 is switched on a time t=0 .The coefficient of friction between the ring and the table , if the ring starts rotating at t=2 sec, is ?

GIVEN; M= 2 kg R = 2 m Q = 2 c g = 10 m/s^2

×


text:
AFM2TFM(1) Pyramid OSx Operating System AFM2TFM(1)

NNAAMMEE
afm2tfm - convert Adobe font metrics to TeX font metrics

SSYYNNOOPPSSIISS
afm2tfm _f_o_o_1[._a_f_m] [ --ee _r_a_t_i_o ] [ --ss _s_l_a_n_t ] [ --tt _f_o_o_2[._t_f_m]
] [ --vv _b_a_r[._v_p_l] | --VV _b_a_r[._v_p_l] ] [ _f_o_o_3[._t_f_m] ]

DDEESSCCRRIIPPTTIIOONN
PostScript fonts are (or should be) accompanied by font
metric files such as TTiimmeess--RRoommaann..aaffmm,, which describes the
characteristics of the font called Times-Roman. To use such
fonts with TeX, we need TFM files that contain similar
information. The command

afm2tfm Times-Roman.afm Times-Roman.tfm

(which can be reduced to simply

afm2tfm Times-Roman

by taking default shortcuts) will create the necessary file
TTiimmeess--RRoommaann..ttffmm,, which can then be moved to the directory
where TeX normally looks for font metric information. The
PostScript conversion program ddvviippss will also treat Times-
Roman as a resident PostScript font if you include the line

Times-Roman

in the file _p_s_f_o_n_t_s._m_a_p.

The file names used in this manual page are not consistent
with the new font naming scheme implemented by Karl Berry;
please refer to the main ddvviippss..tteexx documentation for the
correct names to use.

PostScript fonts have a different encoding scheme from that
of plain TeX. Although both schemes are based on ASCII, spe-
cial characters such as ligatures and accents are handled
quite differently. Therefore we obtain best results by using
a "virtual font" interface, which makes TeX act as if the
PostScript font had a standard TeX encoding. Such a virtual
font can be obtained, for example, by the command

afm2tfm Times-Roman -v times

or, more fully, by:

afm2tfm Times-Roman.afm -v times.vpl Times-Roman.tfm

This produces two outputs, namely the "virtual property
list" file ttiimmeess..vvppll and the TeX font metric file TTiimmeess--
Roman.tfm. The latter file describes an "actual font" on

Printed 11/25/90 9 August 1990 1

AFM2TFM(1) Pyramid OSx Operating System AFM2TFM(1)

which the virtual font is based.

If you wish to specify a different TFM file name than the
default, you can use the -t option; this will override any
default TFM file name that would be calculated from the
input file name.

To use the font in TeX, you should first run

vptovf times.vpl times.vf times.tfm

then install the file ttiimmeess..vvff in the directory for virtual
fonts and install ttiimmeess..ttffmm in the directory for TeX font
metrics. (You can also make more complex virtual fonts by
editing ttiimmeess..vvppll first.) Once this has been done, you're
all set. You can use code like this in TeX henceforth:

\font\myfont=times at 10pt
\myfont
Hello, I am being typeset in Times-Roman.

Note that there are two fonts, one actual (`Times-Roman',
which is analogous to a raw piece of hardware) and one vir-
tual (`times', which has typesetting knowhow added). You
could also say `\font\TR=Times-Roman at 10pt' and typeset
directly with that, but then you would have no ligatures or
kerning, and you would have to use Adobe character positions
for special letters like \ae. The virtual font called ttiimmeess
not only has ligatures and kerning, and most of the standard
accent conventions of TeX, it also has a few additional
features not present in the Computer Modern fonts. For exam-
ple, it includes all the Adobe characters (such as the Pol-
ish ogonek and the French guillemots). It also allows you to
type 58 accented letters from `Aacute' to `zcaron' as if
they were ligatures --- namely as `acute' followed by `A',
etc., where you can get `acute' (\char 19) by defining a
suitable control sequence. (The 58 constructed characters
are found in the AFM file, and constructed as specified by
tional accent combinations by editing the VPL file.) The
only things you lose from ordinary TeX text fonts are the
dotless j (which can be hacked into the VPL file with
literal PostScript specials if you have the patience) and
uppercase Greek letters (which just don't exist unless you

These fonts can be scaled to any size. Go wild! Note, how-
ever, that using PostScript fonts does use up the printer's
virtual memory and it does take time. You may find down-
the built-in PostScript fonts!

Printed 11/25/90 9 August 1990 2

AFM2TFM(1) Pyramid OSx Operating System AFM2TFM(1)

OOPPTTIIOONNSS
Special effects are also obtainable, with commands such as

afm2tfm Times-Roman -s .167 -v timessl Times-Slanted

which create ttiimmeessssll..vvppll and TTiimmeess--SSllaanntteedd..ttffmm.. To use this,
proceed as above but put the line

Times-Slanted "/Times-Roman .167 SlantFont"

into _p_s_f_o_n_t_s._m_a_p. Then TTiimmeess--SSllaanntteedd will act as if it were
a resident font, although it is actually constructed from
Times-Roman by PostScript hackery. (It's an oblique version
of Times-Roman, obtained by slanting everything 1/6 to the
right.) Similarly, you can get an extended font by

afm2tfm Times-Extended -e 1.2 -v timesx Times-Extended

and by recording the pseudo-resident font

Times-Extended "/Times-Roman 1.2 ExtendFont"

The command line switches are:

--ee _r_a_t_i_o
All characters are stretched horizontally by the stated
_r_a_t_i_o; if it is less than 1.0, you get a condensed
font.

--ss _s_l_a_n_t
All characters are slanted to the right by the stated
_s_l_a_n_t; if it is negative, the letters slope to the left
font).

--vv _f_i_l_e[._v_p_l]
Generate a virtual property list (VPL) file as well as
a TFM file.

--VV _f_i_l_e[._v_p_l]
Same as -v, but the virtual font generated is a caps-
and-small-caps font obtained by scaling uppercase
letters by .8 to typeset lowercase. This font handles
accented letters and retains proper kerning.

NNOONN--RREESSIIDDEENNTT PPOOSSTTSSCCRRIIPPTT FFOONNTTSS
If you want to use a non-printer-resident PostScript font
for which you have a .pfb file (an Adobe Type 1 font pro-
gram), you can make it act like a resident font by putting a
`<' sign and the name of the .pfb file just after the font
name in the _p_s_f_o_n_t_s._m_a_p file entry. For example,

Printed 11/25/90 9 August 1990 3

AFM2TFM(1) Pyramid OSx Operating System AFM2TFM(1)

StoneInformal
will cause ddvviippss to include StoneInformal.pfb in your docu-
ment as if it were a header file, whenever the pseudo-
resident font StoneInformal is used in a document. Simi-
larly, you can generate transformed fonts and include lines
like

StoneInformal-Condensed
in _p_s_f_o_n_t_s._m_a_p, in which case StoneInformal.pfb will be
loaded whenever StoneInformal-Condensed is used. (Each
files should be installed in the config directory with the

FFOONNTT AALLIIAASSEESS
Some systems don't handle files with long names well---MSDOS
and TWENEX are two notable examples. For this reason, ddvviippss
will accept an alias for such fonts. Such an alias should
be the first word on the _p_s_f_o_n_t_s._m_a_p line. For instance, if
we wanted the name _p_t_m_r to be used for _T_i_m_e_s-_R_o_m_a_n since our
computer can't handle long names, we would use the following
line in our _p_s_f_o_n_t_s._m_a_p file:

ptmr Times-Roman

The TFM file must have the name _p_t_m_r._t_f_m.

The parsing of the _p_s_f_o_n_t_s._m_a_p file should be explained to
eliminate all confusion. Each line is separated into words,
where words are separated by spaces or tabs. If a word
begins with a double quote, however, it extends until the
next double quote or the end of the line. If a word starts
with a less than character, it is treated as a font header
a double quote, it is special instructions on how to gen-
erate that font. Otherwise it is a name. The first such
name is always the name TeX uses for the font and is also
the name of the TFM file. If there is another name word,
that name is used as the PostScript name; if there is only
one name word, it is used for both the TeX name and the
PostScript name.

Note that the aliases also register the full PostScript
name, so the single line

ptmr Times-Roman

would allow ddvviippss to `find' the _p_t_m_r font as well as the
_T_i_m_e_s-_R_o_m_a_n font.

Printed 11/25/90 9 August 1990 4

AFM2TFM(1) Pyramid OSx Operating System AFM2TFM(1)

Incidentally, many font files (e.g., in the Adobe Type
Library) include more characters internally than you can
access directly without making a few changes. These charac-
ters typically have code -1 in the afm file and no
corresponding "constructed character" (CC) specification.
For example, in Adobe Garamond there are Eth and eth, Thorn
and thorn, plus things like copyright and onehalf, plus 58
accented letters Aacute thru zcaron (with accents over caps
much better looking than you can get from constructed
accents). To use these characters, give them character codes
between 0 and 255 in the afm file, and build the correspond-
ing EncodingVector (instead of StandardEncoding) in the pfb
file. Then afm2tfm will generate a vpl file that includes
accented characters as ligatures, as explained above; for
example, `Aacute' will be accessible as `acute' followed by
`A' (as well as by its character code in the virtual font).

FFIILLEESS
_p_s_f_o_n_t_s._m_a_p in the config directory used by dvips (update
this).
../_a_f_m/_M_a_k_e_f_i_l_e in the dvips sources (look at this for exam-
ples).

SSEEEE AALLSSOO
dvips(1), tex(1), vptovf(1)

BBUUGGSS
An option to add letterspacing to the virtual font was
rejected by Knuth because it would make the fi and fl liga-
tures break the normal rhythmic pattern.

AAUUTTHHOORRSS
Tomas Rokicki and Don Knuth

Printed 11/25/90 9 August 1990 5

AFM2TFM(1) Pyramid OSx Operating System AFM2TFM(1)

NNAAMMEE
afm2tfm - convert Adobe font metrics to TeX font metrics

SSYYNNOOPPSSIISS
afm2tfm _f_o_o_1[._a_f_m] [ --ee _r_a_t_i_o ] [ --ss _s_l_a_n_t ] [ --tt _f_o_o_2[._t_f_m]
] [ --vv _b_a_r[._v_p_l] | --VV _b_a_r[._v_p_l] ] [ _f_o_o_3[._t_f_m] ]

DDEESSCCRRIIPPTTIIOONN
PostScript fonts are (or should be) accompanied by font
metric files such as TTiimmeess--RRoommaann..aaffmm,, which describes the
characteristics of the font called Times-Roman. To use such
fonts with TeX, we need TFM files that contain similar
information. The command

afm2tfm Times-Roman.afm Times-Roman.tfm

(which can be reduced to simply

afm2tfm Times-Roman

by taking default shortcuts) will create the necessary file
TTiimmeess--RRoommaann..ttffmm,, which can then be moved to the directory
where TeX normally looks for font metric information. The
PostScript conversion program ddvviippss will also treat Times-
Roman as a resident PostScript font if you include the line

Times-Roman

in the file _p_s_f_o_n_t_s._m_a_p.

The file names used in this manual page are not consistent
with the new font naming scheme implemented by Karl Berry;
please refer to the main ddvviippss..tteexx documentation for the
correct names to use.

PostScript fonts have a different encoding scheme from that
of plain TeX. Although both schemes are based on ASCII, spe-
cial characters such as ligatures and accents are handled
quite differently. Therefore we obtain best results by using
a "virtual font" interface, which makes TeX act as if the
PostScript font had a standard TeX encoding. Such a virtual
font can be obtained, for example, by the command

afm2tfm Times-Roman -v times

or, more fully, by:

afm2tfm Times-Roman.afm -v times.vpl Times-Roman.tfm

This produces two outputs, namely the "virtual property
list" file ttiimmeess..vvppll and the TeX font metric file TTiimmeess--
Roman.tfm. The latter file describes an "actual font" on

Printed 11/25/90 9 August 1990 1

AFM2TFM(1) Pyramid OSx Operating System AFM2TFM(1)

which the virtual font is based.

If you wish to specify a different TFM file name than the
default, you can use the -t option; this will override any
default TFM file name that would be calculated from the
input file name.

To use the font in TeX, you should first run

vptovf times.vpl times.vf times.tfm

then install the file ttiimmeess..vvff in the directory for virtual
fonts and install ttiimmeess..ttffmm in the directory for TeX font
metrics. (You can also make more complex virtual fonts by
editing ttiimmeess..vvppll first.) Once this has been done, you're
all set. You can use code like this in TeX henceforth:

\font\myfont=times at 10pt
\myfont
Hello, I am being typeset in Times-Roman.

Note that there are two fonts, one actual (`Times-Roman',
which is analogous to a raw piece of hardware) and one vir-
tual (`times', which has typesetting knowhow added). You
could also say `\font\TR=Times-Roman at 10pt' and typeset
directly with that, but then you would have no ligatures or
kerning, and you would have to use Adobe character positions
for special letters like \ae. The virtual font called ttiimmeess
not only has ligatures and kerning, and most of the standard
accent conventions of TeX, it also has a few additional
features not present in the Computer Modern fonts. For exam-
ple, it includes all the Adobe characters (such as the Pol-
ish ogonek and the French guillemots). It also allows you to
type 58 accented letters from `Aacute' to `zcaron' as if
they were ligatures --- namely as `acute' followed by `A',
etc., where you can get `acute' (\char 19) by defining a
suitable control sequence. (The 58 constructed characters
are found in the AFM file, and constructed as specified by
tional accent combinations by editing the VPL file.) The
only things you lose from ordinary TeX text fonts are the
dotless j (which can be hacked into the VPL file with
literal PostScript specials if you have the patience) and
uppercase Greek letters (which just don't exist unless you

These fonts can be scaled to any size. Go wild! Note, how-
ever, that using PostScript fonts does use up the printer's
virtual memory and it does take time. You may find down-
the built-in PostScript fonts!

Printed 11/25/90 9 August 1990 2

AFM2TFM(1) Pyramid OSx Operating System AFM2TFM(1)

OOPPTTIIOONNSS
Special effects are also obtainable, with commands such as

afm2tfm Times-Roman -s .167 -v timessl Times-Slanted

which create ttiimmeessssll..vvppll and TTiimmeess--SSllaanntteedd..ttffmm.. To use this,
proceed as above but put the line

Times-Slanted "/Times-Roman .167 SlantFont"

into _p_s_f_o_n_t_s._m_a_p. Then TTiimmeess--SSllaanntteedd will act as if it were
a resident font, although it is actually constructed from
Times-Roman by PostScript hackery. (It's an oblique version
of Times-Roman, obtained by slanting everything 1/6 to the
right.) Similarly, you can get an extended font by

afm2tfm Times-Extended -e 1.2 -v timesx Times-Extended

and by recording the pseudo-resident font

Times-Extended "/Times-Roman 1.2 ExtendFont"

The command line switches are:

--ee _r_a_t_i_o
All characters are stretched horizontally by the stated
_r_a_t_i_o; if it is less than 1.0, you get a condensed
font.

--ss _s_l_a_n_t
All characters are slanted to the right by the stated
_s_l_a_n_t; if it is negative, the letters slope to the left
font).

--vv _f_i_l_e[._v_p_l]
Generate a virtual property list (VPL) file as well as
a TFM file.

--VV _f_i_l_e[._v_p_l]
Same as -v, but the virtual font generated is a caps-
and-small-caps font obtained by scaling uppercase
letters by .8 to typeset lowercase. This font handles
accented letters and retains proper kerning.

NNOONN--RREESSIIDDEENNTT PPOOSSTTSSCCRRIIPPTT FFOONNTTSS
If you want to use a non-printer-resident PostScript font
for which you have a .pfb file (an Adobe Type 1 font pro-
gram), you can make it act like a resident font by putting a
`<' sign and the name of the .pfb file just after the font
name in the _p_s_f_o_n_t_s._m_a_p file entry. For example,

Printed 11/25/90 9 August 1990 3

AFM2TFM(1) Pyramid OSx Operating System AFM2TFM(1)

StoneInformal
will cause ddvviippss to include StoneInformal.pfb in your docu-
ment as if it were a header file, whenever the pseudo-
resident font StoneInformal is used in a document. Simi-
larly, you can generate transformed fonts and include lines
like

StoneInformal-Condensed
in _p_s_f_o_n_t_s._m_a_p, in which case StoneInformal.pfb will be
loaded whenever StoneInformal-Condensed is used. (Each
files should be installed in the config directory with the

FFOONNTT AALLIIAASSEESS
Some systems don't handle files with long names well---MSDOS
and TWENEX are two notable examples. For this reason, ddvviippss
will accept an alias for such fonts. Such an alias should
be the first word on the _p_s_f_o_n_t_s._m_a_p line. For instance, if
we wanted the name _p_t_m_r to be used for _T_i_m_e_s-_R_o_m_a_n since our
computer can't handle long names, we would use the following
line in our _p_s_f_o_n_t_s._m_a_p file:

ptmr Times-Roman

The TFM file must have the name _p_t_m_r._t_f_m.

The parsing of the _p_s_f_o_n_t_s._m_a_p file should be explained to
eliminate all confusion. Each line is separated into words,
where words are separated by spaces or tabs. If a word
begins with a double quote, however, it extends until the
next double quote or the end of the line. If a word starts
with a less than character, it is treated as a font header
a double quote, it is special instructions on how to gen-
erate that font. Otherwise it is a name. The first such
name is always the name TeX uses for the font and is also
the name of the TFM file. If there is another name word,
that name is used as the PostScript name; if there is only
one name word, it is used for both the TeX name and the
PostScript name.

Note that the aliases also register the full PostScript
name, so the single line

ptmr Times-Roman

would allow ddvviippss to `find' the _p_t_m_r font as well as the
_T_i_m_e_s-_R_o_m_a_n font.

Printed 11/25/90 9 August 1990 4

AFM2TFM(1) Pyramid OSx Operating System AFM2TFM(1)

Incidentally, many font files (e.g., in the Adobe Type
Library) include more characters internally than you can
access directly without making a few changes. These charac-
ters typically have code -1 in the afm file and no
corresponding "constructed character" (CC) specification.
For example, in Adobe Garamond there are Eth and eth, Thorn
and thorn, plus things like copyright and onehalf, plus 58
accented letters Aacute thru zcaron (with accents over caps
much better looking than you can get from constructed
accents). To use these characters, give them character codes
between 0 and 255 in the afm file, and build the correspond-
ing EncodingVector (instead of StandardEncoding) in the pfb
file. Then afm2tfm will generate a vpl file that includes
accented characters as ligatures, as explained above; for
example, `Aacute' will be accessible as `acute' followed by
`A' (as well as by its character code in the virtual font).

FFIILLEESS
_p_s_f_o_n_t_s._m_a_p in the config directory used by dvips (update
this).
../_a_f_m/_M_a_k_e_f_i_l_e in the dvips sources (look at this for exam-
ples).

SSEEEE AALLSSOO
dvips(1), tex(1), vptovf(1)

BBUUGGSS
An option to add letterspacing to the virtual font was
rejected by Knuth because it would make the fi and fl liga-
tures break the normal rhythmic pattern.

AAUUTTHHOORRSS
Tomas Rokicki and Don Knuth

Printed 11/25/90 9 August 1990 5


text:
# Multichannel Poisson denoising and deconvolution on the sphere: application to the Fermi Gamma-ray Space Telescope

@article{Schmitt2012MultichannelPD,
title={Multichannel Poisson denoising and deconvolution on the sphere: application to the Fermi Gamma-ray Space Telescope},
author={Jeremy Schmitt and Jean-Luc Starck and Jean Marc Casandjian and Jalal M. Fadili and Isabelle A. Grenier},
journal={Astronomy and Astrophysics},
year={2012},
volume={546}
}
• Published 13 June 2012
• Physics
• Astronomy and Astrophysics
A multiscale representation-based denoising method for spherical data contaminated with Poisson noise, the multiscale variance stabilizing transform on the sphere (MS-VSTS), has been recently proposed. This paper first extends this MS-VSTS to spherical 2D-1D, where the two first dimensions are longitude and latitude, and the third dimension is a meaningful physical index such as energy or time. Then we introduce a novel multichannel deconvolution built upon the 2D-1D MS-VSTS, which allows to…
17 Citations

## Figures from this paper

The denoised, deconvolved, and decomposed Fermi γ-ray sky - An application of the D3PO algorithm
• Physics
• 2014
We analyze the 6.5 year all-sky data from the Fermi Large Area Telescope that are restricted to γ -ray photons with energies between 0.6–307.2 GeV. Raw count maps show a superposition of diffuse and
Denoising, deconvolving, and decomposing photon observations - Derivation of the D3PO algorithm
• Computer Science
• 2015
The D 3 PO algorithm addresses the inference problem of denoising, deconvolving, and decomposing photon observations and successfully denoised, deconvolved, and decomposed the data into a diuse and a point-like signal estimate for the respective photon flux components.
Deconvolution of poissonian images with the PURE-LET approach
• Mathematics
2016 IEEE International Conference on Image Processing (ICIP)
• 2016
Simulation experiments indicate that the proposed non-iterative image deconvolution algorithm outperforms current state-of-the-art techniques, in terms of both restoration quality and computational time.
Wavelet-Based Segmentation on the Sphere
• Computer Science
Pattern Recognit.
• 2020
Distinguishing Dark Matter from Unresolved Point Sources in the Inner Galaxy with Photon Statistics
• Physics
• 2014
Data from the Fermi Large Area Telescope suggests that there is an extended excess of GeV gamma-ray photons in the Inner Galaxy. Identifying potential astrophysical sources that contribute to this
Minimal spanning tree algorithm for γ-ray source detection in sparse photon images: cluster parameters and selection strategies
• Physics, Computer Science
• 2013
The results show that $\sqrt{M}$ is strongly correlated with other statistical significance parameters, derived from a wavelet based algorithm and maximum likelihood (ML) analysis, and that it can be used as a good estimator of statistical significance of MST detections.
3D sparse representations on the sphere and applications in astronomy
• Physics
Optics & Photonics - Optical Engineering + Applications
• 2013
We present several 3D sparse decompositions based on wavelets on the sphere that are useful for different kind of data set such as regular 3D spherical measurements (r,θ, φ) and multichannel
Nonparametric noise estimation method for raw images.
• Mathematics
Journal of the Optical Society of America. A, Optics, image science, and vision
• 2014
An extensive cross-validation procedure is described to compare this new method with state-of-the-art parametric methods and with laboratory calibration methods giving a reliable ground truth, even for nonlinear detectors.
Second-Generation Curvelets on the Sphere
• Computer Science
IEEE Transactions on Signal Processing
• 2017
This work presents a new second-generation curvelet transform, where scale-discretized curvelets are constructed directly on the sphere, and presents an illustrative application demonstrating the effectiveness of curvelets for representing directional curve-like features in natural spherical images.
Mean curvature regularization-based Poisson image restoration
• Mathematics
J. Electronic Imaging
• 2015
Experimental results show that the proposed approach to mean curvature-based regularization to address the Poisson noise image restoration problem can produce higher quality results and more natural images compared to some state of theart variational algorithms recently developed.

## References

SHOWING 1-10 OF 16 REFERENCES
Poisson denoising on the sphere: application to the Fermi gamma ray space telescope
• Physics
• 2010
The Large Area Telescope (LAT), the main instrument of the Fermi gamma-ray Space telescope, detects high energy gamma rays with energies from 20 MeV to more than 300 GeV. The two main scientific
Source detection using a 3D sparse representation: application to the Fermi gamma-ray space telescope
• Physics
• 2009
The multiscale variance stabilization Transform (MSVST) has recently been proposed for Poisson data denoising. This procedure, which is nonparametric, is based on thresholding wavelet coefficients.
Wavelets, Ridgelets, and Curvelets for Poisson Noise Removal
• Mathematics
IEEE Transactions on Image Processing
• 2008
A variance stabilizing transform (VST) is applied on a filtered discrete Poisson process, yielding a near Gaussian process with asymptotic constant variance, leading to multiscale VSTs (MS-VSTs) and nonlinear decomposition schemes.
HEALPix: A Framework for High-Resolution Discretization and Fast Analysis of Data Distributed on the Sphere
• Computer Science
• 2005
This paper considers the requirements and implementation constraints on a framework that simultaneously enables an efficient discretization with associated hierarchical indexation and fast analysis/synthesis of functions defined on the sphere and demonstrates how these are explicitly satisfied by HEALPix.
The Large Area Telescope on the Fermi Gamma-ray Space Telescope Mission
• Physics
• 2009
(Abridged) The Large Area Telescope (Fermi/LAT, hereafter LAT), the primary instrument on the Fermi Gamma-ray Space Telescope (Fermi) mission, is an imaging, wide field-of-view, high-energy gamma-ray
FERMI LARGE AREA TELESCOPE FIRST SOURCE CATALOG
• Physics
• 2010
We present a catalog of high-energy gamma-ray sources detected by the Large Area Telescope (LAT), the primary science instrument on the Fermi Gamma-ray Space Telescope (Fermi), during the first 11
Threshold for Extended Emission in Short Gamma-ray Bursts
• Physics
• 2010
The initial pulse complex (IPC) in short gamma-ray bursts is sometimes accompanied by a softer, low-intensity extended emission (EE) component. In cases where such a component is not observed, it is
Wavelets, ridgelets and curvelets on the sphere
• Computer Science
• 2006
It is shown how these transforms can be used in denoising and especially in a Combined Filtering Method, which uses both the wavelet and the curvelet transforms, thus benefiting from the advantages of both transforms.
For most large underdetermined systems of linear equations the minimal 𝓁1‐norm solution is also the sparsest solution
The techniques include the use of random proportional embeddings and almost‐spherical sections in Banach space theory, and deviation bounds for the eigenvalues of random Wishart matrices.
Advances in Machine Learning and Data Mining for Astronomy
• Physics, Computer Science
• 2012
This book explores how advances in machine learning and data mining can solve current and future problems in astronomy and looks at how they could lead to the creation of entirely new algorithms within the data mining community.


text:
# Modular Constructions of Quantum Field Theories with Interactions

Bert Schroer, Hans-Werner Wiesbrock
December 31, 1998
We extend the previously introduced constructive modular method to nonperturbative QFT. In particular the relevance of the concept of quantum localization'' (via intersection of algebras) versus classical locality (via support properties of test functions) is explained in detail, the wedge algebras are constructed rigorously and the formal aspects of double cone algebras for $d=1+1$ factorizing theories are determined. The well-known on-shell crossing symmetry of the S-Matrix and of formfactors (cyclicity relation) in such theories is intimately related to the KMS properties of new quantum-local PFG (one-particle polarization-free generators) of these wedge algebras. These generators are on-shell'' and their Fourier transforms turn out to fulfill the Zamolodchikov-Faddeev algebra. As the wedge algebras contain the crossing symmetry informations, the double cone algebras reveal the particle content of fields. Modular theory associates with this double cone algebra two very useful chiral conformal quantum field theories which are the algebraic versions of the light ray algebras.


text:
# Using GTF files to extract information about genes, transcripts and related features

The Ensembl gtf file contains the comprehensive gene and transcript information for model organisms e.g. human and mouse. It can be used in RNA-Seq alignment and quantification programs such as STAR.

• The file can be accessed under the ‘Gene sets’ column of the table of the handy Ensembl FTP downloads website.
• for example, you can download the current versions of the mouse and human gtf files with the following commands:
curl ftp://ftp.ensembl.org/pub/release-94/gtf/mus_musculus/Mus_musculus.GRCm38.94.gtf.gz -o Mus_musculus.GRCm38.94.gtf.gz
curl ftp://ftp.ensembl.org/pub/release-94/gtf/homo_sapiens/Homo_sapiens.GRCh38.94.gtf.gz -o Homo_sapiens.GRCh38.94.gtf.gz

## Formatting of the GTF file

• the GTF file is a specific type following the GFF annotation format.
• there’s actually a mixture of tabs, colons etc. used to separate fields, which you can see by viewing the file as below:
[me@XXXXX ]$head Homo_sapiens.GRCh38.94.gtf #!genome-build GRCh38.p12 #!genome-version GRCh38 #!genome-date 2013-12 #!genome-build-accession NCBI:GCA_000001405.27 #!genebuild-last-updated 2018-07 1 havana gene 11869 14409 . + . gene_id "ENSG00000223972"; gene_version "5"; gene_name "DDX11L1"; gene_source "havana"; gene_biotype "transcribed_unprocessed_pseudogene"; 1 havana transcript 11869 14409 . + . gene_id "ENSG00000223972"; gene_version "5"; transcript_id "ENST00000456328"; transcript_version "2"; gene_name "DDX11L1"; gene_source "havana"; gene_biotype "transcribed_unprocessed_pseudogene"; transcript_name "DDX11L1-202"; transcript_source "havana"; transcript_biotype "processed_transcript"; tag "basic"; transcript_support_level "1"; ## Features inside the GTF file • The third column lists the feature types, which you can also confirm with this small script from Benn: awk '{print$3}' Homo_sapiens.GRCh38.87.gtf | sort | uniq
CDS
Selenocysteine
exon
five_prime_utr
gene
start_codon
stop_codon
three_prime_utr
transcript
• These seem to be best defined in the gtf submission guidelines under the heading ‘Attributes/Annotation features’. You’ll notice it refers to them as ‘SO’ features which actually corresponds to the Sequence Ontology.
• This is also pointed out on the answer post by Istvan Albert. Indeed searching for terms gives a table containing a brief definition and the children and parents of that term which is a bit more informative. The below image shows for example that UTR is considered a portion of the mature transcript.

### Extract features of interest from GTF using the command line

• The Gencode documentation has some beginner short scripts for doing this with awk within the section ‘Examples for fetching specific parts from the file’ here.
• It’s also really nicely outlined in the series of posts by Nacho Caballero here.

### Import the GTF file into R

• For downstream applications, the package rtracklayer has some handy import function specifically for gtf files.
• for the given FILE_PATH you can do something like this:
# import gtf file -------------------------------------

mm_gtf <- rtracklayer::import('FILE_PATH/Mus_musculus.GRCm38.94.gtf')
unique(levels(mm_gtf$type)) genes_only <- mm_gtf[mm_gtf$type == "gene",]


text:
## Thomas' Calculus 13th Edition

$\langle 800\cos 115^{o},\ 800\sin 115^{o}\rangle \approx\langle-338.1,\ 725.0\rangle$
The angle "$25^{\circ}$ west of north", relative to east, the +x axis, is: $90^{o}+25^{o}=115^{o}.$ (second quadrant) Velocity is a vector ${\bf v}$ with components $= \langle v_{1},\ v_{2}\rangle$ $v_{1}$ = the x-component = $800\cos 115^{o},$ $v_{2}$ = the y-component = $800\sin 115^{o}$ $\langle 800\cos 115^{o},\ 800\sin 115^{o}\rangle \approx\langle-338.1,\ 725.0\rangle$


text:
# Key size vs output size of a MAC

What is more important, in terms of security, the size of the MAC or the size of the key that it uses? I'm asking this because I have to answer the following homework question:

What is more secure? A MAC with a 12-byte key and 6-byte MAC length, or a MAC with a 8-byte key and 12-byte MAC length?

For the first one, it's easier to find a pre-image of the result. But for the second one, it's easier to find the key.

• Hint: Is finding pre-images a problem for the security of a MAC (ie can you use it to break the security definition)? – SEJPM Jun 22 '17 at 15:53
• The answer to the quoted question is not well defined. It's trivial to construct pairs of MAC schemes, such that either direction is true. – Maeher May 18 at 9:13

But there's also a qualitative difference. Suppose you have learned a message/authenticator pair $$(m, a)$$ where $$a = H_k(m)$$.
• You can test a guess $$k_0$$ for the key offline by testing whether $$a \stackrel?= H_{k_0}(m)$$.
The feasibility of finding the key $$k$$ depends on how much money the adversary has to commit to an offline key search.
• You can test a guess $$a'_0$$ for the authenticator $$a' = H_k(m')$$ of a forged message $$m'$$ only by submitting $$(m', a'_0)$$ online to the legitimate system and seeing how the legitimate system reacts.
The feasibility of forging an authenticator $$a'$$ this way depends on how much bandwidth the legitimate system has to accept online forgery attempts.