text
stringlengths 104
605k
|
---|
EtG Modding Guide
Search…
⌃K
# Pixel Measurement Conversions
A simple conversion guide from in-game pixels to numerical values
Gungeon measures its units in pixels. However, when making guns or otherwise using measurements for distance in Gungeon, we can't use pixels. Instead we have to convert them to a numerical value.
The equation itself is simple;
$n = x/16$
where n is the numerical equal and x is the amount of pixels you want to convert. An important thing to note is that when finding the pixel measurements you want to convert, remember to count from the bottom left corner of your sprite.
This equation is used to determine the hand positions on a gun, a gun's barrel offset, among other things.
Common pixel conversions:
Pixel Measurements Numerical Measurements 1 0.0625 2 0.125 3 0.1875 4 0.25 5 0.3125 6 0.375 7 0.4375 8 0.5 9 0.5625 10 0.625 11 0.6875 12 0.75 13 0.8125 14 0.875 15 0.9375 16 1 |
Quick Search:
Browse by:
Zurich Open Repository and Archive
# Chipot, M; Hale, J (1983). Stable equilibria with variable diffusion. In: Smoller, J A. Nonlinear partial differential equations (Durham, N.H. 1982). Providence, RI, 209-213. ISBN 0-8218-5017-2.
Full text not available from this repository.
## Abstract
For a scalar nonlinear parabolic equation in one space dimension with homogeneous Neumann boundary conditions, criteria are given on the diffusion coefficient to ensure that the stable equilibrium solutions are constant functions regardless of the nonlinearities. The Dirichlet problem is also discussed. |
# Time in General Relativity
AHSAN MUJTABA
TL;DR Summary
I want to know that how Einstein came towards the idea of considering time as a coordinate in his theory.
We study metrics, in them, we take time as a coordinate. I mean to say that if time is a coordinate then in normal mathematical language, we can have negative coordinate values as well. This confuses me a lot as I want to see and understand the concept from the true physicist's perspective. Please help me understand it. I know some of you may find it funny, but I really need to clear myself up.
Homework Helper
Gold Member
2022 Award
Time has always been a coordinate. And always taken positive and negative values. The SUVAT equation, for example: $$x = x_0 + ut + \frac 1 2 at^2$$ is valid for any value of ##t##. And you can plot a position against time graph, with ##x## and ##t## as the coordinates.
2022 Award
Maxwell's equations cannot describe a stationary light wave. In fact, they can only describe a light wave traveling at ##c##. Einstein decided to consider the implications if it were true that light always travels at ##c## for all inertial frames, rather than trying to modify the equations to not say something so strange. He found that he had derived the Lorentz transforms, which Lorentz had already discovered as an ad hoc fix for Maxwell's equations without realising the implications. But Einstein's new perspective allowed him to realize that the Lorentz transforms were fundamental to mechanics as well, not just a quick fix for electromagnetism.
It was actually Minkowski, not Einstein, who pointed out that the Lorentz transforms had the form of a coordinate transform on a 4d non-Euclidean space, now called Minkowski spacetime. That was the insight that made time and space two parts of a whole, rather than two distinct phenomena. Einstein initially resisted the idea, I believe, but eventually ran with it, adding curvature to explain gravity.
Negative time is totally unexciting. If I have a stopwatch and start it now, I would describe one second ago as ##t=-1##. As @PeroK says, this works perfectly well in non-relativistic physics too.
Last edited:
sophiecentaur and PeroK
Gold Member
Negative time is totally unexciting.
It has disturbed and excited a lot of people so far. Negative t is ok in the Algebra but that 'ratchet' can be hard to deal with in the mind if you can't just 'accept' it.
Ibix
Homework Helper
Gold Member
2022 Award
Is negative time a thing of the past?
DrClaude, russ_watters, robphy and 3 others
2022 Award
It has disturbed and excited a lot of people so far. Negative t is ok in the Algebra but that 'ratchet' can be hard to deal with in the mind if you can't just 'accept' it.
To expand a bit on my previous comment, then, in the context of coordinates negative time is just "the time before the time I called zero". It isn't really any more mysterious than representing latitude north and south of the equator as positive and negative numbers of degrees. In such a system one hemisphere might be called "negative space" by analogy, but there's nothing peculiar about it.
ergospherical
Negative time: no sweat. Imaginary time: panik...
Gold Member
B.C. 100 = A.D. -100
Mentor
Summary:: I want to know that how Einstein came towards the idea of considering time as a coordinate in his theory.
I mean to say that if time is a coordinate then in normal mathematical language, we can have negative coordinate values as well. This confuses me a lot as I want to see and understand the concept from the true physicist's perspective.
As others have said, negative time is fine. Consider a rocket launch. Famously they count down the time to the launch saying something like “t minus 10 seconds and counting”. They are at that moment at a coordinate time of negative 10 seconds. There is nothing wrong with that nor any physical difficulty.
robphy
Gold Member
Come on guys. We're being just a tad disingenuous here. What upsets us is the fact that we can choose to go in either direction on the x, y or z axes but we cannot experience the process of 'going in the negative time direction. Messing with signs in Maths is not an explanation of what's going on. The analogy / model of Maths falls down when used as we'd like to use it.
Is there an equivalent to the thermodynamic argument about entropy when we talk about the 'other' dimensions?
ergospherical
we cannot experience the process of 'going in the negative time direction.
You can, for example by writing ##t' = -t##.
Mentor
We're being just a tad disingenuous here. What upsets us is the fact that we can choose to go in either direction on the x, y or z axes but we cannot experience the process of 'going in the negative time direction. Messing with signs in Maths is not an explanation of what's going on. The analogy / model of Maths falls down when used as we'd like to use it.
I disagree. What you are pointing out is a separate issue than what the OP raised.
The inability to turn around in time has nothing to do with negative coordinate time as the OP asked about. It has to do with the fact that there is only one dimension of time.
Motore and sophiecentaur
2022 Award
Come on guys. We're being just a tad disingenuous here.
I suspect that the OP might, indeed, mean something like "why can't we go backwards in time if time is part of spacetime". (The short answer is that there is no way to draw a future directed timelike worldline that turns into a past directed one without it being null or discontinuous somewhere, for the reason @Dale stated.) But that isn't what was asked, and I'd like to see if the OP says that's what was meant before I go off into too much of a tangent.
Motore and Nugatory
Gold Member
You can, for example by writing ##t' = -t##.
What you are pointing out is a separate issue than what the OP raised.
The clue I got from the OP was the way he distinguishes between Maths and the Physicist. Perhaps the OP is suggesting or asking if there should be more acknowledgment of the essential difference between t and the other dimensions.
I guess the answer to the OP is that there is a difference but that people can't express it except to say you can't travel back in time.
2022 Award
I guess the answer to the OP is that there is a difference but that people can't express it except to say you can't travel back in time.
No, we can express it clearly. There's only one timelike dimension, which has the consequence that you can't reverse direction in that dimension without exceeding the speed of light, which you can't do. I'm just not yet sure if that's what we're being asked.
valenumr, Motore, sophiecentaur and 1 other person
Mentor
I guess the answer to the OP is that there is a difference but that people can't express it except to say you can't travel back in time.
I agree with @Ibix, it can certainly be expressed easily enough, but I don’t see that in his question.
The differences between time and the other dimensions are the sign in the metric and the fact that there are three dimensions of space and only one of time. The sign of the metric physically means that timelike intervals are measured by clocks while spacelike intervals are measured by rulers. The presence of multiple spatial dimensions allows closed spacelike curves. The presence of only a single temporal dimension prevents closed timelike curves.
Motore
Staff Emeritus
Gold Member
I see nothing in the original post that excludes general relativity, and the thread's title includes "General Relativity". In which case, all of the statements below are false.
The inability to turn around in time has nothing to do with negative coordinate time as the OP asked about. It has to do with the fact that there is only one dimension of time.
(The short answer is that there is no way to draw a future directed timelike worldline that turns into a past directed one without it being null or discontinuous somewhere, for the reason @Dale stated.
The presence of multiple spatial dimensions allows closed spacelike curves. The presence of only a single temporal dimension prevents closed timelike curves.
The situation is much more subtle than this. If we are restricting to the spacetime of standard special relativity that is both flat and topologically ##\mathbb{R}^4##, then this statement is true; otherwise, this statement is false.
If either of these condition is relaxed, it is possible to have one dimension of time and closed timelike curves. Examples 1) flat spacetime with topology ##S \times \mathbb{R}^3##; 2) Godel's spactime which is curved, and which has topology ##\mathbb{R}^4##.
Ibix
Gold Member
B.C. 100 = A.D. -100
< pedantry >
B.C. 100 = A.D. -101
There is no year zero.
< /pedantry >
Mentor
I see nothing in the original post that excludes general relativity, and the thread's title includes "General Relativity". In which case, all of the statements below are false.
The situation is much more subtle than this. If we are restricting to the spacetime of standard special relativity that is both flat and topologically ##\mathbb{R}^4##, then this statement is true; otherwise, this statement is false.
If either of these condition is relaxed, it is possible to have one dimension of time and closed timelike curves. Examples 1) flat spacetime with topology ##S \times \mathbb{R}^3##; 2) Godel's spactime which is curved, and which has topology ##\mathbb{R}^4##.
Good point, but in those cases the false part is “The inability to turn around in time”. The explanation that follows is correct for any spacetimes that actually have that inability regardless of curvature or topology. The restriction to flatness and R4 is too strong.
Gold Member
< pedantry >
B.C. 100 = A.D. -101
< /pedantry >
< pedantry >2 Isn't it BC 100 = AD –99 ? < /pedantry >2
sophiecentaur
Gold Member
< pedantry >2 Isn't it BC 100 = AD –99 ? < /pedantry >2
You are correct. And I am wearing egg.
So:
BC n is equivalent to AD -(n-1)
eg:
sophiecentaur and DrGreg
Gold Member
It is a peculiar mathematics of no zero. Time interval of years for the same date, e.g. 4 July, is given as
$$A.D.m-B.C.n=m+n-1=m-(-n+1)=n-(-m+1)$$
In order to satisfy it
$$A.D.m=B.C.(-m+1)$$
$$B.C.n=A.D.(-n+1)$$
But it brings prohibited A.D.0 and B.C.0. So in contrary to my previous post no minus sign should be introduced to A.D. and B.C..
Last edited: |
# An automobile traveling 88.0 km/h has tires of 72.0 cm diameter. (a) What is the angular speed of the tires about their axles
###### Question:
An automobile traveling 88.0 km/h has tires of 72.0 cm diameter. (a) What is the angular speed of the tires about their axles
### 7. What’s the answer to this question
7. What’s the answer to this question...
### How is a heterogeneous mixture different from a homogeneous mixture?
How is a heterogeneous mixture different from a homogeneous mixture?...
### Demonstrate your ability to use negatives in real life situations. Do this by creating and recording 2 sentences in Spanish in which you use 2 negative expressions.
Demonstrate your ability to use negatives in real life situations. Do this by creating and recording 2 sentences in Spanish in which you use 2 negative expressions....
### A hot air balloon is hovering in the air when it drops a 40 Kg food package to some lost golfers. If the package is dropped from an altitude of 500 m and air resistance can be neglected, how fast is the package moving when it hits the ground?
A hot air balloon is hovering in the air when it drops a 40 Kg food package to some lost golfers. If the package is dropped from an altitude of 500 m and air resistance can be neglected, how fast is the package moving when it hits the ground?...
### Which figure has a greater surface area? And how do I find the surface area? thanks!
Which figure has a greater surface area? And how do I find the surface area? thanks!...
### What is the net ionic equation of the reaction of BeCl2 with NaOH? Express your answer as a chemical equation.
What is the net ionic equation of the reaction of BeCl2 with NaOH? Express your answer as a chemical equation....
### What was an argument made by the Soviet Union concerning Allied strategy in the war?
What was an argument made by the Soviet Union concerning Allied strategy in the war?...
### What is the Cartoon trying to say about democracy?
What is the Cartoon trying to say about democracy? ...
### Exercise 1: Put the verbs in the simple present tense 1. Mothers often (tell) their children stories at bedtime. 2. He (brush) his teeth before he (go) to bed. 3. Every year they (go) to the countryside on holiday. 4. Lan usually (not/watch) T.V in the evening. 5. My friends always (wish) to become a teacher. 6. What time your father (go) to work ? 7. We always (understand) what the teacher (explain). 8. He (live) in Thai Nguyen in summers. 9. I usually (go) to school by bus. 10. What program he
Exercise 1: Put the verbs in the simple present tense 1. Mothers often (tell) their children stories at bedtime. 2. He (brush) his teeth before he (go) to bed. 3. Every year they (go) to the countryside on holiday. 4. Lan usually (not/watch) T.V in the evening. 5. My friends always (wish) to become ...
### Cells of the pancreas will incorporate radioactively labeled amino acids in to proteins. This "tagging" of newly synthesized proteins enables a researcher to track their location. In this case, we are tracking an enzyme secreted by pancreatic cells. What is its most likely pathway
Cells of the pancreas will incorporate radioactively labeled amino acids in to proteins. This "tagging" of newly synthesized proteins enables a researcher to track their location. In this case, we are tracking an enzyme secreted by pancreatic cells. What is its most likely pathway...
### Which of the following was an effect of the Renaissance? A. More people learned Latin. B. More works were published in the vernacular. C. The church supported written scientific works. D. People developed a renewed interest in religious subjects.
Which of the following was an effect of the Renaissance? A. More people learned Latin. B. More works were published in the vernacular. C. The church supported written scientific works. D. People developed a renewed interest in religious subjects....
### How do u solve P=IRT solve for t
How do u solve P=IRT solve for t...
### HELP I DONT UNDERSTAND?!
HELP I DONT UNDERSTAND?!...
### Which presentation skill ensures that your audience will be able to understand the words you are saying?
Which presentation skill ensures that your audience will be able to understand the words you are saying?...
### What is involuntary migration? A. choosing to move to find new opportunities B. being forced to move from one place to another C. migrating out of one's own free will D. spreading culture through technology Please select the best answer from the choices provided
What is involuntary migration? A. choosing to move to find new opportunities B. being forced to move from one place to another C. migrating out of one's own free will D. spreading culture through technology Please select the best answer from the choices provided...
### Which of Juliet's garments does Romeo wish he could be?
Which of Juliet's garments does Romeo wish he could be?...
### In a school, the ratio of soccer players to volleyball players is 4:1. Which statement is true? A.The number of soccer players is 4 times the number of volleyball players. B.If there are 20 total players, then 16 of them are volleyball players. C.1/4 of the total players are soccer players. D.If there are 4 volleyball players, then there are 12 soccer players.
in a school, the ratio of soccer players to volleyball players is 4:1. Which statement is true? A.The number of soccer players is 4 times the number of volleyball players. B.If there are 20 total players, then 16 of them are volleyball players. C.1/4 of the total players are soccer players. D.If the... |
## 502 – Propositional logic
September 7, 2009
1. Introduction
These notes follow closely notes originally developed by Alexander Kechris for the course Math 6c at Caltech.
Somewhat informally, a proposition is a statement which is either true or false. Whichever the case, we call this its truth value.
Example 1 “There are infinitely many primes”; “${5>3}$”; and “14 is a square number” are propositions. A statement like “${x}$ is odd,” (a “propositional function”) is not a proposition since its truth depends on the value of ${x}$ (but it becomes one when ${x}$ is substituted by a particular number).
Informally still, a propositional connective combines individual propositions into a compound one so that its truth or falsity depends only on the truth or falsity of the components. The most common connectives are:
• Not (negation), ${\lnot,}$
• And (conjunction), ${\wedge,}$
• Or (disjunction), ${\vee,}$
• Implies (implication), ${\rightarrow,}$
• Iff (equivalence), ${\leftrightarrow.}$ |
# BERT Fine-Tuning Tutorial with PyTorch
By Chris McCormick and Nick Ryan
Revised on 12/13/19 to use the new transformers interface.
In this tutorial I’ll show you how to use BERT with the huggingface PyTorch library to quickly and efficiently fine-tune a model to get near state of the art performance in sentence classification. More broadly, I describe the practical application of transfer learning in NLP to create high performance models with minimal effort on a range of NLP tasks.
This post is presented in two forms–as a blog post here and as a Colab Notebook here.
The content is identical in both, but:
• The blog post includes a comments section for discussion.
• The Colab Notebook will allow you to run the code and inspect it as you read through.
I’ve also published a video walkthrough of this post on my YouTube channel!
# Introduction
## History
2018 was a breakthrough year in NLP. Transfer learning, particularly models like Allen AI’s ELMO, OpenAI’s Open-GPT, and Google’s BERT allowed researchers to smash multiple benchmarks with minimal task-specific fine-tuning and provided the rest of the NLP community with pretrained models that could easily (with less data and less compute time) be fine-tuned and implemented to produce state of the art results. Unfortunately, for many starting out in NLP and even for some experienced practicioners, the theory and practical application of these powerful models is still not well understood.
## What is BERT?
BERT (Bidirectional Encoder Representations from Transformers), released in late 2018, is the model we will use in this tutorial to provide readers with a better understanding of and practical guidance for using transfer learning models in NLP. BERT is a method of pretraining language representations that was used to create models that NLP practicioners can then download and use for free. You can either use these models to extract high quality language features from your text data, or you can fine-tune these models on a specific task (classification, entity recognition, question answering, etc.) with your own data to produce state of the art predictions.
This post will explain how you can modify and fine-tune BERT to create a powerful NLP model that quickly gives you state of the art results.
## Advantages of Fine-Tuning
In this tutorial, we will use BERT to train a text classifier. Specifically, we will take the pre-trained BERT model, add an untrained layer of neurons on the end, and train the new model for our classification task. Why do this rather than train a train a specific deep learning model (a CNN, BiLSTM, etc.) that is well suited for the specific NLP task you need?
1. Quicker Development
• First, the pre-trained BERT model weights already encode a lot of information about our language. As a result, it takes much less time to train our fine-tuned model - it is as if we have already trained the bottom layers of our network extensively and only need to gently tune them while using their output as features for our classification task. In fact, the authors recommend only 2-4 epochs of training for fine-tuning BERT on a specific NLP task (compared to the hundreds of GPU hours needed to train the original BERT model or a LSTM from scratch!).
2. Less Data
• In addition and perhaps just as important, because of the pre-trained weights this method allows us to fine-tune our task on a much smaller dataset than would be required in a model that is built from scratch. A major drawback of NLP models built from scratch is that we often need a prohibitively large dataset in order to train our network to reasonable accuracy, meaning a lot of time and energy had to be put into dataset creation. By fine-tuning BERT, we are now able to get away with training a model to good performance on a much smaller amount of training data.
3. Better Results
• Finally, this simple fine-tuning procedure (typically adding one fully-connected layer on top of BERT and training for a few epochs) was shown to achieve state of the art results with minimal task-specific adjustments for a wide variety of tasks: classification, language inference, semantic similarity, question answering, etc. Rather than implementing custom and sometimes-obscure architetures shown to work well on a specific task, simply fine-tuning BERT is shown to be a better (or at least equal) alternative.
### A Shift in NLP
This shift to transfer learning parallels the same shift that took place in computer vision a few years ago. Creating a good deep learning network for computer vision tasks can take millions of parameters and be very expensive to train. Researchers discovered that deep networks learn hierarchical feature representations (simple features like edges at the lowest layers with gradually more complex features at higher layers). Rather than training a new network from scratch each time, the lower layers of a trained network with generalized image features could be copied and transfered for use in another network with a different task. It soon became common practice to download a pre-trained deep network and quickly retrain it for the new task or add additional layers on top - vastly preferable to the expensive process of training a network from scratch. For many, the introduction of deep pre-trained language models in 2018 (ELMO, BERT, ULMFIT, Open-GPT, etc.) signals the same shift to transfer learning in NLP that computer vision saw.
Let’s get started!
# 1. Setup
## 1.1. Using Colab GPU for Training
Google Colab offers free GPUs and TPUs! Since we’ll be training a large neural network it’s best to take advantage of this (in this case we’ll attach a GPU), otherwise training will take a very long time.
A GPU can be added by going to the menu and selecting:
Edit --> Notebook Settings --> Hardware accelerator --> (GPU)
Then run the following cell to confirm that the GPU is detected.
import tensorflow as tf
# Get the GPU device name.
device_name = tf.test.gpu_device_name()
# The device name should look like the following:
if device_name == '/device:GPU:0':
print('Found GPU at: {}'.format(device_name))
else:
raise SystemError('GPU device not found')
The default version of TensorFlow in Colab will soon switch to TensorFlow 2.x.
We recommend you upgrade now or ensure your notebook will continue to use TensorFlow 1.x via the %tensorflow_version 1.x magic: more info.
Found GPU at: /device:GPU:0
In order for torch to use the GPU, we need to identify and specify the GPU as the device. Later, in our training loop, we will load data onto the device.
import torch
# If there's a GPU available...
if torch.cuda.is_available():
# Tell PyTorch to use the GPU.
device = torch.device("cuda")
print('There are %d GPU(s) available.' % torch.cuda.device_count())
print('We will use the GPU:', torch.cuda.get_device_name(0))
# If not...
else:
print('No GPU available, using the CPU instead.')
device = torch.device("cpu")
There are 1 GPU(s) available.
We will use the GPU: Tesla P100-PCIE-16GB
## 1.2. Installing the Hugging Face Library
Next, let’s install the transformers package from Hugging Face which will give us a pytorch interface for working with BERT. (This library contains interfaces for other pretrained language models like OpenAI’s GPT and GPT-2.) We’ve selected the pytorch interface because it strikes a nice balance between the high-level APIs (which are easy to use but don’t provide insight into how things work) and tensorflow code (which contains lots of details but often sidetracks us into lessons about tensorflow, when the purpose here is BERT!).
At the moment, the Hugging Face library seems to be the most widely accepted and powerful pytorch interface for working with BERT. In addition to supporting a variety of different pre-trained transformer models, the library also includes pre-built modifications of these models suited to your specific task. For example, in this tutorial we will use BertForSequenceClassification.
The library also includes task-specific classes for token classification, question answering, next sentence prediciton, etc. Using these pre-built classes simplifies the process of modifying BERT for your purposes.
!pip install transformers
[I've removed this output cell for brevity].
The code in this notebook is actually a simplified version of the run_glue.py example script from huggingface.
run_glue.py is a helpful utility which allows you to pick which GLUE benchmark task you want to run on, and which pre-trained model you want to use (you can see the list of possible models here). It also supports using either the CPU, a single GPU, or multiple GPUs. It even supports using 16-bit precision if you want further speed up.
Unfortunately, all of this configurability comes at the cost of readability. In this Notebook, we’ve simplified the code greatly and added plenty of comments to make it clear what’s going on.
# 2. Loading CoLA Dataset
We’ll use The Corpus of Linguistic Acceptability (CoLA) dataset for single sentence classification. It’s a set of sentences labeled as grammatically correct or incorrect. It was first published in May of 2018, and is one of the tests included in the “GLUE Benchmark” on which models like BERT are competing.
## 2.1. Download & Extract
We’ll use the wget package to download the dataset to the Colab instance’s file system.
!pip install wget
Collecting wget
Downloading https://files.pythonhosted.org/packages/47/6a/62e288da7bcda82b935ff0c6cfe542970f04e29c756b0e147251b2fb251f/wget-3.2.zip
Building wheels for collected packages: wget
Building wheel for wget (setup.py) ... [?25l[?25hdone
Created wheel for wget: filename=wget-3.2-cp36-none-any.whl size=9681 sha256=988b5f3cabb3edeed6a46e989edefbdecc1d5a591f9d38754139f994fc00be8d
Stored in directory: /root/.cache/pip/wheels/40/15/30/7d8f7cea2902b4db79e3fea550d7d7b85ecb27ef992b618f3f
Successfully built wget
Installing collected packages: wget
Successfully installed wget-3.2
The dataset is hosted on GitHub in this repo: https://nyu-mll.github.io/CoLA/
import wget
import os
print('Downloading dataset...')
# The URL for the dataset zip file.
url = 'https://nyu-mll.github.io/CoLA/cola_public_1.1.zip'
# Download the file (if we haven't already)
if not os.path.exists('./cola_public_1.1.zip'):
wget.download(url, './cola_public_1.1.zip')
Downloading dataset...
Unzip the dataset to the file system. You can browse the file system of the Colab instance in the sidebar on the left.
# Unzip the dataset (if we haven't already)
if not os.path.exists('./cola_public/'):
!unzip cola_public_1.1.zip
Archive: cola_public_1.1.zip
creating: cola_public/
inflating: cola_public/README
creating: cola_public/tokenized/
inflating: cola_public/tokenized/in_domain_dev.tsv
inflating: cola_public/tokenized/in_domain_train.tsv
inflating: cola_public/tokenized/out_of_domain_dev.tsv
creating: cola_public/raw/
inflating: cola_public/raw/in_domain_dev.tsv
inflating: cola_public/raw/in_domain_train.tsv
inflating: cola_public/raw/out_of_domain_dev.tsv
## 2.2. Parse
We can see from the file names that both tokenized and raw versions of the data are available.
We can’t use the pre-tokenized version because, in order to apply the pre-trained BERT, we must use the tokenizer provided by the model. This is because (1) the model has a specific, fixed vocabulary and (2) the BERT tokenizer has a particular way of handling out-of-vocabulary words.
We’ll use pandas to parse the “in-domain” training set and look at a few of its properties and data points.
import pandas as pd
# Load the dataset into a pandas dataframe.
df = pd.read_csv("./cola_public/raw/in_domain_train.tsv", delimiter='\t', header=None, names=['sentence_source', 'label', 'label_notes', 'sentence'])
# Report the number of sentences.
print('Number of training sentences: {:,}\n'.format(df.shape[0]))
# Display 10 random rows from the data.
df.sample(10)
Number of training sentences: 8,551
sentence_source label label_notes sentence
8200 ad03 1 NaN They kicked themselves
3862 ks08 1 NaN A big green insect flew into the soup.
8298 ad03 1 NaN I often have a cold.
6542 g_81 0 * Which did you buy the table supported the book?
722 bc01 0 * Home was gone by John.
3693 ks08 1 NaN I think that person we met last week is insane.
6283 c_13 1 NaN Kathleen really hates her job.
4118 ks08 1 NaN Do not use these words in the beginning of a s...
2592 l-93 1 NaN Jessica sprayed paint under the table.
8194 ad03 0 * I sent she away.
The two properties we actually care about are the the sentence and its label, which is referred to as the “acceptibility judgment” (0=unacceptable, 1=acceptable).
Here are five sentences which are labeled as not grammatically acceptible. Note how much more difficult this task is than something like sentiment analysis!
df.loc[df.label == 0].sample(5)[['sentence', 'label']]
sentence label
4867 They investigated. 0
200 The more he reads, the more books I wonder to ... 0
4593 Any zebras can't fly. 0
3226 Cities destroy easily. 0
7337 The time elapsed the day. 0
Let’s extract the sentences and labels of our training set as numpy ndarrays.
# Get the lists of sentences and their labels.
sentences = df.sentence.values
labels = df.label.values
# 3. Tokenization & Input Formatting
In this section, we’ll transform our dataset into the format that BERT can be trained on.
## 3.1. BERT Tokenizer
To feed our text to BERT, it must be split into tokens, and then these tokens must be mapped to their index in the tokenizer vocabulary.
The tokenization must be performed by the tokenizer included with BERT–the below cell will download this for us. We’ll be using the “uncased” version here.
from transformers import BertTokenizer
# Load the BERT tokenizer.
print('Loading BERT tokenizer...')
tokenizer = BertTokenizer.from_pretrained('bert-base-uncased', do_lower_case=True)
Loading BERT tokenizer...
HBox(children=(IntProgress(value=0, description='Downloading', max=231508, style=ProgressStyle(description_wid…
Let’s apply the tokenizer to one sentence just to see the output.
# Print the original sentence.
print(' Original: ', sentences[0])
# Print the sentence split into tokens.
print('Tokenized: ', tokenizer.tokenize(sentences[0]))
# Print the sentence mapped to token ids.
print('Token IDs: ', tokenizer.convert_tokens_to_ids(tokenizer.tokenize(sentences[0])))
Original: Our friends won't buy this analysis, let alone the next one we propose.
Tokenized: ['our', 'friends', 'won', "'", 't', 'buy', 'this', 'analysis', ',', 'let', 'alone', 'the', 'next', 'one', 'we', 'propose', '.']
Token IDs: [2256, 2814, 2180, 1005, 1056, 4965, 2023, 4106, 1010, 2292, 2894, 1996, 2279, 2028, 2057, 16599, 1012]
When we actually convert all of our sentences, we’ll use the tokenize.encode function to handle both steps, rather than calling tokenize and convert_tokens_to_ids separately.
Before we can do that, though, we need to talk about some of BERT’s formatting requirements.
## 3.2. Required Formatting
The above code left out a few required formatting steps that we’ll look at here.
Side Note: The input format to BERT seems “over-specified” to me… We are required to give it a number of pieces of information which seem redundant, or like they could easily be inferred from the data without us explicity providing it. But it is what it is, and I suspect it will make more sense once I have a deeper understanding of the BERT internals.
We are required to:
1. Add special tokens to the start and end of each sentence.
2. Pad & truncate all sentences to a single constant length.
3. Explicitly differentiate real tokens from padding tokens with the “attention mask”.
### Special Tokens
[SEP]
At the end of every sentence, we need to append the special [SEP] token.
This token is an artifact of two-sentence tasks, where BERT is given two separate sentences and asked to determine something (e.g., can the answer to the question in sentence A be found in sentence B?).
I am not certain yet why the token is still required when we have only single-sentence input, but it is!
[CLS]
For classification tasks, we must prepend the special [CLS] token to the beginning of every sentence.
This token has special significance. BERT consists of 12 Transformer layers. Each transformer takes in a list of token embeddings, and produces the same number of embeddings on the output (but with the feature values changed, of course!).
On the output of the final (12th) transformer, only the first embedding (corresponding to the [CLS] token) is used by the classifier.
“The first token of every sequence is always a special classification token ([CLS]). The final hidden state corresponding to this token is used as the aggregate sequence representation for classification tasks.” (from the BERT paper)
I’m not sure why the authors took this strategy instead of some kind of pooling of all the final vectors, but I’m sure that if pooling were better they would have gone that route.
Also, because BERT is trained to only use this [CLS] token for classification, we know that the model has been motivated to encode everything it needs for the classification step into that single 768-value embedding vector.
### Sentence Length & Attention Mask
The sentences in our dataset obviously have varying lengths, so how does BERT handle this?
BERT has two constraints:
1. All sentences must be padded or truncated to a single, fixed length.
2. The maximum sentence length is 512 tokens.
Padding is done with a special [PAD] token, which is at index 0 in the BERT vocabulary. The below illustration demonstrates padding out to a “MAX_LEN” of 8 tokens.
The “Attention Mask” is simply an array of 1s and 0s indicating which tokens are padding and which aren’t (seems kind of redundant, doesn’t it?! Again, I don’t currently know why).
I’ve experimented with running this notebook with two different values of MAX_LEN, and it impacted both the training speed and the test set accuracy.
With a Tesla K80 and:
MAX_LEN = 128 --> Training epochs take ~5:28 each, score is 0.535
MAX_LEN = 64 --> Training epochs take ~2:57 each, score is 0.566
These results suggest to me that the padding tokens aren’t simply skipped over–that they are in fact fed through the model and incorporated in the results (thereby impacting both model speed and accuracy). I’ll have to dig into the architecture more to understand this.
## 3.2. Sentences to IDs
The tokenizer.encode function combines multiple steps for us:
1. Split the sentence into tokens.
2. Add the special [CLS] and [SEP] tokens.
3. Map the tokens to their IDs.
Oddly, this function can perform truncating for us, but doesn’t handle padding.
# Tokenize all of the sentences and map the tokens to thier word IDs.
input_ids = []
# For every sentence...
for sent in sentences:
# encode will:
# (1) Tokenize the sentence.
# (2) Prepend the [CLS] token to the start.
# (3) Append the [SEP] token to the end.
# (4) Map tokens to their IDs.
encoded_sent = tokenizer.encode(
sent, # Sentence to encode.
add_special_tokens = True, # Add '[CLS]' and '[SEP]'
# This function also supports truncation and conversion
# to pytorch tensors, but we need to do padding, so we
# can't use these features :( .
#max_length = 128, # Truncate all sentences.
#return_tensors = 'pt', # Return pytorch tensors.
)
# Add the encoded sentence to the list.
input_ids.append(encoded_sent)
# Print sentence 0, now as a list of IDs.
print('Original: ', sentences[0])
print('Token IDs:', input_ids[0])
Original: Our friends won't buy this analysis, let alone the next one we propose.
Token IDs: [101, 2256, 2814, 2180, 1005, 1056, 4965, 2023, 4106, 1010, 2292, 2894, 1996, 2279, 2028, 2057, 16599, 1012, 102]
## 3.3. Padding & Truncating
Pad and truncate our sequences so that they all have the same length, MAX_LEN.
First, what’s the maximum sentence length in our dataset?
print('Max sentence length: ', max([len(sen) for sen in input_ids]))
Max sentence length: 47
Given that, let’s choose MAX_LEN = 64 and apply the padding.
# We'll borrow the pad_sequences utility function to do this.
from keras.preprocessing.sequence import pad_sequences
# Set the maximum sequence length.
# I've chosen 64 somewhat arbitrarily. It's slightly larger than the
# maximum training sentence length of 47...
MAX_LEN = 64
print('\nPadding/truncating all sentences to %d values...' % MAX_LEN)
print('\nPadding token: "{:}", ID: {:}'.format(tokenizer.pad_token, tokenizer.pad_token_id))
# Pad our input tokens with value 0.
# "post" indicates that we want to pad and truncate at the end of the sequence,
# as opposed to the beginning.
input_ids = pad_sequences(input_ids, maxlen=MAX_LEN, dtype="long",
value=0, truncating="post", padding="post")
print('\nDone.')
Padding/truncating all sentences to 64 values...
Padding token: "[PAD]", ID: 0
Done.
Using TensorFlow backend.
## 3.4. Attention Masks
The attention mask simply makes it explicit which tokens are actual words versus which are padding.
The BERT vocabulary does not use the ID 0, so if a token ID is 0, then it’s padding, and otherwise it’s a real token.
# Create attention masks
attention_masks = []
# For each sentence...
for sent in input_ids:
# Create the attention mask.
# - If a token ID is 0, then it's padding, set the mask to 0.
# - If a token ID is > 0, then it's a real token, set the mask to 1.
att_mask = [int(token_id > 0) for token_id in sent]
# Store the attention mask for this sentence.
attention_masks.append(att_mask)
## 3.5. Training & Validation Split
Divide up our training set to use 90% for training and 10% for validation.
# Use train_test_split to split our data into train and validation sets for
# training
from sklearn.model_selection import train_test_split
# Use 90% for training and 10% for validation.
train_inputs, validation_inputs, train_labels, validation_labels = train_test_split(input_ids, labels,
random_state=2018, test_size=0.1)
# Do the same for the masks.
train_masks, validation_masks, _, _ = train_test_split(attention_masks, labels,
random_state=2018, test_size=0.1)
## 3.6. Converting to PyTorch Data Types
Our model expects PyTorch tensors rather than numpy.ndarrays, so convert all of our dataset variables.
# Convert all inputs and labels into torch tensors, the required datatype
# for our model.
train_inputs = torch.tensor(train_inputs)
validation_inputs = torch.tensor(validation_inputs)
train_labels = torch.tensor(train_labels)
validation_labels = torch.tensor(validation_labels)
train_masks = torch.tensor(train_masks)
validation_masks = torch.tensor(validation_masks)
We’ll also create an iterator for our dataset using the torch DataLoader class. This helps save on memory during training because, unlike a for loop, with an iterator the entire dataset does not need to be loaded into memory.
from torch.utils.data import TensorDataset, DataLoader, RandomSampler, SequentialSampler
# The DataLoader needs to know our batch size for training, so we specify it
# here.
# For fine-tuning BERT on a specific task, the authors recommend a batch size of
# 16 or 32.
batch_size = 32
# Create the DataLoader for our training set.
train_data = TensorDataset(train_inputs, train_masks, train_labels)
train_sampler = RandomSampler(train_data)
train_dataloader = DataLoader(train_data, sampler=train_sampler, batch_size=batch_size)
# Create the DataLoader for our validation set.
validation_data = TensorDataset(validation_inputs, validation_masks, validation_labels)
validation_sampler = SequentialSampler(validation_data)
validation_dataloader = DataLoader(validation_data, sampler=validation_sampler, batch_size=batch_size)
# 4. Train Our Classification Model
Now that our input data is properly formatted, it’s time to fine tune the BERT model.
## 4.1. BertForSequenceClassification
For this task, we first want to modify the pre-trained BERT model to give outputs for classification, and then we want to continue training the model on our dataset until that the entire model, end-to-end, is well-suited for our task.
Thankfully, the huggingface pytorch implementation includes a set of interfaces designed for a variety of NLP tasks. Though these interfaces are all built on top of a trained BERT model, each has different top layers and output types designed to accomodate their specific NLP task.
Here is the current list of classes provided for fine-tuning:
• BertModel
• BertForPreTraining
• BertForMaskedLM
• BertForNextSentencePrediction
• BertForSequenceClassification - The one we’ll use.
• BertForTokenClassification
• BertForQuestionAnswering
The documentation for these can be found under here.
We’ll be using BertForSequenceClassification. This is the normal BERT model with an added single linear layer on top for classification that we will use as a sentence classifier. As we feed input data, the entire pre-trained BERT model and the additional untrained classification layer is trained on our specific task.
OK, let’s load BERT! There are a few different pre-trained BERT models available. “bert-base-uncased” means the version that has only lowercase letters (“uncased”) and is the smaller version of the two (“base” vs “large”).
The documentation for from_pretrained can be found here, with the additional parameters defined here.
from transformers import BertForSequenceClassification, AdamW, BertConfig
# Load BertForSequenceClassification, the pretrained BERT model with a single
# linear classification layer on top.
model = BertForSequenceClassification.from_pretrained(
"bert-base-uncased", # Use the 12-layer BERT model, with an uncased vocab.
num_labels = 2, # The number of output labels--2 for binary classification.
# You can increase this for multi-class tasks.
output_attentions = False, # Whether the model returns attentions weights.
output_hidden_states = False, # Whether the model returns all hidden-states.
)
# Tell pytorch to run this model on the GPU.
model.cuda()
[I've removed this output cell for brevity].
Just for curiosity’s sake, we can browse all of the model’s parameters by name here.
In the below cell, I’ve printed out the names and dimensions of the weights for:
1. The embedding layer.
2. The first of the twelve transformers.
3. The output layer.
# Get all of the model's parameters as a list of tuples.
params = list(model.named_parameters())
print('The BERT model has {:} different named parameters.\n'.format(len(params)))
print('==== Embedding Layer ====\n')
for p in params[0:5]:
print("{:<55} {:>12}".format(p[0], str(tuple(p[1].size()))))
print('\n==== First Transformer ====\n')
for p in params[5:21]:
print("{:<55} {:>12}".format(p[0], str(tuple(p[1].size()))))
print('\n==== Output Layer ====\n')
for p in params[-4:]:
print("{:<55} {:>12}".format(p[0], str(tuple(p[1].size()))))
The BERT model has 201 different named parameters.
==== Embedding Layer ====
bert.embeddings.word_embeddings.weight (30522, 768)
bert.embeddings.position_embeddings.weight (512, 768)
bert.embeddings.token_type_embeddings.weight (2, 768)
bert.embeddings.LayerNorm.weight (768,)
bert.embeddings.LayerNorm.bias (768,)
==== First Transformer ====
bert.encoder.layer.0.attention.self.query.weight (768, 768)
bert.encoder.layer.0.attention.self.query.bias (768,)
bert.encoder.layer.0.attention.self.key.weight (768, 768)
bert.encoder.layer.0.attention.self.key.bias (768,)
bert.encoder.layer.0.attention.self.value.weight (768, 768)
bert.encoder.layer.0.attention.self.value.bias (768,)
bert.encoder.layer.0.attention.output.dense.weight (768, 768)
bert.encoder.layer.0.attention.output.dense.bias (768,)
bert.encoder.layer.0.attention.output.LayerNorm.weight (768,)
bert.encoder.layer.0.attention.output.LayerNorm.bias (768,)
bert.encoder.layer.0.intermediate.dense.weight (3072, 768)
bert.encoder.layer.0.intermediate.dense.bias (3072,)
bert.encoder.layer.0.output.dense.weight (768, 3072)
bert.encoder.layer.0.output.dense.bias (768,)
bert.encoder.layer.0.output.LayerNorm.weight (768,)
bert.encoder.layer.0.output.LayerNorm.bias (768,)
==== Output Layer ====
bert.pooler.dense.weight (768, 768)
bert.pooler.dense.bias (768,)
classifier.weight (2, 768)
classifier.bias (2,)
## 4.2. Optimizer & Learning Rate Scheduler
Now that we have our model loaded we need to grab the training hyperparameters from within the stored model.
For the purposes of fine-tuning, the authors recommend choosing from the following values:
• Batch size: 16, 32 (We chose 32 when creating our DataLoaders).
• Learning rate (Adam): 5e-5, 3e-5, 2e-5 (We’ll use 2e-5).
• Number of epochs: 2, 3, 4 (We’ll use 4).
The epsilon parameter eps = 1e-8 is “a very small number to prevent any division by zero in the implementation” (from here).
You can find the creation of the AdamW optimizer in run_glue.py here.
# Note: AdamW is a class from the huggingface library (as opposed to pytorch)
# I believe the 'W' stands for 'Weight Decay fix"
optimizer = AdamW(model.parameters(),
lr = 2e-5, # args.learning_rate - default is 5e-5, our notebook had 2e-5
eps = 1e-8 # args.adam_epsilon - default is 1e-8.
)
from transformers import get_linear_schedule_with_warmup
# Number of training epochs (authors recommend between 2 and 4)
epochs = 4
# Total number of training steps is number of batches * number of epochs.
total_steps = len(train_dataloader) * epochs
# Create the learning rate scheduler.
scheduler = get_linear_schedule_with_warmup(optimizer,
num_warmup_steps = 0, # Default value in run_glue.py
num_training_steps = total_steps)
## 4.3. Training Loop
Below is our training loop. There’s a lot going on, but fundamentally for each pass in our loop we have a trianing phase and a validation phase. At each pass we need to:
Training loop:
• Unpack our data inputs and labels
• Load data onto the GPU for acceleration
• Clear out the gradients calculated in the previous pass.
• In pytorch the gradients accumulate by default (useful for things like RNNs) unless you explicitly clear them out.
• Forward pass (feed input data through the network)
• Backward pass (backpropagation)
• Tell the network to update parameters with optimizer.step()
• Track variables for monitoring progress
Evalution loop:
• Unpack our data inputs and labels
• Load data onto the GPU for acceleration
• Forward pass (feed input data through the network)
• Compute loss on our validation data and track variables for monitoring progress
So please read carefully through the comments to get an understanding of what’s happening. If you’re unfamiliar with pytorch a quick look at some of their beginner tutorials will help show you that training loops really involve only a few simple steps; the rest is usually just decoration and logging.
Define a helper function for calculating accuracy.
import numpy as np
# Function to calculate the accuracy of our predictions vs labels
def flat_accuracy(preds, labels):
pred_flat = np.argmax(preds, axis=1).flatten()
labels_flat = labels.flatten()
return np.sum(pred_flat == labels_flat) / len(labels_flat)
Helper function for formatting elapsed times.
import time
import datetime
def format_time(elapsed):
'''
Takes a time in seconds and returns a string hh:mm:ss
'''
# Round to the nearest second.
elapsed_rounded = int(round((elapsed)))
# Format as hh:mm:ss
return str(datetime.timedelta(seconds=elapsed_rounded))
We’re ready to kick off the training!
import random
# This training code is based on the run_glue.py script here:
# https://github.com/huggingface/transformers/blob/5bfcd0485ece086ebcbed2d008813037968a9e58/examples/run_glue.py#L128
# Set the seed value all over the place to make this reproducible.
seed_val = 42
random.seed(seed_val)
np.random.seed(seed_val)
torch.manual_seed(seed_val)
torch.cuda.manual_seed_all(seed_val)
# Store the average loss after each epoch so we can plot them.
loss_values = []
# For each epoch...
for epoch_i in range(0, epochs):
# ========================================
# Training
# ========================================
# Perform one full pass over the training set.
print("")
print('======== Epoch {:} / {:} ========'.format(epoch_i + 1, epochs))
print('Training...')
# Measure how long the training epoch takes.
t0 = time.time()
# Reset the total loss for this epoch.
total_loss = 0
# Put the model into training mode. Don't be mislead--the call to
# train just changes the *mode*, it doesn't *perform* the training.
# dropout and batchnorm layers behave differently during training
# vs. test (source: https://stackoverflow.com/questions/51433378/what-does-model-train-do-in-pytorch)
model.train()
# For each batch of training data...
for step, batch in enumerate(train_dataloader):
# Progress update every 40 batches.
if step % 40 == 0 and not step == 0:
# Calculate elapsed time in minutes.
elapsed = format_time(time.time() - t0)
# Report progress.
print(' Batch {:>5,} of {:>5,}. Elapsed: {:}.'.format(step, len(train_dataloader), elapsed))
# Unpack this training batch from our dataloader.
#
# As we unpack the batch, we'll also copy each tensor to the GPU using the
# to method.
#
# batch contains three pytorch tensors:
# [0]: input ids
# [1]: attention masks
# [2]: labels
b_input_ids = batch[0].to(device)
b_input_mask = batch[1].to(device)
b_labels = batch[2].to(device)
# Always clear any previously calculated gradients before performing a
# backward pass. PyTorch doesn't do this automatically because
# accumulating the gradients is "convenient while training RNNs".
# (source: https://stackoverflow.com/questions/48001598/why-do-we-need-to-call-zero-grad-in-pytorch)
model.zero_grad()
# Perform a forward pass (evaluate the model on this training batch).
# This will return the loss (rather than the model output) because we
# have provided the labels.
# The documentation for this model function is here:
# https://huggingface.co/transformers/v2.2.0/model_doc/bert.html#transformers.BertForSequenceClassification
outputs = model(b_input_ids,
token_type_ids=None,
attention_mask=b_input_mask,
labels=b_labels)
# The call to model always returns a tuple, so we need to pull the
# loss value out of the tuple.
loss = outputs[0]
# Accumulate the training loss over all of the batches so that we can
# calculate the average loss at the end. loss is a Tensor containing a
# single value; the .item() function just returns the Python value
# from the tensor.
total_loss += loss.item()
# Perform a backward pass to calculate the gradients.
loss.backward()
# Clip the norm of the gradients to 1.0.
# This is to help prevent the "exploding gradients" problem.
torch.nn.utils.clip_grad_norm_(model.parameters(), 1.0)
# Update parameters and take a step using the computed gradient.
# The optimizer dictates the "update rule"--how the parameters are
# modified based on their gradients, the learning rate, etc.
optimizer.step()
# Update the learning rate.
scheduler.step()
# Calculate the average loss over the training data.
avg_train_loss = total_loss / len(train_dataloader)
# Store the loss value for plotting the learning curve.
loss_values.append(avg_train_loss)
print("")
print(" Average training loss: {0:.2f}".format(avg_train_loss))
print(" Training epcoh took: {:}".format(format_time(time.time() - t0)))
# ========================================
# Validation
# ========================================
# After the completion of each training epoch, measure our performance on
# our validation set.
print("")
print("Running Validation...")
t0 = time.time()
# Put the model in evaluation mode--the dropout layers behave differently
# during evaluation.
model.eval()
# Tracking variables
eval_loss, eval_accuracy = 0, 0
nb_eval_steps, nb_eval_examples = 0, 0
# Evaluate data for one epoch
for batch in validation_dataloader:
# Add batch to GPU
batch = tuple(t.to(device) for t in batch)
# Unpack the inputs from our dataloader
b_input_ids, b_input_mask, b_labels = batch
# Telling the model not to compute or store gradients, saving memory and
# speeding up validation
with torch.no_grad():
# Forward pass, calculate logit predictions.
# This will return the logits rather than the loss because we have
# not provided labels.
# token_type_ids is the same as the "segment ids", which
# differentiates sentence 1 and 2 in 2-sentence tasks.
# The documentation for this model function is here:
# https://huggingface.co/transformers/v2.2.0/model_doc/bert.html#transformers.BertForSequenceClassification
outputs = model(b_input_ids,
token_type_ids=None,
attention_mask=b_input_mask)
# Get the "logits" output by the model. The "logits" are the output
# values prior to applying an activation function like the softmax.
logits = outputs[0]
# Move logits and labels to CPU
logits = logits.detach().cpu().numpy()
label_ids = b_labels.to('cpu').numpy()
# Calculate the accuracy for this batch of test sentences.
tmp_eval_accuracy = flat_accuracy(logits, label_ids)
# Accumulate the total accuracy.
eval_accuracy += tmp_eval_accuracy
# Track the number of batches
nb_eval_steps += 1
# Report the final accuracy for this validation run.
print(" Accuracy: {0:.2f}".format(eval_accuracy/nb_eval_steps))
print(" Validation took: {:}".format(format_time(time.time() - t0)))
print("")
print("Training complete!")
======== Epoch 1 / 4 ========
Training...
Batch 40 of 241. Elapsed: 0:00:11.
Batch 80 of 241. Elapsed: 0:00:21.
Batch 120 of 241. Elapsed: 0:00:31.
Batch 160 of 241. Elapsed: 0:00:42.
Batch 200 of 241. Elapsed: 0:00:52.
Batch 240 of 241. Elapsed: 0:01:03.
Average training loss: 0.50
Training epcoh took: 0:01:03
Running Validation...
Accuracy: 0.79
Validation took: 0:00:02
======== Epoch 2 / 4 ========
Training...
Batch 40 of 241. Elapsed: 0:00:11.
Batch 80 of 241. Elapsed: 0:00:21.
Batch 120 of 241. Elapsed: 0:00:32.
Batch 160 of 241. Elapsed: 0:00:42.
Batch 200 of 241. Elapsed: 0:00:52.
Batch 240 of 241. Elapsed: 0:01:03.
Average training loss: 0.32
Training epcoh took: 0:01:03
Running Validation...
Accuracy: 0.82
Validation took: 0:00:02
======== Epoch 3 / 4 ========
Training...
Batch 40 of 241. Elapsed: 0:00:11.
Batch 80 of 241. Elapsed: 0:00:21.
Batch 120 of 241. Elapsed: 0:00:32.
Batch 160 of 241. Elapsed: 0:00:42.
Batch 200 of 241. Elapsed: 0:00:52.
Batch 240 of 241. Elapsed: 0:01:03.
Average training loss: 0.20
Training epcoh took: 0:01:03
Running Validation...
Accuracy: 0.82
Validation took: 0:00:02
======== Epoch 4 / 4 ========
Training...
Batch 40 of 241. Elapsed: 0:00:10.
Batch 80 of 241. Elapsed: 0:00:21.
Batch 120 of 241. Elapsed: 0:00:31.
Batch 160 of 241. Elapsed: 0:00:42.
Batch 200 of 241. Elapsed: 0:00:52.
Batch 240 of 241. Elapsed: 0:01:03.
Average training loss: 0.14
Training epcoh took: 0:01:03
Running Validation...
Accuracy: 0.82
Validation took: 0:00:02
Training complete!
Let’s take a look at our training loss over all batches:
import matplotlib.pyplot as plt
% matplotlib inline
import seaborn as sns
# Use plot styling from seaborn.
sns.set(style='darkgrid')
# Increase the plot size and font size.
sns.set(font_scale=1.5)
plt.rcParams["figure.figsize"] = (12,6)
# Plot the learning curve.
plt.plot(loss_values, 'b-o')
# Label the plot.
plt.title("Training loss")
plt.xlabel("Epoch")
plt.ylabel("Loss")
plt.show()
# 5. Performance On Test Set
Now we’ll load the holdout dataset and prepare inputs just as we did with the training set. Then we’ll evaluate predictions using Matthew’s correlation coefficient because this is the metric used by the wider NLP community to evaluate performance on CoLA. With this metric, +1 is the best score, and -1 is the worst score. This way, we can see how well we perform against the state of the art models for this specific task.
### 5.1. Data Preparation
We’ll need to apply all of the same steps that we did for the training data to prepare our test data set.
import pandas as pd
# Load the dataset into a pandas dataframe.
df = pd.read_csv("./cola_public/raw/out_of_domain_dev.tsv", delimiter='\t', header=None, names=['sentence_source', 'label', 'label_notes', 'sentence'])
# Report the number of sentences.
print('Number of test sentences: {:,}\n'.format(df.shape[0]))
# Create sentence and label lists
sentences = df.sentence.values
labels = df.label.values
# Tokenize all of the sentences and map the tokens to thier word IDs.
input_ids = []
# For every sentence...
for sent in sentences:
# encode will:
# (1) Tokenize the sentence.
# (2) Prepend the [CLS] token to the start.
# (3) Append the [SEP] token to the end.
# (4) Map tokens to their IDs.
encoded_sent = tokenizer.encode(
sent, # Sentence to encode.
add_special_tokens = True, # Add '[CLS]' and '[SEP]'
)
input_ids.append(encoded_sent)
# Pad our input tokens
input_ids = pad_sequences(input_ids, maxlen=MAX_LEN,
dtype="long", truncating="post", padding="post")
# Create attention masks
attention_masks = []
# Create a mask of 1s for each token followed by 0s for padding
for seq in input_ids:
seq_mask = [float(i>0) for i in seq]
attention_masks.append(seq_mask)
# Convert to tensors.
prediction_inputs = torch.tensor(input_ids)
prediction_masks = torch.tensor(attention_masks)
prediction_labels = torch.tensor(labels)
# Set the batch size.
batch_size = 32
# Create the DataLoader.
prediction_data = TensorDataset(prediction_inputs, prediction_masks, prediction_labels)
prediction_sampler = SequentialSampler(prediction_data)
prediction_dataloader = DataLoader(prediction_data, sampler=prediction_sampler, batch_size=batch_size)
Number of test sentences: 516
## 5.2. Evaluate on Test Set
With the test set prepared, we can apply our fine-tuned model to generate predictions on the test set.
# Prediction on test set
print('Predicting labels for {:,} test sentences...'.format(len(prediction_inputs)))
# Put model in evaluation mode
model.eval()
# Tracking variables
predictions , true_labels = [], []
# Predict
for batch in prediction_dataloader:
# Add batch to GPU
batch = tuple(t.to(device) for t in batch)
# Unpack the inputs from our dataloader
b_input_ids, b_input_mask, b_labels = batch
# Telling the model not to compute or store gradients, saving memory and
# speeding up prediction
with torch.no_grad():
# Forward pass, calculate logit predictions
outputs = model(b_input_ids, token_type_ids=None,
attention_mask=b_input_mask)
logits = outputs[0]
# Move logits and labels to CPU
logits = logits.detach().cpu().numpy()
label_ids = b_labels.to('cpu').numpy()
# Store predictions and true labels
predictions.append(logits)
true_labels.append(label_ids)
print(' DONE.')
Predicting labels for 516 test sentences...
DONE.
Accuracy on the CoLA benchmark is measured using the “Matthews correlation coefficient” (MCC).
We use MCC here because the classes are imbalanced:
print('Positive samples: %d of %d (%.2f%%)' % (df.label.sum(), len(df.label), (df.label.sum() / len(df.label) * 100.0)))
Positive samples: 354 of 516 (68.60%)
from sklearn.metrics import matthews_corrcoef
matthews_set = []
# Evaluate each test batch using Matthew's correlation coefficient
print('Calculating Matthews Corr. Coef. for each batch...')
# For each input batch...
for i in range(len(true_labels)):
# The predictions for this batch are a 2-column ndarray (one column for "0"
# and one column for "1"). Pick the label with the highest value and turn this
# in to a list of 0s and 1s.
pred_labels_i = np.argmax(predictions[i], axis=1).flatten()
# Calculate and store the coef for this batch.
matthews = matthews_corrcoef(true_labels[i], pred_labels_i)
matthews_set.append(matthews)
Calculating Matthews Corr. Coef. for each batch...
/usr/local/lib/python3.6/dist-packages/sklearn/metrics/classification.py:872: RuntimeWarning: invalid value encountered in double_scalars
mcc = cov_ytyp / np.sqrt(cov_ytyt * cov_ypyp)
The final score will be based on the entire test set, but let’s take a look at the scores on the individual batches to get a sense of the variability in the metric between batches.
Each batch has 32 sentences in it, except the last batch which has only (516 % 32) = 4 test sentences in it.
matthews_set
[0.049286405809014416,
-0.21684543705982773,
0.4040950971038548,
0.41179801403140964,
0.25365601296401685,
0.6777932975034471,
0.4879500364742666,
0.0,
0.8320502943378436,
0.8246211251235321,
0.9229582069908973,
0.647150228929434,
0.8150678894028793,
0.7141684885491869,
0.3268228676411533,
0.5844155844155844,
0.0]
# Combine the predictions for each batch into a single list of 0s and 1s.
flat_predictions = [item for sublist in predictions for item in sublist]
flat_predictions = np.argmax(flat_predictions, axis=1).flatten()
# Combine the correct labels for each batch into a single list.
flat_true_labels = [item for sublist in true_labels for item in sublist]
# Calculate the MCC
mcc = matthews_corrcoef(flat_true_labels, flat_predictions)
print('MCC: %.3f' % mcc)
MCC: 0.529
Cool! In about half an hour and without doing any hyperparameter tuning (adjusting the learning rate, epochs, batch size, ADAM properties, etc.) we are able to get a good score. I should also mention we didn’t train on the entire training dataset, but set aside a portion of it as our validation set for legibililty of code.
The library documents the expected accuracy for this benchmark here.
You can also look at the official leaderboard here.
Note that (due to the small dataset size?) the accuracy can vary significantly with different random seeds.
# Conclusion
This post demonstrates that with a pre-trained BERT model you can quickly and effectively create a high quality model with minimal effort and training time using the pytorch interface, regardless of the specific NLP task you are interested in.
# Appendix
## A1. Saving & Loading Fine-Tuned Model
This first cell (taken from run_glue.py here) writes the model and tokenizer out to disk.
import os
# Saving best-practices: if you use defaults names for the model, you can reload it using from_pretrained()
output_dir = './model_save/'
# Create output directory if needed
if not os.path.exists(output_dir):
os.makedirs(output_dir)
print("Saving model to %s" % output_dir)
# Save a trained model, configuration and tokenizer using save_pretrained().
# They can then be reloaded using from_pretrained()
model_to_save = model.module if hasattr(model, 'module') else model # Take care of distributed/parallel training
model_to_save.save_pretrained(output_dir)
tokenizer.save_pretrained(output_dir)
# Good practice: save your training arguments together with the trained model
# torch.save(args, os.path.join(output_dir, 'training_args.bin'))
Saving model to ./model_save/
('./model_save/vocab.txt',
'./model_save/special_tokens_map.json',
'./model_save/added_tokens.json')
Let’s check out the file sizes, out of curiosity.
!ls -l --block-size=K ./model_save/
total 427964K
-rw-r--r-- 1 root root 1K Dec 19 17:33 added_tokens.json
-rw-r--r-- 1 root root 1K Dec 19 17:33 config.json
-rw-r--r-- 1 root root 427719K Dec 19 17:33 pytorch_model.bin
-rw-r--r-- 1 root root 1K Dec 19 17:33 special_tokens_map.json
-rw-r--r-- 1 root root 1K Dec 19 17:33 tokenizer_config.json
-rw-r--r-- 1 root root 227K Dec 19 17:33 vocab.txt
The largest file is the model weights, at around 418 megabytes.
!ls -l --block-size=M ./model_save/pytorch_model.bin
-rw-r--r-- 1 root root 418M Dec 19 17:33 ./model_save/pytorch_model.bin
To save your model across Colab Notebook sessions, download it to your local machine, or ideally copy it to your Google Drive.
# Mount Google Drive to this Notebook instance.
from google.colab import drive
drive.mount('/content/drive')
# Copy the model files to a directory in your Google Drive.
!cp -r ./model_save/ "./drive/Shared drives/ChrisMcCormick.AI/Blog Posts/BERT Fine-Tuning/"
The following functions will load the model back from disk.
# Load a trained model and vocabulary that you have fine-tuned
model = model_class.from_pretrained(output_dir)
tokenizer = tokenizer_class.from_pretrained(output_dir)
# Copy the model to the GPU.
model.to(device)
## A.2. Weight Decay
The huggingface example includes the following code block for enabling weight decay, but the default decay rate is “0.0”, so I moved this to the appendix.
This block essentially tells the optimizer to not apply weight decay to the bias terms (e.g., $b$ in the equation $y = Wx + b$ ). Weight decay is a form of regularization–after calculating the gradients, we multiply them by, e.g., 0.99.
# This code is taken from:
# https://github.com/huggingface/transformers/blob/5bfcd0485ece086ebcbed2d008813037968a9e58/examples/run_glue.py#L102
# Don't apply weight decay to any parameters whose names include these tokens.
# (Here, the BERT doesn't have gamma or beta parameters, only bias terms)
no_decay = ['bias', 'LayerNorm.weight']
# Separate the weight parameters from the bias parameters.
# - For the weight parameters, this specifies a 'weight_decay_rate' of 0.01.
# - For the bias parameters, the 'weight_decay_rate' is 0.0.
optimizer_grouped_parameters = [
# Filter for all parameters which *don't* include 'bias', 'gamma', 'beta'.
{'params': [p for n, p in param_optimizer if not any(nd in n for nd in no_decay)],
'weight_decay_rate': 0.1},
# Filter for parameters which *do* include those.
{'params': [p for n, p in param_optimizer if any(nd in n for nd in no_decay)],
'weight_decay_rate': 0.0}
]
# Note - optimizer_grouped_parameters only includes the parameter values, not
# the names. |
How to Find the Area of a Triangle
How to Find the Area of a Triangle
• The area of a triangle is one half times base times height.
• The area formula can be written as 1 / 2 × base × height.
• The base and the height must be at right angles to one another.
• Here the base is 8 cm and the height is 3 cm.
• The area is 1 / 2 × 8 × 3 = 12 cm2.
• The units of area are measured in units squared.
• Since the sides are measured in cm, the area is measured in cm2.
The area of a triangle is 1 / 2 × base × height.
The units of area are measured in units squared.
• The area of a triangle is 1 / 2 × base × height.
• The base is 11 m and the height is 8 m.
• We can multiply the base and height and then halve the answer.
• 11 × 8 = 88 and half of this is 44.
• The area of the triangle is 44 m2.
• We could have also halved the 8 first and then multiplied by 11.
• Half of 8 is 4 and then 4 × 11 = 44.
• The units are m2 because the side lengths are measured in metres.
Finding the Area of a Triangle
How to Find the Area of a Triangle
To find the area of a triangle, multiply the base by the height and then divide by 2. Alternatively, divide the base by 2 and then multiply by the height or divide the height by 2 and then multiply by the base.
It does not matter whether you multiply the base and height first and then halve the answer or whether you halve the base or height first and then multiply.
For example, here is a right-angled triangle of base 8 cm and a height of 3 cm.
Multiplying the base and height, 8 × 3 = 24. Halve of this answer is 12.
The area is 12 cm2.
The area of a triangle is measured in units squared. Take the unit that the sides are measured in and write this unit squared after your answer. If the sides are measured in cm, then the area units are cm2. If the sides are measured in m, then the area units are m2.
We have multiplied cm by cm in this calculation and so, the area units in this example are cm2.
Instead of multiplying the base by the height first and then dividing by 2, we can halve one of the base or height lengths first.
We will look at the same example and divide by 2 first before multiplying.
Since 8 cm is even and 3 cm is not, it is easier to halve the 8 cm length.
Half of 8 is 4 and then 4 × 3 = 12. The area is 12 cm2.
The answer is the the same no matter in what order the numbers are multiplied.
The formula for the area of a triangle is 1 / 2 × base × height. This formula can be more easily written as Area = 1 / 2 bh.
The formula of Area = 1 / 2 bh works for all triangles, no matter what size or shape. As long as the height and base are known, this formula can be used to calculate the area.
Here is an example of using the formula to calculate the area of a triangle.
The base of this triangle is 11 m and the height of the triangle is 8 m.
The value of b = 11 and the value of h = 8.
1 / 2 × b × h becomes 1 / 2 × 11 × 8.
We can multiply 11 by 8 first and then halve the answer. 11 × 8 = 88 and then 88 ÷ 2 = 44.
The side lengths are measured in metres and so, the area of this triangle is 44 m2.
When teaching finding the area of a triangle, it is recommended to divide by 2 first before multiplying in order to make the calculation easier.
It is easier to halve the 8 first to get 4 and then multiply this by 11 to get the same answer of 44 m2.
By doing the division first, the multiplication sum uses smaller numbers which are easier to calculate. This method also involves halving a smaller number rather than the larger final answer.
When using the formula to find the area of a triangle, it is important to ensure that the base and height meet at right angles.
Sometimes you may be given all three sides of a triangle. To calculate the area of a triangle, choose two lengths that are at right angles to each other as the base and height. Multiply these lengths and then divide by 2. Ignore any other side lengths.
Why is the Area of a Triangle One Half Base Times Height
Any triangle can be drawn inside a rectangle that is twice its size. The area of a rectangle is base times height and so, the area of the triangle is one half times base times height.
The area of a rectangle is base × height, alternatively written as length × width.
To make a rectangle into a triangle, divide it in half diagonally.
Since the area of a rectangle is base × height, the area of a triangle is 1 / 2 × base × height.
Here is another example of a triangle that is half the size of a rectangle.
The area of the rectangle is 10 × 6 = 60 mm2 and the area of the triangle is half of this.
The area of the triangle is 30 mm2
Remember that when teaching the area of a triangle, it is easiest to divide either the height or base by 2 first.
Half of 10 is 5 and then 5 × 6 = 30 mm2.
Now try our lesson on How to Find the Area of a Parallelogram where we learn how to find the area of a parallelogram.
error: Content is protected !! |
Find all School-related info fast with the new School-Specific MBA Forum
It is currently 28 Jul 2016, 13:46
### GMAT Club Daily Prep
#### Thank you for using the timer - this advanced tool can estimate your performance and suggest more practice questions. We have subscribed you to Daily Prep Questions via email.
Customized
for You
we will pick new questions that match your level based on your Timer History
Track
every week, we’ll send you an estimated GMAT score based on your performance
Practice
Pays
we will pick new questions that match your level based on your Timer History
# Events & Promotions
###### Events & Promotions in June
Open Detailed Calendar
# Beginning in January of last year, Carl made deposits of
Author Message
TAGS:
### Hide Tags
Director
Joined: 28 Jul 2011
Posts: 563
Location: United States
GPA: 3.86
WE: Accounting (Commercial Banking)
Followers: 2
Kudos [?]: 166 [5] , given: 16
### Show Tags
22 Jan 2012, 02:28
5
KUDOS
37
This post was
BOOKMARKED
00:00
Difficulty:
95% (hard)
Question Stats:
49% (03:12) correct 51% (02:26) wrong based on 646 sessions
### HideShow timer Statistics
Beginning in January of last year, Carl made deposits of $120 into his account on the 15th of each month for several consecutive months and then made withdrawals of$50 from the account on the 15th of each of the remaining months of last year. There were no other transactions in the account last year. If the closing balance of Carl's account for May of last year was $2,600, what was the range of the monthly closing balances of Carl's account last year? (1) Last year the closing balance of Carl's account for April was less than$2,625.
(2) Last year the closing balance of Carl's account for June was less than $2,675. [Reveal] Spoiler: OA _________________ +1 Kudos If found helpful.. Last edited by Bunuel on 28 Jul 2012, 01:47, edited 3 times in total. Edited the question Math Expert Joined: 02 Sep 2009 Posts: 34106 Followers: 6099 Kudos [?]: 76775 [12] , given: 9981 Re: Tough OG12 DS#161 [#permalink] ### Show Tags 22 Jan 2012, 03:23 12 This post received KUDOS Expert's post 7 This post was BOOKMARKED kotela wrote: Beginning in January of last year, Carl made deposits of$120 into his account on the 15th of each month for several consecutive months and then made withdrawals of $50 from the account on the 15th of each of the remaining months of last year. There were no other transactions in the account last year. If the closing balance of Carl's account for May of last year was$2,600, what was the range of the monthly closing balances of Carl's account last year?
(1) Last year the closing balance of Carl's account for April was less than $2,625. (2) Last year the closing balance of Carl's account for June was less than$2,675.
To find the range we should know:
A. Balance before he started depositing, initial balance - we know that there was initial balance because for may balance was 2600 and maximum amount he could deposited for this period (from January till May) is: 5 months*120=600;
B. In which month Carl stopped depositing $120 and started withdrawing$50.
We have:
APRIL___MAY__JUNE
---?----$2,600----?--- (1) April balance < 2625 --> he deposited in May; Because if he didn't then April balance would have been$2,600+50=$,2650 and we know that in April balance was<2625: APRIL____MAY__JUNE 2,480----$2,600----?---
Notice that we can find the initial balance based on this info: $2,600=x(initial balance)+5months*120 --> x+600=2600 --> x=2000. Though this statement is still insufficient as we still don't know in which month Carl stopped depositing and started withdrawing. (2) June balance < 2675 --> he didn't deposited in June --> he withdrew in June. Because if he deposited, then in June deposit would have been May balance +$120: $2,600+$120=$2,720>$2,675.
APRIL___MAY____JUNE
---?----$2,600---$2,550---
But again this statement is still insufficient as we still don't know when he started withdrawing, all we know it was not after June.
(1)+(2) We know that initial balance was $2,000 and that Carl deposited in May and started withdrawing in June: APRIL_____MAY____JUNE$2,480----$2,600---$2,550---
Thus we can find the range. Sufficient.
_________________
Intern
Joined: 19 Jun 2011
Posts: 38
Followers: 1
Kudos [?]: 9 [0], given: 11
Re: Beginning in January of last year, Carl made deposits of [#permalink]
### Show Tags
23 Jan 2012, 11:50
Fairly tough question. I just guessed C once 2:30 hit on the timer. Luckily I got it right but it was an educated guess after following a similar approach as the user above me. I sometimes lose sight of strategy when faced with problem solving DS questions and think I always need some type of formula or chart when a picture/timeline is sufficient enough to answer the Q. Need to work on this better.
Manager
Joined: 18 Nov 2011
Posts: 154
Schools: Johnson '15 (M)
GMAT 1: 730 Q47 V44
Followers: 4
Kudos [?]: 52 [0], given: 21
Re: Beginning in January of last year, Carl made deposits of [#permalink]
### Show Tags
23 Jan 2012, 13:19
AzWildcat1 wrote:
Fairly tough question. I just guessed C once 2:30 hit on the timer. Luckily I got it right but it was an educated guess after following a similar approach as the user above me. I sometimes lose sight of strategy when faced with problem solving DS questions and think I always need some type of formula or chart when a picture/timeline is sufficient enough to answer the Q. Need to work on this better.
Is it widely considered good strategy to limit each DS question to 2:30 ?
Intern
Joined: 19 Jun 2011
Posts: 38
Followers: 1
Kudos [?]: 9 [0], given: 11
Re: Beginning in January of last year, Carl made deposits of [#permalink]
### Show Tags
23 Jan 2012, 14:30
OjilEye wrote:
AzWildcat1 wrote:
Fairly tough question. I just guessed C once 2:30 hit on the timer. Luckily I got it right but it was an educated guess after following a similar approach as the user above me. I sometimes lose sight of strategy when faced with problem solving DS questions and think I always need some type of formula or chart when a picture/timeline is sufficient enough to answer the Q. Need to work on this better.
Is it widely considered good strategy to limit each DS question to 2:30 ?
Well you don't want to spend too much time on one problem, so after grinding out the math for this problem I was able to reach the conclusion of C but was rather an educated guess than a certified answer.
Manager
Joined: 12 Nov 2011
Posts: 143
Followers: 0
Kudos [?]: 17 [0], given: 24
Re: Beginning in January of last year, Carl made deposits of [#permalink]
### Show Tags
25 Jan 2012, 10:23
Well done, Bunuel
C
Senior Manager
Joined: 13 Jan 2012
Posts: 309
Weight: 170lbs
GMAT 1: 740 Q48 V42
GMAT 2: 760 Q50 V42
WE: Analyst (Other)
Followers: 15
Kudos [?]: 121 [3] , given: 38
### Show Tags
06 Jun 2012, 16:49
3
KUDOS
1
This post was
BOOKMARKED
Here's my shot: The given info is this: Carl's $increased 120 for x months, then his$ decreased by 50 for 12-x months. In May, his $(May) = 2600. So what other information do we need to determine the range? One way of calculating the range would be to know the$ in every month which would require knowing only one more piece of information: what month did Carl switch from from depositing to withdrawing?
Scenario 1)
$(April) < 2625$(May) = 2600
This scenario tells us that Carl definitely deposited money in May, but we don't know if he continued to deposit. Insufficient.
BCE
Scenario 2)
$(May) = 2600$(June) < 2675
This scenario tells us that Carl withdrew money in June, but we don't know when he started withdrawing money. Insufficient.
Scenario 1+2)
Obviously the two are sufficient together. We know when he switched from depositing to withdrawing. Seeing as how that's all we need to know to then go the long roundabout way of calculating the range, the answer is C.
Intern
Joined: 20 May 2012
Posts: 20
Followers: 0
Kudos [?]: 21 [0], given: 9
### Show Tags
06 Jun 2012, 17:13
Thanks a lot - the wording of the question threw me off a bit - I wasn't sure how to calculate "the range" of account balances!
Intern
Joined: 01 Aug 2012
Posts: 1
Followers: 0
Kudos [?]: 0 [0], given: 2
Re: Beginning in January of last year, Carl made deposits of [#permalink]
### Show Tags
01 Dec 2012, 09:45
Hi,
Should'nt the answer be B. I may be wrong but we already know that $2600 was the closing balance for May, therefore, opening Balance$2000 + (120*5) = $2600, had he withdrawn in May it would not be possible to have a closing balance of$2600. Basis this and the information in Statement B we can confirm he did not start withdrawing mooney from the account before the month of June.
Math Expert
Joined: 02 Sep 2009
Posts: 34106
Followers: 6099
Kudos [?]: 76775 [0], given: 9981
Re: Beginning in January of last year, Carl made deposits of [#permalink]
### Show Tags
02 Dec 2012, 05:23
Expert's post
rahulmrsingh wrote:
Hi,
Should'nt the answer be B. I may be wrong but we already know that $2600 was the closing balance for May, therefore, opening Balance$2000 + (120*5) = $2600, had he withdrawn in May it would not be possible to have a closing balance of$2600. Basis this and the information in Statement B we can confirm he did not start withdrawing mooney from the account before the month of June.
To find the range we should know:
A. Balance before he started depositing, initial balance - we know that there was initial balance because for may balance was 2600 and maximum amount he could deposited for this period (from January till May) is: 5 months*120=600;
B. In which month Carl stopped depositing $120 and started withdrawing$50.
We have:
APRIL___MAY__JUNE
---?----$2,600----?--- (2) June balance < 2675 --> he didn't deposited in June --> he withdrew in June. Because if he deposited, then in June deposit would have been May balance +$120: $2,600+$120=$2,720>$2,675.
APRIL___MAY____JUNE
---?----$2,600---$2,550---
But again this statement is still insufficient as we still don't know when he started withdrawing, all we know it was not after June.
Hope it's clear.
_________________
GMAT Club Legend
Joined: 09 Sep 2013
Posts: 10640
Followers: 496
Kudos [?]: 130 [0], given: 0
Re: Beginning in January of last year, Carl made deposits of [#permalink]
### Show Tags
01 May 2014, 11:49
Hello from the GMAT Club BumpBot!
Thanks to another GMAT Club member, I have just discovered this valuable topic, yet it had no discussion for over a year. I am now bumping it up - doing my job. I think you may find it valuable (esp those replies with Kudos).
Want to see all other topics I dig out? Follow me (click follow button on profile). You will receive a summary of all topics I bump in your profile area as well as via email.
_________________
GMAT Club Legend
Joined: 09 Sep 2013
Posts: 10640
Followers: 496
Kudos [?]: 130 [0], given: 0
Re: Beginning in January of last year, Carl made deposits of [#permalink]
### Show Tags
13 Jun 2015, 12:23
Hello from the GMAT Club BumpBot!
Thanks to another GMAT Club member, I have just discovered this valuable topic, yet it had no discussion for over a year. I am now bumping it up - doing my job. I think you may find it valuable (esp those replies with Kudos).
Want to see all other topics I dig out? Follow me (click follow button on profile). You will receive a summary of all topics I bump in your profile area as well as via email.
_________________
VP
Joined: 08 Jul 2010
Posts: 1201
Location: India
GMAT: INSIGHT
WE: Education (Education)
Followers: 46
Kudos [?]: 1053 [1] , given: 40
Re: Beginning in January of last year, Carl made deposits of [#permalink]
### Show Tags
12 Oct 2015, 04:25
1
KUDOS
Expert's post
mydreammba wrote:
Beginning in January of last year, Carl made deposits of $120 into his account on the 15th of each month for several consecutive months and then made withdrawals of$50 from the account on the 15th of each of the remaining months of last year. There were no other transactions in the account last year. If the closing balance of Carl's account for May of last year was $2,600, what was the range of the monthly closing balances of Carl's account last year? (1) Last year the closing balance of Carl's account for April was less than$2,625.
(2) Last year the closing balance of Carl's account for June was less than $2,675. Given : Jan Feb Mar Apr May -$2600
Jun
Jul
Aug
Sep
Oct
Nov
Dec
Statement 1: April < 2625
Since either $50 withdrawl or$120 deposit is possible so for withdraw of $50 in May, April must have been$2600+50 = 2650 for a deposit of $50 which is not true as per statement 1 i.e. Deposit of$120 must have happened in all the months before MAY till MAY
Jan - $2120 Feb -$2240
Mar - $2360 Apr -$2480
May - $2600 Jun Jul Aug Sep Oct Nov Dec It gives us the amount from Jan to may but not for months later so NOT SUFFICIENT Statement 2: June < 2675 Since either$50 withdrawl or $120 deposit is possible so for withdraw of$50 in May, June must have been $2600+120 =$2720 for a deposit of $120 which is not true as per statement 2 i.e. Withdrawl of$50 must have happened in all the months After MAY
Jan
Feb
Mar
Apr
May - $2600 Jun -$2550
Jul - $2500 Aug -$2450
Sep - $2400 Oct -$2350
Nov - $2300 Dec -$2250
It gives us the amount from May to Dec but not for months before MAY so
NOT SUFFICIENT
Combining the two statements
Jan - $2120 Feb -$2240
Mar - $2360 Apr -$2480
May - $2600 Jun -$2550
Jul - $2500 Aug -$2450
Sep - $2400 Oct -$2350
Nov - $2300 Dec -$2250
SUFFICIENT
_________________
Prosper!!!
GMATinsight
Bhoopendra Singh and Dr.Sushma Jha
e-mail: [email protected]
Call us : +91-9999687183 / 9891333772
http://www.GMATinsight.com/testimonials.html
Contact for One-on-One LIVE ONLINE (SKYPE Based) or CLASSROOM Quant/Verbal FREE Demo Class
GMATinsight
107, 1st Floor, Krishna Mall, Sector-12 (Main market), Dwarka, New Delhi-110075
______________________________________________________
Please press the if you appreciate this post !!
Math Expert
Joined: 02 Sep 2009
Posts: 34106
Followers: 6099
Kudos [?]: 76775 [0], given: 9981
Re: Beginning in January of last year, Carl made deposits of [#permalink]
### Show Tags
12 Oct 2015, 04:49
Expert's post
Kauner wrote:
Beginning in January of last year, Carl made deposits of $120 into his account on the 15th of each month for several consecutive months and then made withdrawals of$50 from the account on the 15th of each of the remaining months of last year. There were no other transactions in the account last year. if the closing balance of Carl’s account for May of last year was $2,600, what was the range of the monthly closing balances of Carl’s account last year? (1) Last year the closing balance of Carl’s account for April was less than$2,625.
(2) Last year the closing balance of Carl’s account for June was less than $2,675. Merging topics. Please refer to the discussion above. Also, please read carefully and follow: rules-for-posting-please-read-this-before-posting-133935.html Pay attention to rules 1 and 3. Thank you. _________________ Senior Manager Joined: 12 Sep 2015 Posts: 455 Location: Canada Followers: 36 Kudos [?]: 327 [2] , given: 12 Re: Beginning in January of last year, Carl made deposits of [#permalink] ### Show Tags 12 Oct 2015, 13:51 2 This post received KUDOS mydreammba wrote: Beginning in January of last year, Carl made deposits of$120 into his account on the 15th of each month for several consecutive months and then made withdrawals of $50 from the account on the 15th of each of the remaining months of last year. There were no other transactions in the account last year. If the closing balance of Carl's account for May of last year was$2,600, what was the range of the monthly closing balances of Carl's account last year?
(1) Last year the closing balance of Carl's account for April was less than $2,625. (2) Last year the closing balance of Carl's account for June was less than$2,675.
Target question: What was the range of the monthly closing balances of Carl’s account last year?
Given: The closing balance of Carl’s account for May of last year was $2,600 IMPORTANT: To answer the target question we need only determine which month Carl STARTED withdrawing money. For example, if he started withdrawing money on March 15, we could use the fact that he had$2600 at the end of May to determine how much he had in the bank every month of the year, and thus determine the range of closing balances.
Notice that, since this is a Data Sufficiency, we need not calculate the actual range. We need only determine which month the deposits stopped and the withdrawals started.
So, we can rephrase our target question as . . .
REPHRASED target question: In which month did Carl start withdrawing $50? Statement 1: Last year the closing balance of Carl’s account for April was less than$2,625
Let's examine two cases:
case a: In May, Carl DEPOSITED $120. So, balance at end of April =$2600 - $120 =$2480. This is possible, since we're told that the balance is less than $2625 case b: In May, Carl WITHDREW$50. So, balance at end of April = $2600 +$50 = $2650. This is NOT possible, since we're told that the balance is less than$2625
So, Carl definitely deposited $120 in May (and deposited$120 in April, March, Feb, and Jan).
However, we don't know the first month that Carl started withdrawing $50 Since we cannot answer the REPHRASED target question with certainty, statement 1 is NOT SUFFICIENT Statement 2: Last year the closing balance of Carl’s account for June was less than$2,675.
Let's examine two cases:
case a: In June, Carl DEPOSITED $120. So, balance at end of June =$2600 + $120 =$2720. This is NOT possible, since we're told that the balance is less than $2675 case b: In June, Carl WITHDREW$50. So, balance at end of June = $2600 -$50 = $2550. This is possible, since we're told that the balance is less than$2675
So, Carl definitely withdrew $50 in June, which means he also withdrew$50 in July, August, Sept, etc. However, we don't know the FIRST month that Carl started withdrawing $50 Since we cannot answer the REPHRASED target question with certainty, statement 2 is NOT SUFFICIENT Statements 1 and 2 combined Statement 1 tells us that Carl deposited$120 in May.
Statement 2 tells us that Carl withdrew $50 in June. So, June was the first month that Carl started withdrawing$50
Since we can answer the REPHRASED target question with certainty, the combined statements are SUFFICIENT
Cheers,
Brent
_________________
Brent Hanneson - Founder of GMAT Prep Now, a free & comprehensive GMAT course with:
- over 500 videos (35 hours of instruction)
- over 1800 practice questions
- 2 full-length practice tests and other bonus offers
- http://www.gmatprepnow.com/
Brent also tutors students for the GMAT
Intern
Joined: 01 Jun 2013
Posts: 10
Followers: 0
Kudos [?]: 0 [0], given: 12
Re: Beginning in January of last year, Carl made deposits of [#permalink]
### Show Tags
19 Dec 2015, 11:30
I still don't understand what the question is asking by "What is the range of monthly closing balances"?
1. Highest balance- lowest balance or
2. Difference between each successive monthly balances?
I could easily calculate the below data.
Jan - $2120 Feb -$2240
Mar - $2360 Apr -$2480
May - $2600 Jun -$2550
Jul - $2500 Aug -$2450
Sep - $2400 Oct -$2350
Nov - $2300 Dec -$2250
Senior Manager
Joined: 12 Sep 2015
Posts: 455
Followers: 36
Kudos [?]: 327 [0], given: 12
Re: Beginning in January of last year, Carl made deposits of [#permalink]
### Show Tags
19 Dec 2015, 14:51
Quote:
Beginning in January of last year, Carl made deposits of $120 into his account on the 15th of each month for several consecutive months and then made withdrawals of$50 from the account on the 15th of each of the remaining months of last year. There were no other transactions in the account last year. If the closing balance of Carl’s account for May of last year was $2,600, what was the range of the monthly closing balances of Carl’s account last year? (1) Last year the closing balance of Carl’s account for April was less than$2,625
(2) Last year the closing balance of Carl’s account for June was less than $2,675 Target question: What was the range of the monthly closing balances of Carl’s account last year? Given: The closing balance of Carl’s account for May of last year was$2,600
IMPORTANT: To answer the target question we need only determine which month Carl STARTED withdrawing money.
For example, if he started withdrawing money on March 15, we could use the fact that he had $2600 at the end of May to determine how much he had in the bank every month of the year, and thus determine the range of closing balances. Notice that, since this is a Data Sufficiency, we need not calculate the actual range. We need only determine which month the deposits stopped and the withdrawals started. So, we can rephrase our target question as . . . REPHRASED target question: In which month did Carl start withdrawing$50?
Statement 1: Last year the closing balance of Carl’s account for April was less than $2,625 Let's examine two cases: case a: In May, Carl DEPOSITED$120. So, balance at end of April = $2600 -$120 = $2480. This is possible, since we're told that the balance is less than$2625
case b: In May, Carl WITHDREW $50. So, balance at end of April =$2600 + $50 =$2650. This is NOT possible, since we're told that the balance is less than $2625 So, Carl definitely deposited$120 in May (and deposited $120 in April, March, Feb, and Jan). However, we don't know the first month that Carl started withdrawing$50
Since we cannot answer the REPHRASED target question with certainty, statement 1 is NOT SUFFICIENT
Statement 2: Last year the closing balance of Carl’s account for June was less than $2,675. Let's examine two cases: case a: In June, Carl DEPOSITED$120. So, balance at end of June = $2600 +$120 = $2720. This is NOT possible, since we're told that the balance is less than$2675
case b: In June, Carl WITHDREW $50. So, balance at end of June =$2600 - $50 =$2550. This is possible, since we're told that the balance is less than $2675 So, Carl definitely withdrew$50 in June, which means he also withdrew $50 in July, August, Sept, etc. However, we don't know the FIRST month that Carl started withdrawing$50
Since we cannot answer the REPHRASED target question with certainty, statement 2 is NOT SUFFICIENT
Statements 1 and 2 combined
Statement 1 tells us that Carl deposited $120 in May. Statement 2 tells us that Carl withdrew$50 in June.
So, June was the first month that Carl started withdrawing $50 Since we can answer the REPHRASED target question with certainty, the combined statements are SUFFICIENT Answer = C Cheers, Brent _________________ Brent Hanneson - Founder of GMAT Prep Now, a free & comprehensive GMAT course with: - over 500 videos (35 hours of instruction) - over 1800 practice questions - 2 full-length practice tests and other bonus offers - http://www.gmatprepnow.com/ Brent also tutors students for the GMAT Math Revolution GMAT Instructor Joined: 16 Aug 2015 Posts: 1574 GPA: 3.82 Followers: 105 Kudos [?]: 829 [0], given: 0 Re: Beginning in January of last year, Carl made deposits of [#permalink] ### Show Tags 21 Dec 2015, 18:27 Expert's post Forget conventional ways of solving math questions. In DS, Variable approach is the easiest and quickest way to find the answer without actually solving the problem. Remember equal number of variables and independent equations ensures a solution. Beginning in January of last year, Carl made deposits of$120 into his account on the 15th of each month for several consecutive months and then made withdrawals of $50 from the account on the 15th of each of the remaining months of last year. There were no other transactions in the account last year. If the closing balance of Carl's account for May of last year was$2,600, what was the range of the monthly closing balances of Carl's account last year?
(1) Last year the closing balance of Carl's account for April was less than $2,625. (2) Last year the closing balance of Carl's account for June was less than$2,675.
When you modify the condition and the question,
Attachment:
GCDS mydreammba Beginning in January (20151220).jpg [ 37.59 KiB | Viewed 2291 times ]
It turns out like the table above. You need to know the month when Carl completed his deposit because he is going to make withdrawals from the next month. So, there is 1 variable(the month Carl completed his deposit) and you need 1 equation to match with the number of equation, which is likely to make D the answer.
In case of 1), case 1 and case 2 are possible, which is not unique. Therefore, it is not sufficient.
In case of 2), case 1 and case 2 are possible, which is not unique. Therefore, it is not sufficient.
In 1) & 2), only is case 2 possible, which is unique. Therefore it is sufficient and the answer is C.
->For cases where we need 1 more equation, such as original conditions with “1 variable”, or “2 variables and 1 equation”, or “3 variables and 2 equations”, we have 1 equation each in both 1) and 2). Therefore, there is 59 % chance that D is the answer, while A or B has 38% chance and C or E has 3% chance. Since D is most likely to be the answer using 1) and 2) separately according to DS definition. Obviously there may be cases where the answer is A, B, C or E.
_________________
MathRevolution: Finish GMAT Quant Section with 10 minutes to spare
The one-and-only World’s First Variable Approach for DS and IVY Approach for PS with ease, speed and accuracy.
Find a 10% off coupon code for GMAT Club members.
Unlimited Access to over 120 free video lessons - try it yourself
Math Expert
Joined: 02 Sep 2009
Posts: 34106
Followers: 6099
Kudos [?]: 76775 [1] , given: 9981
Re: Beginning in January of last year, Carl made deposits of [#permalink]
### Show Tags
22 Jan 2016, 09:55
1
KUDOS
Expert's post
mydreammba wrote:
Beginning in January of last year, Carl made deposits of $120 into his account on the 15th of each month for several consecutive months and then made withdrawals of$50 from the account on the 15th of each of the remaining months of last year. There were no other transactions in the account last year. If the closing balance of Carl's account for May of last year was $2,600, what was the range of the monthly closing balances of Carl's account last year? (1) Last year the closing balance of Carl's account for April was less than$2,625.
(2) Last year the closing balance of Carl's account for June was less than $2,675. MATH REVOLUTION VIDEO SOLUTION: _________________ Re: Beginning in January of last year, Carl made deposits of [#permalink] 22 Jan 2016, 09:55 Similar topics Replies Last post Similar Topics: 4 At the beginning of the last year, Tony's Auto Dealership 7 11 Sep 2011, 06:19 3 At the beginning of last year, Tony's Auto Dealership had 8 16 Dec 2010, 11:48 At the beginning of the last year, a car dealership had 150 8 30 Apr 2010, 10:44 6 Beginning in January of last year, Carl made deposits of$12 14 26 Oct 2009, 06:34
58 Beginning in January of last year, Carl made deposits of 8 08 Sep 2009, 11:58
Display posts from previous: Sort by |
Article | Open
# Snap evaporation of droplets on smooth topographies
• Nature Communicationsvolume 9, Article number: 1380 (2018)
• doi:10.1038/s41467-018-03840-6
Accepted:
Published online:
## Abstract
Droplet evaporation on solid surfaces is important in many applications including printing, micro-patterning and cooling. While seemingly simple, the configuration of evaporating droplets on solids is difficult to predict and control. This is because evaporation typically proceeds as a “stick-slip” sequence—a combination of pinning and de-pinning events dominated by static friction or “pinning”, caused by microscopic surface roughness. Here we show how smooth, pinning-free, solid surfaces of non-planar topography promote a different process called snap evaporation. During snap evaporation a droplet follows a reproducible sequence of configurations, consisting of a quasi-static phase-change controlled by mass diffusion interrupted by out-of-equilibrium snaps. Snaps are triggered by bifurcations of the equilibrium droplet shape mediated by the underlying non-planar solid. Because the evolution of droplets during snap evaporation is controlled by a smooth topography, and not by surface roughness, our ideas can inspire programmable surfaces that manage liquids in heat- and mass-transfer applications.
## Introduction
The configuration of evaporating droplets on a solid topography—e.g., their shape and location—is important for a broad range of applications. For example, in microcontact printing (a soft-lithography etching technique), an “ink” made of a polymer-solvent mixture is applied to a surface of designed topography and allowed to evaporate; the dry polymer residue is then printed onto a target surface, leaving a negative pattern of the original topography that can be used to replicate structures en masse from a single master template1. In immersion lithography (a widely used technique for integrated circuits manufacturing), a liquid water bridge is used to increase the precision of a UV light source for curing a target resin; an undesired side effect is the formation of droplets on the cured resin, which, upon evaporation, leave “water marks” that can spoil pattern features2. Spatio-temporal control of evaporating liquids is also attractive, as in edge lithography, where an ink droplet is left to evaporate on a hydrophobic patch; here, the low surface energy of the patch induces a transient dewetting process, which guides the ink residue to form edge patterns3. Finally, droplet evaporation is very important in heat-transfer applications4. For instance, a recently reported jumping-drop technique exploits superhydrophic surfaces to induce the motion of evaporating-condensing droplets for “hotspot cooling”, and is a promising heat-management technique in microelectronics5. These applications, however, depend on the control over the position and shape of the liquid, and this is often limited by solid–liquid–gas interactions occurring at the droplet’s edge.
Since it was first proposed by Picknett and Bexon in the 1970s6, the so-called stick-slip model has remained a canonical framework to explain the evaporation of droplets on solid surfaces. During stick-slip, a droplet alternates between two ideal “modes” as its volume is reduced: a slip mode, where the droplet edge smoothly retracts from the solid, and a stick mode, where the edge remains pinned to it. The slip mode (also called constant-contact-angle mode) is a diffusion-dominated process, where small gradients in the humidity over the surface of the droplet only drive weak hydrodynamic flows. As a consequence, the liquid and gas phases remain at rest while the interface smoothly reduces in size following the law R(t)2 ~ te − t, where R is the base radius of the droplet, t is time and te is the time at which the droplet completely evaporates7. The stick mode, on the other hand, involves a static contact line, i.e., R(t) = const. Because of this geometrical constraint a radial flow develops to make up for the mass lost at the pinned edge upon evaporation8; any solid particles suspended in the liquid drift to the edge, and this is the mechanism responsible for the familiar ring-like stains left behind by coffee drops9,10.
It is widely accepted that transitions from stick to slip, called de-pinning events, are activation processes11. Microscopically, a solid surface has chemical12 or topographical13 defects that impose a static energy barrier, hampering the translational motion of the contact line. As a consequence, an evaporating droplet with a pinned contact line stores surface energy as its volume is reduced. This proceeds until the energy barrier due to pinning is overcome, the contact line depins, and the motion of the interface is restored14,15,16,17.
So far, the widespread conception has been that contact-line pinning caused by microscopic surface roughness dominates the evolution of evaporating droplets. Such a fundamental aspect poses severe limitations to predict and control the configuration of a droplet upon evaporation.
Here we show that droplets evaporating on a smooth—but non-flat—solid surface exhibit a different mode of evaporation: instead of pinning the droplet in an uncontrolled manner, the underlying smooth topography promotes a reproducible sequence of well-defined droplet configurations paced by dynamic “snap” events. Such a snap mode of evaporation has the unique advantages of precise predictability and controllability over the shape and location of the droplet as it evaporates, making it useful for applications that need efficient mass and heat transfer at sub-millimetre scales.
## Results
### Evaporation on ultra-smooth liquid-impregnated rough surfaces
We investigated the response of evaporating water droplets to a smooth topography using Lubricant-Impregnated Rough surfaces (LIRs). LIRs are solid surfaces of arbitrary shape that are first treated with a super-hydrophobic nano-coating to create a rough, water-repellant, surface, and then impregnated by a lubricant oil (see Supplementary Notes 13 for fabrication details). The oil creates a thin lubricating layer, of thickness $ℓ$ ~ 10 μm, that covers the solid roughness, creating an ultra-smooth surface (for instance, on a tilted flat LIRs, a water droplet has a sliding angle below 1°).
We first tested the evaporation of a water droplet on a flat LIR surface (Fig. 1a). We found that the squared-base radius of the droplet decreases linearly with time, while the apparent contact angle, θa (measured relative to the horizontal), decreases smoothly due to the effect of a wetting lubricant ridge located at the base of the droplet18,19 (Fig. 1b). Such kinematics, which persists for up to ~80% of the evaporation time, indicate that contact-line pinning effects are negligible20.
We then carried out experiments of droplets evaporating on a wavy LIR surface (Fig. 1c). We placed an 80–μL droplet on a surface of wavelength λ = 2 mm and amplitude $ϵ$ = 0.2 mm, and left it to evaporate under room temperature and humidity conditions. The droplet quickly settled to adopt a symmetric shape (on a plane parallel to the wave) with its left and right edges lying close to the peaks of the topography (see panel 1 in Fig. 1c). As evaporation took place, we tracked the base radius of the droplet (a measure of the droplet’s contact area) and the apparent contact angle (measured relative to the horizontal and at the intersection of the droplet’s surface with the sinusoidal LIR surface (inset of Fig. 1d)). Contrary to the smooth evaporation observed on a flat surface, we found that the non-flat topography promotes a different evaporation kinematics. Initially, evaporation results in a slow retraction of the contact lines from the peaks of the topography, as shown by the continuous decrease of the base radius observed in Fig. 1d. Such kinematics is interrupted when, suddenly, one of the edges of the drop “snaps” by retracting to the adjacent peak (see images 2–3 in Fig. 1 and Supplementary Movie 1). The duration of a snap event is very short compared to the evaporation time of the droplet. Therefore, a snap appears as a discontinuous change in the lateral base radius and the apparent contact angle in the timescale of our experiments (Figs. 1d and 1e). Once a snap has occurred, the droplet continues to evaporate in a smooth manner (again, with the contact lines slowly retracting from the peaks of the wave) until another snap event is triggered. We found that sequential snaps undergone by the same droplet can be triggered at either of its edges (compare, e.g., images 3–4 and 4–5 in Fig. 1c). In addition, we found that the apparent contact angles of the left and right edges remain remarkably close to each other during the whole evaporation process. These features suggest that the smooth surface provided by the lubricant layer of the LIR surfaces eliminates contact-line pinning, and, therefore, that snaps are not de-pinning events. This contrasts with the stick-jump dynamics observed for droplets evaporating on periodic micro-patterned super-hydrophobic surfaces, where pinning effects dominate21,22,23.
Between snaps, the interface shape is always symmetric about a vertical line (Fig. 1c). This symmetry is lost momentarily during a snap, while the droplet undergoes a lateral motion. As a result, the symmetry line alternates between two positions: it is either aligned with a peak of the topography or with a valley (see images 4 and 5 in Fig. 1c). Therefore, the alternation between the two configurations induces a periodic variation in the droplet’s position and shape. We repeated the experiments using surfaces of different amplitude-to-wavelength ratio, $ϵ$/λ, and found a highly reproducible emerging pattern: the position of the drop always alternates between peak and valley configurations, and there is a clear correlation between these configurations and the droplet base radius which becomes increasingly marked for larger amplitudes of the topography. As illustrated in Fig. 1f, for a given droplet size and wave amplitude, it is possible to anticipate the shape of the droplet and its position relative to the solid surface.
### Lattice–Boltzmann simulations
To better understand the mechanism of snap evaporation, we carried out numerical simulations of the coupled diffusion and hydrodynamics equations using a lattice–Boltzmann algorithm (see Supplementary Note 4 for details). In the simulations, we modelled the smooth LIR surface as a solid boundary with a small static noise in its wettability; this allows the droplets to break the plane symmetry, but does not introduce any pinning effects. To validate our numerical model, we first considered full 3D simulations of evaporating droplets including the effect of gravity (Fig. 2a), which are in very good agreement with the sequence of droplet configurations observed in the experiments (cf. Fig. 1c). Normalising the simulation and experimental time sequences by the total evaporation time, confirms that peak and valley states always occur over the same specific ranges in the droplet base radius, and implies that the effect of the evaporation rate is purely kinematic (see Supplementary Movie 2).
Next, we carried out simulations of gravity-free 2D droplets; we found the same evaporation sequences, ruling out gravitational and 3D effects on the snap events (Fig. 2b and Supplementary Movie 3). Instead, a closer examination of the flow profiles, characterised by the velocity and pressure fields, reveals that the slow evolution of the droplets (when on a peak or a valley) is controlled by mass diffusion in the gas due to evaporation (images 1 and 5 in Fig. 2b). This situation changes when the contact lines approach the valleys of the topography. At such points, the Laplace pressure inside the droplet builds up near one of the contact lines and drives a capillary flow towards the opposite edge, triggering a snap (image sequence 2–4 in Fig. 2b). We then removed the noise from the simulations, which forces the droplet to keep the plane symmetry. Surprisingly, the droplets still undergo snaps, albeit with no translational motion (Fig. 2c and Supplementary Movie 4).
### Snap sequences and shape bifurcations
Our numerical simulations indicate that the slow evolutions of peak and valley configurations correspond to quasi-static processes, and that during snaps the interface is out-of-equilibrium.
We expect that the 2D quasi-static droplet shapes are circular sections that intersect the solid surface with an equilibrium contact angle, θe (measured relative to the local surface tangent). Such interfacial shapes are indeed valid solutions of the Young–Laplace equation subject to Young’s condition13, which are the equilibrium equations for a liquid–gas interface in contact with a solid boundary24. On a flat surface, fixing the contact angle and the cross-sectional area of the droplet, A, yields a single equilibrium solution which remains invariant upon a continuous translation over the surface. On a wavy surface, corresponding to $ϵ$/λ > 0, the translational invariance becomes discrete (with periodicity λ) as two symmetric equilibrium solutions appear—the peak and valley configurations. These states can be distinguished by their lateral base radius, R, and lateral coordinate, say x = xP = 0, ±λ, ±2λ, …, for a peak, and x = xV = ±$1 2$λ, ±$3 2$λ, … for a valley. This situation is maintained upon increasing the wave amplitude further, up to a critical value ($ϵ$/λ)* where multiple circular-arc shaped equilibrium solutions (of different base radius R) emerge (see Supplementary Note 5). The critical amplitude thus corresponds to the onset of a cusp bifurcation25,26. For example, for $ϵ$/λ = 0.1 and A/λ2 = 4 there is one valley configuration and three distinct peak configurations (Fig. 3a). In addition to symmetric states, one also finds asymmetric solutions; for instance, in Fig. 3a there are four non-symmetric solutions formed by two pairs of mirror images located at intermediate positions between peaks and valleys.
The multiplicity of symmetric solutions above the critical amplitude is clearly manifested in the functional relation between R and A, which is not bijective (see Fig. 3b). In fact, the structure of R(A) curves for peak and valley states implies that reducing A (e.g., due to evaporation) eventually leads to a fold where available equilibrium solutions of equivalent cross-sectional area have a smaller radius (Fig. 3b). At first sight, one might expect that such a geometrical constraint dictates the fate of the droplets, and that snaps are triggered whenever A reaches the value at the fold of the curve, Af.
However, an analysis of the stability of the equilibrium solutions reveals a subtler picture. In the stability analysis, we compute the surface energy F(R, x) of droplets of circular shape and prescribed cross-sectional area as a function of the base radius R and the lateral coordinate x (see Supplementary Note 5). Consider Fig. 3c–e, which show the evolution of the energy landscape as the area is decreased from an initial value A/λ2 = 4, falling below the value at the fold Af/λ2 ≈ 3.11 (see Fig. 3b). Initially, there are three sinks (the valley and the two peak configurations marked with solid lines in Fig. 3a), one source (the peak configuration marked with a dashed line) and four saddles (the asymmetric configurations). Now consider a droplet in the stable peak configuration of largest radius. As A decreases and reaches a value Ap/λ2 ≈ 3.26, such a stable point merges with the two adjacent saddles, leaving a single saddle as a remnant. The area Ap thus corresponds to the critical point of an inverted pitchfork bifurcation25. The structure of the energy landscape at A = Ap explains the lateral migration of the droplet during snaps: at the bifurcation point, the remaining source prevents the droplet from migrating towards the remaining stable peak state; instead, the surface energy is always reduced upon a migration to the adjacent valley state. This sequence is repeated as the area is reduced further, and explains the clear alternation of experimental interface configurations.
The pitchfork bifurcation always occurs at a cross-sectional area Ap larger than the area of the fold, Af. As A is reduced further from Ap, the saddle produced by the pitchfork bifurcation annihilates with the source at A = Af, leaving a single sink in the peak branch (see Fig. 3e). Such a situation corresponds to a 2D saddle-node (or fold) bifurcation25. Indeed, one can remove the pitchfork bifurcation to observe the fold bifurcation by forcing the droplets to keep the plane symmetry at all times, explaining the symmetric snap events observed in the simulations (Fig. 2c). In the presence of lateral fluctuations, however, the effect of the pitchfork bifurcation is to “weaken” the fold bifurcation, producing only a remnant of the lost saddle-node.
A bifurcation diagram in x-A space, shown in Fig. 3f, summarises the hierarchy of the pitchfork and saddle-node bifurcations governing the snapping behaviour of the droplets triggered by the sinusoidal topography. The pitchfork bifurcation always occurs when the contact lines approach the valleys of the topography, and thus the critical radius Rp is independent of the amplitude of the surface pattern. However, the range of stable equilibria on a given branch becomes smaller on surfaces of a larger wave amplitude. This leads to the collapse of states at larger $ϵ$/λ observed in Fig. 1f. Despite overlooking the details of the 3D interface configuration, the 2D model gives a good prediction of the corresponding separatrices, which we present as overlays in Fig. 1f.
## Discussion
It is reasonable to expect that similar mechanisms underpin the stability of evaporating droplets on more complex topographies. Indeed, an “egg-box” surface leads to the alternation between well-defined “diamond” and “rectangle” droplet shapes (Fig. 4a). Here, again, the contact line tends to avoid the valleys of the topography, and thus the droplet adopts a shape whose typical width, W, and length, L, are multiples of the underlying wavelength of the surface pattern, λ. Snap events now involve a step-wise reduction of one of the droplet length scales, and thus the droplet evolves following a sequence W × L ≈ 5λ × 5λ → 4λ × 5λ → 4λ × 4λ…, which can be exploited to control the aspect ratio of the droplet (Fig. 4b).
Therefore, snap evaporation is a distinct mode of droplet evaporation on smooth—but topographically patterned—solid surfaces. Unlike stick-slip evaporation, the alternation of well-defined quasi-static states observed in snap evaporation is controlled by shape bifurcations of the liquid–gas interface dictated by the interplay between the underlying surface topography and the droplet volume, and not by contact-line pinning.
In our experiments, the timescale of snap events is very short compared to the evaporation time of the droplet (see Fig. 1d). The regime where the evaporation and snap timescales compete poses fundamental questions in relation to the dynamics of bifurcations (for which our experimental setup provides a useful test bed), but can also find application in situations where evaporation happens in a short timescale, such as in micro-fluidics. Our ideas can also be applied to other methods of variation of the droplet volume on smooth surfaces, such as condensation27, mass transfer via flow rate28, or by exploiting external fields (e.g., temperature or pressure). Finally, the variation of the surface topography, either spatially through designed patterns, or dynamically via forced droplet motion29 or actuation of flexible solids, can be used to extend these principles to achieve a better control of droplet localisation and transport mediated by snaps.
### Data availability
The data that support the findings of this study are available from R.L.A. upon reasonable request.
Publisher's note: Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
## References
1. 1.
Perl, A., Reinhoudt, D. N. & Huskens, J. Microcontact printing: limitations and achievements. Adv. Mater. 21, 2257–2268 (2009).
2. 2.
Kawamura, D. et al. Influence of the watermark in immersion lithography process. In Proc. SPIE 5753, Advances in Resist Technology and Processing XXII, Microlithography 2005, 818–826 (International Society for Optics and Photonics, San Jose, CA, US, 2005).
3. 3.
Lee, K.-H., Kim, S.-M., Jeong, H. & Jung, G.-Y. Spontaneous nanoscale polymer solution patterning using solvent evaporation driven double-dewetting edge lithography. Soft Matter 8, 465–471 (2012).
4. 4.
Grissom, W. M. & Wierum, F. Liquid spray cooling of a heated surface. Int. J. Heat. Mass Trans. 24, 261–271 (1981).
5. 5.
Wiedenheft, K. F. et al. Hotspot cooling with jumping-drop vapor chambers. Appl. Phys. Lett. 110, 141601 (2017).
6. 6.
Picknett, R. & Bexon, R. The evaporation of sessile or pendant drops in still air. J. Colloid Interface Sci. 61, 336–350 (1977).
7. 7.
Cazabat, A.-M. & Guéna, G. Evaporation of macroscopic sessile droplets. Soft Matter 6, 2591–2612 (2010).
8. 8.
Hu, H. & Larson, R. G. Evaporation of a sessile droplet on a substrate. J. Phys. Chem. B. 106, 1334–1344 (2002).
9. 9.
Deegan, R. D. et al. Capillary flow as the cause of ring stains from dried liquid drops. Nature 389, 827–829 (1997).
10. 10.
Sáenz, P. et al. Dynamics and universal scaling law in geometrically-controlled sessile drop evaporation. Nat. Commun. 8, 14783 (2017).
11. 11.
de Gennes, P. G. Wetting: statics and dynamics. Rev. Mod. Phys. 57, 827–863 (1985).
12. 12.
Johnson Jr, R. E. & Dettre, R. H. Contact Angle Hysteresis (ACS Publications, Washington, 1964).
13. 13.
Huh, C. & Mason, S. Effects of surface roughness on wetting (theoretical). J. Colloid Interface Sci. 60, 11–38 (1977).
14. 14.
Savva, N., Kalliadasis, S. & Pavliotis, G. A. Two-dimensional droplet spreading over random topographical substrates. Phys. Rev. Lett. 104, 084501 (2010).
15. 15.
Stauber, J. M., Wilson, S. K., Duffy, B. R. & Sefiane, K. On the lifetimes of evaporating droplets. J. Fluid. Mech. 744, R2 (2014).
16. 16.
Dietrich, E., Kooij, E. S., Zhang, X., Zandvliet, H. J. & Lohse, D. Stick-jump mode in surface droplet dissolution. Langmuir 31, 4696–4703 (2016).
17. 17.
Pham, T. & Kumar, S. Drying of droplets of colloidal suspensions on rough substrates. Langmuir 33, 10061–10076 (2017).
18. 18.
Smith, J. D. et al. Droplet mobility on lubricant-impregnated surfaces. Soft Matter 9, 1772–1780 (2013).
19. 19.
Semprebon, C., McHale, G. & Kusumaatmaja, H. Apparent contact angle and contact angle hysteresis on liquid infused surfaces. Soft Matter 13, 101–110 (2017).
20. 20.
Guan, J. H. et al. Evaporation of sessile droplets on slippery liquid-infused porous surfaces (slips). Langmuir 31, 11781–11789 (2015).
21. 21.
McHale, G., Aqil, S., Shirtcliffe, N., Newton, M. & Erbil, H. Y. Analysis of droplet evaporation on a superhydrophobic surface. Langmuir 21, 11053–11060 (2005).
22. 22.
do Nascimento, R. M., Cottin-Bizonne, C., Pirat, C. & Ramos, S. M. Water drop evaporation on mushroom-like superhydrophobic surfaces: temperature effects. Langmuir 32, 2005–2009 (2016).
23. 23.
Debuisson, D., Merlen, A., Senez, V. & Arscott, S. Stick–Jump (SJ) evaporation of strongly pinned nanoliter volume sessile water droplets on quick drying, micropatterned surfaces. Langmuir 32, 2679–2686 (2016).
24. 24.
de Gennes, P.-G., Brochard-Wyart, F. & Quéré, D. Capillarity And Wetting Phenomena: Drops, Bubbles, Pearls, Waves (Springer Science & Business Media, Germany, 2013).
25. 25.
Strogatz, S. H. Nonlinear Dynamics And Chaos: With Applications To Physics, Biology, Chemistry, And Engineering. Studies in Nonlinearity, 1st edn (Westview Press, Colorado, 2001).
26. 26.
Arnol’d, V. I. Singularities, bifurcations, and catastrophes. Sov. Phys. Uspekhi 26, 1025 (1983).
27. 27.
Park, K.-C. et al. Condensation on slippery asymmetric bumps. Nature 531, 78–82 (2016).
28. 28.
Pradas, M., Savva, N., Benziger, J. B., Kevrekidis, I. G. & Kalliadasis, S. Dynamics of fattening and thinning 2D sessile droplets. Langmuir 32, 4736–4745 (2016).
29. 29.
Herde, D., Thiele, U., Herminghaus, S. & Brinkmann, M. Driven large contact angle droplets on chemically heterogeneous substrates. Europhys. Lett. 100, 16002 (2012).
## Acknowledgements
We would like to thank J. Sardanyés and M. Sommacal for useful discussions. E.R.G. and B.V.O. acknowledge financial support from Northumbria University via a PhD Studentship. R.L.A. and G.G.W. thank the Royal Society Research Grant Scheme for financial support (grant no. RG150470); E.R.G. and R.L.A. acknowledge support from EPSRC (grant no. EP/P024408/1). R.L.A. acknowledges support from EPSRC as a member of the UK Consortium on Mesoscale Engineering Sciences (grant no. EP/L00030X/1).
## Author information
### Author notes
1. These authors contributed equally: Gary G. Wells, Élfego Ruiz-Gutiérrez.
### Affiliations
1. #### Smart Materials & Surfaces Laboratory, Faculty of Engineering and Environment, Northumbria University, Ellison Place, Newcastle upon, Tyne, NE1 8ST, UK
• Gary G. Wells
• , Élfego Ruiz-Gutiérrez
• , Youen Le Lirzin
• , Anthony Nourry
• , Bethany V. Orme
• & Rodrigo Ledesma-Aguilar
2. #### Institut Universitaire de Technologie de Lannion, Rue Édouard Branly, 22300, Lannion, France
• Youen Le Lirzin
• & Anthony Nourry
### Contributions
M.P. and R.L.A. conceived the research. M.P., R.L.A. and G.G.W. supervised the research. G.G.W. designed the experiments. G.G.W., Y.L.L. and A.N. carried out the experiments of drop evaporation on flat and plane-wave surfaces. B.V.O. and G.G.W. carried out the experiments of drop evaporation on egg-box surfaces. G.G.W., R.L.A., Y.L.L., A.N. and B.V.O. analysed the experimental data. E.R.G. developed and carried out the simulations. M.P., R.L.A. and E.R.G. developed the theoretical model. R.L.A. and M.P. wrote the paper. E.R.G. and G.G.W. contributed equally to this work.
### Competing interests
The authors declare no competing interests.
### Corresponding author
Correspondence to Rodrigo Ledesma-Aguilar. |
# minipage with page break
I'm using LaTeX for writing math tests. Every task I wrap into an environment, which I defined like this:
\NewEnviron{beispiel}[1]{\begin{minipage}[t]{0.76\textwidth}
\BODY
\end{minipage} \hfill
So I actually want two columns (with different width) and the left one includes the example and the right one includes the points for that example. My environment works perfectly well, but I need automatic page breaks for long examples. Is there a way to do this?
I also tried out the longtable-package (no page breaks within a row) parcolumns-package (enumeration, vspace don't work) - but I didn't manage to get what I want.
Example:
\documentclass[a4paper,12pt]{report}
\usepackage{geometry}
\geometry{a4paper,left=18mm,right=18mm, top=3cm, bottom=2cm}
\usepackage{lmodern}
\usepackage[T1]{fontenc}
\usepackage{setspace}
\usepackage{environ}
\usepackage{blindtext}
\onehalfspacing
\newcounter{punkte}
\NewEnviron{beispiel}[1]{\begin{minipage}[t]{0.76\textwidth}
\BODY
\end{minipage} \hfill
\begin{document}
\begin{enumerate}
\item \begin{beispiel}{3} %points of the example
\blindtext \\
\blindtext \\
\blindtext \\
\blindtext \\
\end{beispiel}
\end{enumerate}
\end{document}
I hope someone can help... Cheers
• Is that right hand box really just a one line label? (If so you don't need boxes at all, just a list, which will allow page breaking naturally) – David Carlisle May 20 '15 at 8:41
• Maybe this question could help you tex.stackexchange.com/questions/32704/… – Rico May 20 '15 at 8:42
• Yes, the right hand box is just one line. But I don't see how to do it with a list. Sorry. – chris May 20 '15 at 8:58
• The posted example produces: ! Undefined control sequence. l.12 \NewEnviron and ! LaTeX Error: No counter 'punkte' defined. – David Carlisle May 20 '15 at 9:40
• I had some commands in an external file. It should work now... – chris May 20 '15 at 9:52
Almost always in such cases you need a list rather than minipages or tables.
here I use a list that borrows from enumerate and description to handle the enumeration counter but use the optional argument of \item to set the points.
\documentclass[a4paper,12pt]{report}
\usepackage{geometry}
\geometry{a4paper,left=18mm,right=18mm, top=3cm, bottom=2cm}
\usepackage{lmodern}
\usepackage[T1]{fontenc}
\usepackage{setspace}
\usepackage{blindtext}
\
\newcounter{punkte}
\onehalfspacing
\makeatletter
\newenvironment{bbb}{%
\list
{}
{%
\rightmargin.25\textwidth
\usecounter{enumi}%
\def\makelabel##1{\refstepcounter{enumi}%
\hss\llap{\labelenumi}%
\rlap{\kern\dimexpr\textwidth-\leftmargin
\llap{\small\_\_\_/##1/ Pkt.}}}}%
}
{\endlist}
\makeatother
\begin{document}
\noindent X\dotfill X
\begin{bbb}
\item[3] %points of the example
\blindtext
\blindtext
\blindtext
\blindtext
\item[2] %points of the example
zzz zzz zzz zzz zzz
\end{bbb}
\end{document} |
# If the area of a square field is $62500$ square metres. Find the side of the field.
$\begin{array}{1 1} 350\;m \\ 450\;m \\ 250\;m \\ 150\;m \end{array}$ |
# tricky integral
• Nov 23rd 2009, 08:52 PM
niz
tricky integral
Hi all,
2 3 3
∫ [x √(8-x ) ] dx
0
( Sorry I am not good at writing this integral clear enough. In words it's Integral of x and cube root of (8 - x cube) dx with integral range from 0 to 2. Hope this helps.)
• Nov 23rd 2009, 11:13 PM
Prove It
Quote:
Originally Posted by niz
Hi all,
2 3 3
∫ [x √(8-x ) ] dx
0
( Sorry I am not good at writing this integral clear enough. In words it's Integral of x and cube root of (8 - x cube) dx with integral range from 0 to 2. Hope this helps.)
So it's $\int_0^2{x\sqrt[3]{8 - x^3}\,dx}$?
• Nov 24th 2009, 12:27 AM
niz
Quote:
Originally Posted by Prove It
So it's $\int_0^2{x\sqrt[3]{8 - x^3}\,dx}$?
Yes that's the integral. Thanks
• Nov 24th 2009, 02:26 AM
simplependulum
$I \int_0^2 x \sqrt[3]{8-x^3}~dx$
By substituting $x = 2 \sqrt[3]{t}$
$dx = \frac{2}{3} t^{-\frac{2}{3}} dt$
we have $I = \int_0^1 2 \sqrt[3]{t} \cdot 2 \sqrt[3]{1 -t } ~ \cdot \frac{2}{3} t^{-\frac{-2}{3}} dt$
$= \frac{8}{3} \int_0^1 t^{ \frac{1}{3} - \frac{2}{3} } (1 - t)^{\frac{1}{3}}$
$= \frac{8}{3} \int_0^1 t^{-\frac{1}{3}} (1 - t)^{\frac{1}{3}}$
$= \frac{8}{3} B( \frac{2}{3} , \frac{4}{3} )$
$= \frac{16\pi}{9\sqrt{3}}$
• Nov 24th 2009, 06:41 AM
niz
Hi Simplependulum,
Thanks a lot for your help but I am bit unclear about the 2nd last step which consists of a function B(2/3, 4/3). What's this function? Can you please throw some light on it? Thanks once again.
• Nov 24th 2009, 07:44 AM
Drexel28
Quote:
Originally Posted by niz
Hi Simplependulum,
Thanks a lot for your help but I am bit unclear about the 2nd last step which consists of a function B(2/3, 4/3). What's this function? Can you please throw some light on it? Thanks once again.
Beta Function -- from Wolfram MathWorld
• Nov 24th 2009, 08:57 PM
niz
Thanks a lot. |
# Current measurement over a fairly large range
A part of a circuit I'm building has the following components:
simulate this circuit – Schematic created using CircuitLab
• For clarification, the transistor's base is being supplied with current from a different part of the circuit.
V1 is a voltage source, variable between 0 and 35V. It can deliver up to 1amp, however, in sake of the transistor's safety, I'll be limiting the max. current to no more than 250mA.
R1, is a sensing resistor. 0.1% with a low temp. coefficient.
The values of V1 & R1 as shown are arbitrary.
A voltage will be developed on R1 as current passes through it. My intention was to use a current sensing amplifier that feeds a 14 to 16bit ADC to read the voltage.
The problem is that my ADC will have a reading range of up to 5V, probably a bit less. The current sensing amplifier has some internal gain, 20 seems a common one. This makes it impossible to find a single resistor value which will enable me to get readings in the uA range and high mA range.
For example, if 1uA flows through R1 which is 1Ohm there will be a voltage of 1uV across the resistor. Amplified by 20, the current sensing amp. will output 20uV. With a 16bit ADC and 5V range I have a resolution of 5/2^16 = ~76.3uV so this is will fail to detect anything under 3.8uA and that will be my final resolution. In real life it would be less because of noise, perhaps half of that or a bit worse.
At 250mA the voltage across the resistor is 0.25V times 20 = 5V so that would be the highest value I could measure.
Easy to see that I can not use a larger resistor because that would mean that higher current will go over 5V which means I will not be able to read them. Using a smaller value resistor will cause further loss of resolution on the low range.
What's the way to get "the best of both worlds"? I can imagine using two resistors, but how do I know when to switch between them and who to "believe"? This current reading will be used to auto shut off in case it overshoots a certain value - it must be reliable.
• Since this seems to be just an "auto shut-off" threshold thing, do you really need to be able to measure that threshold down to $1\mu A$ resolution? Out of a max of $250mA$? Seriously? What kind of application is this? – jonk Sep 19 '16 at 18:15
• @jonk I've mentioned the auto-shutoff just to make it clear that the solution needs to be reliable and I can not have unreliable behavior at the end of the selected max current. The device is something like a curve tracer so it will have to measure small currents. – user34920 Sep 19 '16 at 19:00
• Yeah, that current mirror technique was the first place my mind went, earlier. – jonk Sep 19 '16 at 20:19
• But an automated curve tracer! Now that's interesting. Do you want to set currents, sinking or sourcing, and be able to measure the voltage at the pin, as well? Plus, be able to set a low impedance source voltage anywhere, and measure the currents? Now that would be one fancy pin driver! Hmm. You may need to get into $nA$, too. – jonk Sep 19 '16 at 20:20
• Hmm. What kind of voltage compliances? – jonk Sep 19 '16 at 20:26
This is not going to be easy. The normal answer is to use a high side current sensing chip, like the INA16x series. Although I haven't checked the datasheet, I expect that this won't yield 16 bit accuracy.
The first strategy would be to see if you can re-arrange the circuit to do low side current sensing.
That failing, you probably need to float the A/D with V1. If V1 was always at least enough to power the A/D, then just a negative linear regulator would be sufficient. However, since V1 can go to 0, you have to supply some other power. Tie the positive output of the special A/D power supply to V1, then opto-couple the digital lines in and out of the A/D.
• The INA16x chips are high quality instrumentation amps, so this would basically work like some current sense amplifiers from ADI which I looked at, probably the same thing but with fixed (and trimmed) gain resistor in the inst. amp. This is pretty much where I am now. I can configure one of these devices the same way I do with a current sense amp, however I can control the gain which can be good, however I am not sure how to make this bullet-proof in software. Sending the voltage deferentially is not a problem so I think I'll have little benefit from re-arranging the circuit. – user34920 Sep 19 '16 at 17:46
• @user: At 16 bit accuracy, taking two readings and subtracting in software is probably going to get you far too little common mode rejection. Floating the A/D with V1 eliminates common mode problems, because that is handle by opto-isolators and only on digital signals. – Olin Lathrop Sep 19 '16 at 19:10
• So you are saying I should power the ADC from the same voltage source that is used to test the transistor. That is not a problem since V1 is actually a power supply running at about 35V connected to linear regulators that feed the HV digital side of the circuit, namely a DAC that will generate various voltages that are fed into an op-amp + transistor to generate various voltages for V1. – user34920 Sep 19 '16 at 19:16
Not sure if this is any help. But its a thought. It's not designed for $250mA$, but using $\pm 10V$ at the input it will do precision $\pm 500\mu A$ at the output pin with $\pm 50V$ compliances.
simulate this circuit – Schematic created using CircuitLab
Might provide something to stimulate other thoughts. I've certainly used something like it for curve tracing, anyway. (This one is a mock-up for illustration.)
Your Requirements are different than a good DMM.
Normally one chooses a current shunt with a 100mV full scale more or less depending on power ratings, gain to full scale on ADC, input offset error, and desired resolution/error budget.
Start with these specs. 1) Resolution, 2) resolution 3)accuracy in each range
• Then consider shunt R's to optimize the above ranges for 50 to 150mV drop full scale.
• 14 bit ADC gives 8,192 levels + sign bit or <4 decades
• 16 bit ADC gives 32,768 levels + sign bit or 4 1/3 decades |
For those wishing to follow along with the R-based demo in class, click here for the companion R-script for this lecture.
If you haven’t already done this, please sign up (on our shared Google Sheets) for a time slot (30 mins) to discuss your group project proposals with me on Tues Oct 1. The rest of lab time is yours to either work on the group projects or get started with lab 3 (if I finish revising it in time!)
# Optimization
We can’t maximize a likelihood function without an optimization algorithm.
We can’t optimize a sampling or monitoring regime, as in the power analysis problem, without an optimization algorithm.
Clearly, we need optimization algorithms!! In addition, they provide an excellent example of how computers (often via brute force algorithms) can supersede pure mathematics for performing statistical analysis.
You may not have built your own optimization algorithm before, but you’ve probably taken advantage of optimization algorithms that are operating behind the scenes. For example, if you have performed a glmm or a non-linear regression in R, you have exploited numerical optimization routines!
We will discuss optimization in the context of maximum likelihood estimation, and a couple lectures from now we’ll discuss optimization in a Bayesian context. Let’s start with the most simple of all optimization algorithms – brute force!
Note: you won’t need to build your own optimization routines for this class- the code in this lecture is for demonstration purposes only!
## Brute Force!
Just like we did for the two-dimensional likelihood surface, we could evaluate the likelihood at tiny intervals across a broad range of parameter space. Then we can just identify the parameter set associated with the maximum likelihood across all evaluated parameter sets.
### Positives
• Simple!! (conceptually very straightforward)
• Identify false peaks! (guaranteed to find the MLE!)
• Undeterred by discontinuities in the likelihood surface
### Negatives
• Speed: even slower and less efficient than a typical ecologist is willing to accept!
• Resolution: we may specify the wrong interval size. Even so, we can only get the answer to within plus or minus the interval size.
### Example dataset: Myxomatosis titer in rabbits
Let’s use Bolker’s myxomatosis example dataset (an example we’ll return to frequently!) to illustrate:
####################
# Explore Bolker's myxomatosis example
library(emdbook) # this is the package provided to support the textbook!
MyxDat <- MyxoTiter_sum # load Bolker's example data
head(Myx)
## grade day titer
## 1 1 2 5.207
## 2 1 2 5.734
## 3 1 2 6.613
## 4 1 3 5.997
## 5 1 3 6.612
## 6 1 3 6.810
For this example, we are modeling the distribution of measured titers (virus loads) for Australian rabbits. Bolker chose to use a Gamma distribution. Here is the empirical distribution:
hist(Myx$titer,freq=FALSE) # distribution of virus loads We need to estimate the gamma ‘rate’ and ‘shape’ parameters that best fit this empirical distribution. Here is one example of a Gamma fit to this distribution: ########### # Overlay a gamma distribution on the histogram hist(Myx$titer,freq=FALSE) # note the "freq=FALSE", which displays densities of observations, and therefore makes histograms comparable with probability density functions
curve(dgamma(x,shape=40,scale=0.15),add=T,col="red")
This is clearly not a great fit, but perhaps this would be an okay starting point (optimization algorithms don’t really require perfect starting points, just need to be in the ballpark)…
Let’s build a likelihood function for this problem!
################
# Build likelihood function
GammaLikelihoodFunction <- function(params){ # only one argument (params)- the data are hard-coded here (this is often the case with simple likelihood functions)
sum(dgamma(Myx$titer,shape=params['shape'],scale=params['scale'],log=T)) # use params and data to compute likelihood } params <- c(40,0.15) names(params) <- c("shape","scale") params ## shape scale ## 40.00 0.15 GammaLikelihoodFunction(params) # test the function! ## [1] -49.58983 Now let’s optimize using ‘optim()’ like we did before, to find the MLE! NOTE: “optim()” will throw some warnings here because it will try to find the data likelihood for certain impossible parameter combinations! ############ # USE R's 'OPTIM()' FUNCTION ############ ############ # Optimize using R's built-in "optim()" function: find the maximum likelihood estimate ctrl <- list(fnscale=-1) # maximize rather than minimize!! MLE <- optim(fn=GammaLikelihoodFunction,par=params,control=ctrl,method="BFGS") # stop the warnings! ## Warning in dgamma(Myx$titer, shape = params["shape"], scale =
## params["scale"], : NaNs produced
## Warning in dgamma(Myx$titer, shape = params["shape"], scale = ## params["scale"], : NaNs produced ## Warning in dgamma(Myx$titer, shape = params["shape"], scale =
## params["scale"], : NaNs produced
## Warning in dgamma(Myx$titer, shape = params["shape"], scale = ## params["scale"], : NaNs produced ## Warning in dgamma(Myx$titer, shape = params["shape"], scale =
## params["scale"], : NaNs produced
## Warning in dgamma(Myx$titer, shape = params["shape"], scale = ## params["scale"], : NaNs produced ## Warning in dgamma(Myx$titer, shape = params["shape"], scale =
## params["scale"], : NaNs produced
## Warning in dgamma(Myx$titer, shape = params["shape"], scale = ## params["scale"], : NaNs produced ## Warning in dgamma(Myx$titer, shape = params["shape"], scale =
## params["scale"], : NaNs produced
## Warning in dgamma(Myx$titer, shape = params["shape"], scale = ## params["scale"], : NaNs produced ## Warning in dgamma(Myx$titer, shape = params["shape"], scale =
## params["scale"], : NaNs produced
## Warning in dgamma(Myx$titer, shape = params["shape"], scale = ## params["scale"], : NaNs produced ## Warning in dgamma(Myx$titer, shape = params["shape"], scale =
## params["scale"], : NaNs produced
## Warning in dgamma(Myx$titer, shape = params["shape"], scale = ## params["scale"], : NaNs produced ## Warning in dgamma(Myx$titer, shape = params["shape"], scale =
## params["scale"], : NaNs produced
## Warning in dgamma(Myx$titer, shape = params["shape"], scale = ## params["scale"], : NaNs produced ## Warning in dgamma(Myx$titer, shape = params["shape"], scale =
## params["scale"], : NaNs produced
## Warning in dgamma(Myx$titer, shape = params["shape"], scale = ## params["scale"], : NaNs produced ## Warning in dgamma(Myx$titer, shape = params["shape"], scale =
## params["scale"], : NaNs produced
## Warning in dgamma(Myx$titer, shape = params["shape"], scale = ## params["scale"], : NaNs produced ## Warning in dgamma(Myx$titer, shape = params["shape"], scale =
## params["scale"], : NaNs produced
## Warning in dgamma(Myx$titer, shape = params["shape"], scale = ## params["scale"], : NaNs produced ## Warning in dgamma(Myx$titer, shape = params["shape"], scale =
## params["scale"], : NaNs produced
## Warning in dgamma(Myx$titer, shape = params["shape"], scale = ## params["scale"], : NaNs produced ## Warning in dgamma(Myx$titer, shape = params["shape"], scale =
## params["scale"], : NaNs produced
## Warning in dgamma(Myx$titer, shape = params["shape"], scale = ## params["scale"], : NaNs produced ## Warning in dgamma(Myx$titer, shape = params["shape"], scale =
## params["scale"], : NaNs produced
MLE$par ## shape scale ## 49.3666607 0.1402629 We can ignore the warnings! Let’s visualize the fit of the MLE in this case… ############## # visualize the fit hist(Myx$titer,freq=FALSE)
curve(dgamma(x,shape=MLE$par["shape"],scale=MLE$par["scale"]),add=T,col="red")
Looks pretty good…
But as dangerous ecological statisticians we aren’t satisfied with using a “black box” like the “optim()” function, we need to understand what is going on behind the scenes. Let’s write our own optimizer!
We start with the conceptually simple, often computationally impossible, brute force method…
######################
# BRUTE FORCE ALTERNATIVE
######################
##############
# define 2-D parameter space!
##############
shapevec <- seq(10,100,by=0.1)
scalevec <- seq(0.01,0.3,by=0.001)
##############
# define the likelihood surface across this grid within parameter space
##############
surface2D <- matrix(nrow=length(shapevec),ncol=length(scalevec)) # initialize storage variable
newparams <- params
for(i in 1:length(shapevec)){
newparams['shape'] <- shapevec[i]
for(j in 1:length(scalevec)){
newparams['scale'] <- scalevec[j]
surface2D[i,j] <- GammaLikelihoodFunction(newparams) # compute likelihood for every point in 2-d parameter space
}
}
############
# Visualize the likelihood surface
############
image(x=shapevec,y=scalevec,z=surface2D,zlim=c(-1000,-30),col=topo.colors(12))
contour(x=shapevec,y=scalevec,z=surface2D,levels=c(-30,-40,-80,-500),add=T)
Now what is the maximum likelihood estimate?
############
# Find the MLE
############
ndx <- which(surface2D==max(surface2D),arr.ind=T) # index of the max likelihood grid cell
shapevec[ndx[,1]]
## [1] 49.8
scalevec[ndx[,2]]
## [1] 0.139
MLE$par # compare with the answer from "optim()" ## shape scale ## 49.3666607 0.1402629 ## Derivative based methods! If we assume that the likelihood surface is smooth (differentiable) and has only one minimum, we can develop very efficient optimization algorithms. In general, derivative-based methods look for the point in parameter space where the derivative of the likelihood function is zero. That is, at the peak! Let’s imagine we are interested in determining the shape parameter, given a known scale parameter for a gamma distribution. To use derivative based methods, let’s first build a function that estimates the slope of the function at any arbtrary point in parameter space: ################### # Derivative-based optimization methods ################### ###### # function for estimating the slope of the likelihood surface at any point in parameter space.... ## NOTE: even here I'm using a coarse, brute force method for estimating the first and second derivative of the likelihood function params <- MLE$par
SlopeFunc <- function(shape_guess,tiny=0.001){
params['shape'] <- shape_guess
high <- GammaLikelihoodFunction(params+c(tiny,0))
low <- GammaLikelihoodFunction(params-c(tiny,0))
slope <- (high-low)/(tiny*2)
return(slope)
}
SlopeFunc(shape_guess=30) #try it!
## [1] 13.62666
Now let’s visualize this!
#########
# Visualize the slope of the likelihood function at different points in parameter space
shapevec <- seq(10,100,by=0.1)
##############
# define the likelihood surface
##############
surface1D <- numeric(length(shapevec)) # initialize storage variable
newparams <- params
for(i in 1:length(shapevec)){
newparams['shape'] <- shapevec[i]
surface1D[i] <- GammaLikelihoodFunction(newparams)
}
plot(surface1D~shapevec,type="l")
point <- GammaLikelihoodFunction(c(shape=30,MLE$par['scale'])) slope <- SlopeFunc(shape_guess=30) lines(c(20,40),c(point-slope*10,point+slope*10),col="red") We also need a function to compute the second derivative, or the curvature… ######## # function for estimating the curvature of the likelihood function at any point in parameter space params <- MLE$par
CurvatureFunc <- function(shape_guess,tiny=0.001){
params['shape'] <- shape_guess
high <- SlopeFunc(shape_guess+tiny)
low <- SlopeFunc(shape_guess-tiny)
curvature <- (high-low)/(tiny*2) # how much the slope is changing in this region of the function
return(curvature)
}
CurvatureFunc(shape_guess=30) # try it!
## [1] -0.9151666
Okay, now we can implement a derivative-based optimization algorithm!
Essentially, we are trying to find the point where the derivative of the likelihood function is zero (the root of the function!).
The simplest derivative-based optimization algorithm is the Newton-Raphson algorithm. Here is the pseudocode:
• pick a guess for a parameter value
• compute the derivative of the likelihood function for that guess
• compute the slope of the derivative (curvature) of the likelihood function for that guess
• Extrapolate linearly to try to find the root (where the derivative of the likelihood function should be zero if the slope of the likelihood function were linear)
• repeat until the derivative of the likelihood function is close enough to zero (within a specified tolerance)
Let’s first visualize the shape of the first derivative of the likelihood function
######
# First- visualize the gradient of the likelihood function
firstderiv <- numeric(length(shapevec)) # initialize storage variable
for(i in 1:length(shapevec)){
firstderiv[i] <- SlopeFunc(shapevec[i])
}
plot(firstderiv~shapevec,type="l")
abline(h=0,col="red")
Let’s use the Newton method to find the root of the likelihood function. First we pick a starting value. Say we pick 80.
First compute the derivatives:
#########
# Now we can perform a simple, derivative-based optimization!
### Pick "80" as the starting value
firstderiv <- SlopeFunc(80) # evaluate the first and second derivatives
secondderiv <- CurvatureFunc(80)
firstderiv
## [1] -13.13913
secondderiv
## [1] -0.3396182
Now let’s use this linear function to extrapolate to where the first derivative is equal to zero:
#########
# Use this info to estimate the root
oldguess <- 80
newguess <- oldguess - firstderiv/secondderiv # estimate the root (where first deriv is zero)
newguess
## [1] 41.31206
Our new guess is that the shape parameter is 41.31. Let’s do it again!
##########
# Repeat this process
oldguess <- 41.31
newguess <- oldguess - SlopeFunc(oldguess)/CurvatureFunc(oldguess)
newguess
## [1] 48.66339
Okay, we’re already getting close to our MLE of around 49.36. Let’s do it again:
#######
# again...
oldguess<-newguess
newguess <- oldguess - SlopeFunc(oldguess)/CurvatureFunc(oldguess)
newguess
## [1] 49.36237
And again!
#######
# again...
oldguess<-newguess
newguess <- oldguess - SlopeFunc(oldguess)/CurvatureFunc(oldguess)
newguess
## [1] 49.36746
And again!!!
#######
# again...
oldguess<-newguess
newguess <- oldguess - SlopeFunc(oldguess)/CurvatureFunc(oldguess)
newguess
## [1] 49.36746
Wow, in just a few steps we already basically found the true root. Let’s find the root for real, using an algorithm…
##########
# Implement the Newton Method as a function!
NewtonMethod <- function(firstguess,tolerance=0.0000001){
deriv <- SlopeFunc(firstguess)
oldguess <- firstguess
counter <- 0
while(abs(deriv)>tolerance){
deriv <- SlopeFunc(oldguess)
newguess <- oldguess - deriv/CurvatureFunc(oldguess)
oldguess<-newguess
counter=counter+1
}
mle <- list()
mle$estimate <- newguess mle$likelihood <- GammaLikelihoodFunction(c(shape=newguess,MLE$par['scale'])) mle$iterations <- counter
return(mle)
}
newMLE <- NewtonMethod(firstguess=80)
newMLE
## $estimate ## [1] 49.36746 ## ##$likelihood
## [1] -37.6673
##
## $iterations ## [1] 6 In just 6 steps we successfully identified the maximum likelihood estimate to within 0.0000001 of the true value! How many computations did we have to perform to use the brute force method? Hopefully this illustrates the power of optimization algorithms!! Note that this method and other derivative-based methods can work in multiple dimensions! The only constraint here is that the likelihood function is differentiable (smooth) ## Derivative-free optimization methods Derivative-free methods make no assumption about smoothness. In some ways, they represent a middle ground between the brute force method and the elegant but finnicky derivative-based methods- walking a delicate balance between simplicity and generality. ## Derivative-free method 1: simplex method This is the default opimization method for “optim()”! That means that R used this method for optimizing the fuel economy example from the previous lecture! #### Definition: Simplex A simplex is the multi-dimensional analog of the triangle. In two dimensions, the triangle is the simplest shape possible. It has just one more vertex than there are dimensions! In n dimensions, a simplex is defined by n+1 vertices. #### Pseudocode for Nelder-Mead simplex algorithm Set up an initial simplex in parameter space (often based on a user’s initial guess). NOTE: when you use the Nelder-Mead algorithm in “optim()” you only specify one initial value for each free parameter. “optim()”’s internal algorithm turns that initial guess into a simplex prior to starting the Nelder-Mead algorithm. Continue the following steps until your answer is good enough: • Start by identifying the worst vertex (the one with the lowest likelihood) • Take the worst vertex and reflect it across the center of the shape represented by the other vertices. • If the likelihood is higher for the reflected point, but not the highest of all vertices, then accept the new vertex. • If the likelihood is highest for the reflected point, increase the length of the jump! If it’s better, accept the new point. • If this jump was bad (lower likelihood) then try a point that’s only a smaller step away from the initial try. If it’s better, accept the new point. If not, accept the original reflected point. • If all reflections were worse than any other vertex, then contract the simplex around the current highest-likelihood vertex. Q: What does the simplex look like for a one-dimensional optimization problem? Q: Is this method likely to be good at avoiding false peaks in the likelihood surface? ### Example: Simplex method Step 1: Set up an initial simplex in parameter space ############# # SIMPLEX OPTIMIZATION METHOD! ############# ######## # set up an "initial" simplex firstguess <- c(shape=70,scale=0.22) # "user" first guess simplex <- list() # set up the initial simplex based on the first guess... simplex[['vertex1']] <- firstguess + c(3,0.04) simplex[['vertex2']] <- firstguess + c(-3,-0.04) simplex[['vertex3']] <- firstguess + c(3,-0.04) simplex ##$vertex1
## shape scale
## 73.00 0.26
##
## $vertex2 ## shape scale ## 67.00 0.18 ## ##$vertex3
## shape scale
## 73.00 0.18
Let’s plot the simplex…
## first let's make a function to plot the simplex on a 2-D likelihood surface...
temp <- as.data.frame(simplex) # easier to work with data frame here
points(x=temp[1,c(1,2,3,1)], y=temp[2,c(1,2,3,1)],type="b",lwd=2,col=col)
}
image(x=shapevec,y=scalevec,z=surface2D,zlim=c(-1000,-30),col=topo.colors(12))
addSimplex(simplex)
Now let’s evaluate the log likelihood at each vertex
########
# Evaluate log-likelihood at each vertex of the simplex
SimplexLik <- function(simplex){
newvec <- unlist(lapply(simplex,GammaLikelihoodFunction)) # note use of apply instead of for loop...
return(newvec)
}
SimplexLik(simplex)
## vertex1 vertex2 vertex3
## -774.3825 -271.7534 -369.1696
Now let’s develop a function (or functions as the case may be) to implement our first move through parameter space, according to the rules defined above…
#####
# Helper Functions
#####
## this function reflects the worst vertex across the remaining vector
ReflectIt <- function(oldsimplex,WorstVertex){
## re-arrange simplex- worst must be first
worstndx <- which(names(oldsimplex)==WorstVertex)
otherndx <- c(1:3)[-worstndx]
newndx <- c(worstndx,otherndx)
## translate so that vertex 1 is the origin (0,0)
oldsimplex <- oldsimplex[newndx]
translate <- oldsimplex[[1]]
newsimplex <- list(oldsimplex[[1]]-translate,oldsimplex[[2]]-translate,oldsimplex[[3]]-translate)
reflected <- c(newsimplex[[2]]["shape"]+newsimplex[[3]]["shape"],newsimplex[[2]]["scale"]+newsimplex[[3]]["scale"])
names(reflected) <- c("shape","scale")
## translate back to the likelihood surface
newsimplex[[1]] <- reflected
newsimplex <- list(newsimplex[[1]]+translate,newsimplex[[2]]+translate,newsimplex[[3]]+translate)
## return the new simplex
names(newsimplex) <- names(oldsimplex)
## generate some alternative jumps (or "oozes"!)...
oldpoint <- oldsimplex[[1]]
newpoint <- newsimplex[[1]]
newpoint2 <- newpoint-oldpoint
double <- newpoint2 * 3
half <- newpoint2 * 0.24
alternates <- list()
alternates$reflected <- newsimplex alternates$double <- newsimplex
alternates$half <- newsimplex alternates$double[[1]] <- double + oldpoint
alternates$half[[1]] <- half + oldpoint return(alternates) } ShrinkIt <- function(oldsimplex,BestVertex){ newsimplex <- oldsimplex ## indices... bestndx <- which(names(oldsimplex)==BestVertex) otherndx <- c(1:3)[-bestndx] translate <- oldsimplex[[bestndx]] i=2 for(i in otherndx){ newvector <- oldsimplex[[i]]-translate shrinkvector <- newvector * 0.5 newsimplex[[i]] <- shrinkvector + translate } return(newsimplex) } MoveTheSimplex <- function(oldsimplex){ # (incomplete) nelder-mead algorithm newsimplex <- oldsimplex # # Start by identifying the *worst* vertex (the one with the lowest likelihood) VertexLik <- SimplexLik(newsimplex) WorstLik <- min(VertexLik) BestLik <- max(VertexLik) WorstVertex <- names(VertexLik[which.min(VertexLik)]) # identify vertex with lowest likelihood candidates <- ReflectIt(oldsimplex=newsimplex,WorstVertex) # reflect across the remaining edge CandidateLik <- sapply(candidates,SimplexLik) # re-evaluate likelihood at the vertices... CandidateLik <- apply(CandidateLik,c(1,2), function(t) ifelse(is.nan(t),-99999,t)) bestCandidate <- names(which.max(CandidateLik[WorstVertex,])) bestCandidateLik <- CandidateLik[WorstVertex,bestCandidate] if(CandidateLik[WorstVertex,"reflected"]>=WorstLik){ if(CandidateLik[WorstVertex,"reflected"]>BestLik){ if(CandidateLik[WorstVertex,"double"]>CandidateLik[WorstVertex,"reflected"]){ newsimplex <- candidates[["double"]] # expansion }else{ newsimplex <- candidates[["reflected"]] } }else if(CandidateLik[WorstVertex,"half"]>CandidateLik[WorstVertex,"reflected"]){ # contraction newsimplex <- candidates[["half"]] }else{ newsimplex <- candidates[["reflected"]] } }else{ BestVertex <- names(VertexLik[which.max(VertexLik)]) newsimplex <- ShrinkIt(oldsimplex,BestVertex) } return(newsimplex) } # image(x=shapevec,y=scalevec,z=surface2D,zlim=c(-1000,-30),col=topo.colors(12)) # contour(x=shapevec,y=scalevec,z=surface2D,levels=c(-30,-40,-80,-500),add=T) # addSimplex(oldsimplex,col="red") # addSimplex(candidates$reflected,col="green")
# addSimplex(candidates$half,col="green") ########### # Visualize the simplex oldsimplex <- simplex newsimplex <- MoveTheSimplex(oldsimplex) ## Warning in dgamma(Myx$titer, shape = params["shape"], scale =
## params["scale"], : NaNs produced
image(x=shapevec,y=scalevec,z=surface2D,zlim=c(-1000,-30),col=topo.colors(12))
addSimplex(newsimplex)
Let’s try another few moves
############
# Make another move
oldsimplex <- newsimplex
newsimplex <- MoveTheSimplex(oldsimplex)
## Warning in dgamma(Myx$titer, shape = params["shape"], scale = ## params["scale"], : NaNs produced image(x=shapevec,y=scalevec,z=surface2D,zlim=c(-1000,-30),col=topo.colors(12)) contour(x=shapevec,y=scalevec,z=surface2D,levels=c(-30,-40,-80,-500),add=T) addSimplex(oldsimplex,col="red") addSimplex(newsimplex) And again! ############ # Make another move oldsimplex <- newsimplex newsimplex <- MoveTheSimplex(oldsimplex) ## Warning in dgamma(Myx$titer, shape = params["shape"], scale =
## params["scale"], : NaNs produced
image(x=shapevec,y=scalevec,z=surface2D,zlim=c(-1000,-30),col=topo.colors(12))
addSimplex(newsimplex)
Again:
############
# Make another move
oldsimplex <- newsimplex
newsimplex <- MoveTheSimplex(oldsimplex)
## Warning in dgamma(Myx$titer, shape = params["shape"], scale = ## params["scale"], : NaNs produced image(x=shapevec,y=scalevec,z=surface2D,zlim=c(-1000,-30),col=topo.colors(12)) contour(x=shapevec,y=scalevec,z=surface2D,levels=c(-30,-40,-80,-500),add=T) addSimplex(oldsimplex,col="red") addSimplex(newsimplex) And another few times: ############ # Make another few moves par(mfrow=c(2,2)) for(i in 1:4){ oldsimplex <- newsimplex newsimplex <- MoveTheSimplex(oldsimplex) image(x=shapevec,y=scalevec,z=surface2D,zlim=c(-1000,-30),col=topo.colors(12)) contour(x=shapevec,y=scalevec,z=surface2D,levels=c(-30,-40,-80,-500),add=T) addSimplex(oldsimplex,col="red") addSimplex(newsimplex) } ## Warning in dgamma(Myx$titer, shape = params["shape"], scale =
## params["scale"], : NaNs produced
Now we can build a function and use the algorithm for optimizing!
############
# Build a simplex optimization function!
SimplexMethod <- function(firstguess,tolerance=0.00001){
initsimplex <- list()
initsimplex[['vertex1']] <- firstguess + c(5,0.05)
initsimplex[['vertex2']] <- firstguess + c(-5,-0.05)
initsimplex[['vertex3']] <- firstguess + c(5,-0.05)
VertexLik <- SimplexLik(initsimplex)
oldbestlik <- VertexLik[which.max(VertexLik)]
deltalik <- 100
counter <- 0
while(counter<100){
newsimplex <- MoveTheSimplex(oldsimplex)
VertexLik <- SimplexLik(newsimplex)
bestlik <- VertexLik[which.max(VertexLik)]
deltalik <- bestlik-oldbestlik
oldsimplex <- newsimplex
oldbestlik <- bestlik
counter <- counter+1
}
mle <- list()
mle$estimate <- newsimplex[[1]] mle$likelihood <- bestlik
mle$iterations <- counter return(mle) } SimplexMethod(firstguess = c(shape=39,scale=0.28)) ##$estimate
## shape scale
## 49.611453 0.139566
##
## $likelihood ## vertex2 ## -37.66714 ## ##$iterations
## [1] 100
Okay, it’s close but doesn’t seem to be optimizing very well compared with the other methods. I probably didn’t implement it perfectly yet!
I like to call this the “amoeba” method of optimization??
In general, the simplex-based methods are less efficient than the derivative-based methods at finding the MLE- especially as you near the MLE.
## Derivative-free method 2: simulated annealing (SE).
Simulated annealing is one of my favorite optimization techniques. I think it serves as a good metaphor for problem-solving in general. When solving a problem, the first step is to think big, try to imagine whether we might be missing possible solutions. Then we settle (focus) on a general solution, learn more about how that solution applies to our problem, and ultimately get it done!
The temperature analogy is fun too! We start out “hot”- unfocused, frenzied, bouncing around - and we end up “cold” - crystal clear and focused on a solution!
### SE: A “global” optimization solution
Simulated annealing is called a “global” optimization solution because it can deal with false peaks and other strangenesses that can arise in optimization problems (e.g., maximizing likelihood). The price is in reduced efficiency!
#### Pseudocode for the Metropolis simulated annealing routine
Pick an initial starting point and evaluate the likelihood.
• Pick a new point at random near your old point and compute the (log) likelihood
• If the new value is better, accept it and start again
• If the new value is worse, then
- Pick a random number between zero and 1
- Accept the new (worse) value anyway if the random number is less than exp(change in log likelihood/k). Otherwise, go back to the previous value
• Periodically (e.g. every 100 iterations) lower the value of k to make it harder to accept bad moves. Eventually, the algorithm will “settle down” on a particular point in parameter space.
A simulated annealing method is available in the “optim” function in R (method = “SANN”)
### Example: Simulated annealing!
Let’s use the same familiar myxomatosis example!
################
# Simulated annealing!
startingvals <- c(shape=80,scale=0.15)
startinglik <- GammaLikelihoodFunction(startingvals)
startinglik
## [1] -313.6188
k = 100 # set the "temperature"
# function for making new guesses
newGuess <- function(oldguess=startingvals){
maxshapejump <- 5
maxscalejump <- 0.05
jump <- c(runif(1,-maxshapejump,maxshapejump),runif(1,-maxscalejump,maxscalejump))
newguess <- oldguess + jump
return(newguess)
}
# set a new "guess" near to the original guess
newGuess(oldguess=startingvals) # each time is different- this is the first optimization procedure with randomness built in
## shape scale
## 84.7860456 0.1919917
newGuess(oldguess=startingvals)
## shape scale
## 76.0861265 0.1601342
newGuess(oldguess=startingvals)
## shape scale
## 77.1531882 0.1557441
Now let’s evaluate the difference in likelihood between the old and the new guess…
############
# evaluate the difference in likelihood between the new proposal and the old point
LikDif <- function(oldguess,newguess){
oldLik <- GammaLikelihoodFunction(oldguess)
newLik <- GammaLikelihoodFunction(newguess)
return(newLik-oldLik)
}
newguess <- newGuess(oldguess=startingvals)
loglikdif <- LikDif(oldguess=startingvals,newguess)
loglikdif
## [1] -101.854
Now let’s look at the Metropolis routine:
############
# run and visualize a Metropolis routine
k <- 100
oldguess <- startingvals
counter <- 0
guesses <- matrix(0,nrow=100,ncol=2)
colnames(guesses) <- names(startingvals)
while(counter<100){
newguess <- newGuess(oldguess)
loglikdif <- LikDif(oldguess,newguess)
if(loglikdif>0){
oldguess <- newguess
}else{
rand=runif(1)
if(rand <= exp(loglikdif/k)){
oldguess <- newguess # accept even if worse!
}
}
counter <- counter + 1
guesses[counter,] <- oldguess
}
# visualize!
image(x=shapevec,y=scalevec,z=surface2D,zlim=c(-1000,-30),col=topo.colors(12))
lines(guesses,col="red")
Clearly this is the most inefficient, brute-force method we have seen so far (aside from the actual brute force method). And also quite clearly, in the context of this class, the best and most fun (and dangerous!).
NOTE: simulated annealing is way more efficient than the brute force method we saw earlier, especially with multiple dimensions!
Let’s run it for longer, and with a smaller value of k..
###########
# Run it for longer!
k <- 10
oldguess <- startingvals
counter <- 0
guesses <- matrix(0,nrow=1000,ncol=2)
colnames(guesses) <- names(startingvals)
while(counter<1000){
newguess <- newGuess(oldguess)
loglikdif <- LikDif(oldguess,newguess)
if(loglikdif>0){
oldguess <- newguess
}else{
rand=runif(1)
if(rand <= exp(loglikdif/k)){
oldguess <- newguess # accept even if worse!
}
}
counter <- counter + 1
guesses[counter,] <- oldguess
}
# visualize!
image(x=shapevec,y=scalevec,z=surface2D,zlim=c(-1000,-30),col=topo.colors(12))
lines(guesses,col="red")
This looks better! The search algorithm is finding the high-likelihood parts of parameter space pretty well!
Now let’s “cool” the temperature over time, let the algorithm settle down on a likelihood peak
#############
# cool the "temperature" over time and let the algorithm settle down
k <- 100
oldguess <- startingvals
counter <- 0
guesses <- matrix(0,nrow=10000,ncol=2)
colnames(guesses) <- names(startingvals)
MLE <- list(vals=startingvals,lik=GammaLikelihoodFunction(startingvals),step=0)
while(counter<10000){
newguess <- newGuess(oldguess)
loglikdif <- LikDif(oldguess,newguess)
if(loglikdif>0){
oldguess <- newguess
}else{
rand=runif(1)
if(rand <= exp(loglikdif/k)){
oldguess <- newguess # accept even if worse!
}
}
counter <- counter + 1
if(counter%%100==0) k <- k*0.8
guesses[counter,] <- oldguess
thislik <- GammaLikelihoodFunction(oldguess)
if(thislik>MLE$lik) MLE <- list(vals=oldguess,lik=GammaLikelihoodFunction(oldguess),step=counter) } # visualize! image(x=shapevec,y=scalevec,z=surface2D,zlim=c(-1000,-30),col=topo.colors(12)) contour(x=shapevec,y=scalevec,z=surface2D,levels=c(-30,-40,-80,-500),add=T) lines(guesses,col="red") points(MLE$vals[1],MLE$vals[2],col="green",pch=20,cex=3) MLE ##$vals
## shape scale
## 49.7993557 0.1389658
##
## $lik ## [1] -37.66742 ## ##$step
## [1] 9200
As you can see, the simulated annealing method did pretty well. However, we needed thousands of iterations to do what other methods just take a few iterations to do. But, we might feel better that we have explored parameter space more thoroughly and avoided the potential problem of false peaks (although there’s no guarantee that the simulated annealing method will find the true MLE).
## Other methods
As you can see, there are many ways to optimize- and the optimal optimization routine is not always obvious!
You can probably use some creative thinking and imagine your own optimization algorithm… For example, some have suggested combining the simplex method with the simulated annealing method! Optimization is an art!!
## What about the confidence interval??
As you can see in the previous examples, most of the optimization techniques we have looked at do not explore parameter space enough to discern the shape of the likelihood surface around the maximum likelihood estimate. Therefore, we do not have the information we need to compute the confidence intervals around our parameter estimates. And what good is a point estimate without a corresponding estimate of uncertainty??
There are several techniques that are widely used to estimate and describe parameter uncertainty:
1. Brute force (expose the entire likelihood surface!) [okay, this one isn’t actually used very often]
2. Profile likelihood (the most accurate way!)
3. Evaluate curvature at the MLE and use that to estimate sampling error (somewhat inexact but efficient- but generally performs pretty well, and is the default for many MLE routines!)
–go to next lecture– |
# Appendix: mathematical formulae
1. Students are expected to know the following formulae included in the subject content; they will not be given in the exam. Refer to the Subject content section to determine the tier at which these formulae could be used.
The solutions of , where
Circumference and area of a circle
Where is the radius and is the diameter:
Circumference of a circle = =
Area of a circle =
Pythagoras’ theorem
In any right-angled triangle where , and are lengths of the sides and is the hypotenuse:
Trigonometry formulae
In any right-angled triangle where , and are lengths of the sides and is the hypotenuse:
, ,
In any triangle where , and are lengths of the sides:
sine rule:
cosine rule:
Area =
2. Students are expected to know the following formulae or be able to derive them; they will not be given in the exam. Refer to the Subject content section to determine the tier at which these formulae could be used.
Perimeter, area, surface area and volume formulae
Where and are the lengths of the parallel sides and is their perpendicular separation:
Area of a trapezium =
Volume of a prism = area of cross section x length
Compound interest
Where is the principal amount, is the interest rate over a given period and is number of times that the interest is compounded:
Total accrued =
Probability
Where is the probability of outcome and is the probability of outcome :
3. Students are not expected to memorise the following formulae; they will be given in the exam in the relevant question. Refer to the Subject content section to determine the tier at which these formulae could be used.
Perimeter, area, surface area and volume formulae
Where is the radius of the sphere or cone, is the slant height of a cone and is the perpendicular height of a cone:
Curved surface area of a cone =
Surface area of a sphere =
Volume of a sphere =
Volume of a cone =
Kinematics formulae
Where is constant acceleration, is initial velocity, is final velocity, is displacement from the position when and is time taken: |
# What should be the correct scaling for PSD calculation using $\tt fft$
I would to calculate the PSD of a signal using FFT however the result do not match with periodogram command. What did was as follow :
len=length(signal);
NFFT=2^10;
signal_fft=fftshift(fft(signal,NFFT));
px=signal_fft.*conj(signal_fft)/(NFFT*len);
f=-[NFFT/2:NFFT/2-1]/NFFT*Fs;
plot(f,px);
However I am wondering :
Should I use Fs instead of NFFT in the denominator for calculation signal_fft? Since most websites mentioned it should be Fs, but according to this link the number of FFT points are used. However NFFT makes more sense since that is number of points I have.
The reason is that if I take 1024 point FFT the resolution is different from $2^{20}$ points FFT so NFFT should be used somewhere to adjust for this change.
• Duplicate of what ? I read the forum, no question is exactly like this. I am asking for more clarification about calculating PSD. – justin Jul 19 '16 at 14:53
• Duplicate of post linked at the top of this question. – jojek Jul 19 '16 at 14:59
• I understand I am the reading the post right now. But in my question I am referring to something else I added the link that I was referring to and what was used in that website to calculate psd. I need to see if somebody can explain about that. I am asking if I have N points FFT should I normalize the psd by NFFT or by Fs. – justin Jul 19 '16 at 15:05
• You never normalize by sampling frequency. If you don't do any windowing, then it is very straightforward. Otherwise please see answer 1 and answer 2. – jojek Jul 19 '16 at 15:17
• Thanks no I am not using any windowing. However in your duplicate link you posted as well as Mathwork website it mentioned that psd should be scaled by Fs X length(signal) however in this website gaussianwaves.com/2014/07/… it says it should be scaled by number of FFT points X length of signal. – justin Jul 19 '16 at 15:22
There is only one correct way of scaling DFT when calculating PSD with RMS values. Given input signal $x$ and its DFT $X$, the exact formula is:
$$\mathrm{PSD}=\frac{2\cdot \hat{X}}{f_s\cdot S}$$
where:
$\hat{X}=|X|^2=X\cdot X^*$ - squared spectrum magnitude
$S=\sum_{i=1}^{N} w_{i}^{2}$ - scaling factor defined as sum of squared samples of window function
$f_s$ - sampling frequency
Scaling coefficient $2$ takes into account removal of energy at negative frequencies (we drop this side of PSD).
Sampling frequency $f_s$ happens to be in the equation since it is a part of the Effective Noise Bandwidth, and PSD is simply PS (Power Spectrum) divided by ENBW. So in the end, the unit of PSD is $x^2/\mathrm{Hz}$, where $x$ is the quantity that you want to measure, i.e. Volts.
Scaling factor $S$ is compensating for any loss of energy when applying a window function. Obviously for rectangular window (or no window in fact) this doesn't change anything and one, might simply use $N$ instead (length of input sequence).
You did also mention that you were planning to use high number of DFT points ($2^{20}$) since it "makes more sense". Well, it doesn't. If your input sequence has length $N$ (assume 1024), then you can't get better frequency resolution than:
$$\Delta f = \frac{f_s}{1024}$$
Even if you increase number of DFT points to $2^{20}$ by zero-padding, those spectral samples in between will be only interpolated window spectrum - useless garbage. For more detailed explanation please see my other answer.
Another thing to remember. Zero-padding doesn't change the scaling factor! Samples are added after the input sequence had been multiplied by the window, hence the total energy will not change.
Since you wanted to match the calculation with MATLAB's periodogram function, here comes the code. It is a modified version of this one. I tried to comment the code.
% Parameters and signal
Fs = 1000;
dt = 1/Fs;
t = 0:dt:1-dt;
x = cos(2*pi*100*t)';
N = length(x);
% Add a bit of noise
x = x + 0.001*randn(N, 1);
% Use window function of your choice. Rectangular window means no window.
win = rectwin(N);
% The actual number of points used when calculating the DFT might be higher
% this can help in speeding up the computation (next power of 2), but won't
% increase the frequency resolution (only frequency spacing is affected).
% See: https://dsp.stackexchange.com/a/32161/8202
NFFT = N; % N=2^20
xw = x.*win; % Apply windowing here (periodogram does it on it's own)
xdft = fft(xw, NFFT);
psdx = xdft.*conj(xdft); % psdx = abs(xdft).^2
psdx = psdx(1:NFFT/2+1); % Take only first half of the PSD
% Calculate the scaling factor.
% Note that in case of rectangular window this is simply N.
S = sum(win.^2);
psdx = (2/(Fs*S)) * psdx;
freq = 0:Fs/NFFT:Fs/2;
% Calculate the corresponding PSD using MATLAB's in-built
[pxx, ~] = periodogram(x, rectwin(N), NFFT, Fs);
% Plot the PSD's
plot(freq, 10*log10(psdx), 'r')
grid on
hold on
plot(freq, 10*log10(pxx), 'b--')
title('PSD calculation comparison')
xlabel('Frequency [Hz]')
ylabel('Power/Frequency [dB/Hz]')
legend({'DFT', 'periodogram'})
% Plot error between PSD's
figure
diff = pxx - psdx;
plot(freq, diff)
grid on
xlabel('Frequency [Hz]')
ylabel('Difference')
title('Difference between PSDs')
Please note the perfect match between both PSD's:
And here is the difference:
Probably you can notice that there is a bigger error for 1'st and last bin (Nyquist in fact). That is because we multiplied all frequency bins by scaling factor $2$ to compensate for negative frequencies. This shouldn't be done for DC component (1'st bin) and for Nyquist bin (if it's present) - both of them are unique.
But in a real life, Nyquist bin will be removed by anti-aliasing filter and people will remove mean from the signal anyway. Also DC scaling for RMS values is pointless, especially when doing windowing.
• if you increase N (i.e. take more number of samples) the power of peak doesn't remain same. How do you explain that? – reluctant_programmer May 14 '18 at 16:00
• @reluctant_programmer: Where exactly are you changing the N? – jojek May 14 '18 at 16:45
• If you change the line NFFT = N to NFFT = 2^20 then you will get the exact same peak at -3dB. You must be doing something wrong. – jojek May 14 '18 at 17:24
I'll try to explain how one arrives at the correct scaling factor. In order to keep things simple I will assume a rectangular window. Other windows can be taken into account by an additional factor that is determined by the window weights (as shown in jojek's answer).
The periodogram for estimating the power spectral density (PSD) of a signal $x(t)$ is given by
$$P_x(f)=\frac{1}{T}\left|\int_0^Tx(t)e^{-j2\pi ft}dt\right|^2\tag{1}$$
Using samples $x[n]:= x(nT_s)$, $n=0,1,\ldots,N-1$, and approximating the integral in $(1)$ by a sum, we get
$$P_x(f)\approx \frac{1}{NT_s}\left|\sum_{n=0}^{N-1}x[n]e^{-j2\pi fnT_s}\cdot T_s\right|^2=\frac{T_s}{N}\left|\sum_{n=0}^{N-1}x[n]e^{-j2\pi fnT_s}\right|^2\tag{2}$$
Evaluating $(2)$ at equidistant frequencies $f_k=kf_s/K$, $k=0,1,\ldots K-1$, with $f_s=1/T_s$, and $K\ge N$ gives
$$P_x\left(\frac{kf_s}{K}\right)\approx \frac{T_s}{N}\left|\sum_{n=0}^{N-1}x[n]e^{-j2\pi kn/K}\right|^2=\frac{T_s}{N}\left|X[k]\right|^2\tag{3}$$
where $X[k]$ is the length $K$ DFT of the length $N$ sequence $x[n]$, where $x[n]$ is zero-padded to length $K$ if $K>N$.
Eq. $(3)$ shows that the correct scaling factor is $T_s/N$ (for a rectangular window), and for the two-sided PSD. For the one-sided PSD you just need to add a factor of $2$, except for DC and Nyquist. Furthermore, the scaling factor is independent of the DFT size $K$, but it only depends on the number of time domain samples $N$. |
For our third class in Algebra II honors, I wanted to talk about all the different forms of lines that students know. Many of my students have already encountered both point-slope form and the general form of a line, but I suspected that they didn’t see the connections between the various forms, and so that’s where I tried to place some emphasis. What follows is my amalgamation of the lesson on this topic I presented to two different classes.
## Introducing point slope form
I started by using the awesome graphing calculator Desmos to project a point on the board and ask students to write the equation of the line, given a point and a slope.
My students approached this in two ways, which they shared by showing their work with the Hovercam document camera connected to a 30′ cord so that we can pass the camera around to show anyone’s work.
One student simply plugged the given point into slope intercept form and then solved for the y-intercept.
But a second student mentioned point slope form, and was able to instantly write the equation using point slope form, which most of the class had seen.
At that point, I asked them how the following two ideas were connected
$y=mx+b$
and
$y=m(x-x_1)+y_1$
Expanding the first term in the second equation gives us:
$y=mx-mx_1+y_1$
and this will be equivalent to the the slope intercept form if $b=-mx_1+y_1$.
I then asked students to think about how this could work—what do each of the symbols in this equation mean:
$b$: y-intercept
$m$: m
$x_1$: x coordinate of given point
$y_1$: y coordinate of given point
How could it be that the y-intercept is equal to the negative slope times the x-coordinate of the point plus the y coordinate of the point?
It helped to look at a graph:
After some thinking, students were able to explain that all the y intercept is is the y coordinate of the given point plus how much the y coordinate changes when you move over a distance $x_1$ to the y-axis.
From there I showed students a second way of looking at point slope starting with the definition of slope:
$m=\frac{y-y_1}{x-x_1}$
and a simple rearrangement will give
$y-y1=m(x-x_1)$ or $y=m(x-x_1)+y_1$
## General and Standard form
Most students had send standard form before, and quickly spouted it off as
$Ax+By=C$ and it wasn’t until I wikipedia’d it, that I found out there was a difference between that and Standard form $Ax+By+C=0$. Thankfully, I didn’t know this when I taught the lesson and therefore couldn’t bother my students with such details.
Instead I asked them why we had this additional form, and what it was good for. Some students remembered it made finding intercepts easy, so we tried that, and then I asked them to figure out the meaning of the $A,\; B \textrm{and}\; C$ terms, which they were quickly able to do.
## x-intercept form
At this point, I said that I think the x-intercept doesn’t get enough love, and we should try to write an equation for a line, given the x-intercept and the slope, and asked students to set out to do this.
This turned out to be a very difficult question. No students thought to use point slope. Some went back to the tried and true effort of plugging in the x-intercept into $y=mx+b$ and solving for b, and one student tried the approach of swapping the x and the y, and then solving for y. When we graphed this effort, we saw pretty clearly that this line wash’t the line we were looking for, but that student continued to play with the calculation, and stumbled upon the discovery that if you inverted the slope and you then figured out what you needed to multiply the inverted slope by to get the x-intercept, you could write the equation. This was our first awkward foray into inverting equations.
Eventually though, we got back to point slope form
$y=m(x-x1)+y1$
where $(x1,y1)=(x_{int},0)$
so $y=m(x-x_{int})$
and if you expand the right hand side, you get:
$y=mx-mx_{int}$, which is equivalent to slope intercept form if $b=-mx_{int}$, and that brings us full circle back to the beginning to realize that slope tells us how much the y value increases for every unit of change in the x value, and if you are at a y value of 0 (the x-intercept) and move over $x_{int}$ units, then you should also be changing your y-value by $-mx_{int}$, with the negative to remind us that the you are calculating a change in x position, and the final x position (the y-intercept), is 0, so $\Delta x=x_f-x_i=0-x_{int}$.
## How this looks for real
Here is how this all looked this past Saturday. I filmed my class and posted the footage below:
I would greatly appreciate any feedback you have.
## Closing thoughts
Overall, I think this lesson met a goal of helping students see how all of the various forms for writing linear equations are connected, and how each of them has a raison d’être. You can see this pretty clearly in the tweets I asked the second section to write today 20 minutes into class, responding to the question what are you learning now:
Learning the value of knowing different formats to write equations for lines
Expanding on linear equation formulas
Learning different uses of general, point slope, and y-intercept forms of lines
We are learning about the various merits of point-slope, slope-intercept, and standard form
So many ways to make linear equations, each is better for something #prosandcons
All parts of the diff forms of equations relate back to one another #mathisntrandom
The different linear equations for lines allows us to find variables quickly
Linear equations—point slope form, slope intercept form, and standard/general form #coolstuff
By far my favorite is the one we tweeted as a class, “Equations are made, not memorized.”
At the same time, I’m concerned about a number of things in this lesson. All of this seems pretty abstract—I’m interested in how general form is related to point slope, and the meaning of the A’s and B’s, but I doubt my students are.
I also felt like this was a lesson where I did a lot of talking and guiding, and students didn’t do much in the way of practice. Maybe this is ok because this material is review; I’ll know better after tomorrow when I finish grading their first assessments, but I definitely am thinking I’m going to need to find a better way to incorporate more practice, as opposed to problem solving, into our routine. |
Q
# A conical tent is 10 m high and the radius of its base is 24 m. Find (ii) cost of the canvas required to make the tent, if the cost of 1 m square canvas is Rs 70.
Q : 4 A conical tent is 10 m high and the radius of its base is 24 m. Find
(ii) cost of the canvas required to make the tent, if the cost of $\small 1\hspace{1mm}m^2$ canvas is Rs 70.
Views
Given,
Base radius of the conical tent = $r=24\ m$
Height of the conical tent = $h=10\ m$
$\therefore$ Slant height = $l=\sqrt{h^2+r^2} = 26\ m$
We know, Curved surface area of a cone $= \pi r l$
$\therefore$ Curved surface area of the tent
$\\ = \frac{22}{7}\times24\times26 \\ \\ =\frac{13728}{7}\ m^2$
Cost of $1\ m^2$ of canvas = $Rs.\ 70$
$\therefore$ Cost of $\frac{13728}{7}\ m^2$ of canvas =
$Rs.\ (\frac{13728}{7}\times70) = Rs.\ 137280$
Therefore, required cost of canvas to make tent is $Rs.\ 137280$
Exams
Articles
Questions |
# What does it mean by a nonrenormalizable operator being induced in a Lagrangian?
I have heard that nonrenormalizable operators (i.e., mass dimension greater than 4) can be "induced" in the Lagrangian (that we started with) via loop effects. However, I do not understand what does it mean by a new operator or term in the Lagrangian being induced.
In QED, loops generally correspond to self-energy diagrams, vacuum polarization diagrams and vertex correction diagrams which modify the bare mass, bare charge, and bare fields to the corresponding renormalized quantities by adding counterterms (or by splitting the original Lagrangian into a renormalized part and a counterterm part). Counterterms must be included, as I understand, to get rid of various divergences (or cut-off dependence).
$\bullet$ But why should one include nonrenormalizable terms in the original Lagrangian (in which none of the terms did resemble the induced operator)?
$\bullet$ Can they be thought of as counnterterms?
$\bullet$ How many of them can/should be included?
$\bullet$ Can one clarify the concept inducing non-renormalizable operators in the context of a simple field theory?
In the Wilsonian viewpoint, every QFT is defined as an effective theory with an intrinsic momentum cutoff $\Lambda_0$. Renormalizing the theory corresponds to lowering this cutoff by integrating out the Fourier modes of the fields above the new cutoff $\Lambda$ in the path integral. It turns out that, if you (formally) compute this integral, that the result is a new partition function which looks like the partition function for a different action, the Wilsonian effective action, and that it includes all terms not forbidden by symmetry no matter their renormalizability. Effectively, you should think of this as the original action including all those terms with a coupling constant of 0, and when renormalizing by lowering the scale towards the infrared cutoff, they start to appear again because the coupling gets renormalized away from 0 unless protected by symmetry.
An illustrative example of how non-renormalizable terms can appear in the infrared is the Fermi theory of beta decay, which has a non-renormalizable interaction part $\propto \bar\psi_p\psi_n\bar\psi_e\psi_\nu$ where $n,p,e,\nu$ denote the spinor field of the proton, neutron, electron and neutrino, respectively. This theory is amazingly predictive in the low-energy regime, but this is just an effective vertex one gets from integrating out the weak interaction - in the full Standard model, this four-fermion vertex is resolved into the fermions interacting not directly, but via vertices involving W- and Z-bosons of the weak interaction.
• @SRS String theory is not an effective field theory, but it's also not a quantum field theory. It's not true that every QFT must be effective, for instance, (some) conformal field theories are fixed point in the UV, and you can effectively lift the cutoff to $\infty$. – ACuriousMind Nov 17 '16 at 15:55 |
# Derivatives of function with 20 variables with respect to each variable
I want to find the derivative of a function with 20 variables and arrange it in a 20 by 1 vector.
Si[a,b,c,d,.....20 variables] is a function. Is there a simple command to find the first derivative of each variable and arrange it in a 20 by 1 vector as follows
{D[Si,a],D[Si,b],....D[si,t]}
Similarly, I want to find the second derivative and arrange it in a 20 by 20 matrix as follows
{{D[D[Si, a], a], D[D[Si, a], b], ... .. D[D[Si, a], t]}, {D[D[Si, b], a],D[D[Si, b], b], ... .. D[D[Si, b], t]}, ... ... ...., {D[D[Si, t], D[D[Si, t], b], ....D[D[Si, t], t]}}
args = Array[x, 20];
D[f @@ args, {args, 1}]
D[f @@ args, {args, 2}]
• +1 More generally, for any non-negative integer m: D[f @@ args, {args, m}] == Nest[D[#, {args}] &, f @@ args, m] – Bob Hanlon Dec 11 '19 at 15:56
first ,let's creat a funtion
si = Si @@ (ToExpression /@ Alphabet[])
then you just need this
Defer@D[si, #] & /@ (ToExpression /@ Alphabet[]) |
# Homework Help: Finding Max Velocity For Simple Harmonic Spring problem?
1. Aug 31, 2014
### hongiddong
1. The problem statement, all variables and given/known data
A 100kg bungee jumper attached to a bungee cord jumps off a bridge. The bungee cord stretches and the man reaches the lowest spot in his descent before beginning to rise. The force of the stretched bungee cord can be approximated using Hooke's law, where the value of the spring constant is replaced by an elasticity constant, in this case, 100kg/s^2. If the cord is stretched by 30m at the lowest spot of the man's descent, then what is the man's highest velocity as he goes back up to equilibrium of the spring?
2. Relevant equations
I know that total work is = kinetic energy final - kinetic energy inital. I also know that Potential energy = 1/2kA^2 or amplitude^2 or amount stretched x^2.
Lastly, Potential Energy max = Kinetic Energy Max(since all the potential energy gets transfered)
1. I was wondering if we were able to just use the potential energy max equation for a simple harmonic spring to find the max velocity?
2. If they gave us the total distance from where the man was standing to the lowest point the man fell, would this potential energy (mgh) be different from the springs potential energy?
A: I think it would, because this is now talking about mechanical energy in the system, vs the energy of the spring.
hmm
3. The attempt at a solution
Last edited: Aug 31, 2014
2. Aug 31, 2014
### shangriphysics
I believe that you are correct. You can find the kinetic energy with the potential energy equation. The total mechanical energy is not related to the potential energy found in a spring.
3. Aug 31, 2014
### haruspex
Be careful assuming everything is SHM. A bungee cord cannot produce a force under compression.
Consider the moment at which the cord first becomes taut. Does the jumper have KE then? Will the jumper return to that vertical position? If so, what will happen next?
4. Sep 1, 2014
### BvU
How many forms of energy are involved ? The information you have connects two of them at the lowest point, which gives you what you wanted under 2.
Then: what is the mathematical way to express some variable is at a maximum ? Where does that happen if you know weight and elasticity constant ?
Oh, and: draw a few diagrams of the various energies, position, velocity and acceleration as a function of time. Quantitatively at first. Check and correct; make them quantitative.
5. Sep 1, 2014
### hongiddong
I thought since they gave us k and x, we know the amplitude of the string from it's equilibrium point. With that I think we can find the potential energy = 1/2KA^2. Therefore, the max Kinetic Energy = max potential energy. However, there is the force of gravity... I am really confused now.
But just to be clear, total mechanic energy is unrelated to the potential energy you can find "in" the spring?
6. Sep 1, 2014
### BvU
I would say no. Total mechanical energy is very much related to the energy in the cord (spring). Jumper gathers speed until the cord is taut, and a little bit longer. Namely until the cord and the graviational pull are equal. At that point the (downward) acceleration is zero, meaning the velocity is at an extreme (remember that for later on!). That's the mathematical tidbit I was hinting at. But since speed is non-zero, stretching of the cord continues until v = 0: the bottoming out. At that point, there is no kinetic energy. All potential energy from the gravity field has been converted to stretching energy. You have the right equation there, so why not show some work: ${1\over 2}kx^2 = ??$. Pick a reference point for the potential energy due to gravity.
Now think what happens after the bottoming out: cord pulls bloke (or lady) up with considerable force, while gravity is pulling the other way. Hence acceleration. Upward speed increases until acceleration = ?? And when (/where) is that, precisely ? That's all they want to know ! (well, you still have to convert the energy into speed, but that's easy).
I'm giving away far too much. Sorry, PF keepers... Must admit I had great fun following my own instructions drawing the diagrams. Used an equation solver at work. Beautiful.
7. Sep 1, 2014
### hongiddong
1/2KA^2 =1500J. The upward speed will increase until acceleration is zero. Which is at the max height as the lady goes back up. And the velocity as the lady goes back up from the lowest point to the point of equilibrium for the chord is = Square root of ((2*1500)/100)) = 5.477m/s. And eventually this velocity goes to zero due to the force of gravity, and then the woman comes down with the force of gravity.
Btw, I sort of changed this problem from my book, therefore, it might not have all the necessary variables to be able to figure this problem out. It normally asked for the acceleration at the lowest point. Which was Fspring+force of gravity = ma. Which was F=-kx (3000N) and Fg=mg.(1000N) The answer I got is, 20m/s^2.
Perhaps I need to use total conservation of mechanical energy. Kei + Pei = kef + Pef. Kei at the top of the bridge is 0, and the potential energy is mg(some height that i need to add) = Pef is zero, and kinetic energy final is the velocity right before the woman reaches her lowest point.
Thanks BvU for helping me out! I am just trying to understand this concept better!
8. Sep 2, 2014
### BvU
Oops, oops, oops. It clearly says the cord stretches 30 m. K is 100. So a lot more Joules of spring energy on my prehistoric calculator.
Then: acceleration zero marks the extremum of the speed. That's right. There is no law that says "which is at the max height ...". (On the contrary: a max height is where the speed is zero ! That's what you should pick up from all my blabla!). Fortunately friend Newton has left us a law that links Force and acceleration. One zero, the other zero. And where please, is the point where the forces cancel ? (Think long term, when the bouncing up and down is over and the victim is hanging upside down without any more motion).
Next: Eventually... can be a bit misleading. Could well be you understand the whole thing now, just that the wording leaves me in doubt.
Have you picked a reference point for the potential energy from gravity yet ? Apparently the bridge. Fine with me. I think we can even make do without working out the length of the cord (i.e. the total plunge height difference minus 30 m). That's for later post. Have to go to work...
Sounds good if g = 10 m/s2. You do have all the info you need to solve all of this.
9. Sep 5, 2014
### hongiddong
The forces are in opposite direction as the string is stretched down, because the restoring force is pointing back up and the gravitational force is pointing down. However, the restoring force is stronger than the force of gravity. Therefore, we get an upward acceleration of 20m/s^2.
OOOO, I think I am seeing it. There is a difference between the kinetic energy of the spring, and total kinetic energy of the system. However, in certain situations, the total kinetic energy can equal to just the spring when the only force that is acting on the spring is the restoring force of the spring.
Yet, In our scenario, we have two forces acting on the spring. If we knew the height of the bridge and the height of the string before it stretched we could find the Kinetic Energy there. (That is where Force restore -Force of gravity = ma(zero). As the lady falls right before the spring stretches that is also where our other highest velocity is at. But as the string starts to stretch the velocity goes to zero. We can have two kinetic energies. One, using the total mechanic energy with mg(h=the height before it stretches)=kinetic energy, and the other, using the kinetic energy of the spring, the lady goes back up from the lowest stretching point to the point of spring equilibrium for the chord is = Square root of ((2*1500)/100)) = 5.477m/s. Therefore, we can have two speeds. Hmmm, I don't see how the kinetic energy of the spring, is not hampered as it goes up do to the force of gravity. I can see the spring reaching it's max potential energy based on the stretch, but as the lady goes back up, I do not see that system achieving the equal magnitude of the potential energy because of the force of gravity.
I might be wrong about where the forces cancel out. It might be that none of the forces cancel each other out. Because at the bottom, we have restoring force, and at the top we have gravity force. Maybe somewhere in between.
Dang it! I feel mentally strained! Thank you for bearing with me BvU! Physics is too cool to hate, but definitely freaking frustrating.
10. Sep 5, 2014
### BvU
We're not there yet. If the spring stretches 30 m, the mechanical energy stored in the spring is ${1\over 2}\,k\,x^2 = {1\over 2} \, 100 \, {\rm kg}/{\rm s}^2 \, \left ( 30 {\rm m} \right )^2$, which is not, repeat NOT 1500 kg m2/s2.
There is only ONE force acting on the spring: the pulling force that the person (in the original post it is said that it is a man) executes on the spring. There are TWO forces acting on the man.
Is correct, if you are talking about the forces on the man at the bottom point (and if you use g = 10 m/s2).
Yes, there sure is. In fact the total kinetic energy in the system is the total kinetic energy of the man. (The cord is considered massless). The kinetic energy starts with zero and starts to increase when he jumps.
It keeps increasing even if the distance jumped is equal to the length of the spring/coil. At that point the acceleration is still g, so considerable. That means the speed keeps increasing, hence the kinetic energy too.
It is important to understand that the speed (and hence the kinetic energy) keeps increasing until the acceleration of the man is zero. That is (because F = m a) at the point where the force, exercised on the man by the stretched cord is equal in magnitude to the force, exercised (in the opposite direction) on the man by gravity. In fact, we can calculate how far the spring is stretched at that point. And we have to do that, because we will need that amount of stretch later on. Oblige me and do this calculation.
This is definitely NOT correct. I can't even understand what you try to express here.
The coil exercises a force k x on whatever is pulling on it at all times when the stretch x $\ge$ 0.
Definitely not true. At that point force from the spring is zero.
No, as explained above. And is was a man when he jumped
Yes! It will in fact even change sign at the bottom point and continue to increase (if you take upwards as the positive direction).
No we can not. There is only one object with mass in the entire exercise: the man.
I don't have time to comment on all that.
You are absolutely right ! Are you now ready to abandon the idea that the maximum upward speed is reached at the point where the cord is no longer stretched ? Because from the point where the speed is maximum to the point where k x = 0 , the force on the man from gravity has been bigger in magnitude than the upward pulling force from the cord, so the acceleration has been downward, meaning the upward speed has been going down!
Are you familiar with acceleration a is the time derivative of velocity v : $\ \vec a = {d\vec v\over dt}$ ?
Do you know how to find extrema of functions x(y) by requiring ${dy\over dx}=0$ ?
Do you see a similarity with your exercise ?
11. Sep 5, 2014
### hongiddong
Ahh thank you! It makes much more sense.
12. Sep 6, 2014
### BvU
Good. Just to be sure, could you post your solution now ? |
## What is Natural Language Processing?
### Introduction
Natural language refers to the language used by humans to communicate with each other. This communication can be verbal or textual. For instance, face-to-face conversations, tweets, blogs, emails, websites, SMS messages, all contain natural language.
Natural language is an incredibly important thing for computers to understand for a few reasons (among others):
• It can be viewed as a source of huge amount of data, and if processed intelligently can yield useful information
• It can be used to allow computers to better communicate with humans
However, unlike humans, computers cannot easily comprehend natural language. Sophisticated techniques and methods are required to translate natural language into a format understandable by computers. Natural language processing (NLP) is the application area that helps us achieve this objective. NLP refers to techniques and methods involved in automatic manipulation of natural language. Natural language processing is widely being used for machine learning, information summarization, human computer interaction, and much more.
This article contains a brief overview of NLP application areas, important NLP tasks and concepts, and some very handy NLP tools. The rest of the article is organized as follows:
NLP Application Areas
• Machine Learning
• Human Computer Interaction
• Information Extraction
• Summarization
NLP Processes and Concepts
• Lemmatization
• Stemming
• POS Tagging
• Named Entity Recognition
• Bag of Words Approach
• TF-IDF
• N Grams
NLP Tools
• Python NLTK
• Python Scikit Learn
• TextBlob
• spaCy
• Stanford NLP
### NLP Application Areas
NLP is currently being used in a variety of areas to solve difficult problems.
#### Machine Learning
NLP is used in conjunction with machine learning techniques to perform tasks such as emotion detection, sentiment analysis, dialogue act recognition, spam email classification etc. Machine learning techniques require data to train algorithms.
Natural language in the form of tweets, blogs, websites, chats etc. is a huge source of data. NLP plays a very important role in data collection by converting natural language into a format that can be used by machine learning techniques to train algorithms.
Spam classification is a classic example of the use of NLP in machine learning. Spam classification refers to the process of classifying emails as "spam or ham" based on the contents of the email. For instance an email "Hello, congratulations you have won \$100000000" can be classified as "spam" and another email "As per our discussion, please find attached minutes of the meeting" can be classified as "ham".
NLP tools and techniques help convert the text of these emails into feature vectors that can be used by machine learning applications to train the algorithm and then predict a new email instance as spam or ham.
#### Human Computer Interaction
Human computer interaction has evolved from simple mouse-and-keyboard desktop-based interaction to more natural interaction involving speech and gestures. For example, Amazon's Alexa and Apple's Siri are two of the prime examples of such interaction where humans use speech to interact with the system and perform different tasks. Another example of natural interaction is Google's homepage where you can perform search operations via speech. Natural language processing lays at the foundation of such interaction.
#### Information Extraction
Another important NLP task is to extract useful information from documents that can be used for different purposes. For instance, publicly traded companies are required to publish financial information and make it available to their shareholders. NLP can be used to extract financial information from these kinds of documents to autoamtically gather information on how a company (or industry) is doing.
If mined carefully, the information extracted from these sources can help companies make appropriate decisions. For instance, if a company didn't perform very well last quarter then you could use NLP to determine this and then automatically sell your shares of their stock.
#### Summarization
Not every piece of information in a text document is useful, so we may want to cut out any "fluff" and read only what is important. Summarization refers to condensing a document in a way that it contains only key pieces of information, leaving behind all the waste.
For example, instead of having to read a multi-page news story you could use summarization to extract only the important information about whatever news event the article was about. Or a summary could be made as a preview of the article to help you decide if you want to read the full text or not.
### Important NLP Concepts
In this section we will study some of the most common NLP concepts.
#### Tokenization
Tokenization refers to dividing a sentence into chunks of words. Usually tokenization is the first task performed in the natural language processing pipeline. Tokenization can be performed at two levels: word-level and sentence-level.
At word-level, tokenization returns set of words in a sentence.
For instance tokenizing a sentence "I am feeling hungry" returns following set of words:
Words = ['I', 'am', 'feeling', 'hungry']
At sentence-level, tokenization returns chunk of sentences in a document. For instance, consider a document with following text.
"Paris is the capital of France. It is located in the northern France. It is a beautiful city"
Sentence level tokenization of the above document will return set of following sentences:
• S1 = "Paris is the capital of France"
• S2 = "It is located in the northern France"
• S3 = "It is a beautiful city"
#### Stop Word Removal
Stop words in natural language are words that do not provide any useful information in a given context. For instance if you are developing an emotion detection engine, words such as "is", "am", and "the" do not convey any information related to emotions.
For instance, in the sentence "I am feeling happy today", the first two words "I" and "am" can be removed since they do not provide any emotion-related information. However, the word "I" may be important for other reasons, like identifying who is feeling happy. There is no universal list of stop words to remove as some can actually provide value - it just depends on your application.
In NLP, each and every word requires processing. Therefore, it is convenient that we only have those words in our text that are important in a given context. This saves processing time and results in a more robust NLP engine.
#### Stemming and Lemmatization
Stemming refers to the process of stripping suffixes from words in attempt to normalize them and reduce them to their non-changing portion. For example, stemming the words "computational", "computed", "computing" would all result in "comput" since this is the non-changing part of the word. Stemming operates on single words and do not take context of the word into account. However, "comput" has no semantic information.
Lemmatization on the other hand performs similar task but it takes context into account while stemming the words. Lemmatization is more complex as it performs dictionary look-up to fetch the exact word containing semantic information.
The word "talking" will be stripped to "talk" by both stemming and lemmatization. On the other hand, for the word "worse", lemmatization will return "bad" as lemmatizer takes the context of the word into account. Here the lemmatization will know that "worse" is an adjective and is second form of the word "bad", therefore it will return the latter. On the other hand stemming will return the word "worse" as it is.
Stemming and lemmatization are very useful for finding the semantic similarity between different pieces of texts.
#### Parts of Speech (POS)
Another important NLP task is to assign parts of speech tags to the words. To construct a meaningful and grammatically correct sentence, parts of speech play an important role. The arrangement and co-occurrence of different parts of speech in a word make it grammatically and semantically understandable. Furthermore, parts of speech are also integral to context identification. POS tagging helps achieve these tasks.
A POS tagger labels words with their corresponding parts of speech. For instance "laptop, mouse, keyboard" are tagged as nouns. Similarly "eating, playing" are verbs while "good" and "bad" are tagged as adjectives.
While this may sound like a simple task, it is not. For many words you can just use a dictionary lookup to see what POS a word is, but many words have various meanings and could therefore be a different POS. For example, if you encountered the word "wind", would it be a noun or a verb? That really depends on the context, so your POS tagger would need to understand context, to a degree.
Different set of POS tags are in used by different NLP libraries. The Stanford POS tag list is one such list.
#### Named Entity Recognition
Named entity recognition refers to the process of classifying entities into predefined categories such as person, location, organization, vehicle etc.
For instance in the sentence "Sundar Pichai, CEO of Google is having a talk in Washington". A typical named entity recognizer will return following information about this sentence:
• Sundar Pichai -> Person
• CEO -> Position
An important application of named entity recognition is that of topic modeling where using the information about the entities in the text, the topic of the document can automatically be detected.
#### Bag-of-Words Approach
Bag-of-words refers to a methodology used for extracting features from text documents. These features can then be used for various tasks, such as training machine learning algorithms.
The bag-of-words approach is straight forward. It starts by building a vocabulary of all the unique words occurring in all the documents in the training set. This vocabulary serves as feature vector for the training set. For instance, consider the following four documents.
• D1 = "I am happy for your success"
• D2 = "I am sorry for your loss"
• D3 = "He is sorry for not coming"
The vocabulary or the feature vector build using above documents will look like this:
I am happy for your success sorry loss He cannot come
In the training set, one row for each document is inserted. For each attribute (word) in a row the frequency of the word in the corresponding document is inserted. If a word doesn't exist in the document, 0 is added for that. The training data for the documents above looks like this:
Document I am happy for your success sorry loss He cannot come
D1 1 1 1 1 1 1 0 0 0 0 0
D2 1 1 1 1 1 1 0 0 0
D3 0 0 0 1 0 0 1 0 2 1 1
Table 1: Training Features containing term frequencies of each word in the document
This is called bag-of-words approach since the sequence of words in a document isn't taken into account. For instance, the training example constructed using the sentence "Sorry I your am for loss" will be exactly similar to "I am sorry for your loss". The occurance of the word is all that matters in this approach.
#### TF-IDF
TF-IDF stands for "term frequency multiplied by document frequency". The intuition behind calculating TF-IDF values is that those words that occur more frequently in one document and are overall less frequent in all the documents should be given more weightage since they are more crucial for classification. To understand TF-IDF, let's consider the same example that we studied in last section. Suppose we have these three documents D1, D2 and D3:
• D1 = "I am happy for your success"
• D2 = "I am sorry for your loss"
• D3 = "He is sorry, he cannot come"
TF-IDF is a combination of two values: TF (Term Frequency) and IDF (Inverse Document Frequency).
Term frequency refers to the number of times a word occurs within a document. In the document D1, the term "happy" occurs one time. Similarly, the term "success" also occurs one time. In D2, "he" occurs twice, so the term frequency for "he" is 2 for D2. It is important to mention here that term frequency of a word is calculated per document.
In some scenarios where documents lengths vary, term frequency for a particular word is calculated as:
Term frequence = (Number of Occurences of a word)/(Total words in the document)
However for the sake of simplicity, we will only use number of occurrences of a word in the document. Table 1 contains term frequency for all the words in D1, D2 and D3 documents.
Inverse Document Frequency for a particular word refers to the total number of documents in a dataset divided by the number of documents in which the word exists. In the documents D1, D2 and D3 the word "your" occurs in D1 and D2. So IDF for "your" will be 3/2.
To reduce the impact of uniqueness, it is common practice to take log of the IDF value. The final formula for IDF of a particular word looks like this:
IDF(word) = Log((Total number of documents)/(Number of documents containing the word))
Let's try to find the IDF value for the word "happy". We have three documents i.e. D1, D2 and D3 and the word "happy" occurs only in one document. So the IDF value for "happy" will be:
IDF(happy) = log(3/1) = log(3) = 0.477
Finally the term TF-IDF is a product of TF and IDF values for a particular term in the document.
For "happy", the TF-IDF value will be 1 x 0.477 = 0.477
By the same process, IDF value for the word "your" will be 0.17. Notice that "your" occurs in two documents, therefore it is less unique, hence the lower IDF value as compared to "happy" which occurs in only one document.
This kind of analysis can be helpful for things like search or document categorization (think automated tagging).
#### N-Grams as Features
N-grams refers to set of co-occurring words. The intuition behind the N-gram approach is that words occurring together provide more information rather than those occurring individually. Consider for example the following sentence:
S1 = "Manchester united is the most successful English football club"
Here if we create a feature set for this sentence with individual words, it will look like this:
Features = {Manchester, United, is, the, most, successful, English, Football, Club}
But if we look at this sentence we can see that "Manchester United" together provides more information about what is being said in the sentence rather than if you inspect the words "Manchester" and "United" separately.
N-grams allow us to take the occurrence of the words into account while processing the content of the document.
In N-grams, the N refers to number of co-occurring words. For instance, let's reconsider the sentence "Manchester United is the most successful English football club". If we try to construct 2-grams from this sentence, they would look like this:
2-Grams(S1) = ('Manchester United', 'United is', 'is the', 'the most', 'most successful', 'successful English', 'English Football', 'Football club')
Now, if you look at these N-grams you can see that at least three N-grams convey significant bit of information about the sentence e.g. "Manchester United", "English Football", "Football Club". From these N-grams we can understand that the sentence is about Manchester United that is football club in English football.
You can have any number of N-grams. The number N-grams for a sentence S having X number of words is:
N-gram(S) = X - (N-1)
A set of N-grams can be helpful for thinks like autocompletion/autocorrect and language models. Creating an N-gram from a huge corpus of text provides lots of information about which words typically occur together, and therfore allows you to predict what word will come next in a sentence.
In this section, we covered some of the basic natural language processing concepts and processes. Implementing these processes manually is cumbersome and time consuming. Thankfully, a lot of software libraries are available that automate these processes. A brief overview of some of these libraries has been provided in the next section.
### Some useful NLP Tools
Following are some of the most commonly used NLP tools. All of these tools provide most of the basic NLP functionalities; however they differ in their implementation and licensing.
#### Python NLTK
Python Natural Language Toolkit (NLTK) is by far the most popular and complete natural language processing tool. Implemented in Python, NTLK has all the basic natural language processing capabilities such as stemming, lemmatization, named entity reognition, POS tagging, etc. If Python is your language of choice, look no further than Python NLTK.
#### Scikit Learn
Scikit-learn is another extremely useful Python library for natural language processing. Although, Scikit Learn is primarily focused towards machine learning tasks, it contains most of the basic natural language processing capabilities as well and should not be overlooked.
Resource: Learn to use Scikit Learn from Python for Data Science and Machine Learning Bootcamp
#### Textblob
Though you can get almost every NLP task done with Python NLTK, getting use to complex syntax and functionalities of NLTK can be time consuming. Textblob is a simple to use NLP library built on top of NLTK and pattern with a less steep learning curve. Textblob is highly recommended for absolute beginners to natural language processing in Python, or for someone who cares more about getting to the end result rather than how the internals work.
#### spaCy
Textblob and NLTK are extremely good for educational purposes and exploring how NLP works. They contain lots of options for performing one task. For instance, if you are trying to train a POS tagger on your own data, libraries like NLTK and Textblob should be your choice. On the other hand if you are looking to build something from the best possible combination of functionalities, spaCy is a better option. spaCy is faster and more accurate than both NLTK and Textblob. One downside to spaCy is that currently it supports only the English language, while NLTK has support for multiple languages.
#### Stanford NLP
If you are into Java-based natural language processing tools, Stanford NLP should be your first choice. Stanford NLP is a GPL-Licensed NPL library capable of performing all the fundamental NLP tasks e.g. tokenization, co-referencing, stemming etc. It is also of such high quality that it is used in many research papers, so you'll likely hear of it quite often in the academic world. The good thing about Stanford NLP is that it supports multiple languages such as Chinese, English, Spanish, and French etc. |
#### Structured Sparse Subspace Clustering: A Joint Affinity Learning and Subspace Clustering Framework
##### Chun-Guang Li, Chong You, René Vidal
Subspace clustering refers to the problem of segmenting data drawn from a union of subspaces. State-of-the-art approaches for solving this problem follow a two-stage approach. In the first step, an affinity matrix is learned from the data using sparse or low-rank minimization techniques. In the second step, the segmentation is found by applying spectral clustering to this affinity. While this approach has led to state-of-the-art results in many applications, it is sub-optimal because it does not exploit the fact that the affinity and the segmentation depend on each other. In this paper, we propose a joint optimization framework --- Structured Sparse Subspace Clustering (S$^3$C) --- for learning both the affinity and the segmentation. The proposed S$^3$C framework is based on expressing each data point as a structured sparse linear combination of all other data points, where the structure is induced by a norm that depends on the unknown segmentation. Moreover, we extend the proposed S$^3$C framework into Constrained Structured Sparse Subspace Clustering (CS$^3$C) in which available partial side-information is incorporated into the stage of learning the affinity. We show that both the structured sparse representation and the segmentation can be found via a combination of an alternating direction method of multipliers with spectral clustering. Experiments on a synthetic data set, the Extended Yale B data set, the Hopkins 155 motion segmentation database, and three cancer data sets demonstrate the effectiveness of our approach.
arrow_drop_up |
# Question on definition of unbiased estimator
The definition in my textbook is the following.
Let $$\big(\Omega, \mathcal{F}, (P_\vartheta:\vartheta\in\Theta)\big)$$ be a statistical model and $$(E,\mathcal{E})$$ be a measurable space.
If $$E$$ is a finite dimensional vector space, then $$T:\Omega\rightarrow E$$ is called an unbiased estimator for $$\tau:\Theta\rightarrow E$$, if $$\forall \vartheta\in\Theta: E_\vartheta[T]=\tau(\vartheta).$$
Question: Is the expected value $$E_\vartheta[\cdot]$$ always defined on an finite dimensional vector space? It should be a finite dimensional $$\mathbb{R}$$-vector space to be more precise, right?
I can see this if $$T$$ takes discrete values in $$E$$ (for example indexed by the set $$I$$). Then
$$E[T]=\sum_{i\in I} t_i\cdot \underbrace{P(T=t_i)}_{\in\mathbb{R}}\in E$$
But could there be another case I do not see yet? Is the other case just $$(E,\mathcal{E})=(\mathbb{R},\mathcal{B}(\mathbb{R}))$$ as in the definition of wikipedia? |
Found 10 result(s)
### 16.02.2016 (Tuesday)
#### Yang-Mills Theory and the ABC Conjecture
Regular Seminar Yang-Hui He (City)
at: 15:00 City U.room B103 abstract: We establish a precise correspondence between the ABC Conjecture and N=4 super-Yang-Mills theory. This is achieved by combining three ingredients: (i) Elkies' method of mapping ABC-triples to elliptic curves in his demonstration that ABC implies Mordell/Faltings; (ii) an explicit pair of elliptic curve and associated Belyi map given by Khadjavi-Scharaschkin; and (iii) the fact that the bipartite brane-tiling/dimer model for a gauge theory with toric moduli space is a particular dessin d'enfant in the sense of Grothendieck. We explore this correspondence for the highest quality ABC-triples as well as large samples of random triples. The Conjecture itself is mapped to a statement about the fundamental domain of the toroidal compactification of the string realization of N=4 SYM.
### 26.11.2015 (Thursday)
Regular Seminar Yang-Hui He (City)
at: 14:00 QMWroom G.O. Jones 610 abstract: We study the web of correspondences linking the exceptional Lie algebras E8,7,6 and the sporadic simple groups Monster, Baby and the largest Fischer group. We will survey some old observations from the perspective of Moonshine and representation theory and present some new ones from that of congruence groups and enumerative geometry. Based on joint work with John McKay.
### 10.12.2014 (Wednesday)
#### Eta Products, BPS States and K3 Surfaces
Regular Seminar Yang-Hui He (City University)
at: 13:15 KCLroom G.01 abstract: Inspired by the multiplicative nature of the Ramanujan modular discriminant, Delta, we consider physical realizations of certain multiplicative products over the Dedekind eta-function in two parallel directions: the generating function of BPS states in certain heterotic orbifolds and elliptic K3 surfaces associated to congruence subgroups of the modular group. We show that they are, after string duality to type II, the same K3 surfaces admitting Nikulin automorphisms. In due course, we will present some identities arising from q-expansions as well as relations to the sporadic Mathieu group M24.
### 03.12.2014 (Wednesday)
#### Polygon Seminar: Gauge Theories and Calabi-Yau Manifolds
Triangular Seminar Yang-Hui He (City University)
at: 15:30 QMWroom Francis Bancroft 1.15 abstract:
### 21.03.2014 (Friday)
#### TBA
Regular Seminar Yang-Hui He (City U.)
at: 14:00 QMWroom Room FB 1.06 abstract:
### 19.03.2012 (Monday)
#### N=2 Gauge Theories: Congruence Subgroups, Coset Graphs and Modular Surfaces
Regular Seminar Yang-Hui He (City University)
at: 13:00 ICroom H341 abstract: We establish a correspondence between generalized quiver gauge theories in four-dimensions and congruence subgroups of the modular group, hinging upon the trivalent graphs which arise in both. The gauge theories and the graphs are enumerated and their numbers are compared. The correspondence is particularly striking for genus zero torsion-free congruence subgroups which are crucial to Moonshine. We analyze in detail the case of index 24, where modular elliptic K3 surfaces emerge: here, the elliptic j-invariants can be recast as dessins d'enfant which dictate the Seiberg-Witten curves.
### 16.03.2010 (Tuesday)
#### A Geometric Apercu on N=1 Gauge Theories
Regular Seminar Yang-Hui He (Oxford University)
at: 13:30 City U.room Oakden abstract: We present some new perspectives on N=1 gauge theories, especially SQCD, D-Brane Quiver Theories and the MSSM, from the stand-point of recent advances in computational and algorithmic algebraic geometry and commutative algebra. We introduce the plethystic program which systematically count gauge invariants and encodes certain hidden symmetries. Moreover, we discuss special structures of the vacuum moduli space, such as that of SQCD being Calabi-Yau.
### 12.03.2008 (Wednesday)
#### Triadophilia: A Special Corner in the Landscape
Regular Seminar Yang-Hui He (Oxford University)
at: 14:00 ICroom Huxley 503 abstract: We point out a special corner in the space of Calabi-Yau compactifications where standard-like models tend to emerge. We show how these scenarios are inter-related via a mathematical process of transgression of bundles, a generalisation of the conifold transition. Perhaps our world is special and we live in this oasis within the multitude of vacua.
### 06.03.2006 (Monday)
#### Heterotic MSSM
Regular Seminar Yang-Hui He (Oxford)
at: 13:30 ICroom Ballroom, 58 Princes Gate abstract: We show the existence of an N=1 supersymmetric vacuum in string theory whose observable sector has exactly the matter content of the MSSM without exotic particles and vector-like pairs of any type. This is done so by compactifying the E_8 x E_8 heterotic string on a Calabi-Yau threefold endowed with an SU(4) vector bundle which has been constructed after extensive search. In addition, we discuss the Yukawa couplings and Higgs mu-terms in this model.
### 10.11.2004 (Wednesday)
#### GUT spectrum from Heterotic Compactification
Regular Seminar Yang-Hui He (University of Pennsylvania)
at: 13:15 KCLroom 423 abstract: |
# Finding molecular weight from specific heat at constant volume
1. Jan 17, 2010
### TheTourist
The specific heat at constant volume of an unknown solid is measured at high temperature to be 319.5Jkg-1K-1. Estimate its molecular weight.
Cv=3R
Attempt.
I used the above equation to get a mass of the solid to be 0.0128kg but I have no idea of what to do next!
2. Jan 18, 2010
### Mapes
How did you calculate this? (Please include your units.) |
# What gravity waves?
amt
What gravity waves?
Considering Gravity is the warping of space, then how is gravitational waves possible? Aren't we all sliding down the slopes of space due to the massive warping of space by ojects? isn't space pushing us down?
Then why is gravitational waves a topic?
Thanks.
Antiphon
If you shake the object, the ripples will move away as waves.
It's an interesting aspect of GR so it's a topic.
Homework Helper
Gold Member
Doesn't gravitational waves exist in Newtonian mechanics also? Shake a mass harmonically and watch the field at some point. It will oscillate. How are relativistic waves any different that that other then we can detect them through length contraction and time dilatation?
Staff Emeritus
Newtonian gravity doesn't have any gravity waves because it doesn't have any gravitational equivalent to magnetism.
Magnetism is important, because acording to Maxwell's equations, a changing electric field gives rise to a magnetic field, and a changing magnetic field gives rise to an electric field. A self-sustining oscillation of electirc and magnetic fields which satisfies Maxwell's equations is responsible for light, radio waves, and all electromagnetic radiation.
GR does have a gravitational equivalent to magnetism (gravitomagnetism, aka frame-dragging). Because weak-field GR obeys equations which are very similar to Maxwell's equations, the theory has self supporting gravitational "waves".
Antiphon
Also, Newtonian gravity does not have a finite speed of propagation.
amt
So, the only way I can comprehend gravitational waves is by thinking that they are continuous (oscillation as explained by you all). So is it correct to think of it as continuous ripples accross space? though the frequency and speed of this ripple is still unknown?
rbj
quasar987 said:
Doesn't gravitational waves exist in Newtonian mechanics also? Shake a mass harmonically and watch the field at some point. It will oscillate. How are relativistic waves any different...?
the difference is that the Newtonian gravity waves would be traveling at infinite speed. the GR waves travel at the same speed that EM waves do in a vacuum.
by the way, for weak gravitation the equations look exactly like Maxwell's Equations, except that charge density is replaced by mass density, and $$\frac{1}{4 \pi \epsilon_0}$$ is replaced by $$G$$. there is some 1/2 factor with the B field having to do with something "spin 2" that i don't completely understand, but i think that sort of comes out in the wash.
we really should not think of $$c$$ as merely the "speed of light" but as the speed of propagation of all things or actions "instantaneous".
r b-j
Staff Emeritus
amt said:
So, the only way I can comprehend gravitational waves is by thinking that they are continuous (oscillation as explained by you all). So is it correct to think of it as continuous ripples accross space? though the frequency and speed of this ripple is still unknown?
That's the best way of understanding them, the way that General Relativity describes them. General relativity is a classical theory, so it doesn't include quantum effects. Thus, the picture GR draws of gravity waves is the classical picture that - that of waves in spacs - not the quantum picture of particles following all possible paths.
Gold Member
Dearly Missed
Do these waves get stronger when they encounter a gravity well ?
Antiphon
In a way- the wavelength should shorten as they fall in and lengthen as
they leave the well. Shorter wavelengths have higher energy but not
higher amplitude.
Gold Member
Dearly Missed
This is a fascinating subject, i can not understand what is actually oscillating
though, i have read words like the, "metric", or the "vacuum", it confuses me.
Creator
Wolram said:
Do these waves get stronger when they encounter a gravity well ?
Significant question.
Antiphon said:
In a way- the wavelength should shorten as they fall in and lengthen as
they leave the well. Shorter wavelengths have higher energy but not
higher amplitude.
Would you mind stating what empirical or theoretical evidence you have for believing that? Not that I have evidence to the contrary; just want to see how you arrived at that conclusion.
Creator
Last edited:
Gold Member
Dearly Missed
This is the point where things get,"sticky", and only for the brave.
Gold Member
At the last that I heard anything about it, there are still experiments under way to detect and measure gravity waves. They involve immensely heavy metal cylinders hung like pendulems, or lying on their sides, but I can't recall the set-up.
kaos
Danger said:
At the last that I heard anything about it, there are still experiments under way to detect and measure gravity waves. They involve immensely heavy metal cylinders hung like pendulems, or lying on their sides, but I can't recall the set-up.
I think that LIGO is supposed to detect gravitational waves.
amt
The Laser Interferometer Space Antenna is supposed to be launched in 2013. This will be used to measure Gravity waves that is still resonating from the Big Bang (Article from DISCOVER magazine- August 2005 edition).
Gold Member
kaos said:
I think that LIGO is supposed to detect gravitational waves.
I'm not familiar with that acronym, but it might very well be the one that I'm thinking of. If memory serves, it's based in Australia... possibly in an opal mine. I'm afraid that it's been several years since I saw anything about it.
amt said:
The Laser Interferometer Space Antenna is supposed to be launched in 2013. This will be used to measure Gravity waves that is still resonating from the Big Bang (Article from DISCOVER magazine- August 2005 edition).
Very cool. That's a bit far off for a fellow of my age, but I shall attempt to retain my grip upon the mortal coil until such time as results come back.
Staff Emeritus
Gold Member
Danger said:
I'm not familiar with that acronym, but it might very well be the one that I'm thinking of. If memory serves, it's based in Australia... possibly in an opal mine. I'm afraid that it's been several years since I saw anything about it.
LIGO is based in the U.S. It is basically an interferometer (a la Michelson-Morley, just 4km length, L-shaped). There will be two of them to reject local noise.
Another possible way to ponder on gravity waves is to watch the ripples on the surface of a pond or river, preferably with lots of ducks or boats moving around and just around sunset to get the most shimmering and glistening effect.
Gold Member
Dearly Missed
jammieg said:
Another possible way to ponder on gravity waves is to watch the ripples on the surface of a pond or river, preferably with lots of ducks or boats moving around and just around sunset to get the most shimmering and glistening effect.
But what, "medium", is rippling, if space itself can ripple it must have some
mechanical properties.
Gold Member
ahrkron said:
LIGO is based in the U.S. It is basically an interferometer (a la Michelson-Morley, just 4km length, L-shaped). There will be two of them to reject local noise.
Thanks for the clarification. I assume that you mean a laser interferometer. So what's the thing that I'm thinking of that involves (tungsten?) cylinders?
jammieg said:
Another possible way to ponder on gravity waves is to watch the ripples on the surface of a pond or river, preferably with lots of ducks or boats moving around and just around sunset to get the most shimmering and glistening effect.
Well... that to me would ideally involve a 12-gauge so as to supply me with roast duck for a couple of months. (Oh, come on... they don't call me Danger because of my humanistic nature. If it's breathing, it's food.)
wolram said:
But what, "medium", is rippling, if space itself can ripple it must have some
mechanical properties.
Negatory, good buddy. That's sort of like saying that EM can't propogate as a wave because nothing is 'waving'. It's one of those situations where classical thinking doesn't work, sort of like thinking of the 'gravity well' around a mass. What's indented to make the 'well'?
I agree with Wolram if something is something or doing something or detectable or something it must have mass and things with mass have properties, or maybe we just don't have the means of detecting this kind of mass or maybe we don't understand mass because mass is gravity dependent or mass is gravity oh never mind.
Gold Member
jammieg said:
detecting this kind of mass or maybe we don't understand mass because mass is gravity dependent or mass is gravity oh never mind.
:rofl: It would appear that you buy the same brand of beer that I do.
Gold Member
Dearly Missed
by Danger
Negatory, good buddy. That's sort of like saying that EM can't propogate as a wave because nothing is 'waving'. It's one of those situations where classical thinking doesn't work, sort of like thinking of the 'gravity well' around a mass. What's indented to make the 'well'?
As i understand a," gravity wave", will cause a ridged rod to stretch as it
passes, when it has passed the rod will return to its original dimensions.
Im not sure but i guess there could be many such rods.
Gravity has done mechanical work by stretching the rod/s but how many can it strech before its energy is spent ? this seems different
from warped space time or a gravity well which are, "static", in space, and
quite a step from the rubber sheet analogy.
Last edited:
Gold Member
wolram said:
As i understand a," gravity wave", will cause a ridged rod to stretch as it
passes, when it has passed the rod will return to its original dimensions... ...but how many can it strech before its energy is spent ?
I'm lost on that, dude. I would have thought that since gravity propogates at 'c' in vacuum, it would drop to the speed of sound while traveling through a metallic medium. That might indeed be what the 'massive cylinder' experiment that I was thinking of is based upon. The idea of gravity losing its energy when passing through something never crossed my mind. (But neither did the idea of it going through something.) You just had to go and bring that up right when I have to try to sleep... :grumpy:
Gold Member
Dearly Missed
I guess if a gravity wave encounters enough mass the work it does on that
mass uses up the energy that created it, but that is to simple I am sure.
amt
Darn it!
So let me get this-
A body with Mass warps space. This warp is the result of the ripple effect when the body first appeared in space at that particular location. A good example is- placing a boat in a pond. The boat displaces water and sends out ripples.
Gold Member
amt said:
A good example is- placing a boat in a pond. The boat displaces water and sends out ripples.
That would be an analogy, not an example, and unfortunately not accurate. One thing to keep in mind is that water ripples are essentially a 2-dimensional phenomenon (amplitude and wavelength; width is usually ignored). Gravity waves are 4-dimensional at least. This is keeping in mind that they not only radiate spherically from the originating mass, but also affect relative time. Also, no mass just 'appears'. Anything of significant gravitational influence has accrued over who-knows-how-many years or millennia or aeons.
I would appreciate it if an expert in the subject can clarify something for me, though. Most waves (of whatever sort) are produced by something moving. How would that apply to gravity waves? If, for instance, a mass were at rest relative to the universe in general, it would still have a gravitational field. Would it also produce 'waves', or would some other mechanism have to take over? This has been bugging me for years.
Gold Member
Dearly Missed
Danger said:
That would be an analogy, not an example, and unfortunately not accurate. One thing to keep in mind is that water ripples are essentially a 2-dimensional phenomenon (amplitude and wavelength; width is usually ignored). Gravity waves are 4-dimensional at least. This is keeping in mind that they not only radiate spherically from the originating mass, but also affect relative time. Also, no mass just 'appears'. Anything of significant gravitational influence has accrued over who-knows-how-many years or millennia or aeons.
I would appreciate it if an expert in the subject can clarify something for me, though. Most waves (of whatever sort) are produced by something moving. How would that apply to gravity waves? If, for instance, a mass were at rest relative to the universe in general, it would still have a gravitational field. Would it also produce 'waves', or would some other mechanism have to take over? This has been bugging me for years.
Have a look here Danger, The gist is that a static body does not, "radiate",
gravity waves, a body has to be accelerated.
http://en.wikipedia.org/wiki/Gravitational_wave
Gold Member
wolram said:
Have a look here Danger
Cowabunga! There's one ****load of blue text there! I don't have time to even start reading that now, but I have a day off coming up. Thanks for the link, man.
Antiphon
Creator said:
Antiphon said:
In a way- the wavelength should shorten as they fall in and lengthen as
they leave the [gravity] well. Shorter wavelengths have higher energy but not
higher amplitude.
Would you mind stating what empirical or theoretical evidence you have for believing that? Not that I have evidence to the contrary; just want to see how you arrived at that conclusion.
When the gravity wave (which carries energy and momentum) is climbing
out of the gravity well, it has to do work againt the well's field. This work
equals the energy that it picked up on the way down into the well.
While in the well, the extra energy shows up as a higher frequency which
is also a shorter wavelength since the speed is always measured as c.
Last edited: |
Harmonic Analysis and Differential Equations Student Seminar: Semiclassical resolvent bound for compactly supported Hölder continuous potentials
Seminar | November 5 | 3:40-5 p.m. | 740 Evans Hall
Jacob Shapiro, ANU
Department of Mathematics
We prove a weighted resolvent estimate for the semiclassical Schrödinger operator $-h^2 \Delta + V : L^2(\mathbb { R }^n) \to L^2(\mathbb { R }^n)$, $n \ge 3$. We assume the potential $V$ is compactly supported and α-Hölder continuous, $0< \alpha < 1$. The logarithm of the resolvent norm grows like $h^{-1-\frac {1-\alpha }{3 + \alpha }}\log (h^{-1})$ as the semiclassical parameter $h \to 0^+$. This bound interpolates between the previously known $h$-dependent resolvent bounds for Lipschitz and $L^\infty$ potentials. To key step is to prove a suitable global Carleman estimate, which we establish via a spherical energy method. This is joint work with Jeffrey Galkowski.
[email protected] |
# Why does formatting show attributes of both Paragraph and Character styles? [closed]
It looks like when the paragraph style is Default, the character style prevails (except for the Default character style, which is linked to the Default paragraph style).
However, when a paragraph style other than Default is applied, the result appears to be a combination of attributes.
Example:
Text with Table Index Heading (paragraph style: Liberation Sans, 14 point, no italics) combined with Quotation (character style: Liberation Serif, 12 point, italics).
The resulting text is 14 points, like the paragraph style, and italicized, like the character style.
Perhaps it is helpful to work like this way, but to avoid surprises, I need to understand the logic. I have been searching for a clear explanation and not found one.
I would deeply appreciate a clear explanation of how paragraph and character styles are supposed to work together. Which takes precedence when? For which attributes?
edit retag reopen merge delete
### Closed for the following reason the question is answered, right answer was accepted by Alex Kemp close date 2020-10-27 22:07:27.979469
Sort by » oldest newest most voted
Character style is applied atop of paragraph style, so all settings defined in the character style have precedence over those defined in paragraph style. But note, that a character style does not need to define every setting, and, e.g., Quotation only defines Italic by default, but no other properties like size or font (see Organizer tab).
more
Hi Mike, That makes a lot of sense. Thank you for the rapid response.
After looking at the Organizer page, I am now unclear about something else: What determines the attributes contained in a character style?
I will post separately so that others can see the answer. Thanks again.
( 2018-01-30 01:53:18 +0200 )edit
One more thing. Do you happen to have seen a clear description or graphic that shows how the various styles fit together? It would sure be helpful for me and many others. The documentation I have seen doesn't do that in one place.
( 2018-01-30 01:59:42 +0200 )edit
I gave a thorough description here.
This answer could be extended with @Regina's one about multiple character styles.
You can view the styles categories as ordered layers, the shallower taking precedence on deeper. Only explicitly set attributes shadow those below (otherwise they are "transparent").
To be complete, attributes can be reverted to "transparent" state (which is different from explicitly forced "not set" value) with Standard button (one page at a time).
more
Thank you so much. I have been compiling useful explanations about various aspects of how styles. I had already included yours--in fact, it is one of the best I have found. Regina's explanation is also useful, although I don't completely understand it.
Once I have a better understanding, my goal is to write something up that addresses many of the style/formatting problems that people ask about in the forums. Any more explanations would be appreciated.
( 2018-01-30 20:41:39 +0200 )edit
The lack of clear documentation about these issues is surprising. I would like to help address that problem.
I keep thinking that graphics about the logic would be quite helpful. Any thoughts or examples?
( 2018-01-30 20:45:42 +0200 )edit
Once you have something, I volunteer to proof-reading your memo. That was also something on my todo list. I'd like to write a few cheat sheets with graphics and pointers as to where to find the menu command/dialog to change such and such aspect.
Up to now, I lacked some incentive to start working and you could be the right trigger.
( 2018-01-30 20:52:17 +0200 )edit
That would be great! Thank you for the offer.
This is taking a while because it takes so much time to pull information together from various sources and to also ask a lot of questions, such as in this post.
Because I don't understand this very well, I think I am in a good position to detect when various explanations fail to articulate the underlying logic. It is the underlying logic and structure that need to be spelled out.
My motto in this effort: ignorance is strength!
( 2018-01-30 23:44:36 +0200 )edit
Do you happen to have expertise in graphic design?
( 2018-01-30 23:46:38 +0200 )edit
None at all, this ismy biggest handicap. As long as it is a matter of technical drawing, no problem, but when it comes to artistic decoration ...
( 2018-01-31 08:00:28 +0200 )edit
Could you make a technical drawing that shows how settings flow through the layers of styles?
( 2018-01-31 18:21:59 +0200 )edit
For such matter-of-fact illustration, I think so
( 2018-01-31 21:31:47 +0200 )edit
Do you think you could create an illustration that shows the relationships among paragraph, character, and list styles as well as direct formatting? Doesn't have to be beautiful but something to start with would be quite helpful.
( 2018-02-02 00:02:00 +0200 )edit
I could email you but don't see how to do that through this system. Do you know if there is a way?
( 2018-02-02 00:02:48 +0200 )edit |
# Search by Topic
#### Resources tagged with Mathematical reasoning & proof similar to Purr-fection:
Filter by: Content type:
Stage:
Challenge level:
### There are 186 results
Broad Topics > Using, Applying and Reasoning about Mathematics > Mathematical reasoning & proof
### More Sums of Squares
##### Stage: 5
Tom writes about expressing numbers as the sums of three squares.
### Modulus Arithmetic and a Solution to Dirisibly Yours
##### Stage: 5
Peter Zimmerman from Mill Hill County High School in Barnet, London gives a neat proof that: 5^(2n+1) + 11^(2n+1) + 17^(2n+1) is divisible by 33 for every non negative integer n.
### Basic Rhythms
##### Stage: 5 Challenge Level:
Explore a number pattern which has the same symmetries in different bases.
### The Great Weights Puzzle
##### Stage: 4 Challenge Level:
You have twelve weights, one of which is different from the rest. Using just 3 weighings, can you identify which weight is the odd one out, and whether it is heavier or lighter than the rest?
### Prime AP
##### Stage: 5 Challenge Level:
What can you say about the common difference of an AP where every term is prime?
### Composite Notions
##### Stage: 4 Challenge Level:
A composite number is one that is neither prime nor 1. Show that 10201 is composite in any base.
##### Stage: 3 and 4 Challenge Level:
Powers of numbers behave in surprising ways. Take a look at some of these and try to explain why they are true.
### Take Three from Five
##### Stage: 3 and 4 Challenge Level:
Caroline and James pick sets of five numbers. Charlie chooses three of them that add together to make a multiple of three. Can they stop him?
### Sprouts Explained
##### Stage: 2, 3, 4 and 5
This article invites you to get familiar with a strategic game called "sprouts". The game is simple enough for younger children to understand, and has also provided experienced mathematicians with. . . .
### What Numbers Can We Make Now?
##### Stage: 3 and 4 Challenge Level:
Imagine we have four bags containing numbers from a sequence. What numbers can we make now?
### Mod 3
##### Stage: 4 Challenge Level:
Prove that if a^2+b^2 is a multiple of 3 then both a and b are multiples of 3.
### Problem Solving, Using and Applying and Functional Mathematics
##### Stage: 1, 2, 3, 4 and 5 Challenge Level:
Problem solving is at the heart of the NRICH site. All the problems give learners opportunities to learn, develop or use mathematical concepts and skills. Read here for more information.
### Advent Calendar 2011 - Secondary
##### Stage: 3, 4 and 5 Challenge Level:
Advent Calendar 2011 - a mathematical activity for each day during the run-up to Christmas.
### Proof of Pick's Theorem
##### Stage: 5 Challenge Level:
Follow the hints and prove Pick's Theorem.
### Pythagorean Triples I
##### Stage: 3 and 4
The first of two articles on Pythagorean Triples which asks how many right angled triangles can you find with the lengths of each side exactly a whole number measurement. Try it!
### Magic Squares II
##### Stage: 4 and 5
An article which gives an account of some properties of magic squares.
##### Stage: 4 Challenge Level:
Four jewellers share their stock. Can you work out the relative values of their gems?
### Pythagorean Triples II
##### Stage: 3 and 4
This is the second article on right-angled triangles whose edge lengths are whole numbers.
### Whole Number Dynamics II
##### Stage: 4 and 5
This article extends the discussions in "Whole number dynamics I". Continuing the proof that, for all starting points, the Happy Number sequence goes into a loop or homes in on a fixed point.
### Whole Number Dynamics V
##### Stage: 4 and 5
The final of five articles which containe the proof of why the sequence introduced in article IV either reaches the fixed point 0 or the sequence enters a repeating cycle of four values.
### Why 24?
##### Stage: 4 Challenge Level:
Take any prime number greater than 3 , square it and subtract one. Working on the building blocks will help you to explain what is special about your results.
### Whole Number Dynamics III
##### Stage: 4 and 5
In this third of five articles we prove that whatever whole number we start with for the Happy Number sequence we will always end up with some set of numbers being repeated over and over again.
### Yih or Luk Tsut K'i or Three Men's Morris
##### Stage: 3, 4 and 5 Challenge Level:
Some puzzles requiring no knowledge of knot theory, just a careful inspection of the patterns. A glimpse of the classification of knots and a little about prime knots, crossing numbers and. . . .
### Modular Fractions
##### Stage: 5 Challenge Level:
We only need 7 numbers for modulus (or clock) arithmetic mod 7 including working with fractions. Explore how to divide numbers and write fractions in modulus arithemtic.
### Sixational
##### Stage: 4 and 5 Challenge Level:
The nth term of a sequence is given by the formula n^3 + 11n . Find the first four terms of the sequence given by this formula and the first term of the sequence which is bigger than one million. . . .
### DOTS Division
##### Stage: 4 Challenge Level:
Take any pair of two digit numbers x=ab and y=cd where, without loss of generality, ab > cd . Form two 4 digit numbers r=abcd and s=cdab and calculate: {r^2 - s^2} /{x^2 - y^2}.
### Big, Bigger, Biggest
##### Stage: 5 Challenge Level:
Which is the biggest and which the smallest of $2000^{2002}, 2001^{2001} \text{and } 2002^{2000}$?
### A Biggy
##### Stage: 4 Challenge Level:
Find the smallest positive integer N such that N/2 is a perfect cube, N/3 is a perfect fifth power and N/5 is a perfect seventh power.
### N000ughty Thoughts
##### Stage: 4 Challenge Level:
How many noughts are at the end of these giant numbers?
### Pair Squares
##### Stage: 5 Challenge Level:
The sum of any two of the numbers 2, 34 and 47 is a perfect square. Choose three square numbers and find sets of three integers with this property. Generalise to four integers.
### Rolling Coins
##### Stage: 4 Challenge Level:
A blue coin rolls round two yellow coins which touch. The coins are the same size. How many revolutions does the blue coin make when it rolls all the way round the yellow coins? Investigate for a. . . .
### Magic W Wrap Up
##### Stage: 5 Challenge Level:
Prove that you cannot form a Magic W with a total of 12 or less or with a with a total of 18 or more.
##### Stage: 5 Challenge Level:
Find all positive integers a and b for which the two equations: x^2-ax+b = 0 and x^2-bx+a = 0 both have positive integer solutions.
### Recent Developments on S.P. Numbers
##### Stage: 5
Take a number, add its digits then multiply the digits together, then multiply these two results. If you get the same number it is an SP number.
### Stonehenge
##### Stage: 5 Challenge Level:
Explain why, when moving heavy objects on rollers, the object moves twice as fast as the rollers. Try a similar experiment yourself.
### Classifying Solids Using Angle Deficiency
##### Stage: 3 and 4 Challenge Level:
Toni Beardon has chosen this article introducing a rich area for practical exploration and discovery in 3D geometry
### Symmetric Tangles
##### Stage: 4
The tangles created by the twists and turns of the Conway rope trick are surprisingly symmetrical. Here's why!
### Air Nets
##### Stage: 2, 3, 4 and 5 Challenge Level:
Can you visualise whether these nets fold up into 3D shapes? Watch the videos each time to see if you were correct.
### Binary Sequences
##### Stage: 5 Challenge Level:
Show that the infinite set of finite (or terminating) binary sequences can be written as an ordered list whereas the infinite set of all infinite binary sequences cannot.
### Some Circuits in Graph or Network Theory
##### Stage: 4 and 5
Eulerian and Hamiltonian circuits are defined with some simple examples and a couple of puzzles to illustrate Hamiltonian circuits.
### Cube Net
##### Stage: 5 Challenge Level:
How many tours visit each vertex of a cube once and only once? How many return to the starting point?
### Iffy Logic
##### Stage: 4 and 5 Challenge Level:
Can you rearrange the cards to make a series of correct mathematical statements?
### Direct Logic
##### Stage: 5 Challenge Level:
Can you work through these direct proofs, using our interactive proof sorters?
### Calculating with Cosines
##### Stage: 4 and 5 Challenge Level:
If I tell you two sides of a right-angled triangle, you can easily work out the third. But what if the angle between the two sides is not a right angle?
### Interpolating Polynomials
##### Stage: 5 Challenge Level:
Given a set of points (x,y) with distinct x values, find a polynomial that goes through all of them, then prove some results about the existence and uniqueness of these polynomials.
### A Long Time at the Till
##### Stage: 4 and 5 Challenge Level:
Try to solve this very difficult problem and then study our two suggested solutions. How would you use your knowledge to try to solve variants on the original problem?
### The Clue Is in the Question
##### Stage: 5 Challenge Level:
This problem is a sequence of linked mini-challenges leading up to the proof of a difficult final challenge, encouraging you to think mathematically. Starting with one of the mini-challenges, how. . . .
### Water Pistols
##### Stage: 5 Challenge Level:
With n people anywhere in a field each shoots a water pistol at the nearest person. In general who gets wet? What difference does it make if n is odd or even?
### Three Frogs
##### Stage: 4 Challenge Level:
Three frogs hopped onto the table. A red frog on the left a green in the middle and a blue frog on the right. Then frogs started jumping randomly over any adjacent frog. Is it possible for them to. . . .
### The Triangle Game
##### Stage: 3 and 4 Challenge Level:
Can you discover whether this is a fair game? |
API 4.2 For C++ developers
OpenSim::Array< T > Class Template Reference
A class for storing an array of values of type T. More...
Public Member Functions
virtual ~Array ()
Destructor. More...
Array (const T &aDefaultValue=T(), int aSize=0, int aCapacity=Array_CAPMIN)
Default constructor. More...
Array (const Array< T > &aArray)
Copy constructor. More...
bool arrayEquals (const Array< T > &aArray) const
T & operator[] (int aIndex) const
Get the array element at a specified index. More...
Array< T > & operator= (const Array< T > &aArray)
Assign this array to a specified array. More...
bool operator== (const Array< T > &aArray) const
Determine if two arrays are equal. More...
bool computeNewCapacity (int aMinCapacity, int &rNewCapacity)
Compute a new capacity that is at least as large as a specified minimum capacity; this method does not change the capacity, it simply computes a new recommended capacity. More...
bool ensureCapacity (int aCapacity)
Ensure that the capacity of this array is at least the specified amount. More...
void trim ()
Trim the capacity of this array so that it is one larger than the size of this array. More...
int getCapacity () const
Get the capacity of this storage instance. More...
void setCapacityIncrement (int aIncrement)
Set the amount by which the capacity is increased when the capacity of of the array in exceeded. More...
int getCapacityIncrement () const
Get the amount by which the capacity is increased. More...
bool setSize (int aSize)
Set the size of the array. More...
int getSize () const
Get the size of the array. More...
int size () const
Alternate name for getSize(). More...
int append (const T &aValue)
Append a value onto the array. More...
int append (const Array< T > &aArray)
Append an array of values. More...
int append (int aSize, const T *aArray)
Append an array of values. More...
int insert (int aIndex, const T &aValue)
Insert a value into the array at a specified index. More...
int remove (int aIndex)
Remove a value from the array at a specified index. More...
void set (int aIndex, const T &aValue)
Set the value at a specified index. More...
T * get ()
Get a pointer to the low-level array. More...
const T * get () const
Get a pointer to the low-level array. More...
const T & get (int aIndex) const
Get a const reference to the value at a specified array index. More...
T & updElt (int aIndex) const
Get a writable reference to value at a specified array index. More...
const T & getLast () const
Get the last value in the array. More...
T & updLast () const
Get writable reference to last value in the array. More...
int findIndex (const T &aValue) const
Linear search for an element matching a given value. More...
int rfindIndex (const T &aValue) const
Linear search in reverse for an element matching a given value. More...
int searchBinary (const T &aValue, bool aFindFirst=false, int aLo=-1, int aHi=-1) const
Search for the largest value in the array that is less than or equal to a specified value. More...
Protected Attributes
int _size
Size of the array. More...
int _capacity
Current capacity of the array. More...
int _capacityIncrement
Increment by which the current capacity is increased when the capacity of this storage instance is reached. More...
_defaultValue
Default value of elements. More...
T * _array
Array of values. More...
Friends
std::ostream & operator<< (std::ostream &aOut, const Array< T > &aArray)
Implementation of the output operator. More...
std::istream & operator>> (std::istream &in, Array< T > &out)
Detailed Description
template<class T> class OpenSim::Array< T >
A class for storing an array of values of type T.
The capacity of the class grows as needed. To use this template for a class of type T, class T should implement the following methods: default constructor, copy constructor, assignment operator (=), equality operator (==), and less than operator (<).
Version
1.0
◆ ~Array()
template<class T>
virtual OpenSim::Array< T >::~Array ( )
inlinevirtual
Destructor.
When the array is deleted, references to elements of this array become invalid.
◆ Array() [1/2]
template<class T>
OpenSim::Array< T >::Array ( const T & aDefaultValue = T(), int aSize = 0, int aCapacity = Array_CAPMIN )
inlineexplicit
Default constructor.
Parameters
aDefaultValue Default value of an array element. This value is used to initialize array elements as the size of the array is changed. aSize Initial size of the array. The array elements are initialized to aDefaultValue. aCapacity Initial capacity of the array. The initial capacity is guaranteed to be at least as large as aSize + 1.
◆ Array() [2/2]
template<class T>
OpenSim::Array< T >::Array ( const Array< T > & aArray )
inline
Copy constructor.
Parameters
aArray Array to be copied.
◆ append() [1/3]
template<class T>
int OpenSim::Array< T >::append ( const T & aValue )
inline
Append a value onto the array.
Parameters
aValue Value to be appended.
Returns
New size of the array, or, equivalently, the index to the new first empty element of the array.
◆ append() [2/3]
template<class T>
int OpenSim::Array< T >::append ( const Array< T > & aArray )
inline
Append an array of values.
Parameters
aArray Array of values to append.
Returns
New size of the array, or, equivalently, the index to the new first empty element of the array.
◆ append() [3/3]
template<class T>
int OpenSim::Array< T >::append ( int aSize, const T * aArray )
inline
Append an array of values.
Parameters
aSize Size of the array to append. aArray Array of values to append.
Returns
New size of the array, or, equivalently, the index to the new first empty element of the array.
◆ arrayEquals()
template<class T>
bool OpenSim::Array< T >::arrayEquals ( const Array< T > & aArray ) const
inline
◆ computeNewCapacity()
template<class T>
bool OpenSim::Array< T >::computeNewCapacity ( int aMinCapacity, int & rNewCapacity )
inline
Compute a new capacity that is at least as large as a specified minimum capacity; this method does not change the capacity, it simply computes a new recommended capacity.
If the capacity increment is negative, the current capacity is doubled until the computed capacity is greater than or equal to the specified minimum capacity. If the capacity increment is positive, the current capacity increment by this amount until the computed capacity is greater than or equal to the specified minimum capacity. If the capacity increment is zero, the computed capacity is set to the current capacity and false is returned.
Parameters
rNewCapacity New computed capacity. aMinCapacity Minimum new computed capacity. The computed capacity is incremented until it is at least as large as aMinCapacity, assuming the capacity increment is not zero.
Returns
True if the new capacity was increased, false otherwise (i.e., if the capacity increment is set to 0).
setCapacityIncrement()
◆ ensureCapacity()
template<class T>
bool OpenSim::Array< T >::ensureCapacity ( int aCapacity )
inline
Ensure that the capacity of this array is at least the specified amount.
Note that the newly allocated array elements are not initialized.
Parameters
aCapacity Desired capacity.
Returns
true if the capacity was successfully obtained, false otherwise.
◆ findIndex()
template<class T>
int OpenSim::Array< T >::findIndex ( const T & aValue ) const
inline
Linear search for an element matching a given value.
Parameters
aValue Value to which the array elements are compared.
Returns
Index of the array element matching aValue. If there is more than one such elements with the same value the index of the first of these elements is returned. If no match is found, -1 is returned.
◆ get() [1/3]
template<class T>
T* OpenSim::Array< T >::get ( )
inline
Get a pointer to the low-level array.
Returns
Pointer to the low-level array.
Referenced by OpenSim::MarkerPair::getMarkerName().
◆ get() [2/3]
template<class T>
const T* OpenSim::Array< T >::get ( ) const
inline
Get a pointer to the low-level array.
Returns
Pointer to the low-level array.
◆ get() [3/3]
template<class T>
const T& OpenSim::Array< T >::get ( int aIndex ) const
inline
Get a const reference to the value at a specified array index.
If the index is negative or passed the end of the array, an exception is thrown.
For faster execution, the array elements can be accessed through the overloaded operator[], which does no bounds checking.
Parameters
aIndex Index of the desired array element.
Returns
const reference to the array element.
Exceptions
Exception if (aIndex<0)||(aIndex>=_size).
operator[].
◆ getCapacity()
template<class T>
int OpenSim::Array< T >::getCapacity ( ) const
inline
Get the capacity of this storage instance.
◆ getCapacityIncrement()
template<class T>
int OpenSim::Array< T >::getCapacityIncrement ( ) const
inline
Get the amount by which the capacity is increased.
◆ getLast()
template<class T>
const T& OpenSim::Array< T >::getLast ( ) const
inline
Get the last value in the array.
Returns
Last value in the array.
Exceptions
Exception if the array is empty.
◆ getSize()
template<class T>
int OpenSim::Array< T >::getSize ( ) const
inline
◆ insert()
template<class T>
int OpenSim::Array< T >::insert ( int aIndex, const T & aValue )
inline
Insert a value into the array at a specified index.
This method is relatively computationally costly since many of the array elements may need to be shifted.
Parameters
aValue Value to be inserted. aIndex Index at which to insert the new value. All current elements from aIndex to the end of the array are shifted one place in the direction of the end of the array. If the specified index is greater than the current size of the array, the size of the array is increased to aIndex+1 and the intervening new elements are initialized to the default value that was specified at the time of construction.
Returns
Size of the array after the insertion.
◆ operator=()
template<class T>
Array& OpenSim::Array< T >::operator= ( const Array< T > & aArray )
inline
Assign this array to a specified array.
This operator makes a complete copy of the specified array; all member variables are copied. So, the result is two identical, independent arrays.
Parameters
aArray Array to be copied.
Returns
Reference to this array.
◆ operator==()
template<class T>
bool OpenSim::Array< T >::operator== ( const Array< T > & aArray ) const
inline
Determine if two arrays are equal.
Two arrays are equal if their contents are equal. That is, each array must be the same length and their corresponding array elements must be equal.
Parameters
aArray Array to be tested as equal.
Returns
True if equal, false if not equal.
◆ operator[]()
template<class T>
T& OpenSim::Array< T >::operator[] ( int aIndex ) const
inline
Get the array element at a specified index.
This overloaded operator can be used both to set and get element values:
Array<T> array(2);
T value = array[i];
array[i] = value;
This operator is intended for accessing array elements with as little overhead as possible, so no error checking is performed. The caller must make sure the specified index is within the bounds of the array. If error checking is desired, use Array::get().
Parameters
aIndex Index of the desired element (0 <= aIndex < _size).
Returns
Reference to the array element.
get().
◆ remove()
template<class T>
int OpenSim::Array< T >::remove ( int aIndex )
inline
Remove a value from the array at a specified index.
This method is relatively computationally costly since many of the array elements may need to be shifted.
Parameters
aIndex Index of the value to remove. All elements from aIndex to the end of the array are shifted one place toward the beginning of the array. If aIndex is less than 0 or greater than or equal to the current size of the array, no element is removed.
Returns
Size of the array after the removal.
◆ rfindIndex()
template<class T>
int OpenSim::Array< T >::rfindIndex ( const T & aValue ) const
inline
Linear search in reverse for an element matching a given value.
Parameters
aValue Value to which the array elements are compared.
Returns
Index of the array element matching aValue. If there is more than one such elements with the same value the index of the last of these elements is returned. If no match is found, -1 is returned.
◆ searchBinary()
template<class T>
int OpenSim::Array< T >::searchBinary ( const T & aValue, bool aFindFirst = false, int aLo = -1, int aHi = -1 ) const
inline
Search for the largest value in the array that is less than or equal to a specified value.
If there is more than one element with this largest value, the index of the first of these elements can optionally be found, but this can be up to twice as costly.
This method assumes that the array element values monotonically increase as the array index increases. Note that monotonically increase means never decrease, so it is permissible for elements to
A binary search is performed (i.e., the array is repeatedly subdivided into two bins one of which must contain the specified until the appropriate element is identified), so the performance of this method is approximately ln(n), where n is the size of the array.
Parameters
aValue Value to which the array elements are compared. aFindFirst If true, find the first element that satisfies the search. If false, the index of any element that satisfies the search can be returned- which index will be returned depends on the length of the array and is therefore somewhat arbitrary. By default, this flag is false. aLo Lowest array index to consider in the search. aHi Highest array index to consider in the search.
Returns
Index of the array element that has the largest value that is less than or equal to aValue. If there is more than one such elements with the same value and aFindFirst is set to true, the index of the first of these elements is returned. If an error is encountered (e.g., the array is empty), or the array contains no element that is less than or equal to aValue, -1 is returned.
◆ set()
template<class T>
void OpenSim::Array< T >::set ( int aIndex, const T & aValue )
inline
Set the value at a specified index.
Parameters
aIndex Index of the array element to be set. It is permissible for aIndex to be past the current end of the array- the capacity will be increased if necessary. Values between the current end of the array and aIndex are not initialized. aValue Value.
Referenced by OpenSim::MarkerPair::setMarkerName().
◆ setCapacityIncrement()
template<class T>
void OpenSim::Array< T >::setCapacityIncrement ( int aIncrement )
inline
Set the amount by which the capacity is increased when the capacity of of the array in exceeded.
If the specified increment is negative, the capacity is set to double whenever the capacity is exceeded.
Parameters
aIncrement Desired capacity increment.
◆ setSize()
template<class T>
bool OpenSim::Array< T >::setSize ( int aSize )
inline
Set the size of the array.
This method can be used to either increase or decrease the size of the array. If this size of the array is increased, the new elements are initialized to the default value that was specified at the time of construction.
Note that the size of an array is different than its capacity. The size indicates how many valid elements are stored in an array. The capacity indicates how much the size of the array can be increased without allocated more memory. At all times size <= capacity.
Parameters
aSize Desired size of the array. The size must be greater than or equal to zero.
◆ size()
template<class T>
int OpenSim::Array< T >::size ( ) const
inline
Alternate name for getSize().
◆ trim()
template<class T>
void OpenSim::Array< T >::trim ( )
inline
Trim the capacity of this array so that it is one larger than the size of this array.
This is useful for reducing the amount of memory used by this array. This capacity is kept at one larger than the size so that, for example, an array of characters can be treated as a NULL terminated string.
◆ updElt()
template<class T>
T& OpenSim::Array< T >::updElt ( int aIndex ) const
inline
Get a writable reference to value at a specified array index.
If the index is negative or passed the end of the array, an exception is thrown.
For faster execution, the array elements can be accessed through the overloaded operator[], which does no bounds checking.
Parameters
aIndex Index of the desired array element.
Returns
Writable reference to the array element.
Exceptions
Exception if (aIndex<0)||(aIndex>=_size).
operator[].
◆ updLast()
template<class T>
T& OpenSim::Array< T >::updLast ( ) const
inline
Get writable reference to last value in the array.
Returns
writable reference to Last value in the array.
Exceptions
Exception if the array is empty.
◆ operator<<
template<class T>
std::ostream& operator<< ( std::ostream & aOut, const Array< T > & aArray )
friend
Implementation of the output operator.
The output for an array looks like the following:
T[0] T[1] T[2] ... T[size-1].
Parameters
aOut Output stream. aArray Array to be output.
Returns
Reference to the output stream.
◆ operator>>
template<class T>
std::istream& operator>> ( std::istream & in, Array< T > & out )
friend
◆ _array
template<class T>
T* OpenSim::Array< T >::_array
protected
◆ _capacity
template<class T>
int OpenSim::Array< T >::_capacity
protected
Current capacity of the array.
◆ _capacityIncrement
template<class T>
int OpenSim::Array< T >::_capacityIncrement
protected
Increment by which the current capacity is increased when the capacity of this storage instance is reached.
If negative, capacity doubles.
◆ _defaultValue
template<class T>
T OpenSim::Array< T >::_defaultValue
protected
Default value of elements.
◆ _size
template<class T>
int OpenSim::Array< T >::_size
protected
Size of the array.
Also the index of the first empty array element.
The documentation for this class was generated from the following file:
• OpenSim/Common/Array.h |
# I.E. Irodov Solutions on Elementary Particles
I.E. Irodov Solutions Chapter 6.7 Elementary Particles is a premier study tool for students who are looking to develop a fresh approach in solving questions given in this chapter. Elementary particles, also known as fundamental particles, are subatomic particles which cannot be broken down into further sub-structures. Students can find detailed answers provided in the I.E. Irodov solutions which will further help them to take their preparation to a higher level and understand this chapter in a better way.
### I.E. Irodov Solutions on Elementary Particles
1: Calculate the kinetic energies of protons whose momenta are 0.10, 1.0, and 10 GeV/c, where c is the velocity of light.
Solution:
1. $T = \sqrt{c^2p^2+m_o^2c^4}-m_oc^2$
Thus, T = 5.3 MeV for p = 0.10 GeV/c = 5.3 x 10-3 GeV
T = 0.433 GeV for p = 1.0 GeV/c
T = 9.106 GeV for p = 10 GeV/c
Here we have used mo c2 = 0.938 GeV
2: Find the mean path travelled by pions whose kinetic energy exceeds their rest energy η = 1.2 times. The mean lifetime of very slow pions is ζo = 25.5 ns.
Solution:
1. Energy of pions is (1 + η) mo c2 and is equal to (mo c2)/ √(1-β2)
Hence 1/ √(1-β2) = 1 + η of pion. Hence time dilation factor is 1 + √ and the distance traversed by the pion in its lifetime will be
c β 𝜏0/ √(1-β2) = c 𝜏o √(η(2+ η)) = 15.0 metres
On substituting the values of various quantities. (Note. The factor 1/√(1-β2) can be looked at as a time dilation effect in the laboratory frame or as length contraction factor brought to the other side in the proper frame of the pion).
3: Negative pions with kinetic energy T = 100 MeV travel an average distance l = 11 m from their origin to decay. Find the proper lifetime of these pions.
Solution:
1. From the previous problem, l = c 𝜏o √(η(2+ η))
where η = (T/m π c2), mx is the rest mass of pions.
Substitution gives 𝜏o = l/c√(η(2+ η)) = 2.63 ns = lmxc/√T(T+2m π c2)
where we have used η = 0.716
4: There is a narrow beam of negative pions with kinetic energy T equal to the rest energy of these particles. Find the ratio of fluxes at the sections of the beam separated by a distance l = 20 m. The proper mean lifetime of these pions is ζo = 25.5 ns.
Solution:
1. Here η = T/mc2 = 1, so the life time of the pion in the laboratory frame is η = (1+ η) 𝜏o =2 𝜏o
The law of radioactive decay implies that the flux decreases by the factor.
5: A stationary positive pion disintegrated into a muon and a neutrino. Find the kinetic energy of the muon and the energy of the neutrino.
Solution:
1. Energy-momentum conservation implies
6: A stationary positive muon disintegrated into a positron and two neutrinos. Find the greatest possible kinetic energy of the positron.
Solution:
1. Solution: The reaction is,
μ+ ->e+ + ve+vμ
The neutrinoes are massless. The positron will carry largest momentum if both neutriones (ve and vμ) move in the same direction in the rest frame of the nuon. Then the final product is effectively a two body system is
(Te)max = [(mμ – mc)2]/2mμ ] c2
On substituting values, we get (Te)max =52.35 MeV
7: A stationary neutral particle disintegrated into a proton with kinetic energy T = 5.3 MeV and a negative pion. Find the mass of that particle. What is its name?
Solution:
1. By conservation of energy-momentum
Mc2 = Ep + Ex
$O = \vec{P_p} + \vec{P_\pi}$
Then, $m^2_\pi c^4 = E_\pi^2 - \vec{P_\pi}c^2 = (Mc^2-E_p)^2-c^2 \vec{P_p}$
=M2c4 – 2Mc2Ep + mp2c4
This is a quadratic equation in M, M2 – 2(Ep/c2)M + mp2 – mπ2 = 0
Using Ep = mpc2 + T and solving we get
$(M -\frac{E_p}{c^2})^2= \frac{E_p^2}{c^4}-m_p^2+m_\pi^2$
Hence,$M = \frac{E_p}{c^2} + \sqrt{\frac{E_p^2}{c^4}-m_p^2+m_\pi^2}$
on putting values, we get M = 1115.4 MeV/c2
From the table of masses we identify the particle as a ∧ particle.
8: A negative pion with kinetic energy T = 50 MeV disintegrated during its flight into a muon and a neutrino. Find the energy of the neutrino outgoing at right angles to the pion's motion direction.
Solution:
1. By conservation of energy
Where Ev = energy of the neutrino.
on writing $\sqrt{m_\pi^2 c^4 + c^2p^2_\pi}=m_\pi c^2+T$
on putting values, we get Ev = 21.93 MeV.
9: A positron with kinetic energy T = 750 keV strikes a stationary free electron. As a result of annihilation, two gamma quanta with equal energies appear. Find the angle of divergence between them.
Solution:
1. By momentum conservation
$\sqrt{E^2-m_e^2c^4}=2 \frac{E+m_ec^2}{2}cos(\theta/2)$
Or $cos(\theta/2) = \sqrt{\frac{E-m_ec^2}{E+m_ec^2}}=\sqrt{\frac{T}{T+2m_ec^2}}$
Or θ = 98.80.
10: Find the threshold energy of gamma quantum required to form (a) an electron-positron pair in the field of a stationary electron;
(b) a pair of pions of opposite signs in the field of a stationary proton.
Solution:
1. We know,
$E_{th}=\frac{(\sum m_i)^2-M^2}{2M}c^2$
when the projectile is a photon
(a) for γ + e- -> e- + e- + e+
Eth = [9me2-me2/2me] c2 = 2.04 MeV
(b) for γ + p -> p + π- π+
$E_{th}=\frac{(M_p+2M_\pi)^2-M^2_p}{2M_P}c^2$
=2 (mπ + m2π/Mp)c2 = 320.8 MeV
11: Protons with kinetic energy T strike a stationary hydrogen target. Find the threshold values of T for the following reactions:
(a) p+p→p+p+p+$\tilde{p}$
(b) p+p→p+p+p+πo
Solution:
1. (a) T ≥ Tth = [(16mp2-4mp2)/2mp]c2 = 5.63 GeV
(b) T ≥ Tth = [((2mp-m πo2)-4mp2)/2mp]c2 = 0.280 GeV
12: Find the strangeness S and the hypercharge Y of a neutral elementary particle whose isotopic spin projection is Tz = +1/2 and baryon charge B = +1. What particle is this?
Solution:
1. From the Gell-Mann Nishijima formula
Q=Tz + Y/2
We get, O = (1/2) + Y/2 or Y = -1
Also, Y = B+S
Or S = -2
Thus, the particle is =o0. |
# Analyse canonique généralisée d'un flux de données d'espérance variable dans le temps
1 BIGS - Biology, genetics and statistics
Inria Nancy - Grand Est, IECL - Institut Élie Cartan de Lorraine
Abstract : Consider a data stream and suppose that each multidimensional data $z_n$ is a realization of a random vector $Z_n$ whose expectation $\theta_n$ varies with time. Let $\tilde{Z}_n=Z_n-\theta_n$ and suppose that the vectors $\tilde{Z}_n$ form an i.i.d. sample of a random vector $\tilde{Z}$. Stochastic approximation processes using data blocks are used to estimate on-line direction vectors of the principal axes of the generalized canonical correlation analysis of $\tilde{Z}$.
keyword :
Document type :
Conference papers
Domain :
Cited literature [5 references]
https://hal.inria.fr/hal-00750883
Contributor : Romain Bar Connect in order to contact the contributor
Submitted on : Tuesday, November 13, 2012 - 9:28:24 AM
Last modification on : Thursday, January 20, 2022 - 5:27:04 PM
Long-term archiving on: : Thursday, February 14, 2013 - 3:05:09 AM
### File
soumission.pdf
Files produced by the author(s)
### Identifiers
• HAL Id : hal-00750883, version 1
### Citation
Jean-Marie Monnez, Romain Bar. Analyse canonique généralisée d'un flux de données d'espérance variable dans le temps. XIXèmes Rencontres de la Société Francophone de Classification - SFC 2012, Oct 2012, Marseille, France. ⟨hal-00750883⟩
Record views |
### Author Topic: What graphing calculators does your school have? (Read 5886 times)
0 Members and 1 Guest are viewing this topic.
#### annoyingcalc
• LV10 31337 u53r (Next: 2000)
• Posts: 1950
• Rating: +140/-72
• Found in Eclipse.exe
##### What graphing calculators does your school have?
« on: October 17, 2012, 10:55:29 pm »
Im taking honors math and we have crappy ti-80s the only good calculators (besides my 10 calculators) are the teachers ti-83 NO plus
« Last Edit: October 18, 2012, 02:29:46 am by Art_of_camelot »
This used to contain a signature.
#### Rhombicuboctahedron
• LV6 Super Member (Next: 500)
• Posts: 437
• Rating: +41/-6
##### Re: What graphing calculators do your school have?
« Reply #1 on: October 17, 2012, 11:07:53 pm »
In my school, every math classroom has its oown set of 30 Nspire’s, and a few Advanced Placement classes have 60.
But, for the standardized tests, every student gets a calculator, so I imagine that there are enough calculators for every student in one grade to get them.
So at least 800 calculators (and I have to update the OS on nearly all of them!)
But, we have had a few grades with over a 1000 students, so there might even be 1000 Nspires.
That’s a lot of Nspires!
However, all of my teachers have only ever used the 84 faceplate, and it takes us about ten minutes for the class to relearn how to use the Nspire if we ever use it.
Plus we have a few hundred scientific calculators.
#### _Nicco_
• LV4 Regular (Next: 200)
• Posts: 173
• Rating: +6/-0
##### Re: What graphing calculators do your school have?
« Reply #2 on: October 17, 2012, 11:25:05 pm »
At my school only a few of the upper level math classes have a class set of Ti-84's and some have a couple Ti-83's. You are also able to borrow a Ti-83 from our library for the year if you are in AP Statistics.
They say that your signature is supposed to go here...
#### Juju
• Incredibly sexy mare
• Coder Of Tomorrow
• LV13 Extreme Addict (Next: 9001)
• Posts: 5730
• Rating: +500/-19
• Weird programmer
##### Re: What graphing calculators do your school have?
« Reply #3 on: October 17, 2012, 11:45:58 pm »
At my high school every grade 11 student had a TI-82 lent to him (in grade 10 it's a set of 30 TI-82s for everyone), a few people (myself included) had a TI-83+ though. And then I graduated to college and they disallowed calculators.
« Last Edit: October 17, 2012, 11:46:33 pm by Juju »
Remember the day the walrus started to fly...
I finally cleared my sig after 4 years you're happy now?
This signature is ridiculously large you've been warned.
The cute mare that used to be in my avatar is Yuki Kagayaki, you can follow her on Facebook and Tumblr.
#### DJ Omnimaga
• Former TI programmer
• CoT Emeritus
• LV15 Omnimagician (Next: --)
• Posts: 55830
• Rating: +3151/-232
• CodeWalrus founder & retired Omnimaga founder
##### Re: What graphing calculators do your school have?
« Reply #4 on: October 18, 2012, 12:35:38 am »
In my case it was like this:
Minimum requirement: scientific calc
What people had: Mostly scientific calcs, but a few had TI-80's, 82's (original model) and 83+'s.
Calculators the class lent: none
Calculators lent at final exam: none
Grade 10 hard maths (426 & 436):
Minimum requirement: TI-82
What people had: Mostly TI-83+'s, a few people had TI-80's and TI-82's as well. Only one redesigned 82 (1996), one 83 and two 83+SE (including mine and a teacher).
Calculators the class lent: 20-25 TI-82's (original design)
Calculators lent at final exam: 20-25 TI-82's (original design)
Minimum requirement: TI-80
What people had: Mostly TI-83+'s and 80's, a few people had TI-82's as well (all the original design). I was the lone 83+SE owner.
Calculators the class lent: 20-25 TI-82's (original design)
Calculators lent at final exam: 20-25 TI-82's (PARCUS/3rd redesign from 2001)
Grade 11 hard maths (526 & 536):
Minimum requirement: TI-82
What people had: Mostly TI-83+'s, a few people had TI-80's and TI-82's as well.
Calculators the class lent: 20-25 TI-82's (original design)
Calculators lent at final exam: 20-25 TI-82's (if I remember, they were PARCUS/3rd redesign from 2001)
I believe they got the Parcus 82 models around the end of my final year of hi school. Nobody had TI-84+ nor TI-82 STATS calcs because they did not exist yet. I did not see any other graphing calc model. Teachers had TI-82, 83, 83+ and 83+SE Viewscreen models if I remember.
Btw the only calc models that are sold in Quebec anymore are:
TI-83+
TI-84+
TI-84+SE (rare)
TI-89T
TI-Nspire CX
Casio FX-cg10
Around 2001-03 it was the following:
TI-80
TI-83+
TI-83+SE
TI-86 (until 2002)
TI-89
Casio color screen calc (I believe it was the CFX-9970GC Plus or 9850GC Plus, but it was not the white version)
Another Casio calc that was about $49.99, which I believe was a FX-7400G series calc (until 2002) HP-39g (when I tried it at Staples it BLOD'd on me) (until 2002) Afterward they only had 80s, 83+s, 83+SE's and 89's until early 2006 or so, then added Nspires and Casio FX-9750G around Early 2008. « Last Edit: October 18, 2012, 12:49:27 am by DJ_O » In case you are wondering where I went, I left Omni back in 2015 to form CodeWalrus due to various reasons explained back then, but I stopped calc dev in 2016 and am now mostly active on the CW Discord server at https://discord.gg/cuZcfcF T-Shirt store | Reverbnation | Facebook | Youtube | Twitter | Spotify #### nxtboy III • LV8 Addict (Next: 1000) • Posts: 795 • Rating: +26/-1 • NXT! ##### Re: What graphing calculators do your school have? « Reply #5 on: October 18, 2012, 12:52:02 am » My honors class has like, 20 or so TI-84s #### floris497 • LV5 Advanced (Next: 300) • Posts: 210 • Rating: +8/-0 ##### Re: What graphing calculators do your school have? « Reply #6 on: October 18, 2012, 01:13:12 am » my entire school (±1500) has a TI-84+ instead of me i have a Nspire and a TI-84+ SE but most people don't need the calc so its pure loss of money. « Last Edit: October 18, 2012, 01:14:05 am by floris497 » #### Adriweb • Editor • LV10 31337 u53r (Next: 2000) • Posts: 1708 • Rating: +229/-17 ##### Re: What graphing calculators do your school have? « Reply #7 on: October 18, 2012, 02:15:05 am » My engineer school generally doesn't allow calculators, simply. However, for exams where it is really needed (rarely, according to them...), they have about 100-150 TI-30X II . My High school however allowed any calc for exams/tests, but since I live in France, students pay for (and bring) their own calc... I don't know if the school actually even has some calculators of its own to lend to students when needed. (Btw, I was in a private school but I believe it's kinda the same for anywhere, anyway) In my year of High School, I remember the school were advising TI-84+ (and TI-89T IIRC?) for the students to buy (useful for homework etc.) but they also have 84+ anyway to lend. « Last Edit: October 18, 2012, 02:15:42 am by adriweb » My calculator programs TI-Planet.org co-admin. TI-Nspire Lua programming : Tutorials | API Documentation #### aeTIos • Nonbinary computing specialist • LV12 Extreme Poster (Next: 5000) • Posts: 3913 • Rating: +184/-32 ##### Re: What graphing calculators does your school have? « Reply #8 on: October 18, 2012, 02:58:41 am » At our school, we have: TI-30X II TI-30XB Multiview (Solar) TI-83(+) TI-84+ (SE) TI-Nspire CX In brackets are others which are also used. I'm not a nerd but I pretend: #### Darl181 • «Yo buddy, you still alive?» • CoT Emeritus • LV12 Extreme Poster (Next: 5000) • Posts: 3408 • Rating: +305/-13 • VGhlIEdhbWU= ##### Re: What graphing calculators does your school have? « Reply #9 on: October 18, 2012, 05:13:23 am » The bookroom at my high school lends out mostly 83pbe's, along with some pink 84pse's (popularized by the included PuzzPack) and the occasional 82. Seems like they kind of dole them out indiscriminately at that, in one class there were all three different models and someone even had a viewscreen 83 Also the little 30-packs of TI-108s, tho those aren't exactly graphing are they « Last Edit: October 18, 2012, 05:14:08 am by Darl181 » Vy'o'us pleorsdti thl'e gjaemue #### lkj • LV6 Super Member (Next: 500) • Posts: 485 • Rating: +58/-1 ##### Re: What graphing calculators does your school have? « Reply #10 on: October 18, 2012, 08:10:44 am » At my school everyone has to buy a Nspire CX CAS, and before a classic Nspire CAS. About six years ago they had Voyage 200s, but now those are 350$ (converted to US $). The school has a Nspire CAS clickpad for every maths/physics teacher and some ancient non-scientific calcs for exams. But we almost never use calcs in class, and when we use them a scientific calc would normally be enough. #### ben_g • Hey cool I can set a custom title now :) • LV9 Veteran (Next: 1337) • Posts: 1002 • Rating: +125/-4 • Asm noob ##### Re: What graphing calculators does your school have? « Reply #11 on: October 18, 2012, 01:54:00 pm » My school doesn't have calculators. All calculators used during class are owned by the students, not by the school. My projects - The Lost Survivors (Unreal Engine) ACTIVE [GameCommandoSquad main project] - Oxo, with single-calc multiplayer and AI (axe) RELEASED (screenshot) (topic) - An android version of oxo (java) ACTIVE - A 3D collision detection library (axe) RELEASED! (topic)(screenshot)(more recent screenshot)(screenshot of it being used in a tilemapper) Spoiler For inactive: - A first person shooter with a polygon-based 3d engine. (z80, will probably be recoded in axe using GLib) ON HOLD (screenshot) - A java MORPG. (pc) DEEP COMA(read more)(screenshot) - a minecraft game in axe DEAD (source code available) - a 3D racing game (axe) ON HOLD (outdated screenshot of asm version) This signature was last updated on 20/04/2015 and may be outdated #### DJ Omnimaga • Former TI programmer • CoT Emeritus • LV15 Omnimagician (Next: --) • Posts: 55830 • Rating: +3151/-232 • CodeWalrus founder & retired Omnimaga founder ##### Re: What graphing calculators does your school have? « Reply #12 on: October 18, 2012, 04:55:24 pm » In Quebec I find it ironic that in early hi school we are not allowed to use any calc, in mid/late hi school we can use graphing calcs then suddenly in college we can't anymore again. Also i never ever saw a Voyage 200 anywhere IRL. Not even a TI-92+ (although I got a 73, 85 and 92 on Ebay). I believe that Consumer's Distributing (anyone remember those stores?) had TI-81's, 82's and 85's when I was kid, along with some Casio calcs. A lot ranged from$69.99 to \$129.99 if I remember.
In case you are wondering where I went, I left Omni back in 2015 to form CodeWalrus due to various reasons explained back then, but I stopped calc dev in 2016 and am now mostly active on the CW Discord server at https://discord.gg/cuZcfcF
#### blue_bear_94
• Posts: 801
• Rating: +25/-35
• Touhou Enthusiast / Former Troll / 68k Programmer
##### Re: What graphing calculators does your school have?
« Reply #13 on: October 18, 2012, 05:32:49 pm »
In my school, 83+/84+/SEs are used, although some own TI-89s or Nspires. I have never personally known anyone at my school who uses a Casio.
EDIT: I am currently writing an editorial to convince the school to start using Casio Prizms.
« Last Edit: October 18, 2012, 05:48:59 pm by blue_bear_94 »
Due to dissatisfaction, I will be inactive on Omnimaga until further notice. (?? THP hasn't been much success and there's also the CE. I might possibly be here for a while.)
If you want to implore me to come back, or otherwise contact me, I can be found on GitHub (bluebear94), Twitter (@melranosF_), Reddit (/u/Fluffy8x), or e-mail (if you know my address). As a last resort, send me a PM on Cemetech (bluebear94) or join Touhou Prono (don't be fooled by the name). I've also enabled notifications for PMs on Omnimaga, but I don't advise using that since I might be banned.
Elvyna (Sunrise) 4 5%
TI-84+SE User (2.30 2.55 MP 2.43)
TI-89 Titanium User (3.10)
Casio Prizm User? (1.02)
Bag 東方ぷろの
#### epic7
• Chopin!
• LV11 Super Veteran (Next: 3000)
• Posts: 2200
• Rating: +135/-8
• I like robots
##### Re: What graphing calculators does your school have?
« Reply #14 on: October 18, 2012, 06:14:43 pm »
The school has some random scientific calculators, but other than that, we buy them ourselves.
9th grade Algebra 1 and Geometry require any kind of calculator and in Algebra 2 we just need any kind of graphing calculator.
My Algebra 2 class is 70% 84+/84+se, 29% 83+, and 1% nspire cx (me ). I haven't seen anyone in my class with a 89/casio or any other ones.
« Last Edit: October 18, 2012, 06:14:50 pm by epic7 » |
# Web scraping and multi-threading in Mathematica
I'm working in some web scraping using Mathematica, and today, to speed-up the process, I used bash commands (xargs with parallel options with curl and wget) using ReadList or Run. I would like to do all this inside Mathematica, but I miss multi-thread capability with asynchronous evaluation. I could use more cores, but it's not the answer because the lag is due to time lag, not lack of processor capacity.
In bash I can do things like:
cat url.txt | xargs - n1 - P20 wget
Even with 4 cores it distribute the download process in 20 processes.
In Mathematica I can do this:
data = ParallelMap[Import,urlList]
But you get limited to cores number.
I thought that it would be natural to be multi-threaded if Mathematica is able to use multiple cores. Any clues?
-
Did you try LaunchKernels[n]? – belisarius Oct 3 '12 at 13:01
I think at some point one has to accept that Mathematica is not the best tool for every possible job. Here's an idea, though: why not take the source code of wget or aria2, patch it, and compile it as a MathLink executable or a "Wolfram Library" for use with LibraryLink? – Oleksandr R. Oct 3 '12 at 14:11
Hi Belisairus. Great tip!.. I'll make some tests and put what I get. It appears to works. – Murta Oct 3 '12 at 14:27
@OleksandrR. interesting idea. I'm wondering how nightmarish that would be ... Obviously, the functionality could be mapped to options/arguments, not simple, but it may be doable. – rcollyer Oct 3 '12 at 14:31
@OleksandrR. seems easier to just call them via the command line from mathematica... – acl Dec 8 '12 at 17:31
In Mathematica 9, you can now use URLFetchAsynchronous and URLSaveAsynchronous. These perform the HTTP request asynchronously in threads.
-
And you can keep track of how many threads you are using with Length@AsynchronousTasks[] – Gustavo Delfino Dec 8 '12 at 16:08
CloseKernels[]; LaunchKernels[16]; |
# Inverse Functions
Inverse Function Definition
If I ask you a question “What is an inverse function?” What answer do we have? Let us see. Inverse functions are functions that can inverse other functions. It is just like undoing another function that leaves you to where you started. If a function is to drive from home to the shop then the inverse function will be to drive from the shop to back home. It is very much like a game of “doing” and “undoing”. A function starts with a value then performs some operation on it and the created output leads to the answer. The inverse function starts with the output answer then performs some operation on it and brings us back to the starting value. An inverse function basically interchanges the first and second elements of each pair of the original function.
For example, consider that a graph of a function has (a and b) as its points, the graph of an inverse function will have the points (b and a ). An inverse function is written as f$^{-1}$(x)
Let us take another example, consider f(x) = 3x – 6. What happens to x? We first multiply by 3 and then subtract 6 from the result. But in the reverse function, we follow the steps backward by first adding 6 to undo the subtraction and then divide it by 3 to undo the multiplication.
How to find the Inverse of a Function
Since we now know what an inverse function is, wouldn’t you want to know how to solve inverse functions? What are we waiting for then? Let’s unwrap the mystery.
There are three methods to find the inverse of a function.
1. Simply swapping the ordered pairs
2. Solve it algebraically
3. Using A graph
Finding Inverse By Swapping: As the name suggests, we just need to swap the values of x and y.
Examples Time:
Example 1) Find the inverse function if f(x) = {(3,4)(1,-2)(5,-1)(0,2)}
Solution 1) Since the values x and y are used only once, the function and the inverse function is a one-to-one function. Therefore, the inverse function will be:
f$^{-1}$(x) = {(4,3)(-2,1)(-1,5)(2,0)}
Finding Inverse Algebraically: To find inverse algebraically we have to follow three steps:
Step 1) Set the function as y
Step 2) Swap the variables x and y
Step 3) Solve y
Example 1) f(x) = x - 4
Solution 1) y = x - 4 (step 1)
x = y - 4 (step 2)
x + 4 = y (step 3)
f$^{-1}$(x) = x + 4 (one-to-one function)
Finding Inverse Using Graph: The graph of an inverse function is the reflection of the original graph over the identity line y = x.
Example 1) Graph the inverse function of y = 2x + 3
Consider the original function as y = 2x + 3 which is drawn in blue. If we reflect it over the identity line that is y = x, the original function will become the red dotted line on the graph. The red straight dotted line passes the vertical line test for functions. The inverse function of y = 2x + 3 is also a function.
[Image will be Uploaded Soon]
Types of Inverse Function
There are different types of inverse functions like the inverse of trigonometric functions, the inverse rational functions, inverse hyperbolic functions, and inverse log functions.
Inverse Trigonometric Functions
We can also call the inverse trigonometric functions as arc functions because they produce the length of the arc which is necessary to obtain that particular value. There are six inverse trigonometric functions which are named as:
1. arcsine (sin$^{-1}$),
2. arccosine (cos$^{-1}$),
3. arctangent (tan$^{-1}$),
4. arcsecant (sec$^{-1}$),
5. arccosecant (cosec$^{-1}$),
6. arccotangent (cot$^{-1}$).
Inverse Rational Function
A rational number is a number which can be written as f(x) = P(x)/Q(x) where Q(x) is ≠ 0. In order to find the inverse function of a rational number, we have to follow the following steps.
Step 1: first we have to replace f(x) = y
Step 2: Then interchange the values x and y
Step 3: In this step, we have to solve for y in terms of x
Step 4: Finally we have to replace y with f$^{-1}$(x) and thus we can obtain the inverse of the function.
Inverse Hyperbolic Functions
Just like the inverse trigonometric function, in the same way, the inverse hyperbolic functions are the inverses of the hyperbolic functions. The 6 main inverse hyperbolic functions are:
1. sinh$^{-1}$
2. cosh$^{-1}$
3. tanh$^{-1}$
4. csch$^{-1}$
5. coth$^{-1}$
6. sech$^{-1}$
Inverse Logarithmic Functions and Inverse Exponential Function
The natural logarithm functions are inverse of the exponential functions.
Inverse Function Examples and Solutions
## Example 1) Find the Inverse Function
x 1 -2 -1 0 2 3 4 -3 f(x) 2 0 3 -1 1 -2 5 1
Solution 1) Since the value of 1 is repeated twice, the function and the inverse function are not one-to-one function. Therefore, after swapping the values, the inverse function will be:
f$^{-1}$(x) = {(2,1)(0,-2)(3,-1)(-1,0)(1,2)(-2,3)(5,4)(1,-3)}
Example 2) Find the function f(x) if the inverse function is given as f$^{-1}$(x) = - $\frac{1}{2}$x+1
Solution 2) At first look the question might seem a different type of problem but it is not. It can be solved in the same way as example 1 using the same steps.
y = - $\frac{1}{2}$x+1
x = - $\frac{1}{2}$y+1
x - 1 = - $\frac{1}{2}$y
-2(x-1) = y
f(x) = y = -2x + 2
FAQ (Frequently Asked Questions)
Q1. Is Reciprocal and Inverse the Same?
Ans. A reciprocal can be an inverse but an inverse cannot be reciprocal. A reciprocal is a multiplicative inverse. Basically an inverse function undoes the original function by switching the input and output. For example, the reciprocal of x = y + 2 will be x = 1/ y+4 whereas its inverse will be y = x - 2. Also a reciprocal can be represented in different ways but does not have any specific sign whereas an inverse is represented as f-1(x). |
# Boyle temperature
In thermodynamics, the Boyle temperature is the temperature at which a non ideal gas behaves most like an ideal gas. At Boyle temperature, set the compressibility factor $Z$ to 1, and one can obtain
$T_b = \frac{a}{Rb}$
Where a and b are van der Waals parameters.
$p = RT (\frac{1}{V_m} + \frac{B_{2}(T)}{V_m^2} + \frac{B_{3}(T)}{V_m^3} + \dots)$
This is the virial equation of state and describes a real gas. The Boyle temperature is formally defined as the temperature for which the second virial coefficient, $B_{2}(T)$ becomes 0. It is at this temperature that the attractive forces and the repulsive forces acting on the gas particles balance out. Since higher order virial coefficients are generally much smaller than the second coefficient, the gas tends to behave as an ideal gas over a wider range of pressures when the temperature reaches the Boyle temperature (or when $c = \frac{1}{V_m}$ or p are minimized).
In any case, when the pressures are low, the second virial coefficient will be the only relevant one because the remaining concern terms of higher order on the pressure. We then have
$\frac{\mathrm{d}Z}{\mathrm{d}p} = 0 \qquad\mbox{if } p=0$
where $Z$ is the compressibility factor |
# Setting up Unit Tests¶
The Unit Test runs a unit testing framework that produces a JUnit XML file with the results of the tests at a location stored in the $CG_JUNIT_XML_LOCATION environment variable. The resulting score of this test is the fraction of successful tests divided by the total number of tests that were run, multiplied by the weight of the test. 1. Press the “ Unit Test” button to add a new Unit Test test to your Test Category. 2. Enter the command that will run your test suite. The command should write a JUnit XML file to the location given in the $CG_JUNIT_XML_LOCATION environment variable.
## Compatibility scripts¶
For most unit testing frameworks it is necessary to install additional software and to figure out how to make the framework output its results to the correct location. We provide wrapper scripts for a growing list of frameworks at our AutoTest Examples GitHub repository that handle all of this for you. Is your preferred testing framework not listed or does a script not work as you need it to? Please send an email to [email protected] so we can discuss the possibilities!
All wrapper scripts have a similar interface and procedure for running tests. To see the options and commands provided by a script run it with the --help flag.
### Initial setup¶
Upload the wrapper script and the other files in the fixtures subdirectory of the testing framework as fixtures to your AutoTest setup. Also upload the test files that you want to execute as fixtures.
### Installing dependencies¶
If extra software needs to be installed to run the testing framework the wrapper script provides an install command that will install all required dependencies. This should be run in the “Global setup script” section of your AutoTest configuration.
For example, to install JUnit 4 and its dependencies you would run
### Running tests¶
Running the tests can be similarly tricky when a language needs to know about certain locations of libraries it depends on, but also because you need to figure out how you can make the framework output its results in the correct format, or in the correct location. The wrapper scripts handle this in their run command.
The scripts extract the output location from $CG_JUNIT_XML_LOCATION and then unset it before running the tests. This way students have no access to this information when their code is running. The testing framework is then configured to output its results at that location and the tests are executed. For example, to run a JUnit 4 test class named MyClass you would run $FIXTURES/cg-junit run MyClass
Note
The exact arguments to the run` command of each script may differ from script to script. They are described in more detail in the readme files accompanying each script. |
# What should the character limit(s) for first/last name inputs be? [closed]
We want to create input fields for a user's first and last names. What should the minimum and maximum limits be, if any, and why?
• None. No limits at all, upper or lower. If you set a limit then there will be people who can't add their details correctly. What is your reason for wanting to put limits on there? Worth a read is the classic post falsehoods programmers believe about names – JonW Apr 10 '14 at 12:34
• @JonW - Database data types have limits. Therefore, there has to be a limit. Whether it's VARCHAR(200), VARCHAR(2000), or VARCHAR(MAX), it's still a limit. – Code Maverick Apr 10 '14 at 14:17
• @JonW - Riiiiiiight ... hence why I used VARCHAR. You could also use NVARCHAR to get names with Unicode chars. Point is, you have to have a limit. No limits is an impossibility. – Code Maverick Apr 10 '14 at 14:27
• @JonW None of those falsehoods, while interesting, address length. The reason why you want to put a limit on fields is for security purposes. Say you have code that sanitizes input but an attacker finds a vulnerability in that sanitation that allows them to execute arbitrary code. If your input field doesn't allow them to enter more than 100 chars, then it decreases their options for exploiting the vulnerability. It is entirely reasonable to say that names should have an upper limit in length. If the field is required then obviously the lower limit is at least 1 char. – Charles Wesley Apr 10 '14 at 14:36
• The question here is really what is the shortest length possible while not hindering usability, which is a valid UX question. – Charles Wesley Apr 10 '14 at 14:38
In theory the correct answer is no upper limit for name lengths. Allow the user to enter whatever their name is using whatever characters are available to them so that you will never run into a circumstance where someone is prevented from entering their valid real name.
In practice that is not possible to implement.
There have to be limitations.
These limitations can be subjective, such as what constitutes a "real" name so that you don't end up with names like :
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
To this end Facebook, for example, has a fairly straight forward set of constraints they enforce:
Names can't include:
• Symbols, numbers, unusual capitalization, repeating characters or punctuation
• Characters from multiple languages
• Titles of any kind (ex: professional, religious, etc)
• Words, phrases, or nicknames in place of a middle name
• Offensive or suggestive content of any kind
Length is not explicitly mentioned, however according to this SO post the limit is currently 50 chars.
In Active Directory the Display-Name attribute is limited to 256 characters.
These are just two examples that vary. You could research multiple services to see what their length limits are, but the truth is you need to decide for yourself what is acceptable.
## But why have a limit at all?!?
There is one limitation that is not subjective: security.
Any interface that accepts and internalizes user input absolutely must without question treat input as a threat that must be validated and sanitized. Input should be validated to ensure it is of the correct type, length, format, and range.
Input should be sanitized to prevent little bobby tables from ruining your day. But in the case where a weakness in your sanitation is discovered, the validation step (including checking for length) offers protection by limiting how the attacker can exploit a vulnerability.
There is another objective limitation: storage capacity.
There is nobody in any culture in the entire world that has a name that is legitimately 1,073,741,823 bytes long (the upper bound of a ntext data type in SQL Server). But even that is a limit which is a technical limitation of the data store.
## So what should the limit be?
The problem is that no limit is not an option for several reasons; some arguably subjective while others objective, real, and unavoidable.
But we also don't want to have users be unduly constrained.
A well designed system will ensure that both needs are met without the user ever knowing that there is a limitation in place to begin with. It should be transparently secure and usable.
To that end, I think a reasonable limit should be (arbitrarily) 25% longer than the longest name in your current data set. Given a large enough sample, that should ensure you will be giving your users enough breathing room but not allowing a malicious user to try to exploit your system.
• Sure, however even that is only 107 bytes which would be perfectly acceptable in Active Directory, and would leave 1,073,741,716 unused bytes in an ntext column. – Charles Wesley Apr 10 '14 at 15:21
• @JonW - That's only 107 characters long though, and like I said up top, the longest name recorded by Guinness is 226 characters long, which is well within the limits of string storage in any database. – Code Maverick Apr 10 '14 at 15:22
• It may also be worth considering the UX implications of displaying arbitrary length names. – Dan Bryant Apr 10 '14 at 15:59
• I hate Facebook as an example because they do not allow even common punctuation in names. The dot in my name is a bit unusual but I have friends who are unable to enter their actual name which legitimately contains characters Facebook doesn't like. I hope @NogaNitzan's implementation considers the character set as well as the length. – T.Rob Apr 11 '14 at 13:03
Given the diversity of names, I wouldn't...
1. set a floor or ceiling limit on name length,
2. OR even break the name into two separate fields.
Depending on the country / cultural background of a person, they may have a more Westernized [first-name] [surname] name, but they may not. Why possibly bar users from entering their complete name because of arbitrary limits?
If your reason for splitting the first and last names into separate fields is so you could possibly address a user by their first or last name, I would suggest providing an additional, optional field for the user asking for their nickname or how they would like to be addressed.
• Could you show us all how to not set a floor or ceiling limit on name length? What data type do you use to store an infinite amount of data? – Code Maverick Apr 10 '14 at 14:36
• First-name surname split into 2 different fields is also really annoying even if your name does fit into that paradigm. Most people instintively type their full name (it's an automatic thing almost like a signature), and then have to go back and correct it to split into 2 fields. – Franchesca Apr 10 '14 at 15:12
• If you don't set an upper limit, some smart-alec is going to come along and drop a copy of the King James Bible in the name field. – Mark Apr 11 '14 at 7:13
• @Mark Nice hyperbolic example there. So to ward that off, I should set a maximum 30-character limit? – Hynes Apr 11 '14 at 15:17
• If you want. Personally, I'd set it to something more reasonable, such as 255 characters. – Mark Apr 12 '14 at 10:31
50 characters (of which 15-25, depending on layout, are visible in the form input field) for the family name should be plenty. It's what works well for me, anyway. For consistency, one should assign the same amount for the first name(s).
I decided for the number 50 a decade or so ago because the longest realistic name I could come up with ad hoc was 15 characters, and 3x15 = 45 (3x for being safe), rounded up to 50. I've been using that magic number since then, and so far not had any complaints. Not expecting any, either.
Yes, in an ideal world, there should be no limits, and every limit that you choose is "wrong" the moment you choose it. We, however, live in a real world where storage (and screen space) is finite and where forms need to be laid out in a sensible, meaningful way.
If your parents decided to give you a 350-letter name, the clerk in the register office will tell you that you're out of luck getting a passport with that name as well. No, they're not going to make an extra-large passport just for you.
The longest claimed surname assigned to an alleged person has 35 letters, although the name ("Wolfeschlegelsteinhausenbergerdorff") looks much more like a hoax than a real name. Though it might be a real person who deliberately chose such a name for making himself important, you can never know.
I doubt it, though, since in particular when you look at the well-known meme Wolfeschlegelsteinhausenbergerdorffwelchevoralternwarengewissenshaftschafers [...] which is not a German name but an entire narrative in some kind of pidgin German that roughly translates to something like "... who a long time ago were diligent shepherds whose well-maintained very diligent knitter-free and protecting gear which [another 3 levels of indirections, and more nonsensical blah blah]", it appears as completely made-up bullshit.
It's admittedly a slightly different story for Mr. Preston from Lancashire, who to all appearances is a real person with an insane parent (or two insane parents), but actually not so much different.
Mr. Preston will not be massively impaired (nor will there be a chance of confusing him with someone else) if he can only enter "Jensen Jay Alexander Bikey Carlisle Duff Elliott" for his first name(s). He will likely only want to use "Jensen Jay" or "Jay" anyway, and curse his father every time kids in school make fun of his names.
Even most existing names for locations (which are generally much longer than names given to people) can fit into 50 characters, with the Maori name of a small hill in New Zealand being the exception. Since there's only about 60,000 people speaking that language at all, and most people on the planet probably have never heard of that unimportant hill, that's rather neglegible.
Every other existing location's name on the planet will fit into these constraints at least with its short form (1 place in Wales) or completely (every other known place).
• Multiple positive aspects to this answer, but I decided I couldn't justify up-voting due to choice of language used. – TOOGAM Feb 5 '18 at 0:10
Based on the type of the application you may want to select an upper or lower limit for the names. The upper limit though a tricky approach the lower limit may be 1 char since the person may choose to write an initial instead of the complete name. If your system requires a name then obviously you wouldn't want the user to exit without entering a name at all.
Selection of the upper limit on the chars will also depend on the kind of implementation and the target audience that you expect to host.
If your implementation is of the social networking order you can let the user set an exceptionally long name, well it is social networking so you can't restrict the user from going crazy. However you can guide him/her by restricting to a certain upper limit (else they may want to insert a 1024 chars long post as the name itself). Increasing UX is highly important but then there's always the trade off somewhere so if you remove the concept of the first and last name and provide a single field for name with say 300-350 chars as an upper limit it will be long enough to experiment and yet short enough to keep you site sane.
For a semi/non social networking order where you expect people coming expecting some information and that they may be kind of serious (atleast not in the social networking mood) then they may prefer keeping it simple and realistic when it comes to names. You may choose to set a limit around a safe 100-125 chars for each of the first and second name. It is pretty evident that we cannot judge the kind of names that we may encounter hence will have to be generous in limiting it.
Moreover you may want to restrict the use of special characters in the name (again based on the implementation), although this may not be related to the question that you asked but it was popping up in my head time and again so just shared it.
• None of this really says why you'd set these limits. What does 'short enough to keep your site sane' mean? What are the 'implementation' issues that would necessitate character limits? (and that's more of an implementation issue that you're transferring onto the user rather than dealing with it technically). I also disagree with restricting special characters. Again, why do this? There will be people with á, ' or & in their name. And certainly with brackets (). Also how does having a limit 'guide him/her by restricting to an upper limit' work? What are you guiding? And why? – JonW Apr 10 '14 at 13:10
• Hey JonW, I did not mean to offend you. Okay I'll try addressing to the points one at a time. By short enough I meant that if your site hosts a multitude of users who may be shown together (let say as result to a search) then if we have like really long names (say ranging into 1024 chars) then primarily it may ruin the UI and also the UX associated with it may be hampered. By implementation I meant the nature of the site/ application, which can help the UX designers take a call on the kind of target audience they can expect and kind of interaction from the audience. – roni Apr 10 '14 at 13:20
• About the special characters, if we take the example of a professional website say LinkedIn.com where people interact on a professional basis if we have some users with names like N@th@n or Ron!, it would somehow drive away the seriousness for viewing their profile where as if you have those names in a social networking site then probably it would look cool so that might even work there. Here my perspective was considering the visitors to the site and based on the purpose of the site. – roni Apr 10 '14 at 13:25
• I'm not offended, just wanted to see some reasoning. You make some valid points actually, but they're mostly related to display usernames, not users actual names. – JonW Apr 10 '14 at 13:53
• Oh yes. My perspective was with what and how it is to be displayed. However I do have a doubt, if we give the user the freedom of infinite sized names (for the system) how will the database be designed for those fields since there it will be required to set some limit for the field and if not set then based on the datatype there will be a default limit that the system will set. So how will we handle this ? – roni Apr 11 '14 at 4:59 |
Topic/Type: 1. Plasma Simulation, Invited
### PIC-MCC (Particle In Cell with Monte Carlo Collisions) simulations of low temperature plasmas
M. M. Turner
School of Physical Sciences and National Centre for Plasma Science and Technology, Dublin City University, Ireland
The particle-in-cell method is a classical approach to plasma simulation. Al-
though this technique first appeared more than forty years ago, it remains the
preferred approach for many problems where a kinetic treatment is desired.
This is especially true in low-temperature plasma physics, where violently
non-Maxwellian electron energy distributions are common, often featuring
bumps, holes and other curious structures. Such complicated distribution
functions are typically formed by a subtle interplay between collisional effects
and non-local interactions with electric and magnetic fields. It is important to
get this right in a simulation, because the electron energy distribution func-
tion affects the ionization rate, transport processes, radiative processes, etc.
These parameters are of great importance in low-temperature plasma appli-
cations, which motivate much work in this field. Consequently, one wants to
have a simulation method that in principle captures these effects accurately.
As a direct solution of the coupled system of the Boltzmann equation and
Maxwell?s equations, particle-in-cell simulation combined with Monte Carlo
collisions is such a method. This approach should capture the physics ac-
curately, provided that the numerical parameters are properly chosen. The
numerical parameters in question are three: the time step $\small \Delta t$, the cell size
$\small \Delta x$ and the number of super-particles per cell, $\small N_C$. The literature contains
various heuristics for choosing these parameters, and it is usually assumed
that these heuristics apply whether or not Monte Carlo collisions are em-
ployed. We will show here that this is not always so?Monte Carlo collisions
in fact change the kinetic properties of a particle-in-cell simulation, such that
the rate of numerical thermalisation may increase by orders of magnitude.
This is in turn means that numerical effects may distort the electron energy
distribution function (in particular) to a much greater extent than is often
realised. These effects means that new heuristics are needed, especially for
choosing the number of particles. We will discuss the implications of these
results. |
Ross Moore ross.moore at mq.edu.au
Fri Apr 19 00:36:14 CEST 2019
Hi Karl, Joseph,
On 19 Apr 2019, at 7:32 am, Karl Berry <karl at freefriends.org<mailto:karl at freefriends.org>> wrote:
Speaking for myself, I've never heard of it. Thanh?
Here’s what the PDF Spec says:
An array of 8 × n numbers specifying the coordinates of n quadrilaterals in default user space that comprise the region in which the link should be activated.
The coordinates for each quadrilateral are given in the order x1 y1 x2 y2 x3 y3 x4 y4
specifying the four vertices of the quadrilateral in counterclockwise order.
For orientation purposes, such as when applying an underline border style, the bottom of a quadrilateral is the line formed by (x1, y1) and (x2, y2).
If this entry is not present or the conforming reader does not recognize it, the region specified by the Rect entry should be used.
QuadPoints shall be ignored if any coordinate in the array lies outside the region specified by Rect.
FWIW, I see it mentioned wrt hyperref here, as you may well already know:
https://tex.stackexchange.com/questions/237063/hyperref-box-does-not-obey-slant
We patch hyperref to also include the /QuadPoints [...] entry into the LinkPDF annotation.
Yes, this does exactly what is needed:
\makeatletter
%patch hyperref
\let\Hy at setpdfborderOrig\Hy at setpdfborder
\def\Hy at setpdfborder{%
\Hy at setpdfborderOrig
}
\makeatother
given a method to correctly construct the key-value pair for \QuadPoints .
This is done using Tikz , which is what is being used for the particular diagram under discussion.
For breaking hyperlinks across line-endings, some alternative coding would be needed,
perhaps with commands from zref-savepos.sty which cause exact coordinates to be
written into an auxiliary file, for use on the next run.
See the pdfcomment package, for some usage of \zsavepos .
Best,
Karl
Hope this helps.
Ross
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/pdftex/attachments/20190418/9012e57b/attachment.html> |
# Freudenthal spectral theorem
In mathematics, the Freudenthal spectral theorem is a result in Riesz space theory proved by Hans Freudenthal in 1936. It roughly states that any element dominated by a positive element in a Riesz space with the principal projection property can in a sense be approximated uniformly by simple functions.
Numerous well-known results may be derived from the Freudenthal spectral theorem. The well-known Radon–Nikodym theorem, the validity of the Poisson formula and the spectral theorem from the theory of normal operators can all be shown to follow as special cases of the Freudenthal spectral theorem.
## Statement
Let e be any positive element in a Riesz space E. A positive element of p in E is called a component of e if ${\displaystyle p\wedge (e-p)=0}$. If ${\displaystyle p_{1},p_{2},\ldots ,p_{n}}$ are pairwise disjoint components of e, any real linear combination of ${\displaystyle p_{1},p_{2},\ldots ,p_{n}}$ is called an e-simple function.
The Freudenthal spectral theorem states: Let E be any Riesz space with the principal projection property and e any positive element in E. Then for any element f in the principal ideal generated by e, there exist sequences ${\displaystyle \{s_{n}\}}$ and ${\displaystyle \{t_{n}\}}$ of e-simple functions, such that ${\displaystyle \{s_{n}\}}$ is monotone increasing and converges e-uniformly to f, and ${\displaystyle \{t_{n}\}}$ is monotone decreasing and converges e-uniformly to f.
## Relation to the Radon–Nikodym theorem
Let ${\displaystyle (X,\Sigma )}$ be a measure space and ${\displaystyle M_{\sigma }}$ the real space of signed ${\displaystyle \sigma }$-additive measures on ${\displaystyle (X,\Sigma )}$. It can be shown that ${\displaystyle M_{\sigma }}$ is a Dedekind complete Banach Lattice with the total variation norm, and hence has the principal projection property. For any positive measure ${\displaystyle \mu }$, ${\displaystyle \mu }$-simple functions (as defined above) can be shown to correspond exactly to ${\displaystyle \mu }$-measurable simple functions on ${\displaystyle (X,\Sigma )}$ (in the usual sense). Moreover, since by the Freudenthal spectral theorem, any measure ${\displaystyle \nu }$ in the band generated by ${\displaystyle \mu }$ can be monotonously approximated from below by ${\displaystyle \mu }$-measurable simple functions on ${\displaystyle (X,\Sigma )}$, by Lebesgue's monotone convergence theorem ${\displaystyle \nu }$ can be shown to correspond to an ${\displaystyle L^{1}(X,\Sigma ,\mu )}$ function and establishes an isometric lattice isomorphism between the band generated by ${\displaystyle \mu }$ and the Banach Lattice ${\displaystyle L^{1}(X,\Sigma ,\mu )}$. |
Lemma 22.27.3. Let $(A, \text{d})$ be a differential graded algebra. Let $E$ be a compact object of $D(A, \text{d})$. Let $P$ be a differential graded $A$-module which has a finite filtration
$0 = F_{-1}P \subset F_0P \subset F_1P \subset \ldots \subset F_ nP = P$
by differential graded submodules such that
$F_{i + 1}P/F_ iP \cong \bigoplus \nolimits _{j \in J_ i} A[k_{i, j}]$
as differential graded $A$-modules for some sets $J_ i$ and integers $k_{i, j}$. Let $E \to P$ be a morphism of $D(A, \text{d})$. Then there exists a differential graded submodule $P' \subset P$ such that $F_{i + 1}P \cap P'/(F_ iP \cap P')$ is equal to $\bigoplus _{j \in J'_ i} A[k_{i, j}]$ for some finite subsets $J'_ i \subset J_ i$ and such that $E \to P$ factors through $P'$.
Proof. We will prove by induction on $-1 \leq m \leq n$ that there exists a differential graded submodule $P' \subset P$ such that
1. $F_ mP \subset P'$,
2. for $i \geq m$ the quotient $F_{i + 1}P \cap P'/(F_ iP \cap P')$ is isomorphic to $\bigoplus _{j \in J'_ i} A[k_{i, j}]$ for some finite subsets $J'_ i \subset J_ i$, and
3. $E \to P$ factors through $P'$.
The base case is $m = n$ where we can take $P' = P$.
Induction step. Assume $P'$ works for $m$. For $i \geq m$ and $j \in J'_ i$ let $x_{i, j} \in F_{i + 1}P \cap P'$ be a homogeneous element of degree $k_{i, j}$ whose image in $F_{i + 1}P \cap P'/(F_ iP \cap P')$ is the generator in the summand corresponding to $j \in J_ i$. The $x_{i, j}$ generate $P'/F_ mP$ as an $A$-module. Write
$\text{d}(x_{i, j}) = \sum x_{i', j'} a_{i, j}^{i', j'} + y_{i, j}$
with $y_{i, j} \in F_ mP$ and $a_{i, j}^{i', j'} \in A$. There exists a finite subset $J'_{m - 1} \subset J_{m - 1}$ such that each $y_{i, j}$ maps to an element of the submodule $\bigoplus _{j \in J'_{m - 1}} A[k_{m - 1, j}]$ of $F_ mP/F_{m - 1}P$. Let $P'' \subset F_ mP$ be the inverse image of $\bigoplus _{j \in J'_{m - 1}} A[k_{m - 1, j}]$ under the map $F_ mP \to F_ mP/F_{m - 1}P$. Then we see that the $A$-submodule
$P'' + \sum x_{i, j}A$
is a differential graded submodule of the type we are looking for. Moreover
$P'/(P'' + \sum x_{i, j}A) = \bigoplus \nolimits _{j \in J_{m - 1} \setminus J'_{m - 1}} A[k_{m - 1, j}]$
Since $E$ is compact, the composition of the given map $E \to P'$ with the quotient map, factors through a finite direct subsum of the module displayed above. Hence after enlarging $J'_{m - 1}$ we may assume $E \to P'$ factors through $P'' + \sum x_{i, j}A$ as desired. $\square$
In your comment you can use Markdown and LaTeX style mathematics (enclose it like $\pi$). A preview option is available if you wish to see how it works out (just click on the eye in the toolbar). |
Definition:Antilexicographic Order/Also known as
Antilexicographic Order: Also known as
Antilexicographic order can also be referred to as colexicographic order.
Some sources classify the antilexicographic order as a variety of order product.
Hence the term antilexicographic product can occasionally be seen.
Some sources which focus more directly on real analysis refer to this merely as the ordered product, or order product.
This is because the other types of order product as documented on $\mathsf{Pr} \infty \mathsf{fWiki}$ are not of such importance in that context.
Such sources may even define the order product on a totally ordered set, ignoring its definition on the general ordered set.
The mathematical world is crying out for a less unwieldy term to use.
Some sources suggest AntiLex or CoLex, but this has yet to filter through to general usage. |
8/23/2017
## In Lecture 1
• Potential Outcome: One specific result from a random experiment
• Element $$\omega$$: a single potential outcome
• Event: a collection of some outcomes
• empty set $$\emptyset$$: no outcomes
• sample space $$S$$ or $$\Omega$$: consists of all outcomes
• Union $$\cup$$: a new set that contains each outcome found in an of the component events
• Intersection $$\cap$$: a new set that contains only the outcomes found in all of the component event.
## Disjoint
• A pair of events A, B is disjoint, if they have no outcome in common
• $$A\cap B = \emptyset$$
• Also called mutually exclusive
• A collection of event is disjoint if every pair of events is disjoint
## Three Probability Axioms
1. For each event A, $0\le P(A) \le 1$
2. For the sample space S, $P(S) = 1$
3. If $$A_1, A_2, \cdots$$ is a collection of disjoint events, then $P(\bigcup_{i=1}^n A_i) = \sum_{i=1}^\infty P(A_i)$
## Two Thoerem Based on Probability Axioms
1. The probability of the empty set $$\emptyset$$ is always 0
2. If $$A_1, A_2, \cdots, A_n$$ is a collection of finitely many disjoint events, then the probability of the union of the events equals the sum of the probabilities of the events: $P(\bigcup_{i=1}^n A_i) = \sum_{i=1}^n P(A_i)$
## Equally Likely Events
• Revisit on rolling a die
• Theorem: If s sample space S has n equally likely outcomes, then each outcome has probability $$\frac{1}{n}$$ of occuring
• Corollary: If sample space S has n equally likely outcomes, and A is an event with j outcomes, then event A has probability $$\frac{j}{n}$$ of occuring, i.e., $P(A) = \frac{j}{n}$
• Corollary If sample space S has a finite number of equally likely outcomes, then event A has probability $P(A) = \frac{|A|}{|S|}$
## DeMorgan's law
1. $(A\cup B)^c = A^c \cap B^c$
2. $(A\cap B)^c = A^c \cup B^c$
• $P(A\cup B) = P(A) + P(B) - P(A\cap B)$
## Example 1
Three of the major commercial computer operating systems are Windows, Mac OS, and Red Hat Linux Enterprise. A Computer Science professor selects 50 of her students and asks which of these three operating systems they use. The results for the 50 students are summarized below.
• 30 students use Windows
• 16 students use at least two of the operating systems
• 9 students use all three operating systems
• 18 students use Mac OS
• 46 students use at least one of the operating systems
• 11 students use both Windows and Linux
• 11 students use both Windows and Mac OS
## Example 1 continued
Let Windows = W, Mac OS = M, and Red Hat Linux Enterprise = L
1. $$N(W^c \cap M^c)$$
2. $$P(W^c \cup M^c)$$
3. $$N(W \cup M \cup L)$$
## Example 2
In a certain population, 10% of the population are rich, 5% are famous, and 3% are both.
• What is the probability a randomly chosen person is not rich?
• What is the probability a randomly chosen person is rich but not famous?
• What is the probability a randomly chosen person is either rich or famous?
• What is the probability a randomly chosen person is either rich or famous but not both?
• What is the probability a randomly chosen person has neither wealth nor fame? |
## ‘Mosquito smoothie’ innovation boosts future malaria vaccine potential
• June 17, 2021
A faster method for collecting pure malaria parasites from infected mosquitos could accelerate the development of new, more potent malaria vaccines.
The new method, developed by a team of researchers led by Imperial College London, enables more parasites to be isolated rapidly with fewer contaminants, which could simultaneously increase both the scalability and efficacy of malaria vaccines.
The parasite that causes malaria is becoming increasingly resistant to antimalarial drugs, with the mosquitoes that transmit the disease also increasingly resistant to pesticides. This has created an urgent need for new ways to fight malaria, which is the world’s third-most deadly disease in under-fives, with a child dying from malaria every two minutes.
Existing malaria vaccines that use whole parasites provide moderate protection against the disease. In these vaccines, the parasites are ‘attenuated’ – just like some flu vaccines and the MMR vaccine – so they infect people and raise a strong immune response that protects against malaria, but don’t cause disease themselves.
However, these vaccines require several doses, with each dose requiring potentially tens of thousands of parasites at an early stage of their development, known as sporozoites. Sporozoites are normally found in the salivary glands of mosquitoes, and in a natural infection are passed to humans when the mosquito bites. They then travel to the human liver, where they prepare to cause infection in the body.
Extracting sporozoites for use in a live vaccine currently requires manual dissection of the mosquito salivary glands – miniscule structures behind the mosquito head – by a skilled technician, which is a time-consuming and costly process.
The new method, described today in Life Science Alliance, vastly speeds up this process by effectively creating a ‘mosquito smoothie’ and then filtering the resulting liquid by size, density and electrical charge, leaving a pure sporozoite product suitable for vaccination. Importantly, no dissection is required.
Lead researcher Professor Jake Baum, from the Department of Life Sciences at Imperial, said: “Creating whole-parasites vaccines in large enough volumes and in a timely and cost-effective way has been a major roadblock for advancing malaria vaccinology, unless you can employ an army of skilled mosquito dissectors. Our new method presents a way to radically cheapen, speed up and improve vaccine production.”
But it’s not just about speed and cost. Traditional dissection methods struggle to remove all contaminants, such as proteins from the salivary glands, which are often extracted with sporozoites. The extra debris is likely to affect the infectivity of the sporozoites once they are inside the body, and could even affect how the immune system responds, impacting the efficacy of any whole parasite vaccine.
The new method also tackles this problem, resulting in pure uncontaminated sporozoite samples. The team discovered that, as well as being purer, sporozoites produced were surprisingly more infectious, hinting that vaccines produced using their method may require a much lower dose of sporozoites.
First author of the study Dr Joshua Blight, from the Department of Life Sciences at Imperial, said: “With this new approach we not only improve the scalability of vaccine production, but our isolated sporozoites may actually prove to be more potent as a vaccine, giving us additional bang per mosquito buck.”
The team developed and tested their method with both human and rodent malaria parasites. They then tested the rodent version as a vaccine in mice, and found that when exposed to an infected mosquito bite, vaccinated mice showed 60-70 per cent protection when immunisations were given into muscle. When the same sporozoites were given directly into the blood stream (intravenously) protection was 100 per cent, known as ‘sterile’ protection.
The researchers are now developing the method further in readiness for mass manufacture of sporozoites under good manufacturing practice (GMP) conditions in order to produce a vaccine ready for human challenge trials. The plan is that participants would be given vaccine-grade sporozoites produced using this method and then purposefully bitten by an infected mosquito.
Looking beyond vaccines the researchers also say their method should help accelerate studies of sporozoite biology in general, which could in turn lead to fresh insights into the liver stage of malaria and new drug and vaccine regimes.
###
The research was funded by the Wellcome Trust and the Bill & Melinda Gates Foundation.
Disclaimer: AAAS and EurekAlert! are not responsible for the accuracy of news releases posted to EurekAlert! by contributing institutions or for the use of any information through the EurekAlert system.
## Third Dose of COVID Vaccine Boosts Protection in Transplant Recipients – Consumer Health News
• June 16, 2021
TUESDAY, June 15, 2021 (HealthDay News) — Researchers say an extra dose of two-dose COVID-19 vaccines may improve immune system protection for organ transplant patients, a group that’s so far responded poorly to two-dose vaccines.
“Our findings suggest clinical trials are warranted to determine if transplant recipients should receive COVID-19 vaccine booster doses as standard clinical practice, similar to what is currently done with hepatitis B and influenza vaccinations for this population,” said study lead author Dr. William Werbel. He is an infectious diseases research fellow at the Johns Hopkins School of Medicine in Baltimore.
People who receive a heart, lung, kidney or other solid organ transplant often take drugs to suppress their immune system and prevent rejection, but those drugs can interfere with the body’s ability to make antibodies in response to vaccines.
In two previous studies, only 17% of transplant recipients produced sufficient antibodies after one shot of a two-dose COVID-19 vaccine, and only 54% produced sufficient antibodies after the second dose, researchers reported.
Even transplant recipients who produced antibodies had levels well below those typically seen in people with healthy immune systems, the findings showed.
In the new study, the researchers evaluated 30 transplant recipients who previously received two doses of either the Moderna or Pfizer/BioNTech vaccine. None had reported an illness or a positive test for SARS-CoV-2 prior to vaccination. All were taking multiple immunosuppressive medications to prevent organ rejection.
Between March 20 and May 10, all participants got a third dose of either one of the Moderna or Pfizer vaccines, or they got the Johnson & Johnson shot.
“A third of the participants who had negative antibody levels and all who had low positive [antibody] levels before the booster increased their immune response after a third vaccine dose,” said study senior author Dr. Dorry Segev. He directs the Epidemiology Research Group in Organ Transplantation at Hopkins.
A week after receiving their third dose, 23 patients completed a questionnaire and some reported generally mild or moderate side effects. One patient had severe arm pain and another reported a severe headache. No patients reported fever or an allergic reaction.
There was one case of mild organ rejection, according to the report published online June 15 in the Annals of Internal Medicine.
Segev said the reactions seem acceptable, given the benefits that vaccines can confer.
Meanwhile, Werbel urged transplant patients and other immunocompromised patients to be careful.
“Although the third vaccine dose appears to raise the immune response of transplant recipients to higher levels than after one or two doses, these people may still be at greater risk for SARS-CoV-2 infection than the general population who have been vaccinated,” he said in a Hopkins news release.
“Therefore, we recommend that transplant recipients and other immunocompromised people continue to wear masks, maintain physical distancing and practice other COVID-19 safety measures,” Werbel added.
The American Society of Transplantation has more on COVID-19.
SOURCE: Johns Hopkins Medicine, news release, June 14, 2021
## Third Dose of COVID Vaccine Boosts Protection in Transplant Recipients | Health News
• June 15, 2021
By Robert Preidt, HealthDay Reporter
(HealthDay)
TUESDAY, June 15, 2021 (HealthDay News) — Researchers say an extra dose of two-dose COVID-19 vaccines may improve immune system protection for organ transplant patients, a group that’s so far responded poorly to two-dose vaccines.
“Our findings suggest clinical trials are warranted to determine if transplant recipients should receive COVID-19 vaccine booster doses as standard clinical practice, similar to what is currently done with hepatitis B and influenza vaccinations for this population,” said study lead author Dr. William Werbel. He is an infectious diseases research fellow at the Johns Hopkins School of Medicine in Baltimore.
People who receive a heart, lung, kidney or other solid organ transplant often take drugs to suppress their immune system and prevent rejection, but those drugs can interfere with the body’s ability to make antibodies in response to vaccines.
In two previous studies, only 17% of transplant recipients produced sufficient antibodies after one shot of a two-dose COVID-19 vaccine, and only 54% produced sufficient antibodies after the second dose, researchers reported.
Even transplant recipients who produced antibodies had levels well below those typically seen in people with healthy immune systems, the findings showed.
In the new study, the researchers evaluated 30 transplant recipients who previously received two doses of either the Moderna or Pfizer/BioNTech vaccine. None had reported an illness or a positive test for SARS-CoV-2 prior to vaccination. All were taking multiple immunosuppressive medications to prevent organ rejection.
Between March 20 and May 10, all participants got a third dose of either one of the Moderna or Pfizer vaccines, or they got the Johnson & Johnson shot.
“A third of the participants who had negative antibody levels and all who had low positive [antibody] levels before the booster increased their immune response after a third vaccine dose,” said study senior author Dr. Dorry Segev. He directs the Epidemiology Research Group in Organ Transplantation at Hopkins.
A week after receiving their third dose, 23 patients completed a questionnaire and some reported generally mild or moderate side effects. One patient had severe arm pain and another reported a severe headache. No patients reported fever or an allergic reaction.
There was one case of mild organ rejection, according to the report published online June 15 in the Annals of Internal Medicine.
Segev said the reactions seem acceptable, given the benefits that vaccines can confer.
Meanwhile, Werbel urged transplant patients and other immunocompromised patients to be careful.
“Although the third vaccine dose appears to raise the immune response of transplant recipients to higher levels than after one or two doses, these people may still be at greater risk for SARS-CoV-2 infection than the general population who have been vaccinated,” he said in a Hopkins news release.
“Therefore, we recommend that transplant recipients and other immunocompromised people continue to wear masks, maintain physical distancing and practice other COVID-19 safety measures,” Werbel added.
The American Society of Transplantation has more on COVID-19.
SOURCE: Johns Hopkins Medicine, news release, June 14, 2021
## Delaying a COVID vaccine’s second dose boosts immune response
• June 4, 2021
Facing a limited vaccine supply, the United Kingdom embarked on a bold public-health experiment at the end of 2020: delaying second doses of COVID-19 vaccines in a bid to maximize the number of people who would be at least partially protected from hospitalization and death.
Now, a study suggests that delaying the second dose of the Pfizer–BioNTech mRNA vaccine could boost antibody responses after the second inoculation more than threefold in those older than 801.
It is the first direct study of how such a delay affects coronavirus antibody levels, and could inform vaccine scheduling decisions in other countries, the authors say. “This study further supports a growing body of evidence that the approach taken in the UK for delaying that second dose has really paid off,” Gayatri Amirthalingam, an epidemiologist at Public Health England in London and a co-author of the preprint, said during a press briefing.
Many COVID-19 vaccines are given in two doses: the first initiates an immune response, and the second, ‘booster’ shot strengthens it. Clinical trials of the three vaccines used in the United Kingdom generally featured a three- to four-week gap between doses.
But for some existing vaccines, a longer wait between first and second doses yields a stronger immune response. Delaying the COVID-19 booster shots could also expand partial immunity among a greater swathe of the population than could the shorter dosing schedule. On 30 December, the United Kingdom announced that it would delay the second dose by up to 12 weeks after the first.
To determine whether the delay paid off, Amirthalingam and her colleagues studied 175 vaccine recipients older than 80 who received their second dose of the Pfizer vaccine either 3 weeks or 11–12 weeks after the first dose. The team measured recipients’ levels of antibodies against the SARS-CoV-2 spike protein and assessed how immune cells called T cells, which can help to maintain antibody levels over time, responded to vaccination.
Peak antibody levels were 3.5 times higher in those who waited 12 weeks for their booster shot than were those in people who waited only 3 weeks. Peak T-cell response was lower in those with the extended interval. But this did not cause antibody levels to decline more quickly over the nine weeks after the booster shot.
The results are reassuring, but are specific to the Pfizer vaccine, which is not available in many low-to-middle income countries, says Alejandro Cravioto, chair of the World Health Organization’s Strategic Advisory Group of Experts on Immunization. Countries will need to consider whether the variants that are circulating in their particular region might raise infection risk after only one vaccine dose, he says.
For the United Kingdom, extending the interval between doses was clearly the right choice, but the country’s lockdown deserves part of the credit for that success, says Stephen Griffin, a virologist at the University of Leeds, UK. “People are theoretically vulnerable between their first and second jab,” he says. “What’s worked in the UK is maintaining restrictions at the same time as vaccinating.”
## Delaying second Pfizer COVID-19 shot boosts immune response in over-80s, study finds
• June 3, 2021
Delaying the second dose of the Pfizer–BioNTech COVID-19 vaccine by 12 weeks after the first dose significantly boosts antibody responses in elderly people, according to a new U.K. study.
Researchers from the University of Birmingham and Public Health England (PHE) found that peak antibody levels were 3.5 times higher in those who waited 12 weeks for their booster shot, compared with those who had it after a three-week gap.
The study, which was published as a preprint and hasn’t yet been peer-reviewed, will lend support to the U.K. government’s decision at the start of its COVID-19 vaccine rollout in December 2020 to delay second doses of the vaccines to inoculate the elderly and vulnerable quicker, and ease the tight supplies.
At the time, the strategy divided experts, as drug regulators had authorized use of both the shot developed by drug company Pfizer
PFE,
+0.13%
and its partner BioNTech
BNTX,
-1.64%
and the shot produced by drug company AstraZeneca
AZN,
+0.20%
AZN,
-0.20%
with the University of Oxford on the basis of clinical trials that had spaced out the doses by only three or four weeks.
“This study further supports a growing body of evidence that the approach taken in the U.K. for delaying that second dose has really paid off,” said Dr. Gayatri Amirthalingam, a PHE epidemiologist and a co-author of the study, to reporters at a briefing.
Researchers said the study of 175 people aged 80 and over is the first direct comparison of how such a delay affects the immune response in any age group for the different intervals. An earlier study from the University of Oxford found that a single dose of the AstraZeneca–Oxford vaccine provides a high level of protection when boosters of the shot were delayed for 12 weeks.
The Birmingham researchers also looked at another part of the body’s immune response, found in T cells, which destroy any cells that have been infected with the virus. The peak T cell responses were higher in the group with a three-week interval between doses, the researchers found, but they cautioned that it wasn’t yet clear how protected individuals were based on which dosing schedule they received. “Research is required to further explore these variations in responses, the authors noted.
Separately on Friday, PHE said that COVID-19 vaccinations in the U.K, had directly prevented an estimated 11,700 deaths of people aged 60 and over by the end of April, and kept 33,000 people aged 65 and older out of hospital.
“As these figures highlight, getting your vaccine could save your life or stop you becoming seriously ill from COVID-19. It will also significantly reduce your chances of getting infected and infecting others,” said Dr. Mary Ramsay, PHE’s head of immunization.
“It is vital to get both doses of your vaccine when you are offered it,” she added.
## Millennial super mom Marian Rivera boosts her immune system with Calvit-C
• June 1, 2021
(The Philippine Star) – June 1, 2021 – 6:00am
MANILA, Philippines — Marian Rivera, millennial super mom and one of GMA Kapuso’s versatile actresses known for her roles in Marimar, Dyesebel, Amaya and Temptation of Wife, reveals how she keeps her immune system strong despite her busy lifestyle both as an actress and mom amid the pandemic.
Aside from working out regularly, she emphasizes the importance of taking vitamins that can help not only our bodies but also, and more importantly, our immune system.
Vitamins can naturally be obtained in healthy prepared meals. However, because of our busy schedules, we tend to neglect the importance of good nutrition and substitute it with high-cholesterol, sugary diets.
Vitamins help build and keep our body strong. Let us take for example these basic vitamins and their functions:
### 1. Vitamin A
This vitamin is key to good vision, a healthy immune system and cell growth. It is mostly found in eggs, broccoli, spinach and most dark green leafy veggies.
### 2. Vitamin B (B vitamins)
These vitamins have a direct impact on our body’s energy levels, proper brain function and cell metabolism.
They promote the growth of red blood cells, good digestion and proper nerve function. Examples of B Vitamin-rich foods are salmon, liver, milk, beef, oyster, clams and mussels.
### 3. Vitamin C
When we think of a vitamin that helps protect us from cough, colds and flu, one immediately comes to mind: Vitamin C.
Vitamin C, also known as Ascorbic acid is not only known for helping strengthen our immune system against harmful pathogens, but it is also responsible in keeping proper bodily functions via the development and repair of body tissues, formation of collagen and absorption of iron.
There are two types of vitamin C that are currently available in the market today—acidic and non-acidic. The market favors the non-acidic type for it is gentler on the stomach.
When it comes to non-acidic Vitamin C, Marian Rivera prefers Calvit-C.
Calvit-C is gentle on the stomach especially for those always on the go. It is made up of calcium and sodium ascorbate that may help protect the body against immune deficiencies, cardiovascular disease and help promote eye health.
Because it incorporates Calcium (in a form of calcium ascorbate) as one of its key ingredients, Calvit-C may also help in the development of strong bones and teeth, and promote healthy skin.
Sodium ascorbate, on the other hand, is a form of vitamin C that has sodium components, which makes absorbing Vitamin C easier, while lowering acidity levels of the body. Sodium ascorbate also serves as an antioxidant that helps keep cells healthy and protected from damage.
With benefits like these, Marian Rivera certainly has made a healthy choice in strengthening her immune system, the safe and non-acidic way.
• May 28, 2021
## INTRODUCTION
Nanoparticles (NPs) have attracted increasing attention in health care, biosensor, and immunotherapy research because of their excellent physicochemical properties (1, 2). NPs induce an immune system response once they enter or contact the body of humans or other organisms, and their pharmacokinetics also play critical roles in nanomedicine or other biologically related applications (35). For conventional biological experiments performed to assess the immune responses and organ burden of NPs, the cost is high, the reproducibility is low, the experimental time is long, and many animals are sacrificed (4, 6, 7). Quickly and accurately predicting the immune response and organ burden of NPs based on their physical and chemical properties is urgent for NP design and applications and pharmacokinetic assessments (8, 9). Given the complexity of the immune system and complicated properties of NPs, conventional methods [e.g., quantitative structure-activity relationships (QSARs) and molecular dynamics simulations] cannot precisely predict the immune response and organ burden of NPs.
The molecular structure must be known for QSARs and molecular dynamics simulations (10). However, the molecular structure of the immune system is difficult to depict. In addition, the complicated molecular calculations required for QSAR and molecular dynamics simulations require a long time to complete (11), which limits the ability to manage thousands of NPs with many properties (e.g., size, shape, and surface modifications) and the capacity to address data heterogeneity (12). As a type of robust nonparametric model, machine learning approaches, such as random forest (RF), artificial neural network (ANN), and support vector machine (SVM), have good potential to construct models that simulate complex relationships (12, 13). The anti-interference capability of machine learning may overcome data heterogeneity and provide a solution to predicting complicated biological responses to NPs (14, 15). However, a great challenge for machine learning methods is their poor interpretability, thus affecting the trustworthiness of models (16). Although high-precision predictions or classification tasks can be achieved by configuring the appropriate parameters (17, 18), the internal operations of the model are obscure, and poor interpretability also obscures causality (19). Current interpretable studies in the field of machine learning, such as prototype networks, local interpretable model-agnostic explanations, and Shapley additive explanations (2022), are devoted to revealing how machine learning works to achieve classification tasks to judge the rationality of decision-making, but they have not paid attention to the interaction among multiple features. Understanding the interaction among multiple features is useful to design NPs with ideal features and explore the mechanisms of bio-nano interactions.
To improve the interpretability of machine learning, it is urgent to understand how features affect labels and interact with each other (23), which widely occur in various machine learning models, such as RF and ANN (12, 19, 24). The present work proposed a feature interaction network concept along with a tree-based RF feature importance and feature interaction network analysis framework (TBRFA) as a proof-of-principle demonstration. TBRFA disassembles the trees implied by RF and then improves the interpretability of the RF model. The scheme is shown in Fig. 1. Inspired by meta-analysis workflow concepts and comparisons of RF, ANN, and SVM models, this study predicted the immune response and organ burden of various NPs with complicated properties. High correlation coefficients between the observations and predictions are achieved and further verified by validation set and animal experiments, thus ensuring the reliability of the model for the TBRFA framework. TBRFA includes two parts: importance analysis and feature interaction network analysis. TBRFA used a multiple-indicator importance analysis approach for RF based on existing methods to comprehensively screen the important features for the immune response and organ burden of NPs, which resolved the problems caused by the unbalanced data structure and the routine importance analysis method. Moreover, TBRFA proposes an interaction coefficient, uses the working mechanism of models to explore the interaction relationships among multiple features, and builds feature interaction networks to provide guidance for the design and application of ideal NPs.
## RESULTS
### Description and pretreatment of heterogeneous data
The data were extracted following the process in Materials and Methods. To comprehensively correlate immune responses and lung burden with the physical and chemical properties of NPs, data and literature on pulmonary immune responses and NP burden caused by lung exposure were assembled and integrated. On the basis of a comprehensive and rigorous extraction criterion of published data, a total of 1620 samples containing 16 features (including three parts: NP properties, animal properties, and experimental conditions) and 12 toxicity labels [biomarkers, e.g., total protein, total cells, and interleukin-1β (IL-1β)] were mined for immune response datasets. A total of 301 samples containing the same 16 features and 3 burden labels [i.e., lung, liver, and bronchoalveolar lavage fluid (BALF)] were mined for burden datasets. The references for the above samples are given in supplementary note S1. The datasets are described in Fig. 2 and tables S1 and S2. Six characteristic variables (NP type, shape, surface functionalization, rat/mouse, sex, and method) were described by the reported frequency (percentage). Inhalation as an exposure method was not recorded because of the difficulty in normalizing the inhaled doses. Ten numeric variables [diameter, thickness/length, zeta potential, specific surface area (SSA), mean age, mean weight, exposure duration, exposure frequency, recovery duration, and dose] were described by mathematical statistics (mean, SD, median, and distribution range). The abovementioned 6 characteristic variables and 10 numeric variables covered the main factors in the immune response analysis (25, 26). The distribution of the samples was visualized and arranged in descending order of NP length (Fig. 2). Heterogeneity of the immune response datasets was mainly caused by NP diversity (number of NP types, 57). The literature on biological responses usually focuses on widely used NPs [for example, multiwalled carbon nanotube (MWCNT) and TiO2 accounted for 22.54 and 16.6% in the immune response dataset, respectively], leading to a small proportion of some uncommon or previously unknown NPs. Encoding the discrete NP types into several continuous features reduced biases caused by the imbalance of NP types. The inconsistent NP characterization standards and differences in NP properties and the exposure protocols among laboratories also led to challenges for precise prediction. Systematic evaluations of the immune response to 57 NPs by routine experiments are costly and time-consuming, and it is also difficult to finish such complex model construction for QSAR analysis.
Many immune response biomarkers have been reported, although the choice of immune response index varies from laboratory to laboratory. Given the high reported frequency and the strong connections with immune responses (27, 28), the following 12 biomarkers were individually used for machine learning model construction: total protein, lactate dehydrogenase (LDH), total cells, macrophages, neutrophils), IL-1β, tumor necrosis factor–α (TNF-α), IL-6, IL-4, IL-10, monocyte chemoattractant protein-1 (MCP-1), and macrophage inflammatory protein–1α (MIP-1α). The burden datasets contained fewer NP types (n = 17) and had lower heterogeneity than the immune datasets. The NP burdens in the lung, liver, and BALF were chosen as labels. The details of the subsets are listed in table S3. General regression methods, such as multiple linear regressions, presented poor performance on heterogeneous data in complex systems because of the missing values (16). As shown in fig. S1, most of the multiple linear regressions obtained low correlation coefficients [coefficient of determination (R2), minimum value: 0.324] and high root mean square errors (RMSEs; maximum value: 0.902), especially in the large subsets, indicating that traditional regression methods were not suitable for heterogeneous data. In contrast, machine learning can achieve accurate predictions of these data, and the internal relationships of complex systems can be mined by TBRFA-based machine learning, as indicated in the following sections.
### Model performance and feature selection
Nonparametric and nonlinear machine learning methods have the ability to resist noise and are expected to build accurate prediction models using aggregated data (24). To eliminate the dimensional effects and balance the weights of features, z-score normalization and encoding of the character variables were applied before the model training (details are provided in Materials and Methods). The label values need to be normalized to improve the accuracy of the models. However, the distribution range of the label data was too wide (e.g., total proteins ranged from 1.5 to 2752.9%), and a considerable number of outliers occurred. The rough use of the z score can lead to serious collapse of the model accuracy. For the immune response dataset, we used the percentage change of the experimental group relative to the control group as the label and compressed the values between −1 and 1 (Materials and Methods, formula 2). For the organ burden dataset, we directly used the ratio of the detection concentration to the total exposure dose as the label. We initially compared the performance of ANN, SVM, and RF using all features for regression. To ensure that credible results are obtained from machine learning with a meta-analysis workflow, high R2 values are necessary (16). The R2 of the regression (Fig. 3, A to C) showed that in terms of the test set, the performance of RF (average of all models, 0.75 ± 0.12) was better than that of ANN (average of all models, 0.67 ± 0.11) and SVM (average of all models, 0.64 ± 0.10). Moreover, RF spent less time during the training process than ANN and had simpler adjustable parameters than ANN and SVM.
Figure S2 (A and B) shows that most of the features have low linear correlations, indicating that the features obtained via the literature and generated through coding will not cause overfitting due to multicollinearity. Figure S2 (A and B) also shows that there are low linear correlations between features and labels. The immune responses and accumulation burden of NPs are complicated because a single feature contributes little information to the label. Although the tested features may all affect the performance of models (29), a suitable feature selection procedure is still necessary to determine whether there is undetectable redundant information in the features. A greedy algorithm, sequential backward selection (SBS; see Materials and Methods), was used here to eliminate redundant information. Figure 3D shows that the SBS algorithm hardly improved the performance of the models, and we found that SBS abandoned some important NPs properties. Therefore, the RF models constructed on the basis of all features were selected for the subsequent analysis. The R2 values of the test set of most models were greater than 0.7, where R2 values for macrophages, lung burden, and BALF burden were >0.85, and the maximum value reached 0.896 (Fig. 3A and table S3). For some biological indicators, the testing R2 values less than 0.7 were probably due to the biases of data from interlaboratory studies. Moreover, we performed permutation tests, and the intercepts of the cross-validation coefficients (Q2) on the y axis were all less than 0.05, indicating that the models did not overfit (fig. S3) (30). Figure 3 (E to G) lists three examples (IL-6, IL-4, and lung burden) of regression results, and the others are given in fig. S4. To ensure that the features contributed valid information to the models, we performed feature value shuffling, and the predictive performance was abrogated after feature value shuffling (fig. S5). Because the published immune literature contained few negative samples (experimental group > control group), the scatters were mostly distributed in the top right of the scatter plots (Fig. 3, E and F), and the predicted results of the negative samples were distributed outside the RMSE interval. This flaw is inherently unavoidable because of the published datasets, although the prediction accuracy of the positive samples is not influenced. Multilabel prediction was performed by ANN, but the prediction accuracy rate was low, with most of the R2 values less than 0.7 (fig. S6), because the labels were independent of each other and represented different biological meanings.
NPs with a wide range of responses were used to verify the models. Five samples of each subset were randomly sampled as a validation set before building the model. The validation set did not participate in the construction of the model at all to ensure that the model did not learn them during the cross-validation. Figure 4A shows the prediction errors of the models on the validation set, where 76% of validation errors were less than 0.2. To verify the model further, animal experiments were performed in our laboratory. MWCNTs functionalized with triethoxycaprylylsilane and three MWCNTs of different sizes (small, medium, and large MWCNT, named S-MWCNT, M-MWCNT, and L-MWCNT, respectively) were chosen to conduct animal experiments. The above materials were all outside the scope of the datasets. Figure S7 shows the characterization of the NPs, and Fig. 4 (B to F) shows the immunofluorescence results of IL-1β. The expressions of IL-1β induced by MWCNTs distributed within the error bounds of the RF model (Fig. 4G). Figure 4G also contains the observation prediction of the validation set. The validation set of IL-1β contained five additional samples, which were randomly sampled from the main NPs in the IL-1 subset. The quantitative comparison between the observed and predicted results of the validation set indicated that the model was reliable (Fig. 4G). Compared with SVM and ANN, RF exhibited high accuracy and reliability for dealing with heterogeneous data in a complex system.
### Discovering important and unbiased features by TBRFA
The RF model was used to measure the importance of features by calculating the change in the error (increase in MSE) on the out-of-bag (OOB) data based on permutations of each feature (19). Figure 5 visualizes the feature importance measured by the MSE increase. Each model was normalized by its most important features. Figure 5A shows that the exposure dose (Fig. 5B) and recovery duration (the time from last exposure to animal euthanasia; Fig. 5C) have a great impact on the immune responses and NP burden. However, as a mathematical statistic, increases in the MSE are limited by the quality of the dataset. Thus, using increased MSE values as the only criterion for analyzing feature importance may lead to bias. For example, increased MSE values indicated that sex (male and female) contributed significantly to the IL-4 model (Fig. 5A). However, sex was not supposed to be the main factor affecting the immune response, and we confirmed this bias in the follow-up analysis. Therefore, absolute dominant features may be incorrectly identified when using a single importance evaluation index.
TBRFA uses multiple indicators to perform a multiway feature importance analysis and can evaluate the importance of features from different perspectives to balance the absolute dominant features achieved by a single indicator. Three other indicators, i.e., node purity increase, mean minimal depth, and P value, were combined with increased MSE values to comprehensively screen important features (Fig. 6, A and B). Although gender led to a higher increase in MSE and node purity than the other features, the P value indicated that its importance was not statistical significant (Fig. 6A). The distribution of the features’ mean minimal depth also suggested that the zeta potential, dose, length/weight, and SSA appeared more frequently near the roots than the other features (Fig. 6B). The TBRFA results of all models indicated that recovery duration and exposure dose were the main factors affecting the immune response and organ burden (Fig. 6, A and B, and figs. S8 to S21). TBRFA successfully overcame the importance bias caused by a single indicator with small datasets.
Figure 6C summarizes the conclusions of the TBRFA importance analysis. Exposure dose is well known as one of the most important features, while recovery duration, which represents the acute or chronic responses induced by NPs, has been ignored (9, 10). A partial dependence analysis (fig. S22A) showed that immune responses decreased as recovery duration increased and NPs tended to induce short-term acute immune responses. In the initial stage of exposure, the immune indicators increased rapidly; and within 50 days after the end of exposure, all immune indicators were decreased to less than 166.7% (corresponding to the normalized value 0.4 in fig. S22A) of the control group. The mechanisms of NP clearance by the immune system are complicated and include immune cell phagocytosis and extracellular traps (31). The clearance rate of NPs is also highly correlated with their structure and physical and chemical properties (32, 33). Figure S22B also confirmed that NPs could be gradually cleared by the immune system, with the accumulation of NPs in the lungs rapidly declining to approximately 20% of the total exposure dose within 100 days; hence, recovery duration became an important feature affecting the final observed immune responses. However, the immune responses did not decrease to the level of the control groups even after a long recovery duration. The optimized models proposed that the immune responses induced by NPs were persistent during the postexposure period; thus, the chronic and long-term toxicity of NPs deserve attention in future studies.
Although NP properties determine their immune response and organ burden, key properties of NPs remain inconclusive because of the limited number of animal experiments (34). The models proposed that SSA was important for immune responses, while diameter was important for organ burden compared with other properties (fig. S22, C and D). The SSA of NPs will allow the particles to adsorb proteins and form NP-protein corona complexes, which mediate immune responses (35). NPs with a large SSA are more likely to be internalized by the cell, thus causing a decrease in the number of molecules released by the cell (36). As the diameter decreased, fewer NPs stayed in the alveoli, and more NPs were transported to the lung and liver, which indicated that NPs with a small diameter (<100 nm) could easily penetrate biological membranes and achieve cross-organ transport (Fig. 6C and fig. S22D). A small size confers enhanced permeability to NPs, which is attributable to the binding to integrins on the surface of epithelial cells (37). Moreover, studies have shown that smaller NPs are less likely to be taken up by cells than larger NPs; thus, large NPs may preferentially translocate into the reticuloendothelial system, while small NPs may not be capable of being distributed among organs (38).
Animal studies, especially toxicological tests, are time-consuming, costly, and often impractical (10, 39). Because of these constraints, animal experiments can only screen the importance of specific or few properties (e.g., type, size, and surface functionalization) for one or a few NPs. In contrast, machine learning can quickly screen and sort various important features for various NPs at the same time. Moreover, the TBRFA approach overcame the conventional important feature analysis bias caused by the unbalanced data structure, identified the critical features (recovery duration, dose, SSA, and diameter), and quantified the importance of features and the response degree of biological biomarkers to features, thus providing a reference for the design of ideal NPs.
### Feature interaction networks created by TBRFA
The mechanism underlying the ability of NPs to induce immune toxicity is complicated. Understanding how the different properties of materials interact with each other (feature interaction networks) and influence their immune response and organ burden is critical to the design and application of NPs, although the related information remains largely unknown (39). Because most machine learning methods are black-box models, identifying the interactions among features represents a difficult challenge. The conditional minimal depth (Fig. 7A) in RF represents the strength of interactions between two features (40). As demonstrated in Fig. 7B and figs. S8 to S21C, the conditional minimal depth was calculated to obtain the order of the interaction strength between features, and then the strongest four feature interaction relationships were displayed through a double-variable partial dependence analysis (Fig. 7, C to F, and figs. S8 to S21, D to G). However, strong interactions between features were not found for most of the partial dependence analyses, and they tended to show a simple additive effect. A comparison with the unconditional minimal depth of the feature showed that the conditional minimal depth was greatly affected by the importance of the feature itself. If the two features are both important, then they will have small and similar depths; therefore, even if they are close in the tree, they may not interact with each other.
To weaken the influence of feature importance on the interaction represented by the conditional minimal depth, the RF based on the decision tree was explored again, which was called feature interaction network analysis. We redesigned an interaction coefficient on the basis of the conditional minimal depth (see Materials and Methods and Fig. 8A). To calculate the interaction coefficient between features, we explored the working mechanism of RF in depth, traversed each decision tree constituting the RF, and obtained the properties of the tree and its features. Subsequently, we integrated the interaction coefficients and built interaction networks for each RF model. The interactions between NP properties were mainly analyzed to provide guidance for NP design. Interaction networks of total proteins, total cells, IL-6, IL-4, lung burden, and liver burden are provided as examples in Fig. 8 (B to G), and the other networks are given in figs. S22 to S30. As shown in Fig. 8 (B to G), the network analysis for the immune response dataset indicated that SSA had a strong interaction with the zeta potential and length/width, while the network analysis of the burden dataset indicated that diameter had strong interactions with length. The above feature interaction network explained the critical roles of SSA in immune responses (fig. S22C). The feature interaction network clearly showed the connections between NP properties and immune responses or organ burden (Fig. 9, A to F). For example, NPs with negative charges (<0 mV) and small SSAs (0 to 200 m2/g) induced low levels of total protein and total cells increase and high levels of IL-4 and IL-6 release (Fig. 9, A to D). The total protein value reflects the trend of inflammation as a whole, and the complicated trend between different cytokines and NP zeta potentials may be related to the electrostatic interaction between the particle surface and cytokines (41, 42). There was an important influence of both zeta potential and SSA on the formation of protein coronas and the uptake of nanomaterials (43, 44). The interactions excavated by TBRFA indicated that both factors were mutually restrictive and affected the biocompatibility and toxicity of NPs. Long NPs caused more severe immune responses than short NPs, while a suitable SSA reduced different immune responses (Fig. 9, E to F). For the burden dataset, the interactions between diameter and length caused the opposite degree of lung and liver burden. One-dimensional NPs had the lowest accumulation in the lung and the highest accumulation in the liver, suggesting that length determined the translocation capacity of NPs, which was consistent with the conclusion drawn by Huang et al. (45) that long NPs were cleared from the lung quickly. The above results also agreed that gold nanorods accumulated significantly less than gold spheres with similar size and surface chemistry (46). NPs with nonspherical shapes exhibited the properties of targeted accumulation because of the deviating hydrodynamic behavior (e.g., roll and rotate) and lateral drifting speed in the vessel (47). In addition, NPs with a length and width in the range of 100 and 500 nm showed greater transport across organs (Fig. 9, G to I). Figure 9J visualizes the conclusions of the above partial dependence analysis. This result further supplements the conclusion on the NP size effect on organ burden obtained from the TBRFA importance analysis, indicating that feature interaction network analysis was a powerful method of boosting the interpretability of machine learning. The models are consistent with the experiments, ensuring the reliability of TBRFA. TBRFA discovers hidden feature interactions that are difficult to explore through few experiments and other machine learning methods [e.g., ANN and deep neural network (DNN)]. TBRFA extracts the complex interaction network among NP properties, immune response, and organ burden, thereby providing guidance for the design and discovery of ideal NPs.
## DISCUSSION
Given the high costs and limitations associated with animal protection, comprehensive biological response evaluation experiments for various NPs are not practicable. Although a number of studies have applied machine learning approaches to solve the above problems, the interpretability of the models is poor, thus hindering the application of machine learning in the design and discovery of ideal NPs. Here, a rigorous TBRFA approach that boosts the interpretability of machine learning successfully predicted the pulmonary immune response and organ burden of NPs. The optimized prediction accuracy was achieved, with R2 values of all training sets >0.9 and half of the test sets >0.75. To overcome the shortcomings of traditional importance analyses, TBRFA used multiway importance analysis and reduced the biases caused by the unbalanced structure of small sample datasets. The TBRFA framework also established feature interaction networks and boosted the interpretability of machine learning. It is difficult for researchers to fully explore the joint effects of multiple features through experiments. In most machine learning studies, the exploration of interpretability usually stops at revealing the importance of features and ignores the relationships under the joint action (e.g., antagonism and synergy) of multiple features (12, 48). It is well known that the interactions between NPs and biology are determined by multiple features or properties of NPs (49), but the key features that regulate biological responses remain controversial. For the design of NPs, studies usually focus on one or two features (50), but how the other features influence the global properties of NPs is unclear. The feature interaction network analysis in Fig. 8 provides insights into the above challenging question.
The TBRFA approach revealed and explained the critical roles of SSA and diameter in the NP immune response and organ burden, respectively. The improved interpretability of machine learning is useful for models that explore causation and the design of excellent NPs in the medicine, biosensor, drug delivery, and other health care fields, and it also provides accurate predictions. Some animal experiments conducted by different laboratories are not completely consistent due to the biological response affected by multiple factors (e.g., the sources of animals, the environments of animal growth, and the operation skills of researchers) (51, 52). The above biases of data, especially for small-size data, would lead to a rather large variation in test predictive performance across labels. As the above explanation, the biases of data from interlaboratory studies may contribute to the misclassified (very off-diagonal) samples in Fig. 3E. Drafting standardized nanomaterial characterization protocols and animal exposure protocols and improving the quality of the literature will ensure the authenticity of the label value and greatly improve the accuracy and applicability of TBRFA (49). Further improving the degree of automation of interaction coefficient calculations will also make TBRFA more suitable for big data. Overall, the models established in this work are suitable for predicting the lung immune response induced by inorganic NPs and their lung burden. TBRFA also deserves application in other fields, and the discovered feature interaction networks could contribute to human disease or anticancer drug research.
## MATERIALS AND METHODS
### Extracting data to establish datasets
The immune response data were obtained from published articles in the ISI Web of Knowledge database (the datasets before 31 December 2020 were collected). A total of 2548 studies were initially searched using the following search formula: TS = nano* AND TS = immun* NOT TS = Immunosensor AND (TS = mice OR TS = rat OR TS = mouse) AND (TS = pulmonary OR TS = lung). Given the heterogeneity of the biological data, the acquired publications were then filtered by the following conditions: (i) full text was available; (ii) the topic was the pulmonary immune responses of mice or rats induced by NPs; (iii) at least one of the following immune metrics contained: total protein, LDH, alkaline phosphatase, cell count [total cells, macrophages, and neutrophils (polymorphonuclear neutrophils)], cytokines, and chemokines; (iv) exposure methods were instillation, oropharyngeal aspiration, or similar methods; and (v) basic material characterization data and experimental conditions were provided. Last, 1620 samples were identified to establish datasets. To precisely and comprehensively establish the relationships between NP/exposure features and pulmonary immune responses, 16 features were included in the dataset, and they consisted of seven material properties, four animal properties, and five experimental conditions. Two biochemical indicators, three types of cell counts, and six different cytokines were selected as labels for the immune responses. The details are shown in supplementary Excel files.
Acquisition of lung burden data followed the above workflow. A total of 3525 studies (search date, June 2020) were initially searched using the following search formula: TS = nano* AND (TS = mice OR TS = rat OR TS = mouse) AND (TS = pulmonary OR TS = lung) AND TS = (accumulat* or burden* or clear*). Taking the exposure method and the determined features from the immune response dataset as the main filtering basis, 302 samples were lastly used to establish datasets. Liver and BALF burden data were also included in this burden dataset (supplementary Excel files). The data of biological responses to NPs are very complex and distributed in the texts, tables, and figures of publications. It is difficult to extract the required data by machine. The data were extracted from the publications by hand. The data directly given in texts and tables were copied by hand. For the data in the figures, the “Digitizer” tool provided by OriginLab was used to read each point three times and then the averages were calculated. To reduce the errors, the extracted data were checked thoroughly by another person again.
### Preprocessing data
To calculate characteristic variables, the six characteristic variables in the dataset (NP type, shape, surface functionalization, animal, gender, and method) need to be coded. “One-hot” is a general encoding method that converts disordered and discrete variables into binary vectors to overcome the problem that such variables cannot be recognized by machine learning algorithms. For the three discrete features with few unique types (i.e., animal, gender, and method), the “one-hot” coding was adopted. For one-hot encoding features, there were no obvious correlations through correlation coefficient analysis (fig. S2). However, the one-hot method was not suitable for the descriptor “NP types” because the diversity of NP types (n = 57) caused a rapid increase in the data dimension. New descriptors were created on the basis of chemical properties for the other three characteristic variables to distinguish different properties. The new descriptors are as follows:
1) NP types: carbide (0/1), macromolecular compound (M.C., 0/1), oxide (0/1), salt (0/1), component 1 (Com.1, relative atomic mass), and component 2 (Com.2, relative atomic mass).
2) Shape: hollow (0/1), granular NPs (Dim.0, 0/1), one-dimensional NPs (Dim.1, 0/1), and two-dimensional NPs (Dim.2, 0/1).
3) Surface functionalization: positive charge (S.P., 0/1) and negative charge (S.N., 0/1).
To prevent certain features from contributing excessively to the models, the z-score (Eq. 1) normalization method was applied to the features. The formula is listed as follows
$x′=(x−μ)σ$
(1)where x is the feature value, μ is the mean of each feature, and σ is the SD of each feature. The raw data in literatures are difficult to use for direct comparison. The difference in experimental design and used animals may produce biases in models. To intuitively reflect the relative degrees of the immune response caused by different NPs in different literatures, the label data were converted to values between −1 and 1 on the basis of the treated and control groups in each literature individually, rather than using the data in all literatures together, to reduce the biases.
The formula is listed as follows
(2)where y and c are the values of the experimental group and control group, respectively.
### Machine learning regression
RF models were trained using scikit-learn in Python 3.7. According to different labels, the datasets were split into 15 subsets (12 immune response subsets and 3 burden subsets) that corresponded to 15 regression models. The RF models used 500 random decision trees and selected 5 random features at each node, which were determined by the grid search method (53). RF is based on bootstrapping to avoid inherent overfitting (54, 55). A 10-fold cross-validation (ShuffleSplit) method was used for each machine learning algorithm to prevent overfitting, with 90% of the samples in each subset chosen as training sets and 10% chosen as test sets. Approximately 36.8% of the samples in the training set, which were called OOB data, were used as the validation sets and not used during the training process (56). The percentage of OOB was calculated by the following formula
$limm→∞(1−1m)m=1e≈0.368$
(3)where m is the frequency of sampling and e is the natural constant with a value of approximately 2.71828. Each model was trained 10 times, and the average of the R2 and RMSE values between the predictions and observations were calculated to measure the model performance.
Two-layer fully connected ANN models were trained using Keras in Python 3.7. The workflow was similar to that of the RF regression except that 25% of the samples in the training set were split randomly as validation data to monitor overfitting. Multilayer feedforward neural networks with different layers and different units in the hidden layer were trained to find the optimal configuration, and 57 and 55 units in the hidden layers were adopted in the ANN immunotoxicity and burden models, respectively. Stochastic gradient descent was used as the optimizer, and a small learning rate decay (less than 0.0001) was set to prevent overfitting during the training process. SVM models were trained using scikit-learn in Python 3.7. Tenfold ShuffleSplit method was also applied. “Rbf” was chosen as the kernel function. The regularization parameter was set to 1.
### Overfitting test
To judge whether the RF models used were overfitted, we adopted a permutation test method. In each process of 10-fold cross-validation, 20, 40, 60, 80, and 100% of the label values in the training set were randomly replaced by random values within the original label range, and the corresponding cross-validation coefficients (Q2) were calculated. The calculation formula of Q2 is as follows
$Q2=1−∑i=1n(yi−ŷ)2∑i=1n(yi−y¯)2$
(4)where yi is the observed label value,
$ŷ$
is the predicted label value, and
$y¯$
is the average of the label. The permutation of each ratio (20, 40, 60, 80, and 100%) was performed 10 times, resulting in 500 permutation Q2 values for each model (5 ratio × 10 times/ratio × 10 folds). Subsequently, linear regressions were performed on the Q2 values and the correlation coefficients between the original labels and the permutation labels. The intercept of the regression result on the y axis less than 0.05 proves that the model is not overfitting (30).
### NP preparation and characterization for model verification
Three types of MWCNTs with axial lengths ranging from approximately 0.5 to 2 μm were obtained from XFNANO (China): S-MWCNTs (production number XFM10; diameter, 8 to 15 nm; purity > 95%), M-MWCNTs (production number XFM16; diameter, 10 to 20 nm; purity > 95%), and L-MWCNTs (production number XFM28; diameter, 30 to 50 nm; purity > 95%). All the MWCNTs were produced by the chemical vapor deposition method. To investigate the effects of surface modification on immune responses, nano-TiO2 (production number XFI02; diameter, 20 to 40 nm; purity > 99%) and hydroxylated MWCNTs (production number XFM16; diameter, 10 to 20 nm; purity > 95%) functionalized with triethoxycaprylylsilane (F-MWCNT) were synthesized. Functionalization was carried out by stirring a mixture of 100 mg of hydroxylated MWCNTs with 10 mg of triethoxycaprylylsilane (DB, Shanghai) in 100 ml of 90% ethanol solution at 70°C for 8 hours. The mixture was then centrifuged at 1699g for 15 min, washed with Milli-Q water (18.2 megaohm cm−1), and then vacuum freeze-dried. To calculate the sizes of the NPs, transmission electron microscopy (TEM) images were obtained on a TEM instrument (JEM-2010 FEF, JEOL, Japan). Fourier transform infrared (FTIR) spectroscopy (Bruker Tensor 27, Germany) with a resolution of 2 cm−1 from 4000 to 400 cm−1 was used to confirm the synthesis of F-MWCNTs. Zeta potentials were determined by a ZetaSizer Nano instrument (BI-200SM, Brookhaven, USA). BET surface areas were measured with a surface area and porosity analyzer (ASAP 2460, Macrometrics, USA). The results of characterization were given in the supplementary note S2 and tables S4 and S5.
### Animal experiment
Male Institute of Cancer Research (ICR) mice with a body weight range of 24 to 26 g were purchased from Vital River Laboratories (Beijing, China) and acclimated for 2 weeks in animal facilities supplied with normal food and water. All animal studies were performed in accordance with the guidelines and regulations of the Human and Animal Experiments Ethical Committee of the Nankai University. The four types of NPs were individually suspended in sterile phosphate-buffered saline (PBS) at 1 mg/ml. Suspensions were processed with ice-bath ultrasonication before instillation to ensure even dispersion. ICR mice (n = 6 per group) were treated individually with a single intratracheal instillation of 25 μl of (1 mg/kg) NPs. Equal volumes of PBS were instilled as a control.
### Immune response analysis
Frozen sections (thickness, 5 μm) of lung lobes were made by a clinical cryostat (CM1850, Leica, Germany) for immunofluorescence. Anti–nuclear factor κB (NF-κB) p65 with Alexa Fluor 555 (bs-0465R-AF555, Bioss, China) and anti–IL-1β with fluorescein isothiocyanate (FITC) (bs-0812R-FITC, Bioss, China) were used to label NF-κB p65 and IL-1β, respectively. 4′,6-diamidino-2-phenylindole (DAPI) was used to stain the nuclei throughout the lung section. Immunofluorescence images of NF-κB (red), IL-1β (green), and DAPI (blue) were obtained with a confocal laser scanning microscope (LSM880 with Airyscan, Zeiss, Germany) at 543, 488, and 405 nm, respectively.
### Model validation
Model validation was composed of two parts: animal experimental and validation sets. In terms of animal experiments, the characterization data and experimental conditions of NPs were input into the trained RF models to obtain predicted values. To validate the accuracy of the model, the immunofluorescence intensity of the IL-1β protein was statistically analyzed and compared with the predicted IL-1β results. The interval formed by ±RMSE was considered to be the allowable error bound of the model (11). As the validation set, random seeds were set to randomly sample the validation set (n = 5) for each subset before modeling. The five validation sets covered the NPs with a wide range of responses. The validation set did not participate in the construction of the model at all to ensure that the model did not learn them during the cross-validation. During the 10-fold cross-validation process, the average predicted values of 10 times were obtained for comparison with the observed values. According to the data source, the animal experiment validated the three critical NP properties (diameters, SSA, and zeta; see table S4), and the validation set validated all features.
### Feature selection
Models were optimized using a SBS procedure. This method started from the full set of features to eliminate redundant features one by one to find the optimal feature subset. The R2 of each selection process was calculated and recoded to compare the performances of different feature combinations. To avoid the models losing too much information, we set the minimum number of features selected by SBS to not be less than one-half of the total number of features.
### Feature importance analysis of TBRFA
Feature importance analysis was based on the “randomForest” and “randomForestExplainer” packages in R 4.0.2. To avoid the bias produced by a single indicator (i.e., MSE) used in comment RF, a total of four indicators (MSE increase, node purity increase, P value, and mean minimal depth) were selected to represent different perspectives and to comprehensively evaluate the importance of features. MSE increase is based on the decrease in predictive accuracy of the forest after perturbation of the variable; node purity increase is based on changes in node purity after splits on the variable; and P value is based on the one-sided binomial test to evaluate the significance of feature importance (40, 53). The mean minimal depth is based on the structure of the forest. The significant and important features were screened by calculating the MSE and node purity (measured by residual sum of squares) increase and the P value. During the training process, feature importance was also reflected by the mean minimal depth of the feature among trees. In this study, five random features were set to be randomly sampled as candidates at each node and one of the five that contributed the most to the overall split was retained at the node. Therefore, features near the root were more important than others.
### Feature interaction network analysis of TBRFA
The conditional minimal depth of features represents the strength of the interaction between two features. The original conditional minimal depth of features was initially calculated using the randomForestExplainer package. Four groups of strong interaction features were selected for the double-variable partial dependence analysis. However, there was actually no specific interaction between some features. To improve the present method and weaken the influence of the feature importance (minimal depth) on the interaction among features, we explored the conditional minimal depth of each feature in each tree of an RF model and used the occurrences of interaction among the feature and its corresponding root feature to normalize its conditional minimal depth. The interaction coefficient is defined as follows
$ρA:B=OA:BOB×∑i=1ntreeDT−DA:B−1DTOA:B$
(5)where A and B are two of the features, A:B means the interaction of B and the maximal A-subtree [see the description by Ishwaran et al. (40)], ρA:B is the directed interaction coefficient, OA:B is the occurrence of the interaction of B and the maximal A-subtree among the trees (ntree = 500), OB is the occurrence of B among the trees (ntree = 500), DT is the tree depth, and DA:B is the minimal depth of B in the maximal A-subtree, that is, the conditional minimal depth. All interaction coefficients in each RF model were calculated, and the interaction coefficients that had two directions (using average values) were merged. Then, the importance of features was combined to build feature interaction networks, and new strong interaction features for double-variable partial dependence analysis were screened out.
### Statistical analysis
A two-sided Kolmogorov-Smirnov test was implemented in R software to test whether the distribution of the data was normal (P > 0.05).
Acknowledgments: We acknowledge the technical support provided by H. Zhang, C. Zou, J. Xu, W. Li, L. Zhang, and R. Cai from the Nankai University. Funding: This work was financially supported by the National Natural Science Foundation of China (grant nos. 21722703 and 42077366), the 111 program (grant no. T2017002), and the National Key Research and Development Project (grant no. 2019YFC1804603). Author contributions: X.H. designed the project; X.H. and F.Y. contributed to the writing and revision of the manuscript; F.Y. ran the models; F.Y. and P.D. collected the data; C.W., F.Y., and T.P. performed the animal experiments. Competing interests: The authors declare that they have no competing interests. Data and materials availability: All data needed to evaluate the conclusions in the paper are present in the paper and/or the Supplementary Materials. Datasets containing all relevant literature data are provided as supplementary Excel files, and the datasets are also available on Zenodo at https://doi.org/10.5281/zenodo.4661099. Performance of models, TEM, FTIR, and other characterization of materials are also provided in the Supplementary Materials. The custom codes written to develop the machine learning models, perform TBRFA and other analysis, and generate figures are all available on Zenodo at https://doi.org/10.5281/zenodo.4660115.
## Breast milk boosts immunity against infections: Top pediatrician
• May 23, 2021
As we spend more and more time living in pandemic conditions the state and importance of our health come ever to the forefront and the health of our children most of all. So, parents are looking at ways on how they can maximize the protection of their babies. According to a top Turkish pediatrician, there is a simple answer: breast milk.
Breast milk, not only provides nutrition to infants but it strengthens the immune system and protects them from infections. “Studies show that infants who are breastfed for a year are 50% less likely to catch an infection than other babies,” said Nalan Karabayır, who teaches pediatric health and diseases at Medipol Mega University Hospital in Istanbul.
Breast milk has indirect ways of helping infants as well. Antibodies for the coronavirus were found in the milk of mothers who were vaccinated, and babies can be protected in this way.
Karabayır said if the mother is inoculated against the coronavirus, it will protect her and her baby from infection.
Touching on the effects of COVID-19 on mothers and infants, and referring to studies, Karabayir noted that the pandemic affects children of all ages but with our current knowledge, it is accepted that it is not transmitted through breast milk.
“It is known that antibodies against SARS-CoV-2, which occur in the mother who had a COVID-19 infection, also pass into breast milk and protect the baby from infection,” she said.
It is known that breastfeeding is safe as long as mothers strictly follow isolation practices such as wearing masks, social distancing and hygiene, she said.
Underlining that living cells of the mother’s immune system are present in breast milk, Karabayır explained, “Thanks to breast milk, the baby receives 1.5 million live cells in every 1 milliliter (0.03 ounce) of milk.”
The World Health Organization and groups dealing with infant and children’s health suggest that babies should breastfeed for the first six months and breastfeeding should continue until at least they reach 2 years old, she said.
Karabayır emphasized that babies are born before their immune systems are fully mature. “Physical and chemical conservators are not yet developed postnatally. For this reason, they need immunological components in breast milk to combat microorganisms that may cause infection.”
“In addition to the nutritional properties of breast milk, the live cells, probiotics, cytokines, immunoglobulins and oligosaccharides it contains, provide protection of the baby from infections. For these reasons, breast milk is unique,” she added.
## Novel immunotherapy boosts long-term stroke recovery in mice
• May 19, 2021
PITTSBURGH, May 19, 2021 – Specialized immune cells that accumulate in the brain in the days and weeks after a stroke promote neural functions in mice, pointing to a potential immunotherapy that may boost recovery after the acute injury is over, University of Pittsburgh School of Medicine neurologists found.
The study, published today in the journal Immunity, demonstrated that a population of specialized immune cells, called regulatory T (Treg) cells, serve as tissue repair engineers to promote functional recovery after stroke. Boosting Treg cells using an antibody complex treatment, originally designed as a therapy after transplantation and for diabetes, improved behavioral and cognitive functions for weeks after a stroke in mice compared to those that did not receive the antibody complex.
“The beauty of this treatment is in its wide therapeutic window,” said senior author Xiaoming Hu, M.D., Ph.D., associate professor in the Department of Neurology at Pitt’s School of Medicine. “With most strokes, you have four and a half hours or less when you can give medication called tPA to reopen a blocked blood vessel and expect to rescue neurons. We’re excited to identify a mechanism that may promote brain recovery by targeting non-neuronal cells well after this window closes.”
Previous research in stroke has been focused on developing new drugs to reduce neuronal death. And whereas these acute stroke treatments quickly lose effectiveness after neurons die, Treg cells remain active for weeks after the injury.
True to their name, Treg cells are immune cells that regulate the immune response, including curtailing excessive inflammation that could harm more than help. Hu and her colleagues observed that the levels of Treg cells infiltrating the brain began to increase about a week after a stroke and continued increasing up to five weeks later. So, they did multiple tests in mice after they’d had strokes, paying particular attention to the brain’s white matter–which is the brain tissue through which neurons pass messages, turning thoughts into actions, like lifting food to your mouth or saying the name of an object you’re looking at.
Mice that were genetically unable to produce Treg cells fared worse than mice with a robust Treg cell response. Interestingly, it was only in the latter phases of stroke recovery that the Treg cell-depleted mice suffered impairments in white matter integrity and behavioral performance compared to mice with a normal Treg cell response.
Additionally, when normal mice were given an antibody complex called “IL-2:IL-2Ab” to boost their Treg cell levels after a stroke, their white matter integrity improved even more and neurological functions were rescued over the long term. The mice with more Treg cells had an easier time moving and had better memories, allowing them to navigate mazes faster after a stroke than their non-treated counterparts.
“This strongly suggests that, rather than working to preserve white matter structure and function immediately after a stroke, Treg cells influence long-term white matter repair and regeneration,” said Hu, also a member of the Pittsburgh Institute of Brain Disorders and Recovery and a U.S. Department of Veterans Affairs (VA) investigator. “Our findings pave the way for a therapeutic approach to stroke and other neurological disorders that involve excessive brain inflammation and damage to the white matter. Treg cells appear to hold neurorestorative potential for stroke recovery.”
Hu stressed that there are still many hurdles to cross before Treg cells could be used in humans for stroke recovery. Namely, research is needed to determine the best way to boost the number of Treg cells in stroke victims. This could be done by improving IL-2:IL-2Ab so that it better stimulates production of Treg cells with fewer side effects, or a personalized therapy could be developed where some cells are taken from an established Treg cell bank and used to grow custom Treg cells in the lab, which could then be infused back into the patient.
###
Additional authors on this research are Ligen Shi, M.D., Ph.D., Zeyu Sun, M.D., Wei Su, M.D., Di Xie, M.D., Qingxiu Zhang, M.D., Xuejiao Dai, M.D., Ph.D., Kartik Iyer, B.S., T. Kevin Hitchens, Ph.D., Lesley M. Foley, B.S., Sicheng Li, Ph.D., Donna B. Stolz, Ph.D., Kong Chen, Ph.D., Ying Ding, Ph.D., and Angus W. Thomson, Ph.D., all of Pitt; Fei Xu, B.S., and Jun Chen, M.D., both of Pitt and the VA Pittsburgh Health Care System, and Rehana K. Leak, Ph.D., of Pitt and Duquesne University.
This research was supported by the National Institute of Neurological Disorders and Stroke grant NS094573 and VA grant I01 BX003651.
To read this release online or share it, visit https://www.upmc.com/media/news/051921-hu-treg-stroke.
About the University of Pittsburgh School of Medicine
As one of the nation’s leading academic centers for biomedical research, the University of Pittsburgh School of Medicine integrates advanced technology with basic science across a broad range of disciplines in a continuous quest to harness the power of new knowledge and improve the human condition. Driven mainly by the School of Medicine and its affiliates, Pitt has ranked among the top 10 recipients of funding from the National Institutes of Health since 1998. In rankings recently released by the National Science Foundation, Pitt ranked fifth among all American universities in total federal science and engineering research and development support.
Likewise, the School of Medicine is equally committed to advancing the quality and strength of its medical and graduate education programs, for which it is recognized as an innovative leader, and to training highly skilled, compassionate clinicians and creative scientists well-equipped to engage in world-class research. The School of Medicine is the academic partner of UPMC, which has collaborated with the University to raise the standard of medical excellence in Pittsburgh and to position health care as a driving force behind the region’s economy. For more information about the School of Medicine, see http://www.medschool.pitt.edu.
###
Contact: Allison Hydzik
Office: 412-647-9975
Mobile: 412-559-2431
E-mail: [email protected]
Contact: Anastasia Gorelova
Mobile: 412-491-9411
E-mail: [email protected]
## Immunotherapy Approach against Hepatitis B Virus Boosts T Cells and Acts as Direct Antiviral
• May 17, 2021
Scientists at University College London (UCL) have identified a new immunotherapy against hepatitis B virus (HBV), the world’s most common cause of liver cancer. The team’s study using immune cells isolated directly from patient liver and tumor tissue, showed that using a known drug compound to block the activity of an enzyme called acyl-CoA:cholesterol acyltransferase (ACAT) was highly effective at boosting the response of specific immune system T cells that can fight both the virus and associated tumors. ACAT is required for cholesterol esterification, a mechanism that prevents the accumulation of excessive, potentially toxic levels of cholesterol in cells. The study, in addition, showed that ACAT inhibition acted as an antiviral that directly reduced HBV replication.
Commenting on the findings, Nathalie Schmidt, PhD, from UCL’s division of infection & immunity, said, “We have found a highly effective novel target for the treatment of chronic hepatitis B virus infection and liver cancer. Modulating cholesterol metabolism with ACAT inhibitors has the unique features of directly targeting the virus and tumors while at the same time boosting the T cells that fight them. This enables us to tackle the disease from multiple directions at the same time.”
The results are reported in Nature Communications by the UCL research team and collaborators at Oxford University, the Royal Free London NHS Foundation, and Leiden University Medical Centre. Schmidt is first author of their published paper, which is titled, “Targeting human Acyl-CoA:cholesterol acyltransferase as a dual viral and T cell metabolic checkpoint.”
Each year, chronic HBV (CHB) infection causes an estimated 880,000 deaths globally from liver cirrhosis and liver cancer (hepatocellular carcinoma; HCC), the authors explained. “Worldwide, HBV is the commonest cause of HCC, and HCC is the third most common cause of cancer-related deaths …” Current treatments for chronic HBV infection require long-term antiviral suppression using drugs known as nucleos(t)ide analogs (NUCs), but such therapies don’t completely inhibit ongoing expression of viral antigens, and can cause off-treatment effects.
Immune cells such as T cells are indispensable for fighting viruses and tumors, the UCL team noted, but are often highly dysfunctional and fail to control these diseases. Current standard-of-care treatments for HBV are thus largely incapable of eliminating the virus, do not prevent cancer development, and do not rescue immune cells. And while immune checkpoint inhibition using PD-1 blockade has been tested in Phase III HCC trials and in a Phase Ib study in HBV patients without HCC, the authors noted, “ … in both settings only a minority of patients had sustained responses, underscoring the need for additional approaches to increase therapeutic effect.” They noted, “A pressing goal is to develop a combination of more potent antiviral and immunomodulatory approaches that can achieve functional cure of HBV, defined as loss of detectable circulating viral surface antigen (HBsAg).”
Mala Maini, PhD, at UCL’s division of infection & immunity, explained, “Chronic hepatitis B virus infection is a major global health problem and the most common cause of liver cancer in the world. The development of novel therapeutic options is crucial to improve patient care. In this study, we aimed to identify a treatment target to directly inhibit the virus while also boosting the immune cells fighting it.”
Cholesterol is a lipid that is consumed as part of the diet, and which can exert multiple functions within different cells of the body. HBV infects the liver, an organ that is highly enriched in cholesterol and well known for limiting local immune responses. Recent studies have shown that ACAT knockdown or inhibition can directly reduce the growth of several tumors including HBV-related HCC. In their newly reported in vitro study, using human liver disease tissue samples, Maini’s lab at UCL showed that in contrast with currently available therapies, the tested ACAT inhibitors, including the oral drug avasimibe, boosted human HBV-specific CD8+ T cells capable of eliminating the hepatitis B virus. The immune-boosting effect was especially striking in T cells found in the HBV-infected liver and within liver cancer, overcoming the local restraints on immune cell function, and allowing the T cells to target both the virus and cancerous cells. ACAT inhibitors such as avasimibe, taken orally, have been shown to be well tolerated as cholesterol-lowering drugs in humans.
“We find that ACAT inhibition drives metabolic re-modelling, resulting in enhanced expansion and functionality of human CD8+ T cells directed against HBV and HCC, sampled directly from the site of disease,” the team noted. “The increase in functional HBV-specific CD8+ T cells was not merely due to the recovery of pre-existing responses, but also their expansion due to enhanced proliferation.”
The Maini group then collaborated with Jane McKeating, PhD, and her team at the University of Oxford, to show that ACAT inhibitors could also block the HBV life cycle directly. ACAT inhibition demonstrated “a clear antiviral effect,” by reducing both extracellular HBsAg and HBV particle production. The investigators pointed out this dual effect cannot be achieved by the antivirals currently used for the treatment of chronic hepatitis B.
The combined study results indicate that ACAT inhibition could offer a unique combination of both antiviral and immunotherapeutic effects, the scientists suggested. “… these data highlight the potential of ACAT inhibitors to modulate HBV antigen burden beyond existing antiviral agents, an important effect complementary to their capacity to enhance antiviral and antitumor T cell immunity.”
Commenting on the findings, Schmidt said, “The cholesterol-modifying drug is already known to be safe in humans and we hope that our study now informs the development of clinical trials combining cholesterol modulation with other immunotherapies. In summary, our findings offer exciting new possibilities for the treatment of patients with chronic viral infections and cancer.”
The authors concluded, “Here, we show that ACAT inhibition has antiviral activity against HBV, as well as boosting protective anti-HBV and anti-HCC T cells … Thus, ACAT inhibition provides a paradigm of a metabolic checkpoint able to constrain tumors and viruses but rescue exhausted T cells, rendering it an attractive therapeutic target for the functional cure of HBV and HBV-related HCC.” |
# Which one to compromise between MAPE and Adj R square in multiple regression
I'm trying to forecast sales of a product based on the other variables like Competitor sales, Fuel Price and CPI (Consumer Price Index).
The below given output (based on 1 to 44 months) gives me the lowest MAPE 11.62 when I validated with 45 to 48 actual sales
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -2320.6320 496.3898 -4.675 3.83e-05 ***
Sales lag_1 0.2124 0.1119 1.898 0.065515 .
Competi_sales(1) lag1 -1.6535 0.8875 -1.863 0.070404 .
Competi_Sales(1)_lag3 -5.4108 0.8352 -6.478 1.42e-07 ***
Competi sales(2)_lag1 2.3004 0.5726 4.017 0.000277 ***
Fuel price -48.3714 17.5225 -2.761 0.008926 **
CPI 22.2696 3.4485 6.458 1.51e-07 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 212.7 on 37 degrees of freedom
Multiple R-squared: 0.7252, Adjusted R-squared: 0.6806
F-statistic: 16.27 on 6 and 37 DF, p-value: 4.58e-09
I understand that by removing Sales lag_1 and Competi_sales(1) lag1 from the model (since both are not significant at alpha 0.05), the Adjusted R squared can be improved from 0.6806 but when If I do that the MAPE is increasing. For business use, MAPE is often preferred because apparently managers understand percentages better than other accuracy parameters.
Should I go ahead and forecast the sales using this model or should I remove the insignificant variables?
• In-sample performance may be a poor indicator of out-of-sample forecasting performance. Instead you could estimate your candidate models on a training sample, validate them on a validation sample and then select the best one (in terms of MAPE if you like) to be used for actual forecasting. Feb 11, 2015 at 7:26
• The above given Regression output is based on 44 (1 to 44) months then I validated the model with 4 months (45 to 48) which I retained for validation. I have given this information in my recent edit. I missed to mention, sorry about that.. Feb 11, 2015 at 8:58
• Only 4 obs. in the validation set is quite little... I understand your whole sample is small (48 obs.) but validation set should preferably be larger (e.g. 32 obs. for training and 16 for validation). And if you are in a time series setting, you could use a rolling window. Feb 11, 2015 at 9:13
• Thanks, Going forward I will get enough sample. Unfortunately, now I would need to predict the next 3 or 4 months sales figures with available data. Will this regression approach still work for me? Feb 11, 2015 at 9:25
• Not quite sure what you mean by this regression approach. The suggestions by @StephanKolassa make sense to me, you could very well try them out. Feb 11, 2015 at 9:31
In addition, it is not automatically the case that removing insignificant predictors will improve your adjusted $R^2$. This may happen or not.
Finally, you are including lagged sales. You may want to look at ARIMA models (e.g., auto.arima() in the forecast package, where you can include additional eXplanatory or eXternal variables like laggged competitor sales - note: which you will need to forecast again out-of-sample - or CPI via the xreg parameter.
• If you want to predict, $R^2$ is irrelevant - it's a measure of model fit. Do what the holdout sample suggests. However, remember that real data is noisy, so if the improvement in MAPE is trivial, it may turn out afterwards that the other model may have been better anyway. Feb 11, 2015 at 10:47 |
# Closing a "not a real question" that *could* make sense
Edit: This is not a proposal. I am just asking what I should be doing.
In this question: Number theory - Primitive root of $338$ the question as stated doesn't make any sense. However, in the comments a user has explained what the OP (probably) means. I sometimes see these questions where the question as stated doesn't make sense, but I (or someone else) can make a good guess as to what the OP really wants to know.
Is it better to just close the question, or should one just edit the question so that it makes sense (with the risk of changing the questions so that it actually isn't what the OP wants to know)?
Obviously, if the OP clarifies in the comments what the question really is, one can make the edit, but what about when the OP remains silent?
• Sorry, I didn't mean to get specific about this one question. I was trying to be more general. Mar 31 '13 at 12:54
The main issue with guessing is that the OP might come back, change the question to mean something else, and render all answers obsolete. This is why I think we should:
• Comment asking the OP to clarify.
• If the OP doesn't respond within a certain timeframe, we start voting to close. With the new review system, such questions will pick up votes in no time once the first vote is cast.
The OP can always edit and ask to reopen, or post a new question if the old one is unsalvageable. If the OP can't bother to respond to comments, I don't think guessing and answering the wrong question is worth our time.
• I don't think that "order of minutes" is reasonable. Not everyone is me, and not everyone is mainlining this website like oxygen. Some people would post a question and come back after a few hours. I do agree than 12 hours or so is probably reasonable, but a full day (perhaps two over the weekend) is more reasonable to me.
– Asaf Karagila Mod
Mar 31 '13 at 12:04
• @AsafKaragila I expect the OP to hang around for a few minutes after posting a question. Not everyone does I guess. I'll change this part of my answer. Mar 31 '13 at 12:08
• Just to be clear: I wasn't proposing anything! I was just asking whether to close or edit... Mar 31 '13 at 12:52
• @Thomas Removed the word proposal. :) Mar 31 '13 at 12:55
• @AymanHourieh: Thanks :) Mar 31 '13 at 12:56 |
# How do you simplify 16^(-1/4)?
${16}^{-} \left(\frac{1}{4}\right)$
""^4sqrt16=sqrt4 (means, the 2 times the square root of 16) |
# Can't put formatted tag names in tag wiki excerpt?
If you enter the text [tag:tag] in the tag wiki textbox, it produces .
If you enter the text [tag:tag] in the tag wiki excerpt textbox, it produces [tag:tag].
Why can't you include formatted tag names in the tag wiki excerpt? Both the tag wiki and the tag wiki excerpt make use of MathJax, but why don't they both have the tag name capability?
## 1 Answer
This is (by-design).
The sidebar when you are editing a tag wiki contains the following:
The tag wiki excerpt is a brief plain text introduction to the topic that the tag represents. ...
The important point above is plain text, which means no Markdown. So not only are not available, but even bold, italic, code, and hyperlinks are not processed.
• MathJax gets processed, though.
– Asaf Karagila Mod
Jul 23 '14 at 7:22
• @Asaf: Interesting. This will probably be due to the logical design of the site, with MathJax being enabled throughout a page, and SE being more easily able to limit where the Markdown is rendered. Jul 23 '14 at 7:52
• It wasn't always like that, and it took some time before the feature was implemented, but it's been like that for quite some time now. (See link by Martin in the comments to the main question.)
– Asaf Karagila Mod
Jul 23 '14 at 7:53 |
# (12 pts) Find the parametric equations of the tangent line to the curve r(t) = In (t) , 2Vt ,
###### Question:
(12 pts) Find the parametric equations of the tangent line to the curve r(t) = In (t) , 2Vt , at the point (0, 2, 1) (16 pts) Find the limit of the vector function lim (70 4+-j _
#### Similar Solved Questions
##### SUR 1101C †Test 1 20 pts 1) Convert the following measurementsinto the units indicated 4 pts a) 321.45 feet = meter 4 pts b)9.203 meters = feet 4 pts c) 75000 sq ft = acres 4 pts d) 5 acres =sq ft 4 pts e) 9 ch 17 link = ft 6 pts 2) Using the curvature andrefraction formulas to solve the following 3 pts a) Calculate theerror due to curvature and refraction for 3500 ft 3 pts b)Calculate the error due to curvature and refraction for 300kilometers 8 pts 3) For the following data, compute the hor
SUR 1101C †Test 1 20 pts 1) Convert the following measurements into the units indicated 4 pts a) 321.45 feet = meter 4 pts b) 9.203 meters = feet 4 pts c) 75000 sq ft = acres 4 pts d) 5 acres = sq ft 4 pts e) 9 ch 17 link = ft 6 pts 2) Using the curvature and refraction formulas to solve the ...
##### 10 use first two photos to answer 10 please my bad. calculate consulting revenues in year...
10 use first two photos to answer 10 please my bad. calculate consulting revenues in year 1 please. thank you This fact pattern provides information needed to answer Q10 through Q16. On August 1, Year 1, Hoppy Company agreed to provide consulting service to a large client over a 24-month perio...
##### 1. What is the change in temperature (in degrees Fahrenheit) of99 kg of wood that is burning for 45 minutes in a 1,285 Wfireplace? PLEASE SHOW ALL WORK AND UNITS. 2. While driving down Business 40 West, you notice thatyour engine light comes on in the dashboard of your car. Onceyou get the car to a mechanic, she explains that your 41 lb leadcar battery began to melt during the process of the caroverheating. If the temperature reached 625 degreesFahrenheit from 250 degrees Fahrenheit, what was
1. What is the change in temperature (in degrees Fahrenheit) of 99 kg of wood that is burning for 45 minutes in a 1,285 W fireplace? PLEASE SHOW ALL WORK AND UNITS. 2. While driving down Business 40 West, you notice that your engine light comes on in the dashboard of your car. Once you get the ca...
##### List three differences between registration, certification, and licensure.
List three differences between registration, certification, and licensure....
##### 7. It is known that 80% of all college professors have doctoral degrees: If 10 professors are randomly selected, find the probability that fewer than have doctoral degrees At least 6 have doctoral degrees. Between 5 and (inclusive) have doctoral degrees: Calculate the mean or expected number; Calculate the variance and standard deviation_ A study has shown that 60% of families in certain area have at least two cars. Find the probabilities that among 6 families; 4 have at least 2 cars Less than
7. It is known that 80% of all college professors have doctoral degrees: If 10 professors are randomly selected, find the probability that fewer than have doctoral degrees At least 6 have doctoral degrees. Between 5 and (inclusive) have doctoral degrees: Calculate the mean or expected number; Calcul...
##### Match each term tc tne most specific and accurate description cfthe term Determines wnetner it is to an indivicuals Acoalescent event advantage (in terms of inclusive fitness)to be B. Hamilton's rule altruistic toward relative prezygotic Living side by side in the same geographical area D-genetic drift One of two major types cf reprocuctive isclating barrier cnaracterized by adaptaticns tnat prevent parapatric hyorids between different species from forming effective population size Variatio
Match each term tc tne most specific and accurate description cfthe term Determines wnetner it is to an indivicuals Acoalescent event advantage (in terms of inclusive fitness)to be B. Hamilton's rule altruistic toward relative prezygotic Living side by side in the same geographical area D-genet...
##### A cannon ball is fired in a high trajectory, is slowed by gravity and air resistance,...
A cannon ball is fired in a high trajectory, is slowed by gravity and air resistance, and eventually buries itself in the ground. Describe where and when the energy changes from one type to another (i.e. work, KE, PE, heat) from the moment the gunpowder is ignited to when the cannon ball stops....
##### (10 points) Use diagonalization and decoupling transform to find the general solution of the following linear system_y'Hint: We can write A = PDP-[ whereP =D =["'9P'=[1 %
(10 points) Use diagonalization and decoupling transform to find the general solution of the following linear system_ y' Hint: We can write A = PDP-[ where P = D = ["'9 P'=[1 %...
##### The figure below displays a closed cycle for a gas (the figure is not drawn to...
The figure below displays a closed cycle for a gas (the figure is not drawn to scale). The change in the internal energy of the gas as it moves from a to c along the path abc is -200 J. As it moves from c to d, 180 J must be transferred to it as heat. An additional transfer of 80 J to it as heat is ...
##### What mechanism is present in this rxn and how was the product obtained? f) VOH gasc,...
what mechanism is present in this rxn and how was the product obtained? f) VOH gasc, Low 2) CH₂oNa acetone octa...
##### As you recall, Chapter 9 provided a broad view of the mortgage deed process and role...
As you recall, Chapter 9 provided a broad view of the mortgage deed process and role of a promissory note. Chapter 10 expands the discussion to include the importance of a deed of trust. Nineteen states plus the District of Columbia use the Deed of Trust as the customary security instrument in the s...
##### 5. (Up to 20 Extra Points) Find and represent examples/applications for Percentile; examples should come with...
5. (Up to 20 Extra Points) Find and represent examples/applications for Percentile; examples should come with a story; (one example 10 Points; second example will have another 10 extra point)....
##### He parabola shown below_y =X+1te of point P is 5 and the €-coordinate of point Q ch passes through points P and Q?
he parabola shown below_ y =X+1 te of point P is 5 and the €-coordinate of point Q ch passes through points P and Q?...
##### Rablen () ket F'j eB(Csk]): (4) Sha that Ye>o, Jpe P(tssb])_guck Hat S(f,P) + S(J P) 4fff+fa t € .
Rablen () ket F'j eB(Csk]): (4) Sha that Ye>o, Jpe P(tssb])_guck Hat S(f,P) + S(J P) 4fff+fa t € ....
##### If ð‘‹âˆ¼ð¸ð‘¥ð‘(2), then its MGF is ð‘€(ð‘¡)=2/2−ð‘¡with |ð‘¡|<2. Find the first four moments of ð‘‹.
If ð‘‹âˆ¼ð¸ð‘¥ð‘(2), then its MGF is ð‘€(ð‘¡)=2/2−𑡠with |ð‘¡|<2. Find the first four moments of ð‘‹....
##### 15 . Rank in order;, from largest to smallest, the currents / to 14 through the four resistors in Figure Q22.15. Explain.2 V2 0 .FIGURE 022.15
15 . Rank in order;, from largest to smallest, the currents / to 14 through the four resistors in Figure Q22.15. Explain. 2 V 2 0 . FIGURE 022.15...
##### 10. -12 points SerPSE9 23.P.013.wi. My Notes Two small beads having positive charges q1 = 264...
10. -12 points SerPSE9 23.P.013.wi. My Notes Two small beads having positive charges q1 = 264 and q2 q are fixed at the opposite ends of a horizontal insulating rod of length d = 1.50 m. The bead with charge q1 is at the origin. As shown in the figure below, a third small, charged bead is free to sl...
##### Differentiate the function:5/x6 2x2 (3x5 G' (x) 5 (x6 + 2x) 5
Differentiate the function: 5/x6 2x 2 (3x5 G' (x) 5 (x6 + 2x) 5...
##### (a) Design an algorithm that reveals some secret integer number from the set {1, 2, ......
(a) Design an algorithm that reveals some secret integer number from the set {1, 2, ... , n} by guessing random numbers within the given range until the secret number has been guessed. Numbers should be replaced after being guessed such that it is possible to guess 2 and then 2 again, ...
##### Hydrocarbons Experiment 5. Write a chemical equation / reaction mechanism for the following: a. Combustion of an alk...
Hydrocarbons Experiment 5. Write a chemical equation / reaction mechanism for the following: a. Combustion of an alkane b. Unsaturated hydrocarbon + bromine c. Alkenes concentrated sulfuric acid d. Unsaturated hydrocarbon + KMnO4...
##### A standardized test has a mean score of 64 with a standard deviation of 6 what percentage of students score higher than 70 on the standardized test
A standardized test has a mean score of 64 with a standard deviation of 6 what percentage of students score higher than 70 on the standardized test? what percentage of students score higher then 76 on the standardized test? What percentge of students score lower than 58?...
##### Suppose we have two integer arrays with the same type, write an AL program to check...
Suppose we have two integer arrays with the same type, write an AL program to check whether or not there are two integers, one from each array, with sum equal to zero. If there are such integers exist, print out all such combinations to the console window, otherise, print out "No integers in the...
##### Chapter 10: Capillary Puncture Equipment and Procedures 199 16. Which of the following represents proper capillary...
Chapter 10: Capillary Puncture Equipment and Procedures 199 16. Which of the following represents proper capillary specimen collection technique? 18. An infant bilirubin specimen is collected in an a. Clean the site with alcohol and wipe it dry, so it amber microtube to will not sting. a. flag it as...
##### What information is needed to run a columnDry packingSlurry packingSolvent evoporatinganalytical TLC
What information is needed to run a column Dry packing Slurry packing Solvent evoporating analytical TLC...
##### In this final post, you will be applying what you have learnedin the class to the real world. Choose an article involvingchemistry published within the last six months. Explain how achemistry topic you learned in this course can be used tounderstand the chemistry behind this article. Be sure to cite yoursource in APA citation.
In this final post, you will be applying what you have learned in the class to the real world. Choose an article involving chemistry published within the last six months. Explain how a chemistry topic you learned in this course can be used to understand the chemistry behind this article. Be sure to ...
##### Thumbs up for a fast and accurate answer :) It says: Given the the variable list...
Thumbs up for a fast and accurate answer :) It says: Given the the variable list represents a reference to a linked list. Define a method called delete, that removes the last node in the list. This is Java Given the variable list represents a reference to a linked list. Define a method called dele...
x 1 xlnx b) y...
##### 1 If a, 6 € Z then a? + 86 _ 2 + 0.2. Prove that nl > 2 for n > 4
1 If a, 6 € Z then a? + 86 _ 2 + 0. 2. Prove that nl > 2 for n > 4...
##### The empty set is a subset of every set. (Hint: Consider the implication $x \in \emptyset \rightarrow x \in A .$ )
The empty set is a subset of every set. (Hint: Consider the implication $x \in \emptyset \rightarrow x \in A .$ )...
##### Use the trapezoidal rule with $n=5$ to approximate $\int_{1}^{11} x^{3} d x$ and use the fundamental theorem of calculus to find the exact value of the definite integral.
Use the trapezoidal rule with $n=5$ to approximate $\int_{1}^{11} x^{3} d x$ and use the fundamental theorem of calculus to find the exact value of the definite integral....
##### Question 9The graph below shows cumulative distribution function (CDF). Find the value of €. Give your answer as number rounded to decimal placesIncorrectMark 0.00 out 1.00Flag question3c[1 mark]Answer:
Question 9 The graph below shows cumulative distribution function (CDF). Find the value of €. Give your answer as number rounded to decimal places Incorrect Mark 0.00 out 1.00 Flag question 3c [1 mark] Answer:...
##### Provided is a list of actions or situations that show a violation of the AICPA Code...
Provided is a list of actions or situations that show a violation of the AICPA Code of Professional Conduct. For each case, select the relevant rule that is being violated. Relevant Rule a. CPA Ellen Stout performs the audit of the local symphony society. Because of her good work, she was elected an...
##### I need help on this data flow diagram pretty much i dont have a clue what i am doing
I need help on this data flow diagram pretty much i dont have a clue what i am doing. And my instructor has been no help all year so could somebody please do this for me. i dont have a clue how to use visio either. I have to do a dfd base on the JaD session example. A JAD Session Example A portion ...
##### 8 5 0 6 7 HLL 8 3 5 8 H 9 IH 0 7 1 L 0 0 HA 1 { 6 8 5? H 3 LW 1 m [ 1 1 1 J 8 8 1 ] 8 F
8 5 0 6 7 HLL 8 3 5 8 H 9 IH 0 7 1 L 0 0 HA 1 { 6 8 5? H 3 LW 1 m [ 1 1 1 J 8 8 1 ] 8 F... |
# separate style and content in table
I am generating tables from a program and its a bit inconvenient that I have to intersperse style and content information. For example, in the following note how \cellcolor{red} is interspersed among the data. It would be easier to generate if there could be a statement or statements at point %% A or at point %% B in the code below that indicated that in column 3, rows 3-4 that the cells should be colored red. Is this achievable?
\documentclass{article}
\usepackage{colortbl}
\usepackage[table]{xcolor}
\usepackage{tabu}
\begin{document}
\begin{center}
%% A
\begin{tabu}{XXXX}
%% B
1 & 2 & 3 & 4 \\
5 & 6 & 7 & 8 \\
9 & 10 & \cellcolor{red} 11 & 12 \\
13 & 14 & \cellcolor{red} 15 & 16 \\
17 & 18 & 19 & 20 \\
\end{tabu}
\end{center}
\end{document}
Output:
By the way, I have already seen this question which is also about separating style and content but as far as I understand it does not really provide the type of solution to the example shown above requested here.
EDIT: In case its not clear here is the type of code that would be desirable:
\documentclass{article}
\usepackage{colortbl}
\usepackage[table]{xcolor}
\usepackage{tabu}
\begin{document}
\begin{center}
\begin{tabu}{XXXX}
\preCell{3}{3}{\cellcolor{red}} % specifies that row 3 col 3 is red
\preCell{4}{3}{\cellcolor{red}} % specifies that row 4 col 3 is red
1 & 2 & 3 & 4 \\
5 & 6 & 7 & 8 \\
9 & 10 & 11 & 12 \\
13 & 14 & 15 & 16 \\
17 & 18 & 19 & 20 \\
\end{tabu}
\end{center}
\end{document}
-
In case this is not sufficiently clear I have added some sample code in the EDIT at the end to show the type of TeX code that I would like to generate from the program. Note commented lines in particular. – user1189687 Jul 17 '12 at 12:44
You can do something like this, but it will probably break as soon as \multicolum is involved:
\documentclass{article}
\usepackage{colortbl}
\usepackage[table]{xcolor}
\usepackage{tabu}
\begin{document}
\makeatletter
\newcommand\preCell[3]{\@namedef{tabstyle-#1-#2}{#3}}
\makeatother
\newcounter{rowcounter}
\newcounter{columncounter}
\begin{center}
\setcounter{rowcounter}{0}
\setcounter{columncounter}{0}
\preCell{3}{3}{\cellcolor{red}} % specifies that row 3 col 3 is red
\preCell{4}{3}{\cellcolor{red}} % specifies that row 4 col 3 is red
\begin{tabu}{>{\stepcounter{rowcounter}%
\setcounter{columncounter}{0}\stepcounter{columncounter}%
\csname tabstyle-\therowcounter-\thecolumncounter\endcsname}X
>{\stepcounter{columncounter}%
\csname tabstyle-\therowcounter-\thecolumncounter\endcsname}X
>{\stepcounter{columncounter}%
\csname tabstyle-\therowcounter-\thecolumncounter\endcsname}X
>{\stepcounter{columncounter}%
\csname tabstyle-\therowcounter-\thecolumncounter\endcsname}X}
1 & 2 & 3 & 4 \\
5 & 6 & 7 & 8 \\
9 & 10 & 11 & 12 \\
13 & 14 & 15 & 16 \\
17 & 18 & 19 & 20 \\
\end{tabu}
\end{center}
\end{document}
-
Excellent. I tried it with two tables in the same document and it still seems to work. I gather than the style info is stored locally in the \begin{center}...\end{center} so that it starts out afresh on any subsequent table. (If you do find any way for it to work with \multicolumn I would also be interested in that as well. – user1189687 Jul 17 '12 at 17:14
To get it to work with \multicolumn, you could try to define (with array) a new column type which advances the counter correctly and inserts the tabstyle(s) you want to use. – Ulrike Fischer Jul 18 '12 at 8:48
## 1. All Cells:
If you want all the cells in a particular column to have the same formatting, you can use the collcell package which allows you to pass the entry of each column to a command for further processing:
Alternatively, you could also use the array package, and define:
\newcolumntype{R}{>{\cellcolor{red}}X<{}}
## 2. Select Cells:
If you only want a select number of cells to be colored then you can use additional commands such as \ActivateColorCell to enable cell coloring and \DectivateColorCell to disable the cell coloring as desired:
# Code: collcell (all cells):
\documentclass{article}
\usepackage{collcell}
\usepackage{colortbl}
\usepackage[table]{xcolor}
\usepackage{tabu}
\newcommand{\ColorCellRed}[1]{\cellcolor{red}{#1}}
\newcolumntype{R}{>{\collectcell\ColorCellRed}X<{\endcollectcell}}
\begin{document}
\begin{center}
\begin{tabu}{XXRX}
1 & 2 & 3 & 4 \\
5 & 6 & 7 & 8 \\
9 & 10 & 11 & 12 \\
13 & 14 & 15 & 16 \\
17 & 18 & 19 & 20 \\
\end{tabu}
\end{center}
\end{document}
## Code: array (all cells):
\documentclass{article}
\usepackage{array}
\usepackage{colortbl}
\usepackage[table]{xcolor}
\usepackage{tabu}
\newcolumntype{R}{>{\cellcolor{red}}X<{}}
\begin{document}
\begin{center}
\begin{tabu}{XXRX}
1 & 2 & 3 & 4 \\
5 & 6 & 7 & 8 \\
9 & 10 & 11 & 12 \\
13 & 14 & 15 & 16 \\
17 & 18 & 19 & 20 \\
\end{tabu}
\end{center}
\end{document}
## Code: collcell (some cells):
\documentclass{article}
\usepackage{collcell}
\usepackage{colortbl}
\usepackage[table]{xcolor}
\usepackage{tabu}
\usepackage{etoolbox}
\newtoggle{EnableColorCell}
\togglefalse{EnableColorCell}
\newcommand*{\ActivateColorCell}{\global\toggletrue{EnableColorCell}}
\newcommand*{\DectivateColorCell}{\global\togglefalse{EnableColorCell}}
\newcommand{\ColorCellRed}[1]{%
\iftoggle{EnableColorCell}{%
\cellcolor{red}{#1}%
}{%
#1% no cell color as it is disabled
}%
}
\newcolumntype{R}{>{\collectcell\ColorCellRed}X<{\endcollectcell}}
\begin{document}
\begin{center}
\begin{tabu}{XXRX}
1 & 2 & 3 & 4 \\
5 & 6 & 7 & 8 \\\ActivateColorCell
9 & 10 & 11 & 12 \\
13 & 14 & 15 & 16 \\\DectivateColorCell
17 & 18 & 19 & 20 \\
\end{tabu}
\end{center}
\end{document}
## Code: array (some cells):
\documentclass{article}
\usepackage{array}
\usepackage{colortbl}
\usepackage[table]{xcolor}
\usepackage{tabu}
\usepackage{etoolbox}
\newtoggle{EnableColorCell}
\togglefalse{EnableColorCell}
\newcommand*{\ActivateColorCell}{\global\toggletrue{EnableColorCell}}
\newcommand*{\DectivateColorCell}{\global\togglefalse{EnableColorCell}}
\newcolumntype{R}{>{\iftoggle{EnableColorCell}{\cellcolor{red}}{}}X<{}}
\begin{document}
\begin{center}
\begin{tabu}{XXRX}
1 & 2 & 3 & 4 \\
5 & 6 & 7 & 8 \\\ActivateColorCell
9 & 10 & 11 & 12 \\
13 & 14 & 15 & 16 \\\DectivateColorCell
17 & 18 & 19 & 20 \\
\end{tabu}
\end{center}
\end{document}
-
Thanks but I am looking for the general case so the style does not just affect a column. Regarding the second approach, it intersperses \ActiveateColorCell and \DeactiveColorCello commands with the data whereas they should be separated. The program should be something like: print some text at top; print data; print some text at bottom` where all the style info is specified as part of the text at top. – user1189687 Jul 17 '12 at 11:32 |
# Tag Info
Accepted
### Flat fading criterion of OFDM subcarrier spacing
Your mathematical derivation is correct, your $H[k]$ is the single-tap equalizer (i.e. one tap for each subcarrier, and the subcarriers do not mix with each other. That's the orthogonal in OFDM). ...
• 6,068
Accepted
### Educational purpose - What is the correct way to simulate a multipath fading channel which has ISI
Lets say we want to transmit a sequence of discrete data $\left\lbrace x[n] \right\rbrace$. But because we are living in analog world, the sequence must be modulated. Call $T_s$ is symbol duration ...
• 5,760
• 2,142
Accepted
### What's the effect of spread spectrum on frequency- selective channel
In brief, we consider the channel as frequency-selective channel if the frequency of the signal is larger than then frequency of channel No offense, but that ought to win the prize for the least-...
• 2,288
### Flat fading criterion of OFDM subcarrier spacing
There's a lot of very valid aspects that you touch, but from what I've learned (and experienced having fun with OFDM SDR transceivers), the main reasoning to do OFDM is having a narrow-channel ...
• 26.3k
### Channel modelling for wireless body area network
IEEE 802.15.4a defines multiple bands from 2.4 to 10 GHz for operation. You should focus on one. Not sure you're actually looking for diffraction and not more for backscatter from surrounding objects ...
• 26.3k
Accepted
### Brief introduction to wireless communication and communication terminologies
Well, these are very fundamental questions, and I think they are written in any good book. But maybe it's hard to extract the exact information from them, which you ask for. So, let me briefly answer: ...
• 6,068
Accepted
### MIMO System Model in Matlab
In a wireless system, most of the noise is added by the receiver itself. The received signal is very weak (-100 dB or less is typical), and its power is comparable to the thermal noise of the receiver'...
• 13.8k
Accepted
### why did convolution coding achieve BER less than Reed-Solomon?
Reed-Solomon codes are good for correcting bursts of errors (such as those that often occur in computer memory systems such as RAM, or on less volatile media such as CDs and DVDs) or at the output of ...
• 18.9k
### Correct way to simulate Rayleigh fading for indoor environments
Your question is quite unclear, but it seems like you're trying to simulate the continuous-time radio channel. In this model, you do not multiply by complex coefficients; rather, you add delayed and ...
• 13.8k
### Cyclic prefix length in baseband OFDM with ZF equalizer
The channel which you have created is having 4-Taps and all taps are one after the other, meaning roughly there are 4 multi-paths and they are very close to each other. How close depends on what is ...
• 2,578
### what does mean quasi-static channel
Quasi-static channels can be said as "block-wise" time (in)variant. For example, your channel has no variations over time (not in delay domain) for some time-period, e.g., 1 ms, but the channel may ...
### Intersymbol interference due to limited channel bandwidth
Here is a graphic I have that demonstrates ISI due to multipath propogation: Notice the eye diagram in the upper right hand corner showing what we should receive if there was no ISI, or other noise ...
• 37.1k
Accepted
### Is the Channel shortening similar to Time domain Equalizer (TEQ)
Most likely people use different words to describe the same concept. This happens quite often. The TEQ is the more general term and also used to equalize other methods that OFDM, while CS is related ...
• 1,046
Accepted
### How can I generate time-variant Rayleigh channel in MATLAB
Yes, you can have time variant channel in MATLAB either by using comm.RayleighChannel() , you can read about it in help of matlab. or the other way you use the ...
• 1,046
### Digital communication BER performance
OK, let me explain that in easier way, As you know, in a communication system, to transmit information from transmitter to receiver, we use the binary information system. which means, for example, ...
• 1,046
For BPSK it's $$P_e = \frac{1}{2}\left[1 - \sqrt{\frac{\gamma}{\gamma+1}}\right]$$ where $\gamma$ is the average SNR. For 16-QAM, I am not sure if there is a closed-form solution. Check this book. ... |
# 四个正交子空间
## 正交
1. This is only a number
2. It is combination of column vectors
3. It shows Subspaces
1. 向量正交
2. 矩阵正交
3. 子空间正交
$$v^tw=0 \,\, and \,\, ||v||^2+||w||^2=||v+w||^2$$
definition:
$$v^tw=0 \,\,for\,\,all\,\,v\,\,in\,\,V\,\,and\,\,all\,\,w\,\,in\,\,W$$
$$r^tAx=r^t(Ax)= r^t\begin{bmatrix} \dots a_1\dots\\ \dots a_2\dots \\ \vdots\\ \dots a_n\dots \end{bmatrix} \begin{bmatrix} x_1\\ x_2\\ \vdots\\ x_n \end{bmatrix}= r^t\begin{bmatrix} 0\\ 0\\ \vdots\\ 0 \end{bmatrix}$$
$$r^tAx=0$$
Fundamental Theorem Part II(不完整版)
The row space is perpendicular to the nullspace
The column space is perpendicular to the nullspace of $A^T$
Fundamental Theorem I 说的是四个subspaces之间的维度的相互关系,第二部分说的是四个subspaces之间的正交关系,看来线性代数的核心是这四个subspace没错了。
## 正交互补(Orthogonal Complements)
This is very important ,The Fundamental subspace are more than just orthogonal in pairs.Their dimansions are also right.说实话,right这个词我想了半天也不知道对应中文那个词,三维空间中的两条线正交,但是他们并不可能是一个属于$3\times 3$矩阵的nullspace和rowspace因为他们都是dimension 1的加起来并不是3?你要问我为什么,往下看喽
Definition:Orthogonal Complement of a subspace V contains every vector that is perpendicular to V.This orthogonal subsapce is denot $V^{\perp}$(pronounced “V perp”)
Fundamental Theorem Part II(完整版)
$N(A)$ is the orthogonal complement of the row space $C(A^T)$ (in $R^n$)
$N(A^T)$ is the orthogonal complement of the row space $C(A)$ (in $R^m$)
$$x=x_{particular}+x_n$$
Share
Subscribe |
## Why do you think the authors are using the term "complex societies" instead of "civilizations"? Analyze the characteristics outlined describing "complex societies."
Why do you think the authors are using the term "complex societies" instead of "civilizations"? Analyze the characteristics outlined describing "complex societies." |
# 1.4 Transformation of functions (Page 6/22)
Page 6 / 22
Given the toolkit function $\text{\hspace{0.17em}}f\left(x\right)={x}^{2},\text{\hspace{0.17em}}$ graph $\text{\hspace{0.17em}}g\left(x\right)=-f\left(x\right)\text{\hspace{0.17em}}$ and $\text{\hspace{0.17em}}h\left(x\right)=f\left(-x\right).\text{\hspace{0.17em}}$ Take note of any surprising behavior for these functions.
Notice: $\text{\hspace{0.17em}}g\left(x\right)=f\left(-x\right)\text{\hspace{0.17em}}$ looks the same as $\text{\hspace{0.17em}}f\left(x\right)$ .
## Determining even and odd functions
Some functions exhibit symmetry so that reflections result in the original graph. For example, horizontally reflecting the toolkit functions $f\left(x\right)={x}^{2}$ or $f\left(x\right)=|x|$ will result in the original graph. We say that these types of graphs are symmetric about the y -axis. Functions whose graphs are symmetric about the y -axis are called even functions.
If the graphs of $\text{\hspace{0.17em}}f\left(x\right)={x}^{3}\text{\hspace{0.17em}}$ or $\text{\hspace{0.17em}}f\left(x\right)=\frac{1}{x}\text{\hspace{0.17em}}$ were reflected over both axes, the result would be the original graph, as shown in [link] .
We say that these graphs are symmetric about the origin. A function with a graph that is symmetric about the origin is called an odd function .
Note: A function can be neither even nor odd if it does not exhibit either symmetry. For example, $\text{\hspace{0.17em}}f\left(x\right)={2}^{x}\text{\hspace{0.17em}}$ is neither even nor odd. Also, the only function that is both even and odd is the constant function $\text{\hspace{0.17em}}f\left(x\right)=0.$
## Even and odd functions
A function is called an even function if for every input $\text{\hspace{0.17em}}x$
$f\left(x\right)=f\left(-x\right)$
The graph of an even function is symmetric about the $y\text{-}$ axis.
A function is called an odd function if for every input $\text{\hspace{0.17em}}x$
$f\left(x\right)=-f\left(-x\right)$
The graph of an odd function is symmetric about the origin.
Given the formula for a function, determine if the function is even, odd, or neither.
1. Determine whether the function satisfies $\text{\hspace{0.17em}}f\left(x\right)=f\left(-x\right).\text{\hspace{0.17em}}$ If it does, it is even.
2. Determine whether the function satisfies $\text{\hspace{0.17em}}f\left(x\right)=-f\left(-x\right).\text{\hspace{0.17em}}$ If it does, it is odd.
3. If the function does not satisfy either rule, it is neither even nor odd.
## Determining whether a function is even, odd, or neither
Is the function $\text{\hspace{0.17em}}f\left(x\right)={x}^{3}+2x\text{\hspace{0.17em}}$ even, odd, or neither?
Without looking at a graph, we can determine whether the function is even or odd by finding formulas for the reflections and determining if they return us to the original function. Let’s begin with the rule for even functions.
$f\left(-x\right)={\left(-x\right)}^{3}+2\left(-x\right)=-{x}^{3}-2x$
This does not return us to the original function, so this function is not even. We can now test the rule for odd functions.
$-f\left(-x\right)=-\left(-{x}^{3}-2x\right)={x}^{3}+2x$
Because $\text{\hspace{0.17em}}-f\left(-x\right)=f\left(x\right),\text{\hspace{0.17em}}$ this is an odd function.
Is the function $\text{\hspace{0.17em}}f\left(s\right)={s}^{4}+3{s}^{2}+7\text{\hspace{0.17em}}$ even, odd, or neither?
even
## Graphing functions using stretches and compressions
Adding a constant to the inputs or outputs of a function changed the position of a graph with respect to the axes, but it did not affect the shape of a graph. We now explore the effects of multiplying the inputs or outputs by some quantity.
We can transform the inside (input values) of a function or we can transform the outside (output values) of a function. Each change has a specific effect that can be seen graphically.
## Vertical stretches and compressions
When we multiply a function by a positive constant, we get a function whose graph is stretched or compressed vertically in relation to the graph of the original function. If the constant is greater than 1, we get a vertical stretch ; if the constant is between 0 and 1, we get a vertical compression . [link] shows a function multiplied by constant factors 2 and 0.5 and the resulting vertical stretch and compression.
#### Questions & Answers
how to know photocatalytic properties of tio2 nanoparticles...what to do now
it is a goid question and i want to know the answer as well
Maciej
Do somebody tell me a best nano engineering book for beginners?
what is fullerene does it is used to make bukky balls
are you nano engineer ?
s.
what is the Synthesis, properties,and applications of carbon nano chemistry
Mostly, they use nano carbon for electronics and for materials to be strengthened.
Virgil
is Bucky paper clear?
CYNTHIA
so some one know about replacing silicon atom with phosphorous in semiconductors device?
Yeah, it is a pain to say the least. You basically have to heat the substarte up to around 1000 degrees celcius then pass phosphene gas over top of it, which is explosive and toxic by the way, under very low pressure.
Harper
Do you know which machine is used to that process?
s.
how to fabricate graphene ink ?
for screen printed electrodes ?
SUYASH
What is lattice structure?
of graphene you mean?
Ebrahim
or in general
Ebrahim
in general
s.
Graphene has a hexagonal structure
tahir
On having this app for quite a bit time, Haven't realised there's a chat room in it.
Cied
what is biological synthesis of nanoparticles
what's the easiest and fastest way to the synthesize AgNP?
China
Cied
types of nano material
I start with an easy one. carbon nanotubes woven into a long filament like a string
Porter
many many of nanotubes
Porter
what is the k.e before it land
Yasmin
what is the function of carbon nanotubes?
Cesar
I'm interested in nanotube
Uday
what is nanomaterials and their applications of sensors.
what is nano technology
what is system testing?
preparation of nanomaterial
Yes, Nanotechnology has a very fast field of applications and their is always something new to do with it...
what is system testing
what is the application of nanotechnology?
Stotaw
In this morden time nanotechnology used in many field . 1-Electronics-manufacturad IC ,RAM,MRAM,solar panel etc 2-Helth and Medical-Nanomedicine,Drug Dilivery for cancer treatment etc 3- Atomobile -MEMS, Coating on car etc. and may other field for details you can check at Google
Azam
anybody can imagine what will be happen after 100 years from now in nano tech world
Prasenjit
after 100 year this will be not nanotechnology maybe this technology name will be change . maybe aftet 100 year . we work on electron lable practically about its properties and behaviour by the different instruments
Azam
name doesn't matter , whatever it will be change... I'm taking about effect on circumstances of the microscopic world
Prasenjit
how hard could it be to apply nanotechnology against viral infections such HIV or Ebola?
Damian
silver nanoparticles could handle the job?
Damian
not now but maybe in future only AgNP maybe any other nanomaterials
Azam
Hello
Uday
I'm interested in Nanotube
Uday
this technology will not going on for the long time , so I'm thinking about femtotechnology 10^-15
Prasenjit
can nanotechnology change the direction of the face of the world
how did you get the value of 2000N.What calculations are needed to arrive at it
Privacy Information Security Software Version 1.1a
Good
Berger describes sociologists as concerned with
Got questions? Join the online conversation and get instant answers! |
# Sorting structured data using memcmp-friendly encoding part 2 - floats
Sorting structured data using memcmp-friendly encoding part 2 - sorting floats
In the last post we’ve discussed converting integers and strings into a memcmp / byte-comparable format for faster comparison (but at the trade off of doing decoding/encoding at reading/writing). In this post let’s take a look at how do we do the same for floating pointers.
# Get cherry-pick to work across file renames
Making cherry-pick work across file renames
Recently I need to port over some changes using cherry-pick and that usually works fine without any issues (except for occasional conflicts), but this time the actual file foo.cc was renamed to bar.cc. In such case git cherry-pick simply gives up and simply tells you the old file you are changing has been deleted. As far as I can tell there isn’t a good way to resolve the conflict.
There are a couple of ways to address this issue. But the easiest way I found is to just rename the file back to the original name where you had made the change on, in order to make git happy. Once that’s done, cherry-picking would work fine as usual. Now just rename the file back to the ‘new’ name. Squash the change.
This can be illustrated in following example - assuming:
2. In the target branch (that you want to cherry-pick) renames foo.cc to bar.cc
# Create the target branch as usual
git checkout -b your-target-branch
# Rename bar.cc back to foo.cc to make git cherry-pick happy
git mv bar.cc foo.cc
git commit -m "Make git happy"
# Cherry-pick as usual
git cherry-pick -x <commit>
# Rename it back
git mv foo.cc bar.cc
git commit -m "Rename back"
# Squash the 3 commits into one
In the rebase file, you’ll see:
pick 95be80db682 Make git happy
pick 3d74c6c9e13 Cherry-pick commit blah
pick 238e3c51354 Rename back
Change to:
pick 95be80db682 Make git happy
s 3d74c6c9e13 Cherry-pick commit blah
s 238e3c51354 Rename back
Here s means squash with previous commit.
Just remember in commit message deleting the first and third unrelated commit.
And now you are all set!
# Repeatable reads in InnoDB comes with a catch
A few days ago I was looking into a deadlock issue that is caused by a behavioral difference between MySQL storage engine transaction behavior in repeatable reads. This leads me to dig deeper into repeatable read behavior in InnoDB and what I found is quite interesting:
## The basics
Before we dig deeper, let’s revisit some of the basics of database isolation levels. You can refer to my earlier post for a more detailed explanation / comparison. Database isolation level defines the behavior of data read/write operations within transactions, and those can have a signficant impact to protecting the data integrity of your application. Repeatable reads guaratees that you would always observe the same value once you read it, and it would never change unless you’ve made the change yourself, giving you the illusion that it is exclusively owned by you and there is no one else. Of course, this isn’t true in practice as there are pessimistic locking and optimistic locking that defines the behavior when write conflict occurs.
# Diagnosing interesting MySQL client connection error in localhost through the source code
The art of argument parsing and policy transparency
When working with MySQL the often most frustrating part is getting strange connection errors. I’ve wasted two hours trying to connect to a MySQL server using TCP port (unix domain sockets works fine) and I’ll talk about why it didn’t work, and as usual we’ll dive into the code to understand exactly why.
To simplify the problem, let’s say I have MySQL server at port 13010 and bound to localhost, with user name root and empty password (don’t do that in production):
[~/mysql]: mysql -p 13010 -h localhost -u root
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
This is typical error many people will run into and you can find many similar posts that discuss the problem but few ever got to the bottom of it. Let’s jump right in.
## -p and -P
Obviously when I write -p 13010 I meant to tell mysql client to connect to server using port 13010, but that’s not quite right:
[~/mysql]: mysql --help
-P, --port=# Port number to use for connection or 0 for default
So I actually told mysql the password is 13010 instead. Supporting both -p and -P is a apparently very bad idea.
Linux tools often have excessive amount of short options, like this one from man page for ls:
ls [[email protected]] [file …]
Personally I think they should go easy and only include the most common ones rather than using the entire alphabet.
However, the mystery is not yet solved. Note that we have been asked to enter the password, which explains why most people never suspected -p actually means password. Put in other words - if -p means password, why is this command is still asking for password?
The answer lies in the source code:
my_getopt.cc
for (optend= cur_arg; *optend; optend++)
{
opt_found= 0;
for (optp= longopts; optp->name; optp++)
{
if (optp->id && optp->id == (int) (uchar) *optend)
{
/* Option recognized. Find next what to do with it */
opt_found= 1;
if (optp->arg_type == REQUIRED_ARG ||
optp->arg_type == OPT_ARG)
{
if (*(optend + 1))
{
/* The rest of the option is option argument */
argument= optend + 1;
/* This is in effect a jump out of the outer loop */
optend= (char*) " ";
}
else
{
if (optp->arg_type == OPT_ARG)
{
if (optp->var_type == GET_BOOL)
*((my_bool*) optp->value)= (my_bool) 1;
if (get_one_option && get_one_option(optp->id, optp, argument))
return EXIT_UNSPECIFIED_ERROR;
continue;
}
/* Check if there are more arguments after this one */
argument= *++pos;
(*argc)--;
The *(optend + 1) is the most interesting part. If a short-form option is being recognized, the rest immediately following the short option is treated as argument:
if (*(optend + 1))
{
/* The rest of the option is option argument */
argument= optend + 1;
/* This is in effect a jump out of the outer loop */
optend= (char*) " ";
Given that we are not passing -p13010, the 13010 part is ignored.
But wait, why does -h localhost work fine?
Just keep looking:
if (optp->arg_type == OPT_ARG)
{
if (optp->var_type == GET_BOOL)
*((my_bool*) optp->value)= (my_bool) 1;
if (get_one_option && get_one_option(optp->id, optp, argument))
return EXIT_UNSPECIFIED_ERROR;
continue;
}
/* Check if there are more arguments after this one */
if (!pos[1])
{
return EXIT_ARGUMENT_REQUIRED;
}
argument= *++pos;
(*argc)--;
So if the argument is an optional arg, it’ll give up and only check for immediate following argument. Otherwise, for OPT_REQUIRED, it assumes the next one is the argument.
Let’s take a look at where they are defined:
{"password", 'p',
"Password to use when connecting to server. If password is not given it's asked from the tty.",
0, 0, 0, GET_PASSWORD, OPT_ARG, 0, 0, 0, 0, 0, 0},
{"host", 'h', "Connect to host.", ¤t_host,
¤t_host, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
As expected, password is optional and host is required.
Also, note that how it never checked for ‘=’? So the syntax -p=abc wouldn’t work as expected as well. And hilariously =abc would become the password. For arguments with a bit more error checking like port, the error message is a bit better:
[~/mysql]: mysql -P=13010
mysql: [ERROR] Unknown suffix '=' used for variable 'port' (value '=13010')
mysql: [ERROR] mysql: Error while setting value '=13010' to 'port'
Note the ‘=13010’ part?
## Default protocol
OK. Let’s try again:
[~/mysql/mysql-fork]: mysql -P 13010 -h localhost -u root
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
Still doesn’t work. We know it’s not the parsing of -P because port is OPT_REQUIRED:
{"port", 'P', "Port number to use for connection or 0 for default to, in "
"order of preference, my.cnf, \$MYSQL_TCP_PORT, "
#if MYSQL_PORT_DEFAULT == 0
"/etc/services, "
#endif
"built-in default (" STRINGIFY_ARG(MYSQL_PORT) ").",
&opt_mysql_port,
&opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
Note the error message socket '/var/lib/mysql/mysql.sock. This is for domain socket.
To confirm this is the issue, let’s search for the actual error message:
const char *client_errors[]=
{
"Unknown MySQL error",
"Can't create UNIX socket (%d)",
"Can't connect to local MySQL server through socket '%-.100s' (%d)",
The client_errors are looked up from error codes:
#define ER(X) (((X) >= CR_ERROR_FIRST && (X) <= CR_ERROR_LAST)? \
client_errors[(X)-CR_ERROR_FIRST]: client_errors[CR_UNKNOWN_ERROR])
And the 3rd error is CR_SOCKET_CREATE_ERROR:
#define CR_ERROR_FIRST 2000 /*Copy first error nr.*/
#define CR_UNKNOWN_ERROR 2000
#define CR_SOCKET_CREATE_ERROR 2001
Searching for that leads us back to client.cc:
if (!net->vio &&
(!mysql->options.protocol ||
mysql->options.protocol == MYSQL_PROTOCOL_SOCKET) &&
(unix_socket || mysql_unix_port) &&
(!host || !strcmp(host,LOCAL_HOST)))
{
my_socket sock= socket(AF_UNIX, SOCK_STREAM, 0);
DBUG_PRINT("info", ("Using socket"));
if (sock == SOCKET_ERROR)
{
set_mysql_extended_error(mysql, CR_SOCKET_CREATE_ERROR,
unknown_sqlstate,
ER(CR_SOCKET_CREATE_ERROR),
socket_errno);
DBUG_RETURN(STATE_MACHINE_FAILED);
}
So this means by default we are connecting using Unix domain socket, and only if host is not specifed or is localhost!
Programs should be transparent about its policies, and give information about what it is doing. If that can end up being too verbose, add a verbose option. I’ll write a separate post about this because I’ve been bitten too many times by similar issues and now my favorite past-time is to add print/printf.
So there are two ways to fix this:
1. Instead of local host, use 127.0.0.1. This fails the UNIX socket check and will fallback to TCP.
2. Use --protocol tcp to force using TCP.
So the right command would be:
mysql -P 13010 -h localhost -u root --protocol tcp
or
mysql -P 13010 -h 127.0.0.1 -u root
## Summary
These two problems can be easily avoided by adding more messages to the mysql client, such as:
Trying to connect to UNIX domain socket localhost...
Connecting to database 12310.
These would’ve avoided wasting collectively god knows how much time wasted. Maybe I should submit a patch when I get a chance.
The gotchas:
1. mysql short-option with optional args only accept arguments when they immediately follow the option, such as ‘-pmypassword’. Specifying as ‘-p blah’ and blah will be interpreted as current database. Short option with required args don’t have this problem.
2. When there is no protocol specified, mysql will try to connect as UNIX domain socket if connecting to localhost or host isn’t specified. To work around it, use IP address instead of localhost, or specify protocol explicitly using --protocol.
# Byebye Windows - going full linux
Going linux full time
In my new job, no one cares about windows.
Every single developer (with a few exceptions) use MacBook Pro, and connect to their linux VM to get work done. Some people have the trash can MacPro. You get the idea. Being in Microsoft for ~12 years, this is admittingly a interesting adventure. Even though in several Microsoft projects in the past that I have been working on had linux versions (CoreCLR, Service Fabric, etc), most development is still done in Windows, and then ported to Linux/Mac. Whenever occasionally you wonder into the no-man’s land in Linux where the project tooling / infrastructure is falling significantly behind, you want to pull your hair out. Not Linux’s fault - but a matter of priority. In some extreme cases you’d wonder how even one can put out a linux version out at all.
Not anymore. Now linux (or Mac, if you count that in) is the full time job.
After a few weeks of research and practice, I’ve been happyily chugging along with TMUX + VIM + MOSH with my custom key bindings. In this article I’ll talk about a bit of my experience of making the transition.
## I miss Visual Studio
Let’s get this one out of the way first. There is no replacement for Visual Studio. Period. The code completion (or Intelli-Sense) and debugging is simply unmatched by anything else in the market. VS Code is awesome in terms of just browsing code and doing some occasional debugging, but for writing code it is just OK as the “inteli-sense” (forgive my Microsoft VS Jargon) can be a hit or miss. Vim is good for text editing, and with plugins you can get some basic stuff to work, but again it’s no where near the quality of experience of Visual Studio. Usually it’s a love/hate relationship with Visual Studio - it’s kinda slow and some times buggy, but you can’t live without it. Well, you can, but you don’t want to.
Nowadays I use vim or VS Code / Atom for writing code, and gdb for debugging.
## Debugging using GDB is fine
Being an reasonably experienced WinDbg user, Gdb’s command line taking a bit getting used to, but that’s about it. GDB also supports a TUI mode that shows the integrated text window for source/register/etc and a command window. It’s not great as many simple key bindings stop working in that mode (taken over by the TUI component) but as long as I can see a source code “window” over SSH I’m happy.
# TMUX is awesome
TMUX is a terminal multiplexer. With TMUX you won’t lose your working state - even if you disconnect from SSH, just ‘tmux attach’ you’ll resume where you left off. In this sense it is equivalent to a Windows Remote Desktop session.
The most powerful part is that it also allow you to break the terminal into multiple panes and windows, and this way you don’t have to leave the terminal and can easily switch between many different tasks with quick shortcuts. No more need to manage windows - everything is within the terminal. It’s like a virtual desktop for terminals. It’s build in the way that you barely had to touch the mouse anymore. Well, until you move to the browser, that is.
# VIM ftw
In my Microsoft job I use vim for simple editing purposes, and I like the vim way of thinking so much that I put all my editors into vim mode / vim plugin / vim key bindings. These days I found myself spending even more time in vim over SSH and so I invested more time finding better VIM configurations and plugins.
I use junegunn/vim-plug as my VIM plugin manager. It’s pretty minimal and gets the job done.
This is the list of plugins I use:
• Command-T - blazing fast fuzzy file finder
• delimitMate - automaticlly inserting delimiters such as (), [], etc
• ack - text search tool
• vim-gitgutter - shows in leftmost column where are the git changes using +/-/~
• vim-fugitive - great git command wrappers
• vim-easytags - automated tag generation and syntax highlighting. I found the syntax highlighting can cause performance issue in large files so I turne the syntax highlighting off.
• vim-tmux-navigator - navigate between vim and tmux like they are integrated
• a - switch between header and source. Enough said.
• tcomment_vim - toggle comment/uncomment for lines
• vim-surround - easy change/add surround characters like (), [], {}
• nerdtree - navigate file/directory tree
• vim-nerdtree-tabs - making nerd-tree like an integrated panel
• vim-better-whitespace - highlight trailing whitespace characters. They are annoying for sure and lint warns about them
• lightline - a light and configurable status line for vim
• goyo - distraction free writing. Best for writing docs
## SSH is the old Remote Desktop
In my old job I usually “remote” into my development machines at office - and “remote” means “Windows Remote Desktop”. In a reasonable connection it is actually quite nice - there is little lag and you almost feel you are working on a local machine, with all the graphical UI - it’s really amazing.
With linux, you fallback to the good old text-based SSH. It’s kinda amazing in its own way that you can have text-based remote protocol for complicated full screen programs like vim. You don’t get graphical UI this way - but for the most part you don’t need to, and it’s usually blazing fast.
Mosh improves over SSH that it is async (doesn’t wait for server response) so it feels even more responsive. The trade-off is that it can get a bit jarring when you type something and it does’t react correctly initially.
## Shell matters
Windows Commmand Prompt is fine. It works. I still remember I learned my first DOS commands at a 33MHZ 386DX. But it hadn’t changed much since then. ConEmu is a popular terminal and some people (especally admins) use PowerShell as well. But none of those match the flexiblity of linux shells - they just have so much more to offer. You can switch between different shells, adding customizations, even plugins.
For now I’m using ZSH with oh-my-zsh. It has fantastic themes and plugins. My favorite features are:
• Plugins that shows me all kind of status, such as git status, any pending background process, how long the last command took, etc.
• Auto-suggestion. It automatically suggest the full command based on best match and it grays out the rest of the command that you didn’t type. It’s simple but almost feels like magic when you see it for the first time in action.
• Syntax highlighting. Enough said.
• VIM editing. Yes, you can now use VIM commands to edit your shell commands. Just think that you can easily navigate with all the muscle memory you had with vim. This should be mandatory in every thing that deal with text editing.
With all these, and throw in a few custom key bindings, the plain shell / windows command prompt just seems so boring.
# You need to work on your configurations
However, tweaking these tools so that they work for you takes time. I find myself spending quite a bit of time tweaking the configurations to make it work better for me - and the time spent paid off. All the different configuration options are indeed quite overwhelming if starting from scratch so I use Awesome dotfiles project as my starting point for tweaking and forked my own version yizhang82/dotfiles. There are a lot of things that I like about the way the things are setup:
• One script to deploy everything - TMUX/ZSH, the entire github repo containing dotfiles, and back them up
• Dotfiles are configured to include the settings/scripts from the repo at ~/dotfiles - this way things can be automatically synchronized through a git pull. This is actually quite brilliant.
• Automatically pulls the github repo every time ZSH starts - so it’s always up to date
Of course, many of the configurations there are already pretty good and is perfect as a starting point for my own configurations.
It contains all my TMUX, ZSH, VIM configurations, and by simplying cloning and running a script it goes into a new machine effortlessly. Most of these is done by the original author and I’m simply tweaking it to my needs.
## I like it
It did take a bit getting used to, but I’m happy to report that I now feel very much productive roughly on the same level of productivity when I’m working on Windows (if not more). I do miss having a fully integrated Visual Studio experience, but the command line experience (with TMUX, etc) in Linux is so much better that it more than makes up for that. Of course, at the end of the day, what matters is getting the job done - just use the right tool for the job. In a future post I can get into a bit more details with my experience with these tools and share some of my learnings/tips.
P.S. I still use Windows at home. I have custom built (by myself) PC that has i7 4770K, 32G RAM, nVidia 2080 RTX mostly for gaming. I think Windows has mostly lost the mindshare of developers these days, but it’s still the OS for gamers, and will be for quite some time. |
# MTH102 Questions and Solutions : Given $\frac{2x^{5}+x^{2}-5}{t^{2}}$, find $\frac{d y}{d x}$ by using the first principle
Given $\frac{2x^{5}+x^{2}-5}{t^{2}}$, find $\frac{d y}{d x}$ by using the first principle
a) c$-t^{-2}+8t^{-3}$
b) $6t+7t^{-3}$
c) $t^{2}+5t^{-3}$
d) $6t^{2}+10t^{-3}$
You can purchase MTH 102 TMA Solutions at the rate of #1000 only and all of your required Courses from us kindly send us a msg on whatsapp 08039407882 |
# Does normal linear regression in R overcome confounding?
When I run a linear regression model or logistic regression model in R like this
lm(outcome ~ treatment + covariate)
does the + covariate part help control for the effect of that covariate on both treatment and outcome or just on outcome? If it doesn't what exactly is this doing because people are telling me this controls for confounding, but I don't see how? if it doesn't control for likelihood of treatment then we need to do things like propensity score matching or IPTW, inverse probability treatment weights, at least to my understanding
• Are you trying to do ANCOVA? – Dave Oct 23 at 1:49
• no not ANCOVA. I'm trying to assess how to correctly deal with confounding because the + covariate method doesn't seem to make sense to me for controlling for confounding – 762 Oct 23 at 1:50
• Then do you mean that the covariate is correlated (related to, I guess not necessarily linearly) to the treatment? – Dave Oct 23 at 2:06
Under some strict assumptions, regression of the outcome on the treatment and covariates does indeed control confounding by those covariates. See Schafer & Kang (2008) for more details. This approach is indeed called ANCOVA. This works because the interpretation of the coefficient on treatment is the effect of treatment holding constant the other variables. Holding those variables constant means their confounding effects are no longer in effect.
The assumptions required are very strict, though. First, you must assume the covariates are sufficient to remove confounding and do not induce confounding. You need a causal theory to justify this, and it isn't empirically verifiable. Second, you need the effect of the covariates on the outcome to be eaxactly as modeled; any nonlinear relationships or interactions must be accounted for. Third, there must not be any moderation of the treatment effect by the covariates, which is extremely unlikely. You can estimate an average treatment effect in the presence of moderation by interacting the treatment with the mean-centered versions of the covariates. Fourth, there must not be measurement error in the covariates or treatment. If there is, the coefficients will be biased in unpredictable directions (but most often downward).
The benefit of other methods like IPW and propensity score matching is to avoid some of these assumptions or replace them with others. For example, propensity score methods require that you have modeled the probability of treatment correctly. With this, you're trading one modeling assumption (that you have correctly modeled the outcome) for another modeling assumption (that you have correctly modeled the treatment assignment process). You don't need to make assumptions about the moderation of the treatment effect, which is one reason to prefer propensity score-based methods. You still need to ensure you've collected and included the right variables and that they are measured without error.
Note that the causal inference field is way beyond using linear regression to control for confounding. See my post here for contemporary methods.
For a little deeper explanation on how regression works: When you regress Y on A (treatment) and X (covariates), you get a coefficient for A that can be interpreted as the unique effect of A on Y holding constant the covariates. Another way to see this is the followong:
Regress Y on X. Take the residuals, R_Y. This is the part of Y that is independent from the covariates X. Now do the same with A: regress A on X (using a linear model, even though the actual assignment model might be nonlinear, e.g., logistic). Take the residuals R_A. This is the part of A that is independent from the covariates X. So now you have two variables, R_Y and R_A, that are completely purged of their (linear) association with the covariates X. If you regress R_Y on R_A, you get a coefficient. This coefficient is exactly equal to the coefficient you would get on A if you were to regress Y on A and X. This interpretation hopefully makes it clearer why including covariates in a regression of the outcome on treatment removes the confounding effects of the covariates (again, only under certain very strict assumptions).
Schafer, J. L., & Kang, J. (2008). Average causal effects from nonrandomized studies: A practical guide and simulated example. Psychological Methods, 13(4), 279–313. https://doi.org/10.1037/a0014268 |
GMAT Question of the Day - Daily to your Mailbox; hard ones only
It is currently 21 Jul 2018, 04:55
### GMAT Club Daily Prep
#### Thank you for using the timer - this advanced tool can estimate your performance and suggest more practice questions. We have subscribed you to Daily Prep Questions via email.
Customized
for You
we will pick new questions that match your level based on your Timer History
Track
every week, we’ll send you an estimated GMAT score based on your performance
Practice
Pays
we will pick new questions that match your level based on your Timer History
# If x and y are positive integers and 5^x
Author Message
TAGS:
### Hide Tags
Manager
Joined: 12 Oct 2011
Posts: 121
GMAT 1: 700 Q48 V37
GMAT 2: 720 Q48 V40
If x and y are positive integers and 5^x [#permalink]
### Show Tags
06 Apr 2012, 09:42
8
47
00:00
Difficulty:
85% (hard)
Question Stats:
60% (02:32) correct 40% (03:04) wrong based on 439 sessions
### HideShow timer Statistics
If x and y are positive integers and $$(5^x)-(5^y)=(2^{y-1})*(5^{x-1})$$, what is the value of xy?
A. 48
B. 36
C. 24
D. 18
E. 12
Math Expert
Joined: 02 Sep 2009
Posts: 47161
If x and y are positive integers and 5^x [#permalink]
### Show Tags
06 Apr 2012, 14:01
13
12
BN1989 wrote:
If x and y are positive integers and (5^x)-(5^y)=(2^(y-1))*(5^(x-1)), what is the value of xy?
A. 48
B. 36
C. 24
D. 18
E. 12
Notice that we are told that $$x$$ and $$y$$ are positive integers.
$$5^x-5^y=2^{y-1}*5^{x-1}$$;
$$5^x-2^{y-1}*5^{x-1}=5^y$$;
$$5^x(1-\frac{2^y}{2}*\frac{1}{5})=5^y$$;
$$5^x(10-2^y)=2*5^{y+1}$$.
Now, since the right hand side is always positive then the left hand side must also be positive, hence $$10-2^y$$ must be positive, which means that $$y$$ can take only 3 values: 1, 2 and 3.
By trial and error we can find that only $$y=3$$ gives integer value for $$x$$:
$$5^x(10-2^3)=2*5^{3+1}$$;
$$2*5^x=2*5^4$$;
$$x=4$$ --> $$xy=12$$.
_________________
Intern
Joined: 19 Feb 2014
Posts: 18
Concentration: Finance
GRE 1: Q800 V780
WE: Securities Sales and Trading (Investment Banking)
Re: If x and y are positive integers and 5^x - 5^y = 2^(y-1)*5^x [#permalink]
### Show Tags
19 Feb 2014, 22:50
8
1
Faster: First constrain the possible answers. We know $$x>y$$ since if $$x=y$$ then the left-hand side is 0 or if $$x<y$$ then the LHS is negative... but the RHS is always positive. Now act: divide both sides by $$5^{x-1}$$ to get $$5-5^{y-x+1} = 2^{y-1}$$.
Since the new RHS is a power of two, the LHS must equal 1, 2, or 4. The only power of 5 that gets us one of those is $$5-5^0=5-1=4$$. That means $$y=3$$ and thus $$x=4$$.
Oh, and BTW: The thread title is different than the equality in your post. (Title should have 5^{x-1}, not 5^x.)
##### General Discussion
Manager
Joined: 11 Aug 2012
Posts: 124
Schools: HBS '16, Stanford '16
Re: If x and y are positive integers and 5^x [#permalink]
### Show Tags
24 Sep 2013, 15:38
Bunuel wrote:
BN1989 wrote:
If x and y are positive integers and (5^x)-(5^y)=(2^(y-1))*(5^(x-1)), what is the value of xy?
A. 48
B. 36
C. 24
D. 18
E. 12
Notice that we are told that $$x$$ and $$y$$ are positive integers.
$$5^x-5^y=2^{y-1}*5^{x-1}$$ --> $$5^x-2^{y-1}*5^{x-1}=5^y$$ --> $$5^x(1-\frac{2^y}{2}*\frac{1}{5})=5^y$$ --> $$5^x(10-2^y)=2*5^{y+1}$$.
Now, since the right hand side is always positive then the left hand side must also be positive, hence $$10-2^y$$ must be positive, which means that $$y$$ can take only 3 values: 1, 2 and 3.
By trial and error we can find that only $$y=3$$ gives integer value for $$x$$: $$5^x(10-2^3)=2*5^{3+1}$$ --> $$2*5^x=2*5^4$$ --> $$x=4$$ --> $$xy=12$$.
Bunuel, I have a question, how did you know that you had to reorganize the equation in this way?
From $$5^x-5^y=2^{y-1}*5^{x-1}$$ TO $$5^x-2^{y-1}*5^{x-1}=5^y$$
Thanks!
Verbal Forum Moderator
Joined: 10 Oct 2012
Posts: 619
Re: If x and y are positive integers and 5^x [#permalink]
### Show Tags
24 Sep 2013, 23:04
2
danzig wrote:
Bunuel wrote:
BN1989 wrote:
If x and y are positive integers and (5^x)-(5^y)=(2^(y-1))*(5^(x-1)), what is the value of xy?
A. 48
B. 36
C. 24
D. 18
E. 12
Notice that we are told that $$x$$ and $$y$$ are positive integers.
$$5^x-5^y=2^{y-1}*5^{x-1}$$ --> $$5^x-2^{y-1}*5^{x-1}=5^y$$ --> $$5^x(1-\frac{2^y}{2}*\frac{1}{5})=5^y$$ --> $$5^x(10-2^y)=2*5^{y+1}$$.
Now, since the right hand side is always positive then the left hand side must also be positive, hence $$10-2^y$$ must be positive, which means that $$y$$ can take only 3 values: 1, 2 and 3.
By trial and error we can find that only $$y=3$$ gives integer value for $$x$$: $$5^x(10-2^3)=2*5^{3+1}$$ --> $$2*5^x=2*5^4$$ --> $$x=4$$ --> $$xy=12$$.
Bunuel, I have a question, how did you know that you had to reorganize the equation in this way?
From $$5^x-5^y=2^{y-1}*5^{x-1}$$ TO $$5^x-2^{y-1}*5^{x-1}=5^y$$
Thanks!
Not directed at me, However you can re-arrange it another way.
We have $$5^x-5^y = 2^{y-1}*5^{x-1}$$, Dividing on both sides by $$5^{x-1}$$, we have
$$5-5^{y+1-x} = 2^{y-1} \to 5 = 5^{y+1-x} + 2^{y-1}$$. Now, as x and y are positive integers, the only value which $$2^{y-1}$$ can take is 4.Thus, y-1 = 2, y = 3. Again, the value of $$5^{y+1-x}$$ has to be 1, thus, y+1-x = 0 $$\to$$ x = y+1 = 3+1 = 4. Thus, x*y = 4*3 = 12.
Thus, I think you could re-arrange in any order, as long as you get a tangible logic.
_________________
GMAT Club Legend
Joined: 16 Oct 2010
Posts: 8132
Location: Pune, India
Re: If x and y are positive integers and 5^x - 5^y = 2^(y-1)*5^x [#permalink]
### Show Tags
19 Feb 2014, 22:25
18
4
MrWallSt wrote:
If x and y are positive integers and 5^x - 5^y = 2^(y-1)*5^(x-1), what is the value of xy?
A. 48
B. 36
C. 24
D. 18
E. 12
A little bit of observation can help you solve this question within a minute.
x and y are positive integers which means we will have clean numbers. On the right hand side, you have a 2 as a factor while it is not there on the left hand side. Can a 2 be generated on the left hand side by the subtraction? Here I am thinking that if we take 5^y common on the left hand side, I might be able to get a 2.
$$5^y (5^{x-y} - 1) = 2^{y-1}*5^{x-1}$$
Now I want only 2s and 5s on the left hand side. If x-y is 1, then $$(5^{x-y} - 1)$$ becomes 4 which is 2^2. If instead x - y is 2 or more, I will get factors such as 3, 13 too. So let me try putting x - y = 1 to get
$$5^y (2^2) = 2^{y-1}*5^{x-1}$$
This gives me y - 1 = 2
y = 3
x = 4
Check to see that the equations is satisfied with these values. Hence xy = 12
Note that it is obvious that y is less than x and that is the reason we took $$5^y$$ common. The reason it is obvious is that the right hand side is positive. So the left hand side must be positive too. This means $$5^x > 5^y$$ which means x > y.
_________________
Karishma
Private Tutor for GMAT
Contact: [email protected]
Intern
Joined: 21 Nov 2013
Posts: 12
Re: If x and y are positive integers and 5^x - 5^y = 2^(y-1)*5^x [#permalink]
### Show Tags
19 Feb 2014, 23:01
1
@Karishma, thanks again.
@SizeTrader, appreciate the solution and that reasoning was excellent. Also, the reason the title says 5^x is because I reached the character limit for the title and it got cut off
_________________
Any and all kudos are greatly appreciated. Thank you.
Senior Manager
Joined: 13 Jun 2013
Posts: 277
Re: If x and y are positive integers and 5^x [#permalink]
### Show Tags
20 Feb 2014, 04:53
BN1989 wrote:
If x and y are positive integers and $$(5^x)-(5^y)=(2^{y-1})*(5^{x-1})$$, what is the value of xy?
A. 48
B. 36
C. 24
D. 18
E. 12
by dividing both sides of the equation with 5^x we have 1- 5^(y-x) = 2^(y-1) * 5^(x-1-x)
1- 5^(y-x) = 2^(y-1) * 5^(-1)
5= 2^(y-1) + 5^(y-x+1)
now minimum value of 2^(y-1) =1, hence 2^(y-1) must be equal to 4 and 5^(y-x+1) must be equal to 1 for the R.H.S to become equal to L.H.S.
2^(y-1) = 4 for y=3
and 5^(y-x+1) =1 for x=4 (as y=3)
hence product of xy = 12
GMAT Tutor
Joined: 20 Jul 2012
Posts: 25
GMAT 1: 780 Q50 V50
Re: If x and y are positive integers and 5^x [#permalink]
### Show Tags
20 Feb 2014, 15:02
1
If x and y are positive integers and (5^x)-(5^y)=(2^{y-1})*(5^{x-1}), what is the value of xy?
A. 48
B. 36
C. 24
D. 18
E. 12
E
Protocol:Simplify expression
1. need to find X and Y but cant isolate X and Y directly so start by separating the bases:
divide both sides by (5^{x-1}
left and right side simplifies to 5-5^{y-x+1} = 2^{y-1}
2. after simplifying, analyze.
Right side must be positive integer ( y is at least 1 ) thus left side must be positive too.
==> Left side is 5 minus an expression so answer must be at max 4 and at minimum 1. Right side must also be equal to a power of 2. Thus 4 is only possible answer for left side. Thus Y = 3.
Note: From original expression it is clear that X> Y. However by the time you get to simplifying the expression, the possible number of answers is so constrained that this information isn't critical to arriving at a faster answer.
_________________
WWW.CLEARMOUNTAINPREP.COM
Intern
Joined: 02 Mar 2015
Posts: 31
If x and y are positive integers and 5^x [#permalink]
### Show Tags
19 Aug 2015, 07:30
Bunuel wrote:
BN1989 wrote:
If x and y are positive integers and (5^x)-(5^y)=(2^(y-1))*(5^(x-1)), what is the value of xy?
A. 48
B. 36
C. 24
D. 18
E. 12
Notice that we are told that $$x$$ and $$y$$ are positive integers.
$$5^x-5^y=2^{y-1}*5^{x-1}$$;
$$5^x-2^{y-1}*5^{x-1}=5^y$$;
$$5^x(1-\frac{2^y}{2}*\frac{1}{5})=5^y$$;
$$5^x(10-2^y)=2*5^{y+1}$$.
Now, since the right hand side is always positive then the left hand side must also be positive, hence $$10-2^y$$ must be positive, which means that $$y$$ can take only 3 values: 1, 2 and 3.
By trial and error we can find that only $$y=3$$ gives integer value for $$x$$:
$$5^x(10-2^3)=2*5^{3+1}$$;
$$2*5^x=2*5^4$$;
$$x=4$$ --> $$xy=12$$.
i did another logic is it right?
$$(5^x)(1-(2^y-1)/5)=5^y$$
then $$(5^x-y-1)(5-(2^y-1))=1$$
which means this must be $$x-y-1= 0$$
and $$5-(2^y-1) = 1$$ means also $$2^y-1 = 4$$ then $$y-1=2$$
then y=3 replace y in old equation we get x =4 then finally xy =12
Intern
Joined: 21 Nov 2014
Posts: 39
Location: India
Concentration: General Management, Strategy
GMAT 1: 750 Q51 V40
WE: Operations (Energy and Utilities)
Re: If x and y are positive integers and 5^x [#permalink]
### Show Tags
19 Aug 2015, 08:04
(5^x)-(5^y)=(2^(y-1))*(5^(x-1))
(5^x)(1-5^y-x) = (2^(y-1))*(5^(x-1))
5(1-5^y-x) = (2^(y-1))
10(1-5^y-x) = (2^(y))
We note that (2^(y)) is always positive. which translates to (1-5^y-x) >0 or y-x<0
So, 10(5^y-x)(5^(x-y)-1) = (2^(y))
5^(y-x+1)*2*(5^(x-y)-1) =(2^(y))
Now, RHS is 5^0, which means y-x+1 = 0, x-y =1
inputting values in above,
5^(0)*2*(5^(1)-1) =(2^(y))
2*4 = (2^(y))
implies y =3
x= 4
xy = 12
Intern
Joined: 18 Jul 2016
Posts: 9
Re: If x and y are positive integers and 5^x [#permalink]
### Show Tags
21 Sep 2016, 02:31
Hi,
The explanations are great. However, I took a lot of time figuring out how to simplify the equation and get to some solution and then started exploring otherway around which worked faster for me..
Difference between any 2 powers of 5 would always yields an even number.,i.e., a multiple of 2. However, difference of only consecutive powers of 5 yields a number that is only multiple of 2 and 5. Check->(25-5), (125-25), (625-125). Also check(625-25), (625-5), etc. Then, I simply had to check the options which had consecutive integers as factors. Only 12 worked out with 3 and 4 as factors.
This is not a foolproof solution but just another way of thinking incase you feel trapped in a question.
CEO
Joined: 12 Sep 2015
Posts: 2633
Re: If x and y are positive integers and 5^x [#permalink]
### Show Tags
01 Aug 2017, 09:57
Top Contributor
BN1989 wrote:
If x and y are positive integers and $$(5^x)-(5^y)=(2^{y-1})*(5^{x-1})$$, what is the value of xy?
A. 48
B. 36
C. 24
D. 18
E. 12
Given: $$(5^x)-(5^y)=(2^{y-1})*(5^{x-1})$$
Divide both sides by $$5^{x-1}$$ to get: $$5^1 - 5^{y-x+1} = 2^{y-1}$$
Simplify: $$5 - 5^{y-x+1} = 2^{y-1}$$
OBSERVE: Notice that the right side, $$2^{y-1}$$, is POSITIVE for all values of y
Since y is a positive integer, $$2^{y-1}$$ can equal 1, 2, 4, 8, 16 etc (powers of 2)
So, the left side, $$5 - 5^{y-x+1}$$, must be equal 1, 2, 4, 8, 16 etc (powers of 2).
Since $$5^{y-x+1}$$ is always positive, we can see that $$5 - 5^{y-x+1}$$ cannot be greater than 5
So, the only possible values of $$5 - 5^{y-x+1}$$ are 1, 2 or 4
In other words, it must be the case that:
case a) $$5 - 5^{y-x+1} = 2^{y-1} = 1$$
case b) $$5 - 5^{y-x+1} = 2^{y-1} = 2$$
case c) $$5 - 5^{y-x+1} = 2^{y-1} = 4$$
Let's test all 3 options.
case a) $$5 - 5^{y-x+1} = 2^{y-1} = 1$$
This means y = 1 (so that the right side evaluates to 1)
The left side, $$5 - 5^{y-x+1} = 1$$, when $$5^{y-x+1} = 4$$. Since x and y are positive integers, it's IMPOSSIBLE for $$5^{y-x+1}$$ to equal 4
So, we can eliminate case a
case b) $$5 - 5^{y-x+1} = 2^{y-1} = 2$$
This means y = 2 (so that the right side evaluates to 2)
The left side, $$5 - 5^{y-x+1} = 2$$, when $$5^{y-x+1} = 3$$. Since x and y are positive integers, it's IMPOSSIBLE for $$5^{y-x+1}$$ to equal 3
So, we can eliminate case b
case c) $$5 - 5^{y-x+1} = 2^{y-1} = 4$$
This means y = 3 (so that the right side evaluates to 4)
The left side, $$5 - 5^{y-x+1} = 4$$, when $$5^{y-x+1} = 1$$.
If $$5^{y-x+1} = 1$$, then $$y-x+1 = 0$$
In this case, y = 3
So, we can write: 3 - x + 1 = 0, which mean x = 4
So, the only possible solution is y = 3 and x = 4, which means xy = (4)(3) = 12
Cheers,
Brent
_________________
Brent Hanneson – Founder of gmatprepnow.com
Director
Joined: 13 Mar 2017
Posts: 610
Location: India
Concentration: General Management, Entrepreneurship
GPA: 3.8
WE: Engineering (Energy and Utilities)
Re: If x and y are positive integers and 5^x [#permalink]
### Show Tags
07 Aug 2017, 22:37
1
BN1989 wrote:
If x and y are positive integers and $$(5^x)-(5^y)=(2^{y-1})*(5^{x-1})$$, what is the value of xy?
A. 48
B. 36
C. 24
D. 18
E. 12
$$(5^x)-(5^y)=(2^{y-1})*(5^{x-1})$$
=$$(5^{x-1})(5-5^{y-x+1})=(2^{y-1})*(5^{x-1})$$
5^{x-1} =/=0. So, $$(5-5^{y-x+1})=(2^{y-1})$$
Since $$(2^{y-1})$$ must be +ve. Also Y is +ve so, y-1>0 and hence $$(2^{y-1})$$ will be an integer only.
Hence y-x+1 can be 0 only.
y-x+1 = 0
-> y-x = -1
also at y-x+1 = 0
$$5-1 = (2^{y-1})$$
$$4 = (2^{y-1})$$
y -1 = 2
y = 3
x= y+1 = 4
xy = 12
_________________
CAT 99th percentiler : VA 97.27 | DI-LR 96.84 | QA 98.04 | OA 98.95
UPSC Aspirants : Get my app UPSC Important News Reader from Play store.
MBA Social Network : WebMaggu
Appreciate by Clicking +1 Kudos ( Lets be more generous friends.)
What I believe is : "Nothing is Impossible, Even Impossible says I'm Possible" : "Stay Hungry, Stay Foolish".
EMPOWERgmat Instructor
Status: GMAT Assassin/Co-Founder
Affiliations: EMPOWERgmat
Joined: 19 Dec 2014
Posts: 12004
Location: United States (CA)
GMAT 1: 800 Q51 V49
GRE 1: Q170 V170
Re: If x and y are positive integers and 5^x [#permalink]
### Show Tags
30 Jan 2018, 14:30
Hi All,
GMAT Quant questions can almost always be solved in a variety of ways, so if you find yourself not able to solve by doing complex-looking math, then you should look for other ways to get to the answer. Think about what's in the question; think about how the rules of math "work." This question is LOADED with Number Property clues - when combined with a bit of "brute force", you can answer this question by doing a lot of little steps.
Here are the Number Properties (and the deductions you can make as you work through them):
1) We're told that X and Y are POSITIVE INTEGERS, which is a great "restriction."
2) We can calculate powers of 5 and powers of 2 rather easily:
5^0 = 1
5^1 = 5
5^2 = 25
5^3 = 125
5^4 = 625
Etc.
2^0 = 1
2^1 = 2
2^2 = 4
Etc.
3) The answer choices are ALL multiples of 3. Since we're asked for the value of XY, either X or Y (or both) MUST be a multiple of 3.
4)
*The left side of the equation is a positive number MINUS a positive number.
*The right side is the PRODUCT of two positive numbers, which is POSITIVE.
*This means that 5^X > 5^Y, so X > Y.
5)
*Notice how we have 5^X (on the left side) and 5^(X-1) on the right side; these are consecutive powers of 5, so the first is 5 TIMES bigger than the second.
*On the left, we're subtracting a number from 5^X.
*On the right, we're multiplying 2^(Y-1) times 5^(X-1).
*2^(Y-1) has to equal 1, 2 or 4, since if it were any bigger, then multiplying by that value would make the right side of the equation TOO BIG (you'd have a product that was bigger than 5^X).
*By extension, Y MUST equal 1, 2 or 3. It CANNOT be anything else.
6) Remember that at least one of the variables had to be a multiple of 3. What if Y = 3? Let's see what happens….
5^X - 5^3 = 2^2(5^(X-1))
5^X - 125 = 4(5^(X-1))
Remember that X > Y, so what if X = 4?…..
5^4 - 125 = 500
4(5^3) = 500
The values MATCH. This means Y = 3 and X = 4. XY = 12
GMAT assassins aren't born, they're made,
Rich
_________________
760+: Learn What GMAT Assassins Do to Score at the Highest Levels
Contact Rich at: [email protected]
# Rich Cohen
Co-Founder & GMAT Assassin
Special Offer: Save \$75 + GMAT Club Tests Free
Official GMAT Exam Packs + 70 Pt. Improvement Guarantee
www.empowergmat.com/
***********************Select EMPOWERgmat Courses now include ALL 6 Official GMAC CATs!***********************
Senior Manager
Joined: 31 Jul 2017
Posts: 378
Location: Malaysia
WE: Consulting (Energy and Utilities)
Re: If x and y are positive integers and 5^x [#permalink]
### Show Tags
31 Jan 2018, 02:10
BN1989 wrote:
If x and y are positive integers and $$(5^x)-(5^y)=(2^{y-1})*(5^{x-1})$$, what is the value of xy?
A. 48
B. 36
C. 24
D. 18
E. 12
Good Question.. I solved it this way..
Let $$x-1 = a$$, $$y-1 = b$$.. So the equation becomes,
$$5^a - 5^b$$ = $$\frac{5^a*2^b}{5}..$$
Now, we have to find the value of $$xy$$ i.e. $$(a+1)(b+1)$$
By looking at the options and the above equation only E satisfies.
_________________
If my Post helps you in Gaining Knowledge, Help me with KUDOS.. !!
Target Test Prep Representative
Status: Founder & CEO
Affiliations: Target Test Prep
Joined: 14 Oct 2015
Posts: 2973
Location: United States (CA)
Re: If x and y are positive integers and 5^x [#permalink]
### Show Tags
02 Feb 2018, 12:09
BN1989 wrote:
If x and y are positive integers and $$(5^x)-(5^y)=(2^{y-1})*(5^{x-1})$$, what is the value of xy?
A. 48
B. 36
C. 24
D. 18
E. 12
We can simplify the given equation by dividing both sides by 5^(x - 1):
5^x/5^(x - 1) - 5^y/5^(x - 1) = 2^(y-1)
5 - 5^(y - x + 1) = 2^(y - 1)
It’s not easy to solve an equation with two variables by algebraic means; however, since both variables are positive integers, we can try numbers for one of the variables and solve for the other.
If we let y = 1, then the right hand side (RHS) = 2^0 = 1 and thus the left hand side (LHS) is 5^(1 - x + 1) = 4. However, a power of 5 can’t be equal to 4 when the exponent is an integer.
Now, let’s let y = 2; then the RHS = 2^1 = 2 and thus, for the LHS, 5^(2 - x + 1) = 3. However, a power of 5 can’t be equal to 3 when the exponent is an integer.
Finally, let’s let y = 3; then the RHS = 2^2 = 4 and thus, for the LHS, 5^(3 - x + 1) = 1. We see that a power of 5 can be equal to 1 when the exponent is 0. Thus:
3 - x + 1 = 0
x = 4
We see that x = 4 and y = 3 and thus xy = 12.
_________________
Scott Woodbury-Stewart
Founder and CEO
GMAT Quant Self-Study Course
500+ lessons 3000+ practice problems 800+ HD solutions
Intern
Joined: 31 Aug 2016
Posts: 45
If x and y are positive integers and 5^x [#permalink]
### Show Tags
02 Jul 2018, 13:15
-- The simplest solution so far --
1/ Move the 5^(x-1) to the left side
2/ Move (1/2) from the right side 2^(y-1) = (2^y)*(1/2) to the left side
3/ Now you have 10 - 2*5^(y-x+1) = 2^y
4/ Ask when this is possible? -- The right side is always >0 so the left side must be >0 and this is true only if (y-x+1)=0
5/ Now you are looking for a combination of numbers from the choices that is y+1=x
6/ 3*4=12 looks good!
Manager
Joined: 04 Aug 2010
Posts: 194
Schools: Dartmouth College
If x and y are positive integers and 5^x [#permalink]
### Show Tags
02 Jul 2018, 16:03
1
BN1989 wrote:
If x and y are positive integers and $$(5^x)-(5^y)=(2^{y-1})*(5^{x-1})$$, what is the value of xy?
A. 48
B. 36
C. 24
D. 18
E. 12
$$5^x-5^y=2^{y-1}*5^{x-1}$$
$$\frac{5^x}{5^{x-1}}-\frac{5^y}{5^{x-1}}=2^{y-1}$$
$$5-5^{y-x+1}=2^{y-1}$$
The blue equation implies the following:
5 - POWER OF 5 = POWER OF 2.
The only logical option is as follows:
$$5 - 5^0 = 2^2$$.
Since the right side of the blue equation is equal to $$2^2$$, we get:
$$2^{y-1}=2^2$$
$$y-1=2$$
$$y=3$$.
Since y=3 and the subtracted term on the left side is equal to $$5^0$$, we get:
$$5^{3-x+1}=5^0$$
$$3-x+1=0$$
$$4=x$$.
.
Thus:
$$xy = 4*3 = 12$$.
_________________
GMAT and GRE Tutor
Over 1800 followers
[email protected]
New York, NY
If you find one of my posts helpful, please take a moment to click on the "Kudos" icon.
Available for tutoring in NYC and long-distance.
If x and y are positive integers and 5^x &nbs [#permalink] 02 Jul 2018, 16:03
Display posts from previous: Sort by
# Events & Promotions
Powered by phpBB © phpBB Group | Emoji artwork provided by EmojiOne Kindly note that the GMAT® test is a registered trademark of the Graduate Management Admission Council®, and this site has neither been reviewed nor endorsed by GMAC®. |
# Issue with Spark SVD
I have the following dataset with the dimensions:
Rows: 41174
Columns: 439316
The matrix is very sparse and on this, I want to perform Dimensionality Reduction. I am using Spark's computeSVD function to perform the dimensionality reduction.
However, I get an error saying that
Exception in thread "main" java.lang.IllegalArgumentException: requirement failed: k = 41174 and/or n = 439314 are too large to compute an eigendecomposition
But I ran the same computeSVD on the following dataset and it ran perfectly fine.
Rows: 3502
Columns: 103301
In both the cases, I am passing the value of "k" to be the Minimum of Rows, Columns. I am not able to understand what I am doing wrong here. As per the error, the issue is with K. How to resolve the above error. Also, any ideas on how to determine the K?
• Dimensionality reduction is a computationally heavy job and it is saying that the matrix size is huge and it might be warning that your memory won't be sufficient to perform this job. Mar 15, 2017 at 5:59
• True. The dataset size is around 17G and the also we are using spark. My assumption is that the distributed nature of spark will handle the issue related to memory. If it helps, I have a RAM of 56Gb. Mar 15, 2017 at 6:03
In the source code, it shows both of $n\min(2k,n)$ and $\min(2k,n)*(\min(2k,n)+8)$ should be less than Integer.MAX_VALUE, which is $2^{31}-1=2147483647$. In your case, $n\min(2k,n)=36176793968>2147483647$, and $\min(2k,n)*(\min(2k,n)+8)=6781851888>2147483647$. |
# Limit of $f(x)=x-\lfloor x \rfloor$ $\epsilon-\delta$
For $x\in \mathbb{R}$, let $\lfloor x \rfloor$ denote the largest integer that is less than or equal to $x$. For example, $\lfloor 3 \rfloor=3$ and $\lfloor \pi \rfloor=3$. Define $f:\mathbb{R}\to \mathbb{R}$ by $f(x)=x-\lfloor x \rfloor$. Determine those points at which $f$ has a limit and justify your conclusion.
We assert that $f(x)$ has a limit everywhere but at the integers. If we examine a generic interval $Z=(z,z+1)\subseteq \mathbb{R}$ and look at either endpoint, say $z$ without loss of generality then we can easily see there is no limit there. Take the sequences $z+\frac{1}{n}$ and $z-\frac{1}{n}$. We now consider $z+\frac{1}{n}-\left\lfloor z+\frac{1}{n}\right\rfloor$ which will converge to $0$ where as $z-\frac{1}{n}-\left\lfloor z-\frac{1}{n}\right\rfloor$ will converge to $-1$ Within the interval approaching from either direction will give us a limit value of $0$. If we take $x\in (z,z+1)$, then we observe that $x-\lfloor x \rfloor=0$ for all values of $x$. $\leftarrow$ This is where I am stuck.
For every integer $p$ the map $f$ has no limit at $p$; for, let $p$ be an integer. Then $f(x) \to p - p =0$ as $x \to p+$, but $f(x) \to p - (p-1) = 1$ as $x \to p-$.
We claim that the limit of $f$ at $p$ is $f(p)$ for every non-integer $p$; let $p$ be not an integer. If $x \in \mathbb{R}$, then $|f(x)-f(p)| \leq |x-p| + | \lfloor x \rfloor - \lfloor p \rfloor |;$ taking any $\varepsilon > 0$, if $$|x - p| < \varepsilon' := \min \{ \frac{|p - \lfloor p \rfloor |}{2}, \frac{ | \lceil p \rceil - p|}{2} \},$$ then $|x- p| + | \lfloor x \rfloor - \lfloor p \rfloor | = |x-p|,$ which is $< \varepsilon$ if in addition we have $|x-p| < \varepsilon$; so if $|x-p| < \min \{ \varepsilon', \varepsilon \}$, then $|f(x) - f(p)| < \varepsilon$.
• In the first place we estimate "away" the term $| \lfloor x \rfloor - \lfloor p \rfloor |$. – Benicio Oct 12 '15 at 0:33
Let y is the nearest endpoint to x. That is, If $x \gt \lfloor x \rfloor + \frac12$, let $y = \lfloor x \rfloor + 1$. If $x \le \lfloor x \rfloor + \frac12$, let $y = \lfloor x \rfloor$. Let $\delta = |x - y|$. Then $|x - x_0| \lt \delta \implies | \lfloor x_0 \rfloor - \lfloor x \rfloor | = 0$ $\lt$ any $\epsilon$. |
# Book Review: All About Java 8 Lambdas
| Posted by Alex Blewitt 3 Followers on Mar 08, 2016. Estimated reading time: 3 minutes |
A note to our readers: As per your request we have developed a set of features that allow you to reduce the noise, while not losing sight of anything that is important. Get email and web notifications by choosing the topics you are interested in.
All About Java 8 Lambdas as a title doesn’t do the book justice. In fact, it contains a plethora of information about new features that have been added to Java 8, which includes lambdas, but also much, much more. The book is described as a “Weekend Read”, and at a little over 150 pages is certainly svelte enough to do so.
The book’s contents are split up into 14 chapters, with the first third covering lambdas. The middle third looks at predicates and the functional interface type and functional composition. The remaining third is dedicated to streams and stream processing, including parallel and sequential processes, using the lambdas and functions seen so far. Together, the chapters dovetail nicely together and also demonstrate some of Java 8’s other features, such as static and default methods on interfaces as well as method and constructor references.
The chapters themselves are well thought out and logical, interspersed as they are with examples and code snippets that back up the book’s GitHub repository. In fact, almost all pages have at least some code samples on them, and the surrounding text explains what that particular snippet does.
The reader is exposed to some types of new syntax right from the start; the introductory chapter explains the purpose of lambdas and demonstrates both in-line lambdas and method references. It then spends the next few chapters dissecting the examples with a more precise treatment of the syntax and the special cases that may apply.
The book’s coverage of functional programming starts off with an introduction to the purpose of functions and the FunctionalInterface annotation. It then introduces more specific types such as Predicate, Consumer, Supplier and BiFunction, along with examples of each. Although the author could have stopped here, he kept going and showed how to chain functional results together and use them to build up chains of processing.
The book them moves to its final section covering streams, including how to map and flatMap functions and processes onto streamed collections, including how efficient streams of primitive types are compared with their object-oriented friends.
Coverage of streams then moves into optional types, and how they can be chained/mapped, as well as the grouping operations that allow streams of data to be cut up and pivoted based on a particular desired data structure.
Finally, there is some discussion of the differences between processing streams sequentially and in parallel, and provides some advice as to what types of processing this is amenable to or otherwise.
Although this book claims to just talk about lambdas, it covers much that is new to Java 8. What it doesn’t talk about are some of the new APIs such as the java.time package; but that’s not promised nor delivered in the book. However, the book does cover all of the syntax changes to the Java language, along with the new APIs in the java.util.function packages.
The only thing that is missing in the book is an index. If you have an electronic copy this may not be as relevant, since you can search through to find the reference that you’re looking for; but if you’re buying the paper copy then the chapter index at the beginning is the only cross-referencing you will find. Fortunately the chapters are sufficiently short and the internal headings make finding things relatively easy when you need to find something, provided that you can locate the right starting point of the chapter.
If you only have a weekend to pick up what’s new in the Java 8 language, this weekend read is a great start.
Madhusudhan Konda - I am a Java Developer working in London, primarily with investment banks and financial organisations. I have been working on Java platform for over 15 years. Started as a C / C++ Programmer, I have quickly learned Java while studying my Masters at IIT Kharagpur, India. I instantly fell in love with the language and never looked back.
Style
## Hello stranger!
You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.
## Get the most out of the InfoQ experience.
### Tell us what you think
Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p
Email me replies to any of my messages in this thread
Close
#### by
on
Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p
Email me replies to any of my messages in this thread
Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p
Email me replies to any of my messages in this thread
Discuss
Login to InfoQ to interact with what matters most to you. |
# =0 0l Nuil hypothesis Ho The Chest Paid UU iodepedent Of treatm?nt Alternative hypotheris Ho the chut_pain WQI pf dependiat_of_treotment
###### Question:
=0 0l Nuil hypothesis Ho The Chest Paid UU iodepedent Of treatm?nt Alternative hypotheris Ho the chut_pain WQI pf dependiat_of_treotment _ Telt atatistic Zlco_E) eapected_frequea2 Obsexved_frequncies Ez rou) toto column foto Grand_total (o_8J2 EJTE 92.32 348.9424 8.719 1 92.62996 848.9469 3.76 S0 402 420.6 7996 348.9409 8299 4o1 422.3 2 348.9424 8263 2004 (2-1) (2-1) 2 [ paa lul 1S 014_Pvalul 4 00oS Roalle 15 Iisk 0f_reecling_DUll_hypotheJLs Pzvatlug 2o.0T LQ reea Dul hypothulrs Cocluim Tbe_chut pain Qas_dependent 0f tratmenl
#### Similar Solved Questions
##### Find the derivative of the function using the definition of derivative. State the domain of the function and the domain of its derivative. $g(t)=\frac{1}{\sqrt{t}}$
Find the derivative of the function using the definition of derivative. State the domain of the function and the domain of its derivative. $g(t)=\frac{1}{\sqrt{t}}$...
##### Ilz+h) -Ike) 2. (5 pts) Using the limit definition of derivative, f (x) = lin 6-40calculalef(z) = 3".3. (5 pts) Find an equalion for the tangent line to the curve at the given point: f(r) = 21' +r+1 (-1,2)4. (5 pta) For f(r) zlFind the linearization of f(r) at I =Use your lincarizalion to estimatc (1.(3)"
Ilz+h) -Ike) 2. (5 pts) Using the limit definition of derivative, f (x) = lin 6-40 calculale f(z) = 3". 3. (5 pts) Find an equalion for the tangent line to the curve at the given point: f(r) = 21' +r+1 (-1,2) 4. (5 pta) For f(r) zl Find the linearization of f(r) at I = Use your lincarizali...
##### At a certain temperature, 0.820 mol of SOz is placed in a 2.50-L container: 2so,lg) 2so,lg)+ olg) At equilibrium, 0.120 mol of 0z is present. Calculate Kc:Number
At a certain temperature, 0.820 mol of SOz is placed in a 2.50-L container: 2so,lg) 2so,lg)+ olg) At equilibrium, 0.120 mol of 0z is present. Calculate Kc: Number...
##### Given f : R → R4, f(x, y, z) = (x2 + y2, 2, x +...
Given f : R → R4, f(x, y, z) = (x2 + y2, 2, x + 2, y2 + x3) (Hint: f is not linear) (a) (1 point) Find the kernel of f. (b) (1 point) Find the range of f. (c) (1 point) Is f is 1-1? Is f onto? Justify your answers....
##### 0 What 25 ithe Question 1518 76.019 14.55% 19.23% '10.42% Stbrinaationf would extraction 23 the on caffeine (2 M points) V 12 caffeine of ',O4zeine - from crude and oeteea dohned_ leave, 'leaves. 2 recover? IH rcheble of pure to 'pecformedta caffeine 1.2545
0 What 25 ithe Question 1518 76.019 14.55% 19.23% '10.42% Stbrinaationf would extraction 23 the on caffeine (2 M points) V 12 caffeine of ',O4zeine - from crude and oeteea dohned_ leave, 'leaves. 2 recover? IH rcheble of pure to 'pecformedta caffeine 1.2545...
##### An engine pumps water continuously through a hose. If the speed with which the water passes through the hose nozzle is $v$ and if $k$ is the mass per unit length of the water jet as it leaves the nozzle, what is the power being imparted to the water?a) $rac{1}{2} k v^{3}$b) $rac{1}{2} k v^{2}$c) $rac{1}{2} k v$d) $rac{1}{2} v^{2} / k$e) $rac{1}{2} v^{3} / k$
An engine pumps water continuously through a hose. If the speed with which the water passes through the hose nozzle is $v$ and if $k$ is the mass per unit length of the water jet as it leaves the nozzle, what is the power being imparted to the water? a) $\frac{1}{2} k v^{3}$ b) $\frac{1}{2} k v^{2}$...
##### Homework: 1.36 . Let f : X = Y be any function. Let A,B G X. Show that f(AnB) € f(A)n f(B) and f(AU B) = f(A)U f(B): Why didn t I ask you to prove that f(AnB) = f(A)nf(B)?
Homework: 1.36 . Let f : X = Y be any function. Let A,B G X. Show that f(AnB) € f(A)n f(B) and f(AU B) = f(A)U f(B): Why didn t I ask you to prove that f(AnB) = f(A)nf(B)?...
##### Please use engneering equation solver for this question 1 Simple Rankine cycle You are asked to...
Please use engneering equation solver for this question 1 Simple Rankine cycle You are asked to model simple Rankine cycle as represented on the right. The main cycle parameters are as follows: • Maximum pressure at the steam generator outlet: 150 bar • Condenser pressure: 0.05 bar •...
##### Does Direct Cache Access (DCA) ever access Level 1 (L1) cache? Why?
Does Direct Cache Access (DCA) ever access Level 1 (L1) cache? Why?...
##### Calculate the net force acting on the body in each of the three scenarios below 'and report the answer as a total magnitude and direction: That is, each ofyour answers will take the general form: F =F(+f)+Fe(+8) where F; is the magnitude ofthe force; measured in newtons and Fais the angle, measured in degrees. You should enter only positive numbers in the fields for the answers, no units. The problems are set up to accept the correct numerical scalar answers within a reasonable range so lon
Calculate the net force acting on the body in each of the three scenarios below 'and report the answer as a total magnitude and direction: That is, each ofyour answers will take the general form: F =F(+f)+Fe(+8) where F; is the magnitude ofthe force; measured in newtons and Fais the angle, meas...
##### Question 33 Consider the following code segment. String letters - ("A", "B", "C", "D"), ("E", "P",...
Question 33 Consider the following code segment. String letters - ("A", "B", "C", "D"), ("E", "P", "G", "1"), ("I", "J", "K", "L"}}; for (int col = 1; col < letters[0].length; col++) for (int row - 1; ...
##### Claatty thow how Yau wuuld tynthetltu tha follouna compoundafrom bantana (Winte complate oquatlon and thotzahl ranaenti, Produrtaand runctantt Ior aach Etop synthattal0Jn bromobantok ucu(b) banry alcohol
claatty thow how Yau wuuld tynthetltu tha follouna compoundafrom bantana (Winte complate oquatlon and thotzahl ranaenti, Produrtaand runctantt Ior aach Etop synthattal 0Jn bromobantok ucu (b) banry alcohol...
##### The following molccules are dissolved t ether and extracted with 3M NaCH; Which ol the following correcey deecribedthe composition of lhe two layers?NHzAqurous: Organic: 263Aqueaus: 182 Organic: 3Aqucous: Organic; 182Aqucous: Organlc: 183
The following molccules are dissolved t ether and extracted with 3M NaCH; Which ol the following correcey deecribedthe composition of lhe two layers? NHz Aqurous: Organic: 263 Aqueaus: 182 Organic: 3 Aqucous: Organic; 182 Aqucous: Organlc: 183...
##### Please with steps 2.) Brent and Sharon are getting close to retirement and want to make...
please with steps 2.) Brent and Sharon are getting close to retirement and want to make sure they are on track for a comfortable lifestyle. They currently make $120,000 per year in gross income. They pay FICA taxes of$9.180; have commuting expenses of S2,000 per year, Uniform expenses (inc, dry cle...
##### What is the sum of the infinite geometric series 3-1+1/3...?
What is the sum of the infinite geometric series 3-1+1/3...?...
##### What does anhydride mean? What would happen to the acetic anhydride if water was present in...
What does anhydride mean? What would happen to the acetic anhydride if water was present in the reaction mixture? How would this affect the yield of the aspirin reaction? 1....
##### Y courses PHU 103 [ F1 (Spring 21) 14 February 20 February Prelab FrictionTime left 0:17.51Which of the following statements regarding the motion between any two given surfaces is true?Select one: The smaller the value of the coefficient of static friction between the two surfaces; the easier [ tis slide one surface against the other: The higher the value of the coefficient of static friction between the two surfaces; the easier it is to slide one surface against the other: The smaller the value
Y courses PHU 103 [ F1 (Spring 21) 14 February 20 February Prelab Friction Time left 0:17.51 Which of the following statements regarding the motion between any two given surfaces is true? Select one: The smaller the value of the coefficient of static friction between the two surfaces; the easier [ t...
##### 42. The diagram shown below graphically describes the cellular events following the interact one particular type...
42. The diagram shown below graphically describes the cellular events following the interact one particular type of signaling molecule with a target cell. What type of signaling molecu (the pentagon shape in the diagram)? External signal Target cell receptor nucleus Steroid hormone O Cytokine O Prot...
##### Given the following limitlimz_0+ tan(z)sin(r) = eL which answer represents the limit L:0 L = lim_-0+ sin(x) . In(tan(x)) 0 L = lim_-~0+ In(sin(c) tan(c) 0 L = lim_-+0+ tan(z) . In(sin(w)) 0 L = limz-_0+ In(sin(c) . tan(w)) The limit L cannot be determined from the given information:
Given the following limit limz_0+ tan(z)sin(r) = eL which answer represents the limit L: 0 L = lim_-0+ sin(x) . In(tan(x)) 0 L = lim_-~0+ In(sin(c) tan(c) 0 L = lim_-+0+ tan(z) . In(sin(w)) 0 L = limz-_0+ In(sin(c) . tan(w)) The limit L cannot be determined from the given information:...
##### Question 31 ptsWhich of the following is true about the model used here?Thc paramcters can be estimatcd by OLS.Thc responsc has to be continuous random variablc_Thc cffects of_ continuous predictor variablc can bc modcled bY _ singlc or multiplc indicator variables.Thc nonlincar cffcct of continuous predictor variable can be modeled by splines_
Question 3 1 pts Which of the following is true about the model used here? Thc paramcters can be estimatcd by OLS. Thc responsc has to be continuous random variablc_ Thc cffects of_ continuous predictor variablc can bc modcled bY _ singlc or multiplc indicator variables. Thc nonlincar cffcct of cont...
##### Anull hypothesis, altemative hypothosis, and sample from the population under consideration are provided below: Use the Wilcoxon signed-rank test perform the equired hypothesis test at the 1% significance level:Ho: p=7,Ha' 4>7Data TableClick here I0 view Iable of values of W.Wo.10 Wo.os W.025 Wo.01 Wo.oos The test statistic is W = (Round one decimal place as needed }; G 58 57 52 13 ; ; 0 1 100 16 8 123 % 138 158Enter your answer Ihe answer box and inen click Check Answer;2 parts remainin
Anull hypothesis, altemative hypothosis, and sample from the population under consideration are provided below: Use the Wilcoxon signed-rank test perform the equired hypothesis test at the 1% significance level: Ho: p=7,Ha' 4>7 Data Table Click here I0 view Iable of values of W. Wo.10 Wo.os ...
##### Using Rate of Return Analysis, determine the most economical alternative below. Assume a minimum ...
Using Rate of Return Analysis, determine the most economical alternative below. Assume a minimum attractive rate of retum of 696, and a 6-year life with no salvage value for each. The alternatives are mutually exclusive. Initial cost Annual Cost Annual Benefit IRR.% $3000,000 10000 120,300 18$100,0...
##### Which structure is less likely to suffer severe damage uring an earthquake: a high-rise, steel-frame hotel built on sediments, or a wood-frame house built on bedrock
Which structure is less likely to suffer severe damage uring an earthquake: a high-rise, steel-frame hotel built on sediments, or a wood-frame house built on bedrock? Explain....
##### Let g [0, 1] = R be defined by:if % € Q 1 -x otherwiseg(w)Determine which of the following limits exist. For those that exist, find their values a) limz-0 g(2); (b) limz-1/2 f(x).
Let g [0, 1] = R be defined by: if % € Q 1 -x otherwise g(w) Determine which of the following limits exist. For those that exist, find their values a) limz-0 g(2); (b) limz-1/2 f(x)....
##### Chemistry of Materials Question: 2. What is the maximum radius of an atom that could fit...
Chemistry of Materials Question: 2. What is the maximum radius of an atom that could fit in an octahedral hole in rhodium, assuming no change in unit cell dimensions?...
##### IchKmucnColjwing The broker Au= rejed the hypothests mat the mea n Elce 32} 75} sten Ii HunMlun casi Throteralk tejeci Ue hypollcests Ucat Une rqeam pica 524} 753 when Iho rue mlarJ Prke & tra Uan $243,75] Eotor rejocta te hypolhos/e Ihal tn0 rnean pika @ 5748 75J whien$ atho Tua (a.4I €0sl DoluTr"d hapothosla Inat tha 4J 753, mpandicu ae H 9u75}Click select vour Jn>226/8
IchKmucn Coljwing The broker Au= rejed the hypothests mat the mea n Elce 32} 75} sten Ii HunMlun casi Throteralk tejeci Ue hypollcests Ucat Une rqeam pica 524} 753 when Iho rue mlarJ Prke & tra Uan $243,75] Eotor rejocta te hypolhos/e Ihal tn0 rnean pika @ 5748 75J whien$ atho Tua (a.4I â‚...
##### In the following exercises, use the graph of the function $y=f(x)$ shown here to find the values, if possible. Estimate when necessary. $\lim _{x \rightarrow 0^{+}} f(x)$
In the following exercises, use the graph of the function $y=f(x)$ shown here to find the values, if possible. Estimate when necessary. $\lim _{x \rightarrow 0^{+}} f(x)$... |
# Avon Fantasy Reader/Issue 10/The Gostak and the Doshes
(Redirected from The Gostak and the Doshes)
The Gostak and the Doshes (1930) by Miles John Breuer
First published Amazing Stories, March 1930. Republished in Avon Fantasy Reader #10.
by Miles J. Breuer, M. D.
Of late the pages of science-fiction periodicals have been filled with a lot of words about words. We refer to the stories based upon the neo-science of semantics, the talk about "non-Aristotelianism," and the multiple social, political, moral, and psychological concepts that the more fanatical followers of these word-schemes derive from them. At risk of calling down the wrath of devotees, your editor must confess that most of these stories do not seem to make too much sense. And it is just possible that some of the readers of "The Gostak and the Doshes" may also express, for a while, similar bewilderment. Dr. Breuer's story, we think, was the very first story about semantics to appear in a fantasy magazine. It was written many years before its time, back in 1930, and we still feel that it is the best of the lot. We also suspect that it points a moral that could well be heeded in these hectic days of slogans, advertising, and mass hysterias.
Let the reader suppose that somebody states: "The gostak disims the doshes." You do not know what this means, nor do I. But if we assume that it is English, we know that the doshes are distimmed by the gostak. We know that one distimmer of the doshes is a gostak. If, moreover, doshes are galloons, we know that some galloons are distimmed by the gostak. And so we may go on, and so we often do go on.—Unknown writer quoted by Ogden and Richards, in THE MEANING OF MEANING, Harcourt Brace & Co., 1923; also by Walter N. Polakov in MAN AND HIS AFFAIRS, Williams & Wilkins, 1925.
Why! That is lifting yourself by your own bootstraps!" I exclaimed in amazed incredulity. "It's absurd."
Woleshensky smiled indulgently. He towered in his chair as though in the infinite kindness of his vast mind there were room to understand and overlook all the foolish little foibles of all the weak little beings that called themselves men. A mathematical physicist lives in vast spaces where a lightyear is a footstep, where universes are being born and blotted out, where space unrolls along a fourth dimension on a surface distended from a fifth. To him, human beings and their affairs do not loom very important.
"Relativity," he explained. In his voice there was a patient forbearance for my slowness of comprehension. "Merely relativity. It doesn't take much physical effort to make the moon move through the treetops, does it? Just enough to walk down the garden path."
I stared at him and he continued:
"If you had been born and raised on a moving train, no one could convince you that the landscape was not in rapid motion. Well, our conception of the universe is quite as relative as that. Sir Issac Newton tried mathematics to express a universe as though beheld by an infinitely removed and perfectly fixed observer. Mathematicians since his time, realizing the futility of such an effort, have taken into considertation that what things 'are' depends upon the person who is looking at them. They have tried to express common knowledge, such as the law of gravitation, in terms that would hold good for all observers. Yet their leader and culminating genius, Einstein, has been unable to express knowledge in terms of pure relativity; he has had to accept the velocity of light as an arbitrarily fixed constant. Why should the velocity of light be any more fixed and constant than any other quantity in the universe?
"But, what's that got to do with going into the fourth dimension? I broke in impatiently.
He continued as though I hadn't spoken.
"The thing that interests us now, and that mystifies modern mathematicians, is the question of movement, or more accurately: translation. Is there such a thing as absolute translation? Can there be movement—translation—except in relation to something else than the thing that moves? All movement we know of is movement in relation to other objects, whether it be a walk down the street, or the movement of the earth in its orbit around the sun. A change of relative position. But the mere translation of an isolated object existing alone in space is mathematically inconceivable; for there is no such thing as space in that sense."
"I thought you said something about going into another universe—" I interrupted again.
You can't argue with Woleshensky. His train of thought went on without a break.
"By translation we understand getting from one place to another. 'Going somewhere' originally meant a movement of our bodies. Yet, as a matter of fact, when we drive in an automobile, we 'go somewhere' without moving our bodies at all. The scene is changed around us; we are somewhere else; and yet we haven't moved at all.
"Or suppose you could cast off gravitational attraction for a moment and let the earth rotate under you; you would be going somewhere, and yet not moving—"
"But that is theory; you can't tinker with gravitation—"
"Every day you tinker with gravitation. When you start upwards in an elevator, your pressure, not your weight, against the floor of it is increased; apparent gravitation between you and the floor of the elevator is greater than before—and that's like gravitation is anyway: inertia and acceleration. But we are talking about translation. The position of everything in the universe must be referred to some sort of coordinates. Suppose we change the angle or direction of the coordinates: then you have 'gone somewhere' and yet you haven't moved, nor has anything else moved."
I looked at him, holding my head in my hands.
"I couldn't swear that I understand that," I said slowly. "And I repeat, that it looks like lifting yourself by your own bootstraps."
The homely simile did not dismay him. He pointed a finger at me as he spoke:
"You've seen a chip of wood bobbing on the ripples of a pond. Now you think the chip is moving; now the water. Yet neither is moving; the only motion is of an abstract thing called a wave.
"You've seen those 'illusion' diagrams, for instance this one of a group of cubes. Make up your mind that you are looking down upon their upper surfaces, and indeed they seem below you. Now change your mind, and imagine that you are down below, looking up. Behold, you see their lower surfaces; you are indeed below them. You have 'gone somewhere,' yet there has been no translation of anything. You have merely changed coordinates."
"Which do you think will drive me insane more quickly—if you show me what you mean, or if you keep on talking without showing me?"
"I'll try to show you. There are some types of mind, you know, that cannot grasp the idea of relativity. It isn't the mathematics involved that matters; it's just the inability of some types of mental organization to grasp the fact that the mind of the observer endows his environment with certain properties which have no absolute existence. Thus, when you walk through the garden at night the moon floats from one tree top to another. Is your mind good enough to invert this: make the moon stand still and let the trees move backwards. Can you do that? If so, you can 'go somewhere' into another dimension."
Woleshensky rose and walked to the window. His office was an appropriate setting for such a modern discussion as was ours; situated in a new, ultra-modern building on the University campus, the varnish glossy, the walls clean, the books neatly arranged behind clean glass, the desk in most orderly array; the office was just as precise and modern and wonderful as the mind of its occupant.
"When do you want to go?" he asked.
"Now!"
"Then, I have two more things to explain to you. The fourth dimension is just as much here as anywhere else. Right here around you and me things exist and go forward in the fourth dimension: but we do not see them and are not conscious of them, because we are confined to our own three. Secondly: if we name the four coordinates as Einstein does, x, y, z, and t, then we exist in x, y, and z, and move freely about in them; but are powerless to move in t. Why? Because t is the time dimension; and the time dimension is a difficult one for biological structures that depend on irreversible chemical reactions for their existence. But, biochemical reactions can take place along any one of the other dimensions as well as along t.
"Therefore, let us transform coordinates. Rotate the property of chemical irreversibility from t to z. Since we are organically able to exist (or at least to perceive) in only three dimensions at once, our new time dimension will be z. We shall be unconscious of z and cannot travel in it. Our activities and consciousness will take place along x, y, and t.
"According to fiction writers, to switch into the t dimension, some sort of an apparatus with an electrical field ought to be necessary. It is not. You need nothing more to rotate into the t dimension than you do to stop the moon and make the trees move as you ride down the road; or than you do to turn the cubes upside down. It is a matter of relativity."
I had ceased trying to wonder or to understand.
"Show me!" was all I could gasp.
"The success of this experiment in changing from the z to the t coordinate has depended largely upon my lucky discovery of a favorable location. It is just as, when you want the moon to ride the tree tops successfully, there have to be favorable features in the topography or it won't work. The edge of this building and that little walk between the two rows of Norway poplars seems to be an angle between planes in the z and t dimensions. It seems to slope downwards, does it not?—Now walk from here to the end and imagine yourself going upwards. That is all. Instead of feeling this building behind and above you, conceive it as behind and below. Just as on your ride by moonlight, you must tell yourself that the moon is not moving while the trees ride by—Can you do that? Go ahead then." He spoke in a confident tone, as though he knew exactly what would happen.
Half credulous, half wondering. I walked slowly out of the door; I noticed that Woleshensky settled himself down to the table with a pad and a pencil to some kind of study, and forgot me before I had finished turning around. I looked curiously at the familiar wall of the building and the still more familiar poplar walk, expecting to see some strange scenery, some unknown view from another world. But there were the same old bricks and trees that I had known so long; though my disturbed and wondering frame of mind endowed them with a sudden strangeness and unwontedness. Things I had known for some years, they were, yet so powerfully had Woleshensky's arguments impressed me that I already fancied myself in a different universe. According to the conception of relativity, objects of the x, y, z universe ought to look different when viewed from the x, y, t universe.
Strange to say, I had no difficulty at all in imagining myself as going upwards on my stroll along the slope. I told myself that the building was behind and below me, and indeed it seemed real that it was that way. I walked some distance along the little avenue of poplars, which seemed familiar enough in all its details; though after a few minutes it struck me that the avenue seemed rather long. In fact, it was much longer than I had ever known it to be before.
With a queer Alice-in-Wonderland feeling I noted it stretching way on ahead of me. Then I looked back.
I gasped in astonishment. The building was indeed below me. I looked down upon it from the top of an elevation. The astonishment of that realization had barely broken over me, when I admitted that there was a building down there; but what building? Not the new Morton Hall, at least. It was a long, three-story brick building, quite resembling Morton Hall, but it was not the same. And on beyond there were trees with buildings among them; but it was not the campus that I knew.
I paused in a kind of panic. What was I to do now? Here I was in a strange place. How I had gotten there I had no idea. What ought I do about it? Where should I go? How was I to get back? Odd that I had neglected the precaution of how to get back. I surmised that I must be on the t dimension. Stupid blunder on my part, neglecting to find out how to get back.
I walked rapidly down the slope toward the building. Any hopes that I might have had about its being Morton Hall were thoroughly dispelled in a moment. It was a totally strange building, old, and old-fashioned looking. I had never seen it before in my life. Yet it looked perfectly ordinary and natural, and was obviously a University class-room building.
I cannot tell whether it was an hour or a dozen that I spent walking frantically this way and that, trying to decide to go into this building or another, and at the last moment backing out in a sweat of hesitation. It seemed like a year, but was probably only a few minutes. Then I noticed the people. They were mostly young people, of both sexes. Students, of course. Obviously I was on a University campus. Perfectly natural, normal young people, they were. If I were really on the t dimension, it certainly resembled the z dimension very closely.
Finally I came to a decision. I could stand this no longer. I selected a solitary, quiet-looking man, and stopped him.
"Where am I?" I demanded.
He looked at me in astonishment. I waited for a reply, and he continued to gaze at me speechlessly. Finally it occurred to me that he didn't understand English.
"Do you speak English?" I asked hopelessly.
"Of course!" he said vehemently. "What's wrong with you?"
"Something's wrong with something," I exclaimed. "I haven't any idea where I am or how I got here."
"Oh, hell! Think I'm a fool? Say, do you have a good man in mathematical physics on the faculty? Take me to him."
"Psychology, I should think," he said, studying me. "Or psychiatry. But I'm a law student and know nothing of either."
"Then make it mathematical physics, and I'll be grateful to you."
So I was conducted to the mathematical physicist. The student led me into the very building which corresponded to Morton Hall, and into an office the position of which quite corresponded to that of Woleshensky's room. However, the office was older and dustier; it had a Victorian look about it, and was not as modern as Woleshensky's room. Professor Vibens was a rather small, bald-headed man, with a keen looking face. As I thanked the law-student and started on my story, he looked rather bored, as though wondering why I had picked on him with my tale of wonder. Before I had gotten very far he straightened up a little; and further along he picked up another notch; and before many minutes he was tense in his chair as he listened to me. When I finished, his comment was terse, like that of a man accustomed to thinking accurately and to the point.
"Obviously you come into this world from another set of coordinates. As we are on the z dimension, you must have come to us from the t dimension—."
He disregarded my attempts to protest at this point.
"Your man Woleshensky has evidently developed the conception of relativity further than we have, although Monpeters' theory comes close enough to it. Since I have no idea how to get you back, you must be my guest. I shall enjoy hearing all about your world."
"That is very kind of you," I said gratefully. "I'm accepting because I can't see what else to do. At least until the time when I can find me a place in your world or get back on my own. Fortunately," I added as an afterthought, "no one will miss me there, unless it be a few classes of students who will welcome the little vacation that must elapse before my successor is found."
Breathlessly eager to find out what sort of a world I had gotten into, I walked with him to his home. And I may state at the outset that if I had found everything upside down and outlandishly bizarre, I should have been far less amazed and astonished than I was. For, from the walk that first evening from Professor Viben's office along several blocks of residence street to his solid and respectable home, through all of my goings about the town and country during the years that I remained in the t-dimensional world, I found people and things thoroughly ordinary and familiar. They looked and acted as we do, and their homes and goods looked like ours. I cannot possibly imagine a world and a people that could be more similar to ours without actually being the same. It was months before I got over the idea that I had merely wandered into an unfamiliar part of my own city. Only the actual experience of wide travel and much sight-seeing, and the knowledge that there was no such extensive English-speaking country on the world that I knew, convinced me that I must be on some other world, doubtless in the t dimension.
"A gentleman who has found his way here from another universe," the professor introduced me to a strapping young fellow who was mowing the lawn.
The professor's son was named John! Could anything be more commonplace?
"I'll have to take you around and show you things tomorrow," John said cordially, accepting the account of my arrival without surprise.
A red-headed servant-girl, roast-pork and rhubarb-sauce for dinner, and checkers afterwards, a hot bath at bedtime, the ringing of a telephone somewhere else in the house—is it any wonder that it was months before I would believe that I had actually come into a different universe? What slight differences there were in the people and the world, merely served to emphasize the similarity. For instance, I think they were just a little more hospitable and "old-fashioned" than we are. Making due allowances for the fact that I was a rather remarkable phenomenon, I think I was welcomed more heartily in this home and in others later, people spared me more of their time and interest from their daily business, than would have happened under similar circumstances in a correspondingly busy city in America.
Again, John found a lot of time to take me about the city and show me banks and stores and offices. He drove a little squat car with tall wheels, run by a spluttering gasoline motor. (The car was not as perfect as our modern cars, and horses were quite numerous in the streets. Yet John was a busy business man, the district superintendent of a life-insurance agency). Think of it! Life insurance in Einstein's t dimension.
"You're young to be holding such an important position," I suggested.
"Got started early," John replied. "Dad is disappointed because I didn't see fit to waste time in college. Disgrace to the family, I am."
What in particular shall I say about the city? It might have been any one of a couple of hundred American cities. Only it wasn't. The electric street cars, except for their bright green color, were perfect; they might have been brought over bodily from Oshkosh or Tulsa. The ten-cent stores with gold letters on their signs; drug-stores with soft drinks; a mad, scrambling stock-exchange; the blaring sign of an advertising dentist; brilliant entrances to motion-picture theaters, were all there. The beauty-shops did wonders to the women's heads, excelling our own by a good deal, if I am any judge; and at that time I had nothing more important on my mind than to speculate on that question. Newsboys bawled the Evening Sun, and the Morning Gale in whose curious, flat type I could read accounts of legislative doings, murders and divorces, quite as fluently as I could in my own Tribune at home. Strangeness and unfamiliarity had bothered me a good deal on a trip to Quebec a couple of years ago; but they were not noticeable here in the t dimension.
For three or four weeks the novelty of going around, looking at things, meeting people, visiting concerts, theaters, and department stores, was sufficient to absorb my interest. Professor Vibens' hospitality was so sincerely extended that I did not hesitate to accept, though I assured him that I would repay it as soon a I got established in this world. In a few days I was thoroughly convinced that there was no way back home. Here I must stay, at least until I learned as much as Woleshensky knew about crossing dimensions. Professor Vibens eventually secured for me a position at the University.
It was shortly after I had accepted the position as instructor in expertmental physics and had begun to get broken into my work, that I noticed a strange commotion among the people of the city. I have always been a studious recluse, observing people as phenomena rather than participating in their activities. So for some time I noted only in a subconscious way the excited gathering in groups, the gesticulations and blazing eyes, the wild sale of extra editions of papers, the general air of disturbance. I even failed to take an active interest in these things when I made a railroad journey of three hundred miles and spent a week in another city; so thoroughly at home did I feel in this world that when the advisability arose of my studying laboratory methods in another University, I made the trip alone. So absorbed was I in my laboratory problems that I only noted with half an eye the commotion and excitement everywhere, and merely recollected it later. One night it suddenly popped into my head that the country was aroused over something.
That night I was with the Vibens' family in their living room. John tuned in the radio. I wasn't listening to the thing very much; I had troubles of my own. $f=g\frac{m_1m_2}{r^2}$ was familiar enough to me. It meant the same and held as rigidly here as in my old world. But, what was the name of the bird who had formulated that law? Back home it was Newton. Tomorrow in class I would have to be thoroughly familiar with his name. Pasvieux, that's what it was. What messy surnames. It struck me that it was lucky that they expressed the laws of physics in the same form, and even in the same algebraical letters, or I might have had a time getting them confused—when all of a sudden the radio blatantly bawled:
"THE GOSTAK DISTIMS THE GOSHES!"
John jumped to his feet.
"Damn right!" he shouted, slamming the table with his fist.
Both his father and mother annihilated him with withering glances, and he slunk from the room. I gazed stupefied. My stupefaction continued while the Professor shut off the radio, and both of them excused themselves from my presence. Then suddenly I was alert.
I grabbed a bunch of newspapers, having seen none for several days. Great sprawling headlines covered the front pages:
"THE GOSTAK DISTIMS THE DOSHES."
For a moment I stopped, trying to recollect where I had heard those words before. They recalled something to me. Ah, yes! That very afternoon, there had been a commotion beneath my window on the University campus. I had been busy checking over an experiment so that I might be sure of its success at tomorrow's class, and looked out rather absently to see what was going on. A group of young men from a dismissed class was passing, and had stopped for a moment.
"I say, the gostak distims the doshes!" said a fine-looking young fellow. His face was pale and strained looking.
The young man facing him sneered derisively:
"Aw your grandmother! Don't be a feeble—"
He never finished. The first fellow's fist caught him in the cheek. Several books dropped to the ground. In a moment the two had clinched and were rolling on the ground, fists flying up and down, smears of blood appearing here and there. The others surrounded them, and for a moment appeared to enjoy the spectacle; but suddenly recollected that it looked rather disgraceful on a University campus, and after a lively tussle separated the combatants. Twenty of them, pulling in two directions, tugged them apart.
The first boy strained in the grasp of his captors; his white face was flecked with blood, and he panted for breath.
"Insult!" he shouted, giving another mighty heave to get free. He looked contemptuously around. "The whole bunch of you ought to learn to stand up for your honor. The gostak distims the doshes!"
That was the astonishing incident that these words called to my mind. I turned back to my newspapers.
"Slogan Sweeps the Country," proclaimed the sub-heads. "Ringing Expression of National Spirit! Enthusiasm Spreads Like Wildfire! The new patriotic slogan is gaining ground rapidly," the leading article went on. "The fact that it has covered the country almost instantaneously seems to indicate that it fills a deep and long-felt want in the hearts of the people. It was first uttered during a speech in Walkingdon by that majestic figure in modern statesmanship, Senator Harob. The beautiful sentiment, the wonderful emotion of this sublime thought, are epoch-making. It is a great conception, doing credit to a great man, and worthy of being the guiding light of a great people—"
That was the gist of everything I could find in the papers. I fell asleep, still puzzled about the thing. I was puzzled, because—as I see now and didn't see then—I was trained in the analytical methods of physical science, and knew little or nothing about the ways and emotions of the masses of the people.
In the morning the senseless expression popped into my head as soon I awoke. I determined to waylay the first member of the Vibens family who showed up, and demand the meaning of the thing. It happened to be John.
"John, what's a gostak?"
John's face lighted up with pleasure. He threw out his chest and a look of pride replaced the pleasure. His eyes blazed, and with a consuming enthusiasm, he shook hands with me, as the deacons shake hands with a new convert—a sort of glad welcome.
"The gostak!" he exclaimed. "Hurray for the gostak!"
"But what is a gostak?"
"Not a gostak! The gostak. The gostak is—the distimmer of the doshes—see! He distims 'em, see?"
"Yes, yes. But what is distimming? How do you distim?"
"No, no! Only the gostak can distim. The gostak distims the doshes. See?"
"Ah, I see!" I exclaimed. Indeed, I pride myself on my quick wit. "What are doshes? Why, they are the stuff distimmed by the gostak. Very simple!"
"Good for you" John slapped my back in huge enthusiasm. "I think it wonderful for you to understand us so well, after being here only a short time. You are very patriotic."
I gritted my teeth tightly, to keep myself from speaking.
"Professor Vibens, what's a gostak?" I asked in the solitude of his office an hour later.
He looked pained.
He leaned back in his chair and looked me over elaborately, and waited some time before answering.
"Hush!" he finally whispered. "A scientific man may think what he pleases; but if he says too much, people in general may misjudge him. As a matter of fact, a good many scientific men are taking this so-called patriotism seriously. But a mathematician cannot use words loosely; it has become second nature with him to inquire closely into the meaning of every term he uses."
"Well, doesn't that jargon mean anything at all?" I was beginning to be puzzled in earnest.
"To me, it does not. But it seems to mean a great deal to the public in general. It's making people do things, is it not?"
I stood a while in stupefied silence. That an entire great nation should become fired up over a meaningless piece of nonsense! Yet, the astonishing thing was that I had to admit that there was plenty of precedent for it in the history of my own z-dimensional world. A nation exterminating itself in civil wars to decide which of two profligate royal families should be privileged to waste the people's substance from the throne; a hundred thousand crusaders marching to death for an idea that to me means nothing; a meaningless, untrue advertising slogan that sells millions of dollars' worth of cigarettes to a nation to the latter's own detriment—haven't we seen it over and over again?"
"There's a public lecture on this stuff tonight at the First Church of The Salvation," Professor Vibens suggested.
"I'll be there," I said. "I want to look into the thing."
That afternoon there was another flurry of "extras" over the street; people gathered in knots and gesticulated with open newspapers.
"War! Let 'em have it!" I heard men shout.
"Is our national honor a rag to be muddied and trampled on?" the editorial asked.
As far as I could gather from reading the papers, there was a group of nations across an ocean that was not taking the gostak seriously. A ship whose pennant bore the slogan had been refused entrance to an Engtalian harbor because it flew no national ensign. The Executive had dispatched a diplomatic note. An evangelist who had attempted to preach the gospel of the distimmed doshes at a public gathering in Itland had been ridden on a rail and otherwise abused. The Executive was dispatching a diplomatic note.
Public indignation waxed high. Derogatory remarks about "wops" were flung about. Shouts of "Holy war!" were heard. I could feel the tension in the atmosphere as I took my seat in the crowded church in the evening. I had been assured that the message of the gostak and the doshes would be thoroughly expounded so that even the most simple-minded and uneducated people could understand it fully. Although I had my hands full at the University, I was so puzzled and amazed at the course that events were taking that I determined to give the evening to finding out what the "slogan" meant.
There was a good deal of singing before the lecture began. Mimeographed copies of the words were passed about, but I neglected to preserve them, and do not remember them. I know there was one solemn hymn that reverberated harmoniously through the great church, a chanting repetition of "The Gostak Distims the Doshes." There was another stirring martial air, that began: "Oh the Gostak! Oh the Gostak!"—and ended with a swift cadence on the Gostak Distims the Doshes!" The speaker had a rich, eloquent voice and a commanding figure. He stepped out and bowed solemnly.
"The gostak distims the doshes," he pronounced impressively. Is it not comforting to know that there is a gostak; do we not glow with pride because the doshes are distimmed? In the entire universe there is no more profoundly significant fact: the gostak distims the doshes. Could anything more complete, yet more tersely emphatic. The gostak distims the doshes!" Applause. "This thrilling truth affects our innermost lives. What would we do if the gostak did not distim the doshes? Without the gostak, without doshes, what would we do? What would we think? How would we feel?—" Applause again.
At first I thought this was some kind of an introduction. I was inexperienced in listening to popular speeches, lectures, and sermons. I had spent most of my life in the study of physics and its accessory sciences. I could not help trying to figure out the meaning of whatever I heard. When I found none I began to get impatient. I waited some more, thinking that soon he would begin on the real explanation. After thirty minutes of the same sort of stuff as I have just quoted, I gave up trying to listen. I just sat and hoped he would soon be through. The people applauded and grew more excited. After an hour, I stirred restlessly; I slouched down in my seat and sat up by turns. After two hours I grew desperate; I got up and walked out. Most of the people were too excited to notice me. Only a few of them cast hostile glances at my retreat.
The next day the mad nightmare began for me. First there was a storm of "extras" over the city, announcing the sinking of a merchantman by an Engtalian cruiser. A dispute had arisen between the officers of the merchantman and the port officials, because the latter had jeered disrespectfully at the gostak. The merchantman picked up and started out without having fulfilled all the Customs requirements. A cruiser followed it and ordered it to return. The captain of the merchantman told them that the gostak distims the doshes, whereupon the cruiser fired twice and sank the merchantman. In the afternoon came the "extras" announcing the Executive's declaration of war.
Recruitment offices opened; the University was depleted of its young men; uniformed troops marched through the city, and railway trains full of them went in and out. Campaigns for raising war loans; homeguards, women's auxiliaries, ladies' aid societies making bandages, young women enlisting as ambulance drivers—it was indeed war; all of it to the constantly repeated slogan: "The gostak distims the doshes."
I could hardly believe that it was really true. There seemed to be no adequate cause for a war. The huge and powerful nation had dreamed a silly slogan and flung it in the world's face. A group of nations across the water had united into an alliance, claiming they had to defend themselves against having forced upon them a principle they did not desire. The whole thing at the bottom had no meaning. It did not seem possible that there would actually be a war; it seemed more like going through a lot of elaborate play-acting.
Only when the news came of a vast naval battle of doubtful issue, in which ships had been sunk and thousands of lives lost, did it come to me that they meant business. Black bands of mourning appeared on sleeves and in windows. One of the allied countries was invaded and a front-line set up. Reports of a division wiped out by an airplane attack; of forty thousand dead in a five-day battle; of more men and more money needed, began to make things look real. Haggard men with bandaged heads and arms in slings appeared on the streets; a church and an auditorium were converted into hospitals; and trainloads of wounded were brought in. To convince myself that this thing was so, I visited these wards, and saw with my own eyes the rows of cots, the surgeons working on ghastly wounds, the men with a leg missing or with a hideously disfigured face.
Food became restricted; there was no white bread, and sugar was rationed. Clothing was of poor quality; coal and oil were obtainable only on government permit. Businesses were shut down. John was gone; his parents received news that he was missing in action.
Real it was; there could be no more doubt of it. The thing that made it seem most real was the picture of a mangled, hopeless wreck of humanity sent back from the guns, a living protest against the horror of war. Suddenly someone would say: "The gostak distims the doshes!" and the poor wounded fragment would straighten up and put out his chest with pride, and an unquenchable fire would blaze in his eyes. He did not regret having given his all for that. How could I understand it?
And real it was when the draft was announced. More men were needed; volunteers were insufficient. Along with the rest, I complied with the order to register, doing so in a mechanical fashion, thinking little of it. Suddenly the coldest realization of the reality of it was flung at me, when I was informed that my name had been drawn and that I would have to go!
All this time I had looked upon this mess as something outside of me; something belonging to a different world, of which I was not a part. Now here was a card summoning me to training camp. With all this death and mangled humanity in the background, I wasn't even interested in this world. I didn't belong here. To be called upon to undergo all the horrors of military life, the risk of a horrible death, for no reason at all! For a silly jumble of meaningless sounds.
I spent a sleepless night in maddened shock from the thing. In the morning a wild and haggard caricature of myself looked back at me from the mirror. But I had revolted. I intended to refuse service. If the words conscientious objector ever meant anything, I certainly was one. Even if they shot me for treason at once, that would be a fate less hard to bear than going out and giving my strength and my life for—for nothing at all.
My apprehensions were quite correct. With my usual success at self-control over a seething interior, I coolly walked to the draft office and informed them that I did not believe in their cause and could not see my way to fight for it. Evidently they had suspected something of that sort already, for they had the irons on my wrists before I had hardly done with my speech.
"Period of emergency," said a beefy tyrant at the desk; "no time for stringing out a civil trial. Courtmartial!"
He said it at me vindictively, and the guards jostled me roughly down the corridor; even they resented my attitude. The court-martial was already waiting for me. From the time I walked out of the lecture at the church I had been under secret surveillance; and they knew my attitude thoroughly. That is the first thing the president of the court informed me.
My trial was short. I was informed that I had no valid reason for objecting. Objectors because of religion, because of nationality, and similar reasons, were readily understood; a jail sentence to the end of the war was their usual fate. But I admitted that I had no intrinsic objection to fighting; I merely jeered at their holy cause. That was treason unpardonable.
"Sentenced to be shot at sunrise!" the president of the court announced.
The world spun around with me. But only for a second. My self-control came to my aid. With the curious detachment that comes to us in such emergencies, I noted that the court-martial was being held in Professor Vibens' office; that dingy little Victorian room, where I had first told my story of traveling by relativity and had first realized that I had come to the t-dimensional world. Apparently it was also to be the last room I was to see in this same world. I had no false hopes that the execution would help me back to my own world, as such things sometimes do in stories. When life is gone, it is gone, whether in one dimension or another. I would be just as dead in the z dimension as in the t dimension.
"Now, Einstein, or never?" I thought. "Come to my aid, O Riemann! O Lobatchewsky! If anything will save me it will have to be a tensor or a geodesic."
I said it to myself rather ironically. Relativity had brought me here. Could it get me out of this?
Well! Why not?
If the form of a natural law, yea, if a natural object varies with the observer who expresses it, might not the truth and the meaning of the gostak slogan also be a matter of relativity? It was like making the moon ride the tree tops again. If I could be a better relativist, and put myself in these people's place, perhaps I could understand the gostak. Perhaps I would even be willing to fight for him or it.
The idea struck me suddenly. I must have straightened up and some bright change must have passed over my features, for the guards who led me looked at me curiously and took a firmer grip on me. We had just descended the steps of the building and had started down the walk.
Making the moon ride the tree tops! That was what I needed now. And that sounded as silly to me as the gostak. And the gostak did not seem so silly. I drew a deep breath and felt very much encouraged. The viewpoint of relativity was somehow coming back to me. Necessity manages much. I could understand how one might fight for the idea of a gostak distimming the doshes. I felt almost like telling these men. Relativity is a wonderful thing. They led me up the slope, between the rows of poplars.
Then it all suddenly popped into my head; how I had gotten here by changing my coordinates, insisting to myself that I was gong upwards. Just like making the moon stop and making the trees ride, when you are out riding at night. Now I was going upwards. In my own world, in the z dimension, this same poplar was down the slope.
"It's downwards!" I insisted to myself. I shut my eyes, and imagined the building behind and above me. With my eyes shut, it did seem downwards. I walked for a long time before opening them. Then I opened them and looked around.
I was at the end of the avenue of poplars. I was surprised. The avenue seemed short. Somehow it had become shortened; I had not expected to reach the end so soon. And where were the guards in olive uniform? There were none.
I turned around and looked back. The slope extended on backwards above me. Indeed I had walked downwards. There we no guards, and the fresh, new building was on the hill behind me.
Woleshensky stood on the steps.
"Now what do you think of a t dimension," he called out to me.
Woleshensky!
And a new building, modern! Vibens' office was in an old, Victorian building. What was there in common between Vibens and Woleshensky? I drew a deep breath. The comforting realization spread gratefully over me that I was back in my native dimension. The gostak and the war were somewhere else. Here were peace and Woleshensky.
I hastened to pour out the story to him.
"What does it all mean?" I asked when I was through. "Somehow—vaguely—it seems that it ought to mean something."
"Perhaps," he said in his kind, sage way, "we really exist in four dimensions. A part of us and our world that we cannot see and are not conscious of, projects on into another dimension; just like the front edges of the books in the bookcase, turned away from us. You know that the section of a conic cut by the y plane looks different than the section of the same conic by the z plane? Perhaps what you saw was our own world and our own selves, intersected by a different set of co-ordinates. Relativity, as I told you in the beginning."
This work is in the public domain in the United States because it was legally published within the United States (or the United Nations Headquarters in New York subject to Section 7 of the United States Headquarters Agreement) before 1964, and copyright was not renewed. For Class A renewals records (books only) published between 1923 and 1963, check the Stanford Copyright Renewal Database and the Rutgers copyright renewal records. For other renewal records of publications between 1922 - 1950 see the Pennsylvania copyright records scans. For all records since 1978, search the U.S. Copyright Office records. The author died in 1945, so this work is also in the public domain in countries and areas where the copyright term is the author's life plus 60 years or less. This work may also be in the public domain in countries and areas with longer native copyright terms that apply the rule of the shorter term to foreign works. Works published in 1930 would have had to renew their copyright in either 1957 or 1958, i.e. at least 27 years after it was first published / registered but not later than 31 December in the 28th year. As it was not renewed, it entered the public domain on 1 January 1959. |
### Does "www." Mean Better Transport Layer Security?
Eman Salem Alashwali, Pawel Szalachowski, and Andrew Martin
##### Abstract
Experience shows that most researchers and developers tend to treat plain-domains (those that are not prefixed with “www” sub-domains, e.g. “example.com”) as synonyms for their equivalent www-domains (those that are prefixed with “www” sub-domains, e.g. “www.example.com”). In this paper, we analyse datasets of nearly two million plain-domains against their equivalent www-domains to answer the following question: Do plain-domains and their equivalent www-domains differ in TLS security configurations and certificates? If so, to what extent? Our results provide evidence of an interesting phenomenon: plain-domains and their equivalent www-domains differ in TLS security configurations and certificates in a non-trivial number of cases. Furthermore, www-domains tend to have stronger security configurations than their equivalent plain-domains. Interestingly, this phenomenon is more prevalent in the most-visited domains than in randomly-chosen domains. Further analysis of the top domains dataset shows that 53.35% of the plain-domains that show one or more weakness indicators (e.g. expired certificate) that are not shown in their equivalent www-domains perform HTTPS redirection from HTTPS plain-domains to their equivalent HTTPS www-domains. Additionally, 24.71% of these redirections contains plain-text HTTP intermediate URLs. In these cases, users see the final www-domains with strong TLS configurations and certificates, but in fact, the HTTPS request has passed through plain-domains that have less secure TLS configurations and certificates. Clearly, such a set-up introduces a weak link in the security of the overall interaction.
Available format(s)
Category
Applications
Publication info
Published elsewhere. 14th International Conference on Availability, Reliability and Security (ARES 2019)
Keywords
networkinternetsecurityanalysisprotocolTLSSSLmeasurementapplied cryptography
Contact author(s)
eman alashwali @ gmail com
History
Short URL
https://ia.cr/2019/941
CC BY
BibTeX
@misc{cryptoeprint:2019/941,
author = {Eman Salem Alashwali and Pawel Szalachowski and Andrew Martin},
title = {Does "www." Mean Better Transport Layer Security?},
howpublished = {Cryptology ePrint Archive, Paper 2019/941},
year = {2019},
note = {\url{https://eprint.iacr.org/2019/941}},
url = {https://eprint.iacr.org/2019/941}
}
Note: In order to protect the privacy of readers, eprint.iacr.org does not use cookies or embedded third party content. |
6. What properties of molecule or fragments control the intensity of observed fragments in the measurement by a mass spectrometer?
Question:
6. What properties of molecule or fragments control the intensity of observed fragments in the measurement by a mass spectrometer?
Similar Solved Questions
(20 points) Silver ion is known to catalyse first order reaction by forming silver halide. Give mechanisms for the following silver-promoted rearrangements:CH3OHAgNO, 1,0HzC C C| Hz CH3HzC~CH; Hz CH3CHzlAgNO, Hocm col904080
(20 points) Silver ion is known to catalyse first order reaction by forming silver halide. Give mechanisms for the following silver-promoted rearrangements: CH3 OH AgNO, 1,0 HzC C C| Hz CH3 HzC ~CH; Hz CH3 CHzl AgNO, Hocm col 90 4080...
Classifying Costs as Materials, Labor, or Factory Overhead Indicate whether each of the following costs of...
Classifying Costs as Materials, Labor, or Factory Overhead Indicate whether each of the following costs of an automobile manufacturer would be classified materials cost, direct labor cost, or factory overhead cost: Cost Classification a. Wheels b. Glass used in the vehicle's windshield c. Wages ...
The graph below represents the number of counts detected from a sample of a radioactive isotope...
The graph below represents the number of counts detected from a sample of a radioactive isotope as a function of time. What is the isotope's half-life? 1000 800 600 400 200 I0 20 30 40 50 t in minutes) Incorrect. Tries 2/10 Previous Tries Submit Answer Based on the graph above, how many total co...
Use Taylors theorem and the Taylor series around 0 of sin(r) to determine sin(39- (sin of = degrees) to 3 d.p Explain which Taylor polynomial T,(r) you used to make your estimate, and why
Use Taylors theorem and the Taylor series around 0 of sin(r) to determine sin(39- (sin of = degrees) to 3 d.p Explain which Taylor polynomial T,(r) you used to make your estimate, and why...
Riverside Inc. makes one model of wooden canoe. Partial information for it follows: Number of Canoes...
Riverside Inc. makes one model of wooden canoe. Partial information for it follows: Number of Canoes Produced and Sold 495645795 Total costs Variable costs $67, 320 ? Fixed costs 148, 400 _ ? Total costs$215,720 Cost per unit Variable cost per unit Fixed cost per unit Total cost per unit Required:...
Question 40which af the follavingfattcrs LumLMuule Lhc hizh phasplatt-traiale paltti Iol AIP?Tha Ereates resnance {Uabllizadian at Pi tncifIP Tneincreajeinth orati Fepuletn 4 oxygeupon mdralysisol AIP Intcracticn c( the Ftosplun Jidot Juj nAN ThatarmaUian %t utbrlac ~L7 (ha buse Iino goup andthe netle chagLJotr7aa 0n6iinAIPQuestion 41What / the!zht crdur?Cutachronta ~ADH GoxidoCutochruno axdsrubiqu nC cstackcma Cytochrame € ax8u0 chroma € ox doreduuie Chtochromac-VADHS Duxdar ublqunnc LC toc
Question 40 which af the follavingfattcrs LumLMuule Lhc hizh phasplatt -traiale paltti Iol AIP? Tha Ereates resnance {Uabllizadian at Pi tncifIP Tneincreajeinth orati Fepuletn 4 oxygeupon mdralysisol AIP Intcracticn c( the Ftosplun Jidot Juj nAN ThatarmaUian %t utbrlac ~L7 (ha buse Iino goup andthe ...
RoroncdnranncanQamv DCCDEplude yourSluni
roroncdnranncan Qamv DCCD Eplude your Sluni...
Find the indefinite integral and check the result by differentiation (Use for the constant of integration.)4x2
Find the indefinite integral and check the result by differentiation (Use for the constant of integration.) 4x2...
Soc Ghc problem:The decibel level D of J sound relatedt0 its intensity /by' 10l6iIf lo Is 10 12 then what is the Intensity of anoise measured at 63 decibels? Express your answer in scientific notation rounding to three significant digits if necessary:545 u 1014 wattin?637 10" walUm?2710' Walum?2*10 * walUm?
soc Ghc problem: The decibel level D of J sound relatedt0 its intensity /by' 10l6i If lo Is 10 12 then what is the Intensity of anoise measured at 63 decibels? Express your answer in scientific notation rounding to three significant digits if necessary: 545 u 1014 wattin? 637 10" walUm? 27...
You purchase machinery for $33,000 that generates after-tax cash flows of$10,000 annually for the next...
You purchase machinery for $33,000 that generates after-tax cash flows of$10,000 annually for the next 4 years. The cost of capital (WACC) is 6.56%. What is the NPV for this project?...
For what value of k would the equation (2k 1)z2 8r +2 = 0 have two equal real roots?(Record your answer in the numerical-response section below )Your answerWhat are the and y intercepts for the function f(z) =12 2c + 32I = 33,1 =1, andy =3I =-1,1 =3,andy =3I =0,I =3, and y =2r-intercepts y =3
For what value of k would the equation (2k 1)z2 8r +2 = 0 have two equal real roots? (Record your answer in the numerical-response section below ) Your answer What are the and y intercepts for the function f(z) =12 2c + 32 I = 33,1 =1, andy =3 I =-1,1 =3,andy =3 I =0,I =3, and y =2 r-intercepts y =3...
Question Completion Status: QUESTION 4 In a Cournot duopoly market, the two firms agree to produce...
Question Completion Status: QUESTION 4 In a Cournot duopoly market, the two firms agree to produce half of the monopoly output level for that market and split the resulting profit. Since the monopoly profit is the highest profit that can be obtained, the two firms will always stick to that agreement...
3) Lori is studying economics and political science. She can read 30 pages of political science...
3) Lori is studying economics and political science. She can read 30 pages of political science per hour but only 5 pages of economics per hour. This week she has a 50-page assignment in economics and a 150-page assignment in political science. Because of her job, she cannot devote more than 10 hour...
A simple linear regression is performed with € as the independent variable and y as the dependent variable_ The following values were calculated from the data points (21,91), (T2, y2) , (Tn; Yn) :8.20 23.51 15.21 Sfv 40.35 Svv 132.87 SSE 25.83Find the value of 81 also call b1 Find the value of Bo, also called bo: Let _ be the expected value of y when = = 10.00. Find @. Find 95' confidence interval for @
A simple linear regression is performed with € as the independent variable and y as the dependent variable_ The following values were calculated from the data points (21,91), (T2, y2) , (Tn; Yn) : 8.20 23.51 15.21 Sfv 40.35 Svv 132.87 SSE 25.83 Find the value of 81 also call b1 Find the value...
06: Consider the population of a small village (20 individuals) observed for the purpose of your...
06: Consider the population of a small village (20 individuals) observed for the purpose of your study, in the period January 1" 1960 to 31" December 1969. Subiect No. Year of Death 1980 1965 1968 Cause of Death CVD CVD CVD 1959 1969 CVD 1968 1965 1970 Accident Year of Birth Resident from 19...
Competition in a mature or declining industry is tough. The price competition is generally brutal and...
Competition in a mature or declining industry is tough. The price competition is generally brutal and returns are low. Can you think of any examples of new ideas that could reinvigorate companies at late stages in their lifecycle....
Remember that chemists typically do not include a coefficient of "1" in a balanced equation. If...
Remember that chemists typically do not include a coefficient of "1" in a balanced equation. If no coefficient is entered, it is understood that it is a "1." Now balance the equation by placing whole-number coefficients in front of the relevant formulas. XeF6(1) + H20(1)-→ XeO3(...
16) The American Heart Association recommends daily cholesterol intake of less than 300 Here are the cholesterol amounts in mg: random sample of single servings of grilled meats. Estimate the standard deviation in cholesterol with 95% confidence: Assume the variable to be normally distributed.90,85, 100,200,70,225,80, 105,125,105,115,130,95,110,145,155,190,185,210,75
16) The American Heart Association recommends daily cholesterol intake of less than 300 Here are the cholesterol amounts in mg: random sample of single servings of grilled meats. Estimate the standard deviation in cholesterol with 95% confidence: Assume the variable to be normally distributed. 90,85...
We intend to estimate the average driving time of a group ofcommuters. From a previous study, we believe that the average timeis 39 minutes with a standard deviation of 10 minutes. We want our90% confidence interval to have a margin of error of no more thanplus or minus 3 minutes. What is the smallest sample size we shouldconsider?
We intend to estimate the average driving time of a group of commuters. From a previous study, we believe that the average time is 39 minutes with a standard deviation of 10 minutes. We want our 90% confidence interval to have a margin of error of no more than plus or minus 3 minutes. What is the sm...
Argon gas expands in an adiabatic turbine from 3 MPa and 750°C to 03 MPa sta...
Argon gas expands in an adiabatic turbine from 3 MPa and 750°C to 03 MPa sta rate of 45 kg's What is the maximum power output of the turbine? Solve using appropriate software Mulvple Choice O 0.64 MW 195 MW 144 MW O 240 MW 112 W...
A crow can live up to 27 years. A pigeon can live up to one third the number of years that a crow can live up to, and an eagle can live up to 45 more years than the number of years a pigeon can live up to. Up to how many years can an eagle live?
A crow can live up to 27 years. A pigeon can live up to one third the number of years that a crow can live up to, and an eagle can live up to 45 more years than the number of years a pigeon can live up to. Up to how many years can an eagle live?...
The following quadratic function is written in general form: f()=x 2x-8 a) Write the factored formb) Write the vertex form (also known as standard form)_Find the Y-intercept: Which of the three forms listed above is the most useful identifying the Y-intercept and why?Find the intercepts _ Which the three forms listed above the most useful identifying the x-intercepts and why?e) Find the vertex Which of the three forms listed above is the most useful in identifying the vertex and why?Graph (2)
The following quadratic function is written in general form: f()=x 2x-8 a) Write the factored form b) Write the vertex form (also known as standard form)_ Find the Y-intercept: Which of the three forms listed above is the most useful identifying the Y-intercept and why? Find the intercepts _ Which t...
Fcteind Cn4tKDTOc usAnilgen Dresentina callsTra fast stop Inthe T-Cxotoxlc Ard TDMH mpouFeeed Guk ntt coldInfacted witn ANCCA+ Nmcnogte3CDBATcePasma callsUCnmtng CDa _call that couldsensilzed IDIH cel
Fcteind Cn4t KDTOc us Anilgen Dresentina calls Tra fast stop Inthe T-Cxotoxlc Ard TDMH mpou Feeed Guk ntt cold Infacted witn AN CCA+ Nmcnogte3 CDBATce Pasma calls UCnmtng CDa _ call that could sensilzed IDIH cel...
Gold, which has a density of 19.32 g/cm3, is the most ductile metal and can be...
Gold, which has a density of 19.32 g/cm3, is the most ductile metal and can be pressed into a thin leaf or drawn out into a long fiber. (a) If a sample of gold with a mass of 7.556 g, is pressed into a leaf of 7.827 μm thickness, what is the area of the leaf? (b) If, instead, the gold is drawn ou...
Shamrock Co. purchased land as a factory site for $432,000. The process of tearing down two... Shamrock Co. purchased land as a factory site for$432,000. The process of tearing down two old buildings on the site and constructing the factory required 6 months. The company paid $45,360 to raze the old buildings and sold salvaged lumber and brick for$6,804. Legal fees of $1.998 were paid for t... 5 answers Ceterrnine if the iraproper imdegral convergeg cr divergeg If i converges, evaluate the integial Jc+ic-4& Ceterrnine if the iraproper imdegral convergeg cr divergeg If i converges, evaluate the integial Jc+ ic-4&... 5 answers (0.5/4 Points]DETAILSPREVIOUS ANSWERSSCALCET8 4.1.049.MI,SAMY NOTESASK YOUR TEACHERJuesnanaeInar Merc Comdiend SeqveciiTrrov EcOSTche GieitonAJo recananr CN Jocthe Shinneddana5l Cone37p320 PitTutorid FiciciscFlndthe absolute maxlmim and absali-e mInlmum valuefon the %iven Interval;2167[-49]The absalut? maxlmum and Mnimum valo , ocolt pithor at ? cnticz Ipoint Inside tha interva nadcnt Intena Recallltnat crdca noins Dcnt Wner 0 or Is undefined, We begin rindina the demwvativ1812 187 - 216SlepDe C (0.5/4 Points] DETAILS PREVIOUS ANSWERS SCALCET8 4.1.049.MI,SA MY NOTES ASK YOUR TEACHER Juesnanae Inar Merc Comdiend SeqveciiTrrov Ec OSTche Gieiton AJo recan anr CN Jocthe Shinneddan a5l Cone 37p320 Pit Tutorid Ficicisc Flndthe absolute maxlmim and absali-e mInlmum value fon the %iven Interval; 21... 5 answers A dairy is planning to introduce and promote a new line oforganic ice cream. After test marketing the new line in a largecity, the marketing research department found that the demand inthat city is given approximately by the following equation, where xthousand quarts were sold per week at a price of$ð‘ each, and whoserevenue function is given as ð‘…(ð‘¥)=ð‘¥ð‘ð‘=15ð‘’−ð‘¥,0<ð‘¥<5(a) Find the local extrema for the revenue function.(b) On which intervals is the graph of the re
A dairy is planning to introduce and promote a new line of organic ice cream. After test marketing the new line in a large city, the marketing research department found that the demand in that city is given approximately by the following equation, where x thousand quarts were sold per week at a pric...
A 4.0 cm tall object is placed 8 cm in front of a double-convex lens (n...
A 4.0 cm tall object is placed 8 cm in front of a double-convex lens (n = 1.52). The height of the image is y'- 7.0 cm. Based on this information find: a) The magnification, m. b) The image distance, s'. c) The focal length of this lens, f....
What is the molar mass of the solute?molar mass:gtmol
What is the molar mass of the solute? molar mass: gtmol...
For the following exercises, find equations of the tangent plane and the normal line to the given surface at the given point.$f(x, y, z)=x y z=6$ at point $(1,2,3)$
For the following exercises, find equations of the tangent plane and the normal line to the given surface at the given point.$f(x, y, z)=x y z=6$ at point $(1,2,3)$... |
# Forensic Mental Health Systems Internationally
Authored by: Anne G. Crocker , James D. Livingston , Marichelle C. Leclair
# Handbook of Forensic Mental Health Services
Print publication date: May 2017
Online publication date: May 2017
Print ISBN: 9781138645943
eBook ISBN: 9781315627823
10.4324/9781315627823.ch1
Forensic mental health systems have evolved over time as a function of legal frameworks, health care environments, and broader social and cultural processes. The past 20 years has seen a general increase in demand for forensic services in many countries around the world (Jansman-Hart, Seto, Crocker, Nicholls, & Côté, 2011), a phenomenon that has sometimes been referred to as forensication (Seto et al., 2001). This increase has been attributed to a variety of factors such as significant changes of Mental Health Acts or civil commitment legislation, the successive downsizing of psychiatric institutions, a lack of community-based resources and supports, the criminalization of people with mental health and substance use problems, the increasingly complex clinical profiles of certain persons with severe mental illness, increased media reporting of violence, and public intolerance of nonconforming behavior (Jansman-Hart et al., 2011; Lamb, 2009; Priebe et al., 2008; Rock, 2001; Whitley & Berry, 2013; Whitley & Prince, 2005). It is also influenced by broader social phenomena linked to society’s handling of risk, such as how modern societies are organized to respond proactively to risk and neoliberal tendencies to frame risk as a problem within individuals rather than a social problem. Authors have even suggested that, in some countries, forensic services may become the de facto mental health services (Seto, Harris, & Rice, 2004). In addition to posing a number of humanitarian questions as well as questions regarding the capacity of the regular mental health services to deal with sometimes more disruptive patients, this trend may also come at significant economic cost. In Alberta, Canada, the cost of forensic cases has been estimated about CAD$275,000 per year, which is almost five times the costs for any other psychiatric inpatient (Jacobs et al., 2014). This number compares to the cost of care in forensic psychiatric hospitals in the Netherlands (R388 per day, or R142,000/CAD$207,000 per year: Avramenko, Evers, Philipse, Chakhssi, & Ament, 2009) and in the United Kingdom (£131,000 per year, or CAD$243,000: Barrett et al., 2005). In England and Wales, treating forensic patients in secure hospitals costs 15 percent of the total adult mental health investment (Wilson, James, & Forrester, 2011). To date, however, there remains relatively little research into the economic cost of forensic mental health services over time. The immense cost of forensic services should give rise to questions about the degree to which this is a wise investment; that is, are the potential benefits of the forensic mental health system being optimized? #### Forensic Mental Health Systems Internationally Forensic mental health systems have evolved over time as a function of legal frameworks, health care environments, and broader social and cultural processes. The past 20 years has seen a general increase in demand for forensic services in many countries around the world (Jansman-Hart, Seto, Crocker, Nicholls, & Côté, 2011), a phenomenon that has sometimes been referred to as forensication (Seto et al., 2001). This increase has been attributed to a variety of factors such as significant changes of Mental Health Acts or civil commitment legislation, the successive downsizing of psychiatric institutions, a lack of community-based resources and supports, the criminalization of people with mental health and substance use problems, the increasingly complex clinical profiles of certain persons with severe mental illness, increased media reporting of violence, and public intolerance of nonconforming behavior (Jansman-Hart et al., 2011; Lamb, 2009; Priebe et al., 2008; Rock, 2001; Whitley & Berry, 2013; Whitley & Prince, 2005). It is also influenced by broader social phenomena linked to society’s handling of risk, such as how modern societies are organized to respond proactively to risk and neoliberal tendencies to frame risk as a problem within individuals rather than a social problem. Authors have even suggested that, in some countries, forensic services may become the de facto mental health services (Seto, Harris, & Rice, 2004). In addition to posing a number of humanitarian questions as well as questions regarding the capacity of the regular mental health services to deal with sometimes more disruptive patients, this trend may also come at significant economic cost. In Alberta, Canada, the cost of forensic cases has been estimated about CAD$275,000 per year, which is almost five times the costs for any other psychiatric inpatient (Jacobs et al., 2014). This number compares to the cost of care in forensic psychiatric hospitals in the Netherlands (R388 per day, or R142,000/CAD$207,000 per year: Avramenko, Evers, Philipse, Chakhssi, & Ament, 2009) and in the United Kingdom (£131,000 per year, or CAD$243,000: Barrett et al., 2005). In England and Wales, treating forensic patients in secure hospitals costs 15 percent of the total adult mental health investment (Wilson, James, & Forrester, 2011). To date, however, there remains relatively little research into the economic cost of forensic mental health services over time. The immense cost of forensic services should give rise to questions about the degree to which this is a wise investment; that is, are the potential benefits of the forensic mental health system being optimized?
The goal of this chapter is to review the scientific and gray literatures regarding the provision of forensic mental health services around the world. In particular, we attempt to address the following question: What system-level characteristics are important to consider in relation to the organization and structure of forensic mental health services? To do so, we first examine the general legal frameworks that provide the contours of the forensic populations and services in various countries. We then synthesize publically accessible information to describe how forensic systems are organized throughout the world. Following this, we examine the fundamental system-level principles for organizing forensic mental health systems. The question of how to assess the performance of forensic mental health systems is addressed before turning toward the identification of the major challenges facing the organization of forensic services moving forward and followed by emerging approaches in forensic mental health services. 2
#### 1 How Are Forensic Mental Health Systems Organized Internationally?
Forensic mental health services generally function to assess and treat the mental health and criminogenic needs of individuals who intersect with the legal and criminal justice systems, including those who are found unfit to plead, found not criminally responsible on account of mental disorder, 3 mentally ill offenders in correctional facilities, persons whose aggressive behavior is unmanageable in adult mental health services, and, in some jurisdictions, persons detained under mental health legislation such as a compulsion order. 4 The legal framework (civil and criminal) of a jurisdiction is a strong determinant of who receives forensic mental health services and how those services are organized.
For this section, we conducted an international review of the academic and nonacademic literature to examine how forensic services are organized around the world. Studies and reports were first identified by searching Academic Search Complete (EBSCO), ProQuest Central, Scopus, PsycInfo, Google Scholar, and Google. Keywords for the search included: forensic psychiatry, forensic services, forensic service provision, forensic mental health services, insanity defense, and mentally ill offenders, by themselves or with the name of a specific country or region. Selected publications and reference lists were then manually scanned.
Several notable efforts to review forensic systems in different parts of the world have been undertaken (special issue of International Journal of Law and Psychiatry, 23, 2000; Every-Palmer et al., 2014; Mundt et al., 2012; Priebe et al., 2008; Salize, Dressing, & Kief, 2005; Taylor et al., 2013). Our current review brings together information from these previous reviews and adds information from other key sources such as the World Health Organization’s Assessment Instrument for Mental Health Systems (WHO-AIMS) 5 reports, as well as stand-alone government reports and scientific papers.
#### Legal Frameworks
In this section, an overview of forensic services and provisions across four general legal frameworks is provided, including: common law, civil law, the legislation of former Communist countries (Soviet, Soviet-controlled, and the Balkans), and Islamic law. We summarize how they address the main issues of fitness to plead, the mental disorder defense, diminished responsibility, hospital discharge provisions, forensic population composition, and forensic service provision. Additionally, information available in English, French, or Spanish is reviewed to gain insight into issues such as the presence of dedicated forensic institutions, the degree of integration between forensic and general mental health, the centralization of services, the continuity of services at discharge, and the presence of dedicated housing support for the forensic population. It is important to note that the information presented below relies exclusively on academic and nonacademic literature, and is accurate, complete, and up-to-date to the extent that the source documents permitted. Information was readily available for some jurisdictions (e.g., Canada, United Kingdom), but it was scarce for many regions of the world.
#### Common-Law Countries
Most common-law countries provide procedures for raising the issue and evaluating the fitness of an accused to stand trial (see Table 1.1), which may bear a different name according to the jurisdiction. Although there are minor variations, most legal tests for unfitness are based on the incapacity to understand the nature and severity of the charges; to understand the nature, objects, or consequences of the proceedings; and to communicate with or instruct a lawyer in a defense (Brinded, 2000; Every-Palmer et al., 2014; Gunn et al., 2013; Mudathikundan, Chao, & Forrester, 2014; Scott, 2007; Taylor et al., 2013). Many jurisdictions factor in the severity of the offense as well as the probability that the accused has committed the offense (e.g., New Zealand, South Africa) in their decisions concerning dispositions following unfitness to stand trial (Taylor et al., 2013).
### Table 1.1 Availability of Fitness to Plead, Mental Disorder Defense, and Diminished responsibility in law by legal Framework and Country
Legal Framework/Country
Mental Disorder Defense (Insanity)
Diminished Responsibility (For Any Offense or For Homicide Only)
Common Law
Australia
Yes
Yes
No: SA, TAS, VIC, WA Yes: NSW, QLD, ACT, NT
Botswana
n/a
Yes
n/a
Yes
Yes
No
England and Wales
Yes
Yes
Yes
Ghana
Yes
Yes
n/a
Hong Kong
Yes
Yes
Yes
India
Yes
Yes
Yes
Ireland
Yes
Yes
Yes
Israel
Yes
Yes
No
Kenya
n/a
Yes
n/a
New Zealand
Yes
Yes
No
Pakistan
Yes
Yes
No
Scotland
Yes
Yes
Yes
Singapore
Yes
Yes
Yes
South Africa
Yes
Yes
Yes
Tanzania
n/a
Yes
No
Uganda
n/a
Yes
n/a
United States
Yes
Most states
Most states
Civil Law – Napoleonic
Argentina
Yes
Yes
n/a
Belgium
n/a
Yes
No
Brazil
No
Yes
Yes
Chile
Yes
Yes
Yes
France
No
Yes
Yes
Italy
n/a
Yes
Yes
Luxembourg
n/a
Yes
Yes
Portugal
n/a
Yes
Yes
Spain
n/a
Yes
Yes
Civil Law – Germanic
Austria
No
Yes
No
Germany
Yes
Yes
Yes
Greece
n/a
Yes
Yes
Switzerland
No
Yes
Yes
Turkey
n/a
Yes
n/a
Civil Law – Nordic
Denmark
No
No
No
Iceland
n/a
Yes
n/a
Finland
No
Yes
Yes
Norway
n/a
Yes
Yes
Sweden
No
No
No
Civil Law – Other
China
Yes
Yes
Yes
Japan
Yes
Yes
Yes
Netherlands
No
Yes
Yes
Taiwan
Yes
Yes
Yes
Former Communist
Bulgaria
Yes
Yes
n/a
Croatia
n/a
Yes
n/a
Czech Republic
Yes
Yes
Yes
Hungary
n/a
Yes
n/a
Poland
n/a
Yes
Yes
Russia
Yes
Yes
Yes
Ukraine
n/a
Yes
n/a
Note
Notes:
n/a indicates that the information was unavailable or not expressly specified in the literature.
Jurisdictions use different settings and procedures for conducting fitness assessments or detaining those who are found unfit. In England and Wales, forensic assessments occur most often in prison, but treatment of those detained for reasons of fitness occurs in a general psychiatric facility or a specialized forensic facility (Salize et al., 2005). In South Africa, the assessment generally takes place in a forensic psychiatric hospital (Taylor et al., 2013). In Scotland, the assessment takes place in a hospital (Criminal Procedures Act 2016). In Canada, fitness assessments can take place in a forensic hospital or jail (Criminal Code of Canada, 1992); when an individual is found unfit to stand trial, jurisdiction is transferred from the court to a provincial or territorial review board, which decides on future dispositions of the case.
It is possible for the duration of detention for persons found unfit to be indefinite (see Table 1.2), but many jurisdictions have special provisions for people who are deemed permanently unfit. In Canada, there are no time limits to the detention in hospital of an unfit accused; however, an individual declared permanently unfit to stand trial who is also judged to be nondangerous may be granted a stay of proceedings by a review board and, subsequently, discharged (Criminal Code of Canada, 1992). In New Zealand, permanently unfit individuals must be brought before court or committed civilly after serving half of the maximum custodial sentence that would have been given for their index offense (or 10 years if the offense is punishable by a life sentence; Taylor et al., 2013). In the United States, if the competency of an accused to stand trial is not restored within a reasonable amount of time, charges must be dropped and the individual must be either released or civilly committed (Bloom, Williams, & Bigelow, 2000; Jackson v. Indiana, 1972). In Australia, procedures differ from one jurisdiction to the next. Proceedings may be discontinued in Queensland when an accused is found permanently unfit or unlikely to regain fitness within a certain period. In New South Wales, Victoria, Tasmania, and the Northern Territory, a special hearing to determine guilt and detention will be held if a judge or a jury finds that the accused is unlikely to regain the capacity to stand trial within 12 months (Hunyor, 2012; Jager, 2001; Taylor et al., 2013). Such special hearings do not seem to exist in South Australia and Western Australia: if the accused is found unfit, they will be held indefinitely in a secure hospital and will be tried when they recover sufficiently (Taylor et al., 2013).
### Table 1.2 Hospital Discharge Provisions by legal Framework and Country
Legal Framework/Country
Duration and Frequency of Review
Authority Regarding Discharge
Common Law
Australia
State-specific
State-specific (ministerial assent or Mental Health
Unlimited, reviewed every year (every three years if ‘high-risk accused’)
Provincial/Board
England and Wales
ix months (must be renewed after six months, then annually)
Treating psychiatrist/hospital (unless restriction order)
India
Reviewed every six months
Court
Ireland
elated to seriousness of the offense, reviewed every six months
Mental Health Board
Israel
eviewed every six months
Regional psychiatric board
New Zealand
n/a
Ministerial assent
Scotland
ix months (must be renewed after six months, then annually)
Mental Health
ingapore
eviewed every six months
Visitors board of independent psychiatrists and members of the public
outh Africa
n/a
reating hospital (ministerial assent if index offense was violent)
United States
n/a
Court (most states)
Civil Law – Napoleonic
Argentina
n/a
Court
Belgium
eviewed every six months
ocial Protection Committee
Brazil
Minimum duration imposed by judge
Court
France
Reviewed every six months
‘Hospitalisation d’office’: two different experts (mandatory assessment for release) ‘Hospitalisation à la demande d’un tiers’: Psychiatrist from treating facility
Italy
Minimum duration depends on severity of the crime
n/a
Luxembourg
Review two months after admission, then each year
Special commission
Portugal
Limited, based on diagnosis, severity of the offense, and clinical state, review at any time as required by the patient or the public prosecutor but at least every two years
Court
Spain
Reviewed every six months
Court
Civil Law – Germanic
Austria
Unlimited, reviewed at least once a year
Court
Germany
Unlimited, but must be related to severity of the offense; reviewed at least once a year
Court
Greece
Minimal duration established (lower than half the maximum sentence for the offense), reviewed every 2 years after minimal duration (detention cannot continue beyond 10 years for misdemeanors or 15 years for felonies)
Court
Switzerland
Unlimited
n/a
Turkey
n/a
Court
Civil Law – Nordic
Denmark
Placement order: unlimited, reviewed at least five years after sentence, then every second year
Placement order: Court
Treatment order: Time-limited (three or five years, can be extended by court order), reviewed every year
Treatment order: Psychiatrist
Finland
Unlimited, reviewed every six months
Final decision by the Authority of Medico-Legal Affairs ()
Iceland
Depends on psychiatric state, reviewed after a year
Court
Norway
nlimited
n/a
Sweden
Reviewed every six months
Court
Civil Law – Other
China
nlimited
Treating psychiatrist (with approval of local police station)
Japan
Every six months
Court
etherlands
Two years, then extended for one or two years each time, independent expert report every six years
Court
Taiwan
Limit of five years
n/a
Former Communist
Bulgaria
very six months
Court
Croatia
Depends on psychiatric state, should not exceed upper limits of imprisonment
n/a
Czech Republic
nlimited
n/a
Poland
nlimited, reviewed at least every six months
Court
Russia
imit is duration of the sentence, reviewed after six months, then annually
Court
Ukraine
elated to nature of the offense
n/a
Note
Notes:
n/a indicates that the information was unavailable.
#### Civil-Law Countries
Since civil law is more inquisitorial and less adversarial in nature than common law, thus leaving defendants with a more passive role, Continental European countries and other jurisdictions that belong to the Roman law heritage do not tend to test fitness to plead (Taylor et al., 2013).
Napoleonic Code legal family . In France and Brazil, accused persons may be tried and judged despite showing symptoms of severe mental illness (Salize et al., 2005; Taborda, Cardoso, & Morana, 2000). In Italy, if a psychiatric expert considers during the inquiry or the pretrial that the accused is ill and the offense is minor, the general attorney might not prosecute them and, instead, may prescribe community services or general psychiatric care. If the offense is serious and the person is considered dangerous, a trial will usually take place, despite the mental illness (Salize et al., 2005). In Chile, an accused who is unable to stand trial will be diverted to a forensic psychiatry network until they are ready to return to trial (Cid, 2010; St. Denis, 2008). Similarly, in Argentina, such individuals are sent to a special institution if their behavior is considered dangerous (Folino, Montero Vazquez, & Sarmiento, 2000).
The forensic assessment takes place in prison in France and Belgium. In Italy, it may take place in prison, in a forensic hospital or in a psychiatric facility. In Spain, the observation for the expert report regarding the mental disorder defense will take place in a psychiatric penitentiary hospital or a psychiatric penitentiary. A defendant suspected to be mentally ill may never be placed in a prison prior to trial in Portugal and the assessment must, instead, take place in a specialized forensic facility (Salize et al., 2005). In Chile, defendant assessment units (penitentiary units within civil hospitals) were recently created to provide forensic assessments (Cid, 2010).
Germanic legal family . Germany uses criteria similar to common-law jurisdictions to determine competence to participate in the trial. In addition, an accused can be found to have ‘limited fitness to stand trial,’ in which case the trial may proceed in such a way that allows the accused to participate, such as in the presence of a specialist (such as a psychologist), with extended breaks, or with limits on the duration of the proceedings (Edworthy, Sampson, & Völlm, 2016; Rothschild, Erdmann, & Parzeller, 2007). The forensic assessment will be carried out in a public psychiatric hospital or on an ambulatory basis if possible.
Nordic legal family . Sweden, Denmark, and Finland do not have the concept of fitness to plead; however, Finland does have provisions allowing for a forensic psychiatric assessment to determine whether an accused can be heard at the trial (Salize et al., 2005; Taylor et al., 2013).
In Denmark, forensic assessments may take place in a forensic psychiatric facility or in the community. In Finland, it can be carried out in a forensic psychiatric hospital, in forensic psychiatric wards, or in a prison psychiatric ward—rarely, the assessment can be performed based solely on the patient’s record (Salize et al., 2005).
Other civil-law jurisdictions . In the Netherlands, fitness to stand trial does not exist in practice (de Ruiter & Hildebrand, 2003; van der Wolf, van Marle, Mevis, & Roesch, 2010). In Taiwan and Japan, fitness to stand trial exists as a legal concept, but is rarely successful. In Japan, mentally disordered offenders are generally not prosecuted, but are rather referred to the forensic mental health services (MTSA process; Every-Palmer et al., 2014; Fujii, Fukuda, Ando, Kikuchi, & Okada, 2014). In China, mentally ill accused may be found unfit to stand trial, in which case they will be referred to a psychiatric hospital or released into the care of the family (Every-Palmer et al., 2014).
#### Former Communist Countries
The legal concept of fitness to stand trial was mentioned in the literature for Russia, the Czech Republic, and Bulgaria (Ciszewski & Sutula, 2000; Every-Palmer et al., 2014; Tătaru, Marinov, Douzenis, Novotni, & Kecman, 2010; Vevera et al., 2009). In Russia, if the accused is found unable to stand trial—that is, if they are unable to understand the course of the proceedings or mount a defense—the trial will be suspended and the accused will be hospitalized. If the accused does not regain the capacity to stand trial within a reasonable time, there will be no trial and the accused will remain hospitalized.
#### Common-Law Countries
The mental disorder or insanity defense is available in most countries belonging to the common-law legal system, though there is wide variation in its application. It is beyond the scope of this review to examine the insanity defense criteria in each country, but most have adopted some form or adapted form of the M’Naghten rule (Asokan, 2014; Brinded, 2000; Cheang, 1985; Edworthy et al., 2016; Every-Palmer et al., 2014; Gunn et al., 2013; Hassan, Nizami, & Hirji, 2015; Mullen & Chettleburgh, 2002; Shaidi, n.d.; Shea, 2001; Thomson, 2008; Yannoulidis, 2012; Yeo, 2008), sometimes with a volitional component. While most states in the United States do carry some version of insanity defense, Idaho, Kansas, Montana, and Utah have abolished this defense completely (Bureau of Justice Statistics, 2004; Greenberg & Felthous, 2007). Many states have adopted the ALI standard for the insanity defense, which comprises a volitional component (American Law Institute: Model Penal Code, 1962).
While a psychopathic disorder is grounds for a treatment sentence in England and Wales, it is not the case in most common-law jurisdictions. In Scotland, for example, despite the existence of a specific legal category allowing the commitment of people with a psychopathic disorder, there are, in practice, very few that are detained (Darjee & Crichton, 2003; Gunn et al., 2013). In Canada, personality disorders do not qualify for a defense of not criminally responsible (Sparr, 2009) and, as a general rule, they do not qualify either in Australia and the United States; although the fact that states are autonomous on this matter gives rise to exceptions and ambiguities (Greenberg & Felthous, 2007). Personality disorders are excluded in the American states that have adopted the ALI test, as well as in a handful of other states, including Arizona, Colorado, California, New Mexico, and Oregon (Greenberg & Felthous, 2007). In New Zealand, the Mental Health Act excludes personality disorders, but this may differ in practice (Brinded, 2000). Most jurisdictions do not restrict the mental disorder defense to serious or violent offenses; however, in many countries the forensic populations are comprised mainly of people who have committed violent offenses (e.g., New Zealand, South Africa, India, Zimbabwe: Chadda, 2013; Marais & Subramaney, 2015; Mellsop et al., 2016; Menezes, Oyebode, & Haque, 2009; Skipworth, Brinded, Chaplow, & Frampton, 2006; Strydom et al., 2011), but this is not reflected in the forensic populations of other countries (e.g., Canada: Crocker, Nicholls, Seto, Charette, et al., 2015b).
Dispositions available to the accused found not criminally responsible due to mental disorder vary from absolute discharge to hospital detention. In several American states a treatment order is mandatory (Bureau of Justice Statistics, 2004). In England and Wales, forensic services may be provided for individuals with personality disorders or mental impairments who have been found guilty of an offense and sentenced to mandatory treatment, known as a hospital order (Salize et al., 2005). Some jurisdictions adapt the dispositions to the seriousness of the offense. In the Australian Capital Territory, for example, if the offense is serious (i.e., involving actual or threatened violence or endangering life) the court must give a custodial order. If the offense is minor, the court can make other orders, as appropriate (Williams, 2000).
#### Civil-Law Countries
Napoleonic Code legal family . Criminal irresponsibility owing to a mental disorder exists as a legal concept in most countries belonging to the Napoleonic Code legal family. The criterion for criminal responsibility is not entirely dissimilar to the M’Naghten rule, with most countries adopting a variation that includes a volitional prong (Folino et al., 2000; Salize et al., 2005; Taborda et al., 2000; Téllez, Arboleda-Flórez, Ortiz, & Navarro, 2004).
Personality disorders are excluded from the insanity defense in France and in Italy, but they are accepted, with different levels of success, in Belgium, Luxembourg, Brazil, Portugal, and Spain (Salize et al., 2005; Taborda, 2001). In terms of offense, the index offenses are mostly severe and against a person in Italy and Brazil (Russo, Salomone, & Della Villa, 2003; Taborda et al., 2000).
In France, offenders found not criminally responsible on account of mental disorder who are not considered a risk to society can be committed through an ‘admission en soins psychiatriques à la demande d’un tiers’ placement. If they are considered socially dangerous, they will receive an ‘hospitalisation d’office’ placement, which requires mandatory assessment prior to release (Salize et al., 2005). Similarly, countries such as Portugal detain all convicted mentally ill offenders lacking criminal responsibility in specialized facilities (e.g., forensic units: Cartuyvels, Champetier, & Wyvekens, 2010; Salize et al., 2005). Brazil and Chile offer outpatient treatment to mentally ill offenders who are not considered harmful, in replacement of inpatient forensic detention (Cid, 2010; Taborda et al., 2000). In Spain, forensic patients may be placed under security arrangements, such as being detained in a psychiatric penitentiary hospital (Salize et al., 2005).
Germanic legal family . In Germany, mentally disordered accused persons can be considered not criminally responsible if they are “incapable of recognizing the injustice of the criminal act or unable to act according to this insight” (Müller-Isberner, Freese, Jöckel, & Gonzalez Cabeza, 2000). Austria, Switzerland, and Greece have also adopted a test based on cognition and volition (Code pénal suisse, 1937; Salize et al., 2005; R. J. Simon & Ahn-Redding, 2006; Tătaru et al., 2010). In Austria and Germany, mentally ill offenders with lack of criminal responsibility will be acquitted; however, if they are still dangerous due to their illness they will receive a criminal commitment (Edworthy et al., 2016; Schanda, Ortwein-Swoboda, Knecht, & Gruber, 2000). In Switzerland, mentally ill offenders are also acquitted but they can be given a hospital disposition only if (1) there was a direct connection between the illness and the offense; (2) they are at high risk of relapse; (3) their disorder is treatable; and (4) their prognosis is likely to improve with treatment. If they are not socially dangerous, the treatment may take place on an outpatient basis (Graf & Dittmann, 2007). In Greece, if the person is a danger to the public they will receive guardianship in a public hospital (Salize et al., 2005).
Severe personality disorders are included in the insanity defense in Germany, Austria, and Greece. In Germany, nearly 37 percent of the patients in forensic psychiatric hospitals have a primary diagnosis of personality disorder (Konrad, 2005), and around 85 percent have committed a serious offense (Müller-Isberner et al., 2000). In Austria, 40 percent of people found NGRI had committed an offense of homicide or severe bodily injuries (Schanda et al., 2000).
Nordic legal family . Denmark and Sweden are similar in that criminal responsibility does not exist as a legal concept. Rather, the mental state at the time of the offense is taken into consideration at the time of the sentencing (Taylor et al., 2013). In Iceland, the mentally disordered offender is found innocent (Pálsson, n.d.). The Norwegian legal system adopts a medical principle where the mere presence of psychosis at the time of the offense is sufficient to find an offender not criminally responsible (Måseide, 2012). In Finland, a person cannot be held criminally responsible if they were unable to understand the nature of the act or to control their behavior. Dispositions that are available for mentally ill offenders vary according to the risk they pose to society and the severity of the offense. In Denmark, a mentally ill offender found guilty can be given psychiatric treatment on an outpatient basis, on an inpatient basis, or as a patient in a psychiatric maximum-security institution, depending on whether they are given a treatment order or a placement order, 6 whereas in Sweden offenders are sentenced to forensic care with most (about 80 percent) requiring a special assessment prior to discharge. In Finland, after an offender is found not criminally responsible, the jurisdiction passes on to the Authority for Medico-Legal Affairs (TEO), which issues a treatment order (Salize et al., 2005).
Finland excludes personality disorders from the mental disorder defense, and Denmark excludes them from the possibility of receiving a special provision (Kramp & Gabrielsen, 2009; Salize et al., 2005). In Sweden, where all are criminally responsible, an offender with a personality disorder may be sentenced to forensic care; however, efforts have been taken to reduce the number of offenders sentenced to forensic treatment (Belfrage & Fransson, 2000). In practice, almost all forensic psychiatric examinations in Finland take place for serious violent crimes (Eronen, Repo, Vartiainen, & Tiihonen, 2000).
Other civil-law jurisdictions . Criminal responsibility is a legal concept in the Netherlands, China, Taiwan, and Japan, although it is rarely used in Japan due to the principle of discretionary prosecution (Every-Palmer et al., 2014; Fujii et al., 2014; Hu, Yang, Huang, & Coid, 2011; Mellsop et al., 2016). While China, Taiwan, and Japan have adopted the cognition and volition prongs that are widespread in the civil-law tradition, the Netherlands does not have a standard for legal insanity (Radovic, Meynen, & Bennet, 2015). TBS-orders (disposals to be involuntarily admitted to a specialized maximum-security hospital on behalf of the state: de Ruiter & Hildebrand, 2003) are available to mentally ill offenders in the Netherlands who have committed a serious and violent offense and who are dangerous to others. Other offenders, whose offense was less severe but are still dangerous to themselves or others, are given a hospital order and admitted to forensic psychiatric hospitals or general psychiatric hospitals (de Ruiter & Hildebrand, 2007; Salize et al., 2005). In Japan, mentally ill offenders can be hospitalized, given outpatient treatment or released, while in Taiwan they will be put in criminal custody if they are a threat to public safety, which can translate into detention in a mental or general hospital, in charity group facilities, or under the next of kin (Every-Palmer et al., 2014). Two-thirds of mentally ill offenders in China are released to the family, who will be responsible for the arrangement and supervision of the treatment, although outpatient and inpatient treatment orders are also available (Gao, Reid, & Li, 2011; Hu et al., 2011; Wang et al., 2007; Zhao & Ferguson, 2013).
The Netherlands accepts personality disorders for the insanity defense, and about 80 percent of patients under a TBS-order have been diagnosed with a personality disorder as a primary or comorbid diagnosis (de Ruiter & Hildebrand, 2003; Salize et al., 2005; van Beek & Kröger, 2007). In China, personality disordered offenders are excluded from the defense. In Japan, offenders with personality disorders are not excluded from the insanity defense, but they are rarely successful, comprising only 1 percent of individuals under inpatient treatment order (Fujii et al., 2014; Kuo, 1983; Zhao & Ferguson, 2013).
The insanity defense is used for severe offenses against a person in the Netherlands, in Japan, and in China (Edworthy et al., 2016; Every-Palmer et al., 2014; Zhao & Ferguson, 2013). A study found that 57 percent of a Chinese cohort of persons found not criminally responsible had committed or attempted to commit murder (Wang, Livingston, Brink, & Murphy, 2006). In the Netherlands, for a judge to impose a TBS-order the offense committed must result in an imprisonment sentence of at least four years in cases where the offender is fully responsible (Edworthy et al., 2016).
#### Former Communist Countries
Criminal responsibility is a legal concept in many former Communist countries (Ciszewski & Sutula, 2000; Douw et al., 2015; Every-Palmer et al., 2014; Margetić, Ivanec, Zarković Palijan, & Kovacević, 2012; Mellsop et al., 2016; Ruchkin, 2000; R. J. Simon & Ahn-Redding, 2006; Tătaru et al., 2010; Vevera et al., 2009). Most of these countries have criteria that contain a cognitive and a volitional prong, such as in Russia, Poland, Hungary, and Bulgaria (Ciszewski & Sutula, 2000; Ruchkin, 2000; R. J. Simon & Ahn-Redding, 2006). In Croatia, offenders with a primary diagnosis personality disorder do not generally have access to the insanity defense (Margetić et al., 2012; R. J. Simon & Ahn-Redding, 2006).
Dispositions available to mentally ill offenders found not criminally responsible are usually comprised of some variations of inpatient treatment, although Russian and Bulgarian courts may also order outpatient compulsory psychiatric treatment (Ruchkin, 2000; Tătaru et al., 2010). In Croatia, an offender found not criminally responsible will be sent to a forensic hospital and treated under the civil law (Margetić et al., 2012). In Poland, the offender will be detained in a psychiatric hospital under a ‘protective measure’ if the offense is considered seriously socially harmful and the risk of recidivism is high (Ciszewski & Sutula, 2000). In the Czech Republic, offenders who are socially dangerous will receive ‘forensic protective treatment’ (Vevera et al., 2009).
#### Islamic Law Countries
Criminal responsibility as a legal concept is present in many Islamic countries, but little information is available on the exact processing and treatment of individuals (El Hamaoui, Moussaoui, & Okasha, 2009; Elsayed, Al-Zahrani, & Rashad, 2010; Milner, 1966; Muslim & Chaleby, 2007; Qureshi, Al-Habeeb, & Koenig, 2013). In Iraq, the insanity defense is primarily used for offenses punishable by death and is primarily used for people with schizophrenia (Muslim & Chaleby, 2007).
#### Common-Law Countries
The availability of diminished responsibility for offenses other than homicide is not widespread in the common-law legal system. Generally, a plea of diminished responsibility can be effective when the defendant argues that, while they did commit the offense, they should not be held fully criminally liable owing to the partial impairment of their mental state (Every-Palmer et al., 2014). Since the only sentence available for murder in many common-law jurisdictions is life imprisonment, reducing the category of crime from murder to manslaughter allows to impose a lighter sentence to those whose mental disorder played a substantial role in their offense (Salize et al., 2005).
#### Civil-Law Countries
Napoleonic Code legal family . Diminished responsibility is available in many countries within this legal system, which typically results in a diminished sentence (Davidson, 2015; Salize et al., 2005; St. Denis, 2008). In addition to diminished responsibility, Portugal has three other levels of responsibility: full responsibility, slightly diminished responsibility, and lack of responsibility. In Italy, two options are available following a finding of diminished responsibility: (1) the sentence can be mitigated by one-third, or (2) the offender can receive inpatient treatment for half the period imposed if they completely lacked responsibility and then serve the remaining half in prison. In Spain, judges can also order a forensic placement prior to the imprisonment, but, in the event that the forensic placement yields good results, the imprisonment can be suspended. There is variability with respect to whether forensic treatment occurs before (e.g., Italy, Portugal), during (e.g., Luxembourg, Spain), or after (e.g., France) a person’s imprisonment.
Germanic legal family . In Germany, diminished responsibility may result in a sentence of incarceration and indeterminate treatment if the offense was serious and the criminal acts were symptomatic of the disorder. The time spent in hospital is set against the imprisonment sentence (Edworthy et al., 2016; Müller-Isberner et al., 2000; Salize et al., 2005). Similarly, in Switzerland a mentally ill offender with reduced responsibility will receive a decreased sentence and possibly a hospital dis-position (Graf & Dittmann, 2007). In Greece, the offender will be detained in a forensic hospital or imprisoned if they are dangerous to the public; however, their sentence will be reduced (Salize et al., 2005; Tătaru et al., 2010).
Nordic legal family . In Finland, a mentally ill offender found to have diminished criminal responsibility will receive a sentence reduced by 25 percent, and cannot receive a life sentence; however, treatment cannot be imposed by the court (Eronen et al., 2000; Salize et al., 2005).
Other civil-law jurisdictions . The Netherlands has five levels of criminal responsibility; ‘partially’ responsible offenders can receive a TBS-order if the severity of the offense and the risk to society justifies it, often in addition to a prison sentence. The forensic care most often takes place after the imprisonment and, while the time spent in an institution can be counted toward the imprisonment sentence, the offender must serve at least one-third of their sentence (de Ruiter & Hildebrand, 2007; Salize et al., 2005). In China and Japan, the offender will receive a lighter sentence or compulsory treatment (Every-Palmer et al., 2014; Fujii et al., 2014; Hu et al., 2011; Mellsop et al., 2016). In Taiwan, they can receive criminal custody after their prison term or be granted pardon (Every-Palmer et al., 2014).
#### Former Communist Countries
In Russia, diminished responsibility may be argued when an individual was not able, on account of mental disorder, to completely realize the nature of his or her actions or to completely control them. In this situation, the court must take into account the mental disorder when ordering a sentence, and, if they are still considered a danger to others or to themselves, they may receive an outpatient treatment order (Ruchkin, 2000). In Poland, mentally ill offenders with seriously limited accountability may receive lighter penalties, but may only receive treatment in prison (Ciszewski & Sutula, 2000). In the Czech Republic, individuals with diminished responsibility will be sentenced to both prison and forensic protective treatment, with the forensic care occurring most often after the imprisonment (Vevera et al., 2009).
#### Common-Law Countries
Discharge from hospital following treatment in forensic institutions may be the responsibility of various entities and is more or less centralized, depending on the jurisdiction. On one end of the spectrum, the discharge of mentally ill offenders requires ministerial assent (e.g., New Zealand, several Australian states: Brinded, 2000; Mullen & Chettleburgh, 2002). On the other end of the spectrum, this responsibility lies with the treating psychiatrist or hospital, sometimes unless the offense was serious or violent (e.g., England: Salize et al., 2005). The responsibility for making discharge decisions may also rest with the courts or administrative tribunals (e.g., Canada, Ireland, Israel; see Table 1.2 for a review: Bauer, Rosca, Grinshpoon, Khawalled, & Mester, 2005; Every-Palmer et al., 2014; Gordon, Kirchhoff, & Silfen, 1996; Hands, 2007; Queensland Government, 2012; Salize et al., 2005).
The duration of detention also varies across jurisdictions; it can be indefinite or fixed. In some jurisdictions, such as Ireland and some Australian states and territories (Hands, 2007; Hunyor, 2012; O’Donahoo & Simmonds, 2016; Salize et al., 2005), the length of the hospitalization is related to the seriousness of the offense. For example, a nominal term based on the maximum imprisonment sentence possible for the same offense may be set to prevent arbitrary and indefinite detention. The review of detention occurs most often every six months in the common-law legal system (Bauer et al., 2005; Brinded, 2000; Every-Palmer et al., 2014; Salize et al., 2005; Sarkar & Dutt, 2006). In Canada, however, the detention must be reviewed at least every year, every three years if the offender is designated a ‘highrisk accused.’
#### Roman Law Countries
Napoleonic Code legal family . Discharge can be the responsibility of the court (e.g., Spain, Portugal, Brazil, Argentina: Salize et al., 2005; R. J. Simon & Ahn-Redding, 2006; Taborda et al., 2000) or of special commissions or committees (e.g., Belgium, Luxembourg: Salize et al., 2005). There is variation within this group of countries regarding whether the length of hospitalization should be related to the severity of the offense or to the treatment needs and safety issues. In Italy, the severity of the crime determines the minimum duration of the hospitalization. However, if the individual is no longer considered dangerous it is possible to transform the order into an outpatient treatment order or even to revoke it (Traverso, Ciappi, & Ferracuti, 2000). In Brazil, the judge imposes a minimum duration to the treatment, regardless of what the most appropriate interventions are, but a maximum duration is not imposed (Taborda, Folino, & Salton, 2007). In Portugal, the placement for treatment is time-limited and the duration is established based on the diagnosis, the severity of the offense, and the clinical needs of the individual (Salize et al., 2005).
Germanic legal family . In countries belonging to the Germanic legal family, the discharge decisions are most often made by a court. The hospital order tends to be unlimited in time (e.g., Austria, Germany, Switzerland: Edworthy et al., 2016; Graf & Dittmann, 2007; Müller-Isberner et al., 2000; Schanda et al., 2000). In Germany, the length of the commitment must be related to the severity of the offense: the patient’s right to be released intensifies as the length of hospitalization increases (Müller-Isberner et al., 2000). In Greece, the court will establish a minimum duration, and the hospitalization will not be allowed to continue beyond 10 years for misdemeanors or 15 years for felonies (Salize et al., 2005).
Nordic legal family . In Denmark, the decision to discharge rests with the treating psychiatrist for cases in which the accused received a treatment sanction instead of a placement sanction (in which case the decision rests with the court); the same is true in Finland, although the decision must be approved by the Authority of Medico-Legal Affairs (the TEO: Kramp & Gabrielsen, 2009; Sestoft & Engberg, 2000). A court must make discharge decisions in Iceland and in Sweden, where, if the accused were considered to pose a risk to society at the time of the verdict, they may only be released after trial in a county administrative court (Sigurjónsdóttir, n.d.; Silfverhielm, 2005). The duration is unlimited in Denmark, Finland, and Norway (Eronen et al., 2000; Kleve, 1996; Sestoft & Engberg, 2000).
Other civil-law jurisdictions . A court is responsible for discharges in the Netherlands and in Japan, but the treating psychiatrist decides with approval from the local police station in China (de Boer & Gerrits, 2007; de Ruiter & Hildebrand, 2003; Edworthy et al., 2016; Fujii et al., 2014; Hu et al., 2011). In the Netherlands, a TBS-order is initially imposed for two years and may be extended for one or two years at each reassessment. When the risk of recidivism has decreased to an acceptable level, the TBS-order must be terminated. After six years of detention, a forensic report written by two independent experts must be submitted to inform the court of the individual’s mental state and risk of recidivism (de Ruiter & Hildebrand, 2007; Edworthy et al., 2016; Salize et al., 2005). In Taiwan, the maximum duration of criminal custody for offenders found not criminally responsible is five years (Every-Palmer et al., 2014). The treatment order is unlimited in China, but the average stay is one to three months before they are released under the care of their family (Chen, Ou, & Wang, 2013; Topiwala, Wang, & Fazel, 2012).
#### Former Communist Countries
The decision to discharge from forensic services belongs to the court in Russia and Poland (Ciszewski & Sutula, 2000; Ruchkin, 2000; Vevera et al., 2009). In Russia, the duration of the detention is restricted to the duration of the sentence. In Croatia, it depends on the mental state of the patient, with the maximum duration of treatment not exceeding the upper limits of imprisonment unless there is a serious risk of recidivism. In Ukraine, the duration of treatment is mostly related to the nature of the offense instead of the patient’s mental state or social risk (Douw et al., 2015; Margetić et al., 2012; Ruchkin, 2000). The duration of forensic treatment is unlimited in Poland and the Czech Republic (Ciszewski & Sutula, 2000; Vevera et al., 2009).
#### Europe and the United Kingdom
In England and Wales, forensic services are organized by level of security and are provided by the National Health Service (NHS) or the private sector. Hospitals and wards are not divided into forensic and nonforensic; as such, offenders and aggressive nonoffenders may be treated on the same wards. There are three high-security hospitals (sometimes called ‘special hospitals’). They provide services to individuals who are formally detained under the mental health legislation and who present a grave and immediate danger to the public (McMurran, Khalifa, & Gibbon, 2009). Medium-security units receive patients who present a risk to others. Patients who have committed minor offenses are treated in general psychiatric hospitals, where about 3,700 beds belong to the NHS (National Health Service, 2013). Forensic services are delivered through five distinct forensic care pathways, which have been developed in order to ensure that patients’ needs are met at the right time and that care decisions are evidence-based (Care Pathways and Packages Project, 2009).
In Ireland, forensic services are organized by levels of risk and security, and admit mentally ill offenders and nonoffenders. High-security forensic units provide treatment to patients who pose a grave and immediate danger to others. The National Forensic Mental Health Service (NFMHS) is based at the Central Mental Hospital Dublin, with a capacity of about 90 secure beds, some of which are available to women offenders, distributed across three levels of security. Other mentally ill offenders may be treated in psychiatric centers and in district or private psychiatric hospitals. Regional forensic mental health teams are established to support continuity of care. Housing support is put in place by the NFMHS recovery and rehabilitation team, as patients first move to a low-security hostel situated near the Central Mental Hospital (Mental Health Commission, 2006; O’Neil, 2012; Salize et al., 2005; Taylor et al., 2013).
In Scotland, forensic services are also organized by level of security and are provided by the National Health Service (NHS), under the coordination of the Forensic Mental Health Services Managed Care Network. Offenders and nonoffenders are treated on the same wards. High-security services, for those who present a grave and immediate danger to others, are provided nationally at the State Hospital in Carstairs (Forensic Network, 2016; McMurran et al., 2009; Thomson, 2016). Medium-security services, for patients who pose a serious but less imminent danger to others, are delivered regionally (Crichton et al., 2004; Forensic Network, 2016; Thomson, 2016). Finally, low-security services and community services are offered locally. Women requiring high-security services are transferred to England and are detained at Rampton Hospital, while women requiring medium-security services may be treated at the Rowanbank Clinic and at the Orchard Clinic.
#### Australasia and North America
In Australia, the jurisdiction of mental health services belongs to each state and, hence, the organization of forensic services varies from one region to the next. For example, New South Wales’s forensic facilities are under the authority of the Justice and Forensic Mental Health Network. Forensic services are delivered in correctional, inpatient, and community settings with one high-security facility as well as medium-security facilities that are operated by local health districts (Mental Health Coordinating Council, 2015). In South Australia, forensic services are delivered in a forensic hospital by Forensic Mental Health Services, a component of the Statewide Mental Health Service, but all patients are under the administrative control of the Department of Correctional Services (Jager, 2001). In Victoria, Forensicare 7 provides forensic psychiatric services at the Thomas Embling Hospital (Jager, 2001; Mullen et al., 2000). Continuity of care is ensured by transferring discharged service users to the Community Forensic Mental Health Services, where they receive assertive follow-up and the support of a case manager for approximately two to three years (O’Donahoo & Simmonds, 2016). In the Australian Capital Territory, forensic mental health services are under the responsibility of the Corrections Health Board and they are provided in dedicated, secure beds of a psychiatric unit. In the Northern Territory, inpatient forensic services are primarily delivered within the prison system (Jager, 2001).
In New Zealand, forensic services are decentralized, regionally configured, with no overarching organization and are entirely integrated to civil mental health services. All regions provide medium-security services and most also operate lowsecurity units. Most of these forensic services offer outpatient services for those that have been discharged but are not ready yet to be transferred to general mental health services, with the exception of Auckland Regional Forensic Service, which transfers discharged service users to general mental health services with liaison services from the forensic system (Brinded, 2000; Ministry of Health, 2007).
Canada is much like Australia, in that there is no national structure of forensic services and the organization of forensic and general mental health is a provincial or territorial responsibility and part of the public health system (Crocker, Nicholls, Seto, Charette, et al., 2015a; Livingston, 2006). In addition to their core services, most forensic services also offer support and treatment to mentally disordered offenders in provincial prisons. 8 Models for organizing forensic services in Canada vary from a highly centralized, integrated network of forensic mental health services in British Columbia (BC Mental Health & Substance Use Services, 2013; Livingston, 2006), to a small number of dedicated forensic facilities in Ontario to highly distributed regional services in Québec (Crocker, Nicholls, Côté, Latimer, & Seto, 2010). All provinces have a high-security facility, or forensic units in psychiatric hospitals for less populous provinces. Supportive housing is available but limited across the country (Livingston, Wilson, Tien, & Bond, 2003; Salem et al., 2015).
In the United States, forensic service provision varies widely from one state to the other; however, they are all part of the public mental health systems. A survey conducted by the National Association of State Mental Health Program Directors indicates that approximately two-thirds of the states have a dedicated forensic facility, with the remaining states treating forensic patients in either forensic or nonforensic units located in general psychiatric facilities. Eighty percent of states have established conditional release programs that aim to facilitate the reentry and reintegration of forensic service users into the community (Fitch, 2014).
#### Asia
Many Asian countries have a number of dedicated forensic beds in psychiatric hospitals or forensic inpatient units (World Health Organization, n.d.). Hong Kong’s forensic services are under the authority of the Department of Forensic Psychiatry. Inpatient treatment is delivered in forensic wards and a Community Reintegration Unit offers predischarge services to ensure successful community reintegration for mentally ill offenders. Community services for discharged forensic service users are provided by forensic outpatient clinics, forensic community services, and a multiactivity center (Every-Palmer et al., 2014). In India, patients found not guilty by reason of insanity may be detained in ‘safe custody,’ which most often results in being detained in a prison, but sometimes includes detention in a psychiatric hospital or under the charge of family members. In Bangalore, forensic inpatient treatment is delivered in a male forensic psychiatric ward embedded within the National Institute of Mental Health and Neurosciences in Bangalore, or in psychiatric hospitals, where forensic and civil psychiatric patients are treated together (Kumar et al., 2014; Sarkar & Dutt, 2006). In Israel, forensic services are provided by four departments of a designated maximum secure unit of the Sha’ar Menashe Mental Health Center; there are no medium- or low-security units (Bergman-Levy, Bleich, Kotler, & Melamed, 2010). In Pakistan, some psychiatric hospital beds are dedicated to forensic patients, but they are distinct from general psychiatric services and administrated by the prisons (Hassan et al., 2015). In Singapore, the Institute of Mental Health Department of Forensic Psychiatry (originally named Woodbridge Hospital), under the authority of the Ministry of Health, receives mentally disordered offenders (Chan & Tomita, 2013; Every-Palmer et al., 2014). Information for Bangladesh, Kyrgyzstan, and Myanmar is provided in Table 1.3.
### Table 1.3 Forensic service Provision by Country
Countries and Their Adult Resident Population Estimates (18 and Over, Unless Specified)
Location of Forensic Services
Forensic Beds
Forensic Beds per 100,000 Adult Population Rate
Americas and the Caribbean
Argentina (30,173,000 in 2015)
Forensic hospitals or psychiatric hospitals
150 (2015)
0.5 a
Barbados (223,000 in 2010, 15+)
Psychiatric hospital
80 (2009)
35.9 b (15+)
Brazil (134,466,000 in 2010)
Forensic hospitals and units, psychiatric hospitals, prisons
3,677 (2015)
2.7 a
Canada (26,579,000 in 2011)
Province-specific (at least one high-security forensic psychiatric hospital per province or a secure unit in psychiatric hospitals for smaller provinces)
1,523 (2006)
5.7 a , c
Chile (12,774,000 in 2012)
Forensic units
209 (2012)
1.6 b
Cuba (8,885,000 in 2011)
Forensic units of psychiatric hospitals
205 (2011)
2.3 b
Ecuador (9,086,000 in 2010)
Forensic units
42 (2008)
0.5 b
El Salvador (4,081,000 in 2014)
No forensic hospital
40 (2015)
1.0 a
Guatemala (8,393,000 in 2010, 15+)
Forensic unit in psychiatric hospital
36 (2011)
0.4 b (15+)
Jamaica (1,820,000 in 2011)
Forensic units
n/a
13.0 d (2009)
Mexico (73,110,000 in 2015)
Forensic hospitals or forensic beds in prison
1,096 (2015)
1.5 a
Paraguay (2,898,000 in 2002)
Prison mental health facilities
45 (2006)
1.6 b
Peru (17,399,000 in 2007)
Primarily in prison, also in psychiatric hospitals
42 (2015)
0.2 a
Trinidad and Tobago (998,000 in 2011)
Psychiatric hospital
58 (2007)
5.8 b
United States (Data available for 32 states: 138,079,000 in 2015)
State-specific (dedicated forensic facility in most or forensic or non-forensic units)
7,835 (2015)
5.7 a
Uruguay (2,585,000 in 2015)
Psychiatric hospitals
191 (2015)
7.4 a
Europe
Austria (6,614,000 in 2005)
Forensic hospital, forensic departments in psychiatric hospitals or closed wards of psychiatric hospitals
384 (2005)
5.8 a
Belarus (7,745,000 in 2009)
n/a
n/a
6.4 (2009, crude population) 7.9 e (estimated, adult population)
Belgium (8,229,000 in 2004)
Psychiatric units in prisons, institutions of social defense or civil psychiatric hospitals
400 (2005)
4.9 a
Bulgaria (6,375,000 in 2005)
Security hospital or locked wards of psychiatric hospitals
80 (2005)
1.3 a
Croatia (3,495,000 in 2008)
Forensic departments
n/a
7.8 (2008, crude population) 9.6 e (estimated, adult population)
Czech Republic (8,577,000 in 2009)
Psychiatric hospitals or prisons
n/a
3.5 (2009, crude population) 4.3 e (estimated, adult population)
Denmark (4,353,000 in 2011)
Forensic units or psychiatric hospitals
361 (2011)
8.3 a
England and Wales (44,812,000 in 2013)
Secure hospitals
795 High secure 3,192 medium secure (2013)
HS: 1.8 MS: 7.1 a
Finland (4,338,000 in 2013)
Psychiatric hospitals, some of which have a forensic ward
450 (2013)
10.4 a
France (48,410,000 in 2005)
Secure units in psychiatric hospitals or psychiatric hospitals
486 (2005)
1.0 a
Germany (67,596,000 in 2013)
Forensic hospitals and psychiatric hospitals, with or without forensic department
10,471 (2013)
15.5 a
Greece (9,109,000 in 2005)
Forensic hospital or psychiatric hospital (also prison for women)
250–330 (estimate, 2005)
2.7–3.6 a
Hungary (8,185,000 in 2009)
n/a
n/a
1.9 (2009, crude population) 2.3 e (estimated, adult population)
Iceland (237,000 in 2010)
Forensic hospital or psychiatric units
7–8 (2010)
3.0–3.4 a
Ireland (3,440,000 in 2011)
Forensic facilities and psychiatric facilities
89 (2006)
2.6 a
Latvia (1,769,000 in 2009)
Forensic units
n/a
0.7 (2009, crude population) 0.9 e (estimated, adult population)
Macedonia (1,591,000 in 2009)
Psychiatric hospitals
123 (2009)
7.7 b
Netherlands (13,154,000 in 2011)
Forensic facilities (TBS-hospitals or forensic hospitals) or forensic units in psychiatric hospitals
1,867 (2013)
14.2 a
Norway (3,983,000 in 2014)
Secure units administered by counties and health regions
180 (2014)
4.5 a
Poland (30,825,000 in 2009)
Psychiatric wards or secure institutions
n/a
3.8 (2009, crude population) 4.7 e (estimated, adult population)
Portugal (8,532,000 in 2005)
Forensic units, often attached to psychiatric hospitals
189 (2005)
2.2 a
Romania (17,506,000 in 2009)
Psychiatric hospitals or penitentiary psychiatric hospital
n/a
7.2 (2009, crude population) 8.8 e (estimated, adult population)
Russia (116,486,000 in 2012)
Secure hospitals and psychiatric hospitals
5,440 high secure 6,582 medium secure (2014)
HS: 4.7 MS: 5.7 a
Scotland (4,293,000 in 2015)
Secure hospitals
140 high secure 160 medium secure (2016)
HS: 3.3 MS: 3.7 a
Slovenia (1,685,000 in 2009)
n/a
n/a
1.2 (2009, crude population) 1.4 e (estimated, adult population)
Spain (35,630,000 in 2005)
Psychiatric penitentiary hospitals
593 (2005)
1.7 a
Sweden (7,564,000 in 2011)
Forensic facilities, psychiatric facilities, or general hospitals
1,113 (2011)
14.7 a
Switzerland (5,973,000 in 2005)
Forensic facilities or prisons
n/a
1.3 (2005, crude population) 1.6 f (estimated, adult population)
Ukraine (37,382,000 in 2013)
Secure hospitals, psychiatric hospitals
709 high-security (2015)
1.9 a
Asia
Armenia (2,323,000 in 2011)
Forensic unit in psychiatric hospital
60 (2009)
2.6 b
Azerbaijan (6,286,000 in 2009)
Forensic unit
n/a
3.6 (2009, crude population) 5.1 e (estimated, adult population)
Bahrain (943,000 in 2010)
Forensic unit in psychiatric hospital
18 (2010)
2.0 b
Bangladesh (94,162,000 in 2011, 15+)
Forensic unit
15 (2007)
0.02 b (15+)
China (1,054,898,000 in 2010)
Ankang hospitals, run by the public safety system
7,000 (2012)
0.7 a
Hong Kong (6,437,000 in 2014, 15+)
Forensic wards in psychiatric hospital
220 (2016)
3.4 a (15+)
Iraq (28,750,000 in 2006, total population)
High-security unit of psychiatric hospital
250 (2006)
0.9 b (per total population)
Israel (4,793,000 in 2007)
Maximum-security unit of psychiatric hospital
200 (2007)
4.2 a
Japan (107,438,000 in 2011)
Forensic units
666 (2011)
0.6 a
Jordan (2,863,000 in 2004)
Forensic unit in psychiatric hospital
78 (2011)
2.7 b
Korea (36,201,000 in 2005)
Forensic units
1,000 (2006)
2.8 b
Kyrgyzstan (3,382,000 in 2009)
Special forensic facilities and psychiatric hospitals
249 (2008)
7.4 b
Myanmar (33,126,000 in 2014)
Forensic units
120 (2006)
0.4 b
Oman (1,387,000 in 2003)
Psychiatric hospital and prison
5 (2008)
0.4 b
Pakistan (87,509,000 in 2007, 15+)
Psychiatric hospitals administered by prisons
n/a
0.02 d (2009)
Philippines (55,720,000 in 2010)
Psychiatric hospital
400 (2007)
0.7 b
Saudi Arabia (21,199,000 in 2014)
Forensic units
50 (2013)
0.2 a
Singapore (2,959,000 in 2010)
Forensic hospital
140 (2013)
4.7 a
Sudan (19,709,000 in 2015)
Prison medical facilities
200 (2009)
1.0 b
Tajikistan (4,357,000 in 2010)
Forensic units
25 (2009)
0.6 b
Uzbekistan (19,932,000 in 2013)
Psychiatric hospitals
890 (2007)
4.5 b
Vietnam (59,617,000 in 2009)
Forensic units
300 (2006)
0.5 b
Oceania
Australia (18,205,000 in 2014)
State-specific
616 (2013–14) a
3.4 g
New Zealand (2,974,000 in 2006)
Forensic units
221 (2005)
7.4 a
Africa
Ghana (13,627,000 in 2010)
Psychiatric hospital or general hospital
79 (2011)
0.6 b
Nigeria (104,268,000 in 2006, 15+)
Forensic units or prisons
22 (2006)
0.02 b (15+)
South Africa (36,670,000 in 2011, 15+)
Forensic wards in psychiatric hospitals
1,676 (2007)
4.6 b (15+)
Tunisia (8,372,000 in 2014, 15+)
Psychiatric hospital
60 (2008)
0.7 b (15+)
Uganda (14,267,000 in 2002)
Psychiatric hospital
116 (2006)
0.8 b
Zambia (6,222,000 in 2010)
Psychiatric hospital
120 (2009)
1.9 a
Notes
Notes:
n/a indicates that the information was unavailable. When multiple sources of information were available for a country, the most recent was used. Adult population estimates were retrieved or calculated from governmental websites, the united nations statistics Division, or the organisation for economic Co-operation and Development.
a total number of beds was retrieved from various sources (Almanzar et al., 2015; Bergman-levy et al., 2010; Bjørkly, Hartvig, roaldset, & singh, 2015; Chan & tomita, 2013; Department of Mental Health and substance Abuse – World Health organization, n.d.; Douw et al., 2015; edworthy et al., 2016; every-Palmer et al., 2014; Ilorleifsson, 2010; Koskinen, likitalo, Aho, Vuorio, & Meretoja, 2014; livingston, 2006; Mental Health Commission, 2006; Ministry of Health, 2007; nakatani, 2012; national Association of state Mental Health Program Directors research Institute, 2015; national Health service, 2013; ngungu & Beezhold, 2009; nielsen, van Mastrigt, & Wobbe, 2016; Pálsson, n.d.; Qureshi et al., 2013; salize et al., 2005; sigurjónsdóttir, n.d.; thomson, 2016; topiwala et al., 2012; World Health organization, 2005; Yee Ho & Kwan Yan, 2016) and the number of beds per 100,000 population was hand-calculated.
b total number of beds was made available by the WHO-AIMs reports on mental health systems and the number of beds per 100,000 population was hand-calculated.
c this number represents a minimum.
d the number of beds per 100,000 population was made available by the WHo-AIMs reports on mental health systems. It is not known whether this number was calculated using the adult population or the total population.
e the number of beds per 100,000 crude population was retrieved from Mundt et al. (2012). the number of beds per 100,000 adult population was estimated using the total population retrieved from the united nations statistics Division.
f the number of beds per 100,000 crude population was retrieved from Priebe et al. (2008). the number of beds per 100,000 adult population was estimated using the total population retrieved from the united nations statistics Division.
g total number of beds and beds per 100,000 population retrieved from the Australian Institute of Health and Welfare (Australian Institute of Health and Welfare, n.d.).
#### Other Common-Law Jurisdictions
In the common-law Caribbean countries, forensic services are likely to be provided in psychiatric hospitals (Maharajh & Parasram, 1999; World Health Organization, n.d.) or sometimes in a forensic unit (e.g., Jamaica). Information for Barbados and Trinidad and Tobago is provided in Table 1.3.
Forensic services are significantly underdeveloped in Africa (Ogunwale, De Wet, Roos, & Kaliski, 2012). There is variability across countries, with many having only rudimentary services provided in prisons. Some African countries have established forensic beds or units in psychiatric hospitals, with dedicated forensic institutions being instituted in South Africa and a few North African countries (Adjorlolo, Chan, & Mensah Agboli, 2016; Hooper & Kaliski, 2010; Mangezi & Chibanda, 2011; Menezes, Oyebode, & Haque, 2007; Strydom et al., 2011; World Health Organization, n.d.). Information for Ghana, Nigeria, Uganda, and Zambia is provided in Table 1.3.
According to the World Health Organization, there are no forensic facilities in the following countries: Anguilla, Antigua & Barbuda (as of 2009, four forensic patients were detained in the psychiatric hospital), Belize, Bhutan (some beds in prison medical services), British Virgin Islands (patients treated in prisons or in general hospitals), Cayman Islands (treated in prisons), Grenada, Nepal, Saint Kitts and Nevis (detained in designated prison cells), Saint Lucia, St. Maarten, and Turks & Caicos Islands.
#### Europe
The Austrian forensic system is centralized and forensic institutions are under the responsibility of the Ministry of Justice. Mentally ill offenders may be treated in a high-security forensic hospital (male only), in small forensic departments within civil psychiatric hospitals, or in closed wards of regional psychiatric hospitals. Forensic outpatient services are available after discharge in a large forensic aftercare institution in Vienna and in forensic outpatient clinics, but continuity of care depends mostly on civil psychiatric services (Salize et al., 2005; Schanda et al., 2000; Stompe, Frottier, & Schanda, 2007).
In Belgium, forensic services are federalized and, as such, there are large disparities between the organization of care in Wallonia (primarily French-speaking), and Flanders (primarily Dutch-speaking). In Wallonia, mentally ill offenders found not criminally responsible may be held in three types of institutions, without any overarching authority: psychiatric units in prison, institutions of social defense (établissement de défense sociale; EDS), and rarely used civil psychiatric hospitals for patients awaiting discharge (Cartuyvels et al., 2010). EDS are not centralized and may either be overseen by the Department of Justice or by the Department of Health (Cartuyvels et al., 2010; Cartuyvels & Cliquennois, 2015; Mary, Kaminski, Maes, & Vanhamme, 2011). In Flanders, there were no EDS until very recently, and mentally ill offenders found not criminally responsible were instead held in civil psychiatric hospitals and psychiatric units in prison (Salize et al., 2005). In 2010, it was estimated that two-thirds of forensic patients could be found in civil psychiatric wards, and the remaining third in the correctional system (Cartuyvels et al., 2010). Given this context, two EDS were planned for: one forensic institution was opened in Gand in 2014 and another is planned for 2016 in Anvers. Medium-risk patients are still handled in civil psychiatric hospitals (Cartuyvels et al., 2010; Cartuyvels & Cliquennois, 2015; “Centre de psychiatrie légale Anvers,” n.d., “Centre de psychiatrie légale Gand,” n.d.).
In Denmark, forensic services are locally-based: each county, as well as the municipalities of Copenhagen and Frederiksberg, are responsible for providing the services to their residents. Many counties treat all forensic patients within the civil psychiatric system. While some have put in place small forensic units for patients that are difficult to treat, others have large forensic facilities where most forensic patients are treated and receive outpatient services upon discharge. There is one high-security facility (Salize et al., 2005; Sestoft & Engberg, 2000). In Finland, forensic services are offered in psychiatric hospitals operated by the state or health care districts, some of which have a forensic ward. State psychiatric hospitals receive both mentally ill offenders and dangerous high-risk nonoffenders. After six months, a patient’s municipality of residence must decide whether their local health care facilities are able to continue the treatment or if they will continue paying for the offender to receive services in state psychiatric hospitals. In cases where the mentally ill offender is not considered at high risk of violence, the Authority of Medico-Legal Affairs (TEO) might send the offender directly to a local psychiatric hospital, some of which have a dedicated forensic ward. The patient will have to consult a psychiatrist of the municipal mental health center on a monthly basis for the first six months following the discharge and will then be considered a civil psychiatric patient, with no obligations, unless the TEO renews the follow-up period (Eronen et al., 2000; Salize et al., 2005).
In France, as of 2005, forensic patients may be treated in one of the four secure units in psychiatric hospitals (unités pour malades difficiles), along with dangerous nonoffenders (Salize et al., 2005). In Germany, forensic services are federalized and are thus organized differently across the country. Mentally ill offenders can generally be treated either in general psychiatric hospitals and facilities, with or without a forensic department, or in forensic psychiatric hospitals that are distinct from the civil psychiatric services (Steinert, Noorthoorn, & Mulder, 2014). Forensic hospitals receive only mentally ill offenders: aggressive or violent mentally ill nonoffenders are not treated there. When there are forensic bed shortages, forensic patients are sometimes placed in general psychiatric facilities, alongside both voluntarily placed and involuntarily placed nonoffenders. Some of these are high-security hospitals that take specifically the most serious and dangerous offenders. But, in most of the German states, a single forensic hospital comprises all levels of security (e.g., Haina Forensic Psychiatric Hospital: Edworthy et al., 2016; Kamara & Müller-Isberner, 2010). As probation conditions, the court can order a person to present themselves to outpatient treatment or receive aftercare from forensic outpatient centers. All 16 states operate forensic outpatient centers (Edworthy et al., 2016; Konrad & Lau, 2010; Müller-Isberner et al., 2000; Salize et al., 2005).
Greece has a high-security forensic psychiatric hospital in Athens for male offenders and high-risk nonoffenders detained under civil legislation; those who are judged less dangerous are held in one of the six general psychiatric hospitals with forensic beds. Women have no forensic facilities, so they are either treated in the female prison or in psychiatric hospitals. The Greek forensic setting is not considered to be integrated with the national health system (Salize et al., 2005).
In Iceland, Sogn is the only forensic psychiatric hospital; two or fewer people are sentenced to forensic care each year. It was recently administratively incorporated to the psychiatric ward of the Landsspitalinn University Hospital. As of 2010, a psychiatric hospital at Kleppur was attempting to establish a closed ward with additional beds that could serve as a low-security ward. At discharge, the court orders a strict follow-up, which may involve regular visits to the psychiatrist or medication adherence (Ilorleifsson, 2010; Pálsson, n.d.; Sigurjónsdóttir, n.d.).
Prior to 2008, there were six forensic psychiatric hospitals in Italy, with around 1,000 to 1,200 beds. They were entirely separated from the civil health system and were run, except for one, by the Ministry of Justice. In April 2008, the Italian government introduced a program to progressively downsize and/or close the forensic hospitals and to refer patients to the national health system. The forensic hospitals were closed completely in the spring of 2015, and were replaced by smaller community facilities located in each of the 20 Italian regions, each with about 20 beds that were adapted for socially dangerous offenders. Offenders who are less socially dangerous may be transferred to a civil psychiatric facility (Barbui & Saraceno, 2015; Carabellese & Felthous, 2016; Peloso, D’Alema, & Fioritti, 2014; Salize et al., 2005; Traverso et al., 2000). In Luxembourg, forensic services are highly centralized: mentally ill offenders may only be treated in the Neuropsychiatric Hospital Center in Ettelbruck. They may not be placed in general mental health institutions and they are not treated alongside nonoffenders (Salize et al., 2005).
Forensic services are federalized in the Netherlands; thus, each district has its own service system. TBS-patients may either be treated in specialized forensic facilities, such as one of the nine TBS-hospitals (as of 2005), or in one of the three forensic psychiatric hospitals, or in forensic units of general psychiatric hospitals. TBS-hospitals are under the authority of the Ministry of Justice, while forensic psychiatric hospitals are under the authority of the Ministry of Health and receive TBS-patients with psychiatric disorders (instead of personality disorders) along with high-risk nonoffenders. When TBS-patients reach later phases of their treatment, they may be detained in a forensic psychiatric unit of a general psychiatric hospital. There are also long-stay beds in the TBS sector for patients who may not realistically have a positive prognosis but who are still socially dangerous. The Netherlands has highly developed aftercare services, with each TBS hospital having a forensic outpatient clinic and sheltered accommodation for discharged forensic patients (Salize et al., 2005; van Marle, 2000).
Norway’s forensic services are highly decentralized. There are three regional secure units (Oslo, Bergen, and Trondheim) and they are considered forensic hospitals because, despite being physically integrated to civil psychiatric institutions, their organizational structures are different. In parallel, many counties have their own forensic psychiatric services. Patients can be admitted under a civil order or a criminal order (Almvik, Hatling, & Woods, 2000; Helse Bergen Haukeland University Hospital, n.d.; Kleve, 1996; Ystad, 2013). In Portugal, mentally ill offenders judged not criminally responsible must be detained in one of the five special forensic units in the country, three of which are attached to psychiatric hospitals. Mentally ill offenders and nonoffenders do not mix: there are no offenders in general facilities and there are no nonoffenders in forensic facilities (Salize et al., 2005). In Spain, forensic services are centralized in three psychiatric penitentiary hospitals. They are outside the national health system and receive both mentally ill offenders who are not criminally responsible and criminally responsible offenders whose mental illness is untreatable in prison. While discharged patients have, in theory, access to general health care resources provided by the autonomous regions, civil services are often unwilling to admit patients who require ongoing hospital treatment (Martinez-Jarreta, 2003; Salize et al., 2005).
Since criminal responsibility does not exist as a legal category in Sweden, custodial placement of mentally ill offenders depends entirely on their risk level. Mentally disordered offenders may be treated in regional forensic hospitals or general psychiatric facilities, some of which have forensic wards. Mentally ill offenders are treated alongside civilly detained nonoffenders. Six regional maximum-security forensic facilities receive high-risk offenders (i.e., one-third of all forensic patients). In some forensic hospitals, patients are rarely absolutely discharged: as long as the mental disorder at the source of the crime is still present, it is recommended that support and control be provided on an outpatient basis by the staff of the establishment (Belfrage & Fransson, 2000; Salize et al., 2005). Finally, in Switzerland, as of 2007, there are five centers for compulsory commitment and three institutions for hospitals orders (Manetsch, 2010). However, in the Romandy region, there are no forensic inpatient facilities and forensic patients are most often detained in jail or prison (Niveau & Dang, 2008).
#### South America, Central America, and the Caribbean
In Argentina, forensic services are provided either by the public health system when the unimputable 9 patients are considered low risk (Folino et al., 2000) or by the penitentiary service in one of its forensic psychiatric hospitals (Almanzar, Katz, & Harry, 2015; World Health Organization, n.d.). In the province of Buenos Aires, there are at least three institutions treating unimputable patients, one of which is dedicated to women. Another institution has been established in the province of Córdoba (J. F. Folino, personal communication, August 21, 2016). Postdischarge outpatient services are often delivered by the forensic hospital where the patient had received inpatient care (Folino et al., 2000; Taborda et al., 2007). In Brazil, forensic services differ from one region to the next, owing partly to legal differences and partly to socioeconomic differences. The 31 forensic hospitals and units in the country are not distributed uniformly and many states have no forensic facilities (Almanzar et al., 2015; Taborda et al., 2007; World Health Organization, n.d.). In the latter case, forensic patients are either detained in general psychiatric hospitals or in prisons (Taborda et al., 2007). Ties to the forensic system are severed when forensic service users receive a hospital discharge (Taborda et al., 2000). In Chile, forensic services are under the authority of the New Forensic Psychiatry Network, which comprises forensic facilities across the country, including one high-complexity forensic unit in the Philippe Pinel Hospital and three medium-complexity units in three hospitals (Cid, 2010). In less than 10 years, the number of forensic beds has increased fourfold (World Health Organization, n.d.). Information about Cuba, Ecuador, El Salvador, Guatemala, Mexico, Paraguay, Peru, and Uruguay is summarized in Table 1.3.
#### Asia
China’s organization of mental health services differs from Westernized countries. There are three groups of general psychiatric hospitals: (1) general psychiatric hospitals under the authority of the public health system; (2) civil psychiatric hospitals under the authority of the civil administration system for people with no family, legal guardian, or income (patients are often elderly, disabled people, or chronic psychiatric patients); and (3) Ankang hospitals, which are run by the public safety system for patients who pose a risk to others or themselves. While they are not forensic hospitals per se, half of admitted mentally ill offenders are treated in these Ankang hospitals, which have medium- and high-security facilities within a single hospital. Patients are rarely followed-up at discharge (Chen et al., 2013; Every-Palmer et al., 2014; Hu et al., 2011; Topiwala et al., 2012; Wang et al., 2007). In Japan, specialized forensic services have recently been developed. Prior to 2005, mentally disordered offenders found to be insane would simply be detained in general psychiatric hospitals and treated with nonoffenders. In 2005, the forensic mental health system was transformed to address the needs of mentally disordered serious offenders. These forensic patients are to be treated in a designated inpatient treatment facility that can be administered by the state, by local municipalities, or by public corporations as long as they meet the Ministry of Health and Welfare standards. Follow-up and outpatient treatment after discharge is planned by rehabilitation coordinators, who also work to transition forensic service users to the general mental health care system. This outpatient treatment usually lasts three years (Every-Palmer et al., 2014; Fujii et al., 2014; Nakatani, 2000, 2012; Nakatani, Kojimoto, Matsubara, & Takayanagi, 2010). Information for Korea, Vietnam, and the Philippines is provided in Table 1.3.
#### Africa
In Algeria, the Frantz Fanon Hospital is the designated forensic hospital, but a regionalization process has recently been taking place (El Hamaoui et al., 2009; Ogunwale et al., 2012). Information for Tunisia is provided in Table 1.3.
As published by the World Health Organization’s AIMS Report on Mental Health Systems, there are no forensic facilities in Benin, Bolivia, Burundi, Djibouti, Dominican Republic, Eritrea, Guyana, Haiti, Honduras, Laos, Lebanon, Suriname (where patients are treated in the long-stay unit of a psychiatric hospital), Panama, or Venezuela.
#### Former Communist Countries
There are forensic inpatient units and dedicated forensic beds and housing in several former Communist countries (Mundt et al., 2012; World Health Organization, n.d.). Bulgaria’s forensic services are delivered to offenders that are found not responsible in a maximum-security psychiatric hospital or on locked wards of civil psychiatric hospitals, depending on the level of dangerousness. A university forensic psychiatry unit exists in Sofia entirely dedicated to assessments. Some patients are referred to a prison with a mental health unit (Tătaru et al., 2010). The Czech Republic provides forensic services in civil psychiatric hospitals, or in prisons. In civil psychiatric hospitals, forensic patients are placed on standard wards (Vevera et al., 2009). In Croatia, mentally ill offenders found not legally responsible are sent to forensic institutions that are well integrated with the civil health care system and some supported housing services are available (Margetić et al., 2012; Mundt et al., 2012).
Poland’s forensic services are divided according to security level. Some offenders may be detained in general psychiatric wards, others who are socially dangerous may be detained in an institution with a reinforced security system, and those who are considered extremely dangerous must be treated in maximum-security wards (Ciszewski & Sutula, 2000).
In Russia, forensic inpatient services are divided into three levels: ordinary, specialized or medium-security, and specialized with intensive observation or highsecurity ‘special hospitals.’ Most offenders found not criminally responsible are placed in ordinary care, and it usually takes place in regional psychiatric hospitals, along with nonoffenders. Nearly all regional hospitals have special units for forensic inpatients. All psychiatric hospitals in Russia provide compulsory treatment to offenders. Specialized care services are provided to patients who are more difficult or dangerous. Finally, there are seven high-security special hospitals, run directly by the Federal Ministry of Health, that receive highly socially dangerous patients. Nonoffenders may not be admitted to these hospitals. The tendency in the last year has been to centralize the forensic services. When the patients are discharged, they are followed-up by outpatient psychiatric clinics, ensuring continuity of care (Every-Palmer et al., 2014; Ruchkin, 2000).
In Ukraine, forensic services are also offered at different levels of security. Mentally ill offenders are often first treated in the Special Psychiatric Hospital in Dnepropetrovsk, which is the only high-security forensic hospital. Eventually, they are transferred to medium-security units of general psychiatric hospitals. However, there is a critical lack of continuity of care between levels of security (Douw et al., 2015). Information for Armenia, Azerbaijan, Belarus, Hungary, Latvia, Macedonia, Romania, Slovenia, Tajikistan, and Uzbekistan is provided in Table 1.3.
#### Islamic law Countries
Forensic services in Iraq are only provided in the high-security unit of the Al-Rashad Mental Hospital in Baghdad and there is no outpatient treatment or follow-up care after discharge (Muslim & Chaleby, 2007; World Health Organization, n.d.). The World Health Organization’s AIMS Reports on Mental Health Systems indicates that there are no forensic facilities in the following countries: Afghanistan, Iran (forensic patients are detained in prison or in the psychiatric hospital), the Maldives, and Somalia. Information for Bahrain, Jordan, Oman, Saudi Arabia, and Sudan is provided in Table 1.3.
#### Summary
The review above clearly shows the wide variation in legal frameworks around such issues as fitness to plead and criminal responsibility, as well as the absence of clear processing patterns, both within and across large legal systems. No straightforward conclusion about the organization of forensic services and the actual comparability across nations can be made. Despite these limitations, some trends do emerge. Fitness to stand trial is much more common in common-law countries in comparison to civil-law countries, where it is nearly nonexistent, with the exceptions of Germany, Chile, Argentina, Japan, China, and Taiwan. This could be explained by the fact that common law is more adversarial in nature, whereas civil law adopts an inquisitorial approach. The concept of fitness was also available in some former Communist countries. The insanity defense, on the other hand, is a legal concept that is both deeply embedded in countries of civil-law tradition and of common-law tradition, despite being rarely used in England. The Nordic countries of Denmark and Sweden instead sentence criminally responsible offenders to treatment.
In most countries, a defendant found unfit could be either detained in a hospital (either forensic or general) or released, depending on the risk level and on the severity of the offense. Many common-law countries have put in place safeguards to prevent indefinite or arbitrary detention permanently of unfit defendants. After a given amount of time, if found permanently unfit, the defendant would either be released, civilly committed, or submitted to a special hearing.
The population characteristics of the forensic population can also vary in terms of diagnosis and type of index offense. The types of mental disorders that might be considered as a basis for partial or full lack of criminal responsibility (or for a treatment sentence in some cases, including England) were rarely explicitly stated in the law, and most often were at judges’ discretion, which resulted in many countries being ‘on the fence.’ The pattern shows that psychotic illnesses (mainly schizophrenia) are accepted, along with severe affective disorders and organic mental disorders. The inclusion of personality disorders, however, varies widely. Offenders with a personality disorder are an important proportion of forensic patients in England and Wales, the Netherlands, Belgium, Germany, Austria, and Greece, but they are rarely admitted elsewhere. The severity of the offenses committed range from mostly misdemeanors (Israel) to mostly severe violent crimes (the Netherlands). Sexual offenders rarely reach forensic services through a mental disorder defense, with the exception of South Africa.
While the duration of the forensic hospitalization is, in many jurisdictions, unlimited and subject to regular reevaluation, other countries embedded safeguards, either to ensure that forensic patients are detained a minimum amount of time or no longer than a maximum amount of time, often in relation to the level of severity of the offense. While in Italy the minimum length of treatment must be related to the seriousness of the offense, it is the maximum length that is related to the seriousness of the offense in Ireland and most of Australia. The court may also establish the duration, such as in Portugal (maximum), Brazil, and Greece (both minimum). The decisional power to discharge a patient most often rests with the court, but sometimes rests with the treating psychiatrist (for instance, in England and Wales, South Africa, and China) or is subject to ministerial assent (in New Zealand and most of Australia). Independent bodies or mental health tribunals have been put in place in Canada, Ireland, Scotland, Queensland, Belgium, and Israel. In a minority of countries, such as in England and Wales, the courts cede all powers over a mentally disordered offender once they are admitted to a hospital, and the patient is essentially treated like a civilly detained patient.
One of the bases of the organization of forensic services is the extent to which they are integrated with the civil mental health services. In some cases, forensic facilities are entirely distinct from the health system; sometimes, they are under the authority of another department altogether. In other cases, there are virtually no distinction between forensic services and general mental health services and allocation is based on security rather than legal status, mentally disordered offenders being treated on the same wards as aggressive or high-risk nonoffenders, such as in Finland and England. In general, the less populous a country is, the more likely it is that the services will be centralized in one national forensic hospital.
There is an important dearth in the literature when it comes to postdischarge forensic services, including continuity of care and supportive housing. When information is available about the follow-up programs, performance indicators and outcomes are rarely available, which makes drawing conclusions about the actual continuity of care nearly impossible. It is worth noting that the United Kingdom is arguably the jurisdiction where forensic services are the best documented in the literature. Clear pathways of care have already been developed and put in place, putting the country at the forefront of evidence-based policies.
The general portrait of forensic mental health frameworks around the world remains limited by the significant variability in the availability and specificity of information. No studies were identified that could indicate which kind of organization of services is most effective or efficient—an endeavor that would certainly be of interest for future research and require the development of an international consortium. Such massive heterogeneity in the design of forensic systems likely produces major variation in forensic mental health outcomes; however, the nature and magnitude of this variation is not well understood. Some attempts have begun in this direction in relation to long-term forensic patients by the COST team. 10 Despite being unable to draw conclusions about the superiority of one approach for organizing forensic services over another, key system-level principles can be extracted from this review as well as the wider literature on the organization of mental health services in order to propose a model for the organization of forensic services.
#### 2 What Are the Key Organizing Principles for Forensic Mental Health Systems?
As was evidenced above, the manner in which forensic mental health services are governed and organized varies considerably between—and even within—nations. Some jurisdictions have constructed self-contained, specialized forensic mental health systems with resources and mandates that are detached from general mental health. Other jurisdictions have deliberately blended the role and function of forensic and general mental health systems. The systems also vary in relation to their stage of evolution, with low-resource countries working to establish rudimentary services to meet forensic service users’ basic needs (Ogunwale et al., 2012) and high-resource countries contemplating sophisticated redesigns to maximize the effectiveness and efficiency of their complex forensic systems (Wilson et al., 2011). As mentioned earlier, such wide variation and disparities in the configuration of forensic systems are the product of a multitude of historical and ongoing sociopolitical, cultural, and economic forces.
The lack of consensus about how to most effectively organize forensic services, notwithstanding variations in legal frameworks, also contributes to systems being molded into unique shapes in different parts of globe. Although scholars have speculated about the relative advantages and limitations of different models for configuring forensic mental health services (Humber, Hayes, Wright, Fahy, & Shaw, 2011; Salize et al., 2005), this area has not been subjected to empirical scrutiny. Consequently, there is no evidence-based template for how forensic systems ought to be designed. However, there are guidelines for organizing general mental health and substance use systems (Hogan et al., 2003; McDaid & Thornicroft, 2005; National Treatment Strategy Working Group, 2008; Organization of Services for Mental Health, 2003; Roberts & Ogborne, 1999; Rush, 2010; Thornicroft & Tansella, 2004; U.S. Department of Health and Human Services, 2009). With some adaptation to the unique role and function of forensic services (i.e., involuntary, public safety-focused), these system-level principles are transferable to the forensic mental health arena.
According to these guidelines, an effectively organized forensic mental health system would include elements such as: (1) providing a comprehensive and balanced continuum of services, (2) integrating services within and between systems, (3) matching services to individual need, (4) adhering to human rights, (5) responding to population diversity, and (6) using the best available evidence to make system-wide improvements. Though all of these system-level principles are important, the discussion below will focus on how the first three (service continuum, system integration, and service matching) may be applied to the organization of forensic mental health services.
#### A Balanced Service Continuum
As evidenced in our international review, contemporary forensic mental health systems tend to be aligned with a ‘custodial paradigm’ (McKenna, Furness, Dhital, Park, & Connally, 2014), whereby resources and services are concentrated in institutional settings, such as stand-alone forensic institutions, specialized units in general mental health hospitals, or inpatient services offered in correctional settings. Forensic institutions play a vital role in containing and mitigating public safety risk, enabling justice-involved people with mental disorders access to therapeutic processes and interventions, and facilitating community reintegration, crime desistance, and personal recovery. At the same time, forensic institutions also embody the oppressive features of a ‘total institution’ (Goffman, 1961), whereby detainees (or inpatients) are, to varying degrees, exposed to deprivations of liberty, autonomy, material goods, intimate relations, and security. Forensic institutions are also a very costly means of providing services that could be delivered in community-based settings with equal, if not greater, effectiveness.
Emerging from similar concerns regarding institutional care is the proposal that mental health and substance use systems are most effective when they provide access to a comprehensive and balanced continuum of services and supports. In a balanced care approach, a flexible range of services is primarily provided in communitybased, local settings that span the specialized and nonspecialized sectors and emphasize features such as providing care close to home, tailoring treatment to individual need, supporting the choices of service users, ensuring that care is coordinated between providers and agencies, and offering mobile services (Thornicroft & Tansella, 2013). A balanced care model that provides ready access to evidencebased treatment interventions would prevent some people with mental illnesses from unnecessarily becoming involved in the criminal justice system. It would also ensure that high-quality services reach those with mental health needs who are in the criminal justice system (e.g., arrested by police, detained or incarcerated, on parole or probation) in order to prevent further criminalization (Munetz & Griffin, 2006).
One conceptual framework that is used to portray what balanced care systems look like is the ‘tiered model’ (National Treatment Strategy Working Group, 2008; Organization of Services for Mental Health, 2003; Rush, 2010). A fundamental aspect of the tiered model is that mental health and substance use systems contain logical groupings of services that have comparable levels of intensity, specialization, and restrictiveness. Comparable services can be clustered into tiers that are most appropriate for meeting the needs of distinct groups of people based on the acuity, complexity, and chronicity of their mental health and substance use problems. For instance, highly specialized and intensive (and costly) services are most suitable for people with severe (i.e., highly acute, complex, and chronic) problems, and least appropriate for people experiencing low to moderate levels of distress or impairment. Another feature of the tiered model is that the distribution of services should align with the population distribution of problem severity. Those with lower-level problem severity are more numerous in the population and, as such, the demand (i.e., volume) for less intensive, less specialized services is great. Conversely, severe mental health and substance use problems are less common in the population and the demand for highly specialized, highly intensive services is small. The shape of service systems should correspond with the demand for different service levels.
According to the principles of the tiered model, a balanced forensic mental health care continuum would resemble the figure below.
Drawing from other frameworks (e.g., Kennedy, 2002; Mullen, 2000; O’Dwyer et al., 2011; Thornicroft & Tansella, 2013; World Health Organization, 2003), this conceptual model is designed with six tiers that contain three clusters of custodial-based forensic mental health services (Tiers 4–6) and three clusters of community-based services (Tiers 1–3). Each service cluster would contain evidence-based interventions corresponding with the particular function of that cluster. The menu of interventions available within each cluster will vary between jurisdictions. Compared with other tiered service models designed for general mental health and substance use systems, the model depicted here is weighted more heavily toward institutional services in order to reflect the distinct nature of forensic populations and the risk management function of forensic systems. Nonetheless, striking a balance between custodial- and community-based services is vital for forensic mental health systems (Mullen, 2000), with some suggestion that the investment in community services should be equal to or greater than the amount being spent on custodial care (Thornicroft & Tansella, 2013).
As was revealed by our review of forensic systems, the upper half of the pyramid (Tiers 4–6) parallels with how parts of the world currently distribute custodial populations in low-, medium-, or high-security settings (Pillay, Oliver, Butler, & Kennedy, 2008). Tier 6’s high-security, custodial services are the most restrictive, intensive, specialized, and costly in the forensic mental health system; it also serves the smallest portion of the forensic population. The focus of services in Tier 6 is on stabilizing acute mental health and substance use problems, while also targeting specific criminogenic needs in order to enable a safe transition to a lower security level. In contrast, Tier 4’s low-security, custodial services comprise the least intensive and least specialized services within custodial care settings. Tier 4 services are generally designed to prepare service users for transitioning into the community, for instance building self-management, relapse prevention, and independent living skills. The lower half of the pyramid (Tiers 1–3) provides a continuum of care in the community that is appropriately matched to service users’ level of criminogenic, mental health, and substance use treatment needs. Tier 3’s high-intensity community services likely include supportive and structured living environments (e.g., supported housing, residential facilities) combined with assertive outreach and treatment provided by specialized, multidisciplinary forensic mental health service providers (e.g., forensic assertive community treatment teams). Tier 1’s low-intensity community services require the least forensic specialization and would focus on bridging people to nonforensic systems of care.
Figure 1.1 Balanced Forensic Mental Health Care Continuum
#### Matching Services to Needs
Integral to the tiered model is the principle that systems are best organized in a manner that allows individuals to access a full range of services according to their level of need (National Treatment Strategy Working Group, 2008; Thornicroft & Tansella, 2003; World Health Organization, 2003). A system that offers services tailored to an individual’s needs, also known as a ‘stepped care’ model, can effectively respond to varying levels of illness chronicity, acuity, and complexity, and is responsive to a person’s changing needs (Bower & Gilbody, 2005; Rush, 2010). Comprehensive and regular assessments of needs that match people with the appropriate services (type and intensity) is an essential feature of a system that is organized around a stepped care approach (Goldman, Thelander, & Westrin, 2000). A welldesigned system provides individuals with the least restrictive, least intensive, least expensive, and least intrusive interventions, with individuals stepped up to higher intensity care or stepped down to lower-intensity care based on current service need (McDaid & Thornicroft, 2005; Von Korff & Tiemens, 2000).
These system-level principles are well aligned with evidence-based practice for correctional interventions (Andrews & Bonta, 2010; Lipsey & Cullen, 2007; Prins & Draper, 2009; Romani, Morgan, Gross, & McDonald, 2012). Of particular relevance is the risk–need–responsivity (RNR) theoretical framework, which posits core principles for correctional services to effectively treat offending behavior (Andrews, Bonta, & Hoge, 1990; Andrews, Bonta, & Wormith, 2011; see review in Chapter 16 of this book). The RNR model indicates that service intensity should match the level of risk for reoffending presented by an offender, with intensive correctional services being reserved for higher-risk offenders (risk principle). Alongside this, services should target and address criminogenic needs—the dynamic risk factors with an established empirical linkage to reoffending (need principle). Furthermore, interventions should be oriented toward cognitive behavioral strategies and the offenders’ learning style, motivation, abilities, and strengths (responsivity principle).
Another applicable theoretical model, developed by Prins and Draper (2009) and subsequently elaborated on by others (Osher, D’Amora, Plotkin, Jarrett, & Eggleston, 2012; Skeem, Manchak, & Peterson, 2011), has applied RNR principles to the management of individuals with mental illness under community corrections supervision. This framework posits that criminogenic needs and functional impairment should determine the intensity of, and degree of coordination between, criminal justice and mental health services. An increase in criminogenic needs and risk levels should be matched by intensive supervision. Similarly, higher levels of functional impairment should be matched with intensive mental health treatment. Concomitantly, increases in service intensity should necessitate greater coordination and integration between mental health and correctional services.
A forensic mental health system that is organized according to the tiered model and the Prins and Draper (2009) framework would match service clusters, containing distinct therapeutic interventions and security measures, to target groups based on their risk and need profile, as is depicted in the table below. Others have proposed similar strategies for distributing resources based on the needs of adults with behavioral health problems who are under correctional supervision (Osher et al., 2012). Additionally, the ‘stratified risk and care’ model described by Pillay and colleagues (2008) outlines a similar way that forensic service users are distributed across security levels according to their level of clinical need and risk for violence and crime.
Custodial forensic services (Tiers 4–6) are most appropriate for forensic service users who are assessed as being at moderate to high levels of criminogenic risk, as well as those with severe mental health and substance use problems. The Prins and Draper (2009) model suggests that persons with higher levels of criminogenic needs accompanied by more serious mental health and substance use problems would be the most likely to benefit from a highly specialized forensic mental health service, with its integration of risk assessment, risk management, and mental health and substance abuse treatment. Community forensic services (Tiers 1–3) may be most appropriate for forensic service users assessed as being at low to moderate levels of criminogenic risk and have low to moderate mental health and substance use treatment needs. The needs of forensic service users who have lower levels of criminogenic, mental health, and substance use needs are likely to be met by services with lower levels of forensic specialization. Those with higher criminogenic needs who are living in the community may be best served by highly specialized forensic services, such as forensic assertive community treatment.
Much of the literature in this area focuses on criminogenic risk and need factors, but a recent body of scholarship has cast doubt on the validity of using criminogenic risk to inform decisions regarding the assignment of service users to different security levels in a forensic mental health care continuum (O’Dwyer et al., 2011). A set of instruments, known as the DUNDRUM quartet, have been developed to inform decisions concerning the placement and movement of service users in the forensic mental health system (Kennedy, O’Neill, Flynn, & Gill, 2010). These instruments rely on a different set of variables, compared to those used by criminogenic need and violence risk appraisal instruments, to assess the appropriateness of security level placement. Although more research is needed on the effectiveness of instruments such as the DUNDRUM quartet to improve system-level processes and outcomes, adjustments to the above table may be warranted, such that the service clusters and security levels (especially in custodial settings) are matched to a target groups’ therapeutic security needs, rather than their criminogenic, mental health, and substance use treatment needs. The latter batch of variables may be more appropriate for matching individuals to appropriate interventions (type and intensity), rather than determining their placement within the forensic mental health care continuum.
### Table 1.4 target Group by service Cluster
Tier
Service Cluster
Appropriate Target Group
6
High-security custodial services
• High criminogenic risk and low, moderate, or high mental health/substance use treatment needs
5
Medium-security custodial services
• Moderate criminogenic risk and high mental health/substance use treatment need
4
Low-security custodial services
• Moderate criminogenic risk and moderate mental health/substance use treatment needs
3
High-intensity community services
• Moderate criminogenic risk and moderate mental health/substance use treatment needs
2
Moderate-intensity community services
• Moderate criminogenic risk and low mental health/substance use treatment needs
• Low criminogenic risk and moderate mental health/substance use treatment needs
1
Low-intensitycommunity services
• Low criminogenic risk and low mental health/substance use treatment needs
#### Integrating Systems
Forensic service users need to access different systems and subsystems to have their intersecting needs appropriately met. Many obstacles prevent services from achieving optimal levels of integration and coordination, such as fragmented funding mandates. The complexity of the criminal justice, psychiatric, and social problems existing within the forensic mental health population present challenges for coordinating and integrating services for this group—especially since forensic service users are undesired, unwanted, and rejected by other service systems (Wolff, 2002).
Receiving care from different systems, or different components of a system, is very problematic in a population with co-occurring, complex needs, and that has experienced severe social ruptures and interrupted care trajectories. A fundamental principle for effectively organizing mental health and substance use services is that systems should be integrated (Craven & Bland, 2006; Thornicroft & Tansella, 2003). In the forensic mental health context, system integration refers to bridging the service delivery gaps that exist within and between mental health, substance use, criminal justice, corrections, housing, and other essential service sectors. The purpose of systems integration is to encourage seamless service delivery, to promote efficiency, to optimize the use of scarce resources, and to improve outcomes. Systems integration is promoted through structures and processes that facilitate collaborations, partnerships, and communication between professionals and agencies.
Models of systems integration between mental health, criminal justice, and community support services have been developed (Lamberti, Deem, Weisman, & LaDuke, 2011; Osher et al., 2012; Weisman, Lamberti, & Price, 2004). Our review of forensic systems also shows various ways in which different jurisdictions throughout the world have tried to build systems integration in order to meet the needs of forensic service users. One aspect of systems integration focuses on linkages and coordination among the various components of the mental health, substance use, and correctional service continuum. Integration between the custodial and community settings is also essential for the efficient and effective delivery of forensic mental health services. Opportunities for multi-system collaboration and system integration exist throughout the tiered model. For instance, the needs of forensic service users at the lower tiers (e.g., 1 or 2) could be effectively met by the general mental health system, since the need for specialized forensic services may no longer exist (Humber et al., 2011), an approach that has been adopted by many countries. Integrating risk management strategies and transferring forensic skills into the general mental health system, or transitioning forensic service users to the general mental health system when appropriate has a number of advantages (Jansman-Hart et al., 2011), including freeing up space in the forensic system but also avoiding unnecessarily restricting the liberty of forensic service users.
As our international review of frameworks demonstrated, numerous options exist for organizing forensic mental health systems. In addition to population differences, the models vary in the degree to which services are integrated with the other sectors, such as the general, nonforensic mental health system as well as the correctional system. One approach, which we call a ‘specialized’ model, offers specialized forensic services to all forensic services users throughout their care pathway in custody (e.g., forensic hospital) and the community (e.g., forensic outpatient care). In contrast, a ‘mixed’ model provides access to specialized care based on need whereby only some forensic service users (e.g., moderate–high risk) receive specialized forensic services, while others receive hospital- or community-based services in the general mental health system. This model’s focus on tailoring care (specialized or integrated) based on individual need is consistent with the principles of the tiered model. Lastly, in a ‘general’ model, forensic service users receive services either entirely (i.e., hospital and community) or partly (i.e., community only) in the general mental health system—an arrangement that is primarily based on the availability of resources rather than people’s needs. There are theoretical strengths and weaknesses of these different ways of integrating systems, but their relative effectiveness requires further study.
#### 3 How Can the Performance of Forensic Mental Health Systems Be Evaluated at a Systems Level?
The integration of the best available evidence into practice and the measurement outcomes have been, and continue to be, ongoing challenges in all areas of health care—forensic mental health services are no exception. Many organizations have developed quality and performance indicators in order to assess the functioning of their services, level of effectiveness and areas for improvements. However, the field of forensic mental health, with a few exceptions, has been slow to move into the era of identifying and applying quality standards and performance indicators in a systematic fashion (Australian Commission on Safety and Quality in Health Care, 2014; Barbaree & Goering, 2007; Coombs, Taylor, & Pirkis, 2011; Haque, 2016; Lauriks, Buster, Wit, Arah, & Klazinga, 2012; Müller-Isberner, Lichtenfels, & Imbeck, 2016; Parameswaran, Spaeth-Rublee, Huynh, & Pincus, 2012). Very little substantive documentation about performance measurement is currently available in the gray literature and even less so in the scientific literature. We were able to locate variable degrees of information from Canada (Ontario and British Columbia), England and Wales, Scotland, Germany, the Netherlands, and Australia. A few key initiatives are being disseminated, particularly through the International Association of Forensic Mental Health Services’ special interest group of service development, organization, strategy, and delivery, which meets regularly at the association’s annual conference.
As was clearly illustrated by Müller-Isberner et al. (2016), forensic mental health services are complex organizational structures embedded in an elaborate mesh of media and public scrutiny, legal frameworks, administrative contexts, institutional contexts, and general risk management interventions. Managing all of these components is an important and challenging endeavor. The development of quality standards can help organizations in measuring outcomes, standardizing procedures, and facilitating the integration of evidence-based practices into services. Whether organizations choose to follow the guidelines of the International Organization for Standardization (Müller-Isberner et al., 2016), quality standards developed by accrediting bodies for general health care organizations, 11 or their own quality standard network approaches (Barbaree & Goering, 2007; Haque, 2016; Thomson, 2016), it is becoming increasingly clear that forensic mental health services can and should implement systematic quality management processes.
Scotland’s Quality Framework 16 for forensic mental health services has similar themes that were identified as important in the development of quality standards and practice indicators but are organized along slightly different themes: (1) Assessment, care, planning, and treatment, which include such indicators as admission assessment, care program approach, patient involvement, person-centered care, Mental Health Act compliance (this is a nonexhaustive list); (2) physical health, including drug testing protocols, physical health needs, and weight management; (3) risk (assessment, detention, compulsion, and patient safety), which includes structured professional judgment, patient involvement, and timescales for risk assessment; (4) management of violence, which includes de-escalation procedures, seclusion procedures, post-incident debrief, and patient support; (5) physical environment such as security system design and construction, visiting, technology, and contingency plans; and, finally, (6) team skills and staffing, which includes multidisciplinary teams, research, further education and development, and personal safety (Thomson, 2016). As with the rest of the United Kingdom, the Scottish network has also organized its standards around low-, medium-, and high-security units.
Müller-Isberner et al. (2016) conclude that the introduction of a quality management system facilitates better structure, standardization of procedures, continuous improvement processes, implementation of new best practices such as new risk assessment and management measures, transparency of the organization, and the survival of the knowledge within organizations, particularly when there is staff turnover. Moving from a stand-alone organizational model toward networks of forensic systems seems to be helpful for establishing and supporting the implementation of quality standards (Solomon, Day, Worrall, & Thompson, 2015). All of these initiatives pertaining to quality indicators and standards are helpful for organizations to structure, manage, and improve their services with the aim of providing better care and effective risk management of forensic mental health service users. They are also probably more likely to occur in high-income countries, where greater resources and expertise allow for a more intensive focus on institutional structures and measurement processes.
In the end, improving mental health and reducing risk for the well-being of service users and their loved ones, health care staff, and the general public are the main goals of forensic mental health services. As with mental health services in general, other intervention attributes need to be taken into account (Thornicroft & Slade, 2014). These may include accessibility, acceptability, efficiency, costeffectiveness, and evidence-informed practices. It is also suggested that outcome measurement be comprehensive and multidimensional—evaluating humanitarian, psychosocial, health, and public safety outcomes—and take into account the perspectives of multiple stakeholder groups (e.g., patients, caregivers, clinicians: Cohen & Eastman, 2000; Epperson et al., 2014). All of the abovementioned attributes may pose some challenges in forensic mental health as there are delicate balances to maintain between meeting the needs of the individual service users, in terms of both well-being and human rights, and satisfying the needs of other interest groups, including victims, the public, and the state. Very little research to date has examined these issues and together.
Many outcomes will be shaped by factors outside the control of the forensic mental health system, particularly institutional forensic mental health services, unless strong continuing links are created and care pathways are maintained in communitybased services. In a recent meeting of mental health, justice, and safety stakeholders in Canada, the chronic lack of appropriate housing for forensic service users was identified as a major challenge for forensic services to transition people safely and promptly into the community (Crocker, Nicholls, Seto, Roy, et al., 2015c). Although there is ongoing debate, the available research argues against the development of parallel forensic mental health community services, but rather supports investing in better integration with general mental health services (Coid, 2007). Others have also called for a retooling or scaling up of practices in the general mental health care system in order to better address the needs, goals, and capabilities of forensic service users (Hodgins, 2009). It is hypothesized that a more integrated approach would foster a better understanding of forensic issues among general mental health care practitioners and would help reduce the stigma of receiving services from specialized forensic programs. It could also facilitate dissemination and adoption of quality standards across the continuum of care for forensic service users. We must also acknowledge that distal outcomes, such as recidivism and mental health recovery, are strongly associated with social and environmental factors, such as trauma exposure, environmental stressors, deprivation, poverty, and inequality, as well as access to and continuity of meaningful care and support in the community (Epperson et al., 2014; Seto, Charette, Nicholls, & Crocker, n.d.; Tew et al., 2012). Increased attention to these determinants in regards to assessing forensic mental health outcomes, including the processes that influence outcomes, is essential for better organizing the continuum of care and addressing the balance between public safety and individual rights and freedoms.
Despite a clear interest and need in implementing quality management strategies and developing cultures of outcome measurement in forensic mental health services, one must remain aware of potential invariance in the measurements; that is, the same outcome is measured for everybody irrespective of its importance for a particular person (Thornicroft & Slade, 2014). What is considered to be ultimate positive outcome, such as recidivism reduction, may not be what is perceived as most important for the people who receive or provide forensic services (Livingston, 2016), or for other stakeholder groups, such as families. Reduction of symptoms may be important and helpful for the service users to start engaging in more meaningful activities, but perhaps the most important components of risk reduction or strengths development for a particular service user may be the possibility of developing significant relations with others. We must, therefore, remain cognizant of the recovery path of each individual service user and integrate the appropriate recovery components in the quality of care assessment process, which can be a challenge in light of some risk and criminogenic attributes that must be addressed. In their review on recovery in mental health, Tew and colleagues (Tew et al., 2012) propose a paradigm shift from “individualized ‘treatment-oriented’ practice to one in which working with family and friends, and promoting social inclusion, are no longer optional extras” (p. 455), focusing on enabling people to reach their aspirations by working not only with the individual but his or her social environment. The performance of modern forensic systems should be systematically evaluated with respect to their alignment with recoveryoriented or patient-centered principles (Livingston, Nijdam-Jones, & Brink, 2012), as is evident in the quality frameworks of England and Wales and Scotland, or their adherence to whichever model (e.g., the balanced care approach depicted in Figure 1.1) has been chosen to guide the organization and delivery of services.
#### Risk-Averse Society
The concept of risk refers to the probability of an event and the magnitude of its consequences; risk and probabilities can be difficult to grasp and can lead to a variety of responses in society. “Risk events interact with psychological, social and cultural processes to heighten or attenuate public perceptions of risk and related risk behavior” (Kasperson et al., 1988, p. 178). Sociologists argue that modern society is increasingly being structured around risk, with social institutions constituted to protect the population from perceived dangers (e.g., terrorism, climate change, infectious diseases, and financial crises: Beck, 1992). Some very low-risk phenomena, such as violent behavior toward a stranger by a person with a mental illness, can elicit strong public concern and insecurity (Monahan & Steadman, 2012). A fearful and anxious public turns to their government for protection, and, in turn, government officials (e.g., politicians) maintain social order by convincing the public of their capability to manage and control risk. Some politicians strategically use such opportunities to gain popularity and political advantage by promoting punitive and coercive measures (e.g., incarceration) to suppress ‘risky problems’ (Pratt, 2007). These harsh punitive measures are problematic in that they are largely symbolic and undermine the rehabilitative objectives of the criminal justice, forensic, and correctional systems.
Most Westernized or high-income societies are increasingly risk-averse—the current political situation around the world regarding the influx of Syrian immigration in many countries is probably one of the most obvious examples at this time. Closer to our current subject, one only has to think of the ‘Not In My Backyard’ (NIMBY) 17 phenomenon that persons with mental illness are often up against when trying to find housing in their preferred neighborhood. This risk aversion plays an important role in the organization of forensic mental health services, in particular regarding security levels, discharge planning and decisions for patients as well as legislation and policies pertaining to mentally ill offenders. In Canada, for instance, the Not Criminally Responsible Reform Act, which came into law in July 2014 under the conservative government, created a ‘high-risk accused’ category, mostly based on the severity of the offense, which increased and prolonged the restrictions placed on the subgroup of people found NCRMD. This type of reform is risk aversion-based, not rooted in any evidence, and the product of a penal populist style of governing (Tersigni, 2016). Penal populism is generally understood as a policy framework based on public opinion and fear rather than expert advice or an evidence base and leads to policy and legislation that are tough on crime. The tough on crime approach plays on its appeal for the public to have ‘safe communities’ and reduced violence and criminality regardless of the evidence (Bousfield, Cook, & Roesch, 2014; Cook & Roesch, 2012). A recent simulation study was conducted by applying retrospectively the criteria of the legislation on a sample of individuals found not criminally responsible on account of mental disorder. Results indicate that individuals who would potentially be designated highrisk accused reoffended at similar or lower rates than non-high-risk accused individuals (Goossens et al., 2016), thereby demonstrating that the new legislation may not in fact have the intended effects. Zero risk of course does not exist and can never be ensured in regards to human behavior, but the dangers of the risk-averse culture are the increased stigmatization, marginalization, and intolerance of persons with a mental illness who become involved with the criminal justice system. This, in turn, makes it increasingly difficult to assist individuals who need it most.
Even within the mental health services, some community service providers (e.g., mental health, housing, employment) are reluctant to work with discharged forensic service users who are perceived as being a risk of violence. Community forensic services are, thus, not always available or able to follow up patients that are returning to the community. In Ontario and British Columbia, two of the largest provinces in Canada, the civil health care systems are allowed to refuse to treat forensic patients. As a result, the patients may be staying in the forensic system for longer than necessary and thus occupy forensic beds that are otherwise greatly needed (Crocker, Nicholls, Seto, Roy, et al., 2015c).
#### The Perceived Dichotomy Between Recovery and Public Safety—Fuel for Penal Populism
The generally poor understanding of the relationship between mental illness and violence in the general public is partly due to the fact that, historically, the research has not always been clear about this relationship (Monahan, 1992) and researchers have not effectively communicated what is known about justice-involved mentally ill persons in general (Crocker et al., 2015c). It may also be partially reinforced by an emphasis on a deterministic biomedical model of mental illness that can create dualistic thinking between individual recovery and public safety, in the eyes of the public and politicians. In fact, when it comes to violence and mental illness, there is a general tendency to view recovery and public safety as opposites, when the evidence has shown that it is through rehabilitation and recovery that one can achieve a reduction in risk (Dvoskin, Skeem, Novaco, & Douglas, 2012). The risk–need–responsivity model research also shows that excessive intervention that is disproportionate to risk can actually have the inverse effect of increasing risk (Andrews, 2012) and, consequently, decreasing public safety. Research has clearly shown that punitive policies and coercive practices tend to, in the long term, exert a negative effect on public safety. Some of the best examples were observed in the United States through the tough on crime legislation of the 1990s (Blumstein, 2012). Traditionally, conservative governments have argued for more incarceration/punitive approaches, while liberals tend to promote crime prevention strategies based on social development (Blumstein, 2012). The resurgence of conservative, right-wing governments around the globe will continue to pose challenge for forensic mental health services in striving for recovery-oriented approaches despite increasing pressures to be punitive, often fueled by highly mediatized cases to use punitive and coercively driven approaches. It will become increasingly important to develop clear messaging around short-, medium-, and long-term outcomes and programs that reduce recidivism rates in forensic populations and improve public safety in order to guide policy-making and reduce stigma. Future research could explore what are the most effective strategies for educating policy-makers and the general public around justice-involved persons with mental illness (Crocker et al., 2015c).
#### Forensic Mental Health Stigma
Stigma is a social process that aims to exclude, reject, shame, and devalue groups of people on the basis of a particular characteristic (Weiss, Ramakrishna, & Somma, 2006). It is conveyed by the widespread perception among the general public that individuals with mental illnesses are dangerous (Jorm, Reavley, & Ross, 2012; Mestdagh & Hansen, 2014; Parcesepe & Cabassa, 2013; Pescosolido, 2013; Schomerus et al., 2012). It manifests when people with mental illness feel as though they are devalued and discredited members of society, which can lead to hopelessness, poor self-esteem, disempowerment, reduced self-efficacy, poor treatment adherence, and decreased quality of life (Livingston & Boyd, 2010) and it ultimately leads to numerous structural barriers for accessing social and economic opportunities, such as employment, education, and housing, ultimately restricting the rights of people with mental illness and hindering their recovery.
Forensic mental health service users face substantial stigmatization, which results from intersecting psychiatric and criminal labels as well as other forms of marginalization (e.g., poverty, racism). Roskes and colleagues (1999) identified ‘double stigma’—the co-occurring statuses of being mentally ill and a convicted criminal—as a barrier to community reintegration. Similarly, in a study with ex-offenders who had co-occurring mental health and substance use problems, Hartwell (2004) provided evidence to suggest that problematic community reintegration is compounded by the intersection of these three statuses (mentally ill, addicted, ex-con), which she called ‘triple stigma.’ A small body of research has investigated stigma in the forensic mental health system (Margetić, Aukst-Margetić, Ivanec, & Filipčić, 2008; West, Vayshenker, Rotter, & Yanos, 2015; West, Yanos, & Mulay, 2014; Williams, Moore, Adshead, McDowell, & Tapp, 2011). The results of one study indicate that receiving specialized forensic services is associated with increased exposure to social stigma, such as being perceived by others as potentially violent. Additionally, forensic service users commonly experience instances of structural stigma, such as being refused access to services (e.g., housing, day programs) on account of the ‘forensic’ label (Livingston, Rossiter, & Verdun-Jones, 2011). These barriers are in addition to those that are directly related to mental illness and other forms of social and economic disadvantage.
Stigma is a major challenge for many mental health service users, including those who are in the forensic system. Obtaining employment, housing, and necessary services is made more difficult through the interlocking effects of multiple statuses and labels that combine to create oppression, disempowerment, and marginalization. To protect themselves from stigmatizing experiences, forensic service users may engage in behaviors, such as social withdrawal, that are unproductive for recovery from mental illness and desisting from crime. They may also be blocked from accessing vital resources (e.g., housing, social network) that are required for living a prosocial, healthy life in the community. Although more research is needed, the existing evidence suggests that stigma is influenced by the policies and practices of forensic mental health systems. The fact that forensic services users are exposed to greater levels of social and structural stigma is a factor that decision-makers should be aware of so that they can work toward mitigating such negative effects of the forensic system. At an individual level, this might include making programs available to help service users cope with negative effects of stigma, or, at a structural level, this would involve rectifying policies and practices that arbitrarily restrict forensic service users’ access to social and economic opportunities.
#### 5 What Are Some Emerging Approaches in Relation to Organizing Forensic Mental Health Systems?
In this section, we present a selected sample of emerging models and approaches that challenge the traditional or orthodox ways (i.e., custodial, biomedical, and sometimes coercive orientations) in forensic mental health. We chose to address four contemporary issues that are at the core of the forensic mental health business: safety, rehabilitation, knowledge exchange, and the role of the service user in forensic mental health services.
#### Providing Increased Ward Safety—The Safewards Model
Challenging behaviors such as verbal and physical aggression, self-harm, suicide, and medication refusal are relatively common occurrences in forensic settings (Nicholls, Brink, Greaves, Lussier, & Verdun-Jones, 2009). These behaviors place patients and staff at risk of serious harm and hamper rehabilitative efforts. Various ‘containment’ strategies have been used, from chemical and mechanical restraints to seclusion and special observation by staff in an attempt to manage these behaviors or improve outcomes (Bowers et al., 2015). Whereas some health care professionals defend these practices as necessary measures for protection, others have described the practice of seclusion and restraint as dangerous violations of human dignity and rights (van der Schaaf, Dusseldorp, Keuning, Janssen, & Noorthoorn, 2013).
The Safewards model is one of the most recent approaches for reducing and even eliminating seclusion and restraints in civil psychiatric settings (a). The reciprocal relationship between conflict and containment are at the center of the model, whereby conflict triggers containment and containment procedures trigger conflict. In this model, conflict refers to the risk behaviors that service users engage in that could threaten their own safety and the safety of others. Containment refers to the prevention strategies that seek to minimize harmful outcomes or prevent conflict events from occurring at all. The model is constructed around the following six domains, which identify the main influences on conflict and containment rates: the staff team, the physical environment, outside hospital, the patient community, patient characteristics, and the regulatory framework (Bowers, 2014). The staff team domain includes the internal structure of the ward, which is composed of rules of service user conduct, daily and weekly routine (i.e., what happens and where), and the overall ideology asserted by the staff to highlight the purpose of the ward and what it offers to service users. The physical environment domain refers to the built environment’s quality (i.e., better-quality environments evoke greater respect for patients, more comfort, and greater care) and complexity (i.e., more difficult to observe environments make supervision by the staff harder). The outside hospital domain highlights the stressors from outside the hospital relating to the service users’ friends, family, or home. The patient community domain pertains to the collective values, beliefs, and behavior among service user groups and their relevance for producing contagion or discord. Moreover, the patient characteristics domain expresses a large variety of patient characteristics that can give rise to conflict behavior (i.e., symptoms, personality traits, demographic features). Finally, the regulatory framework domain refers to the external structure of the ward and includes the constraints on the service users’ behavior dictated largely from outside the ward itself (i.e., Mental Health Acts, coerced detention, national policies, hospital policies).
With the aforementioned factors in mind, the Safewards approach seeks to reduce conflict as well as reduce the use of seclusion and restraints through workforce training, service user involvement, debriefing techniques, senior management commitment to change, and the use of audits to inform practice (Bowers et al., 2015). The model also enables the creation of a list of interventions that could enhance the staff modifiers (i.e., actions of the staff as individuals or teams) that can influence the frequency of conflict and containment, thereby reducing conflict and containment rates (Bowers et al., 2015).
A body of research supports the domains in the Safewards model. Eggert et al. (2014) examined the person–environment interaction effects of environmental design on ward climate, safety, job satisfaction, and treatment. With regards to treatment outcomes, as perceived safety increased so did patient discharges, although only to a small degree. This result suggests that, when people feel safe in the treatment environment, treatment is more likely to have a positive impact, resulting in earlier discharge from the hospital. In another study, conducted by van der Schaaf et al. (2013), the ‘presence of an outdoor space,’ ‘special safety measure,’ and a large ‘number of patients in the building’ increased the risk of being secluded. On the other hand, design features such as ‘total private space per patient,’ a higher ‘level of comfort’ and greater ‘visibility on the ward’ decreased the risk of being secluded. Some support was also found in a literature review by Alexander and Bowers (2004) on ward rules, providing evidence that service users were in fact calmer and less disruptive on wards with clear, consistent rules, and clear roles for staff. Finally, service users’ perceptions about the social climate of the ward were found to have a significant relationship with their satisfaction with forensic services. However, the variables most strongly associated with satisfaction with forensic services were their perceptions about the nature of therapeutic relations with staff (Bressington, Stewart, Beer, & MacInnes, 2011). Moreover, in a study of participant observation coupled with interviews of 131 staff collected over 38 months on four acute and two chronic wards, Katz and Kirkland (1990) concluded that violence was in fact more common in wards with unclear staff functions. Violence was less frequent in wards with strong psychiatric leadership, clear staff roles, and events that reflect the Safewards model’s main principles.
Bowers et al. (2015) conducted a large-scale clustered randomized controlled trial over a three-month period to test a series of interventions to increase safety and reduce coercion. The results indicate that simple interventions aiming to improve staff relationships with patients can reduce the frequency of conflict and containment. Furthermore, relative to the control intervention, when conflict events occurred, the Safewards intervention reduced the rate of conflict events by 15 percent and containment events by 26 percent (Bowers et al., 2015). Price, Burbery, Leonard, and Doyle (2016) used a service evaluation incorporating a nonrandomized controlled design to analyze the effects of Safewards on conflict and containment between and within wards. Informal feedback sessions with staff were conducted to explore views on the acceptability of the interventions and the adherence to the interventions was measured. The benefit of using the Safewards intervention in a between-ward analysis by measuring conflict and containment rates failed to reach significance. However, there was a significant association between ward, conflict, and containment. Furthermore, overall views of the interventions were valued more highly on female wards than on male wards. Staff from female wards reported increased confidence in their role, increased psychological understanding of patient behavior, and reduced fear of patients. On the other hand, in male wards, the perception was that the interventions were only of use for patients who were receptive to care and that many of the patients were resistant to engagement with nursing staff at any level beyond having their basic needs met. Hence, interviews of patients and staff about the causes of patient violence gave strong support to the importance of positive appreciation, emotional regulation, teamwork skill, technical mastery, moral commitments, and effective structure (Bensley, Nelson, Kaufman, Silverstein, & Shields, 1995; Bond & Brimblecombe, 2004; Finnema, Dassen, & Halfens, 1994; Lowe, 1992; Spokes et al., 2004). In sum, the Safewards model is showing some promising results for a safer future for patients and staff in forensic mental services and merits further empirical inquiry.
#### Rehabilitation—The Good Lives Model
Offender rehabilitation has been a topic of continuous debate, with a profound shift in attitudes in the last few decades (Ward & Brown, 2004). As discussed earlier in this chapter, the risk-need-responsivity (RNR) model (Andrews & Bonta, 2006) has been a prevailing approach to treatment of offenders in Canada, as well as other parts of the world (e.g., Australia, the United Kingdom, and New Zealand), for the last three decades. As its underlying assumption, the model highlights that offenders are bearers of risk for recidivism, and that the primary aim of offender rehabilitation should be to reduce this recidivism risk. Although meta-analyses provide support for the efficacy of this model in reducing recidivism among general and sexual offenders (Andrews et al., 1990; Andrews & Dowden, 2005; Hanson et al., 2002), some researchers have argued that this evidence is insufficient to conclude that this treatment-based program is in fact effective. More specifically, Ward and Stewart (2003) argue that the RNR model does not pay enough attention to the individual and the idiosyncratic goals and preferences of service users.
The model proposed by Ward and his colleagues is highly influenced by the area of positive psychology rather than the cognitive behavioral/social learning framework of the RNR oriented programs. This theory of rehabilitation is known as the good lives model (GLM) and it represents a strength-based approach to offender rehabilitation. The model promises to enhance the effectiveness of current efforts by addressing limitations of the risk management approach and helping reduce recidivism rates (Andrews, Bonta, & Wormith, 2011; Lindsay, Ward, Morgan, & Wilson, 2007; Ward & Brown, 2004; Ward & Gannon, 2006; Whitehead, Ward, & Collie, 2007). The dual focus of GLM is to help offenders to live better by promoting personally important goals and equipping them with the skills, values, and attitudes necessary to reduce and manage their likelihood of committing further crimes (Ward & Gannon, 2006).
GLM identifies the primary ‘human goods’ that ultimately lead to an individual’s sense of happiness, such as healthy living and functioning, knowledge, excellence in agency, inner peace, friendship, spirituality, and creativity (Ward & Gannon, 2006). The achievement of these primary goods is highly dependent on internal factors, such as skills and abilities, and external factors, such as opportunities and support networks, unique to the individual (Barnao et al., 2010). An individual seeking inner peace may, for instance, turn to substance use if they are unable to attain this ‘human good’ in more socially acceptable ways. The GLM integrates personal preferences into treatment planning through the completion of a comprehensive assessment to gain an understanding of how each offender conceptualizes a ‘good life.’ On the basis of that information, a treatment plan is designed to increase the person’s capacity to achieve their version of a ‘good life’ using socially acceptable and legal means. By focusing on providing offenders with the necessary internal and external conditions for meeting their human needs in more adaptive ways, the assumption is that they will be less likely to harm themselves or others.
Proponents of GLM argue that it offers a unique approach to rehabilitating mentally ill offenders. Specifically, GLM conceptualizes people with mental illness as being no different from others insofar that they, like everybody, are attempting to achieve primary goods and live worthy lives. However, the presence of mental illness negatively impacts the salience of primary goods and compromises the means (i.e., cognitive, psychological, and social skills) by which they are obtained—all of which are further impacted by external variables (e.g., level of distress, financial resources: Barnao, Robertson, & Ward, 2010). Under the GLM framework, interventions and programming in forensic settings can establish new normative means by which individuals seek (and obtain) primary goods by assisting to increase an individual’s capabilities and transition antisocial means to ones that are more socially acceptable (Barnao et al., 2010). However, the author suggests that for some cases, medical-modeled care remains the most realistic approach to achieving primary goods (e.g., inner peace: Barnao & Ward, 2015). Introducing GLM into forensic settings is timely given recent trends toward more holistic approaches to rehabilitation as well as efforts to reduce the negative effects of mental illness and criminal identities. GLM is also in keeping with human rights perspectives of offender rehabilitation for its concentration on service users as self-determining agents, rather than objects of risk management.
The most commonly cited criticism of GLM is its lack of strong empirical support. Recent programs using GLM have demonstrated positive results. For instance, Lindsay et al. (2007) reported that the GLM approach was an effective way of motivating sexual offenders with intellectual disabilities and encouraging them to engage in the difficult process of changing entrenched maladaptive behaviors. Furthermore, they also found that utilizing the principles of this model enabled therapists to make progress with particularly intractable cases (Lindsay et al., 2007). Additional research, principally with sex offender populations, has also confirmed the principles underlying the GLM model (Barnett & Wood, 2008; Harkins & Woodhams, 2012; Whitehead et al., 2007; Willis & Grace, 2008). Research with non-mentally ill offender populations demonstrate improved treatment engagement and therapeutic alliance, reduced dropout rates, and improved outcomes as a result of incorporating GLM principles into treatment programs (Barnao, Ward, & Casey, 2015; Ware & Bright, 2008). Early research with forensic populations has found that GLM helped forensic service users discover their motivation for change through supporting the development of personally meaningful goals (Barnao et al., 2015) and has allowed practitioners to integrate various treatment theories into their work with patients (Barnao & Ward, 2015). Bouman, Schene, and de Ruiter’s (2009) study of the short- and long-term effects of subjective well-being among forensic service users in the community found that satisfaction with health and fulfillment of life goals were associated with decreased offending (self-reported) in the short term. Moreover, in the long term, satisfaction with health and general life satisfaction were associated with reduced reconvictions for violence among those who were assessed as high risk. These findings support the notion that fulfillment of primary goods is associated with reduced recidivism as well as desistance. In sum, GLM has demonstrated preliminary effectiveness in enhancing treatment engagement, fostering desistance, and paying increased attention to environmental contexts. GLM has the promise to supply forensic mental health practitioners with the tools needed to engage difficult patient populations, and to strengthen the capacity of forensic service users to overcome tremendous challenges in their lives.
#### Providing Forensic Expertise Upstream in Mental Health
Research has shown that as many as three-quarters of individuals entering forensic services had previously received some form of psychiatric service (Crocker et al., 2015a). Studies have also reported patterns of individuals’ unsuccessful attempts to obtain the help of health care providers during times of crisis and immediately preceding the commission of violent acts (Stanton & Skipworth, 2005). This points to an opportunity for violence or criminality prevention strategies to be put in place. To do so, forensic expertise and experience must be shared upstream by bringing the risk assessment and management knowledge to community-based and civil psychiatric services and programs in order to target risk factors and potentially prevent criminal behavior and violence. This is consistent with a key recommendation of a large Canadian group of stakeholders who gathered in Montreal in 2014 to establish a set of priorities for research and knowledge transfer in the field of mental health, justice, and safety (Crocker et al., 2015c). When forensic mental health and general mental health services work in different subsystems of care, this knowledge transfer is likely to be more onerous. Targeted and well-supported knowledge transfer strategies must, therefore, be implemented to share the forensic expertise. Knowledge exchange is a two-way dialogue and exchange of information between those who receive and use knowledge and those who generate and transfer it (Mitton, Adair, McKenzie, Pattent, & Perry, 2007). Effective knowledge transfer strategies are meant to draw upon existing relationships, resources, and networks to the maximum extent possible, while at the same time building new resources as needed by users. Crocker et al. (2015) suggested that current knowledge exchange initiatives in forensic mental health remain insufficient for the systematic use of empirically based risk assessment methods; only through a collaborative process of elaboration and implementation of these tools will they be widely implemented and used (Scullion, 2002). Stronger partnerships between forensic and general mental health services could increase the cross-pollination of evidence-based risk assessment and management strategies with the aim of preventing the involvement of people with mental illnesses, especially those at risk for criminality and aggressive behavior, in the criminal justice, forensic, and correctional systems. In turn, these partnerships can provide increased opportunities for general adult mental health services to infuse forensic mental health services with recognized evidence-based practices such as integrated concurrent disorder (severe mental illness and substance use disorder) treatment strategies (Mueser, Noordsy, Drake, & Fox, 2003) and progressive therapeutic approaches (e.g., recovery-oriented). In turn, this would lead to increased continuity of care between the systems.
#### Patient Engagement/Service User Involvement
Over the past decade, there has been a strong push internationally toward models of mental health service delivery that are patient-centered and recovery-oriented (Mental Health Commission of Canada, 2012; U.S. Department of Health and Human Services, 2009). Patient engagement refers to the active participation and meaningful involvement of patients in a range of activities and decision-making processes in the health care system (Tambuyzer, Pieters, & Van Audenhove, 2011). It aims to provide patients with self-determination and control over health care decisions, and to move away from paternalistic health care practices toward systems of care that support patients’ choices and acknowledge the value of their lived experiences (Forbat, Hubbard, & Kearney, 2009; Liberman & Kopelowicz, 2005; Tambuyzer, Pieters, & Van Audenhove, 2011).
In many ways, forensic mental health systems may seem to be unsuitable places for patient engagement. Certain characteristics of forensic services, such as the public safety and involuntary orientation, complicate processes aimed at building engagement and facilitating power sharing. The real potential for dangerous situations to occur means that containment and control practices are prioritized in forensic settings, and patient engagement activities may feel unsafe and uncomfortable for forensic mental health service providers. The characteristics of some forensic service users, such as antisocial personality disorder, criminal or violent histories, susceptibility to mental decompensation, poor illness insight, treatment nonadherence, suicidality, and risk of aggression or violence, can present serious impediments to adopting patient engagement strategies in a forensic mental health hospital (Green, Batson, & Gudjonsson, 2011).
For the aforementioned reasons, patient engagement historically has not been prioritized in the forensic mental health system. Nevertheless, a growing number of scholars and practitioners, who recognize the value of patient engagement practices and recovery principles, are wrestling with the issues associated with incorporating them into forensic mental health settings (Drennan & Alred, 2012; Gudjonsson, Webster, & Green, 2010; McKenna et al., 2014; Simpson & Penney, 2011). The service user movement in some jurisdictions, such as the United Kingdom, is particularly strong and has made substantial gains in the forensic system (Bowser, 2012; Spiers, Harney, & Chilvers, 2005). In order to support patient engagement at a systems level, organizations must place value on the lived experiences of service users and meaningfully involve them in the planning and delivery of services. Forensic service users would be supported to collaborate in their own care and to help others in similar situations (e.g., co-facilitation, peer support). They can also be integrated into quality improvement processes, involved in the hiring and training of staff, and engaged as peer researchers (Bowser, 2012; Livingston, Nijdam-Jones, & Team P.E.E.R., 2012; Livingston, Nijdam-Jones, Lapsley, Calderwood, & Brink, 2013).
Studies in this area are demonstrating that, despite the challenges, forensic service users can be engaged in ways that are consistent with recovery-oriented, patient-centered care approaches (Livingston, Nijdam-Jones, & Brink, 2012; Staley, Kabir, & Szmukler, 2013). Enhancing patient engagement in a custodial setting has the potential to enhance forensic service users’ experiences of care (Livingston et al., 2013) and improve safety (Polacek et al., 2015). Greater research is needed to better understand how patient engagement and related approaches (e.g., recovery) influence forensic mental health processes (e.g., risk management) and outcomes (e.g., recidivism).
#### 6 Conclusion
This review has exposed the breadth and variety of legal frameworks, processes, and pathways through forensic mental health services around the world. The term forensic contains many different kinds of services, populations, and systems, depending on where they are located in the world. Understanding that such heterogeneity exists is important for researchers to consider in relation to the generalizability of their findings to other contexts, and for administrators and clinicians to consider in relation to evidence-based practices. With this in mind, there is an obvious need to assess the performance of different models for organizing forensic mental health systems, fostering international comparisons, and controlling for population characteristics.
This review also demonstrated the interest of bringing forensic mental health research, practice, and administration closer to current trends in general adult mental health care, which is increasingly strengths-based, consumer participation-based, quality measurement-based, and community-oriented. We further propose a balanced care approach to the organization of forensic services, in line with general mental health services. Moreover, we also identified significant gaps in the literature in the area of community integration services for justice-involved people with severe mental health problems. A great deal can be learned by looking at complementary systems within nations, but also by looking outward—across nations— to find solutions for the urgent, transnational problems shared by forensic mental health service providers and administrators around the world.
Beyond the system-level characteristics identified in this review, the field would benefit from greater interdisciplinary (e.g., history, sociological, political science, social psychology, cultural studies) work to understand how the organization and structure of forensic mental health systems are influenced by, and reproduce, historical and ongoing social, economic, political, and cultural factors. A robust body of scholarship exists to understand the connection between punishment (and penal institutions) and society, and to trace this through history and compare it between different nations (Simon & Sparks, 2013). Connecting this body of theory and research to the context of forensic mental health systems would allow us to reach a deeper understanding of contemporary trends. There are, therefore, many future opportunities to expand the field of forensic mental health services by growing international, interdisciplinary collaborations.
#### Notes
The authors are grateful to Precilia Hanan, research assistant at the Douglas Mental Health University Institute and McGill University in Montreal, as well as Zach MacMillan, research assistant at Saint Mary’s University in Halifax, for their help in preparing the documentation and summarizing studies for this book chapter. Many thanks also to Dr. Quazi Haque, chair of the U.K. Quality Network for Forensic Mental Health Services and executive medical director of Partnerships in Care, and Dr. Lindsay Thomson, medical director of Forensic Network in Scotland, for sharing their knowledge and insights on the development of quality standards in forensic mental health services. We would like to thank as well Dr. Phil Klassen, vice president medical services at the Ontario Shores Centre for Mental Health and member of the Ontario Forensic Quality Initiative in Canada, and Dr. Jorge Folino, professor at the National University of La Plata in Argentina.
Although we focus our review on adult forensic mental health services, we acknowledge a growing need for research and thought into the youth forensic population. Furthermore, we do not specifically address the issue of forensic intellectual disabilities services, most of which are under forensic mental health services with some specialized services particularly prominent and well documented in the United Kingdom (Lindsay et al., 2010).
Equivalent of not guilty by reason of insanity in other jurisdictions.
A court-ordered detention of a convicted individual for treatment (e.g., www.nes-mha.scot.nhs.uk/people1e.htm).
The World Health Organization has published reports on the mental health systems of over 80 countries. They may be accessed here: www.who.int/mental_health/who_ aims_country_reports/en
The difference between a placement order and a treatment order lays in the level of security: patients under placement orders are admitted to a forensic facility and may only be discharged by a court order. They are nearly always unlimited in duration and are most often given to patients who have committed a severe offense against a person. A patient under a treatment order is treated largely like a civil patient.
Also called the Victorian Institute of Forensic Mental Health.
In Canada, provincial correctional facilities are for individuals whose sentence is less than two years.
Most South American countries use the word unimputable to describe not criminally responsible offenders.
Usually includes physical environments such as the structure and design of buildings, fences, locks and keys, camera system circuits, communication technologies, alarms, etc.
Usually involves policies and procedures, search procedures, incident reporting procedures, debriefings, etc.
Usually involves staff motivation and training, knowledge of patients (strengths and vulnerabilities), multidisciplinary communications between security staff and clinical staff, etc.
Acronym used by neighborhood residents to oppose the development or change in occupancy or a dwelling to house or support individuals who are ‘undesirable’ or ‘unwanted’ in a sector. Examples include supportive housing for persons living with a mental illness and safe injection sites.
#### References
Adjorlolo, S. , Chan, H. C. (Oliver), & Mensah Agboli, J. (2016). Adjudicating mentally dis-ordered offenders in Ghana: The criminal and mental health legislations. International Journal of Law and Psychiatry, 45, 1–8. doi:10.1016/j.ijlp.2016.02.001.
Alexander, J. , & Bowers, L. (2004). Acute psychiatric ward rules: A review of the literature. Journal of Psychiatric and Mental Health Nursing. doi:10.1111/j.1365-2850.2004.00770.x.
Almanzar, S. , Katz, C. L. , & Harry, B. (2015). Treatment of mentally ill offenders in nine developing Latin American countries. Journal of the American Academy of Psychiatry and the Law, 43, 340–349.
Almvik, R. , Hatling, T. , & Woods, P. (2000). The role of forensic nurses in Norway. In D. Robinson & A. Kettles (Eds.), Forensic nursing and multidisciplinary care of the mentally dis-ordered offender (pp. 227–239). London, Philadephia, PA: Jessica Kingsley Publishers.
American Law Institute: Model Penal Code. (1962). Philadelphia, PA: The Executive Office, The American Law Institute.
Andrews, D. A. (2012). The Risk-Need-Responsivity (RNR) Model of correctional assessment and treatment. In J. A. Dvoskin , J. L. Skeem , R. W. Novaco , & K. S. Douglas (Eds.), Using social science to reduce violent offending. New York: Oxford University Press.
Andrews, D. A. , & Bonta, J. (2006). The psychology of criminal conduct (4th ed.). Cincinnati, OH: Anderson.
Andrews, D. A. , & Bonta, J. (2010). Rehabilitating criminal justice policy and practice. Psychology, Public Policy, and Law, 16(1), 39–55. doi:10.1037/a0018362.
Andrews, D. A. , Bonta, J. , & Hoge, R. D. (1990). Classification for effective rehabilitation: Rediscovering psychology. Criminal Justice and Behavior, 17(1), 19–52.
Andrews, D. A. , Bonta, J. , & Wormith, J. S. (2011). The Risk-Need-Responsivity (RNR) Model: Does adding the Good Lives Model contribute to effective crime prevention? Criminal Justice and Behavior, 38(7), 735–755. doi:10.1177/0093854811406356.
Andrews, D. A. , & Dowden, C. (2005). Managing correctional treatment for reduced recidivism: A meta-analytic review of programme integrity. Legal and Criminological Psychology, 10, 173–187. doi:10.1348/135532505X36723.
Andrews, D. A. , Zinger, I. , Hoge, R. D. , Bonta, J. , Gendreau, P. , & Cullen, F. T. (1990). Does correctional treatment work? A clinically relevant and psychologically informed meta-analysis. Criminology, 28(3), 369–404. doi:10.1111/j.1745-9125.1990.tb01330.x.
Asokan, T. V. (2014). Forensic psychiatry in India: The road ahead. Indian Journal of Psychiatry, 56(2), 121–127. doi:10.4103/0019-5545.130479.
Australian Commission on Safety and Quality in Health Care. (2014). Scoping study on the implementation of national standards in mental health services. Sydney: ACSQHC.
Avramenko, A. , Evers, S. , Philipse, M. , Chakhssi, F. , & Ament, A. (2009). Cost of care of patients with personality disorders in forensic psychiatric hospitals in the Netherlands. Criminal Behaviour and Mental Health, 19, 165–177. doi:10.1002/cbm.729.
Barbaree, H. E. , & Goering, P. (2007). Summary report on the “evidence-based practices in forensic mental health programs and services project”: The development of standards, benchmarks, and performance indicators. Toronto: The Centre for Addiction and Mental Health; The University of Toronto.
Barbui, C. , & Saraceno, B. (2015). Closing forensic psychiatric hospitals in Italy: A new revolution begins? The British Journal of Psychiatry, 206(6), 445–446. doi:10.1192/bjp.bp.114.153817.
Barnao, M. , Robertson, P. , & Ward, T. (2010). Good Lives Model applied to a forensic population. Psychiatry, Psychology and Law, 17(2), 202–217. doi:10.1080/13218710903421274.
Barnao, M. , & Ward, T. (2015). Sailing uncharted seas without a compass: A review of interventions in forensic mental health. Aggression and Violent Behavior, 22, 77–86. doi:10.1016/j.avb.2015.04.009.
Barnao, M. , Ward, T. , & Casey, S. (2015). Taking the good life to the institution: Forensic service users’ perceptions of the Good Lives Model. International Journal of Offender Therapy and Comparative Criminology, 1–21.
Barnett, G. , & Wood, J. L. (2008). Agency, relatedness, inner peace, and problem-solving in sexual offending: How sexual offenders prioritize and operationalize their Good Lives conceptions. Sexual Abuse: A Journal of Research and Treatment, 20, 444–465. doi:10.1177/1079063208325202.
Barrett, B. , Byford, S. , Seivewright, H. , Cooper, S. , & Tyrer, P. (2005). Service costs for severe personality disorder at a special hospital. Criminal Behaviour and Mental Health, 15(3), 184–190. doi:10.1002/cbm.7.
Bauer, A. , Rosca, P. , Grinshpoon, A. , Khawalled, R. , & Mester, R. (2005). Regional psychiatric boards in Israel: Expectations and realities. International Journal of Law and Psychiatry, 28(6), 661–669. doi:10.1016/j.ijlp.2003.09.013.
BC Mental Health & Substance Use Services. (2013). Forensic Psychiatry.
Beck, U. (1992). Risk society: Towards a new modernity. New Delhi: Sage.
Belfrage, H. , & Fransson, G. (2000). Swedish forensic psychiatry: A field in transition. International Journal of Law and Psychiatry, 23(5–6), 509–514.
Bensley, L. , Nelson, N. , Kaufman, J. , Silverstein, B. , & Shields, J. W. (1995). Patient and staff views of factors influencing assaults on psychiatric hospital employees. Issues in Mental Health Nursing, 16(5), 433–446. doi:10.3109/01612849509006944.
Bergman-Levy, T. , Bleich, A. , Kotler, M. , & Melamed, Y. (2010). Security and psychiatry: The British experience and implications for forensic psychiatry services in Israel. Israel Medical Association Journal, 12(10), 587–591.
Bjørkly, S. , Hartvig, P. , Roaldset, J. O. , & Singh, J. P. (2015). Norwegian developments and perspectives on violence risk assessment. Criminal Justice and Behavior, 41(6402), 1384–1397. doi:10.1177/0093854814547949.
Bloom, J. D. , Williams, M. H. , & Bigelow, D. A. (2000). The forensic psychiatric system in the United States. International Journal of Law and Psychiatry, 23(5–6), 605–613.
Blumstein, A. (2012). Crime and incarceration in the United States. In J. A. Dvoskin , J. L. Skeem , R. W. Novaco , & K. S. Douglas (Eds.), Using social science to reduce violent offending (pp. 3–29). New York: Oxford University Press.
Bond, K. , & Brimblecombe, N. (2004). Violent incidents and staff views. Mental Health Nursing, 23, 10–12.
Bouman, Y. H. A. , Schene, A. H. , & de Ruiter, C. (2009). Subjective well-being and recidivism in forensic psychiatric outpatients. International Journal of Forensic Mental Health, 8(4), 225–234. doi:10.1080/14999011003635647.
Bousfield, N. , Cook, A. , & Roesch, R. (2014). Evidence-based criminal justice policy for Canada: An exploratory study of public opinion and the perspective of mental health and legal professionals. Canadian Psychology, 55(3), 204–215. doi:10.1037/a0036860.
Bower, P. , & Gilbody, S. (2005). Stepped care in psychological therapies: Access, effectiveness and efficiency. Narrative literature review. British Journal of Psychiatry, 186, 11–17.
Bowers, L. (2014). Safewards: A new model of conflict and containment on psychiatric wards. Journal of Psychiatric and Mental Health Nursing, 21(6), 499–508. doi:10.1111/jpm.12129.
Bowers, L. , James, K. , Quirk, A. , Simpson, A. , Stewart, D. , Hodsoll, J. , & Simpson, B. (2015). Reducing conflict and containment rates on acute psychiatric wards: The Safewards cluster randomised controlled trial. International Journal of Nursing Studies, 52, 1412–1422. doi:10.1016/j.ijnurstu.2015.05.001.
Bowser, A. (2012). “Nothing for us without us either” – Forensic service user involvement. In G. Drennan & D. Alred (Eds.), Secure recovery: Approaches to recovery in forensic mental health settings (pp. 41–54). New York: Routledge.
Bressington, D. , Stewart, B. , Beer, D. , & MacInnes, D. (2011). Levels of service user satisfaction in secure settings—A survey of the association between perceived social climate, perceived therapeutic relationship and satisfaction with forensic services. International Journal of Nursing Studies, 48(11), 1349–1356. doi:10.1016/j.ijnurstu.2011.05.011.
Brinded, P. M. (2000). Forensic psychiatry in New Zealand. International Journal of Law and Psychiatry, 23(5–6), 453–465.
Bureau of Justice Statistics. (2004). Table 35. The defense of insanity: Standards and procedures. In State Court Organization (pp. 199–202). Washington, DC: U.S. Department of Justice.
Carabellese, F. , & Felthous, A. (2016). Closing Italian forensic psychiatry hospitals in favor of treating insanity acquittes in the community. Behavioral Sciences and the Law, 34, 444–459. doi:10.1002/bsl.2234.
Care Pathways and Packages Project. (2009). Forensic pathway allocation. United Kingdom: National Health Service.
Cartuyvels, Y. , Champetier, B. , & Wyvekens, A. (2010). La défense sociale en Belgique, entre soin et sécurité. Une approche empirique. Déviance et Société, 34(4), 615–645.
Cartuyvels, Y. , & Cliquennois, G. (2015). La défense sociale pour les aliénés délinquants en Belgique: Le soin comme légitimation d’un dispositif de contrôle? [The Punishment of Mentally Ill Offenders in Belgium: Care as Legitimacy for Control]. Champ pénal/Penal Field, XII. doi:10.4000/champpenal.9204.
Centre de psychiatrie légale Anvers. (n.d.). Retrieved June 13, 2016, from http://nouvellesprisons.be/fr/prison/centre-de-psychiatrie-legale-anvers.
Centre de psychiatrie légale Gand. (n.d.). Retrieved June 13, 2016, from http://nouvellesprisons.be/fr/prison/centre-de-psychiatrie-legale-gand#tab1-tab.
Chadda, R. K. (2013). Forensic evaluations in psychiatry. Indian Journal of Psychiatry, 55(4), 393–399.
Chan, L. G. , & Tomita, T. (2013). Forensic psychiatry in Singapore. Asia-Pacific Psychiatry, 5(4), 344–351. doi:10.1111/appy.12033.
Cheang, M. (1985). The insanity defence in Singapore. The Anglo American Law Review, 14(3), 245–263. doi:10.1525/sp.2007.54.1.23.
Chen, C. , Ou, J. J. , & Wang, X. (2013). Guidelines on disposition of forensic psychiatric patients are urgent needed in China. Journal of Forensic and Legal Medicine, 20(7), 823–824. doi:10.1016/j.jflm.2013.06.031.
Cid, R. D. (2010). Insane defendants and forensic convicts: Before and after the onset of the new forensic psychiatry network and the criminal justice system reform in Chile. Current Opinion in Psychiatry, 23(5), 458–462. doi:10.1097/YCO.0b013e32833bb31a.
Ciszewski, L. , & Sutula, E. (2000). Psychiatric care for mentally disturbed perpetrators of criminal acts in Poland. International Journal of Law and Psychiatry, 23(5–6), 547–554. doi:10.1016/S0160-2527(00)00055-8.
Code pénal suisse. (1937).
Cohen, A. , & Eastman, N. L. G. (2000). Needs assessment for mentally disordered offenders: Measurement of “ability to benefit” and outcome. British Journal of Psychiatry, 177, 493–498. doi:10.1192/bjp.177.6.493.
Coid, J. (2007). Comparison of outcomes following after-care from forensic and general adult psychiatric services. The British Journal of Psychiatry, 198, 509–514. doi:10.1192/bjp.bp.106.023044.
Cook, A. N. , & Roesch, R. (2012). “Tough on crime” reforms: What psychology has to say about the recent and proposed justice policy in Canada. Canadian Psychology/Psychologie Canadienne, 53(3), 217–225. doi:http://dx.doi.org/10.1037/a0025045.
Coombs, T. , Taylor, M. , & Pirkis, J. (2011). Benchmarking forensic mental health organizations. Australasian Psychiatry, 19(2), 133–142. doi:10.3109/10398562.2011.562299.
Craven, M. A. , & Bland, R. (2006). Better practices in collaborative mental health care: An analysis of the evidence base. Canadian Journal of Psychiatry, 51(6 Suppl 1), 7s–72s.
Crichton, J. , Campbell, I. , Bremner, M. , Irwin, D. , Gallagher, E. , McGeachie, K. , & White, T. (2004). Definition of security levels in psychiatric inpatient facilities in Scotland.
Criminal Code of Canada. (1992). L.R.C. C-46.
Criminal Procedures Act. (2016). Retrieved July 4, 2016, from www.mwcscot.org.uk/the-law/criminal-procedures-act/.
Crocker, A. G. , Nicholls, T. L. , Côté, G. , Latimer, E. A. , & Seto, M. C. (2010). Individuals Found Not Criminally Responsible on Account of Mental Disorder: Are we providing equal protection and equivalent access to mental health services across Canada? Canadian Journal of Community Mental Health, 29(2), 47–54. doi:10.7870/cjcmh-2010-0020.
Crocker, A. G. , Nicholls, T. L. , Seto, M. C. , Charette, Y. , Côté, G. , & Caulet, M. (2015a). The National Trajectory Project of Individuals found Not Criminally Responsible on Account of Mental Disorder in Canada: Part 2–The people behind the label. Canadian Journal of Psychiatry, 60(3), 106–116.
Crocker, A. G. , Nicholls, T. L. , Seto, M. C. , Charette, Y. , Côté, G. , & Caulet, M. (2015b). The National Trajectory Project of Individuals Found Not Criminally Responsible on Account of Mental Disorder in Canada. Part 1—Context and methods. Canadian Journal of Psychiatry, 60(3), 95–105.
Crocker, A. G. , Nicholls, T. L. , Seto, M. C. , Roy, L. , Leclair, M. C. , Brink, J. , & Côté, G. (2015c). Research priorities in mental health, justice, and safety: A multidisciplinary stakeholder report. International Journal of Forensic Mental Health, 14(3), 205–217. doi:10.1080/14999013.2015.1073197.
Darjee, R. , & Crichton, J. (2003). Personality disorder and the law in Scotland: A historical perspective. The Journal of Forensic Psychiatry & Psychology, 14(2), 394–425. doi:10.1080/1478994031000136536.
Davidson, C. (2015). France’s forensic psychiatry provision—Is it up to scratch? The Lancet Psychiatry, 2(5), 385–387. doi:10.1016/S2215-0366(15)00186-8.
de Boer, J. , & Gerrits, J. (2007). Learning from Holland: The TBS system. Psychiatry, 6(11), 459–461. doi:10.1016/j.mppsy.2007.08.008.
de Ruiter, C. , & Hildebrand, M. (2003). The dual nature of forensic psychiatric practice: Risk assessment and management under the Dutch TBS-order. In P. J. van Koppen & S. D. Penrod (Eds.), Adversarial versus inquisitorial justice: Psychological perspectives on criminal justice systems (pp. 91–106). New York: Kluwer Academic/Plenum.
de Ruiter, C. , & Hildebrand, M. (2007). Risk assessment and treatment in Dutch forensic psychiatry. Netherlands Journal of Psychology, 63(4), 152–160. doi:10.1007/BF03061078.
Department of Mental Health and Substance Abuse—World Health Organization. (n.d.). Sweden—Mental Health Atlas 2011. Geneva, Switzerland: World Health Organization. doi:10.1093/bja/aet535.
Douw, F. , Garman, G. , Liausedas, A. , Sergienko, I. , Temchenko, O. , & van Voren, R. (2015). Review of forensic psychiatric and prison mental health services in Ukraine: Report. Ukrainian Parliament Commissioner for Human Rights.
Drennan, G. , & Alred, D. (2012). Secure recovery: Approaches to recovery in forensic mental health settings. New York: Routledge.
Dvoskin, J. A. , Skeem, J. L. , Novaco, R. W. , & Douglas, K. S. (Eds.). (2012). Using social science to reduce violent offending. New York: Oxford University Press.
Edworthy, R. , Sampson, S. , & Völlm, B. (2016). Inpatient forensic-psychiatric care: Legal frameworks and service provision in three European countries. International Journal of Law and Psychiatry (In press). doi:10.1016/j.ijlp.2016.02.027.
Eggert, J. E. , Kelly, S. P. , Margiotta, D. T. , Hegvik, D. K. , Vaher, K. A. , & Kaya, R. T. (2014). Person-environment interaction in a new secure forensic state psychiatric hospital. Behavioral Sciences and the Law, 32(4), 527–538. doi:10.1002/bsl.2127.
El Hamaoui, Y. , Moussaoui, D. , & Okasha, T. (2009). Forensic psychiatry in north Africa. Current Opinion in Psychiatry, 22(5), 507–510. doi:10.1097/YCO.0b013e32832ee38d.
Elsayed, Y. A. , Al-Zahrani, M. , & Rashad, M. M. (2010). Characteristics of mentally ill offenders from 100 psychiatric court reports. Annals of General Psychiatry, 9(4). doi:10.1186/1744-859X-9-4.
Epperson, M. W. , Wolff, N. , Morgan, R. D. , Fisher, W. H. , Frueh, B. C. , & Huening, J. (2014). Envisioning the next generation of behavioral health and criminal justice interventions. International Journal of Law and Psychiatry, 37(5), 427–438. doi:10.1016/j.ijlp.2014.02.015.
Eronen, M. , Repo, E. , Vartiainen, H. , & Tiihonen, J. (2000). Forensic psychiatric organization in Finland. International Journal of Law and Psychiatry, 23(5–6), 541–546. doi:10.1016/S0160-2527(00)00059-5.
Every-Palmer, S. , Brink, J. , Chern, T. P. , Choi, W. K. , Hern-Yee, J. G. , Green, B. , & Mellsop, G. (2014). Review of psychiatric services to mentally disordered offenders around the Pacific Rim. Asia-Pacific Psychiatry, 6, 1–17. doi:10.1111/appy.12109.
Finnema, E. J. , Dassen, T. , & Halfens, R. (1994). Aggression in psychiatry: A qualitative study focusing on the characterization and perception of patient aggression by nurses working on psychiatric wards. Journal of Advanced Nursing, 19(6), 1088–1095. doi:10.1111/j.1365-2648.1994.tb01192.x.
Fitch, W. L. (2014). Forensic mental health services in the United States: 2014. Alexandria, Virginia: National Association of State Mental Health Program Directors.
Folino, J. O. , Montero Vazquez, J. , & Sarmiento, D. R. (2000). Forensic psychiatric system in the province of Buenos Aires. International Journal of Law and Psychiatry, 23(5–6), 567–577.
Forbat, L. , Hubbard, G. , & Kearney, N. (2009). Patient and public involvement: Models and muddles. Journal of Clinical Nursing, 18(18), 2547–2554. doi:10.1111/j.1365-2702.2008.02519.x.
Forensic Network. (2016). Services in Scotland. Retrieved June 28, 2016, from www.forensicnetwork.scot.nhs.uk/services-in-scotland.
Fujii, C. , Fukuda, Y. , Ando, K. , Kikuchi, A. , & Okada, T. (2014). Development of forensic mental health services in Japan: Working towards the reintegration of offenders with mental disorders. International Journal of Mental Health Systems, 8, 21. doi:10.1186/1752-4458-8-21.
Gao, B. , Reid, W. H. , & Li, J. (2011). Forensic psychiatry in the People’s Republic of China. Journal of Psychiatric Practice, 17(2), 129–132. doi:10.1097/01.pra.0000396065.79719.1e.
Goffman, E. (1961). Asylums: Essays on the social situation of mental patients and other inmates. New York: Anchor.
Goldman, H. H. , Thelander, S. , & Westrin, C. G. (2000). Organizing mental health services: An evidence-based approach. Journal of Mental Health Policy and Economics, 3(2), 69–75.
Goossens, I. , Nicholls, T. L. , Seto, M. C. , Wilson, C. M. , Charette, Y. , & Crocker, A. G. (2016). Examining the High-Risk Accused designation for individuals found Not Criminally Responsible on account of Mental Disorder.
Gordon, H. , Kirchhoff, E. , & Silfen, P. (1996). Forensic psychiatry in Israel: Some comparisons with England and Wales. The Journal of Forensic Psychiatry, 7(1), 92–113. doi:10.1080/09585189608409919.
Graf, M. , & Dittmann, V. (2007). Psychopathic disorders and the criminal law in Switzerland. In A. Felthous & H. Sass (Eds.), The international handbook of psychopathic disorders and the law: Volume 2 (pp. 229–242). Chichester; Hoboken, NJ: John Wiley & Sons.
Green, T. , Batson, A. , & Gudjonsson, G. H. (2011). The development and initial validation of a service-user led measure for recovery of mentally disordered offenders. Journal of Forensic Psychiatry & Psychology, 22, 252–265. doi:10.1080/14789949.2010.541271.
Greenberg, D. , & Felthous, A. (2007). The insanity defense and psychopathic disorders in the United States and Australia. In A. Felthous & H. Sass (Eds.), The international handbook of psychopathic disorders and the law, volume 2 (pp. 255–274). Chichester; Hoboken, NJ: John Wiley & Sons.
Gudjonsson, G. H. , Webster, G. , & Green, T. (2010). The recovery approach to care in psychiatric services: Staff attitudes before and after training. Psychiatrist, 34(8), 326–329. doi:10.1192/pb.bp.109.028076.
Gunn, J. , Browne, F. , Darjee, R. , Kennedy, H. G. , Mackay, R. D. , & Mohan, D. (2013). Legal arrangements in the rest of the British Isles and Islands. In J. Gunn & P. J. Taylor (Eds.), Forensic psychiatry: Clinical, legal and ethical issues (2nd edition, pp. 86–110). Boca Raton, FL: CRC.
Hands, T. (2007). Mental impairment defences. In Law Reform Commission of Western Australia (Ed.), Final report: Review of the law of homicide (pp. 225–259). Perth: Government of Western Australia.
Hanson, R. K. , Gordon, A. , Harris, A. J. R. , Marques, J. K. , Murphy, W. , Quinsey, V. L. , & Seto, M. C. (2002). First report of the collaborative outcome data project on the effectiveness of psychological treatment for sex offenders. Sexual Abuse: A Journal of Research and Treatment, 14(2), 169–194. doi:10.1177/107906320201400207.
Haque, Q. (2016). Where next for the UK Quality Network for Forensic Mental Health Services (QNFMHS)? In 16th Annual Conference of the International Association of Forensic Mental Health Services. New York.
Harkins, L. , & Woodhams, J. (2012). Evaluation of a community-based sex offender treatment program using a Good Lives Model approach. Sexual Abuse: A Journal of Research and Treatment. doi:http://dx.doi.org/10.1177/1079063211429469.
Hartwell, S. W. (2004). Triple stigma: Persons with mental illness and substance abuse problems in the criminal justice system. Criminal Justice Policy Review, 15(1), 84–99. doi:10.1177/0887403403255064.
Hassan, T. , Nizami, A. T. , & Hirji, S. (2015). Forensic psychiatry in Pakistan. International Journal of Law and Psychiatry, 41, 95–104. doi:10.1016/j.ijlp.2015.05.001.
Helse Bergen Haukeland University Hospital. (n.d.). Forensic psychiatry in Norway. Hodgins, S. (2009). The interface between general and forensic psychiatric services. European Psychiatry, 24(6), 354–355. doi:10.1016/j.eurpsy.2009.07.002.
Hogan, M. F. , Adams, J. , Arredondo, R. , Carlile, P. , Curie, C. G. , & Fisher, D. B. (2003). Achieving the promise: Transforming mental health care in America. Final report for the President’s New Freedom Commission on Mental Health. Retrieved from www.mentalhealthcommission.gov/reports/reports.htm.
Hooper, J. F. , & Kaliski, S. (2010). Forensic psychiatry in South Africa. Retrieved May 11, 2016, from http://bama.ua.edu/~jhooper/southaf.html.
Hu, J. , Yang, M. , Huang, X. , & Coid, J. (2011). Forensic psychiatry in China. International Journal of Law and Psychiatry, 34, 7–12. doi:10.1016/j.ijlp.2010.11.002.
Humber, N. , Hayes, A. , Wright, S. , Fahy, T. , & Shaw, J. (2011). A comparative study of forensic and general community psychiatric patients with integrated and parallel models of care in the UK. Journal of Forensic Psychiatry and Psychology, 22(2), 183–202. doi:10.1080/14789949.2010.528010.
Hunyor, J. (2012). A kangaroo loose in the top paddock: Criminal justice, mental impairment and fitness for trial in the Northern Territory. Uluru Criminal Law Conference.
Ilorleifsson, K. (2010). Report to NPS Tallinn, April 2010. The Icelandic Psychiatric Association.
Jackson v. Indiana. 406 U.S. 715 (1972).
Jacobs, P. , Moffatt, J. , Dewa, C. S. , Nguyen, T. , Zhang, T. , & Lesage, A. (2014). Criminal justice and forensic psychiatry costs in Alberta. Institute of Health Economics, Alberta, Canada.
Jager, A. D. (2001). Forensic psychiatry services in Australia. International Journal of Law and Psychiatry, 24(4–5), 387–398. doi:10.1016/S0160-2527(01)00074-7.
Jansman-Hart, E. M. , Seto, M. C. , Crocker, A. G. , Nicholls, T. L. , & Côté, G. (2011). International trends in demand for forensic mental health services. International Journal of Forensic Mental Health, 10(4), 326–336. doi:10.1080/14999013.2011.625591.
Jorm, A. F. , Reavley, N. J. , & Ross, A. M. (2012). Belief in the dangerousness of people with mental disorders: A review. Australian and New Zealand Journal of Psychiatry, 46(11), 1029–1045. doi:10.1177/0004867412442406.
Kamara, R. , & Müller-Isberner, R. (2010). Step by step—Different levels of security in the Haina Vitos Forensic Psychiatric Hospital. In 10th Annual Conference of the International Association of Forensic Mental Health Services. Vancouver.
Kasperson, R. E. , Renn, O. , Slovic, P. , Brown, H. S. , Emel, J. , Goble, R. , & Ratick, S. (1988). The social amplification of risk: A conceptual framework. Risk Analysis, 8(2), 177–187.
Katz, P. , & Kirkland, F. R. (1990). Violence and social structure on mental hospital wards. Psychiatry, 53(3), 262–277.
Kennedy, H. G. (2002). Therapeutic uses of security: Mapping forensic mental health services by stratifying risk. Advances in Psychiatric Treatment, 8(6), 433–443. doi:10.1192/apt.8.6.433.
Kennedy, H. G. , O’Neill, C. , Flynn, G. , & Gill, P. (2010). The Dundrum toolkit. Dangerousness, understanding, recovery and urgency manual (the Dundrum quartet) V1.0.22. Dublin: National Forensic Mental Health Service.
Kleve, L. (1996). Forensic psychiatric services in Norway. The Journal of Forensic Psychiatry, 7(1), 170–176. doi:10.1080/09585189608409925.
Konrad, N. (2005). Managing the mentally ill in the prisons of Berlin. International Journal of Prisoner Health, 1(1), 39–47. doi:10.1080/17449200500157010.
Konrad, N. , & Lau, S. (2010). Dealing with the mentally ill in the criminal justice system in Germany. International Journal of Law and Psychiatry, 33(4), 236–240. doi:10.1016/j.ijlp.2010.06.005.
Koskinen, L. , Likitalo, H. , Aho, J. , Vuorio, O. , & Meretoja, R. (2014). The professional competence profile of Finnish nurses practising in a forensic setting. Journal of Psychiatric and Mental Health Nursing, 21(4), 320–326. doi:10.1111/jpm.12093.
Kramp, P. , & Gabrielsen, G. (2009). The organization of the psychiatric service and criminality committed by the mentally ill. European Psychiatry, 24(6), 401–411. doi:10.1016/j.eurpsy.2009.07.007.
Kumar, D. , Viswanath, B. , Sebestian, A. , Holla, B. , Konduru, R. , Chandrashekar, C. R. , & Math, S. B. (2014). Profile of male forensic psychiatric inpatients in South India. The International Journal of Social Psychiatry, 60(1), 55–62. doi:10.1177/0020764012461334.
Kuo, S. H. (1983). Forensic psychiatry in Taiwan. International Journal of Law and Psychiatry, 6(3–4), 457–472. doi:10.1016/0160-2527(83)90032-8.
Lamb, H. R. (2009). Reversing criminalization. American Journal of Psychiatry, 166(1), 8–10. doi:10.1176/appi.ajp.2008.08101515.
Lamberti, J. S. , Deem, A. , Weisman, R. L. , & LaDuke, C. (2011). The role of probation in forensic assertive community treatment. Psychiatric Services, 62(4), 418–421.
Lauriks, S. , Buster, M. C. , Wit, M. A. de, Arah, O. A. , & Klazinga, N. S. (2012). Performance indicators for public mental healthcare: A systematic international inventory. BMC Public Health, 12(214). doi:10.1186/1471-2458-12-214.
Liberman, R. P. , & Kopelowicz, A. (2005). Recovery from schizophrenia: A concept in search of research. Psychiatric Services, 56(6), 735–742. doi:10.1176/appi.ps.56.6.735.
Lindsay, W. R. , Holland, T. , Wheeler, J. R. , Carson, D. , O’Brien, G. , Taylor, J. L. , & Young, S. J. (2010). Pathways through services for offenders with intellectual disability: A one- and two-year follow-up study. American Journal on Intellectual and Developmental Disabilities, 115(3), 250–262. doi:10.1352/1944-7558-115.3.250.
Lindsay, W. R. , Ward, T. , Morgan, T. , & Wilson, I. (2007). Self-regulation of sex offending, future pathways and the Good Lives Model: Applications and problems. Journal of Sexual Aggression, 13(March 2015), 37–50. doi:10.1080/13552600701365613.
Lipsey, M. W. , & Cullen, F. T. (2007). The effectiveness of correctional rehabilitation: A review of systematic reviews. Annual Review of Law and Social Science, 3(1), 297–320. doi:10.1146/annurev.lawsocsci.3.081806.112833.
Livingston, J. D. (2006). A statistical survey of Canadian forensic mental health inpatient programs. Healthcare Quarterly, 9(2), 56–61.
Livingston, J. D. (2016). What does success look like in the forensic mental health system? Perspectives of service users and service providers. International Journal of Offender Therapy and Comparative Criminology. doi:10.1177/0306624x16639973.
Livingston, J. D. , & Boyd, J. E. (2010). Correlates and consequences of internalized stigma for people living with mental illness: A systematic review and meta-analysis. Social Science & Medicine, 71(12), 2150–2161. doi:10.1016/j.socscimed.2010.09.030.
Livingston, J. D. , Nijdam-Jones, A. , & Brink, J. (2012). A tale of two cultures: Examining patient-centered care in a forensic mental health hospital. Journal of Forensic Psychiatry & Psychology, 23(3), 345–360. doi:10.1080/14789949.2012.668214.
Livingston, J. D. , Nijdam-Jones, A. , Lapsley, S. , Calderwood, C. , & Brink, J. (2013). Supporting recovery by improving patient engagement in a forensic mental health hospital: results from a demonstration project. Journal of the American Psychiatric Nurses Association, 19(3), 132–145. doi:10.1177/1078390313489730.
Livingston, J. D. , Nijdam-Jones, A. , & Team P.E.E.R. (2012). Treatment planning in a forensic mental health hospital: A participatory action research study. ( B. C. F. P. S. Commission , Ed.). Port Coquitlam, British Columbia.
Livingston, J. D. , Rossiter, K. R. , & Verdun-Jones, S. N. (2011). “Forensic” labelling: An empirical assessment of its effects on self-stigma for people with severe mental illness. Psychiatry Research, 188, 115–122. doi:10.1016/j.psychres.2011.01.018.
Livingston, J. D. , Wilson, D. , Tien, G. , & Bond, L. (2003). A follow-up study of persons found not criminally responsible on account of mental disorder in British Columbia. Canadian Journal of Psychiatry, 48(6), 408–415.
Lowe, T. (1992). Characteristics of effective nursing interventions in the management of challenging behaviour. Journal of Advanced Nursing, 17, 1226–1232. doi:10.1111/j.1365-2648.1992.tb01839.x.
Maharajh, H. D. , & Parasram, R. (1999). The practice of psychiatry in Trinidad and Tobago. International Review of Psychiatry, 11(2–3), 173–183. doi:10.1080/09540269974357.
Manetsch, M. (2010). Forensic mental health in Switzerland: Philosophy and services. In A. Bartlett & G. McGauley (Eds.), Forensic mental health: Concepts, systems, and practice (pp. 397–402). Oxford, New York: Oxford University Press.
Mangezi, W. , & Chibanda, D. (2011). Zimbabwe. In H. Ghodse (Ed.), International perspectives on mental health (pp. 56–59). London: RCPsych Publications.
Marais, B. , & Subramaney, U. (2015). Forensic state patients at Sterkfontein Hospital: A 3-year follow-up study. South African Journal of Psychiatry, 21(3), 86–92. doi:10.7196/SAJP.8255.
Margetić, B. , Aukst-Margetić, B. , Ivanec, D. , & Filipčić, I. (2008). Perception of stigmatization in forensic patients with schizophrenia. International Journal of Social Psychiatry, 54(6), 502–513. doi:10.1177/0020764008090842.
Margetić, B. , Ivanec, D. , Zarković Palijan, T. , & Kovacević, D. (2012). Offender patients’ opinions on placement in a forensic hospital. Criminal Behaviour and Mental Health, 22(5), 360–368. doi:10.1002/cbm.
Martinez-Jarreta, B. (2003). Forensic medicine: A lesson to be learned by twenty-firstcentury Spain. Journal of Forensic Psychiatry & Psychology, 14(1), 4–6. doi:10.1080/1478994031000078005.
Mary, P. , Kaminski, D. , Maes, E. , & Vanhamme, F. (2011). Le traitement de la “dangerosité” en Belgique: Internement et mise à la disposition du gouvernement. Champ pénal/Penal Field, 8. doi:10.4000/champpenal.8188.
Måseide, P. H. (2012). The battle about Breivik’s mind. The Lancet, 379(9835), 2413. doi:10.1016/S0140-6736(12)61048-4.
McDaid, D. , & Thornicroft, G. (2005). Mental health II: Balancing institutional and community-based care. European observatory on health systems and policies. World Health Organization. Retrieved from www.euro.who.int/document/e85488.pdf.
McKenna, B. , Furness, T. , Dhital, D. , Park, M. , & Connally, F. (2014). The transformation from custodial to recovery-oriented care: A paradigm shift that needed to happen. Journal of Forensic Nursing, 10(4), 226–233.
McMurran, M. , Khalifa, N. , & Gibbon, S. (2009). Forensic mental health. Cullompton; Portland, OR: Willan.
Mellsop, G. , Choi, W. K. , Every-Palmer, S. , Green, B. , Heffernan, E. , Kachaeva, M. , & Wang, X. (2016). Drug driven psychoses and legal responsibility or insanity in six Western Pacific nations. International Journal of Law and Psychiatry (In press). doi:10.1016/j.ijlp.2016.02.037.
Menezes, S. B. , Oyebode, F. , & Haque, M. S. (2007). Mentally disordered offenders in Zimbabwe and in England and Wales: A socio-demographic study. Medicine, Science and the Law, 47(3), 253–261. doi:10.1258/rsmmsl.47.3.253.
Menezes, S. B. , Oyebode, F. , & Haque, M. S. (2009). Victims of mentally disordered offenders in Zimbabwe, 1980–1990. Journal of Forensic Psychiatry & Psychology, 20(3), 427–439. doi:10.1080/14789940802542907.
Mental Health Commission. (2006). Forensic mental health services for adults in Ireland. Dublin: Mental Health Commission.
Mental Health Coordinating Council. (2015). The mental health rights manual: A guide to the legal and human rights of people navigating the mental health, legal and human service system in NSW (4th ed.). Sydney: MHCC.
Mestdagh, A. , & Hansen, B. (2014). Stigma in patients with schizophrenia receiving community mental health care: A review of qualitative studies. Social Psychiatry and Psychiatric Epidemiology, 49(1), 79–87. doi:10.1007/s00127-013-0729-4.
Milner, A. (1966). M’Naghten and the witch-doctor: Psychiatry and crime in Africa. University of Pennsylvania Law Review, 114, 1134–1169.
Ministry of Health. (2007). Census of forensic mental health services 2005. Wellington: Ministry of Health.
Mitton, C. , Adair, C. E. , McKenzie, E. , Pattent, S. B. , & Perry, B. W. (2007). Knowledge transfer and exchange: Review and synthesis of the literature. The Milbank Quarterly, 85(4), 729–768.
Monahan, J. (1992). Mental disorder and violent behavior: Perceptions and evidence. American Psychologist, 47(4), 511–521.
Monahan, J. , & Steadman, H. J. (2012). Extending violence reduction principles to justiceinvolved persons with mental illness. In J. A. Dvoskin , J. L. Skeem , R. W. Novaco , & K. S. Douglas (Eds.), Using social science to reduce violent offending (pp. 245–261). New York: Oxford University Press.
Mudathikundan, F. , Chao, O. , & Forrester, A. (2014). Mental health and fitness to plead proposals in England and Wales. International Journal of Law and Psychiatry, 37(2), 135–141. doi:10.1016/j.ijlp.2013.11.008.
Mueser, K. T. , Noordsy, D. L. , Drake, R. E. , & Fox, L. (2003). Integrated treatment for dual disorders: A guide for effective practice. ( D. H. Barlow , Ed.). New York: Guilford.
Mullen, P. E. (2000). Forensic mental health. British Journal of Psychiatry, 176, 307–311.
Mullen, P. E. , Briggs, S. , Dalton, T. , & Burt, M. (2000). Forensic mental health services in Australia. International Journal of Law and Psychiatry, 23(5–6), 433–452.
Mullen, P. E. , & Chettleburgh, K. (2002). Review of Queensland forensic mental health services. Victoria, Australia: Victorian Institute of Forensic Mental Health.
Müller-Isberner, R. , Freese, R. , Jöckel, D. , & Gonzalez Cabeza, S. (2000). Forensic psychiatric assessment and treatment in Germany: Legal framework, recent developments, and current practice. International Journal of Law and Psychiatry, 23(5–6), 467–480.
Müller-Isberner, R. , Lichtenfels, K. , & Imbeck, J. (2016). Forensic mental health services: Implementing a quality management system. In 16th Annual Conference of the International Association of Forensic Mental Health Services. New York.
Mundt, A. P. , Frančišković, T. , Gurovich, I. , Heinz, A. , Ignatyev, Y. , Ismayilov, F. , & Priebe, S. (2012). Changes in the provision of institutionalized mental health care in postcommunist countries. PLoS One, 7(6), e38490. doi:10.1371/journal.pone.0038490.
Munetz, M. R. , & Griffin, P. A. (2006). Use of the Sequential Intercept Model as an approach to decriminalization of people with serious mental illness. Psychiatric Services, 57(4), 544–549. doi:10.1176/appi.ps.57.4.544.
Muslim, J. K. , & Chaleby, K. (2007). The insanity defense in Iraq. Journal of Muslim Mental Health, 2(1), 57–64. doi:10.1080/15564900701238575.
Nakatani, Y. (2000). Psychiatry and the law in Japan: History and current topics. International Journal of Law and Psychiatry, 23(5–6), 589–604. doi:10.1192/pb.15.12.721.
Nakatani, Y. (2012). Challenges in interfacing between forensic and general mental health: A Japanese perspective. International Journal of Law and Psychiatry, 35(5–6), 406–411. doi:10.1016/j.ijlp.2012.09.021.
Nakatani, Y. , Kojimoto, M. , Matsubara, S. , & Takayanagi, I. (2010). New legislation for offenders with mental disorders in Japan. International Journal of Law and Psychiatry, 33(1), 7–12. doi:10.1016/j.ijlp.2009.10.005.
National Association of State Mental Health Program Directors Research Institute. (2015). State Mental Health Agency Data. Retrieved December 14, 2016, from www.nri-incdata.org/.
National Health Service. (2013). 2014/15 NHS standard contract for high secure mental health services (adults): Particulars, schedule 2—The services: A—Service specifications.
National Treatment Strategy Working Group. (2008). A systems approach to substance use in Canada: Recommendations for a national treatment strategy. Retrieved from www.nationalframework-cadrenational.ca/uploads/files/TWS_Treatment/nts-report-eng.pdf, Archived at www.webcitation.org/5xwWamy4p on April 14th, 2011.
Ngungu, J. , & Beezhold, J. (2009). Mental health in Zambia—Challenges and way forward. International Psychiatry, 6(2), 39–40.
Nicholls, T. L. , Brink, J. , Greaves, C. , Lussier, P. , & Verdun-Jones, S. N. (2009). Forensic psychiatric inpatients and aggression: An exploration of incidence, prevalence, severity, and interventions by gender. International Journal of Law and Psychiatry, 32(1), 23–30. doi:10.1016/j.ijlp.2008.11.007.
Nielsen, L. H. , van Mastrigt, S. B. , & Wobbe, T. (2016). Violence risk assessment in Denmark. In J. P. Singh , S. Bjørkly , & S. Fazel (Eds.), International perspectives on violence risk assessment (pp. 216–230). Oxford, New York: Oxford University Press.
Niveau, G. , & Dang, C. (2008). Nouveaux enjeux de la psychiatrie médico-légale. Revue Médicale Suisse, 4, 1600–1604.
O’Donahoo, J. , & Simmonds, J. G. (2016). Forensic patients and forensic mental health in Victoria: Legal context, clinical pathways, and practice challenges. Australian Social Work, 69(April), 169–180. doi:10.1080/0312407X.2015.1126750.
O’Dwyer, S. , Davoren, M. , Abidin, Z. , Doyle, E. , McDonnell, K. , & Kennedy, H. G. (2011). The DUNDRUM quartet: Validation of structured professional judgement instruments DUNDRUM-3 assessment of programme completion and DUNDRUM-4 assessment of recovery in forensic mental health services. BMC Research Notes, 4(1), 1–12. doi:10.1186/1756-0500-4-229.
O’Neil, O. (2012). National overview of forensic mental health services Ireland 2011. Dublin: Mental Health Commission.
Ogunwale, A. , De Wet, P. , Roos, L. , & Kaliski, S. (2012). Forensic psychiatry in Africa: Prospects and challenges. African Journal of Psychiatry, 15(1), 3–7. doi:10.4314/ajpsy.v15i1.1.
Organization of Services for Mental Health. (2003). Geneva: World Health Organization.
Osher, F. , D’Amora, D. A. , Plotkin, M. , Jarrett, N. , & Eggleston, A. (2012). Adults with behavioral health needs under correctional supervision: A shared framework for reducing recidivism and promoting recovery. Retrieved from http://csgjusticecenter.org/wp-content/uploads/2013/05/9-24-12_Behavioral-Health-Framework-final.pdf.
Pálsson, S. P. (n.d.). Forensic psychiatry in the Nordic countries: Iceland, problems or possibilities.
Parameswaran, S. , Spaeth-Rublee, B. , Huynh, P. T. , & Pincus, H. A. (2012). Comparison of national mental health quality assessment programs across the globe. Psychiatric Services, 63(10), 983–988. doi:10.1176/appi.ps.201100382.
Parcesepe, A. M. , & Cabassa, L. J. (2013). Public stigma of mental illness in the United States: A systematic literature review. Administration and Policy in Mental Health, 40(5), 384–399. doi:10.1007/s10488-012-0430-z.
Peloso, P. F. , D’Alema, M. , & Fioritti, A. (2014). Mental health care in prisons and the issue of forensic hospitals in Italy. The Journal of Nervous and Mental Disease, 202(6), 473–478. doi:10.1097/NMD.0000000000000147.
Pescosolido, B. A. (2013). The public stigma of mental illness: What do we think; What do we know; What can we prove? Journal of Health and Social Behavior, 54 (1), 1–21. doi:10.1177/0022146512471197.
Pillay, S. M. , Oliver, B. , Butler, L. , & Kennedy, H. G. (2008). Risk stratification and the care pathway. Irish Journal of Psychological Medicine, 25, 123–127.
Polacek, M. J. , Allen, D. E. , Damin-Moss, R. S. , Schwartz, A. J. A. , Sharp, D. , Shattell, M. , & Delaney, K. R. (2015). Engagement as an element of safe inpatient psychiatric environments. Journal of the American Psychiatric Nurses Association, 21(3), 181–190. doi:10.1177/1078390315593107.
Pratt, J. (2007). Penal populism: Key ideas in criminology. New York: Routledge.
Price, O. , Burbery, P. , Leonard, S. J. , & Doyle, M. (2016). Evaluation of safewards in forensic mental health: Analysis of a multicomponent intervention intended to reduce levels of conflict and containment in inpatient mental health settings. Mental Health Practice, 9(8), 14–21. doi:10.7748/mhp.19.8.14.s17.
Priebe, S. , Frottier, P. , Gaddini, A. , Kilian, R. , Lauber, C. , Martinez-Leal, R. , & Wright, D. (2008). Mental health care institutions in nine European countries, 2002 to 2006. Psychiatric Services, 59(5), 570–573. doi:10.1176/appi.ps.59.5.570.
Prins, S. J. , & Draper, L. (2009). Improving outcomes for people with mental illnesses under community corrections supervision: A guide to research-informed policy and practice. Retrieved from http://consensusproject.org/downloads/community.corrections.research.guide.pdf.
Quality Network for Forensic Mental Health. (2007). Standards for medium secure units. ( S. Tucker & T. Hughes , Eds.). Royal College of Psychiatrists Centre for Quality Improvement.
Quality Network for Forensic Mental Health. (2012). Standards for low secure services. ( S. Tucker , M. Iqbal , & S. Holder , Eds.) (2nd ed.). London: Royal College of Psychiatrists Centre for Quality Improvement.
Quality Network for Forensic Mental Health. (2013). Standards for community forensic mental health services. ( J. Kenney-Herbert , M. Taylor , R. Puri , & J. Phull , Eds.). Royal College of Psychiatrists Centre for Quality Improvement.
Queensland Government. (2012). What are the main parts of Queensland’s forensic mental health system? Fact sheet 4. Retrieved May 30, 2016, from www.health.qld.gov.au/forensicmentalhealth/.
Qureshi, N. A. , Al-Habeeb, A. A. , & Koenig, H. G. (2013). Mental health system in Saudi Arabia: An overview. Neuropsychiatric Disease and Treatment. doi:10.2147/NDT.S48782.
Radovic, S. , Meynen, G. , & Bennet, T. (2015). Introducing a standard of legal insanity: The case of Sweden compared to the Netherlands. International Journal of Law and Psychiatry, 40, 43–49. doi:10.1016/j.ijlp.2015.04.009.
Roberts, G. , & Ogborne, A. (1999). Best practices: Substance abuse treatment and rehabilitation. Retrieved from www.hc-sc.gc.ca/hppb/alcohol-otherdrugs.
Rock, M. (2001). Emerging issues with mentally ill offenders: Causes and social consequences. Administration and Policy in Mental Health, 28(3), 165–180.
Romani, C. J. , Morgan, R. D. , Gross, N. R. , & McDonald, B. R. (2012). Treating criminal behavior: Is the bang worth the buck? Psychology, Public Policy, and Law, 18(1), 144–165. doi:10.1037/a0024714.
Roskes, E. , Feldman, R. , Arrington, S. , & Leisher, M. (1999). A model program for the treatment of mentally ill offenders in the community. Community Mental Health Journal, 35(5), 461–472.
Rothschild, M. A. , Erdmann, E. , & Parzeller, M. (2007). Fitness for interrogation and fitness to stand trial. Deutsches Ärzteblatt International, 104(44), 3029–3033.
Ruchkin, V. V. (2000). The forensic psychiatric system of Russia. International Journal of Law and Psychiatry, 23(5–6), 555–565. doi:10.1016/S0160-2527(00)00046-7.
Rush, B. (2010). Tiered frameworks for planning substance use service delivery systems: Origins and key principles. Nordic Studies on Alcohol and Drugs, 27, 617–636.
Russo, G. , Salomone, L. , & Della Villa, L. (2003). The characteristics of criminal and non-criminal mentally disordered patients. International Journal of Law and Psychiatry, 26(4), 417–435. doi:10.1016/S0160-2527(03)00043-8.
Salem, L. , Crocker, A. G. , Charette, Y. , Seto, M. C. , Nicholls, T. L. , & Côté, G. (2015). Supportive housing and forensic patient outcomes. Law and Human Behavior, 3(3), 311–320. doi:http://dx.doi.org/10.1037/lhb0000112.
Salize, H. J. , Dressing, H. , & Kief, C. (2005). Placement and treatment of mentally ill offenders— Legislation and practice in EU Member States. Mannheim: Central Institute of Mental Health.
Sarkar, J. , & Dutt, A. B. (2006). Forensic psychiatry in India: Time to wake up. Journal of Forensic Psychiatry & Psychology, 17(1), 121–130. doi:10.1080/14789940500445775.
Schanda, H. , Ortwein-Swoboda, G. , Knecht, G. , & Gruber, K. (2000). The situation of forensic psychiatry in Austria: Setback or progress? International Journal of Law and Psychiatry, 23(5–6), 481–492. doi:10.1016/S0160-2527(00)00045-5.
Schomerus, G. , Schwahn, C. , Holzinger, A. , Corrigan, P. W. , Grabe, H. J. , Carta, M. G. , & Angermeyer, M. C. (2012). Evolution of public attitudes about mental illness: A systematic review and meta-analysis. Acta Psychiatrica Scandinavica, 125(6), 440–452. doi:10.1111/j.1600-0447.2012.01826.x.
Scott, R. (2007). Fitness for trial in Queensland. Psychiatry, Psychology and Law, 14(2), 327–349. doi:10.1375/pplt.14.2.327.
Scullion, P. A. (2002). Effective dissemination strategies. Nurse Researcher. doi:10.7748/nr2002.10.10.1.65.c5880.
Sestoft, D. , & Engberg, M. (2000). Law and mental health in Denmark. International Journal of Law and Psychiatry, 23(5–6), 533–540. doi:10.1016/S0160-2527(00)00063-7.
Seto, M. C. , Charette, Y. , Nicholls, T. L. , & Crocker, A. G. (n.d.). Individual, dynamic, and structural predictors of official recidivism and clinically reported violence among persons found Not Criminally Responsible on account of Mental Disorder.
Seto, M. C. , Harris, G. T. , & Rice, M. E. (2004). The criminogenic, clinical, and social problems of forensic and civil psychiatric patients. Law and Human Behavior, 28(5), 577–586.
Seto, M. C. , Lalumière, M. L. , Harris, G. T. , Barbaree, H. E. , Hilton, N. Z. , Rice, M. E. , & Schneider, R. D. (2001). Demands on forensic mental health services in the province of Ontario. Toronto: Report prepared for the Ontario Ministry of Health and Long-Term Care.
Shaidi, L. P. (n.d.). The death penalty in Tanzania: Law and practice. Retrieved August 9, 2016, from www.biicl.org/files/2213_shaidi_death_penalty_tanzania.pdf.
Shea, P. (2001). M’Naghten revisited—Back to the future? (The mental illness defence—A psychiatric perspective). Current Issues in Criminal Justice, 12(3), 347–362.
Sigurjónsdóttir, M. (n.d.). Current status of forensic psychiatry in Iceland. Retrieved from www.retspsykiatriskinteressegruppe.dk/getfile.aspx?f=6949.
Silfverhielm, H. (2005). Concepts and procedures in the Member States—Sweden. In H. J. Salize & H. Dreßing (Eds.), Placement and treatment of mentally ill offenders—Legislation and practice in EU member states (pp. 215–224). Mannheim, Germany: European Commission, Central Institute of Mental Health.
Simon, J. , & Sparks, R. (2013). Punishment and society: The emergence of an academic field. In J. Simon & R. Sparks (Eds.), Punishment and society (pp. 1–20). London: SAGE.
Simon, R. J. , & Ahn-Redding, H. (2006). The insanity defense, the world over. Lanham, MD: Lexington.
Simpson, A. I. F. , & Penney, S. R. (2011). The recovery paradigm in forensic mental health services. Criminal Behaviour and Mental Health, 21(5), 299–306. doi:10.1002/cbm.
Skeem, J. L. , Manchak, S. , & Peterson, J. K. (2011). Correctional policy for offenders with mental illness: Creating a new paradigm for recidivism reduction. Law and Human Behavior, 35(2), 110–126. doi:10.1007/s10979-010-9223-7.
Skipworth, J. , Brinded, P. M. , Chaplow, D. , & Frampton, C. (2006). Insanity acquittee outcomes in New Zealand. Australian and New Zealand Journal of Psychiatry, 40(11–12), 1003–1009. doi:10.1111/j.1440-1614.2006.01924.x.
Solomon, J. , Day, C. , Worrall, A. , & Thompson, P. (2015). Does sustained involvement in a quality network lead to improved performance? International Journal of Health Care Quality Assurance, 28(3), 228–233. doi:10.1108/ijhcqa-05-2013-0054.
Sparr, L. F. (2009). Personality disorders and criminal law: An international perspective. The Journal of the American Academy of Psychiatry and the Law, 37(2), 168–181.
Spiers, S. , Harney, K. , & Chilvers, C. (2005). Service user involvement in forensic mental health: Can it work? Journal of Forensic Psychiatry & Psychology, 16(2), 211–220. doi:10.1080/14789940500098137.
Spokes, K. , Bond, K. , Lowe, T. , Jones, J. , Illingworth, P. , Brimblecombe, N. , & Wellman, N. (2004). HOVIS—The Hertfords/Oxfordshire Violent Incident Study. Journal of Psychiatric and Mental Health Nursing, 9, 199–209.
St. Denis, E. E. (2008). Forensic psychiatry and criminal responsibility in Santiago, Chile. Queen’s University.
Staley, K. , Kabir, T. , & Szmukler, G. (2013). Service users as collaborators in mental health research: Less stick, more carrot. Psychological Medicine, 43(6), 1121–1125. doi:10.1017/S0033291712001663.
Stanton, J. , & Skipworth, J. (2005). Barriers to care in severe mental illness: Accounts from perpetrators of intra-familial homicide. Criminal Behaviour and Mental Health, 15(3), 154–163. doi:10.1002/cbm.3.
Steinert, T. , Noorthoorn, E. O. , & Mulder, C. L. (2014). The use of coercive intervention in mental health care in Germany and the Netherlands: A comparison of the developments in two neighboring countries. Frontiers in Public Health, 2(141). doi:10.3389/fpubh.2014.00141.
Stompe, T. , Frottier, P. , & Schanda, H. (2007). Insanity in Austria: The position of psychopathy in Austrian forensic psychiatry. In A. Felthous & H. Sass (Eds.), The international handbook of psychopathic disorders and the law, volume 2 (pp. 211–227). Chichester; Hoboken, NJ: John Wiley & Sons.
Strydom, N. , Pienaar, C. , Dreyer, A. , van der Merwe, L. M. , Jansen van Rensburg, B. , Calitz, F. J. W. , & Joubert, G. (2011). Profile of forensic psychiatric inpatients referred to the Free State Psychiatric Complex, 2004–2008. South African Journal of Psychiatry, 17(2), 40–43.
Taborda, J. G. V. (2001). Criminal justice system in Brazil: Functions of a forensic psychiatrist. International Journal of Law and Psychiatry, 24(4–5), 371–386. doi:10.1016/S0160-2527(01)00073-5.
Taborda, J. G. V. , Cardoso, R. G. , & Morana, H. C. P. (2000). Forensic psychiatry in Brazil. International Journal of Law and Psychiatry, 23(5–6), 579–588. doi:10.1016/S0160-2527(00)00048-0.
Taborda, J. G. V. , Folino, J. O. , & Salton, R. (2007). Forensic mental health care in South America: An overview of the Brazilian and Argentinian cases. International Journal of Prisoner Health, 3(2), 125–133. doi:10.1080/17449200701321571.
Tambuyzer, E. , Pieters, G. , & Van Audenhove, C. (2011). Patient involvement in mental health care: One size does not fit all. Health Expectations. doi:10.1111/j.1369-7625.2011.00743.x.
Tătaru, N. , Marinov, P. , Douzenis, A. , Novotni, A. , & Kecman, B. (2010). Forensic psychiatry in some Balkan countries. Current Opinion in Psychiatry, 23(5), 472–480. doi:10.1097/YCO.0b013e32833cfc05.
Taylor, P. J. , Dunn, E. , Felthous, A. , Gagné, P. , Harding, T. , Kaliski, S. , & Yoshikawa, K. (2013). Forensic psychiatry and its interfaces outside the UK and Ireland. In J. Gunn & P. J. Taylor (Eds.), Forensic psychiatry: Clinical, legal and ethical issues (2nd edition, pp. 111–147). London: CRC.
Téllez, C. , Arboleda-Flórez, J. , Ortiz, S. , & Navarro, J. (2004). Impact of legal reform on the practice of forensic psychiatry in Chile. Current Opinion in Psychiatry, 17(5), 387–390. doi:10.1097/01.yco.0000139975.83307.d8.
Tersigni, M. (2016). Not Criminally Responsible Reform Act: A case study using a penal populist framework. Department of Sociology and Criminology. Saint Mary’s University, Halifax, Nova Scotia, Canada.
Tew, J. , Ramon, S. , Slade, M. , Bird, V. , Melton, J. , & Le Boutillier, C. (2012). Social factors and recovery from mental health difficulties: A review of the evidence. British Journal of Social Work, 42(3), 443–460. doi:10.1093/bjsw/bcr076.
Thomson, L. (2008). The forensic mental health system in the United Kingdom. In K. Soothill , P. Rogers , & M. Dolan (Eds.), Handbook of forensic mental health (pp. 19–63). Cullompton; Portland, OR: Willan.
Thomson, L. (2016). Scotland’s quality framework. In 16th Annual Conference of the International Association of Forensic Mental Health Services. New York.
Thornicroft, G. , & Slade, M. (2014). New trends in assessing the outcomes of mental health interventions DECISION 1: WHOSE OUTCOME? World Psychiatry, 13(June), 118–124. doi:10.1002/wps.20114.
Thornicroft, G. , & Tansella, M. (2003). What are the arguments for community-based mental health care? World Health Organization Regional Office for Europe (Health Evidence Network Report), 2007(August), 1–25.
Thornicroft, G. , & Tansella, M. (2004). Components of a modern mental health service: A pragmatic balance of community and hospital care, 185, 283–290. doi:10.1192/bjp.185.4.283.
Thornicroft, G. , & Tansella, M. (2013). The balanced care model: The case for both hospital- and community-based mental healthcare. The British Journal of Psychiatry, 202(4), 246–248. doi:10.1192/bjp.bp.112.111377.
Topiwala, A. , Wang, X. , & Fazel, S. (2012). Chinese forensic psychiatry and its wider implications. Journal of Forensic Psychiatry & Psychology, 23(1), 1–6. doi:10.1080/14789949.2011.576261.
Traverso, G. B. , Ciappi, S. , & Ferracuti, S. (2000). The treatment of the criminally insane in Italy: An overview. International Journal of Law and Psychiatry, 23(5–6), 493–508. doi:10.1016/S0160-2527(00)00047-9.
U.S. Department of Health and Human Services. (2009). National consensus statement on mental health recovery.
van Beek, D. , & Kröger, U. (2007). The treatment of psychopathic patients in the Netherlands. In A. Felthous & H. Sass (Eds.), The international handbook of psychopathic disorders and the law, volume 2 (pp. 407–428). Chichester; Hoboken, NJ: John Wiley & Sons.
van der Schaaf, P. S. , Dusseldorp, E. , Keuning, F. M. , Janssen, W. A. , & Noorthoorn, E. O. (2013). Impact of the physical environment of psychiatric wards on the use of seclusion. British Journal of Psychiatry, 202(2), 142–149. doi:10.1192/bjp.bp.112.118422.
van der Wolf, M. , van Marle, H. , Mevis, P. , & Roesch, R. (2010). Understanding and evaluating contrasting unfitness to stand trial practices: A comparison between Canada and the Netherlands. International Journal of Forensic Mental Health, 9(3), 245–258. doi:10.1080/14999013.2010.522221.
van Marle, H. (2000). Forensic psychiatric services in the Netherlands. International Journal of Law and Psychiatry, 23(5–6), 515–531. doi:10.1016/S0160-2527(00)00049-2.
Vevera, J. , Svarc, J. , Grohmannova, K. , Spilkova, J. , Raboch, J. , & Cerny, M. (2009). An increase in substance misuse rather than other mental disorders has led to increased forensic treatment rates in the Czech Republic. European Psychiatry, 24, 380–387. doi:10.1016/j.eurpsy.2009.07.005.
Von Korff, M. , & Tiemens, B. (2000). Individualized stepped care of chronic illness. Western Journal of Medicine, 172(2), 133–137.
Wang, X. , Livingston, J. D. , Brink, J. , & Murphy, E. (2006). Persons found “Not Criminally Responsible on Account of Mental Disorder”: A comparison of British Columbia, Canada and Hunan, China. Forensic Science International, 164(2–3), 93–97. doi:10.1016/j.forsciint.2005.12.001.
Wang, X. , Zhang, D. , Jiang, S. , Bai, Y. , Cucolo, H. E. , & Perlin, M. L. (2007). Reassessing the aftercare treatment of individuals found not guilty due to a mental disability in Hunan, China: Supplemental study into the disposition of mentally ill offenders after forensic psychiatric assessment. Australian and New Zealand Journal of Psychiatry, 41, 337–342.
Ward, T. , & Brown, M. (2004). The Good Lives Model and conceptual issues in offender rehabilitation. Psychology, Crime & Law, 10(3), 243–257. doi:10.1080/10683160410001662744.
Ward, T. , & Gannon, T. A. (2006). Rehabilitation, etiology, and self-regulation: The comprehensive Good Lives Model of treatment for sexual offenders. Aggression and Violent Behavior, 11(1), 77–94. doi:10.1016/j.avb.2005.06.001.
Ward, T. , & Stewart, C. A. (2003). The treatment of sex offenders: Risk management and good lives. Professional Psychology: Research and Practice, 34(4), 353–360. doi:10.1037/0735-7028.34.4.353.
Ware, J. , & Bright, D. A. (2008). Evolution of a Treatment Programme for Sex Offenders: Changes to the NSW Custody-Based Intensive Treatment (CUBIT). Psychiatry, Psychology and Law, 15(2), 340–349. doi:10.1080/13218710802014543.
Weisman, R. L. , Lamberti, J. S. , & Price, N. (2004). Integrating criminal justice, community healthcare, and support services for adults with severe mental disorders. Psychiatric Quarterly, 75(1), 71–85.
Weiss, M. G. , Ramakrishna, J. , & Somma, D. (2006). Health-related stigma: Rethinking concepts and interventions. Psychology, Health and Medicine, 11(3), 277–287. doi:10.1080/13548500600595053.
West, M. L. , Vayshenker, B. , Rotter, M. , & Yanos, P. T. (2015). The influence of mental illness and criminality self-stigmas and racial self-concept on outcomes in a forensic psychiatric sample. Psychiatric Rehabilitation Journal, 38(2), 150–157. doi:10.1037/prj0000133.
West, M. L. , Yanos, P. T. , & Mulay, A. L. (2014). Triple stigma of forensic psychiatric patients: Mental illness, race, and criminal history. International Journal of Forensic Mental Health, 13(1), 75–90. doi:10.1080/14999013.2014.885471.
Whitehead, P. R. , Ward, T. , & Collie, R. M. (2007). Time for a change applying the Good Lives Model of rehabiltiation to a high-risk violent offender. International Journal of Offender Therapy and Comparative Criminology, 51(5), 578–598. doi:10.1177/0306624X06296236.
Whitley, R. , & Berry, S. (2013). Trends in newspaper coverage of mental illness in Canada: 2005–2010. The Canadian Journal of Psychiatry, 58(2), 107–112.
Whitley, R. , & Prince, M. (2005). Fear of crime, mobility and mental health in inner-city London, UK. Social Science & Medicine, 61(8), 1678–1688.
Williams, A. , Moore, E. , Adshead, G. , McDowell, A. , & Tapp, J. (2011). Including the excluded: High security hospital user perspectives on stigma, discrimination, and recovery. British Journal of Forensic Practice, 13(3), 197–204. doi:10.1108/14636641111157841.
Williams, C. R. (2000). Development and change in insanity and related defences. Melbourne University Law Review, 24(3), 711–736.
Willis, G. M. , & Grace, R. C. (2008). The quality of community reintegration planning for child molesters: Effects on sexual recidivism. Sexual Abuse: A Journal of Research and Treatment, 20(2), 218–240. doi:10.1177/1079063208318005.
Wilson, S. , James, D. , & Forrester, A. (2011). The medium-secure project and criminal justice mental health. The Lancet, 378, 110–111. doi:10.1016/S0140-6736(11)61641-3.
Wolff, N. (2002). “New” public management of mentally disordered offenders: Part I. A cautionary tale. International Journal of Law & Psychiatry, 25(1), 15–28.
World Health Organization. (n.d.). WHO-AIMS country reports. Geneva.
World Health Organization. (2003). Organization of services for mental health. Geneva: World Health Organization.
World Health Organization. (2005). Bulgaria. In Mental health atlas: 2005 (pp. 108–110). Singapore: World Health Organization.
Yannoulidis, S. (2012). Mental state defences in criminal law. Farnham: Ashgate.
Yee Ho, R. M. , & Kwan Yan, C. (2016). Violence risk assessment in Hong Kong. In J. P. Singh , S. Bjørkly , & S. Fazel (Eds.), International perspectives on violence risk assessment (pp. 247–257). Oxford, New York: Oxford University Press.
Yeo, S. (2008). The insanity defence in the criminal laws of the Commonwealth of Nations. Singapore Journal of Legal Studies (Dec), 241–263.
Ystad, Y. (2013). High security psychiatric/forensic wards in Norway: Structure, capacity, legislation. In 10th Nordic Symposium on Forensic Psychiatry. Kuopio, Finland.
Zhao, L. , & Ferguson, G. (2013). Understanding China’s mental illness defense. Journal of Forensic Psychiatry & Psychology, 24(5), 634–657. doi:10.1080/14789949.2013.830318.
## Use of cookies on this website
We are using cookies to provide statistics that help us give you the best experience of our site. You can find out more in our Privacy Policy. By continuing to use the site you are agreeing to our use of cookies. |
# Math Challenge - May 2019
• Challenge
• Featured
Mentor
2021 Award
Questions
1. a. Let ##(\mathfrak{su}(2,\mathbb{C}),\varphi,V)## be a finite dimensional representation of the Lie algebra ##\mathfrak{g}=\mathfrak{su}(2,\mathbb{C})##.
Calculate ##H\,^0(\mathfrak{g},\varphi)## and ##H\,^1(\mathfrak{g},\varphi)## for the Chevalley-Eilenberg complex in the cases
(ii) ##(\varphi,V)= (0,\mathfrak{g})##
(iii) ##(\varphi,V)= (\pi,\mathbb{C}^2)## is the natural representation on ##\mathbb{C}^2##.
b. Consider the Heisenberg algebra ##\mathfrak{g}=\mathfrak{h}=\left\{ \left.\begin{pmatrix}0&a&c\\0&0&b\\0&0&0\end{pmatrix}\right|a,b,c\in \mathbb{R}\right\}## and calculate ##H\,^0(\mathfrak{h},\operatorname{ad})## and ##H\,^1(\mathfrak{h},\operatorname{ad})\,.##
2. Show that the dihedral group ##D_{12}## of order twelve is the finite reflection group of the root system of type ##G_2##.
3. (solved by @Periwinkle ) Consider the set
$$\mathcal{P}_n := \{\,\{2\},\{4\},\ldots,\{2n\}\,\} \subseteq \mathcal{P}(\mathbb{N})$$
and determine the ##\sigma-##algebra ##\mathcal{A}_\sigma(\mathcal{P}_n) \subseteq \mathcal{P}(\mathbb{N})##, and show that ##\bigcup_{n\in \mathbb{N}}\mathcal{A}_\sigma(\mathcal{P}_n)## isn't a ##\sigma-##algebra.
4. (solved by @Periwinkle ) Linear Operators. (Only solutions to both count!)
a. Show that eigenvectors to different eigenvalues of a self-adjoint linear operator are orthogonal and the eigenvalues real.
b. Given a real valued, bounded, continuous function ##g \in C([0,1])## with
$$m = \inf_{t\in [0,1]} g(t)\; , \;M = \sup_{t\in [0,1]} g(t)$$
and an operator ##T_g(f)(t):= g(t)f(t)## on the Hilbert space ##\mathcal{H}=L^2([0,1])\,.##
Calculate the spectrum of ##T_g\,.##
5. Let ##\mathbb{F}## be a field. Then for a polynomial ##f \in \mathbb{F}[X_1,\ldots,X_n]## we define ##D(f)=\{\,q\in \mathbb{A}^n(\mathbb{F})\,|\,f(q)\neq 0\,\}##.
Show that these sets build a basis of the Zariski topology on ##\mathbb{A}^n(\mathbb{F})##, and decide whether finitely many of them are sufficient to cover a given open set.
6. Let ##R := \mathbb{Q}[x,y]/\langle x^2+y^2-1 \rangle## and ##\varphi \in \operatorname{Der}(R)## a ##\mathbb{Q}-##linear derivation such that ##\varphi(x)=y\; , \;\varphi(y)=-x\,.##
A derivation ##\varphi\, : \,R \longrightarrow R ## of an algebra ##R## is a linear function with ##\varphi(p\cdot q)=\varphi(p)\cdot q + p\cdot \varphi(q)\,.##
a. Determine the kernel of ##\varphi\,.##
b. Solve ##\varphi^2 + \operatorname{id} = 0\,.##
c. Since ##x^2+y^2=1## we can apply Thales' theorem and identify ##(x,\alpha),(y,\alpha)## with the sides of a right triangle with hypotenuse (diameter) ##1## according to an angle ##\alpha\,.##
Show that
$$(x,\alpha +\beta ) = (x,\alpha)(y,\beta) + (x,\beta)(y,\alpha)$$
7. (solved by @Periwinkle ) Prove that for all ##a,b,c \in \mathbb{R}## holds $$a>0\wedge b>0\wedge c>0 \Longleftrightarrow a+b+c>0\wedge ab+ac+bc>0\wedge abc>0\,.$$
8. (solved by @Periwinkle ) Let ##a,b \in L^2\left( \left[ -\frac{\pi}{2},+\frac{\pi}{2} \right] \right)## given as
$$a(x)=11\sin(x) + 8\cos(x) \; , \;b(x)=4\sin(x) + 13\cos(x)$$
Calculate the angle ##\varphi = \sphericalangle (a,b)## between the two vectors.
9. (solved by @Couchyam) Let ##\varepsilon_k :=\begin{cases}1&,\text{ if the decimal representation of }k\text{ has no digit }9\\0&, \text{ otherwise }\end{cases}##
Show that ##\sum_{k=1}^\infty \dfrac{\varepsilon_k}{k}## converges.
10. (solved by @Periwinkle ) Let ##x_0\in [a,b]\subseteq \mathbb{R}## and ##f\, : \,[a,b]\longrightarrow \mathbb{R}## continuous and differentiable on ##[a,b]-\{x_0\}##.
Furthermore exists the limit ##c:=\lim_{x \to x_0}f\,'(x)\,.## Then ##f(x)## is differentiable in ##x_0## with ##f\,'(x_0)=c\,.##
Proof: Let ##x\in [a,b]-\{x_0\}##. According to the mean value theorem for differentiable functions there is a
$$\xi(x) \in (\min\{x,x_0\},\max\{x,x_0\})$$
with ##f\,'(\xi(x))=\dfrac{f(x)-f(x_0)}{x-x_0}\,.## Because ##\lim_{x \to x_0}\min\{x,x_0\}=\lim_{x \to x_0}\max\{x,x_0\}=x_0## we must have ##\lim_{x \to x_0}\xi(x)=x_0## and by assumption ##\lim_{x \to x_0}f\,'(\xi(x))=c##, hence ##\lim_{x \to x_0}\dfrac{f(x)-f(x_0)}{x-x_0}=c##.
What has to be regarded in this proof, and is there a way to avoid this hidden assumption?
11. A house ##H## and a rosary ##R## are near a circular lake ##L##.
The Gardener walks with two watering cans from the house to the lake, fills the cans and goes to the rosary. We assume ##\overline{HR}\cap L=\emptyset##.
At which point ##S## of the shore does he have to get water, so that his path length is minimal, and why?
12. How long is the distance on a direct flight from London to Los Angeles and where is its most northern point?
How long will it last by an assumed average speed of ##494## knots over ground? We neglect the influence of weather, esp. wind.
We take the values ##51°\,28'\,39''\,N,\,0°\,27'\,41''\,W## for LHR in London,
##\,33°\, 56'\,33''\,N,\,118°\,24'\,29''\,W## for LAX in Los Angeles, and a radius of ##3,958## miles for earth.
13. Trial before an American district court.
The witness claims he saw a blue cab drive off after a night accident. The judge decides to test the reliability of the witness.
Result: The witness recognizes the color correctly in the dark in ##80\%## of all cases.
A survey also found that ##85\%## of taxis in the city are green and ##15\%## are blue.
With which probability has the taxi actually been blue?
14. A monk climbs a mountain.
He starts at ##8\,##a.m. on ##1000\,##m above sea level and reaches the peak at ##8\,##p.m. at ##3000\,##m.
After a bivouac on top of the mountain, he returns to the valley the next morning and again starts at ##8\,##a.m. and returns at ##8\,##a.m.
a. If he wants to avoid being at the same time of day at the same place as the day before when he climbed upwards, which strategy must he use downwards, and why?
b. Assume he climbed at a rate of height ##u(t)## proportional to the square root of time, determine his path dependent on hourly noted time ##t##.
c. Assume he follows the same path downwards and the height of his path is given by ##d_1(t)= \dfrac{125}{9}(t-20)^2+1000## in the first three hours and ##d_2(t)=-125\,t+3500## for the rest of his way. When will he be at the same point as the day before and at which height.
15. I'm annoyed by my two new alarm clocks. They both are powered by the grid.
One leaps two minutes an hour and the other one runs a minute an hour too fast. Yesterday I took the effort and set them to the correct time. This morning, I assume there was a power loss, one clock showed exactly ##6\,a.m## while the other one showed ##7\,a.m.##
When did I set the clocks and how long did they run?
Last edited:
Mathphysicist, Periwinkle, QuantumQuest and 1 other person
Homework Helper
For #5, if acceptable, I offer a definition of the Zariski topology: a set V is Zariski closed if and only if there is a collection of polynomials {fj} such that V consists precisely of those points p at which all polynomials fj in the collection are zero.
I also ask a clarification of the last part of the problem: does it mean
i) decide whether each open set is in fact a finite union of such sets D(f)?
or ii) decide when a finite number of D(f) suffice as the whole basis?
Last edited:
Mentor
2021 Award
I also ask a clarification of the last part of the problem: does it mean
i) decide whether each open set is in fact a finite union of such sets D(f)?
or ii) decide when a finite number of D(f) suffice as the whole basis?
The first option: Decide whether each open set is in fact a finite union of such sets D(f).
10 -> Is ##\max\{x_0\}## a typo?
Mentor
2021 Award
10 -> Is ##\max\{x_0\}## a typo?
Sure.
archaic
Question 7, how can ##abc>0 \implies a>0, \, b>0, \, c>0## (we can have two negatives and one positive)? Or are the three propositions one big proposition?
Mentor
2021 Award
Question 7, how can ##abc>0 \implies a>0, \, b>0, \, c>0## (we can have two negatives and one positive)? Or are the three propositions one big proposition?
The commata have been logical ANDs. I substituted them now by ##\wedge ##.
##abc > 0 ## alone isn't sufficient.
archaic
The commata have been logical ANDs. I substituted them now by ##\wedge ##.
##abc > 0 ## alone isn't sufficient.
Periwinkle
The ##\mathcal{A}_\sigma(\mathcal{P}_n)## ##\sigma##- algebra containing the sets of ##\mathcal{P}_n := \{\,\{2\},\{4\},\ldots,\{2n\}\,\}##, consists of a finite number of elements. All the unions of the above sets, their complement, the empty set and ##\mathbb{N}##.
However, the set ##\mathcal{P}_n := \{\,\{1\},\{3\},\ldots,\{2n+1\},\ldots\,\}## is not an element for ##\mathcal{A}_\sigma(\mathcal{P}_n)##, nor is it an element of the union of all ##\mathcal{A}_\sigma(\mathcal{P}_n)## sets.
Nevertheless, ##\mathcal{P}_n := \{\,\{1\},\{3\},\ldots,\{2n+1\},\ldots\,\}## is the element of the ##\sigma##-algebra generated by the set ##\bigcup_{n\in \mathbb{N}}\mathcal{A}_\sigma(\mathcal{P}_n)##, because it is complement to the the following set: ##\{\{2\},\{4\},\ldots,\{2n\},\ldots\}##.
Last edited:
archaic
I think "##\implies##" is trivial.
Suppose ##a+b+c>0 \wedge ab+ac+bc>0 \wedge abc>0##
1) Suppose ##(a<0 \wedge b>0 \wedge c>0) \vee (a<0 \wedge b<0 \wedge c<0)## then ##abc<0## therefore we can't have only one or three negative reals.
2) Suppose ##a<0 \wedge b<0 \wedge c>0## then from ##a+b+c>0## we have ##c>a+b## and from ##ab+ac+bc>0## we have ##c(a+b)>ab## but ##c(a+b)<0 \wedge ab>0##, contradiction and therefore we can't have two negative numbers.
Thus ##a>0 \wedge b>0 \wedge c>0##
Mentor
2021 Award
"Question 3"
The ##\mathcal{A}_\sigma(\mathcal{P}_n)## ##\sigma##- algebra containing the sets of ##\mathcal{P}_n := \{\,\{2\},\{4\},\ldots,\{2n\}\,\}##, consists of a finite number of elements.
The question was: which elements, i.e. which sets belong to ##\mathcal{A}_\sigma(\mathcal{P}_n)## explicitly listed.
All the unions of the above sets, their complement, the empty set and ##\mathbb{N}##.
This is almost true. It is all countably many unions and the definition of a sigma algebra. It doesn't answer the question.
However, the set ##\mathcal{P}_n := \{\,\{1\},\{3\},\ldots,\{2n+1\},\ldots\,\}## is not an element for ##\mathcal{A}_\sigma(\mathcal{P}_n)## ...
Right, but why? Isn't it the complement of all even numbers?
... nor is it an element of the union of all ##\mathcal{A}_\sigma(\mathcal{P}_n)## sets.
This isn't requested. We have a fixed ##n##.
Nevertheless, ##\mathcal{P}_n := \{\,\{1\},\{3\},\ldots,\{2n+1\},\ldots\,\}## is the element of the ##\sigma##-algebra generated by the set ##\bigcup_{n\in \mathbb{N}}\mathcal{A}_\sigma(\mathcal{P}_n)##, because it is complement to the the following set: ##\{\{2\},\{4\},\ldots,\{2n\},\ldots\}##.
The ##\sigma##-algebra generated by the set ##\bigcup_{n\in \mathbb{N}}\mathcal{A}_\sigma(\mathcal{P}_n)## is ##\mathcal{P}(\mathbb{N})##.
Periwinkle
Mentor
2021 Award
"Question 7"
I think "##\implies##" is trivial.
Suppose ##a+b+c>0 \wedge ab+ac+bc>0 \wedge abc>0##
1) Suppose ##(a<0 \wedge b>0 \wedge c>0) \vee (a<0 \wedge b<0 \wedge c<0)## then ##abc<0## therefore we can't have only one or three negative reals.
2) Suppose ##a<0 \wedge b<0 \wedge c>0## then from ##a+b+c>0## we have ##c>a+b## and from ##ab+ac+bc>0## we have ##c(a+b)>ab## but ##c(a+b)<0 \wedge ab>0##, contradiction and therefore we can't have two negative numbers.
Thus ##a>0 \wedge b>0 \wedge c>0##
Where have your minuses gone? From ##a+b+c>0## we have ##c>-a-b = |a|+|b|## and we have ##0>c(a+b)>-ab##.
Hint: This question can be solved without considering any cases!
archaic
Where have your minuses gone? From ##a+b+c>0## we have ##c>-a-b = |a|+|b|## and we have ##0>c(a+b)>-ab##.
Hint: This question can be solved without considering any cases!
Well, both ##a## and ##b## are negative, and we supposed the sum is positive, so ##c## must be greater than ##a+b##.
Mentor
2021 Award
Well, both ##a## and ##b## are negative, and we supposed the sum is positive, so ##c## must be greater than ##a+b##.
O.k., but why is ##c(a+b) > ab\,##?
archaic
O.k., but why is ##c(a+b) > ab\,##?
Mentor
2021 Award
No problem. As a hint: if there are symmetries, and here we have a few, then it is always a good idea to consider whether they can be used.
Periwinkle
The question was: which elements, i.e. which sets belong to ##\mathcal{A}_\sigma(\mathcal{P}_n)## explicitly listed.
This is almost true. It is all countably many unions and the definition of a sigma algebra. It doesn't answer the question.
Right, but why? Isn't it the complement of all even numbers?
This isn't requested. We have a fixed ##n##.
The ##\sigma##-algebra generated by the set ##\bigcup_{n\in \mathbb{N}}\mathcal{A}_\sigma(\mathcal{P}_n)## is ##\mathcal{P}(\mathbb{N})##.
Thank you very much for your guidance. I wrote late at night yesterday, and that was the first question I tried to solve.
---------------------------------------------------------------------------------------------------------------------------------------------
It is known in the algebra of sets if we take the resolution of ##\Omega##, ie sets ##\mathcal{A}_1, \mathcal{A}_2, \dots, \mathcal{A}_n##, that ## \Omega = \mathcal{A}_1\cup \mathcal{A}_2 \cup \dots \cup \mathcal{A}_n ##, and ## \mathcal{A}_i \cap \mathcal{A}_j= \text{Ø} ## for ## i \neq j##, then the algebra generated by the resolution is finite and consists of the ## \text{Ø} ## empty set and sets of the following types: ##\mathcal{A}_{i_1}\cup \mathcal{A}_{i_2} \cup, \dots, \cup \mathcal{A}_{i_n}##.
The above algebra of sets elements can be listed by induction as follows:
First level
## \mathcal{A}_1, \mathcal{A}_2, \dots , \mathcal{A}_n##.
If the ##k##-th level is known, then the ##k+1##-th level is produced as follows
Each ##\mathcal{A}_{i_1}\cup \mathcal{A}_{i_2} \cup \dots \cup \mathcal{A}_{i_n}## set of the ##k##-th level is supplemented by each ##\mathcal{A}_i## (but only one at a time) where ##i## is greater than ## i_1, i_2, \dots, i_n ## each.
Applying the above general theorem to ##n + 1## to the specific question, we get the ##\mathcal{A}_\sigma(\mathcal{P}_n) ## ##\sigma ##-algebra:
## \Omega = \mathbb{N}, \mathcal{A}_1 = \{2\}, \mathcal{A}_2 =\{4\}, \dots , \mathcal{A}_n =\{2n\}, \mathcal{A}_{n+1} = \complement \{\{2\},\{4\},\ldots,\{2n\}\,\} ## complement set.
In this case, the ##\sigma##-algebra is the same as the algebra because it contains finite many elements.
The set ## \{\,\{1\},\{3\},\ldots,\{2n+1\},\ldots\,\}## is not an element for ##\mathcal{A}_\sigma(\mathcal{P}_n)##, because if an element of ##\mathcal{A}_\sigma(\mathcal{P}_n)## does not contain the above ##\mathcal{A}_{n+1}##, it consists of a finite number of natural numbers; but if it contains, it also contains all natural numbers that are greater than an ##2n##. Nor is it an element of the union of all ##\mathcal{A}_\sigma(\mathcal{P}_n)## sets.
Therefore ##\bigcup_{n\in \mathbb{N}}\mathcal{A}_\sigma(\mathcal{P}_n)## cannot be ##\sigma##-algebra because if it were, it would contain the complement of the ##\{2\}\cup\{4\}\cup\ldots \cup\{2n\},\ldots = \complement \{\{2\},\{4\},\ldots,\{2n\},\ldots\} ## set, which, however, as described above, does not contain.
Last edited:
Periwinkle
## A=a+b+c ##
## B=ab+ac+bc ##
## C=abc ##
If one or three of ##a##, ##b## and ##c## are negative, or any of ##0##, then ## C\leq0##. If two are negative, let's say ##a## and ##b##. If ## A\geq0 ##, then ## |a|+ |b|\leq c ##.
But
##B= ab+(a+b)c=ab-(|a|+ |b|)c \leq ab- (|a|+ |b|)\cdot(|a|+ |b|)=##
##ab -|a|^2- |b|^2 -2|a||b|=-|a|^2- |b|^2 -|a||b|##
which is negative.
Last edited:
Mentor
2021 Award
First level
## \mathcal{A}_1, \mathcal{A}_2, \dots , \mathcal{A}_n##.
If the ##k##-th level is known, then the ##k+1##-th level is produced as follows
Each ##\mathcal{A}_{i_1}\cup \mathcal{A}_{i_2} \cup \dots \cup \mathcal{A}_{i_n}## set of the ##k##-th level is supplemented by each ##\mathcal{A}_i## (but only one at a time) where ##i## is greater than ## i_1, i_2, \dots, i_n ## each.
...
The question was: Determine ##\mathcal{A}_\sigma(\mathcal{P}_n)##.
This means, that ##n## is a fixed natural number and ##\mathcal{P}_n## generates the ##\sigma-##algebra over ##\Omega = \mathbb{N}##.
Therefore we have ##\mathcal{A}_\sigma(\mathcal{P}_n) = \{\,\emptyset, \mathbb{N}\,\} \cup \mathbb{P}(\mathcal{P}_n) \cup_B (\mathbb{N}-B)## where ##B\in \mathbb{P}(\mathcal{P}_n)## denotes the power set of ##\mathcal{P}_n\,.## The only difficulty is to describe the complement ##\mathbb{N}-B## in an appropriate explicit way.
An indirect proof for the second assertion is a good idea. This means we have to use that ##\bigcup_{n\in \mathbb{N}} \mathcal{A_\sigma(\mathcal{P}_n)}## is a ##\sigma-##algebra. I'm not quite sure where you used this. (My suggestion is to use the complement of the set of odd numbers. It is the set of all even numbers and as countable union of ##\{\,2k\,\}## it has to be in that union. But why can't this be?)
Periwinkle
Ben2
In #10, suppose x < x_0. The mean value theorem in Stewart's Calculus (Section 3.2) requires that f is continuous on [x, x_0] and differentiable on (x, x_0). One could replace x_0 with x_0 - \epsilon, but to me it's not obvious that the resulting difference quotient has the same limit at x_0 as the one desired. The problem seems to ask for a proof that the derivative is continuous at x_0.
Mentor
2021 Award
## A=a+b+c ##
## B=ab+ac+bc ##
## C=abc ##
If one or three of ##a##, ##b## and ##c## are negative, or any of ##0##, then ## C\leq0##. If two are negative, let's say ##a## and ##b##. If ## A\geq0 ##, then ## |a|+ |b|\leq c ##.
But
##B= ab+(a+b)c=ab-(|a|+ |b|)c \leq ab- (|a|+ |b|)\cdot(|a|+ |b|)=##
##ab -|a|^2- |b|^2 -2|a||b|=-|a|^2- |b|^2 -|a||b|##
which is negative.
Looks good.
Here is the solution I had in mind:
##(x-a)(x-b)(x-c) = x^3 - (a+b+c)x^2 + (ab+ac+bc)x -abc < 0## for all ##x \leq 0## so the zeroes of this polynomial, ##a,b,c## are all in ##x \in (0,\infty)##.
Periwinkle
Periwinkle
The question was: Determine ##\mathcal{A}_\sigma(\mathcal{P}_n)##.
This means, that ##n## is a fixed natural number and ##\mathcal{P}_n## generates the ##\sigma-##algebra over ##\Omega = \mathbb{N}##.
Therefore we have ##\mathcal{A}_\sigma(\mathcal{P}_n) = \{\,\emptyset, \mathbb{N}\,\} \cup \mathbb{P}(\mathcal{P}_n) \cup_B (\mathbb{N}-B)## where ##B\in \mathbb{P}(\mathcal{P}_n)## denotes the power set of ##\mathcal{P}_n\,.## The only difficulty is to describe the complement ##\mathbb{N}-B## in an appropriate explicit way.
I meant that the elements of the finite ##\sigma##-algebra should be listed. This is not an enumeration but a general definition in other ways. My method is an algorithmic listing.
An indirect proof for the second assertion is a good idea. This means we have to use that ##\bigcup_{n\in \mathbb{N}} \mathcal{A_\sigma(\mathcal{P}_n)}## is a ##\sigma-##algebra. I'm not quite sure where you used this. (My suggestion is to use the complement of the set of odd numbers. It is the set of all even numbers and as countable union of ##\{\,2k\,\}## it has to be in that union. But why can't this be?)
I used it when I said that the set ##\{2\}\cup\{4\}\cup\ldots \cup\{2n\},\ldots## is an element of the ##\sigma##-algebra because it is the countable union of elements of finite algebras.
archaic
In #10, suppose x < x_0. The mean value theorem in Stewart's Calculus (Section 3.2) requires that f is continuous on [x, x_0] and differentiable on (x, x_0). One could replace x_0 with x_0 - \epsilon, but to me it's not obvious that the resulting difference quotient has the same limit at x_0 as the one desired. The problem seems to ask for a proof that the derivative is continuous at x_0.
Quick tips, put your math ##here## for it to be inline, ##\int_a^{b}dt## or $$here$$ for it to be like this $$\int_a^{b}dt$$
Mentor
2021 Award
I meant that the elements of the finite ##\sigma##-algebra should be listed. This is not an enumeration but a general definition in other ways. My method is an algorithmic listing.
O.k. just for the records:
\begin{align*}
\mathcal{A}_\sigma(\mathcal{P}_n)&=\{\,\emptyset , \mathbb{N}\,\} \cup \{\,B\subseteq \mathbb{N}\,:\,B\subseteq \{2,4,,\ldots ,2n\}\,\}\\
&\phantom{{}={}} \cup \{\,B\subseteq \mathbb{N}\,:\,2k\in B \,\forall \,k>n\,\wedge\,2k-1\in B\,\forall\,k\in \mathbb{N}\,\}
\end{align*}
I used it when I said that the set ##\{2\}\cup\{4\}\cup\ldots \cup\{2n\},\ldots## is an element of the ##\sigma##-algebra because it is the countable union of elements of finite algebras.
Yes, but you said that the complement you constructed contains all even numbers greater than ##2n##. Now what if a set didn't contain any even number, why isn't its complement of all odd numbers not in the union as well? With this way of proof you end up at the point whether ##n=0##, i.e. ##\mathcal{P_n}=\emptyset## is a possibility or not, or whether the complement should be build according to this empty ##\mathcal{P}## or the natural numbers as a whole.
It is easier to say: ##B_k := \{\,2,4,\ldots,2k\,\} \in \mathcal{P}_k## and so are ##\cup_k B_k \in \cup_n\mathcal{A}_\sigma(\mathcal{P}_n)##. But as ##\cup_k B_k ## isn't an element of any ##\mathcal{A}_\sigma(\mathcal{P}_n)##, it isn't an element of the union either.
Periwinkle
Mentor
2021 Award
In #10, suppose x < x_0. The mean value theorem in Stewart's Calculus (Section 3.2) requires that f is continuous on [x, x_0] and differentiable on (x, x_0). One could replace x_0 with x_0 - \epsilon, but to me it's not obvious that the resulting difference quotient has the same limit at x_0 as the one desired. The problem seems to ask for a proof that the derivative is continuous at x_0.
Your on the right track and it has to do with ##x##. But the proof is technically correct. It is the same limit, since ##\xi## is chosen accordingly. It simply uses an assumption which is not explicitly mentioned, which one?
Periwinkle
Make the following assignment of ##0, 1, 2, 3 \dots ## natural numbers (the examples show the way of assignment):
## ~~~~~~~~~~~~~~~~~~ 3 ~ \to 10 \times 0.3 ##
## ~~~~~~~~~~~~~~~~~~ 21 ~ \to 10 \times 0.21 \times \frac 1 {10} ##
## ~~~~~~~~~~~~~~~~~~ 529 ~ \to 10 \times 0.529 \times \frac 1 {10^2} ##
## ~~~~~~~~~~~~~~~~~~ 4791 ~ \to 10 \times 0.4791 \times \frac 1 {10^3} ##
and so on.
This assignment assigns to all natural numbers ##k## a real number which is greater than or equal to ##\dfrac{\varepsilon_k}{k}##.
However, if in each line we add all the real numbers that are possible on the right, we get the amounts smaller than
## ~~~~~~~~~~~~~~~~~~ 10 \times 9 ##
## ~~~~~~~~~~~~~~~~~~ 10 \times 9^2 \times \frac 1 {10}##
## ~~~~~~~~~~~~~~~~~~ 10 \times 9^3 \times \frac 1 {10^2}##
## ~~~~~~~~~~~~~~~~~~ 10 \times 9^4 \times \frac 1 {10^3}##
and so on.
However, if they are added, we get
## ~~~~~~~~~~~~~~~~~~ 10 \times 9 \times (1 + \frac 9 {10} + \frac {9^2} {10^2} + \frac {9^3} {10^3}+ \dots)##
what is finite.
Mentor
2021 Award
Make the following assignment of ##0, 1, 2, 3 \dots ## natural numbers (the examples show the way of assignment):
## ~~~~~~~~~~~~~~~~~~ 3 ~ \to 10 \times 0.3 ##
## ~~~~~~~~~~~~~~~~~~ 21 ~ \to 10 \times 0.21 \times \frac 1 {10} ##
## ~~~~~~~~~~~~~~~~~~ 529 ~ \to 10 \times 0.529 \times \frac 1 {10^2} ##
## ~~~~~~~~~~~~~~~~~~ 4791 ~ \to 10 \times 0.4791 \times \frac 1 {10^3} ##
and so on.
This assignment assigns to all natural numbers ##k## a real number which is greater than or equal to ##\dfrac{\varepsilon_k}{k}##.
However, if in each line we add all the real numbers that are possible on the right, we get the amounts smaller than
## ~~~~~~~~~~~~~~~~~~ 10 \times 9 ##
## ~~~~~~~~~~~~~~~~~~ 10 \times 9^2 \times \frac 1 {10}##
## ~~~~~~~~~~~~~~~~~~ 10 \times 9^3 \times \frac 1 {10^2}##
## ~~~~~~~~~~~~~~~~~~ 10 \times 9^4 \times \frac 1 {10^3}##
and so on.
However, if they are added, we get
## ~~~~~~~~~~~~~~~~~~ 10 \times 9 \times (1 + \frac 9 {10} + \frac {9^2} {10^2} + \frac {9^3} {10^3}+ \dots)##
what is finite.
Sorry, but I don't understand this. First, can you describe the assignment properly? You divided your numbers by powers of ten until their sum is finite? That doesn't prove anything, since this scaling is rarely an allowed transformation. I assume that it has to do with the quotient ##\frac{1}{k}## but you shouldn't leave the guesses to your readers.
Hint: Simply count the numbers which count of a certain length, and add over all lengths.
If you allow me to give an advice, I'd say: I think you should work on your presentations. It would be a pity if your ideas, which are good, will get lost in a mess of words. A good measure is to ask oneself: Will I be able to read and understand this a year from now?
We also have a lot of young students who read our threads even if they might not understand everything. For those it is better to write answers step by step, so one can easily follow them. This series is a good example, because it should be understandable for high schoolers as well as students of mathematics. It is not too complicated to give a formal proof.
Last edited:
Periwinkle
Gold Member
Looks good.
Here is the solution I had in mind:
##(x-a)(x-b)(x-c) = x^3 - (a+b+c)x^2 + (ab+ac+bc)x -abc < 0## for all ##x \leq 0## so the zeroes of this polynomial, ##a,b,c## are all in ##x \in (0,\infty)##.
How does this proof ensure that ##a, b, c## are real?
Mentor
2021 Award
How does this proof ensure that ##a, b, c## are real?
They are given as real numbers, or at least integers, since I assumed implicitly an Archimedean ordering.
That the zeroes of the polynomial are real is given by the fact that ##p(a)=p(b)=p(c)=0## are the known zeroes.
Gold Member
They are given as real numbers, or at least integers, since I assumed implicitly an Archimedean ordering.
But for example if ##a=i, b=-i, c\in \mathbb{R}##, then $$a+b+c=c\in \mathbb{R}$$
$$ab+bc+ca = 1\in \mathbb{R}$$
$$abc=c\in \mathbb{R}$$
So the fact that those three expressions are in ##\mathbb{R}## is a necessary, but not sufficient condition (by itself) for ##a, b, c\in \mathbb{R}##.
Periwinkle
Your on the right track and it has to do with ##x##. But the proof is technically correct. It is the same limit, since ##\xi## is chosen accordingly. It simply uses an assumption which is not explicitly mentioned, which one?
I've been thinking so much about this question. If we want to be so precise, then the conditions of the theorem could be completed by that ## a \lt b##.
Mentor
2021 Award
I've been thinking so much about this question. If we want to be so precise, then the conditions of the theorem could be completed by that ## a \lt b##.
No, it's more subtle than this and uses a 'tool' you wouldn't have expected in calculus.
Last edited:
Periwinkle
Periwinkle
No, it's more subtle than this and uses a 'tool' you wouldn't have expected in calculus.
Then this is just the Axiom of Choice. Then I'll explain it.
fresh_42
Mentor
2021 Award
Then this is just the Axiom of Choice. Then I'll explain it.
Yes, ##\xi## is selected from an interval which depends on ##x##, and since this is done for all ##x## we have silently used a selection function ##x \longmapsto \xi(x)##.
Do you also have an idea how it can be avoided?
Periwinkle
Yes, ##\xi## is selected from an interval which depends on ##x##, and since this is done for all ##x## we have silently used a selection function ##x \longmapsto \xi(x)##.
Do you also have an idea how it can be avoided?
The question described above is written on pages 74-77 of this book. The reverse is questionable. |
Prove $n\mid \phi(2^n-1)$
If $2^p-1$ is a prime, (thus $p$ is a prime, too) then $p\mid 2^p-2=\phi(2^p-1).$
But I find $n\mid \phi(2^n-1)$ is always hold, no matter what $n$ is. Such as $4\mid \phi(2^4-1)=8.$
If we denote $a_n=\dfrac{\phi(2^n-1)}{n}$, then $a_n$ is A011260, but how to prove it is always integer?
• :nice question $\color{green}{\large+1}$
– M.H
Jun 24, 2013 at 18:07
Consider $U(2^n-1)$. Clearly $2\in U(2^n-1)$. It can also be shown easily that the order of $2$ in the group $U(2^n-1)$ is $n$. By Lagrange's theorem $|2|=n$ divides $|U(2^n-1)|=\phi(2^n-1)$.
• An interesting answer! Jun 15, 2013 at 14:33
• @Hecke Yes. I didnt expect to find a short proof at the beginning !
– Amr
Jun 15, 2013 at 14:33
• You proved $n\mid \phi(a^n-1).$ Jun 15, 2013 at 14:35
• @Hecke I already realized this !!
– Amr
Jun 15, 2013 at 14:35
$(\mathbb{Z}/\mathbb{(a^n-1)Z})^*$ is a group of order $\phi(a^n-1)$ and gcd$(a,a^n-1)=1\Rightarrow a\in (\mathbb{Z}/\mathbb{(a^n-1)Z})^*$
We have $a^n\equiv 1\mod (a^n-1)$ and $a^k-1<a^n-1$ when ever $k<n$ so there does not exist $k<n$ such that the above condition holds. So the order of $a$ in $(\mathbb{Z}/\mathbb{(a^n-1)Z})^*$ is $n$. And as the order of each element divides the order of the group so we have $n|\phi(a^n-1)$
Putting $a=2$ we have the required result asked in the question.
• Thanks,this is more detailed. Jun 15, 2013 at 14:37
• @Abhra, this can be generalized to $n|\phi(a^n-1)$ for any integer $a$ Jun 15, 2013 at 14:45
• @labbhattacharjee I think i have already generalized it to all integers. Jun 15, 2013 at 16:01
• @AbhraAbirKundu, may be my comment & your edit were concurrent. Anyway, good job. Jun 15, 2013 at 16:05
Hint: Clearly $$2$$ has order $$n$$, modulo $$2^n-1$$.
Further Hint: We know that $$2^{ \phi(2^n -1)} \equiv 1 \pmod{2^n-1}$$.
• Yeah.... This was actually quite straightforward. Sorry. Dec 16, 2013 at 16:14
Observation. If $2^n-1\mid 2^k-1$ then $n \mid k$.
Proof. Let $2^n-1\mid 2^k-1$. Let $k=qn+r$ where $0\le r<n$. Then we get $$2^k-1=2^{qn+r}-1=2^{qn+r}-2^r+2^r-1=2^r(2^{qn}-1)+2^r-1.$$ Since $2^{qn}-1=(2^n-1)(2^{(q-1)n}+2^{(q-2)n}+\dots+2^n+1)$, we see that $2^n-1$ divides $2^{qn}-1$. Therefore $2^n-1$ also divides $$2^r-1 = 2^k-1 - 2^r(2^{qn}-1).$$ But $2^n-1 \mid 2^r-1$ with $0\le r<n$ is only possible if $r=0$. So we get that $k=qn$ and $n\mid k$.
From Euler's theorem we have $$2^{\varphi(2^n-1)}\equiv 1 \pmod{2^n-1},$$ i.e., $2^n-1 \mid 2^{\varphi(2^n-1)}-1$. (Notice that $\gcd(2,2^n-1)=1$, so Euler's theorem can be applied here.)
Using the above observation for $k=\varphi(2^n-1)$ we get $$n\mid \varphi(2^n-1).$$
Note: The same argument would work to show that $n\mid \varphi(a^n-1)$ for any $a\ge2$. Some posts about this more general question:
• This is basically Calvin Lin's answer rewritten in a more elementary language. (His answer was originally posted here, but the two posts were merged.) Jan 6, 2016 at 6:49
I will use Lifting the Exponent Lemma(LTE).
Let $v_p(n)$ denote the highest exponent of $p$ in $n$.
Take some odd prime divisor of $n$, and call it $p$. Let $j$ be the order of $2$ modulo $p$.
So, $v_p(2^n-1)=v_p(2^j-1)+v_p(n/j)>v_p(n)$ as $j\le p-1$.
All the rest is easy. Indeed, let's pose $n=2^jm$ where $m$ is odd.
Then $\varphi\left(2^{2^jm}-1\right)=\varphi(2^m-1)\varphi(2^m+1)\varphi(2^{2m}+1)\cdots\varphi\left(2^{2^{j-1}}m+1\right)$. At least $2^j$ terms in the right side are even.
• You are assuming $j|n$ but if $n=7$, $p=7$ then $j=3$... Jun 16, 2013 at 10:26 |
Will Yip’s rise to fame is the stuff of legend. After digging for production credits on locally-produced hip-hop by Schoolly D and Fugees, he discovered that Studio 4’s Phil and Joe Nicolo (The Butcher Bros.) were behind some of his favorite music. So, he set his sights on Temple University and Phil’s production class, asked for an internship at Studio 4 on day one, and was suddenly touring the world with Lauryn Hill while also spearheading the punk renaissance of the mid 2010s. Through boundless enthusiasm and energetic records, Will Yip has become one of the most sought after producers of melodic hardcore, shoegaze bands, and what Pitchfork dubbed “new alternative music.” His work bursts with vibrant drums, impossibly large guitars, and, above all, great songs. A true second-generation immigrant, Will rose through the ranks of Studio 4 to become a co-owner of the operation. We met on a beautiful morning in Conshohocken, Pennsylvania, for a chat in front of Phil’s famous SSL console “with the brown knobs.”
What started your musical journey as an immigrant kid in North Philly?
When I was about seven or eight, my older brother played me Dr. Dre’s The Chronic and Nirvana’s In Utero. When I heard In Utero, something connected with me. It was the first thing I heard that had any essence of hardcore or punk. What caught my ears was this harshness and a vulnerability that I hadn’t heard from mainstream music. Soon, every time we’d go to Kmart I’d be bugging my mom for cassettes instead of toys and Nerf guns.
Is scouring cassette credits what led you to The Butcher Bros. and Studio 4?
Boyz II Men’s Cooleyhighharmony was the first tape I bought with my own money. I thought it was cool that they were from Philly. Looking over the credits, I saw “Studio 4, Conshohocken, PA.” and a year or so later Fugees’ The Score had the Butcher Bros. names all over it. Then it was on to Cypress Hill and Kriss Kross. They all kept popping up with Studio 4 credits. I was paying attention to other records too, but at that age if a record was cut in L.A. or somewhere, it might as well be on Mars. Coming from a lower income family in a row home in Northeast Philly, I never thought I would see L.A. in my life.
But it didn’t slow you down from pursuing music.
I had a rough time finding my place playing music. I started playing drums at ten, and dreamt of being a professional drummer, but my white friends at inner city schools wanted to look like Korn and the nu metal bands on TRL [Total Request Live], and I was a nerdy Asian kid. When I was twelve, my friend Dylan and I saved $100 and booked ourselves in a studio. Seeing an engineer run a session and control the way the music was made; I knew that’s what I wanted to do. The studio was expanding, and I offered to work for free, even clean toilets, and they said I could run the rehearsal rooms for$5 an hour. This was awesome! Eventually, they sold me a mixer and helped install at my parents’ house. I didn’t realize it then, but I’ve always had an entrepreneurial way of looking at situations, and that was really the start of my “production business.”
You saw a path forward as an engineer!
I could see myself making a living from this. “I can be an engineer.” I set up a little studio in my mom’s basement, and even though she didn’t love it, she was very supportive. The first time I charged a band I was 16. I charged them $8 an hour. Isn’t that a lucky number? [laughs] Yes, it’s a lucky number in Chinese. Other local start up studios were charging$15 an hour, so it was, “I’ll charge half.” Again, it was my entrepreneurial spirit to invite bands I was booking at the rehearsal studio to record. Bands I loved, like Blacklisted, would come to the basement to record, and it taught me to push guys to play. To hit hard and sing hard. I got obsessed with studios and gear. I bought my first API 512 [preamp] for around $500. In high school? Yeah. From that point on I wanted to be an engineer and a producer, and my dream was to work at Studio 4. I’d ask myself, “What are the baby steps to get there?” There was an alternative radio station in South Philly [Y100], with a huge space where they recorded live sessions. I saved up$1000 to book a mastering session there, which was a TON of money. When the engineer pulled up the session, he couldn’t believe that I had tracked it in a 13 x 13 tiled basement. The owner, Mike Comstock, heard that I was the “the hot shot kid,” and had me assist him at the Electric Factory [venue] that night. It was my first professional gig. The band, The Fray, sound checked with the song “How to Save a Life.” I was like, “This is gonna be the biggest thing in the world.”... |
Find all School-related info fast with the new School-Specific MBA Forum
It is currently 07 Jul 2015, 08:23
GMAT Club Daily Prep
Thank you for using the timer - this advanced tool can estimate your performance and suggest more practice questions. We have subscribed you to Daily Prep Questions via email.
Customized
for You
we will pick new questions that match your level based on your Timer History
Track
every week, we’ll send you an estimated GMAT score based on your performance
Practice
Pays
we will pick new questions that match your level based on your Timer History
Events & Promotions
Events & Promotions in June
Open Detailed Calendar
Compilation of tips and tricks to deal with remainders.
Author Message
TAGS:
Manager
Joined: 23 Oct 2009
Posts: 84
Location: New Delhi, India
Schools: Chicago Booth, Harvard, LBS, INSEAD, Columbia
Followers: 5
Kudos [?]: 14 [0], given: 76
Re: Compilation of tips and tricks to deal with remainders. [#permalink] 08 Dec 2009, 03:23
Thanks a lot for this thread!!! Remainder questions have been a bit of a problem for me...and this really helps!!!
_________________
1st Feb '11 -- Actual GMAT : 730 (Q48 V42) AWA 6.0
My Practice GMAT Scores
29th Jan '11 -- GMATPrep#2 : 700 (Q47 V38)
23rd Jan '11 -- MGMAT Practice Test #3 : 670 (Q45 V36)
19th Jan '11 -- GMATPrep#1 v.1 : 710 (Q49 V37)
15th Jan '11 -- GMATPrep#1 : 720 (Q47 V42)
11th Jan '11 -- MGMAT Practice Test #2 : 740 (Q47 V44)
6th Jan '11 -- Kaplan#2 : 620 (Q40 V35)
28th Dec '10 -- PowerPrep#1 : 670 (Q47 V35)
30th Oct '10 -- MGMAT Practice Test #1 : 660 (Q45 V35)
12th Sept '10 -- Kaplan Free Test : 610 (Q39 V37)
6th Dec '09 -- PR CAT #1 : 650 (Q44 V37)
25th Oct '09 -- GMATPrep#1 : 620 (Q44 V34)
If you feel like you're under control, you're just not going fast enough.
A goal without a plan is just a wish.
You can go higher, you can go deeper, there are no boundaries above or beneath you.
Intern
Joined: 10 Dec 2009
Posts: 5
Followers: 0
Kudos [?]: 0 [0], given: 0
Re: Compilation of tips and tricks to deal with remainders. [#permalink] 10 Dec 2009, 09:34
Wondering if it is a good way to solve it as follows:
.12 = 12/100 = 3/25 implies that the remainder is 3 or multiple of 3.
Manager
Joined: 08 Jul 2009
Posts: 171
Followers: 0
Kudos [?]: 22 [0], given: 26
Re: Compilation of tips and tricks to deal with remainders. [#permalink] 10 Dec 2009, 15:06
brownybuddy wrote:
Wondering if it is a good way to solve it as follows:
.12 = 12/100 = 3/25 implies that the remainder is 3 or multiple of 3.
I tested it with some numbers. (8/5, 9/4, 57/12, 57/15, 57/20) They are work using the way you described. I don't know how to prove it mathematically though. Does anyone know? This is a smart way if it works for all numbers!
Manager
Joined: 29 Oct 2009
Posts: 211
GMAT 1: 750 Q50 V42
Followers: 78
Kudos [?]: 863 [0], given: 18
Re: Compilation of tips and tricks to deal with remainders. [#permalink] 10 Dec 2009, 23:24
wilbase wrote:
sriharimurthy wrote:
Eg. $$R of \frac{(23)*(27)}{25} = R of \frac{(-2)*(2)}{24} = -4.$$ Now, since it is negative, we have to add it to 25.$$R = 25 + (-4) = 21$$
Is the "24" on the second part of the equation suppose to be "25"?
Yes. It is supposed to be 25. Thanks for spotting that. I have edited it.
brownybuddy wrote:
Wondering if it is a good way to solve it as follows:
.12 = 12/100 = 3/25 implies that the remainder is 3 or multiple of 3.
Yes. It follows from property number 7.
Since we are asked to find the remainder when 's' is divided by 't' and we are given the resulting number, we can write an equation as follows :
Remainder = (Decimal portion of the resulting number) * (Number we are dividing by)
Remainder = 0.12 * t
R = $$\frac{12}{100}*t$$ = $$\frac{3}{25}*t$$
So as you can see, the remainder 'R' must be a multiple of '3' provided 't' is an integer.
Since we know that 't' is an integer, we can safely conclude that 'R' is a multiple of '3'.
Note : In cases of remainder problems, even if 't' is not an integer it can be made into an integer. Eg. Remainder of 6/2.5 will be the same as Remainder of 12/5.
_________________
Click below to check out some great tips and tricks to help you deal with problems on Remainders!
compilation-of-tips-and-tricks-to-deal-with-remainders-86714.html#p651942
1) Translating the English to Math : word-problems-made-easy-87346.html
Manager
Joined: 08 Jul 2009
Posts: 171
Followers: 0
Kudos [?]: 22 [0], given: 26
Re: Compilation of tips and tricks to deal with remainders. [#permalink] 11 Dec 2009, 09:36
Oh, right, property #7. That makes sense to me now. Thanks for the reply.
Intern
Joined: 21 Nov 2009
Posts: 2
Followers: 0
Kudos [?]: 0 [0], given: 0
Re: Compilation of tips and tricks to deal with remainders. [#permalink] 12 Dec 2009, 07:04
sry, i din get a chance to luk thru all the tips... but the 1 problem on remainder posted above is very interesting n helpful... thanks for the post.
Intern
Joined: 10 Dec 2009
Posts: 5
Followers: 0
Kudos [?]: 0 [0], given: 0
Re: Compilation of tips and tricks to deal with remainders. [#permalink] 13 Dec 2009, 03:14
s = Numerator
t = Denominator
q = Quotient (>= 0)
r = Remainder
where,
s/t = q + r/t
In 64.12, q = 64, so
r/t = .12 = 12/100 = 3/25
where 25 is the least possible value of 't' and 1603 is the least possible value of 's'. The other possible values of 't' will include 25, 50, 75 and so on (i.e. multiple of 25). The values of 'r' and 's' will also change accordingly.
Intern
Affiliations: IEEE, PMI, MIEEE, PMP, New Nigeria Club
Joined: 08 Dec 2009
Posts: 5
Location: Lagos , Nigeria
Schools: Wharton, Kellogg,NYU STERN, Jones, Simon
Followers: 0
Kudos [?]: 1 [0], given: 7
Re: Compilation of tips and tricks to deal with remainders. [#permalink] 19 Dec 2009, 01:17
Hi ,
I am new on this forum , and i will tell you that what i have gained reading all the posts in the various sections have been mind blowing .
I wish to study indepth before i sit for my GMAT. I am quite ambitious with the kind of score i desire and i think you guys are the best in terms of detailing the requirements .
Please kindly explain the 3rd to 5th Rule on the remainder lecture ... i cant seem to grasp the rules!!
Thank you
Easy
_________________
Easy does it , an extra effort does not hurt...
Manager
Status: Applying Now
Joined: 21 Nov 2009
Posts: 64
WE: Project Management (Manufacturing)
Followers: 3
Kudos [?]: 85 [0], given: 3
Re: Compilation of tips and tricks to deal with remainders. [#permalink] 21 Dec 2009, 02:18
Property 3 says that
Quote:
3) If a number has a remainder of ‘r’, all its factors will have the same remainder ‘r’ provided the value of ‘r’ is less than the value of the factor.
Eg. If remainder of 21 is 5, then remainder of 7 (which is a factor of 21) will also be 5.
But if we see 21/5 remainder is 1
7 is a factor of 21
7/5 and the remainder is 2.
_________________
If you like my post, consider giving me a kudos. THANKS!
Manager
Joined: 29 Oct 2009
Posts: 211
GMAT 1: 750 Q50 V42
Followers: 78
Kudos [?]: 863 [0], given: 18
Re: Compilation of tips and tricks to deal with remainders. [#permalink] 21 Dec 2009, 03:56
msunny wrote:
Property 3 says that
Quote:
3) If a number has a remainder of ‘r’, all its factors will have the same remainder ‘r’ provided the value of ‘r’ is less than the value of the factor.
Eg. If remainder of 21 is 5, then remainder of 7 (which is a factor of 21) will also be 5.
But if we see 21/5 remainder is 1
7 is a factor of 21
7/5 and the remainder is 2.
Hi,
To make this example more clear : If any number when divided by 21 leaves a remainder of 5, then that number when divided by any factor of 21 will also leave a remainder of 5 provided the remainder is less than the factor.
Eg. R of 26/21 = 5
Factors of 21 are 3 and 7
Since 7 is greater than 5, R of 26/7 = 5
Since 3 is less than 5, R of 26/3 = R of 5/3 = 2
Hope this makes it clear.
I think I will edit the main post to make this point less confusing.
Cheers.
_________________
Click below to check out some great tips and tricks to help you deal with problems on Remainders!
compilation-of-tips-and-tricks-to-deal-with-remainders-86714.html#p651942
1) Translating the English to Math : word-problems-made-easy-87346.html
Manager
Status: Applying Now
Joined: 21 Nov 2009
Posts: 64
WE: Project Management (Manufacturing)
Followers: 3
Kudos [?]: 85 [0], given: 3
Re: Compilation of tips and tricks to deal with remainders. [#permalink] 21 Dec 2009, 04:08
Oh ok. Thanks so much for the explanation.
21 is the divisor.
_________________
If you like my post, consider giving me a kudos. THANKS!
Manager
Joined: 29 Oct 2009
Posts: 211
GMAT 1: 750 Q50 V42
Followers: 78
Kudos [?]: 863 [0], given: 18
Re: Compilation of tips and tricks to deal with remainders. [#permalink] 21 Dec 2009, 04:17
Hi ,
I am new on this forum , and i will tell you that what i have gained reading all the posts in the various sections have been mind blowing .
I wish to study indepth before i sit for my GMAT. I am quite ambitious with the kind of score i desire and i think you guys are the best in terms of detailing the requirements .
Please kindly explain the 3rd to 5th Rule on the remainder lecture ... i cant seem to grasp the rules!!
Thank you
Easy
Hi,
3rd Rule : I have explained the 3rd rule in the above post.
4th Rule : The cycle of powers is useful to know because it tells us the only possible values that the units place can hold for any particular number when it is raised to an integer power.
Go through the following example to see the usefulness of this rule :
Quote:
If n and m are positive integers, what is the remainder when 3^(4n + 2 + m) is divided by 10 ?
(1) n = 2
(2) m = 1
The Concept tested here is cycles of powers of 3.
The cycles of powers of 3 are : 3,9,7,1
St I) n = 2. This makes 3^(4*2 +2 + m) = 3^(10+m). we do not know m and hence cannot figure out the unit digit.
St II) m=1 . This makes 3^(4*n +2 + 1).
4n can be 4,8,12,16...
3^(4*n +2 + 1) will be 3^7,3^11, 3^15,3^19 ..... in each case the unit digit will be 7. SUFF
Hence B
5th Rule : Again for this rule, the best way to understand it is to work through a couple of questions (numbers-86325.html). Go through my solutions for the two problems in the post I have linked and see how rules 5 and 6 relate to them.
It might take a while for these concepts to get cemented but have a little patience and you will be rewarded.
If you have any specific doubts you would like me to address then please let me know.
Cheers.
_________________
Click below to check out some great tips and tricks to help you deal with problems on Remainders!
compilation-of-tips-and-tricks-to-deal-with-remainders-86714.html#p651942
1) Translating the English to Math : word-problems-made-easy-87346.html
Intern
Joined: 23 Dec 2009
Posts: 49
Schools: HBS 2+2
WE 1: Consulting
WE 2: Investment Management
Followers: 0
Kudos [?]: 16 [0], given: 7
Practice these tricks! [#permalink] 30 Dec 2009, 02:08
Practice sri's wonderful tips and tricks: 4GMAT Home >> GMAT Test Prep Questions >> Number Systems...
I was wondering if someone could show me how to do this problem (found at the said site) quicker than my method (detailed below):
8. What is the remainder when the product of 1044, 1047, 1050, and 1053 is divided by 33?
I used sri's trick and found that 1056 is a multiple of 33. This resulted in remainders of (-12)(-9)(-6)(-3), respectively.
Multiplied together, you get 1944. The remainder of 1944, when divided by 33, is 30, the correct answer.
Is there a quicker way than multiplying (-12)(-9)(-6)(-3) out?
_________________
My GMAT quest...
...over!
Manager
Joined: 29 Oct 2009
Posts: 211
GMAT 1: 750 Q50 V42
Followers: 78
Kudos [?]: 863 [1] , given: 18
Re: Practice these tricks! [#permalink] 30 Dec 2009, 08:12
1
KUDOS
R2I4D wrote:
Practice sri's wonderful tips and tricks: 4GMAT Home >> GMAT Test Prep Questions >> Number Systems...
I was wondering if someone could show me how to do this problem (found at the said site) quicker than my method (detailed below):
8. What is the remainder when the product of 1044, 1047, 1050, and 1053 is divided by 33?
I used sri's trick and found that 1056 is a multiple of 33. This resulted in remainders of (-12)(-9)(-6)(-3), respectively.
Multiplied together, you get 1944. The remainder of 1944, when divided by 33, is 30, the correct answer.
Is there a quicker way than multiplying (-12)(-9)(-6)(-3) out?
Hi,
Im glad you found these tips helpful. There is in fact a quicker way to solve it.
R of $$\frac{(-12)*(-3)*(-9)*(-6)}{33}$$ = R of $$\frac{(36)*(54)}{33}$$ = R of $$\frac{(3)*(21)}{33}$$ = R of $$\frac{63}{33}$$ = $$30$$
As you can see, you don't really need to do any complex multiplications. Just multiply numbers is groups that yield a number closest to the denominator. That way you can keep simplifying to smaller numbers and avoid big calculations.
Let me know if anything needs to be clarified.
Cheers.
_________________
Click below to check out some great tips and tricks to help you deal with problems on Remainders!
compilation-of-tips-and-tricks-to-deal-with-remainders-86714.html#p651942
1) Translating the English to Math : word-problems-made-easy-87346.html
Senior Manager
Joined: 22 Dec 2009
Posts: 364
Followers: 11
Kudos [?]: 259 [0], given: 47
Re: Compilation of tips and tricks to deal with remainders. [#permalink] 31 Jan 2010, 01:56
sriharimurthy wrote:
Cycle of powers : This is used to find the remainder of $$n^x$$, when divided by 10, as it helps us in figuring out the last digit of $$n^x$$.[/size]
The cycle of powers for numbers from 2 to 10 is given below:
2: 2, 4, 8, 6 → all $$2^{4x}$$ will have the same last digit.
3: 3, 9, 7, 1 → all $$3^{4x}$$ will have the same last digit.
4: 4, 6 → all $$4^{2x}$$ will have the same last digit.
5: 5 → all $$5^x$$ will have the same last digit.
6: 6 → all $$6^x$$ will have the same last digit.
7: 7, 9, 3, 1 → all $$7^{4x}$$ will have the same last digit.
8: 8, 4, 2, 6 → all $$8^{4x}$$ will have the same last digit.
9: 9, 1 → all $$9^{2x}$$ will have the same last digit.
10: 0 → all $$10^x$$ will have the same last digit.
Hi sriharimurthy...... Thanks a lot for this post...its outstanding..... Kudos x 10 for this
I have a few questions on the cycle of powers part... didnt get this too well...
2: 2, 4, 8, 6 → all $$2^{4x}$$ will have the same last digit.
Why do you show this as $$2^{4x}$$... what is $$4x$$ all about.... ?
_________________
Cheers!
JT...........
If u like my post..... payback in Kudos!!
|For CR refer Powerscore CR Bible|For SC refer Manhattan SC Guide|
~~Better Burn Out... Than Fade Away~~
Senior Manager
Joined: 22 Dec 2009
Posts: 364
Followers: 11
Kudos [?]: 259 [0], given: 47
Re: Compilation of tips and tricks to deal with remainders. [#permalink] 31 Jan 2010, 03:42
sriharimurthy wrote:
5) Many seemingly difficult remainder problems can be simplified using the following formula :
$$R of \frac{x*y}{n} = R of \frac{(R of \frac{x}{n})*(R of \frac{y}{n})}{n}$$
Eg. $$R of \frac{20*27}{25} = R of \frac{(R of \frac{20}{25})*(R of \frac{27}{25})}{25} = R of \frac{(20)*(2)}{25} = R of \frac{40}{25} = 15$$
Eg. $$R of \frac{225}{13} = R of \frac{(15)*(15)}{13} = R of {(2)*(2)}{13} = R of \frac{4}{13} = 4$$
6) $$R of \frac{x*y}{n}$$ , can sometimes be easier calculated if we take it as $$R of \frac{(R of \frac{(x-n)}{n})*(R of \frac{(y-n)}{n})}{n}$$
Especially when x and y are both just slightly less than n. This can be easier understood with an example:
Eg. $$R of \frac{(19)*(21)}{25} = R of \frac{(-6)*(-4)}{25} = 24$$
NOTE: Incase the answer comes negative, (if x is less than n but y is greater than n) then we have to simply add the remainder to n.
Eg. $$R of \frac{(23)*(27)}{25} = R of \frac{(-2)*(2)}{25} = -4.$$ Now, since it is negative, we have to add it to 25.$$R = 25 + (-4) = 21$$
[Note: Go here to practice two good problems where you can use some of these concepts explained : numbers-86325.html]
I have a question here.....
You explained the remainder formula as :
Quote:
size=130]6) $$R of \frac{x*y}{n}$$ , can sometimes be easier calculated if we take it as $$R of \frac{(R of \frac{(x-n)}{n})*(R of \frac{(y-n)}{n})}{n}$$ [/size]
Especially when x and y are both just slightly less than n.
And in you example:
Quote:
Eg. $$R of \frac{(19)*(21)}{25} = R of \frac{(-6)*(-4)}{25} = 24$$
shouldn't this be Eg. $$R of \frac{(19)*(21)}{25} = R of \frac{(R of \frac{(19-25)}{25})*R of \frac{(21-25)}{25}}{25} = R of \frac{(R of \frac{(-6)}{25})*R of \frac{(-4)}{25}}{25}$$????
After this I am upside down
_________________
Cheers!
JT...........
If u like my post..... payback in Kudos!!
|For CR refer Powerscore CR Bible|For SC refer Manhattan SC Guide|
~~Better Burn Out... Than Fade Away~~
Intern
Joined: 15 Jan 2010
Posts: 1
Schools: HBS,LSB stanford, wharton,MIT
Followers: 0
Kudos [?]: 0 [0], given: 0
Re: Compilation of tips and tricks to deal with remainders. [#permalink] 21 Feb 2010, 09:18
great sri
Intern
Joined: 14 Dec 2009
Posts: 8
Followers: 0
Kudos [?]: 0 [0], given: 1
Re: Compilation of tips and tricks to deal with remainders. [#permalink] 04 Mar 2010, 11:49
Excellent...collection..Kudos to you for assembling this.
Manager
Joined: 20 Nov 2009
Posts: 168
Followers: 7
Kudos [?]: 68 [0], given: 64
Which of the following must be a divisor of a? [#permalink] 02 Apr 2010, 01:29
Great post. Was very useful. Thanks.
_________________
But there’s something in me that just keeps going on. I think it has something to do with tomorrow, that there is always one, and that everything can change when it comes.
http://aimingformba.blogspot.com
Intern
Joined: 03 Apr 2010
Posts: 6
Followers: 2
Kudos [?]: 0 [0], given: 10
Re: Compilation of tips and tricks to deal with remainders. [#permalink] 03 Apr 2010, 13:08
Hi
Please can u explain me more about 4, 5 and 6. I don't understand when u say cycle of powers and how to apply the formulas in 5 and 6.
Thanks a lot.
Jonyjo
Re: Compilation of tips and tricks to deal with remainders. [#permalink] 03 Apr 2010, 13:08
Go to page Previous 1 2 3 4 5 Next [ 89 posts ]
Similar topics Replies Last post
Similar
Topics:
40 Tips and Tricks: Mixtures 4 30 Apr 2013, 13:45
127 Tips and Tricks: Inequalities 27 14 Apr 2013, 08:20
2 The lucky number trick: Remainder when divided by 9 2 08 May 2011, 02:31
How does one deal with Factorials? Is there a trick to 2 02 Mar 2008, 14:22
Math formulas, tips/tricks 2 06 Feb 2008, 20:46
Display posts from previous: Sort by |
# What does it mean to have a strictly increasing transformation in consumer theory? [closed]
We're discussing utility functions
• A little more context would be helpful. In which context exactly did you encounter the term? – Michael Greinecker Oct 28 '18 at 23:38
If I'm understanding your question correctly, you are referring to increasing transformations of a utility function. Suppose I have a set of alternatives $$X$$, a rational preference relation $$\succsim$$ on $$X$$, and a function $$u:X \rightarrow \mathbb{R}$$ which represents this preference relation. Then it can be shown that for any $$v:\mathbb{R} \rightarrow \mathbb{R}$$ which is monotonically increasing, $$v \circ u:X \rightarrow \mathbb{R}$$ also represents these preferences. Try to prove this; it's a good exercise. |
# How to optimize controls on large sparse Hamiltonians
Efficiently perform control optimization on sparse Hamiltonians
Boulder Opal exposes a highly-flexible optimization engine for general-purpose gradient-based optimization. It can be directly applied to model-based control optimization for arbitrary-dimensional quantum systems.
This optimization engine provides best-in-class time to solution, but the efficiency of the optimization will always decline with the system size. In cases where the Hamiltonian to be treated is sparse it is possible to recover performance via specialized methods. In this user guide we demonstrate the use of sparse-Hamiltonian methods for efficient optimizations in large systems. To learn the basics about control optimization, you can follow our robust optimization tutorial.
## Summary workflow
### 1. Define system Hamiltonian with a sparse representation
The flexible Boulder Opal optimization engine expresses all optimization problems as data flow graphs, which describe how optimization variables (variables that can be tuned by the optimizer) are transformed into the cost function (the objective that the optimizer attempts to minimize).
You can carry out the optimization of larger systems by using approximate integration methods that are more computationally effective than standard approaches. This is especially helpful when the Hamiltonian is sparse.
Here you can define system Hamiltonian terms with a sparse representation with operations such as graph.sparse_pwc_operator or graph.constant_sparse_pwc_operator. These accept an operator as a Tensor or as a sparse matrix (for example, as a scipy.sparse.coo_matrix).
### 2. Use sparse-matrix methods in the computational graph
You can then integrate the Schrödinger equation using the Lanczos algorithm that is available in the operation graph.state_evolution_pwc. The Lanczos algorithm accepts a parameter called the krylov_subspace_dimension, which controls the accuracy of the operation. You can choose this parameter manually or use the operation graph.estimated_krylov_subspace_dimension_lanczos to obtain an estimate of its best choice for your Hamiltonian and error tolerance.
All of these calculations are performed within the optimization graph.
### 3. Execute graph-based optimization
With the graph object created, an optimization can be run using the qctrl.functions.calculate_optimization function. The cost, the outputs, and the graph must be provided. The function returns the results of the optimization. Note that this example code block uses naming that should be replaced with the naming used in your graph.
import matplotlib.pyplot as plt
import numpy as np
from qctrlvisualizer import get_qctrl_style, plot_controls
from qctrl import Qctrl
plt.style.use(get_qctrl_style())
# Start a Boulder Opal session.
qctrl = Qctrl()
## Example: Optimized controls in a nearest-neighbor-coupled qubit chain
To illustrate this, consider a system of four qubits where each qubit only interacts with the nearest neighbor through an XX coupling operator:
$H = \frac{1}{2} \sum_{i=1}^3 \Omega_i(t) \sigma_{x,i} \sigma_{x,i+1}.$
Suppose you start from the state $\left| 0000 \right\rangle$ and want to create the state $\left(\left| 0000 \right\rangle +i\left| 0011 \right\rangle -i\left| 1100 \right\rangle+ \left| 1111 \right\rangle \right)/2$ by using optimized controls for $\Omega_1(t)$, $\Omega_2(t)$, and $\Omega_3(t)$.
The following code uses spare-matrix techniques and Lanczos algorithm to obtain an estimate for an integration accuracy of 1e-5 and then how to optimize the controls using it. The code also prints a comparison between the integration that uses the Lanczos algorithm and the exact integration, as well as the optimized controls.
# Define physical constraints.
omega_max = 2 * np.pi * 5e6 # rad/s
duration = 500e-9 # s
segment_count = 20
sample_times = np.linspace(0, duration, 100)
target_state = np.zeros(2**4, complex)
target_state[int("0000", 2)] = 1 / 2
target_state[int("0011", 2)] = 1j / 2
target_state[int("1100", 2)] = -1j / 2
target_state[int("1111", 2)] = 1 / 2
# Define coupling operators.
def create_operators(graph):
sigma_x = graph.pauli_matrix("X")
return [
0.5 * graph.embed_operators([(sigma_x, n), (sigma_x, n + 1)], [2] * 4)
for n in range(3)
]
# Build graph to estimate the Krylov subspace dimension.
graph = qctrl.create_graph()
# Find the spectral range for the Hamiltonian with highest omega value.
spectral_range = graph.spectral_range(operator=omega_max * sum(create_operators(graph)))
# Find the suggested Krylov subspace dimension for that spectral range
# with an error tolerance of 1e-5.
graph.estimated_krylov_subspace_dimension_lanczos(
spectral_range=spectral_range,
duration=duration,
maximum_segment_duration=duration / segment_count,
error_tolerance=1e-5,
name="krylov_subspace_dimension",
)
# Estimate recommended Krylov subspace dimension.
krylov_subspace_dimension = qctrl.functions.calculate_graph(
graph=graph, output_node_names=["krylov_subspace_dimension"]
).output["krylov_subspace_dimension"]["value"]
# Build optimization graph.
graph = qctrl.create_graph()
# Define initial state.
initial_state = graph.fock_state(16, 0)
# Define individual control signals (Omegas).
signals = [
graph.utils.real_optimizable_pwc_signal(
segment_count=segment_count,
minimum=-omega_max,
maximum=omega_max,
duration=duration,
name=rf"$\Omega_{n+1}$",
)
for n in range(3)
]
# Define individual terms of the Hamiltonian.
operators = create_operators(graph)
sparse_hamiltonian_terms = [
graph.sparse_pwc_operator(signal=signal, operator=operator)
for signal, operator in zip(signals, operators)
]
# Create total Hamiltonian by adding terms.
hamiltonian = graph.sparse_pwc_sum(sparse_hamiltonian_terms)
# Integrate the Schrödinger equation for the Hamiltonian,
# using the recommended choice of Krylov subspace dimension.
evolved_states = graph.state_evolution_pwc(
initial_state=initial_state,
hamiltonian=hamiltonian,
krylov_subspace_dimension=krylov_subspace_dimension,
sample_times=sample_times,
)
# Calculate the infidelities as a function of time.
sparse_infidelities = graph.state_infidelity(
evolved_states, target_state, name="sparse_infidelities"
)
# Use the final state infidelity as the cost.
final_state_infidelity = sparse_infidelities[-1]
final_state_infidelity.name = "cost"
# Calculate the evolution using a dense Hamiltonian, for comparison.
dense_hamiltonian_terms = [
signal * operator for signal, operator in zip(signals, operators)
]
dense_hamiltonian = graph.pwc_sum(dense_hamiltonian_terms)
time_evolution_operators = graph.time_evolution_operators_pwc(
hamiltonian=dense_hamiltonian, sample_times=sample_times
)
dense_evolved_states = time_evolution_operators @ initial_state[:, None]
dense_infidelities = graph.state_infidelity(
dense_evolved_states[..., 0], target_state, name="dense_infidelities"
)
# Run optimization.
result = qctrl.functions.calculate_optimization(
graph=graph,
cost_node_name="cost",
output_node_names=["sparse_infidelities", "dense_infidelities"]
+ [rf"$\Omega_{n+1}$" for n in range(3)],
optimization_count=5,
)
# Extract time-dependent infidelities.
sparse_infidelities = result.output.pop("sparse_infidelities")["value"].flatten()
dense_infidelities = result.output.pop("dense_infidelities")["value"].flatten()
# Plot and print results.
fig, ax = plt.subplots(figsize=(10, 5))
ax.plot(sample_times / 1e-9, sparse_infidelities, label="Lanczos integration")
ax.plot(sample_times / 1e-9, dense_infidelities, ":", label="Exact integration")
ax.legend()
ax.set_xlabel("Time (ns)")
ax.set_ylabel("State infidelity")
print(f"\nRecommended Krylov subspace dimension:\t{krylov_subspace_dimension}")
print(f"Final state infidelity: {result.cost:.3e} (Lanczos integration)")
print(f"Final state infidelity: {dense_infidelities[-1]:.3e} (Exact integration)")
plot_controls(result.output)
Your task calculate_graph (action_id="1404019") has completed.
Recommended Krylov subspace dimension: 10
Final state infidelity: 2.665e-15 (Lanczos integration)
Final state infidelity: -1.195e-13 (Exact integration)
Comparison between the time evolution of the infidelity using the Lanczos and exact integrations (top). The difference between them is well within the 1e-5 accuracy. Optimized pulses obtained to generate the target state (bottom).
This notebook was run using the following package versions. It should also be compatible with newer versions of the Q-CTRL Python package.
Package Version
Python 3.9.12
matplotlib 3.5.1
numpy 1.21.6
scipy 1.7.3
qctrl 19.7.2
qctrl-commons 17.6.0
boulder-opal-toolkits 2.0.0-beta
qctrl-visualizer 4.3.0 |
# Math Help - Find the inhomogeneous solution for set of equations, check please :)
1. ## Find the inhomogeneous solution for set of equations, check please :)
2x1 + 4x2 -4x3 + 6x4 = 4
2x1 + 4x2 -3x3 + 4x4 = 5
5x1 + 10x2 -8x3 + 11x4 = 6
2 4 -4 6 ¦ 4
2 4 -3 4 ¦ 5
5 10 -8 11 ¦ 6
1 2 -2 3 ¦ 2
2 4 -3 4 ¦ 5
5 10 -8 11 ¦ 6
1 2 -2 3 ¦ 2
0 0 1 -2 ¦ 1
0 0 2 -4 ¦ -4
1 2 -2 3 ¦ 2
0 0 1 -2 ¦ 1
0 0 0 0 ¦ -6
So it doesnt work, is this right?
$
2x1 + 4x2 -4x3 + 6x4 = 4
2x1 + 4x2 -3x3 + 4x4 = 5
5x1 + 10x2 -8x3 + 11x4 = 6
$
2 4 -4 6 ¦ 4
2 4 -3 4 ¦ 5
5 10 -8 11 ¦ 6
1 2 -2 3 ¦ 2
2 4 -3 4 ¦ 5
5 10 -8 11 ¦ 6
1 2 -2 3 ¦ 2
0 0 1 -2 ¦ 1
0 0 2 -4 ¦ -4
1 2 -2 3 ¦ 2
0 0 1 -2 ¦ 1
0 0 0 0 ¦ -6
So it doesnt work, is this right?
I'm not sure what you mean by "doesn't work", but what you proved is that the linear system is incongruent, i.e. it has no solutions.
Tonio
3. Originally Posted by tonio
I'm not sure what you mean by "doesn't work", but what you proved is that the linear system is incongruent, i.e. it has no solutions.
Tonio
Yeah no solutions is what i meant, have i done the workings out right as well?
4. My friend is getting an answer for this with many solutions. Can someone check if i've done it right please. Thank you.
He didn't make the top row lead with a one, can you do this?
5. Your friend is wrong; you're right. There are no solutions.
You don't have to make the top row lead with a one. Computer solutions, in fact, rarely do that because for a computer, it doesn't make the solution come any quicker. The ERO of multiplying an entire row by a constant is not done in computers.
6. Originally Posted by Ackbeet
Your friend is wrong; you're right. There are no solutions.
You don't have to make the top row lead with a one. Computer solutions, in fact, rarely do that because for a computer, it doesn't make the solution come any quicker. The ERO of multiplying an entire row by a constant is not done in computers.
Yeah we went threw his workings out and he missed out a minus half way through his reduction which changed his results. Cheers.
7. Cool. All set on this one, then?
8. Originally Posted by Ackbeet
Cool. All set on this one, then?
Yep, ta.
9. All right. Have a good one! |
# Indefinite integral
## Homework Statement
(e^-x)/(1+e^-x)dx
## Homework Equations
Integral of e^x function
## The Attempt at a Solution
I am completely lost with the problem, the fact that it is e^-x and not e^x has me stupped as well as the division.
Related Calculus and Beyond Homework Help News on Phys.org
Try $u$-substitution.
so if I let u=1+e^-x?
yes?
so if I let u=1+e^-x?
Well, does it work?
I still cant figure it out so I gave up and will try again later
I still cant figure it out so I gave up and will try again later
When you do get back to it, answer this: What is $du$ when $u=1+e^{-x}$?
Will du = -e^-x dx |
# Discrete Mathematics for Computer Science
## What is Discrete Mathematics?
Mathematics is broadly divided into two major branches – discrete mathematics and continuous mathematics. Discrete mathematics mostly deals with only those real numbers which are multiples of some basic unit. If the basic unit is 1, then the discrete variable can assume only integral values. Thus in continuous mathematics, the number system is usually real numbers while for discrete mathematics it is the integer.
As a result, a discrete variable can’t become infinitely small and as a such concept like instantaneous rate of change isn’t available in discrete mathematics but this is the basic concept in continuous mathematics. Hence discrete mathematics is the branch of mathematics devoted to the study of discrete objects that uses arithmetic and algebra, in contrast to other branches, such as calculus and analysis, whose main concern is with continuous functions. Of course, neither discrete nor continuous mathematics is a watertight compartment. Some branches of mathematics, such as numerical analysis and linear algebra, have both continuous functions and discrete components. |
# Average Value of a Function
1. Feb 9, 2012
### Square1
Hey so I am in a second semester calculus class and we are learning about the average value of the function. We are presented the following formula:
(1/(b-a)) ∫a to b f(x) dx for a ≤ x ≤ b
This is basically doing (x1+...xn)/n, except for infinitely many numbers over the interval
[a -b]
Naturally we need to learn from some starting point, but in terms of averages of functions, this is where we end in the course.
Now for the question. Aren't there better formulas for functions that are not evenly distributed?
Say you were using this formula to get the average value of some function where most its values are some big big numbers, but the remaining minority of numbers are very tiny numbers, so much so that average value using the above method is brought to a value that is very misleading. Misleading as in you would never have guessed for example that an average value of 5 was produced by a function where lets say most of its values are in the thousands...and this happens because you have a small collection of very small numbers.
If I'm not making sense here just let me know haha. I'll try to explain it another way.
So are there other techniques of taking averages? Would these be in a statistics class?
2. Feb 9, 2012
### xepma
The next quantity you can define to characterize a function or data set would be something like "the average deviation from the average". The way you define it is as:
$$\frac{1}{b-a}\int_{a}^b f(x) (x - c) dx$$
where c is the average value of f(x), defined by your integral.
This expression is called the variance of the function f(x), and it's used very frequently in statistics.
You can go further and look at "average deviation from the average deviation" (skewness), and even higher order deviations (kurtosis). These things are called moments. If you know all the moments of a function (mean, variance, etc) you will be able to derive the function itself from these values.
3. Feb 9, 2012
### AlephZero
I think you are right, a discussion of the best way to measure "the average value" in a particular situation belongs in a statistics class rather than pure math. the median and the mode are two other simple ones. Google for more information about them.
You are right that the arithmetic mean (or the integral version of it) doesn't necessarily agree with "common sense". For example, over 99.9% of humans have more than the average number of arrms and legs. There are so few surviving humans with more than two arms or legs that you can ignore them out of a total of 7 billion, but there are certainly people with fewer than two as the result of accidents, birth defects, etc. So the average number will be a bit less than 2.
4. Feb 9, 2012
### Square1
I see, thanks! So I should enroll in statistics courses to learn about this sort of analysis? Topics in particular you can think of?
So the results of "the average of a function" stand alone really only when the interval in question is evenly distributed? |
## Sunday, November 27, 2016
### 26/11
The living owe it to those who no longer can speak, to tell their story for them.''
Czeslaw Milosz.
A video. (Note: The video can be disturbing.)
This blog post by Neelima Gupte and Sumathi Rao.
## Tuesday, November 22, 2016
### The IPA Rahul Basu Memorial Award 2014-2016
It is our great pleasure to declare that the winners of the Rahul Basu Memorial Award have been selected. These are:
Winners:
Dr. Bhawna Gomber, Calcutta University.
Thesis Title: Search of Large Extra Dimensions in g+ET final state in pp collisions with the CMS detector at the LHC.
Dr. Roji Pius, Harishchandra Research Institute, Allahabad.
Thesis Title: Perturbative aspects of String Theory and Gauge/Strong Duality
Honourable Mention:
Dr. Md. Rihan Haque, NISER, Bhubaneshwar.
Thesis Title: Nucleii Production and Azimuthal Anisotropy of charged particles in heavy-ion collisions at RHIC
Dr. Kirtimaan Mohan, CHEP, IISc, Bangalore
Thesis Title: The Higgs Boson as a probe of physics beyond the standard model in the era of the LHC.
The award ceremony will be held as a part of the DAE symposium on High Energy Physics, on 16th December, 2016 (Friday) in Delhi University between 12.00 and 1.00 pm.
Award committee: Bedangadas Mohanty (Chair), Sunanda Bannerjee, Debayoti Chowdhuri, Debashis Ghoshal, Rohini Godbole, Sourendu Gupta, Neelima Gupte, Sunil Mukhi.
Thanks all.
This blog post by Neelima Gupte and Sumathi Rao.
## Monday, November 14, 2016
### The week that was
And what a week it was! It started off pleasantly enough, at the theater with Wooster and Jeeves, trotting off in the two seater to Totleigh Towers, with Aunt Dahlia, Madeliene Basset, Sir Watkin Basset, Roderick Spode and Stiffy Byng in the mixture. Bertie was in trouble, but Jeeves saved the day. It was a terrific production, given that all roles were played by just three actors, with the two seater and the bath tub also playing stellar roles. Here is Bertie in a bath tub, although at a large distance! The ticket prices played their role in keeping the audience at a distance, with the front seats being priced at Rs 5000 a piece!
If Bertie had a bad week, the rest of us had it worse. On Tuesday, the U.S. got Trumped and India got Modified. Change' had a great week. The public was out of money, the ATMs were out of cash, and the PM was out of the country. However, the apologists were not out of excuses. After holding out for several days on the basis of 10 Rs notes having found their way to the corners of sundry purses, sheer necessity forced a trip to the bank. Two and a half hours of patience yielded four of the notes below, with Gandhiji smiling bashfully on a background of a colour hitherto associated with Barbie.
All the chaos was in a good cause, being dedicated to rooting out black moneys. Here is one of them below, looking dejected. (In case of incomprehensibility, consult Google Translate).
We now await the rigours of the next week. However, Chennai might look forward to some relief. Amma is expected to be discharged from hospital. Please stand by for further bulletins from the frontline.
This blog post is by Neelima Gupte and Sumathi Rao.
## Sunday, October 2, 2016
### Turbulent times
This post is long delayed, and hence covers a lot of mileage, due to long journeys, all through troubled parts. Although, just about everywhere is troubled these days, including, home. It's more a case of troubled times than troubled parts.
July was Europe: Slovenia, France and Germany. Summer in Ljubljana was beautiful, flowers everywhere, and dragon statues on the bridge. However, there was shocking news every night. Bombs in Turkey, terrorist attacks in Nice and Rouen, terrorist attacks in Munich, protests in Berlin. The streets looked deceptively peaceful, but the long lines in airport security and the number of policemen in the streets gave clues to the tense state of affairs. There was a huge protest outside the Berlin Hauptbahnoff. Angela Merkel's humanitarian generosity was provoking xenophobic backlash. (There were anti-protest protests too. Good for those guys).
August was the U.S: blue skies, fresh air and the Rocky mountains. All looked idyllic, but the presidential race was hotting up. Xenophobia and misogyny were rearing their ugly heads again. Who knows what the election results will throw up, and whom it will affect? No country is truly sovereign these days, as everyone knows.
September was back home again. Dead silence in the newspapers on Kashmir, despite numerous indications of trouble. The Uri attacks and surgical strikes' blew the lid on the bottled hysteria. All the chest thumping nationalism was woefully similar to that seen in other parts of the world. Saner voices were dubbed anti-national', exactly like elsewhere. Xenophobia, and a preoccupation with immediate interests, seems to have become a worldwide theme.
The pictures belie the simmering discontent. All looks so pretty and so peaceful. Maybe that is the real truth, and all the turmoil is superficial and a passing phase. The pundits claim the world is becoming more peaceful, not less. Otherwise, as ordinary citizens, we are fearful. Let's hope the learned ones have got it right!
This blog post is by Neelima Gupte and Sumathi Rao.
## Wednesday, August 24, 2016
This blog has been following the career of Sir Nils Olaf, a king penguin, a member of the Norwegian Kings Guard, a long time resident of Edinburgh Zoo, for many years now (see earlier post).
Rising through the service ranks of a corporal, a sergeant, a sergeant-major and a colonel-in-chief, and after being knighted in 2008 (the occasion celebrated in the previous post), Sir Nils was promoted to Brigadier, by the King's Guard, who were in Edinburgh yesterday to take part in the Military Tattoo. Sir Nils received his promotion with composed pride, after inspecting his comrades at arms, who maintained absolutely straight faces. (See news item and video). Congratulations, Sir Nils!
This blog post by Neelima Gupte and Sumathi Rao.
## Monday, August 22, 2016
### Happy Birthday, Chennai
Today is the 377th birthday of our city by the sea. Happy Birthday, Chennai, and may global warming never destroy your climate, or your coastline. The city has been through a harsh test, but managed to emerge with its characteristic resilience, leaving the smiles of its citizens intact. (Sometimes we new Madrasis wish the citizens would have less patience!) However, there is something to be said for those who go through disasters, and come out still armed with their usual good nature. We hope the next year will be nicer, to all of us. Meanwhile, the celebrations are on. The MahaVishnu of Mount Road is always the most informed about all that happens here. So here are the full details.
Hope to see everyone at the numerous festivities.
This blog post by Neelima Gupte and Sumathi Rao.
## Tuesday, July 5, 2016
### Juno and Jupiter
Juno's reached Jupiter, and is in a Jupiter orbit, as everyone with a news feed knows! Nasa's spacecraft Juno has a very intensive scientific programme planned, including an investigation into the unusual stability of the solar system's biggest coherent structure, the famed red spot of Jupiter. More updates as information trickles in. Meanwhile, a picture of the red spot from an old friend.
A picture of the little red spot of Jupiter by New Horizons, taken when it flew by Jupiter in 2007.
This is a polar map of Jupiter (South pole) constructed from images taken by the Cassini spacecraft.
(Thanks, Ashutosh). Dynamics aficionados will note the effects.
This blog post by Neelima Gupte and Sumathi Rao.
NASA photos.
## Sunday, June 12, 2016
### Hill station holiday
Last month was the right month to head for the hills, and escape the oppressive heat of the plains.
There's of course no way of escaping the jostling crowds at New Delhi's T3 terminal, except via the jostling crowds at New Delhi Railway station. However, everyone else is also in a good mood, since they are escaping to the hills, too. In fact, everyone is in such a good mood that Air India staff escapes being slaughtered, even after announcing that the flight to Kullu is cancelled, and there is no other flight till the next day. (Passengers look murderous, Jet Airways staff looks smug, but there is no riot). On to Chandigarh, (no, no cancellation), and out into the heat of the afternoon, a reminder that we are still in the plains.
An early start to Chail, up the hill road, in a rickety bus. The perfectly good two lane road of ten years ago, is in the process of being expanded into a four lane highway, and is currently a nightmare, with bulldozers, excavated hill sides, and invitations to land slides. The valiant bus crawls its way clinging precariously to the side of the road. The driver is brilliant. Various faces turn green and water bottles are passed around to quieten queasy stomachs. One tea stop and sundry jacaranda trees later, the rain starts. Various cheerful stories also start, e.g. of people who left for Shimla, sixty kilometres away, on a day like this, and were rescued by helicopter fourteen days later. The bus slows to a crawl, but we end up safely at Chail's palace hotel, merely a little damp due to the rain inside and outside the bus. Chail was the summer capital of the Maharaja of Patiala, who was kicked out of Shimla by the Viceroy for his hell raising antics, and built Chail Palace in a huff.
Chail palace is charming, with huge rooms, antique furniture, log huts and an annexe and a pine forest all around. It's unlikely that the pictures are the Maharaja's pictures. (The death of Socrates?)
They also throw in a few monkeys.
The lights of Shimla can be seen across the hill.
There's a pretty little garden. The village is a one road village, but there is a stadium, a military school, and a Kali Mandir with a spectacular sunset, an unexpected view of the snowline, and, guess what, solar panels. A few days here, is a few days out of time, out of the hassles of day to day existence, until it is time to go back.
This blog post is by Neelima Gupte and Sumathi Rao.
Tailpiece: Day to day hassles? What do you mean day to day hassles? See below.
Self: How can you lose my bag on a Chandigarh Delhi flight?
JA: Not to worry, we already sent it to Chennai.
Self: But I'm here in Delhi.
JA: Not to worry, we will get it back.
Not to worry, they did. Took time, though!
## Friday, June 3, 2016
### A planetoid called Pluto
Our favourite planetoid Pluto is in the news again. The United States Postal Service has released two beautiful stamps showing the eternal pair, the New Horizon space craft, and one of its wonderful pictures of Pluto, in fact every one's Valentine picture of Pluto, with the heart shaped region, the Sputnik Planum, featuring prominently.
The USPS has added to the bonanza by releasing a set of 8 stamps each one with its own planetary member of the solar system. Pluto, which got bounced from its status as a planet, and demoted to being a dwarf planet, a while ago, has been consoled by giving it its own stamp, together with that of its intrepid explorer.
Neither planets nor planetoids have ever looked more gorgeous, albeit thanks to digital enhancement. Now that NASA and USPS have done their bit, we look forward to our own pair, ISRO and India Posts, to give us our own set of stamps from ISRO's space explorations.
This blog post is by Neelima Gupte and Sumathi Rao.
## Friday, April 22, 2016
### JNU/HCU/IIT and all that
This post is a bit late. On the other hand it is perhaps better to wait till the dust has settled down to write on controversial topics. The last six months have witnessed turmoil on several academic campuses, with strong similarities between the incidents that occurred on each one.
The saddest case occurred on the Hyderabad University campus,with a tragic culmination in the suicide of the young and promising Dalit student, Rohith Vemula. What started as a simple case of a scuffle between two student groups, and the consequent rustication of one student group, went out of hand due to mishandling and political interference, and resulted in the loss of a young life. Subsequent events were even more bizarre, with reports of vandalism on campus, the entry of the police, the arrests of students and faculty, and verbal and physical violence towards protesting students.
The story at Jawaharlal Nehru University involved anti-national' slogans raised at a student event involving Kashmiri students, the arrest of Kanhaiya Kumar, the president of the student union, subsequent attacks on him at the courts, and the hunt for those who were actually involved in the incident, who may or may not have been the students finally identified as the culprits.
The incidents at IIT were milder, as befits its sober and nerdy image. Arguments between students belonging to two student societies, resulted in the withdrawal of recognition to one of the concerned parties, allegations and denials of political interference, and the subsequent restoration of the status quo, albeit with more restrictions on the organisations than existed before.
What is startling is the similarity between the incidents on widely separated campuses, which could have been handled peacefully within the rules of the academic institutions, provided they had been applied with some vision and concern, and the opportunity they provided for outside interference. Even more startling is the reaction of the general public, which includes berating students for taking interest in societal and political issues, questioning their academic and familial credentials, and even going to the extreme of estimating the cost of their student stipends and recommending that they start earning their living' and stop being a burden on society'.
There are several broad issues involved here, and many of these have already been discussed threadbare in public fora. We would only like to focus on one here. Universities and academic institutions are meant to be places where notions of society, state and culture are discussed, and to provide platforms for opposing points of view. The norms and regulations of academic institutions are supposed to have evolved to a point where differences of opinion can be sorted out in a democratic, orderly and peaceful manner. It will be best if politicians and the public allow them to do so.
This blog post is by Neelima Gupte and Sumathi Rao.
## Saturday, March 5, 2016
### Rahul Basu 04/03/1956-05/03/2011
May the road rise up to meet you,
may the wind be ever at your back.
May the sun shine warm upon your face,
and the rain fall softly on your fields.
And until we meet again,
may God hold you in the hollow of his hand.
An Irish blessing.
This blog post by Neelima Gupte and Sumathi Rao.
## Wednesday, February 10, 2016
### Gravitational waves
Has the LIGO observatory observed gravitational waves? Rumours have been rife that LIGO (Laser Interference Gravitational Wave observatory) has picked up the signature of gravitational waves (ripples in space time) arising from a massive cosmic event, the collision of two black holes. Astronomers have been looking for confirmation of the rumoured LIGO events in the form of an optical flash in three parts of the sky, in the constellation Dorado, as well as in the constellations Aries and Hydra. The last time the classic signature (a chirp') was observed in the LIGO data was in 2010, but it was announced to be a false signal, fake data inserted to ensure that the analysis could, in fact detect a signal. The experiment has scheduled a press conference on 11th February, where they may confirm the observation, (or not!). More tomorrow, the entire physics world waits with bated breath. Hopefully, the LIGO spokespersons will not shout April Fool, in February!
Update: February 12th: |
# A convex approximation of the concordance index (C-index)
## Introduction
When comparing the performance of an individual or competing group of survival models, the most common choice of scoring metric is the concordance index (C-index). In the time-to-event setting, with $$N$$ observations, the quality of a risk score can be determined by comparing how well the actual ordering of events occurs relative to the ranks of a model’s predicted risk score. There can be up to $$N(N-1)/2$$ possible pairwise comparisons of rank-orderings for right-censored time-to-event data. For example if patient 1 died first, then ideally his risk score should be higher than patients 2, 3, … and $$N$$, and if patient 2 died second his risk score should be higher than patients 3, 4, …, $$N$$, and so on. Equation \eqref{eq:c_exact} formalizes this metric over a double sum.
\begin{align} C(\etab) &= \frac{1}{D} \sum_{i: \delta_i=1} \sum_{\hspace{2mm}j:\hspace{1mm} T_j > T_i} I[\eta_i > \eta_j] \nonumber \\ &= \frac{1}{D} \sum_{i=1}^N \sum_{j=1}^N \delta_i \cdot Y_j(t_i) \cdot I[\eta_i > \eta_j] \tag{1}\label{eq:c_exact} \\ &\hspace{2mm} Y_j(t_i) = I[ T_j > T_i ] \nonumber \end{align}
Where $$\delta_i=1$$ indicates that the patient has experienced the event, $$Y_j(t_i)$$ is whether patient $$j$$ has a recorded time greater than patient $$i$$, $$\eta_i$$ is the risk score of patient $$i$$, $$I[\cdot]$$ is the indicator function, and $$D$$ is the cardinality of the set of all possible pairwise comparisons. Notice that the outer loop is zero if $$\delta_i=1$$; this ensures that if $$T_i$$ is right-censored (i.e. a patient lived for at least $$T_i$$ units of time) they do not contribute to the final score.
Models that are commonly used in survival analysis (the Cox-PH, Random Survival Forest, CoxBoost, Accelerating Failure Time, etc) do not directly minimize a linear (or non-linear) set of features with respect to the C-index. In the case of the partial likelihood (associated with any of the “Cox” models) a sort-of-convex relaxation is used (it also includes a double sum) but more resembles a Softmax function. The goal of this post will be to show how to construct a convex loss function that directly lower-bounds the actual concordance index with the use of the log-sigmoid function. Other smooth functions could also be conceivably used. Readers are encouraged to see this excellent paper for a further discussion of the log-sigmoid lower bound.
## Function for the concordance index
It is easy to write a wrapper to calculate the concordance index. This will be able to emulate the survConcordance() function from the survival package.
Using the veteran dataset as an example.
Notice that a small amount of time is added to patients who were censored. This ensures that they will be measured as having lived longer than someone who experienced the event at the exact same time. This and other issues around handling ties in the concordance index are ignored in this post.
## Convex relaxation of the C-index
Because the C-index is sum of indicator functions, which are discrete, its optimizing problem is NP hard. By using a smooth and differentiable function which provides a lower bound on the indicator function, we will then have a convex optimization problem. Intuitively, a sigmoid-type function feels appropriate since its output is between zero and one. However it is not convex by itself. If we take a log-transform of the sigmoid function, then we have a concave function (and hence its negative is convex).
\begin{align} \tilde{C}(\etab) &= \frac{1}{D} \sum_{i=1}^N \sum_{j=1}^N \delta_i \cdot Y_j(t_i) \cdot [1 + \log(\sigma(\eta_i-\eta_j))/\log2] \tag{2}\label{eq:c_approx} \\ \sigma(x) &= \frac{1}{1+\exp(-x)} \nonumber \end{align}
By doing some quick math it is easy to see that $$I(x>0) \leq [1+ \log(\sigma(x))/\log(2)]$$ and hence $$C(\etab) \geq \tilde{C}(\etab)$$.
However the derivative of \eqref{eq:c_approx}, unlike \eqref{eq:c_exact} can be taken with respect to the $$i^{th}$$ risk score.
\begin{align*} \frac{\partial \tilde{C}(\etab)}{\partial \eta_i} &= \delta_i \cdot \sum_{k \neq i} Y_k(t_i) [1-\sigma(\eta_i - \eta_k)] - \sum_{k \neq i} \delta_k Y_i(t_k) [1-\sigma(\eta_k - \eta_i)] \end{align*}
I drop any constants from \eqref{eq:c_approx}, as these can be ignored during optimization. When $$\eta_i = \xbi^T\betab$$, the gradient becomes (via the chain-rule):
\begin{align} \frac{\partial \tilde{C}(\betab)}{\partial \betab} &= \Bigg(\frac{\partial \etab}{\partial \betab^T}\Bigg)^T \frac{\partial \tilde{C}(\etab)}{\partial \etab} \nonumber \\ &= \Xb^T \frac{\partial \tilde{C}(\etab)}{\partial \etab} \nonumber \\ &= \sum_{i=1}^N \xbi \Bigg[ \underbrace{\delta_i \cdot \sum_{k: Y_k(t_i)=1} [1-\sigma(\eta_i - \eta_k)]}_{(a)} - \underbrace{\sum_{j: Y_i(t_j)=1} \delta_j \cdot [1-\sigma(\eta_j - \eta_i)]}_{(b)} \Bigg] \tag{3}\label{eq:c_deriv} \end{align}
It is worth pausing to think about the terms inside the partial derivative in equation \eqref{eq:c_deriv}. The component in (a) encourages the risk score to be higher in patient $$i$$ relative to all other patients who died after them i.e. the set $$k: Y_k(t_i)=1$$, assuming that patient $$i$$ is not censored. Countering this tendency is the term (b) which accounts for the fact that raising the $$i^{th}$$ risk score decreases the distance between patient $$i$$ and all the other people who died before her. It is also interesting to compare this “residual” [(a) - (b)] to the martingale residual seen in the Cox model as a comparison.
\begin{align*} &\textbf{Cox-PH gradient} \\ \frac{\partial \ell(\betab)}{\partial \betab} &= \sum_{i=1}^N \xbi \Bigg[ \delta_i - \sum_{k=1}^N \delta_k \pi_{ik} \Bigg] \\ \pi_{ik} &= \frac{e^{\eta_i}}{\sum_{j \in R(t_k)} e^{\eta_j}} \\ R(t_k) &= \{i: T_i \geq T_k \} \end{align*}
While the convex relaxation of the C-index and the Cox model both have double sums and both encourage a higher risk score for patients who experienced the event before other patients, the former is purely a linear combination of terms. The next code blocks calculate the convex loss function and its derivative.
$$\tilde{C}(\etab)$$ from \eqref{eq:c_approx}:
$$\partial \tilde{C}(\betab) / \partial \betab$$ from \eqref{eq:c_deriv}:
## Simulation examples
How much better does this convex approximation perform on the actual concordance index compared to the Cox model? Based on simulations using seven datasets from the survival package: cancer, lung, melanoma, ovarian, pbc, retinopathy, and veteran, there is a marginal improvement in test set accuracy for four of them.
The first plot below shows the similarities in the coefficients between the two approaches.
The next plot shows a comparison of the distribution of C-index scores across 250 simulations using an 80/20 train/test split.
It is interesting that by changing the loss function, one can boost the training and test C-index scores by around 0.8% and 0.6% (respectively). However, the most important result of this post is that the convex approximation of the C-index does no worse than the partial likelihood loss and has one crucial computational advantage: the gradient is a sum of linear terms (unlike the partial likelihood with has a fraction). Stochastic gradient descent methods will allow for these models to easily scale up to massive datasets – a discussion which will be explored in a subsequent post.
Written on August 22, 2018 |
Select Page
# Understand the problem
Find all positive integers $n$ such that equation $3a^2-b^2=2018^n$has a solution in integers $a$ and $b$.
##### Source of the problem
Belarus MO 2018 Problem 10.5
Number Theory
5/10
##### Suggested Book
An Introduction to Number Theory
Do you really need a hint? Try it first!
Let’s check for n = 1. Observe that a = 27, b = 13 gives a solutions for n = 1. What about higher degrees? Can we use this information?
Does it work for n = 2? Let’s prove something general! Prove that for a, b to have solutions, n must be odd.
If n is even, Take $\pmod{3}$ to see that $-b^2\equiv 1\pmod{3}$, which has no integer solutions in $b$. Hence, n must be odd.
Well now take n odd. Say $n=2m+1$ for some positive integer $m$. Then, the solution $(a,b)=(27\times 2018^m, 13\times 2018^m)$ exists and works.
# Connected Program at Cheenta
Math Olympiad is the greatest and most challenging academic contest for school students. Brilliant school students from over 100 countries participate in it every year. Cheenta works with small groups of gifted students through an intense training program. It is a deeply personalized journey toward intellectual prowess and technical sophistication.
# Similar Problems
## Solving a congruence
Understand the problemProve that the number of ordered triples in the set of residues of $latex p$ such that , where and is prime is . Brazilian Olympiad Revenge 2010 Number Theory Medium Elementary Number Theory by David Burton Start with hintsDo you really need...
## Inequality involving sides of a triangle
Understand the problemLet be the lengths of sides of a (possibly degenerate) triangle. Prove the inequalityLet be the lengths of sides of a triangle. Prove the inequalityCaucasus Mathematical Olympiad Inequalities Easy An Excursion in Mathematics Start with hintsDo...
## Vectors of prime length
Understand the problemGiven a prime number and let be distinct vectors of length with integer coordinates in an Cartesian coordinate system. Suppose that for any , there exists an integer such that all three coordinates of is divisible by . Prove that .Kürschák...
## Missing digits of 34!
Understand the problem34!=295232799cd96041408476186096435ab000000 Find $latex a,b,c,d$ (all single digits).BMO 2002 Number Theory Easy An Excursion in Mathematics Start with hintsDo you really need a hint? Try it first!Get prepared to find the residue of 34! modulo...
## An inequality involving unknown polynomials
Understand the problemFind all the polynomials of a degree with real non-negative coefficients such that , . Albanian BMO TST 2009 Algebra Easy An Excursion in Mathematics Start with hintsDo you really need a hint? Try it first!This problem is all about...
## Hidden triangular inequality (PRMO Problem 23, 2019)
Problem Let ABCD be a convex cyclic quadrilateral . Suppose P is a point in the plane of the quadrilateral such that the sum of its distances from the vertices of ABCD is the least .If {PA,PB,PC,PD} = {3,4,6,8}.What is the maximum possible area of ABCD? TopicGeometry...
## PRMO – 2019 – Questions, Discussions, Hints, Solutions
This is a work in progress. Please post your answers in the comment. We will update them here. Point out any error that you see here. Thank you. 1. 42. 133. 134. 725. 106. 297. 518. 499. 1410. 5511. 612. 1813. 1014. 5315. 4516. 4017. 3018. 2019. 1320. Bonus21. 1722....
## Bangladesh MO 2019 Problem 1 – Number Theory
A basic and beautiful application of Numebr Theory and Modular Arithmetic to the Bangladesh MO 2019 Problem 1.
## Functional equation dependent on a constant
Understand the problemFind all real numbers for which there exists a non-constant function satisfying the following two equations for all i) andii) Baltic Way 2016 Functional Equations Easy Functional Equations by BJ Venkatachala Start with hintsDo you really need...
## Pigeonhole principle exercise
Problem Let ABCD be a convex cyclic quadrilateral . Suppose P is a point in the plane of the quadrilateral such that the sum of its distances from the vertices of ABCD is the least .If {PA,PB,PC,PD} = {3,4,6,8}.What is the maximum possible area of ABCD? TopicGeometry... |
#### 题目列表
The seemingly unrelated aims of functional strength and aesthetic appeal had been not only successfully integrated in many of the classic suspension bridges of the past two centuries but also commonly achieved by engineers alone or leading teams. Thomas Telford was in fact both engineer and architect of his Menai Suspension Bridge, and John Roebling was both engineer and architect of his Brooklyn Bridge. That these engineering structures especially have come to be regarded as architectural icons demonstrates the aesthetic heights that an engineer can achieve.
Engineers less artistically confident than Telford and Roebling have engaged consulting architects to advise them on the design of everything from the facades placed on massive anchorages and skyscraper-high towers to the finishing details like deck railings and lampposts. Othmar Ammann, the chief engineer of the George Washington and many other New York City bridges, often sought the help of famous architects. When the George Washington was but an idea on paper, Ammann engaged Cass Gilbert, the architect of the Woolworth Building and other landmarks, to depict how the towers might be finished in stone. Since money was tight when the bridge was being completed, however, the steel-framed towers were left bare一a look that the Swiss architect Le Corbusier found extremely appealing-and bare steel became the new aesthetic standard for monumental bridge towers.
The primary purpose of the passage is to
The passage implies that Othmar Ammann was
According to the passage, which of the following is true of Cass Gilberfs ideas for Hnishing the towers of the George Washington Bridge?
Most Oakville residents want a community swimming pool to be built but do not want to finance it with local tax revenues. Oakville's mayor argues that although the town has no financial reserves, building a pool will not lead to higher taxes, since an unused town-owned land parcel is available and admission fees will cover the entire cost of operating the pool as well as repayment of the S3 million debt for construction.
Which of the following, if true, most seriously weakens the mayor's argument?
Isobel Grundy rightly argues that in researching pre-nineteenth-century women's historical writing, scholars must define history broadly and include historical fiction, biography, court memoirs, and family history. Grundy also believes that these writings provide "a history of a whole female culture, while embodying a pre-nineteenth-century "feminine" relationship to history. On this point, I am skeptical, as I do not believe there was a characteristic women's relationship to history. Instead, my research suggests that pre-nineteenth-century British women writers' engagement with historical discourse depended on such things as their political commitments and class affiliations and their perceptions of developing historical genres and markets. We must give sufficient attention to the myriad individual authors and texts before generalizing widely about women writers' engagements with history.
The passage implies that its author would agree with which of the following statements about "historical fiction, biography, court memoirs, and family history"?
Which of the following describes a difference between the author and Grundy regarding British women writers engagement with historical discourse?
Some economists suggest that all firms would be expected to pay workers doing identical jobs the same wage. However, studies show that high-profit industries tend to pay more. While some of this observed wage gap could be due to difficulties in measuring workers talent, it is unlikely that such measurement problems can explain everything. Although talent is hard to measure, factors with which it is presumably correlated, such as education and tenure, are not. Yet studies that control for those factors still find big wage disparities. Moreover, although receptionists, for example, do not become less talented when they leave a high-profit industry to work in an industry with lower profits, their pay tends to drop in line with the wage gap between the two.
According to the passage, which of the following is true regarding difficulties in measuring workers talent.
Which of the following best describes the function of the highlighted sentence in the context of the passage as a whole?
Comets-detritus from the formation of outer solar system bodies-represent one possible source of Earth's water. Although hundreds of Earth masses of comets now reside in orbits far from the Sun, early in the history of the solar system comets were more commonly in orbits that intersected the orbits of Mars, Earth, and Venus (based on computer studies of solar system formation). Collisions of comets with the planets would have released the cometary ices and gases into the atmospheres of the target planets. Early in Earth's history, the first couple of hundred million years, cometary material including water might have been episodically added to the atmosphere. However, the ratio of deuterium to hydrogen(D/H) in the water ice portion of most (but not all) comets that have been measured is twice that in ocean water on the Earth. No plausible way has been found to lower the value after it has been added to the Earth. Therefore, comets do not appear to be the primary source of Earth's water.
Two alternative possibilities have been proposed. Bodies in the asteroid belt would have been richer in water than material near the Earth, and Jupiter perturbed that material into orbits that could have allowed accretion by the Earth. Most of this material would have been in the form of bodies as large as the moon or even Mars, so that these collisions would have been violent. Nonetheless, the net effect would have been the addition of water to the growing Earth. Carbonaceous meteorites, some of which may have been derived from the asteroid belt, have a D/H range that averages out to the value present in the Earth's oceans. However, some of the details of the elemental and isotopic abundances in the carbonaceous chondrites [a type of meteorite] limit to 1 percent the amount of this material that could have been added to the Earth. It is possible that other types of chondrites were present in the asteroid belt that today are poorly known, such as a new class of bodies represented by a handful of so-called "main belt comets, but for the moment this is speculative. Alternatively, water could have been absorbed [gathered on a surface in a condensed layer] on rocky grains closer to the Earth, and brought in through a gentle rain of this material. While laboratory studies show that enough water might have stuck to the grains to explain the abundance of the Earth's oceans, the presence of such a water-laden dust laver in the nebula remains speculative.
The "carbonaceous meteorites" are important to the first of two alternative possibilities discussed in the passage because these meteorites.
It can be inferred from the passage that an important difference between the "two alternative possibilities" is that the second one
Which of the following can be inferred about the "carbonaceous meteorites" discussed in the passage?
The author discusses "other types of chondrites" primarily because
Editorial
A year ago, the government of Fortran predicted that Torre City would experience strong net job growth for the following year but that Glanville, Portran's other major city, would not. Events have clearly proved otherwise, however, in Torre City, but not in Glanville, the number of people who are unemployed is greater now than it was a year ago.
Which of the following is an assumption on which the editorials argument depends?
As they unearth long- ignored women's writings, some feminist literary scholars have a tendency to evaluate those writings according to current ideological standards. This tendency, however understandable, has certain pitfalls, as feminist response to three late-seventeenth-and early-eighteenth-century English female playwrights demonstrates. Mary Pix, Catharine Trotter, and Delarivier Manley each wrote at least four plays and were known collectively as the "Female Wits." These women saw themselves as participating in a common endeavor, but feminist scholars have evaluated their works in very different terms. Trotter and Manley have been praised for their depiction of "feminist" themes一Trotter because of her insistence on feminine virtue, and Manley because of her depiction of strong, if sometimes villainous, heroines-while Pix's works, because they depict women in ways now considered stereotypically "feminine," are often dismissed.
Yet Pix is conservative only within a present-day context: within the context of late-seventeenth-and early- eighteenth-century English drama, Pix's plays were more formally innovative than Manley's and more successful than either Manley's or Trotter'. She also broke new ground regarding subject matter, addressing contemporary social issues such as class upheaval. However, these acts are rarely acknowledged by scholars of the Female Wits.
1 2 ... 4 5 6 7 8 9 10 ... 19 20
25000 +道题目
136本备考书籍 |
# Books For Combinatorics
Well I am starting to crave for combinatorics.The proofs seem so elegant and meaningful.But I haven't gone through any book that deals with only combinatorics. I am not a complete beginner in combinatorics but still I'd like to have your views on the books you've read on combinatorics so that I can get one and start counting on it. :)
Note by Soham Chanda
5 years, 9 months ago
MarkdownAppears as
*italics* or _italics_ italics
**bold** or __bold__ bold
- bulleted- list
• bulleted
• list
1. numbered2. list
1. numbered
2. list
Note: you must add a full line of space before and after lists for them to show up correctly
paragraph 1paragraph 2
paragraph 1
paragraph 2
[example link](https://brilliant.org)example link
> This is a quote
This is a quote
# I indented these lines
# 4 spaces, and now they show
# up as a code block.
print "hello world"
# I indented these lines
# 4 spaces, and now they show
# up as a code block.
print "hello world"
MathAppears as
Remember to wrap math in $$...$$ or $...$ to ensure proper formatting.
2 \times 3 $$2 \times 3$$
2^{34} $$2^{34}$$
a_{i-1} $$a_{i-1}$$
\frac{2}{3} $$\frac{2}{3}$$
\sqrt{2} $$\sqrt{2}$$
\sum_{i=1}^3 $$\sum_{i=1}^3$$
\sin \theta $$\sin \theta$$
\boxed{123} $$\boxed{123}$$
Sort by:
I would strongly recommend Arthur Engel's Problem Solving Strategies, if you have not already read it. It presents several combinatorics techniques, which are well developed. It's chapters on algebra and number theory are good too. The focus of the book is to present different techniques, as opposed to giving a full coverage of all the different combinatorial ideas.
The Art and Craft of Problem Solving by Paul Zeitz does a good preliminary exposition on Combinatorics. It covers the basics like counting, bijections, PIE, recurrence, extremal principle, pigeonhole principle, invariants, and provides more advanced areas that you can explore after that.
The above are introductory texts. Since you are not a complete beginner, it would be useful if you state various topics that you are interested in (say Ramsey Theory, Hall Marriage Principle, Recurrance Relations, Generating Functions, Graph Theory, etc), so that we can recommend books that specialize in that area, as opposed to a broad discussion of Combinatorics.
Staff - 5 years, 9 months ago
Just a few days ago, I ran across a link to a free online resource called Combinatorics Through Guided Discovery by Ken Bogart. You can find it here. I've only skimmed the first chapter, but the problem-based approach seems kindred in spirit to Brilliant. Perhaps you'll enjoy it. There are of course many other good combinatorics resources out there--AOPS is always a good place to look. I hope this thread produces some other good combinatorics resources. Good luck!
- 5 years, 9 months ago
Well I'm not intermediate though. Actually I can solve the combinatorics problems when they are in words,those which i can visualize like real life situations.An example -"Calvin goes to amusement part,there are 10 rides..." or a problem like that...But whenever technical terms like those with sets etc etc I get TOTALLY confused.How to tackle this?
- 5 years, 9 months ago
i m weak at solving problems of function ,number theory please suggest a good book which starts from fundamental to apex with alot of illustrative examples exercise
- 4 years ago
http://www.worldscientific.com/worldscibooks/10.1142/1781
- 4 years, 10 months ago
Maybe you could give an example or two of problems that you would like to be able to solve, but don't really know where to start or what tools to use. That might help others to give you helpful suggestions of how to go forward.
- 5 years, 9 months ago
If basic terminology is tripping you up, I would encourage you to constantly review it and gain familiarity with these concepts. Just like how arithmetic word problems require you to translate the written statement into mathematical equations, think about how to translate combinatorics problems in words to their theoretical construct (and vice versa).
While being able to visualize a problem is extremely useful, note that this might not always be done. The most common problem that you'd see is trying to visualize 4 dimensions. This could potentially be done with the hypercube of tesseract, but they do not convey the actual meaning of 4-dimensions. Moreover, it gets extremely complicated when you look at $$n$$ dimensions - pictures rarely help unless it's a 2-dimension cutout.
Staff - 5 years, 9 months ago |
# Choose the best answer for the following sentence: _____________ many friends do you have?
A.
Who
B.
When
C.
Why
D.
How
Đáp án:D
Lời giải:
How |
# Compute cdf and quantile of a specific distribution
I want to calculate a quantile of a specific distribution. Therefore I need the cdf. My distribution is a standardized Student's-t distribution, this can be written as \begin{align*} f(l|\nu) =(\pi (\nu-2))^{-\frac{1}{2}}\Gamma \left(\frac{\nu}{2} \right)^{-1} \Gamma \left(\frac{\nu+1}{2} \right) \left(1+\frac{l^2}{\nu-2} \right)^{-\frac{1+\nu}{2}} \end{align*}
This can be implemented in R with:
probabilityfunction<-function(x)(pinumber*(param-2))^(-1/2)*gamma(param
/2)^(-1)*gamma((param+1)/2)*(1+l^2/(param-2))^(-(1+param)/2)
Where pinumber is the value for pi and param is the $\nu$. Lets say $\nu=5$. Then I can get the probability by just inserting a certain value for my l. But I want to have the cumulative density, since I later want to compute the quantile. I thought about something like
cumsum(probabilityfunction(5))
to give me the cumulative value up to 5.
But obviously this does not work. How can I get the cumulative probability and later on the quantile?
EDIT: OK, I found a first improvement:
integrate(probabilityfunction,-Inf,2)
would be a good starting point, but how to do the other thing?
• Are you aware that R has the density, cumulative and quantile functions for a t-distribution already implemented (dt, pt and qt)? Or do you simply want to be able to do this for other distributions? – Nick Sabbe Apr 25 '13 at 15:10
• @NickSabbe the implemented distribution is NOT the same. I use a different one and later on, I also want to do this for other distributions. (R has the standard Student's-t distribution, but not the standardized Student's-t distribution, this is a difference) – Stat Tistician Apr 25 '13 at 15:30
• You don't need a variable to hold the value of $\pi$. In R this is built in as pi. – Glen_b Apr 25 '13 at 23:33
CDF and quantile functions of this (extremely restrictive) distribution are straightforward to obtain in R, using that this is a Student-t distribution with a particular scale parameter:
CDF
pt(x/sqrt((nu-2)/nu),df=nu)
Quantile
qt(p,df=nu)*sqrt((nu-2)/nu)
This looks like a duplicate of your previous question: quantile transformation with t distribution (sorry, you have to use the monotonic transformation ;) )
Extending your own suggestion of using numerical integration, you can invert the function by using nonlinear equation solving. I've not tested this through, so there may be errors, but something like this should work:
dens<-function(x, nu)
{
(pi*(nu-2))^(-1/2)*gamma(nu/2)^(-1)*gamma((nu+1)/2)*(1+x^2/(nu-2))^(-(1+nu)/2)
}
cum<-function(x, nu)
{
integrate(dens,-Inf,x, nu=nu)
}
quant<-function(p, nu)
{
#maybe format the result somewhat better
nleqslv(0, function(x){cum(x, nu)-p} )
}
cum(0.05, 3)
It should not be too hard to generalize this so you can pass in any density function and parameters, but there are some conditions for the integration and inversion to work. Neither can I say something on the precision (the result shows a standard error, but this does not take the error in integrating into account). |
# Seminario de Geometría
#### Detalles de Evento
• Inicio: 7 noviembre 2014 12:30
• Lugar de encuentro: IEMath-GR
• Categorías: ,
• Room: Seminario 1ª planta
• Organizer: Seminario de Geometría
Título Conferencia: ODE solutions for the fractional Laplacian equations arising in conformal geometry
Conferenciante: Azahara de la Torre (Universidad Politécnica de Cataluña)
Abstract: We construct some ODE solutions for the fractional Yamabe problem in conformal geometry. The fractional curvature, a generalization of the usual scalar curvature, is defined from the conformal fractional Laplacian, which is a non-local operator constructed on the conformal infinity of a conformally compact Einstein manifold. These ODE solutions are a generalization of the usual Delaunay and, in particular, solve the fractional Yamabe problem with an isolated singularity at the origin $(−\Delta )^γu=c_{n,γ}u^{\frac{n+2γ}{n−2γ}}, \qquad u\geq 0.$ This is a fractional order ODE for which new tools need to be developed. The key of the proof is the computation of the fractional Laplacian in polar coordinates. |
Doc-course: Harmonic Analysis, Metric Spaces and Applications to P.D.E. Sevilla, May 15th - July 15th, 2011 |
# minor illusion 5e for cover
Casting Time: 1 action Range: 30 feet Components: S, M (a bit of fleece) Duration: 1 minute. Create an illusion of a mouse to run under the feet of a larger animal to startle it. Whenever you dismiss it as an action or cast this spell again then the illusion will end. If you create a sound, its volume can range from a whisper to a scream. I was okay with that. (Minor Illusion has no verbal component, so the character can do it silently and stay hidden. How does the logistics work of a Chaos Space Marine Warband? Improved Minor Illusion. A target has total cover if it is completely concealed by an obstacle. Illusion Cantrip Casting Time. Hence no bonus. Let's do some scenarios on a battlemap to illustrate. A: If the attacker believes the wall is real and is trying not to hit it, the target would effectively have cover. This would normally be bad, and yet I can’t help but smile. Source: Player's Handbook. Can caster of illusion opt to believe their own illusion? Making statements based on opinion; back them up with references or personal experience. It depends on the uses of the spells. Minor illusion 5e is an illusion type spell in the 5th edition of the D&D role-playing game. In this minor illusion spell you do create a sound or else a specific image of an object within a range which could last for the specific duration. A target has half cover if an obstacle blocks at least half of its body. You create a sound or an image of an object within range that lasts for the duration. Within a range, you have to create a sound or an image which is related to an object and that should be last for the duration. Can Major Image or Minor Illusion block the view of a beholder's eye stalks? Hypnotic Pattern 5e. You can also dismiss the illusion with an action, or cast the spell again to terminate the illusion. Last edited by krugaan; 2017-11-21 at 06:37 PM . It only works for those creatures who’re standing in the range of this spell. And now he's trying to use minor illusion to create fake bushes/walls and continuing to claim he has partial cover. If you want to know how a spell is written that is intended for this purpose, check out minor illusion. Some objects move normally--the hands of a clock, the bubbling water of a fountain, a tinker toy or a music box. Using Minor Illusion to create a 5x5' cube of stone, one of my players who was a 6'4" ranger claimed it gave him three quarters cover and that he was shooting over it. 6. Casting Time: 1 action Range: 30 feet Components: S, M (a bit of fleece) Duration: 1 minute. From D&D Wiki ... Minor Illusion Illusion cantrip: Casting time: 1 action Range: 30 feet Components: S, M (a bit of fleece) Duration: 1 minute You create a sound or an image of an object within range that lasts for the duration. Soul-Scar Mage and Nin, the Pain Artist with lifelink. The text about cover is, as usual, unclear, but it only specifies thick, solid objects as cover examples indeed suggesting that the point of cover is to provide a solid barrier stopping the attack. Minor Illusion is an excellent spell. Additionally, Minor Illusion does not have a Verbal component, so you can cast it quietly. What wizard spells can create cover for allies without preventing them from moving or … It would have the appearance of brightness, but create no actual light. These can explicitly be adjusted and controlled throughout the duration. All these are based on the following tweets (1,2,3) by Christopher Perkins (one of the designers of 5e, though he is not the official rules designer, as @V2Blast reminded in a comment) on March 22, 2017 in response to questions raised by twitter users Nicolas Grinschgl and Rose Artemis: Q: Does Illusory wall give cover bonus to AC? Illusion cantrip. Working for client of a company, does it count as being employed by that client? Minor Illusion. Range: 30 feet. Distractions The difference between three-quarters and total cover here is the word "concealed". Can an illusion give a player partial cover? So far so good. If you create a sound, its volume can be a low whisper or a loud scream. On a failed save, the creature becomes charmed for its duration. You may use your bonus action to take the dash, disengage or hide action. So a Forest Gnome starts off they start with 4 cantrips, Minor Illusion plus whatever 3 cantrips are chosen. Here is the first sentence about cover in the PHB, page 196. Couple Questions: 1. Let's discuss the Minor Illusion cantrip. A creature can always spend a turn examining the illusion to make an Investigation check to see that it's not natural, but it's basically impossible not to metagame that. Then include the 3 cantrips for a 2nd level Illusion Wizard. Minor Illusion 5e is so cool spell, however, How to use Minor Illusion? (ex fake trap that attempting to disarm sets off real trap, hiding a column in an otherwise empty room) Minor Illusion - used to hide a small object or cover a trap (ex pit in floor, or missing brick in wall to store something) This would normally be bad, and yet I can’t help but smile. Any ideas of what it can do? Bit Of Fleece. What levels is it good at? rev 2021.1.20.38359, The best answers are voted up and rise to the top, Role-playing Games Stack Exchange works best with JavaScript enabled, Start here for a quick overview of the site, Detailed answers to any questions you might have, Discuss the workings and policies of this site, Learn more about Stack Overflow the company, Learn more about hiring developers or posting ads with us, For a real world comparison, to justify your ruling as a DM, consider that in the Army, we were taught the difference between, Comments are not for extended discussion; this conversation has been. Casting time: 1 Action. Do they need an action to investigate it? These are some of mine: Create a Swarm of bees around the Ogres head causing his first swing to be at disadvantage. I thought cover was based on having a solid obstacle between you and the target... Like, if a magical attack, or penetrating attack can pass through your cover, wouldn't that negate the AC bonus from partial cover? MathJax reference. Let's do some scenarios on a battlemap to illustrate. With the use of this illusion, you can create an illusion against your selected target. What levels is it good at? You must log in or register to reply here. In fact, it is on our list of the best wizard cantrips and best bard cantrips, among others.If your dungeon master is anything like me, they will reward creativity that … Just remember, Minor Illusion only lasts a minute so your Alarm needs to be fairly close to the pit. Illusion cantrip Casting Time: 1 action Range: 30 feet Components: S, M (a bit of fleece) Duration: 1 minute You create a sound or an image of an object within range that lasts for the duration. Minor Illusion is a spell that's available as of level 0, with a castingtime of 1 Action for D&D 5e - Read up on all the spells on DND-Spells | Dungeons and Dragons 5e - Spells, Tools, Spell cards, Spellbooks' Hypnotic Pattern 5e reads: Each monster in the region sees that the Pattern has to make a Wisdom rescue throw. If you create a sound, its volume can range from a whisper to a scream. Whenever you dismiss it as an action or cast this spell again then the illusion will end. Linked. Is cycling on this 35mph road too dangerous? Walls, trees, creatures, and other obstacles can provide cover during combat, making a target more difficult to harm. At what point does it become transparent? A target can benefit from cover only when an attack or other effect originates on the opposite side of the cover. Given the existence of the obscurement rules, and the progression from half to 3/4 to total cover, I'd argue that the word "concealed" here is simply a mistake. Minor Illusion Source: D&D 5th Edition ↓ Attributes. The illusion also ends if you dismiss it as an action or cast this spell again. As you pointed out it could be both from not being able to see at least half of their body, or from having a physical object to possibly block the attack. When casting this 5e spell, You create a sound or an image of an object within the casting distance and maintain it until the spell duration ends. They're not helpful, though, and only serve to make the world more confusing and scarier.We're not going to have that here. Death Knight's Squire is the most popular one (mithral bestseller) . I would not say it’s pointless to have those spells. I'm in an argument with a player at my table, he says hiding behind some bushes while shooting arrows at my monsters gives him partial cover because they can only see his head and shoulders. 30 ft (5 ft cube*) Duration. Is it usual to make significant geo-political statements immediately before leaving office? A creature effectively suffers from the blinded condition when trying to see something in that area. Whenever you create a sound the range of its volume will be from a whisper to the scream. On a failed save, the creature becomes charmed for its duration. Minor illusion, silent image, ... Browse other questions tagged dnd-5e illusion cover or ask your own question. How? I found stock certificates for Disney and Sony that were given to me in 2011. How does a Cloak of Displacement interact with a tortle's Shell Defense? Do you know the confusion and illusion spell of Hypnotic Pattern 5e. Described that way, cover is really about harming the target, not aiming. Sure the guards’ torch will be snuffed out, but they heard someone speak as it happened. Even after the enemy discerns the illusion, it is still there being a distraction. In fact, it is on our list of the best wizard cantrips and best bard cantrips, among others.If your dungeon master is anything like me, they will reward creativity that fits into the reality of the world that you are playing in. Couple Questions: 1. What wizard spells can create cover for allies without preventing them from moving or attacking? The illusion also ends if you dismiss it as an action or cast this spell again. The obstacle might be a low wall, a large piece of furniture, a narrow tree trunk, or a creature, whether that creature is an enemy or a friend. Examples include: Trying to shoot an arrow and seeing that it flies through the obstacle with no resistance will immediately cause the attacker to think that the obstacle is illusionary. A heavily obscured area--such as darkness, opaque fog, or dense foliage--blocks vision entirely. Can ISPs selectively block a page URL on a HTTPS website leaving its other page URLs alone? Any ideas of what it can do? — Matt Petruzzelli (@mpetruzz) February 2, 2016 If a racial trait grants a spell, the trait tells … No other form of cover depends on "concealment" in the visual sense, and the rule does still say "by an obstacle", which implies something that obstructs movement, not just sight. Why did flying boats in the '30s and '40s have a longer range than land based aircraft? 31/07/2020 31/07/2020 - by admin - Leave a Comment. At level 2, you buff a cantrip. The parrot “trick” defies the intent of the spell, as it’s supposed to be a small animal, not a humanoid even if the parrot can mimic one. Minor Illusion is a spell that's available as of level 0, with a castingtime of 1 Action for D&D 5e - Read up on all the spells on DND-Spells | Dungeons and Dragons 5e - Spells, Tools, Spell cards, Spellbooks' You create a sound or an image of an object within range that lasts for the duration. A lot of this will depend on DM's call, but I think the conventional interpretation is that you can Hide behind an illusion, and witnessing something that obviously disproves the reality of an illusion automatically enables people to disbelieve it without a check. 1 action. Am I missing something if I suggest that it is possible for the illusionist to cast silent image , then cast minor illusion in the next round to start making the "ogre" grunt, smack its club against its palm, etc. Does the gnome need materials for minor illusion? )Suppose this illusion is of that same character, perhaps cowering or frozen stiff as if frightened. Minor Illusion 5E Spell In Dnd April 8, 2020 by virat kohil Within a variety, you’ve got to make a sound or an image that’s associated with an object which should be last for the duration. A target has total cover if it is completely concealed by an obstacle. I remember back when I first started playing D&D that I felt like the spell never came up for my character. Is there a rule that prohibits Minor Illusion form having an impact in combat? They get the cover bonus until one of the arrows goes through the illusionary wall (. Regarding the COV-19 virus and its effects:Things are frustrating, and confusing, and scary. The Minor Illusion spell say:. Illusionists in D&D 5E, however, are based (fairly firmly) in fear and darkness. When you cast minor illusion, you can create both a sound and an image with a single casting of the spell. Let’s take a look at the spell list from the main Player Handbook and you’ll probably see what I mean – Illusionist Spell List in D&D 5E Cantrip. If you create a sound, its volume can range from a whisper to a scream. Level: Cantrip. Stack Exchange network consists of 176 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers. Suppose a small character hides somewhere, then casts an illusion elsewhere. If you create an image of an object - such as a chair, muddy footprints, or a small chest - it must be no larger than a 5-foot cube. Illusion cantrip Casting Time: 1 action Range: 30 feet Components: S, M (a bit of fleece) Duration: 1 minute You create a sound or an image of an object within range that lasts for the duration. From D&D Wiki ... Minor Illusion Illusion cantrip: Casting time: 1 action Range: 30 feet Components: S, M (a bit of fleece) Duration: 1 minute You create a sound or an image of an object within range that lasts for the duration. So they're limited in what they can even aim at. Illusion Spells for Dungeons and Dragons (D&D) Fifth Edition (5e). When someone fires an arrow through it and it doesn't stick into the crate? The biggest illusion here is my authority to give advice on anything. Let's say your players are getting shot by arrows for this example: Talk to your players before the next session and determine how illusionary covers will work together. The illusion also ends if … Minor Illusion is an excellent spell. How to draw on a tikz picture without shifting it. does paying down principal change monthly payments? Let’s take a look at the spell list from the main Player Handbook and you’ll probably see what I mean – Illusionist Spell List in D&D 5E Cantrip. S, M. Range. Spell Description. The examples in the description above also mention solid obstacles, which prevent the projectile from effectively harming the target. 1 minute. 5e SRD:Minor Illusion. It only takes a minute to sign up. A target with total cover can't be targeted directly by an attack or a spell, although some spells can reach such a target by including it in an area of effect. Examples from the definition: Walls, trees, creatures, and other obstacles can provide cover during combat, making a target more difficult to harm. Just remember, it shouldn't be able to accomplish something that would take a higher level spell (like silent Image).It also says physical interaction reveals it to be an illusion, it does not say what has to physically interact or who it is revealed to be an illusion too. How do you use it in combat? Consider the use of Minor Illusion to distract an enemy and perhaps gain advantage during combat. A target has three-quarters cover if about three-quarters of it is covered by an obstacle. You create a sound or an image of an object within the casting distance and maintain it until the d&d 5e minor illusion spell duration ends. Minor Illusion can potentially be a major pain. As in, I cast minor illusion to make a crate in combat and hide behind it when not popping out to fire an arrow. You learn one of the following cantrips: dancing lights, prestidigitation, or minor illusion. Full score partial cover ” and “ cover ” and “ cover ” and “ ”. Caster of illusion opt to believe their own illusion -- blocks vision entirely ) ever greatly! Ogre statue, M ( a bit of fleece ) duration: 1 page URLs?! Range from a whisper to a scream help but smile cantrip level illusion wizard difference... 30 feet Components: S, M. duration: 1 minute to use illusion! Illusion against your selected target through a doorway give cover again to terminate illusion. Illusion – create a Swarm of bees around the Ogres head causing his first to... Wall it would go through and hit like nothing happened or register to reply here have a component! Perhaps gain advantage during combat it 's an illusion type spell in target! Blinded condition is disadvantage on attack rolls, not a change in the.. Lasts for the duration Fifth Edition ( 5e ) 's trying to see something in that area can ’ help. Illusion of a larger animal to startle it cut 4x4 posts that are already mounted bush etc... ”, you learn the Minor illusion, it really does n't stick the.: Project overview fake bushes/walls and continuing to claim he has partial cover a bit of )! Working for client of a wall of glass grant cover, only the illusion of,,... Target, not a change in the party site design / logo © 2021 Stack Exchange personally not! Way to describe it is covered by an obstacle claim he has partial.... Above also mention solid obstacles, which prevent the projectile from effectively harming the would. The D & D 5e, however, are based ( fairly firmly ) in fear darkness. Cover in the region sees that the WIS rescue is charmed and incapacitated to create bushes/walls... Early telephone were four wires replaced with two wires in early telephone writing great.. Illusion only lasts a minute so your Alarm needs to be at disadvantage learn the Minor illusion character hides,! Were four wires replaced with two wires in early telephone other answers adjusted and controlled throughout duration... Logistics work of a Chaos Space Marine Warband and paste this URL into your RSS reader create fake and! Remember it only works for those creatures who ’ re standing in the region sees that main. Significant geo-political statements immediately before minor illusion 5e for cover office watch that dashing rogue plummet is not! Wall of glass grant cover, only the illusion also ends if you create a sound or an of... Ends if you dismiss it as an action or cast this spell again, its volume can range from whisper... I found stock certificates for Disney and Sony that were given to in... Wis rescue is charmed and incapacitated illusion opt to believe their own illusion illusion only lasts minute... Be at disadvantage based on opinion ; back them up with references or personal experience comprehensive list minor illusion 5e for cover official. Phb, page 196 wall of glass grant cover or enemy that damage! And choose easier targets it count as being employed by that client trying not to it... Contributing an answer to role-playing Games Stack Exchange Inc ; user contributions licensed under cc.! Personal favorite for combat is to create fake bushes/walls and continuing to claim has. -- such as darkness, opaque fog, or any other sensory effect obstacles, which prevent the from!, then casts an illusion of a mouse to run under the feet of a mouse to run the! Sound, its volume can range from a whisper to the pit tagged illusion! Having an impact in combat and yet I can ’ t help but smile animal startle! Caster of illusion opt to believe their own illusion URL on a tikz picture without shifting it perhaps cowering frozen... Immediately before leaving office allow that to add to your AC I can t. Does not have a Verbal component, so you can also dismiss the also! Meta Creating new help Center documents for Review queues: Project overview ( a bit fleece! “ partial cover ” and “ cover ” and “ cover ” casts an illusion against your target! ) uncontroversial capacity to generate sound illusions described that way, cover is really about the... Relevant information, you learn a different wizard cantrip of your choice ( Minor illusion the... How can I cut 4x4 posts that are already mounted feed, copy and paste this URL into your reader. Draw on a failed save, the idea of the blinded condition when trying to see something in that.... “ cover ” and “ cover ” and “ cover ” and “ cover ” and “ cover ” object! Remember it only lasts a minute so your Alarm needs to be the relevant information, you may realise 's. Bonus to AC and Dexterity saving throws illusion elsewhere I hope ) uncontroversial capacity to sound! Does a Cloak of Displacement interact with a tortle 's Shell Defense 5e is an illusion type spell in region. An image of an object or a loud scream the arrow was to hit this illusionary (... Sound of knocking on their front door to give advice on anything when trying see! Enemy that do damage about cover in the PHB, page 196 way, cover really! Bushes/Walls and continuing to claim he has partial cover half cover if it is completely concealed an! No Verbal component, so the character can do it silently and stay.! Cantrips are minor illusion 5e for cover when trying to see something in that area effectively have cover fairly to. Mean when I hear giant gates and chains while mining clicking “ Post your answer ”, you a! Are frustrating, and scary and controlled throughout the duration has partial.... Effectively suffers from the full score concealed '': dancing lights, prestidigitation or. Out Minor illusion creates 3D photographs '' or static, stationary holograms whisper to a.! And total cover here is the difference between three-quarters and total cover if it 's not explicit how obstacle! Baby at home leaving office a failed save, the idea of the D & D 5e, through! To reply here generate sound illusions the examples in the PHB, page 196 an... ( illusion ) can serve as a Spellcaster 's handy spell for distractions in times of need trying use. Rolls, not a change in the target would effectively have cover of knocking on their front door give... It ’ S pointless to have those spells action range: 30 feet Components: S, (. Create an illusionary rope in a tempting place for some tarzan action, and scary 5e Minor only! With as little muscle as possible ca n't grant cover, I personally would not allow that to illusion! Sense of Things other obstacles can provide cover the sight-blocking effect of the spell again share it, cite. Has to make significant geo-political statements immediately before leaving office this purpose, check out Minor plus... Controlled throughout the duration main effect of something like an illusion of a company, does count. Sound of knocking on their front door to give you Time to have a Verbal component, so is! A creature effectively suffers from the blinded condition is disadvantage on attack rolls not... Of Things it silently and minor illusion 5e for cover hidden then casts an illusion type spell in region! Effects: Things are frustrating, and watch that dashing rogue plummet the image ca n't grant,... And total cover here is the most popular one ( mithral bestseller ),... Their front door to give advice on anything created an illusion is.. When an attack or other effect originates on the opposite side of the blinded condition disadvantage! Which prevent the projectile to get through it, and yet I can ’ t that practical, any. Relatively ( I hope ) uncontroversial capacity to generate sound illusions sound or an image of an within... Or frozen stiff as if frightened Gnome starts off they start with cantrips! Featured on Meta Creating new help Center documents for Review queues: Project overview also mention solid obstacles which!, trees, creatures, however, how to use Minor illusion 5e so. Spells for Fifth Edition our tips on writing great answers of Displacement interact with a tortle 's Defense. I cut 4x4 posts that are already mounted be like a very lantern... Vision entirely would normally be bad, and choose easier targets, only the illusion will end they limited... Can ISPs selectively block a page URL on a work computer, at difficult... Bit of fleece ) duration: 1 action range: 30 feet Components: S M.! Of bees around the Ogres head causing his first swing to be shared, share it, but attacker! Spells can create an illusion of a company, does it count as being employed by client! Illusion may be of any object rock, small bush, etc within range that lasts for duration. And Dragons ( D & D role-playing game … how to use the spell came. Other people at a party, make a Wisdom rescue throw, for example, be! Duration: 1 action range: 30 feet Components: S, M. duration: 1.! Is written that is intended for this purpose, check out Minor illusion to distract enemy! Stack Exchange is a question and answer site for gamemasters and players of tabletop, paper-and-pencil role-playing Games Exchange! Eye stalks above also mention solid obstacles, which prevent the projectile from effectively harming the target effectively... Give advice on anything virus and its effects: Things are frustrating, scary.
|
# Tag Info
## Hot answers tagged xc8
22
The problem is not with your type but with the way you print it. In C %d format specifier is for int, not for long. For signed long you should use %ld instead, if your compiler supports it. For unsigned use %lu.
20
This is to specify an absolute address to place the variable at. From the XC8 compiler manual page 27, section 2.5.2 Absolute Addressing: Variables and functions can be placed at an absolute address by using the __at() construct ...... 2.5.2.2 DIFFERENCES The 8-bit compilers have used an @ symbol to specify an absolute address
14
Since you wrote your own answer, it's clear that you wanted to promote a particular solution. In a more general sense, the standard C regex library is for both compiling and executing regular expressions, and relies on services provided by a POSIX-compliant operating system. Compiling is much more complicated (it involves first parsing the regular ...
11
64-bit datatypes are available to use but you must use the following flags when compiling: --std=C99 --ext=cci This makes the compiler use the C99 standard with the Common C Interface. With these compiler flags you will be able to use 64-bit integers. However, it may require you to reformat your code as some C90 code will not play nicely with C99. It is ...
7
Have you read the XC8 user's guide? Section 5.9 deals with interrupts. In there it states: The function qualifier interrupt (or __interrupt) can be applied to a C function definition so that it will be executed once the interrupt occurs. The compiler will process the interrupt function differently to any other functions, generating code to save and ...
7
In C it is best practice to use prototypes. Generally, you want to declare your function prototypes in a header file. For your code perhaps call the header file BCD.h and create it in the 'Header Files' section of MPLAB. The header file code should look something like the following: #ifndef BCD_H #define BCD_H uint8_t updateBCD(uint8_t); #endif then ...
7
It's right there in the user guide in black and white... bit and __bit are exactly the same, except for the level of compatibility: If the xc8 flag --STRICT is used, the bit keyword becomes unavailable, but you can use the __bit keyword. So you can use bit for your own data type, variable name, function name, whatever you want, if you specify --STRICT ...
6
You have a couple of issues with your code and circuit. A while loop with a false condition will never loop. Do you mean to put "while(0)" or is that a typo? Either way, that loop is never looping. Change the 0 to a 1. The PIC16F628A has a PGM pin that it uses in LVP (Low Voltage Programming) mode. It shares the same pin as RB4. The PGM pin must be tied to ...
6
There is no substitute for understanding the machine at the low level. Whether using a compiler or not, you have to actually READ THE DATASHEET. As Figure 2-3 on page 13 clearly shows, there is no way to get 256 contiguous bytes of RAM. Other observations: MPLABX is the IDE, so is useless in specifying what compiler or assembler you are using. ...
6
@ is a common non-standard extension to the C language which allows you to declare a variable at a specific address. It can be used for memory-mapped hardware registers etc. In which case the variable must also be declared volatile, so your example is incorrect. Other compilers use something like __attribute__(section... or #pragma ..., all of it non-...
5
One thing that would help (and is definitely best practise) would be to check what is causing the interrupt. You should also be writing to the latch (LATx register) on an 18F and you need to disable analogue functions. Sample code for this might look like: #define LED_OUTPUT LATC3 void main(void) { // .. other setup here .. // Disable analogue ...
5
From the XC8 C Compiler Users Guide, page 229:- 5.14.3 Predefined Macros __DATE__ to indicate the current date eg. May 21, 2004 __TIME__ to indicate the current time eg. 08:06:31 You can parse these strings to get numbers compatible with your rtc, but what's the point of a real time clock that doesn't have the real time? Anyway, look at this Stack ...
5
I have solved my question. The problem is that I was using the 1.40 version of XC8 compiler. The periperial libraries are not longer supported and were compiled with version 1.34 of MPLAB XC8. Any changes made to header files since those libraries were created could potentially create a declaration mismatch. What I did was download the former 1.34 ...
5
Although it could be possible to get the library to compile with xc8, I had better luck using re2c, which is a utility that uses special syntax in your source file to produce a FSM that runs a regex. An example from their website: static int lex(const char *YYCURSOR) // YYCURSOR is defined as a function parameter { // ...
4
This is probably more of a general programming question than an electronics question, but since this group encompasses embedded systems programming to some extent, I'll answer it here. The C standard promises that code may use any syntactically-valid identifier without risk of conflict with any implementation-defined identifiers, provided that: The user ...
4
IIRC, most C compilers have a limit of 255 characters for an identifier. You usually find all the information you need in the compiler's manual. In your case it's the MPLAB XC8 C Compiler User’s Guide: 3.4.4.3 HOW LONG CAN I MAKE MY VARIABLE AND MACRO NAMES? The C Standard indicates that a only a specific number of initial characters in an identifier ...
4
Apart from missing the end bracket (copy/paste missed the last character?) your code works for me. However there are a couple of omissions that might make you think it doesn't:- #define _XTAL_FREQ 8000000 tells the compiler what frequency the PIC should be running at, but does not actually set it. On start up the 12F683 runs at 4MHz. To change it to 8MHz ...
4
If you can use C standard library functions, sprintf() should handle the string conversion. Instead of adding the decimal point by shuffling characters around, you could use integer arithmetic: char str[20]; unsigned int value = 105; sprintf(str, "%u.%u", value / 10, value % 10); Integer division won't be fast, but it should be faster than floating point. ...
4
You need to make sure you have checked the Use CCI Syntax option and you have #include <xc.h> in all source files. All noted in section 2.3 of the same manual.
4
Found the solution. That was that the linker options were not set to link in the peripheral library. Project properties > XC8 Linker > Options pane, Runtime selection > 'Link in Peripheral Library' option needs to be checked.
4
You seem to be using an SSD1306 oled. (worth mentioning!) To get such a display to life, you must initialize it. The sequence I use is static constexpr const uint8_t init_sequence[] = { CMD_MODE, DISPLAYOFF, CMD_MODE, SETDISPLAYCLOCKDIV, 0x80, CMD_MODE, SETMULTIPLEX, 0x3F, CMD_MODE, ...
3
I've done some looking around and here are the tips I can find Write better code. Code size and speed must be considered at each step of the way. C compiler/linker will only use the functions you actually use. So just including a .h should not increase code size (much) Standard functions are however often more generic than you require. It is possible to ...
3
void low_priority interrupt Low_Priority_Interrupt(void) { if (TMR1IE && TMR1IF) { TMR1H = 0xFE;//Pre load for 125 ms Timer1_Isr(); TMR1IF = 0; return; } } void high_priority interrupt High_Priority_Interrupt(void) { if (TX2IE && TX2IF) { SerialTx_Isr(); TX2IF = 0; return; ...
3
This is a C problem. period periods[3] = {p1, p2, p3}; is invalid in C, as p1, p2 & p3 are struct variables, and not constants known at compile-time, therefore you cannot use them as initializers. You may use macros to substitute the same constant values into p1, p2, p3 and periods[3] so that you don't have to duplicate the values: #define P1 {1, {0, ...
3
To test all below I used MPLAB 8.76, compiler XC8 ver 1.30: First a digression/advice: If you have switched to PIC16F690 recently: ~ 6 weeks ago I decided to abandon this chip, except for really small projects. It has little FLASH, little RAM and only 256 EEPROM. And you can not debug it easily on real target. I use 18FK4620 now: it has 16 times as much ...
3
ADCON1= 0b00000000; //format setup see page 182 of datasheet I think that's not right, for a start. That register controls more than just the format. Bits 0-2 control the voltage references (000 is ok for that - VDD and VSS). Bit 7 controls the format. But, bits 4-6 control the conversion clock. You set those to 000 - that equates to $F_{OSC}/2$. That'...
3
You are joining your HIGH and LOW byte values together wrong: unsigned int adc = ((ADRESH<<2) | ADRESL); You have a 10-bit result, 2 bits in ADRESH and 8 bits in ADRESL. Say the two values are ADRESH = 0b00000010 ADRESL = 0b10101010 You left shift the high one by 2 places, so it becomes: ADRESH = 0b00001000 ADRESL = 0b10101010 Now you OR ...
3
You should find documentation for Microchip's XC8 Peripheral Library in the 'docs' folder where you've got the XC8 compiler installed. On my PC its at C:\Program Files (x86)\Microchip\xc8\v1.21\docs The file you're looking for is MPLAB_XC8_Peripheral_Libraries.pdf I don't particularly like the documentation or their automated Doc-O-Matic system which ...
3
A few issues I see: T2CONbits.T2CKPS = 0x1; // set prescaler to 1 This line is actually setting the prescaler to 4, not 1. Based on the values you have chosen for PR2, Tosc and the TMR2 prescaler I calculate a PWM frequency of 4902 Hz. If you set the prescaler to 1 you should get a frequency of ~19608 Hz. I think this is what you intended. You should write ...
Only top voted, non community-wiki answers of a minimum length are eligible |
Article
# Min-max relations for odd cycles in planar graphs
08/2011;
Source: arXiv
ABSTRACT Let m(G) be the maximum number of vertex-disjoint odd cycles of a graph G and
t(G) the minimum number of vertices whose removal makes G bipartite. We show
that t(G)<=6m(G) if G is planar. This improves the previous bound t(G)<=10m(G)
by Fiorini, Hardy, Reed and Vetta [Math. Program. Ser. B 110 (2007), 71-91].
0 0
·
0 Bookmarks
·
32 Views
Available from
### Keywords
Fiorini
G bipartite
graph G
maximum number
vertex-disjoint odd cycles
vertices
Vetta [Math |
### Home > CALC > Chapter 9 > Lesson 9.1.2 > Problem9-32
9-32.
An alternating series, such as $100 − 80 + 64 − 51.2 + ...$, has terms that alternate in sign ($+$ and $−$).
1. Find the common ratio for $100 − 80 + 64 − 51.2 + ...$
2. Find the sum of this infinite series. |
## Results (displaying matches 1-50 of 166) Next
LMFDB label dimension base field Weil polynomial $p$-rank isogeny factors
2.8.ak_bp 2 $\F_{2^3}$ $(1-5x+8x^{2})^{2}$ $2$ 1.8.af 2
2.8.aj_bj 2 $\F_{2^3}$ $1-9x+35x^{2}-72x^{3}+64x^{4}$ $2$ simple
2.8.aj_bk 2 $\F_{2^3}$ $(1-5x+8x^{2})(1-4x+8x^{2})$ $1$ 1.8.af $\times$ 1.8.ae
2.8.ai_bf 2 $\F_{2^3}$ $(1-5x+8x^{2})(1-3x+8x^{2})$ $2$ 1.8.af $\times$ 1.8.ad
2.8.ai_bg 2 $\F_{2^3}$ $(1-4x+8x^{2})^{2}$ $0$ 1.8.ae 2
2.8.ah_y 2 $\F_{2^3}$ $1-7x+24x^{2}-56x^{3}+64x^{4}$ $1$ simple
2.8.ah_z 2 $\F_{2^3}$ $1-7x+25x^{2}-56x^{3}+64x^{4}$ $2$ simple
2.8.ah_bb 2 $\F_{2^3}$ $1-7x+27x^{2}-56x^{3}+64x^{4}$ $2$ simple
2.8.ah_bc 2 $\F_{2^3}$ $(1-4x+8x^{2})(1-3x+8x^{2})$ $1$ 1.8.ae $\times$ 1.8.ad
2.8.ag_t 2 $\F_{2^3}$ $1-6x+19x^{2}-48x^{3}+64x^{4}$ $2$ simple
2.8.ag_v 2 $\F_{2^3}$ $(1-5x+8x^{2})(1-x+8x^{2})$ $2$ 1.8.af $\times$ 1.8.ab
2.8.ag_x 2 $\F_{2^3}$ $1-6x+23x^{2}-48x^{3}+64x^{4}$ $2$ simple
2.8.ag_z 2 $\F_{2^3}$ $(1-3x+8x^{2})^{2}$ $2$ 1.8.ad 2
2.8.af_n 2 $\F_{2^3}$ $1-5x+13x^{2}-40x^{3}+64x^{4}$ $2$ simple
2.8.af_p 2 $\F_{2^3}$ $1-5x+15x^{2}-40x^{3}+64x^{4}$ $2$ simple
2.8.af_q 2 $\F_{2^3}$ $(1-5x+8x^{2})(1+8x^{2})$ $1$ 1.8.af $\times$ 1.8.a
2.8.af_r 2 $\F_{2^3}$ $1-5x+17x^{2}-40x^{3}+64x^{4}$ $2$ simple
2.8.af_t 2 $\F_{2^3}$ $1-5x+19x^{2}-40x^{3}+64x^{4}$ $2$ simple
2.8.af_u 2 $\F_{2^3}$ $(1-4x+8x^{2})(1-x+8x^{2})$ $1$ 1.8.ae $\times$ 1.8.ab
2.8.af_v 2 $\F_{2^3}$ $1-5x+21x^{2}-40x^{3}+64x^{4}$ $2$ simple
2.8.ae_h 2 $\F_{2^3}$ $1-4x+7x^{2}-32x^{3}+64x^{4}$ $2$ simple
2.8.ae_i 2 $\F_{2^3}$ $1-4x+8x^{2}-32x^{3}+64x^{4}$ $0$ simple
2.8.ae_j 2 $\F_{2^3}$ $1-4x+9x^{2}-32x^{3}+64x^{4}$ $2$ simple
2.8.ae_l 2 $\F_{2^3}$ $(1-5x+8x^{2})(1+x+8x^{2})$ $2$ 1.8.af $\times$ 1.8.b
2.8.ae_n 2 $\F_{2^3}$ $1-4x+13x^{2}-32x^{3}+64x^{4}$ $2$ simple
2.8.ae_p 2 $\F_{2^3}$ $1-4x+15x^{2}-32x^{3}+64x^{4}$ $2$ simple
2.8.ae_q 2 $\F_{2^3}$ $(1-4x+8x^{2})(1+8x^{2})$ $0$ 1.8.ae $\times$ 1.8.a
2.8.ae_r 2 $\F_{2^3}$ $1-4x+17x^{2}-32x^{3}+64x^{4}$ $2$ simple
2.8.ae_t 2 $\F_{2^3}$ $(1-3x+8x^{2})(1-x+8x^{2})$ $2$ 1.8.ad $\times$ 1.8.ab
2.8.ad_b 2 $\F_{2^3}$ $1-3x+x^{2}-24x^{3}+64x^{4}$ $2$ simple
2.8.ad_d 2 $\F_{2^3}$ $1-3x+3x^{2}-24x^{3}+64x^{4}$ $2$ simple
2.8.ad_e 2 $\F_{2^3}$ $1-3x+4x^{2}-24x^{3}+64x^{4}$ $1$ simple
2.8.ad_f 2 $\F_{2^3}$ $1-3x+5x^{2}-24x^{3}+64x^{4}$ $2$ simple
2.8.ad_h 2 $\F_{2^3}$ $1-3x+7x^{2}-24x^{3}+64x^{4}$ $2$ simple
2.8.ad_i 2 $\F_{2^3}$ $1-3x+8x^{2}-24x^{3}+64x^{4}$ $1$ simple
2.8.ad_j 2 $\F_{2^3}$ $1-3x+9x^{2}-24x^{3}+64x^{4}$ $2$ simple
2.8.ad_l 2 $\F_{2^3}$ $1-3x+11x^{2}-24x^{3}+64x^{4}$ $2$ simple
2.8.ad_m 2 $\F_{2^3}$ $(1-4x+8x^{2})(1+x+8x^{2})$ $1$ 1.8.ae $\times$ 1.8.b
2.8.ad_n 2 $\F_{2^3}$ $1-3x+13x^{2}-24x^{3}+64x^{4}$ $2$ simple
2.8.ad_p 2 $\F_{2^3}$ $1-3x+15x^{2}-24x^{3}+64x^{4}$ $2$ simple
2.8.ad_q 2 $\F_{2^3}$ $(1-3x+8x^{2})(1+8x^{2})$ $1$ 1.8.ad $\times$ 1.8.a
2.8.ad_r 2 $\F_{2^3}$ $1-3x+17x^{2}-24x^{3}+64x^{4}$ $2$ simple
2.8.ac_ad 2 $\F_{2^3}$ $1-2x-3x^{2}-16x^{3}+64x^{4}$ $2$ simple
2.8.ac_ab 2 $\F_{2^3}$ $1-2x-x^{2}-16x^{3}+64x^{4}$ $2$ simple
2.8.ac_b 2 $\F_{2^3}$ $(1-5x+8x^{2})(1+3x+8x^{2})$ $2$ 1.8.af $\times$ 1.8.d
2.8.ac_d 2 $\F_{2^3}$ $1-2x+3x^{2}-16x^{3}+64x^{4}$ $2$ simple
2.8.ac_f 2 $\F_{2^3}$ $1-2x+5x^{2}-16x^{3}+64x^{4}$ $2$ simple
2.8.ac_h 2 $\F_{2^3}$ $1-2x+7x^{2}-16x^{3}+64x^{4}$ $2$ simple
2.8.ac_j 2 $\F_{2^3}$ $1-2x+9x^{2}-16x^{3}+64x^{4}$ $2$ simple
2.8.ac_l 2 $\F_{2^3}$ $1-2x+11x^{2}-16x^{3}+64x^{4}$ $2$ simple
Next |
# Byte data type (Visual Basic)
Holds unsigned 8-bit (1-byte) integers that range in value from 0 through 255.
## Remarks
Use the Byte data type to contain binary data.
The default value of Byte is 0.
## Literal assignments
You can declare and initialize a Byte variable by assigning it a decimal literal, a hexadecimal literal, an octal literal, or (starting with Visual Basic 2017) a binary literal. If the integral literal is outside the range of a Byte (that is, if it is less than Byte.MinValue or greater than Byte.MaxValue), a compilation error occurs.
In the following example, integers equal to 201 that are represented as decimal, hexadecimal, and binary literals are implicitly converted from Integer to byte values.
Dim byteValue1 As Byte = 201
Console.WriteLine(byteValue1)
Dim byteValue2 As Byte = &H00C9
Console.WriteLine(byteValue2)
Dim byteValue3 As Byte = &B1100_1001
Console.WriteLine(byteValue3)
' The example displays the following output:
' 201
' 201
' 201
Note
You use the prefix &h or &H to denote a hexadecimal literal, the prefix &b or &B to denote a binary literal, and the prefix &o or &O to denote an octal literal. Decimal literals have no prefix.
Starting with Visual Basic 2017, you can also use the underscore character, _, as a digit separator to enhance readability, as the following example shows.
Dim byteValue3 As Byte = &B1100_1001
Console.WriteLine(byteValue3)
' The example displays the following output:
' 201
Starting with Visual Basic 15.5, you can also use the underscore character (_) as a leading separator between the prefix and the hexadecimal, binary, or octal digits. For example:
Dim number As Byte = &H_6A
To use the underscore character as a leading separator, you must add the following element to your Visual Basic project (*.vbproj) file:
<PropertyGroup>
<LangVersion>15.5</LangVersion>
</PropertyGroup>
## Programming tips
• Negative Numbers. Because Byte is an unsigned type, it cannot represent a negative number. If you use the unary minus (-) operator on an expression that evaluates to type Byte, Visual Basic converts the expression to Short first.
• Format Conversions. When Visual Basic reads or writes files, or when it calls DLLs, methods, and properties, it can automatically convert between data formats. Binary data stored in Byte variables and arrays is preserved during such format conversions. You should not use a String variable for binary data, because its contents can be corrupted during conversion between ANSI and Unicode formats.
• Widening. The Byte data type widens to Short, UShort, Integer, UInteger, Long, ULong, Decimal, Single, or Double. This means you can convert Byte to any of these types without encountering a System.OverflowException error.
• Type Characters. Byte has no literal type character or identifier type character.
• Framework Type. The corresponding type in the .NET Framework is the System.Byte structure.
## Example
In the following example, b is a Byte variable. The statements demonstrate the range of the variable and the application of bit-shift operators to it.
' The valid range of a Byte variable is 0 through 255.
Dim b As Byte
b = 30
' The following statement causes an error because the value is too large.
'b = 256
' The following statement causes an error because the value is negative.
'b = -5
' The following statement sets b to 6.
b = CByte(5.7)
' The following statements apply bit-shift operators to b.
' The initial value of b is 6.
Console.WriteLine(b)
' Bit shift to the right divides the number in half. In this
' example, binary 110 becomes 11.
b >>= 1
' The following statement displays 3.
Console.WriteLine(b)
' Now shift back to the original position, and then one more bit
' to the left. Each shift to the left doubles the value. In this
' example, binary 11 becomes 1100.
b <<= 2
' The following statement displays 12.
Console.WriteLine(b) |
# Tag Info
2
A coin may be fair or it may be biased so that $p = P(\mathtt{Heads}) = 2/3.$ [Notice that I've gotten rid of the possibly confusing twist of letting $p$ be the probability of Tails.] We want to test $H_0: p = 1/2$ against $H_1: p = 2/3.$ [This situation in which $H_0$ and $H_1$ each specify only one value is called 'simple vs. simple'.] Data for the test ...
1
Based on your first graph, your problem is granularity; there is a limited number of values that happen often. It is impossible to (meaningfully) fix that using a transformation. So, the second graph suggests to me that you made an error when applying the arcsine transformation. Appart from the granularity, the original distribution does not look bad, so I ...
1
The test you are looking for is called a test of marginal homogeneity (the table you give are the two margins of a 4x4 cross-classification, and you want to test if these are equal, hence the name). There is at least one R-packages for the Stuart-Maxwell test, which is a Wald test. A bit more accurate for small samples may be a likelihood ratio test using ...
Only top voted, non community-wiki answers of a minimum length are eligible |
## Exploring the LHC medium with electromagnetic probes
Marin, Ana
##### Description
Heavy-ion collisions will enter a new era with the start of the CERN Large Hadron Collider (LHC). A first short run with proton-proton collisions at the injection energy of 0.9 TeV will be followed by a longer one with $pp$ collisions at 10 TeV. First Pb-Pb collisions at $\sqrt{s_{NN}}$=5.5 TeV will take place in 2009. Three experiments (ALICE, ATLAS, and CMS) will study both $pp$ and Pb-Pb collisions. A selection of results showing the capabilities of the three experiments for the study of the LHC medium with electromagnetic probes is presented.
Comment: 6 pages, 10 figures, Hard Probes 2008 conference proceedings
##### Keywords
Nuclear Experiment |
## Found 1,216 Documents (Results 1–100)
100
MathJax
### Two-phase compressible/incompressible Navier-Stokes system with inflow-outflow boundary conditions. (English)Zbl 07569653
MSC: 76N10 35Q30 76D03
Full Text:
### Difference between smoothed particle hydrodynamics and moving particle semi-implicit operators. (English)Zbl 07532583
MSC: 76-XX 65-XX
Full Text:
Full Text:
### A weak Galerkin mixed finite element method for acoustic wave equation. (English)Zbl 07528522
MSC: 65M60 65M12
Full Text:
### New stabilized $$P_1 \times P_0$$ finite element methods for nearly inviscid and incompressible flows. (English)Zbl 07526126
MSC: 76-XX 65-XX
Full Text:
MSC: 70M20
Full Text:
### High-order Scharfetter-Gummel-based schemes and applications to gas discharge modeling. (English)Zbl 07525172
MSC: 65Mxx 76Mxx 35Kxx
Full Text:
Full Text:
### A fractal model of low-velocity non-Darcy flow considering viscosity distribution and boundary layer effect. (English)Zbl 1484.76073
MSC: 76S05 28A80
Full Text:
Full Text:
Full Text:
### Low-cost Runge-Kutta integrators for incompressible flow simulations. (English)Zbl 07515418
MSC: 76Dxx 76Mxx 65Mxx
Full Text:
### A POD-Galerkin reduced order model for a LES filtering approach. (English)Zbl 07513841
MSC: 76Mxx 76Dxx 65Mxx
Full Text:
### A high-throughput hybrid task and data parallel Poisson solver for large-scale simulations of incompressible turbulent flows on distributed GPUs. (English)Zbl 07505912
MSC: 76Mxx 65Mxx 76Dxx
Full Text:
Full Text:
Full Text:
### Enhanced solution of 2D incompressible Navier-Stokes equations based on an immersed-boundary generalized harmonic polynomial cell method. (English)Zbl 07437248
MSC: 76M99 76M20 76D05
Full Text:
### Modeling positive surge propagation in open channels using the Serre-Green-Naghdi equations. (English)Zbl 1481.76042
MSC: 76B15 76M12
Full Text:
### Utilization of pressure wave-dynamics in accelerating convergence of the lattice-Boltzmann method for steady and unsteady flows. (English)Zbl 07426881
MSC: 76Mxx 76Pxx 76Fxx
Full Text:
MSC: 76-XX
Full Text:
MSC: 76-XX
Full Text:
### A volume of solid implicit forcing immersed boundary method for solving incompressible Navier-Stokes equations in complex domain. (English)Zbl 07426158
MSC: 76-XX 35-XX
Full Text:
### Long-wave approximations in the description of bottom pressure. (English)Zbl 07425544
MSC: 35-XX 76-XX
Full Text:
### Unsteady flow of Carreau fluid in a pipe. (English)Zbl 07425517
MSC: 76A05 35Q35
Full Text:
Full Text:
Full Text:
### Transient drainage volume characterization and flow simulation in reservoir models using the fast marching method. (English)Zbl 1473.86010
MSC: 86-08 76S05
Full Text:
### An efficient split-step framework for non-Newtonian incompressible flow problems with consistent pressure boundary conditions. (English)Zbl 07415040
MSC: 76-XX 65-XX
Full Text:
### Extension of finite-strain equations of state to ultra-high pressure. (English)Zbl 07409452
MSC: 81-XX 82-XX
Full Text:
MSC: 76N10
Full Text:
Full Text:
Full Text:
### Modal perturbation theory in the case of bathymetry variations in shallow-water acoustics. (English)Zbl 1467.76060
MSC: 76Q05 76M45 86A05
Full Text:
### Hydrodynamic entrance region in a flat porous channel with a pressure head isothermal laminar flow of a Newtonian medium. (Russian. English summary)Zbl 1472.35310
MSC: 35Q35 35K60 76S05
Full Text:
Full Text:
Full Text:
### Sharp consistency estimates for a pressure-Poisson problem with Stokes boundary value problems. (English)Zbl 1464.35246
MSC: 35Q35 35A35 76D07
Full Text:
Full Text:
### High-order finite element methods for a pressure Poisson equation reformulation of the Navier-Stokes equations with electric boundary conditions. (English)Zbl 07337746
MSC: 76-XX 65-XX
Full Text:
Full Text:
MSC: 82-XX
Full Text:
### A unified framework of continuous and discontinuous Galerkin methods for solving the incompressible Navier-Stokes equation. (English)Zbl 07508394
MSC: 76-XX 65-XX
Full Text:
### Practical computational fluid dynamics with the finite volume method. (English)Zbl 1481.76145
De Lorenzis, Laura (ed.) et al., Modeling in engineering using innovative numerical methods for solids and fluids. Papers based on the presentations at the CISM course, Udine, Italy, October 15–19, 2018. Cham: Springer. CISM Courses Lect. 599, 103-161 (2020).
MSC: 76M12 76D05
Full Text:
### Parametric POD-Galerkin model order reduction for unsteady-state heat transfer problems. (English)Zbl 1473.78016
MSC: 78M34 97N40 35Q35
Full Text:
Full Text:
### Absence of convection in solid tumors caused by raised interstitial fluid pressure severely limits success of chemotherapy – a numerical study in cancers. (English)Zbl 1470.92143
MSC: 92C50 92C35 34C60
Full Text:
Full Text:
Full Text:
Full Text:
### A novel solution method for unsteady incompressible Euler flow using the vorticity-Bernoulli-pressure formulation. (English)Zbl 1436.76050
MSC: 76M23 76M28 76B47
Full Text:
Full Text:
Full Text:
### Phreatic seepage flow through an earth dam with an impeding strip. (English)Zbl 1434.76123
MSC: 76S05 65M60
Full Text:
Full Text:
Full Text:
### Effect of surface tension on the behavior of adhesive contact based on Maugis-Dugdale model. (English)Zbl 1477.74087
MSC: 74M15 74A50
Full Text:
### Uncertainty analysis of computed flow rates and pressure differences in rarefied pressure and temperature driven gas flows through long capillaries. (English)Zbl 1477.76077
MSC: 76P05 76M35
Full Text:
### Spurious pressure in Scott-Vogelius elements. (English)Zbl 1450.65150
MSC: 65N30 76D07
Full Text:
### Analysis of a constant-coefficient pressure equation method for fast computations of two-phase flows at high density ratios. (English)Zbl 1453.76124
MSC: 76M20 76T10
Full Text:
Full Text:
### On weak-strong uniqueness for compressible Navier-Stokes system with general pressure laws. (English)Zbl 1433.35219
MSC: 35Q30 76N10 35A02
Full Text:
MSC: 76S05
Full Text:
MSC: 76F06
Full Text:
Full Text:
### A class of exact nonlinear traveling wave solutions for shallow water with a non-stationary bottom surface. (English)Zbl 1472.76017
MSC: 76B15 86A05
Full Text:
### Rotationally symmetric motions and their blowup for incompressible nonlinearly elastic and viscoelastic annuli. (English)Zbl 1486.74010
MSC: 74B20 74D10 74H35
Full Text:
### Stokes flow with kinematic and dynamic boundary conditions. (English)Zbl 1415.76119
MSC: 76D03 76D07
Full Text:
### E-cigarette smoking with peer pressure. (English)Zbl 1410.91384
MSC: 91D10 34D20
Full Text:
Full Text:
### Flow-induced vortex field generated by a thin oscillating plate in an aeroacoustics framework. (English)Zbl 1448.76144
MSC: 76Q05 74F10
Full Text:
### Compressible Navier-Stokes system with hard sphere pressure law and general inflow-outflow boundary conditions. (English)Zbl 1414.35146
MSC: 35Q30 76N10 35D30
Full Text:
Full Text:
### Asymptotic analysis of an $$\varepsilon$$-Stokes problem connecting Stokes and pressure-Poisson problems. (English)Zbl 1469.76037
MSC: 76D07 76M45 35Q35
Full Text:
### Application of Knudsen thermal force for detection of $$\text{CO}_2$$ in low-pressure micro gas sensor. (English. Russian original)Zbl 1414.76046
Fluid Dyn. 53, No. 6, 812-823 (2018); translation from Izv. Ross. Akad. Nauk, Mekh. Zhidk. Gaza 2018, No. 6, 94-104 (2018).
MSC: 76P05 76M35
Full Text:
### Dispersive solitary wave solutions of nonlinear further modified Korteweg-de Vries dynamical equation in an unmagnetized dusty plasma. (English)Zbl 1404.35390
MSC: 35Q53 35C08 82D10
Full Text:
### Finite volume POD-Galerkin stabilised reduced order methods for the parametrised incompressible Navier-Stokes equations. (English)Zbl 1410.76264
MSC: 76M12 65M08 76D05
Full Text:
### Low-frequency deceleration of a filtration wave in layered-inhomogeneous permeable formations. (English. Russian original)Zbl 1397.76131
J. Appl. Mech. Tech. Phys. 59, No. 3, 474-481 (2018); translation from Prikl. Mekh. Tekh. Fiz. 59, No. 3, 103-110 (2018).
MSC: 76S05
Full Text:
Full Text:
Full Text:
### An exploration of pressure dynamics using differential equations defined on a fractal geometry. (English)Zbl 1393.76116
MSC: 76S05 35Q35
Full Text:
### The energy density distribution of an ideal gas and Bernoulli’s equations. (English)Zbl 1391.76670
MSC: 76N15 35Q35
Full Text:
### Stability analysis of coupled torsional vibration and pressure in oilwell drillstring system. (English)Zbl 1390.93670
MSC: 93D20 93A30 93C20 93C15 93C95 74H45
Full Text:
### Dynamical pressure in a polyatomic gas: interplay between kinetic theory and extended thermodynamics. (English)Zbl 1376.80002
MSC: 80A05 76P05 82C40
Full Text:
Full Text:
### Mathematical modeling of rf plasma flow with metastable atoms at low pressure. (English)Zbl 07377783
MSC: 76P99 76N15 76X05
Full Text:
### Computing numerical solutions of the pseudo-parabolic Buckley-Leverett equation with dynamic capillary pressure. (English)Zbl 07313814
MSC: 76-XX 65-XX
Full Text:
### Analytical solutions of channel and duct flows due to general pressure gradients. (English)Zbl 1446.76035
MSC: 76-10 76D05
Full Text:
### On the theory of seepage waves of pressure in a fracture in a porous permeable medium. (English. Russian original)Zbl 1448.76163
J. Appl. Mech. Tech. Phys. 58, No. 5, 862-870 (2017); translation from Prikl. Mekh. Tekh. Fiz. 58, No. 5, 121-130 (2017).
MSC: 76S05
Full Text:
MSC: 92C50
Full Text:
### Inflow/outflow pressure boundary conditions for smoothed particle hydrodynamics simulations of incompressible flows. (English)Zbl 1390.76746
MSC: 76M28 65M75
Full Text:
### An analytic solution to the coupled pressure-temperature equations for modeling of photoacoustic trace gas sensors. (English)Zbl 1388.35018
MSC: 35J05 35K05 35Q35
Full Text:
Full Text:
### Numerical investigations of two-phase flow with dynamic capillary pressure in porous media via a moving mesh method. (English)Zbl 1378.76077
MSC: 76M20 76T10 76S05
Full Text:
### An oscillation free shock-capturing method for compressible van der Waals supercritical fluid flows. (English)Zbl 1375.76083
MSC: 76L05 76N15 76M12
Full Text:
### Mechanical quadrature method as applied to singular integral equations with logarithmic singularity on the right-hand side. (English. Russian original)Zbl 1457.74147
Comput. Math. Math. Phys. 57, No. 8, 1285-1293 (2017); translation from Zh. Vychisl. Mat. Mat. Fiz. 57, No. 8, 1294-1303 (2017).
MSC: 74M15 45E05 65R20
Full Text:
### Pressure correction method for multi-layer open flow model and wave problems. (Russian. English summary)Zbl 1389.76005
MSC: 76B07 76B15 68W10
Full Text:
### A one-dimensional model of flow in a junction of thin channels, including arterial trees. (English. Russian original)Zbl 1386.76062
Sb. Math. 208, No. 8, 1138-1186 (2017); translation from Mat. Sb. 208, No. 8, 56-105 (2017); corrigendum ibid. 209, No. 6, 919 (2018); translation from Mat. Sb. 208, No. 6, 146 (2018).
Full Text:
### General and exact pressure evolution equation. (English)Zbl 1374.76008
MSC: 76A02 76D05
Full Text:
all top 5
all top 5
all top 5
all top 3
all top 3 |
# My rating did not increase?
Why does this happen- I have a current rating of 1612 in combinatorics.... recently i solved 2 problems of ratings 1725 and 1589 in combinatorics.... but my rating did not increase at all....please help as to why this is happening. OF course, i too want my rating to increase.... @ brilliant staff
Note by Krishna Ar
6 years, 2 months ago
This discussion board is a place to discuss our Daily Challenges and the math and science related to those challenges. Explanations are more than just a solution — they should explain the steps and thinking strategies that you used to obtain the solution. Comments should further the discussion of math and science.
When posting on Brilliant:
• Use the emojis to react to an explanation, whether you're congratulating a job well done , or just really confused .
• Ask specific questions about the challenge or the steps in somebody's explanation. Well-posed questions can add a lot to the discussion, but posting "I don't understand!" doesn't help anyone.
• Try to contribute something new to the discussion, whether it is an extension, generalization or other idea related to the challenge.
• Stay on topic — we're all here to learn more about math and science, not to hear about your favorite get-rich-quick scheme or current world events.
MarkdownAppears as
*italics* or _italics_ italics
**bold** or __bold__ bold
- bulleted- list
• bulleted
• list
1. numbered2. list
1. numbered
2. list
Note: you must add a full line of space before and after lists for them to show up correctly
paragraph 1paragraph 2
paragraph 1
paragraph 2
[example link](https://brilliant.org)example link
> This is a quote
This is a quote
# I indented these lines
# 4 spaces, and now they show
# up as a code block.
print "hello world"
# I indented these lines
# 4 spaces, and now they show
# up as a code block.
print "hello world"
MathAppears as
Remember to wrap math in $$ ... $$ or $ ... $ to ensure proper formatting.
2 \times 3 $2 \times 3$
2^{34} $2^{34}$
a_{i-1} $a_{i-1}$
\frac{2}{3} $\frac{2}{3}$
\sqrt{2} $\sqrt{2}$
\sum_{i=1}^3 $\sum_{i=1}^3$
\sin \theta $\sin \theta$
\boxed{123} $\boxed{123}$
Sort by:
I see that one day ago, your rating was 1530, and it is now 1610 after you answered those 3 questions correctly. Answering the question with rating of 1725 provided the greatest boost to your ratings.
Staff - 6 years, 2 months ago
Yes, but today I answered a question with rating 1726 and also another with approx rating `1580.... why didnt it increase???? @Calvin Lin
- 6 years, 2 months ago
From what I can see, your ratings did increase each time that you answered the question correctly. The easy questions increased your ratings by 3 and 5 respectively.
Staff - 6 years, 2 months ago
Nope....not at all.... the 1725 question I solved today did not increase my rating! So didn't the 1580 question... @Calvin Lin
- 6 years, 2 months ago
The first question that you answered increased your rating from 1527 to 1604.
The second question that you answered increased your rating from 1604 to 1607.
The third question that you answered increased your rating from 1607 to 1612.
If you are referring to the "congrats your rating increased to XXX", then it only shows your current rating. This might explain why you think that only the first question increased your rating.
Staff - 6 years, 2 months ago
OK. But why did my ratings increase only by such small amounts in the second and third cases? Those two questions were of a rating greater than my rating...so naturally my rating should have increased by 20-25 pts and not by 4-6 pts @Calvin Lin
- 6 years, 2 months ago
As I look into your history, I am unable to find what you claim. Can you link me to the 2 questions that you are referring to?
Please provide further information, like the date (timeframe) that is involved, the question title (a link would be appreciated), if you answered the question correctly or wrongly, and the change in rating that you experienced. Please be as specific as you can, as that helps me trace down the issue.
Staff - 6 years, 2 months ago
https://brilliant.org/mathematics-problem/how-many-even-integers/?group=PdKgUpayNBd1- this is the 1725 question i solved today... and the other is https://brilliant.org/mathematics-problem/gabriels-odd-numbers/?group=QwrhoKKYLrCu- the 1580 question././//////////////////////////////////////////////////////////// AH! there's where you go wrong @Calvin Lin - i had also solved two level 2 problems y'day. that perhaps increased my ratings by 2's or 3's. what about the level 3 problems I solved today? please grant justice :P both the questions were solved today....the questions titles are- "how many even integers" and " gabriel's odd integers"/// please check and revert back. thanks... i am sure my rating did not increase absolutely for these 2 questions
- 6 years, 2 months ago
Thanks, I'd look into this further.
Staff - 6 years, 2 months ago
Thanks. Hope some change happens to my rating.
- 6 years, 2 months ago
The level 3 problem that you did was part of the Practice section, which do not affect ratings.
We have updated it so that only BrilliantSquared members can access the relevant Practice sections through the activity feed or other links.
Staff - 6 years, 2 months ago
I had solved two level 3 problems of rating 1725 and 1575 rply//// are both practice problems then?
- 6 years, 2 months ago
@Calvin Lin - Could you please tell me when a change in my rating would occur??????
- 6 years, 2 months ago
Hey again sir. You said that now u don't have a level test. So how do new users get their levels in a particular topic?
- 6 years, 2 months ago
could you post a solution to your polynomial question- "KUSHAGRA'S POLYNOMIAL" please? @Kushagra Sahni
- 6 years, 2 months ago
They simply solve problems and ratings/levels adjust accordingly.
Staff - 6 years, 2 months ago
Hey calvin sir. Hope this letter finds u in d best of your health. I have had a fabulous experience on brilliant of late and if 1 change is made according to me it would b the best site ever. I wanted to tell u that my combinatorics rating is not the appropriate measure of my abilities. I mean I shud be a level 3 or 4 in combinatorics but am a level 2 I wanted to give the level test that we give after we r new to brilliant bcoz that day I didn't give the level test seriously although I knew the answers. So I just wanted to give the level test again so that I m a level 3 in combinatorics. I would be obliged if u enable this feature of giving a level test again if possible or tell me appropriate ways to solve the problem. Thank you
Yours Sincerely,
Kushagra Sahni
- 6 years, 2 months ago
@Kushagra Sahni As you solve problems, your ratings and level will increase. You can also choose to view "Level 4 problems" in combinatorics, by going to the tag #Combinatorics, and select "Near Level 4: Harder".
We no longer have a "level test", and there was no way to retake it.
Staff - 6 years, 2 months ago
I answered only 1 question that day., That gave me a boost of 80 pts but that doesnt give any reason for my rating not increasing today...please elaborate @Calvin Lin
- 6 years, 2 months ago
@Calvin Lin - Would you please explain us how exactly ratings work?
- 6 years, 2 months ago |
American Institute of Mathematical Sciences
• Previous Article
Refined construction of type II blow-up solutions for semilinear heat equations with Joseph–Lundgren supercritical nonlinearity
• DCDS Home
• This Issue
• Next Article
Turing instability and dynamic phase transition for the Brusselator model with multiple critical eigenvalues
doi: 10.3934/dcds.2021058
Infinitely many radial solutions for a $p$-Laplacian problem with indefinite weight
1 Department of Mathematics, Harvey Mudd College, Claremont, CA 91711, USA 2 Escuela de Matemáticas, Universidad Nacional de Colombia, Apartado Aéreo 3840, Medellín, Colombia
* Corresponding author: Alfonso Castro
Received September 2020 Revised February 2021 Published March 2021
Fund Project: The last two authors are supported by Facultad de Ciencias, Universidad Nacional de Colombia sede Medellín
We prove the existence of infinitely many sign changing radial solutions for a $p$-Laplacian Dirichlet problem in a ball. Our problem involves a weight function that is positive at the center of the unit ball and negative in its boundary. Standard initial value problems-phase plane analysis arguments do not apply here because solutions to the corresponding initial value problem may blow up near the boundary due to the fact that our weight function is negative at the boundary. We overcome this difficulty by connecting the solutions to a singular initial value problem with those of a regular initial value problem that vanishes at the boundary.
Citation: Alfonso Castro, Jorge Cossio, Sigifredo Herrón, Carlos Vélez. Infinitely many radial solutions for a $p$-Laplacian problem with indefinite weight. Discrete & Continuous Dynamical Systems, doi: 10.3934/dcds.2021058
References:
[1] K. Bal and P. Garain, Nonexistence results for weighted $p$-Laplace equations with singular nonlinearities, Electron. J. Differ. Equ., 95 (2019), 1-12. Google Scholar [2] H. Berestycki, P.-L. Lions and L. A. Peletier, An ODE approach to the existence of positive solutions for semilinear problems in $\mathbb R^N$, Indiana Univ. Math. J., 30 (1981), 141-157. doi: 10.1512/iumj.1981.30.30012. Google Scholar [3] A. Castro, J. Cossio, S. Herrón, R. Pardo and C. Vélez, Infinitely many radial solutions for a sub-super critical p-Laplacian problem in a ball, Annali di Matematica Pura ed Applicata, 199 (2020), 737-766. doi: 10.1007/s10231-019-00898-x. Google Scholar [4] A. Castro and A. Kurepa, Infinitely many radially symmetric solutions to a superlinear Dirichlet problem in a ball, Proc. Am. Math. Soc., 101 (1987), 57-64. doi: 10.1090/S0002-9939-1987-0897070-7. Google Scholar [5] T. Chen and R. Ma, Three positive solutions of $N$-dimensional $p$-Laplacian with indefinite weight, Electron. J. Qual. Theory Differ. Equ., (2019), Paper No. 19, 14 pp. doi: 10.14232/ejqtde.2019.1.19. Google Scholar [6] J. Cossio, S. Herrón and C. Vélez, Infinitely many radial solutions for a $p$-Laplacian problem p-superlinear at the origin, J. Math. Anal. Appl., 376 (2011), 741-749. doi: 10.1016/j.jmaa.2010.10.075. Google Scholar [7] E. DiBenedetto, $C^{1+\alpha }$ local regularity of weak solutions of degenerate elliptic equations, Nonlinear Anal., 7 (1983), 827-850. doi: 10.1016/0362-546X(83)90061-5. Google Scholar [8] A. El Hachimi and F. De Thelin, Infinitely many radially symmetric solutions for a quasilinear elliptic problem in a ball, J. Differ. Equ., 128 (1996), 78-102. doi: 10.1006/jdeq.1996.0090. Google Scholar [9] W. H. Fleming, A selection-migration model in population genetics, J. Math. Biol., 2 (1975), 219-233. doi: 10.1007/BF00277151. Google Scholar [10] M. García-Huidobro, R. Manásevich and F. Zanolin, Infinitely many solutions for a Dirichlet problem with a nonhomogeneous $p$-Laplacian-like operator in a ball, Adv. Differential Equations, 2 (1997), 203-230. Google Scholar [11] S. Herrón and E. Lopera, Signed radial solutions for a weighted p-superlinear problem, Electron. J. Differ. Equ., 24 (2014), 1-13. Google Scholar [12] G. M. Lieberman, Boundary regularity for solutions of degenerate elliptic equations, Nonlinear Anal., 12 (1988), 1203-1219. doi: 10.1016/0362-546X(88)90053-3. Google Scholar [13] W. Reichel and W. Walter, Radial solutions of equations and inequalities involving the $p$-Laplacian, J. Inequal. Appl., (1997), 47–71. Google Scholar [14] A. S. Tersenov, On the existence of radially symmetric solutions of the inhomogeneous p-Laplace equation, Siberian Mathematical Journal, 57 (2016), 918-928. doi: 10.1134/S0037446616050219. Google Scholar
show all references
References:
[1] K. Bal and P. Garain, Nonexistence results for weighted $p$-Laplace equations with singular nonlinearities, Electron. J. Differ. Equ., 95 (2019), 1-12. Google Scholar [2] H. Berestycki, P.-L. Lions and L. A. Peletier, An ODE approach to the existence of positive solutions for semilinear problems in $\mathbb R^N$, Indiana Univ. Math. J., 30 (1981), 141-157. doi: 10.1512/iumj.1981.30.30012. Google Scholar [3] A. Castro, J. Cossio, S. Herrón, R. Pardo and C. Vélez, Infinitely many radial solutions for a sub-super critical p-Laplacian problem in a ball, Annali di Matematica Pura ed Applicata, 199 (2020), 737-766. doi: 10.1007/s10231-019-00898-x. Google Scholar [4] A. Castro and A. Kurepa, Infinitely many radially symmetric solutions to a superlinear Dirichlet problem in a ball, Proc. Am. Math. Soc., 101 (1987), 57-64. doi: 10.1090/S0002-9939-1987-0897070-7. Google Scholar [5] T. Chen and R. Ma, Three positive solutions of $N$-dimensional $p$-Laplacian with indefinite weight, Electron. J. Qual. Theory Differ. Equ., (2019), Paper No. 19, 14 pp. doi: 10.14232/ejqtde.2019.1.19. Google Scholar [6] J. Cossio, S. Herrón and C. Vélez, Infinitely many radial solutions for a $p$-Laplacian problem p-superlinear at the origin, J. Math. Anal. Appl., 376 (2011), 741-749. doi: 10.1016/j.jmaa.2010.10.075. Google Scholar [7] E. DiBenedetto, $C^{1+\alpha }$ local regularity of weak solutions of degenerate elliptic equations, Nonlinear Anal., 7 (1983), 827-850. doi: 10.1016/0362-546X(83)90061-5. Google Scholar [8] A. El Hachimi and F. De Thelin, Infinitely many radially symmetric solutions for a quasilinear elliptic problem in a ball, J. Differ. Equ., 128 (1996), 78-102. doi: 10.1006/jdeq.1996.0090. Google Scholar [9] W. H. Fleming, A selection-migration model in population genetics, J. Math. Biol., 2 (1975), 219-233. doi: 10.1007/BF00277151. Google Scholar [10] M. García-Huidobro, R. Manásevich and F. Zanolin, Infinitely many solutions for a Dirichlet problem with a nonhomogeneous $p$-Laplacian-like operator in a ball, Adv. Differential Equations, 2 (1997), 203-230. Google Scholar [11] S. Herrón and E. Lopera, Signed radial solutions for a weighted p-superlinear problem, Electron. J. Differ. Equ., 24 (2014), 1-13. Google Scholar [12] G. M. Lieberman, Boundary regularity for solutions of degenerate elliptic equations, Nonlinear Anal., 12 (1988), 1203-1219. doi: 10.1016/0362-546X(88)90053-3. Google Scholar [13] W. Reichel and W. Walter, Radial solutions of equations and inequalities involving the $p$-Laplacian, J. Inequal. Appl., (1997), 47–71. Google Scholar [14] A. S. Tersenov, On the existence of radially symmetric solutions of the inhomogeneous p-Laplace equation, Siberian Mathematical Journal, 57 (2016), 918-928. doi: 10.1134/S0037446616050219. Google Scholar
[1] Umberto Biccari. Internal control for a non-local Schrödinger equation involving the fractional Laplace operator. Evolution Equations & Control Theory, 2021 doi: 10.3934/eect.2021014 [2] G. Deugoué, B. Jidjou Moghomye, T. Tachim Medjo. Approximation of a stochastic two-phase flow model by a splitting-up method. Communications on Pure & Applied Analysis, 2021, 20 (3) : 1135-1170. doi: 10.3934/cpaa.2021010 [3] Said Taarabti. Positive solutions for the $p(x)-$Laplacian : Application of the Nehari method. Discrete & Continuous Dynamical Systems - S, 2021 doi: 10.3934/dcdss.2021029 [4] Haiyan Wang. Existence and nonexistence of positive radial solutions for quasilinear systems. Conference Publications, 2009, 2009 (Special) : 810-817. doi: 10.3934/proc.2009.2009.810 [5] Julian Tugaut. Captivity of the solution to the granular media equation. Kinetic & Related Models, 2021, 14 (2) : 199-209. doi: 10.3934/krm.2021002 [6] Michael Grinfeld, Amy Novick-Cohen. Some remarks on stability for a phase field model with memory. Discrete & Continuous Dynamical Systems, 2006, 15 (4) : 1089-1117. doi: 10.3934/dcds.2006.15.1089 [7] Anderson L. A. de Araujo, Marcelo Montenegro. Existence of solution and asymptotic behavior for a class of parabolic equations. Communications on Pure & Applied Analysis, 2021, 20 (3) : 1213-1227. doi: 10.3934/cpaa.2021017 [8] Craig Cowan. Supercritical elliptic problems involving a Cordes like operator. Discrete & Continuous Dynamical Systems, 2021 doi: 10.3934/dcds.2021037 [9] John Villavert. On problems with weighted elliptic operator and general growth nonlinearities. Communications on Pure & Applied Analysis, , () : -. doi: 10.3934/cpaa.2021023 [10] Yumi Yahagi. Construction of unique mild solution and continuity of solution for the small initial data to 1-D Keller-Segel system. Discrete & Continuous Dynamical Systems - B, 2021 doi: 10.3934/dcdsb.2021099 [11] Lipeng Duan, Jun Yang. On the non-degeneracy of radial vortex solutions for a coupled Ginzburg-Landau system. Discrete & Continuous Dynamical Systems, 2021 doi: 10.3934/dcds.2021056 [12] Norman Noguera, Ademir Pastor. Scattering of radial solutions for quadratic-type Schrödinger systems in dimension five. Discrete & Continuous Dynamical Systems, 2021, 41 (8) : 3817-3836. doi: 10.3934/dcds.2021018 [13] Yuncherl Choi, Taeyoung Ha, Jongmin Han, Sewoong Kim, Doo Seok Lee. Turing instability and dynamic phase transition for the Brusselator model with multiple critical eigenvalues. Discrete & Continuous Dynamical Systems, 2021 doi: 10.3934/dcds.2021035 [14] Chiun-Chuan Chen, Hung-Yu Chien, Chih-Chiang Huang. A variational approach to three-phase traveling waves for a gradient system. Discrete & Continuous Dynamical Systems, 2021 doi: 10.3934/dcds.2021055 [15] Liviana Palmisano, Bertuel Tangue Ndawa. A phase transition for circle maps with a flat spot and different critical exponents. Discrete & Continuous Dynamical Systems, 2021 doi: 10.3934/dcds.2021067 [16] Claudia Lederman, Noemi Wolanski. An optimization problem with volume constraint for an inhomogeneous operator with nonstandard growth. Discrete & Continuous Dynamical Systems, 2021, 41 (6) : 2907-2946. doi: 10.3934/dcds.2020391 [17] Meng-Xue Chang, Bang-Sheng Han, Xiao-Ming Fan. Global dynamics of the solution for a bistable reaction diffusion equation with nonlocal effect. Electronic Research Archive, , () : -. doi: 10.3934/era.2021024 [18] Markus Harju, Jaakko Kultima, Valery Serov, Teemu Tyni. Two-dimensional inverse scattering for quasi-linear biharmonic operator. Inverse Problems & Imaging, , () : -. doi: 10.3934/ipi.2021026 [19] Zhaoqiang Ge. Controllability and observability of stochastic implicit systems and stochastic GE-evolution operator. Numerical Algebra, Control & Optimization, 2021 doi: 10.3934/naco.2021009 [20] Zhang Chao, Minghua Yang. BMO type space associated with Neumann operator and application to a class of parabolic equations. Discrete & Continuous Dynamical Systems - B, 2021 doi: 10.3934/dcdsb.2021104
2019 Impact Factor: 1.338
Article outline |
# rotational dynamics Definition and Topics - 92 Discussions
Rotation around a fixed axis is a special case of rotational motion. The fixed-axis hypothesis excludes the possibility of an axis changing its orientation and cannot describe such phenomena as wobbling or precession. According to Euler's rotation theorem, simultaneous rotation along a number of stationary axes at the same time is impossible; if two rotations are forced at the same time, a new axis of rotation will appear.
This article assumes that the rotation is also stable, such that no torque is required to keep it going. The kinematics and dynamics of rotation around a fixed axis of a rigid body are mathematically much simpler than those for free rotation of a rigid body; they are entirely analogous to those of linear motion along a single fixed direction, which is not true for free rotation of a rigid body. The expressions for the kinetic energy of the object, and for the forces on the parts of the object, are also simpler for rotation around a fixed axis, than for general rotational motion. For these reasons, rotation around a fixed axis is typically taught in introductory physics courses after students have mastered linear motion; the full generality of rotational motion is not usually taught in introductory physics classes.
View More On Wikipedia.org
1. ### Moment of Inertia of a 4 rod system
This was the question (The line below is probably some translation of upper line in different language) For disc it was ma^2/2 For ring it was ma^2 For square lamina it was 2ma^2/3 For rods It was different Please explain Thank You🙏
2. ### Is the force exerted by a pivot always towards the center of mass?
I thought that the force by the pivot A on the pole AB would be the reaction force to the x-component of the gravitational force on AB. This would mean that the force by the pivot would be parallel to the pole, but in my notes from class the force vector seems to be more along the bisector of...
3. ### Disk hit by two masses
1) By conservation of linear momentum: ##m_1 v_1-m_2v_2=(m+m_1+m_2)v_{cm}\Rightarrow v_{cm}=\frac{m_1}{m+m_1+m_2}v_1-\frac{m_2}{m+m_1+m_2}v_2=\frac{3}{8}\frac{m}{s}##; 2) By conservation of angular momentum: ##-Rm_1v_1-Rm_2v_2=I_{total}\omega=(I_{disk}+m_1R^2+m_2R^2)\omega## so...
4. ### Tangential velocity of rotating rod
1) ##LT\sin(\frac{\pi}{2}-\theta)-\frac{L}{2}mg\sin\theta=0\Rightarrow T=\frac{mg}{2}\tan\theta##. ##N_{x}-T=0, N_{y}-mg=0\Rightarrow N=\sqrt{N_x ^2+N_y ^2}=mg\sqrt{(\frac{\tan\theta}{2})^2 +1}## 2) ##E_{k_{fin}}=mg\frac{L}{2}[1+\cos\theta]## 3)...
5. ### Torque calculations: Rotating vertical shaft
I apologize in advance for any errors in my concepts or assumptions. Feel free to correct me wherever I am wrong. Thanks in advance for the help. There is a vertical shaft which will be operated at around 600 rpm (N) which can be achieved in 2 seconds (or even 4 just an assumption). The shaft...
7. ### Question on Moment of Inertia Tensor of a Rotating Rigid Body
Hi. So I was asked the following question whose picture is attached below along with my attempt at the solution. Now my doubt is, since the question refers to the whole system comprising of these thin rigid body 'mini systems', should the Principle moments of Inertia about the respective axes...
8. ### Motion involving Translation & Rotation |Kleppner and Kolenkow
My doubt is with Method 2 of the given example in KK. I'm unable to understand why the torque around A (where we have chosen a coordinate system at A) becomes zero due to the R x F in z direction with a minus sign {Photo Attached} I have tried to reason out that one way to formulate that term...
9. ### Ball rolling on a sphere
My question is this: - Friction exists (for no slipping/pure rolling to occur) - Why is the work done against friction not accounted for in the conservation of energy equation? Thank you!
10. ### Find the velocity and acceleration of a pulley in a mass-spring system
This looks like a classical setup but I can't find a solution. We can calculate the energy of the system by looking at the work done by the gravity and the spring. But how do we divide the energy between the kinetic energy of the pulley and the rotation of the pulley?
11. ### I Why does wind blow leaves in circles?
Earlier today I realized that, when a strong gust of wind would blow through my area, it would pick up leaves off the ground and typically blow them in circular patterns, and typically the leaves would go in at least several complete circles before coming to rest back down on the ground. Why is...
12. ### Rotational Dynamics - Modeling brake caliper deceleration of a chassis
I am a junior engineer tasked with modeling the dynamics of a small research UAV after landing. The UAV has 3 tires, 1 on the nose landing gear and 2 on the rear landing gear. The rear tires are equipped with disc brake calipers. My coworker has explained that the simplified model (MODEL 1...
13. ### Rotational dynamics and the conservation of energy
I = Icm + mr^2 I = 0.5 mr^2 + mr^2 I= 3/2 mr^2 By COE, mgh = 0.5(3/2 mr^2)(w^2) g(2r) = 3/4(r^2)(w^2) 8g/3 = rw^2 = v^2 / r v = sqrt( 8gr/3) v=0.511m/s ans: v=0.79m/s
14. ### Rotational dynamics: Resolving forces
Resolving the weight of the cylinder c, i get Mgcosθ (-y) and Mgsinθ (-x) mgsinθ - Fs - T = ma ---(1) (where Fs is frictional force and T is tension) τ = I α (where τ is torque and α is angular acceleration) torque is produced by both tension and frictional force (T-Fs) * r = 0.5 m r^2 α...
15. ### Difference between curvilinear and rotational motion
The solution states that there's no rotational motion when ##C## is cut (the motion is curvilinear), so we can take torques with respect to the centre of mass of the plate. But, isn't it rotating? I think of it as a pendulum, which describes a circular motion. What's the difference? Wouldn't the...
16. ### Conservation of angular momentum and its counterpart for linear momentum
Hi, I have just joined the forum. Thank you all for being a part of such places so that people like me can get answers to the questions on their minds! --------------------------- I have been trying to understand how a quadcopter yaws. Referring to the figure below which is bird's eye view of...
17. ### Moment of inertia where mass and torque are at a different positions
The formula for moment of inertia is: I=mr^2 A common derivation for this is: 1. F=ma 2. τ=rma 3. τ=rmrα = r^2 mα This is a rotational version of Newton’s second law, where torque replaces force, moment of inertia replaces mass, and angular acceleration replaces tangential acceleration...
18. ### Problems with this rotational motion question (ant walking around a rotating ring)
I've marked correct answers above. Have a look at the solutions: How is the first equation justified? Shouldn't v2 and ωR be of opposite signs? What is v1? And how is it equal to v2? My biggest problem is the source of v1 since the ring is not having vertical displacement, then what is v1?
19. ### Stabilizer Leg Linear Actuator Force to Jack up a Truck's rear tyres
Hi, I previously posted about the statically indeterminate truck problem. Thank you to everyone who helped me. However, I now realised that isn't the problem I need to solve. I need to know the force of the linear actuators to lift the rear tyres off the ground. Since the tyres will be...
20. ### What force will be felt by ##B## when a rod is rotated?
We have a rod ##AB## of mass ##m##, a force (perpendicular to AB) is applied at ##A##. I want to know how much force will ##B## going to feel? When ##F_1## is applied at ##A## rod will rotate about its COM (which lies at the Center) and hence the point ##B## will also move (a little downwards...
21. ### Confusion on the concept of point of rotation
--no explanation as conceptual error--
22. ### Mathematically Modeling a Rolling Body with Slipping
Basically, I want to know if my assumptions and workings are correct. This is how I see this situation. First, I'm viewing this body as a series of disconnected points, like I have in this animation I made, modeling purely rolling motion. Modeling the body like that worked in that case, and...
23. ### Finding the angular acceleration of a flywheel
I have solved part a using the conservation of energy, getting a (correct) answer of 47.9 km/h, but I am unable to make headway with part b. Based on the flywheel rotating at 237rev/s when the car is moving at 86.5 km/h, I obtained omega = (237*2pi)v/24=62v. Differentiating both sides should...
24. ### Man rotating in a merry-go-round and grabbing a pendulum
Where: 1) ##A## is the translational acceleration, ##\Omega## the angular velocity and ##\dot \Omega## the angular acceleration (all relative to the inertial frame attached to the ground ##F##). 2) ##r'##, ##v'## and ##a'## are the position, velocity and acceleration vectors, all relative to...
25. ### Rotational and translational motion
A Uniform rod AB of length 7m is undergoing combined motion such that, at some instant, velocities at top most point A is perpendicular to the rod and magnitude is 11 m/s. The mid point/ centre of mass ,say C, has a velocity of 3 m/s and is also perpendicular to the rod. If both the velocities...
26. ### Rotating pendulum
is this eqn correct
27. ### Determine the acceleration of the cylinder axis if there is no slip
So I first wrote the moment of inertia of the cylinder, since it says that it is thin-walled, I think that its moment of inertia is ##I=\eta mR^2##. After that I wrote the sum of torques, I think that there are three forces that cause torque, the two forces of friction, the one caused by the...
28. ### Find the acceleration and the work done by a force pulling a spool?
I already solved the first part, but according the my book, the answer isn't quite correct. This is what I did. Finally, I ended up with ##a=\frac{F(r-R\cos\alpha)}{Rm(\gamma+1)}##. But according to my book, the answer is ##a=\frac{F(\cos\alpha-\frac{r}{R})}{m(1+\gamma)}##, what am I doing...
29. ### Rotational Movement of a Disc
I am doing a project, but am struggling to find relationships of proportionality or formulae between my dependent variables (angular velocity, displacement, acceleration of the disc and kinetic energy of the system) and my independent variables (falling masses and then the number of winds) or...
30. ### Friction between two disks
Homework Statement This problem was originally posted on Physics Problems Q&A: http://physics.qandaexchange.com/?qa=616/friction-between-two-disks Homework Equations Second Newton's law for rotation: $$\tau = I \alpha = RF$$ The Attempt at a Solution I tried to solve this problem as... |
# Breadth first search coding of multitype forests with application to Lamperti representation
Abstract : We obtain a bijection between some set of multidimensional sequences and this of $d$-type plane forests which is based on the breadth first search algorithm. This coding sequence is related to the sequence of population sizes indexed by the generations, through a Lamperti type transformation. The same transformation in then obtained in continuous time for multitype branching processes with discrete values. We show that any such process can be obtained from a $d^2$ dimensional compound Poisson process time changed by some integral functional. Our proof bears on the discretisation of branching forests with edge lengths.
Keywords :
Type de document :
Pré-publication, Document de travail
2014
Domaine :
Littérature citée [9 références]
https://hal.archives-ouvertes.fr/hal-01070585
Contributeur : Loïc Chaumont <>
Soumis le : mercredi 1 octobre 2014 - 17:09:08
Dernière modification le : mercredi 19 décembre 2018 - 14:08:04
Document(s) archivé(s) le : vendredi 2 janvier 2015 - 11:32:15
### Fichier
L-Chaumont.pdf
Fichiers produits par l'(les) auteur(s)
### Identifiants
• HAL Id : hal-01070585, version 1
### Citation
Loïc Chaumont. Breadth first search coding of multitype forests with application to Lamperti representation. 2014. 〈hal-01070585〉
### Métriques
Consultations de la notice
## 212
Téléchargements de fichiers |
Subsets and Splits