text:
# Approximate the Fransén-Robinson constant

Given an input n, output the value of the Fransén-Robinson constant with n digits after the decimal place, with rounding.

# Rules

• You may assume that all inputs are integers between 1 and 60.
• You may not store any related values - the constant must be calculated, not recalled.
• Rounding must be done with the following criteria:
• If the digit following the final digit is less than five, the final digit must remain the same.
• If the digit following the final digit is greater than or equal to five, the final digit must be incremented by one.
• You must only output the first n+1 digits.
• Standard loopholes apply.

# Test Cases

>>> f(0)
3

>>> f(1)
2.8

>>> f(11)
2.80777024203

>>> f(50)
2.80777024202851936522150118655777293230808592093020

>>> f(59)
2.80777024202851936522150118655777293230808592093019829122005

>>> f(60)
2.807770242028519365221501186557772932308085920930198291220055

• What if you do not have support for arbitrary precision floats? – flawr May 27 '16 at 22:10
• @flawr I suppose that the language would have to use some form of string concatenation or similar. Otherwise, it may not be the language for this challenge. – Addison Crump May 27 '16 at 22:11
• Too bad, that basically only leaves us with hardcoding the numbers. PS: Why don't you add f(60) to the test cases? That way participants wouldn't have to fetch it externally=) – flawr May 27 '16 at 22:14
• @flawr Hardcoding is disallowed by rule 2. – Addison Crump May 27 '16 at 22:15
• Are trailing zeroes ok? – Mego May 27 '16 at 23:41

## Mathematica, 443936 25 UTF-8 bytes

• -5 bytes thanks to Sp3000
• -3 bytes thanks to kennytm
• -11 bytes thanks to senegrom

Crossed out 44 is still regular 44!!

N[∫1/x!{x,-1,∞},#+1]&

Example:

f=N[∫1/x!{x,-1,∞},#+1]&
f[2]

Outputs 2.81.

Explanation

N[               , # + 1]
∫1/x!{x,-1,∞}

First step takes Numeric of the rest, with # (first parameter) + 1 precision. ! (factorial) does what you'd expect. {x, -1, Infinity} sets the bounds for the (strangely formatted) Integral.

• I can't test this, so I assume this rounds correctly? – Addison Crump May 27 '16 at 23:03
• @VTCAKAVSMoACE I checked for n = 60, it rounds correctly. (The 61st digit is an 8). You can look at Wolfram's docs for N. – NoOneIsHere May 27 '16 at 23:04
• Coolio. Just checking. – Addison Crump May 27 '16 at 23:04
• You can probably use a literal ∞ in place of Infinity. I'd suggest dividing by 0, if that didn't produce ComplexInfinity instead... – Sp3000 May 28 '16 at 4:44
• try N[∫1/x!{x,-1,∞},#+1]& where  is Unicode-F74C; displays as 𝕕 in Mathematica. (note that the space before & is also not necessary...) – senegrom Jun 2 '16 at 11:19


text:
# Equivalence Relation/Examples/Non-Equivalence/People of Different Age

## Example of Relation which is not Equivalence

Let $P$ be the set of people.

Let $\sim$ be the relation on $P$ defined as:

$\forall \tuple {x, y} \in P \times P: x \sim y \iff \text { the age of$x$and$y$on their last birthdays was not the same}$

Then $\sim$ is not an equivalence relation.

## Proof

$\sim$ is antireflexive, as everybody is the same age as themselves.
$\sim$ is symmetric, as two people are either the same age or they are not.
$\sim$ is not transitive, because if $a \sim b$ and $b \sim c$, it is impossible to say whether $a \sim c$.

$\blacksquare$

format: plain


text:
# Cross-Device FL

## Background

A typical FL scenario is cross-device FL, which is pioneered by Google [1], and several efforts have been devoted to consumer applications such as mobile keyboard assistants [1,2,3,4] and audio keyword spotting [5,6,7].

The cross-device FL setting usually contains the following charateristics:

• massively parallel processing:  there can be 10^4  ~ 10^10 mobile or IoT devices in an FL course;
• un-balanced and diverse local data:  clients (devices) usually have heterogeneous data in terms of data quantity and data distributions;
• limited client-end resources: the client devices usually have limited hardware and communication resources that are much weaker than cloud servers. Low latency and low costs in storage, computation, and communication are much-needed in cross-device FL applications.

As the following figure shows, a typical cross-device FL process adopts a centralized network topology and involves the following repeated steps:

1. Server broadcasts the intermediate exchange information (usually the global model weights) and (optional) the clients-end FL program to selected clients.
2. The selected clients download the information from the server, and execute local learning based on the private local data, the FL programs, and the messages from the server.
3. The selected clients upload the local update information such as model gradients to the server.
4. The server collects and aggregates the update information from clients, and applies the updates into the intermediate exchange information (the shared global) for next-round federation.

Next we show how to run a cross-device FL simulation for next-character/word prediction task with our framework.

## Example: LSTM on Shakespeare dataset

Next-character/word prediction is a classic NLP task as it can be applied in many consumer applications and appropriately be modeled by statistical language models, we show how to achieve the cross-device FL simulation for this task.

• Here we implement a simple LSTM model for next-character prediction: taking an English-character sequence as input, the model learns to predict the next possible character. After registering the modela we can use it by specifying cfg.model.type=lstm and  hyper-parameters such as  cfg.model.in_channels=80, cfg.model.out_channels=80, cfg.model.emd_size=8.  Complete codes are in federatedscope/nlp/model/rnn.py and federatedscope/nlp/model/model_builder.py.
class LSTM(nn.Module):
def __init__(self,
in_channels,
hidden,
out_channels,
n_layers=2,
embed_size=8):
super(LSTM, self).__init__()
self.in_channels = in_channels
self.hidden = hidden
self.embed_size = embed_size
self.out_channels = out_channels
self.n_layers = n_layers

self.encoder = nn.Embedding(in_channels, embed_size)

self.rnn =\
nn.LSTM(
input_size=embed_size,
hidden_size=hidden,
num_layers=n_layers,
batch_first=True
)

self.decoder = nn.Linear(hidden, out_channels)

def forward(self, input_):
encoded = self.encoder(input_)
output, _ = self.rnn(encoded)
output = self.decoder(output)
output = output.permute(0, 2, 1)  # change dimension to (B, C, T)
final_word = output[:, :, -1]
return final_word

• For the dataset, we use the Shakespeare dataset from LEAF, which is built from The Complete Works of William Shakespeare,  and partitioned to ~1100 clients (speaking roles) from 422615.  We can specify the cfg.dataset.type=shakespeare and adjust the fraction of data subsample (cfg.data.sub_sample=0.2), and train/val/test ratio (cfg.data.splits=[0.6,0.2,0.2). Complete NLP data codes are in federatedscope/nlp/dataset.
class LEAF_NLP(LEAF):
"""
LEAF NLP dataset from

leaf.cmu.edu

self:
root (str): root path.
name (str): name of dataset, ‘shakespeare’ or ‘xxx’.
s_frac (float): fraction of the dataset to be used; default=0.3.
tr_frac (float): train set proportion for each task; default=0.8.
val_frac (float): valid set proportion for each task; default=0.0.
"""
def __init__(
self,
root,
name,
s_frac=0.3,
tr_frac=0.8,
val_frac=0.0,
seed=123,
transform=None,
target_transform=None):

• To enable large-scale clients simulation, we provide online aggregator in standalone mode to save the memory, which  maintains only three model objects for the FL server aggregation. We can use this feature by specifying cfg.federate.online_aggr = True and federate.share_local_model=True , more details about this feature can be found in the post “Simulation and Deployment”.
• To handle the non-i.i.d. challenge, FederatedScope supports several SOTA personalization algorithms and easy extension.
• To enable partial clients participation in each FL round, we provide clients sampling feature with various configuration manners: 1) cfg.federate.sample_client_rate, which is in the range (0, 1] and indicates selecting partial clients using random sampling with replacement; 2) cfg.federate.sample_client_num , which is an integer to indicate sample client number at each round.
• With these specification, we can run the experiment with python main.py --cfg federatedscope/nlp/baseline/fedavg_lstm_on_shakespeare.yaml . Other NLP related scripts to run the next-character prediction experiments can be found in federatedscope/nlp/baseline.

## References

[1] McMahan, Brendan, et al. “Communication-efficient learning of deep networks from decentralized data.” AISTATS 2017.

[2] McMahan, H. Brendan, et al. “Learning differentially private recurrent language models.” ICLR 2018.

[3] Hard, Andrew, et al. “Federated learning for mobile keyboard prediction.” arXiv 2018.

[4] Chen, Mingqing, et al. “Federated learning of n-gram language models.” ACL 2019.

[5] Dimitriadis, Dimitrios, et al. “A federated approach in training acoustic models.” INTERSPEECH 2020.

[6] Cui, Xiaodong, Songtao Lu, and Brian Kingsbury. “Federated Acoustic Modeling for Automatic Speech Recognition.” ICASSP 2021.

[7] Apple. Designing for privacy (video and slide deck). Apple WWDC, https://developer.apple.com/ videos/play/wwdc2019/708, 2019.

Updated:


text:
## Formal appendix

Some formal machinery was introduced in section 1.1. Refer back to that section for definitions. Recall that the objects of belief are an algebra of subsets of some set of states $$\Omega$$.

### 1. Properties of strength of belief

We are interested in strength of belief and thus in some sort of graded notion of belief. One straightforward and popular way to represent strength of belief is with a function that maps the objects of belief to real numbers: bigger numbers represent more strongly believed sentences. Let’s consider a function, $$b$$, from subsets of $$\Omega$$ to real numbers. In this section I outline a few properties we might want these numerical representations of belief to satisfy (see also Huber 2014).

By convention, let $$b(\Omega) = 1$$ and $$b(\emptyset) = 0$$. It seems reasonable to suppose that your beliefs in other sentences are bounded above and below by these expressions: it would be odd if there were something you believed more strongly than the necessary event, or less strongly than the impossible event. Call this property—$$b(\emptyset) \le b(X) \le b(\Omega)$$ for all $$X$$—boundedness.

If $$X$$ is always true whenever $$Y$$ is, then it seems sensible to require that you believe $$X$$ at least as much as you do $$Y$$. Call this property—if $$Y \subseteq X$$ then $$b(Y)\le b(X)$$—monotonicity.

Consider the following property: If $$X$$ and $$Y$$ are incompatible—if $$X \cap Y = \emptyset$$—then $$b(X\cup Y) \ge b(X) + b(Y)$$. This property is called superadditivity. If the “$$\ge$$” is replaced by a “$$\le$$” we have the property of subadditivity.

A slight strengthening of superadditivity gives us 2-monotone: $$b(X \cup Y) \ge b(X) + b(Y) - b(X \cap Y)$$. It is straightforward to show that this entails superadditivity, and only a little more work to show that the converse is false.

A further strengthening of this idea is n-monotone. This is slightly more complicated than the previous ones.

$b\left(\bigcup_{i=1}^{n}X_i\right) \ge \sum_{i=1}^{n} \sum_{I\subseteq \{1,\ldots,n\},\mid I\mid =i} (-1)^{i+1_b} \left(\bigcap_{j\in I} X_j\right)$

Let’s break this down. On the left hand side, we are constraining belief in unions of $$n$$ events. How are we constraining them? Look at the inner summation on the right hand side. This is the sum of all the $$i$$-event intersections. If $$i$$ is even, we take each of these away, if $$i$$ is odd, we add them. The outer sum ranges over $$i$$. So we add the one member intersections, take away the two element intersections, add the three element intersections, and so on up to $$n$$. If $$n=2$$ then we have exactly the formula we had above for 2-monotone. If $$b$$ is $$n$$-monotone, then it is $$(n-1)$$-monotone. If $$b$$ is $$n$$-monotone for all $$n$$, then $$b$$ is called infinite monotone or totally monotone.

One final property is additivity which results from replacing the inequality in the description of superadditivity with an equality: if $$X$$ and $$Y$$ are incompatible, then $$b(X\cup Y) = b(X) + b(Y)$$. A bounded, monotonic function on an algebra of events is called a capacity. A bounded, infinite monotone function on an algebra of events is called a belief function. A bounded, additive function on an algebra of events is a probability function. Belief functions and capacities represent one way of going beyond orthodox probability theory.

One might want to move beyond orthodox probability theory by relaxing the constraint that degree of belief be represented by a real valued function. One might instead take belief to be represented by a function that maps events to intervals of the real line, or to sets of real numbers (Weichselberger 2000). These approaches can, to some extent, be subsumed under the more general way of thinking about imprecise belief using sets of probabilities that we encountered in section 1.1, where your credal state is represented by a set of probability functions $$P$$. Recall that your lower envelope of $$X$$ is: $$\underline{P}(X)=\inf P(X)$$; and your upper envelope is $$\overline{P}(X)=\sup P(X)$$. $$\underline{P}$$ is a superadditive capacity, $$\overline{P}$$ is a subadditive capacity.

This brief survey doesn’t come close to mapping out the whole range of possible representations of uncertainty (but see Halpern 2003; Haenni et al. 2011; Augustin et al. 2014; Huber 2014) There is, however, a philosophical tradition that puts sets of probabilities and belief functions foremost, and this article is primarily about that tradition. Credal sets are also a very general theory that subsumes many of the other representations. So in what follows the discussion will be in terms of sets of probability functions.

One might wonder whether taking representors to be sets of conditional probabilities as the basic item might not be a better way to do things. Hájek (2003) argues that conditional probabilities should be taken to be the basic entity, and unconditional probabilities should be defined out of them. In what follows, this point won’t really make any difference, so I will continue to talk mostly of unconditional probabilities. Bear in mind that these are “really” conditional probabilities conditioned on the tautology.

### 2. The betting justification of IP

Bruno de Finetti justified that your degrees of belief should have the structure of a probability function in the following way. Belief is understood as a summary of your attitudes to gambles. That is, belief is what determines your dispositions to choose among bets, and thus determines your betting behaviour. He showed that if you satisfy some reasonable constraints on how your attitudes to gambles are structured, then your degrees of belief are, in a certain sense, probabilistic (de Finetti 1964; 1990 [1974]).

The insight behind de Finetti’s approach was that your attitudes to how likely various events are could be read off your attitudes to gambles. Recall that gambles are bounded real valued functions (Troffaes and de Cooman (2014) extend the theory to unbounded gambles). Of particular interest are the indicator functions that output 1 if the proposition in question is true and 0 otherwise.

De Finetti essentially appealed to the claim that if you are unwilling to buy a bet at a particular price, you must be happy to sell the bet for that price. This was one of his criteria of “coherence”. C.A.B. Smith questioned this assumption (Smith 1961) and Peter Walley built an extremely powerful and rich theory on the basis of these insights (Walley 1991). This provides a nice foundation for IP.

There’s quite a lot of set up required here, but the punchline is worth it. If we assume that you are neither risk seeking nor risk averse, and that the gambles are denominated in some currency such that your utility is linear in that currency, then your attitude about the contingencies can be read off your attitude about gambles in a straightforward way. Before we explain this, we add some structure to the set of gambles. This presentation follows Quaeghebeur (2014). Call $$\mathcal{L}$$ the set of bounded real valued functions on $$\Omega$$. If $$f,g\in \mathcal{L}$$ are gambles, then so is their “pointwise sum” $$(f+g)(\omega) = f(\omega)+g(\omega)$$ for all $$\omega$$. For a real number $$\lambda$$, if $$f$$ is a gamble then so is $$(\lambda f)(\omega) = \lambda f(\omega)$$ for all $$\omega$$. Let real number $$\lambda$$ stand also for the constant gamble that pays out $$\lambda$$: $$\lambda(\omega) = \lambda$$ for all $$\omega$$.

Consider the set of desirable gambles $$D$$. These are gambles that you would be willing to accept if they were offered to you. Which gambles you would willingly accept reflects your opinions in the following way, the more you would be willing to pay for a gamble $$f$$, the more likely you consider the contingencies where $$f$$ gets you a good prize. Consider the indicator function $$I_X$$ for an event $$X$$. This is the function that outputs 1 if $$\omega$$ is in $$X$$ and 0 otherwise. The more you would be willing to pay for the gamble $$I_X$$, the more likely you take $$X$$ to be. In what follows I will use $$X$$ interchangeably for the event and its indicator function. Being willing to pay $$\alpha$$ for the gamble $$f$$ is the same as finding the gamble $$f-\alpha$$ acceptable. Consider the following function: $$\underline{E}(f) = \sup\{\alpha \in \mathbb{R}, f-\alpha \in D\}$$. Call this your “lower prevision” for $$f$$. That is, your lower prevision for the gamble $$f$$ is the largest amount you would pay to receive the gamble $$f$$. We can also define $$\overline{E}(f) = \inf\{\alpha \in\mathbb{R}, \alpha - f \in D\}$$: the smallest amount you’d be willing to sell the gamble $$f$$ for. These two functions are conjugate in the sense that $$\underline{E}(f) = - \overline{E}(-f)$$. We will be particularly interested in lower previsions of indicator functions: these directly reflect how likely you think the event in question is. $$X-\alpha$$ is effectively a unit bet on $$X$$ that costs you $$\alpha$$. De Finetti focussed on the case where if $$f-\alpha \notin D$$ then $$\alpha - f \in D$$ for all $$f$$ and all $$\alpha$$. Then $$\underline{E}(f) = \overline{E}(f)$$ and we can describe this number—call it $$E(f)$$—as your “fair price” for the gamble $$f$$. It’s the price that makes you indifferent between buying and selling gamble $$f$$. Smith (1961) allowed your fair selling price and your fair buying price to differ.

Here’s how we now proceed. We describe some reasonable “coherence constraints” on sets of desirable gambles, and then describe what structure such constraints put on $$\underline{E}$$. $$D$$ should be closed under addition. That is, if $$f,g\in D$$ then $$f + g\in D$$. Or, more succinctly, $$D + D \subseteq D$$. $$D$$ should also be closed under multiplication by a positive constant $$\lambda >0$$: if $$f\in D$$ then $$\lambda f \in D$$, or more succinctly $$\lambda D = D$$. Call $$\mathcal{L}^+$$ the set of gambles that are always positive, that is $$f\in\mathcal{L}^+$$ iff $$f(\omega) > 0$$ for all $$\omega$$. Likewise $$\mathcal{L}^-$$ is the set of everywhere negative gambles. Our third condition is that always positive gambles should be in $$D$$: $$\mathcal{L}^+ \subseteq D$$. And fourth, no always negative gambles should be in $$D$$: $$\mathcal{L}^- \cap D = \emptyset$$.

Now, $$D$$ is a coherent set of gambles—i.e., it satisfies the above four properties—if and only if $$\underline{E}$$ has the following structure:

• $$\underline{E}(f) \ge \inf_{\Omega} \{f(\omega), \omega\in\Omega\}$$
• $$\underline{E}(f+g) \ge \underline{E}(f) + \underline{E}(g)$$
• if $$\lambda >0$$ then $$\underline{E}(\lambda f) = \lambda \underline{E}(f)$$

Call a lower prevision coherent if and only if it satisfies these properties. Call a set of gambles $$D$$ maximal when $$f\in D$$ iff $$-f\notin D$$ for all $$f\neq 0$$. $$\underline{E} = \overline{E}$$ iff $$D$$ is coherent and maximal. The above is, strictly speaking, not quite true. There are some subtleties about topological properties of sets of desirable gambles—whether bets on the boundary of $$D$$ are in $$D$$—that preclude the link being quite this straightforward, but these need not detain us (Quaeghebeur 2014). When $$\underline{E} = \overline{E}$$, we call this function, $$E$$, a linear prevision because such previsions satisfy the following properties:

• $$E(f) \ge \inf_{\Omega} \{f(\omega), \omega\in\Omega\}$$
• $$E(f+g) = E(f) + E(g)$$
• and therefore $$E(\lambda f) = \lambda E(f)$$ for all $$\lambda \in\mathbb{R}$$

Now, here is the punchline: if we restrict attention to linear previsions of indicator functions, we get exactly the probability functions! (De Finetti didn’t use the “sets of desirable gambles” approach to coherence, but rather something almost equivalent to it, see Quaeghebeur (2014) and Miranda and de Cooman (2014) for details). The same move in the case of lower previsions—restricting attention to indicator functions—yields lower probabilities. As well as Smith, P.M. Williams was another author to consider weakening de Finetti’s requirement in 1975, although the paper was published only in 2007 (Williams 2007; Vicig, Zaffalon, and Cozman 2007). Building on Smith’s and Williams’ insight, Walley (1991) builds a rich and sophisticated theory of statistical inference on lower previsions and lower probabilities. See Augustin et al. (2014) for a modern introduction to IP, and Vicig and Seidenfeld (2012) for a more careful discussion of the history of IP. Because of the conjugacy of the upper and lower probabilities—because $$\underline{P}(X) = 1-\overline{P}(\neg X)$$—the lower probability tells us all we need to know about your belief state. In fact, coherent $$\underline{P}$$ and $$\overline{P}$$ are related as described in Figure F1 (Walley 1991: 84 ff).

An arrow between two expressions means that the higher one is greater than or equal to the lower one. The solid lines highlight the nontrivial inequalities. If $$A$$ and $$B$$ are incompatible, it is clear that this tangle of inequalities simplifies to: $\overline{P}(A) + \overline{P}(B) \ge \overline{P}(A\cup B) \ge \overline{P}(A) + \underline{P}(B) \ge \underline{P}(A\cup B) \ge \underline{P}(A) + \underline{P}(B)$

### 3. From lower probabilities to credal sets

To see how the above foundation relates to the credal sets approach, we need a final couple of formal tools. Say that prevision $$\underline{E}$$ dominates $$\underline{E'}$$ if, for all $$f\in \mathcal{L}$$, $$\underline{E}(f) \ge \underline{E'}(f)$$. For a lower prevision $$\underline{E}$$, define the envelope of $$\underline{E}$$ as the set of linear previsions that dominate $$\underline{E}$$. Call this $$M(\underline{E})$$. For a set of linear previsions $$M$$, define their lower envelope as $$\inf\{E(f), E\in M\}$$. The envelope theorem states that $$\underline{E}$$ is coherent iff $$\underline{E}$$ is the lower envelope of $$M(\underline{E})$$. Restricted to the case of lower previsions of indicator functions—lower probabilities—this states that your betting behaviour is coherent if and only if your fair buying prices are the lower envelope of a set of probabilities.

This puts the imprecise probabilities approach on almost the same footing as the precise probability approach in that we have an exact analogue of de Finetti’s version of the so-called Dutch book theorem: the theorem has less demanding—more reasonable—premises, and the conclusion is that rational agents’ beliefs should have the structure of a lower probability and thus through the envelope theorem, the structure of a credal set. One disanalogy between de Finetti’s result and the IP one-sided result is that your precise fair prices determine your probability function whereas in the one-sided betting case, the coherence requirements only constrain your representor. That is, a complete set of coherent fair prices pick out a unique probability, while several distinct sets of probabilities can give rise to the same set of one-sided previsions.


text:
# $\int_{\bigcup_{n=1}^{\infty}E_n}f=\sum_{n=1}^{\infty}\int_{E_n}f$ given $f$ positive and measurable

I'm learning about measure theory (specifically Lebesgue intregation) and need help with the following problem:

Let $f:\mathbb{R}\rightarrow[0,+\infty)$ be measurable and let $\{E_n\}$ be a collection of pairwise disjoint measurable sets. Prove that $\int_{\bigcup_{n=1}^{\infty}E_n}f=\sum_{n=1}^{\infty}\int_{E_n}f.$

For convenience I set $E=\bigcup_{n=1}^{\infty}E_n$.

This problem looks like an application of the monotone convergence theorem but I'm having a hard time applying it. I need to find a sequence of functions that is positive an nondecreasing but I don't know how to define it.

Let $E=\bigcup_{n=1}^{\infty}E_n$, then $f\chi_E=\sum_{n=1}^{\infty}f\chi_{E_n}$, hence $$\int_Ef=\int_{\mathbb{R}}f\chi_E=\int_{\mathbb{R}}\sum_{n=1}^{\infty}f\chi_{E_n}=\sum_{n=1}^{\infty}\int_{\mathbb{R}}f\chi_{E_n}=\sum_{n=1}^{\infty}\int_{E_n}f$$ The monotone convergence theorem is what allows us to interchange the sum and integral, with $g_m=\sum_{n=1}^mf\chi_{E_n}$ being the non-decreasing sequence.

• Thank you for your clear explanation. I think there is a typo in your last sentence with the indexes in the sum. Could you verify it so I can accept your answer? – glpsx Apr 13 '16 at 12:12
• Where's the typo? It seems ok to me. – carmichael561 Apr 13 '16 at 15:47
• You are correct, sorry about that. I got confused by the fact that we are summing from $n = 1$ to $m$ for $g_m$. Thank you for your clear explanation (and time), much appreciated. – glpsx Apr 13 '16 at 15:56

Set $$f_N=\sum_{n=1}^{N} f\chi_{E_n}$$.

As $$f\chi_{E_n}\geq 0$$ for each $$n$$, $$f_1\leq f_2 \leq f_3 \leq f_4....$$.

Now observe that $$f_n \rightarrow f \chi_{E}$$ as $$n\rightarrow \infty$$, where $$E=\bigcup_{n=1}^{\infty}E_n$$. Thus by MCT we obtain the following equality:

$$\lim_{n} \int f_n d\mu= \int f\chi_{E} d\mu$$.

Which is the conclusion you seek.


text:
## Akshay_Budhkar 4 years ago satellite plz help with the probability question!!!!

1. anonymous

yup

2. Akshay_Budhkar
3. Akshay_Budhkar

try it hafiz..

4. anonymous

hello

5. Akshay_Budhkar

hello.. i tried it.. no use

6. anonymous

7. Akshay_Budhkar

we can solve here

8. Akshay_Budhkar

a rod is divided in 4 parts.. probability that it is a quadrilateral?

9. anonymous

ok it is the same problem as last time yes?

10. Akshay_Budhkar

yes

11. anonymous

not sure what you mean. i meant use the second proof in the paper i sent you. not the volume one, but the line segment one.

12. anonymous

start an page 186 at the line "construction of an n-gon will be impossible of AB is longer than 1/2" do you see where i mean?

13. anonymous

of course replace n by 4

14. anonymous

i am here.

15. anonymous

i may be easier to do this in chat, or quicker, but i can write the idea of the proof here. i am just mimicking the proof i sent you in the pfd .

16. Akshay_Budhkar

you can come in chat?

17. anonymous

you have a "rod" stick whatever and you are going to break it into 4 parts by picking 3 points uniformly at random, and the question is what is the probability that you can make a quadrilateral

18. Akshay_Budhkar

yes

19. anonymous

you already know the answer is 1/2 so far correct. so we just need the proof

20. Akshay_Budhkar

yes

21. anonymous

first trick to to say that the rod has length one so we can dispense with ratios

22. Akshay_Budhkar

ya

23. anonymous

so it looks something like this 0 --------------a-----------------b--------------------------c-------------------------1 where a, b, c are the points chosen at random to break up the rod

24. anonymous

now the question is "when would you not get a quadrilateral\"

25. anonymous

now i am just reading along what i sent, replacing n by 4

26. anonymous

construction of a quadtrilateral will be impossible if $\overline{0a}$ is bigger than one half, i.e. if all three points are to the right of the midpoint of the segment. the probability that one is to the right is 1/2 and all three to the right would be $(\frac{1}{2})^3$

27. anonymous

the same is true for the other three segments, and the probability that each of them is bigger than one half is also 1/8 so the probability of failure is 4 times 1/8 = 1/2 and therefore so is the probability of success.


text:
# Garmin Forerunner 220 review

After a few weeks of running with my new Garmin Forerunner 220, I think I can finally write up a little review for it. As you may recall, this is my first running watch–actually, it’s the first watch of any kind I’ve owned in like thirteen years–and I was a bit on the fence about the purchase. Obviously, I decided to go for it!

Hardware

Overall, the hardware is pretty great. I’m really happy with it. It’s plasticy, but it feels well made and the purple and white color scheme looks cute (though, I wish there were more than just the two color options).

I was a little worried about the watch feeling a bit big, but I was pleasantly surprised to find it actually feels great on my wrist. By no means is it small, but it doesn’t look or feel huge. Though, I have big hands and wrists so I may not be the best judge of this. For me, it fits great. Snug so it stays in place, but not uncomfortably tight. A small, but really awesome feature of band/strap is the inside of the keeper loop (this is actually what it’s called, I looked it up!), there are three little bumps to help keep it in place instead of sliding and causing the strap to pop out. Nice attention to detail here.

The screen is bright and easily readable on even the sunniest of days. Though, given the overall size of the watch, a bigger screen would have been nice, it’s plenty big enough to quickly read while running. And the buttons are big and easy to press while on the move.

The beeps are plenty loud to hear, even when running down the side of a trafficy road, and the vibration is strong enough to never miss.

One of the biggest questions with GPS watches is how quickly does it get a satellite lock? My experience has been that’s it’s very quick. Most of the time, I can turn it on and put it down on the couch while I put my shoes on and by the time both shoes are on and tied, it’s ready to go. It’s snappy even when inside and not right in front of a window. The GPS also seems to measure most runs very consistently.

While the battery life is great, it lasts for a full week of running between charges, the one knock I have here is the charger. The watch comes with a little USB cradle that charges and syncs the watch with your phone. Unfortunately, Garmin chose not to include a wall wart to plug the USB cable into. You’re forced to charge the watch through your computer, unless, of course, you’re like me and have ten or so spare USB wall plugs littering up your house. If you don’t have any spare ones, you’re stuck with your computer or sharing the one for your phone. This may not be an issue most of the time, but runners are known to travel for races. These days, fewer and fewer people bring laptops when they travel and instead opt for a tablet. For many people, this will mean not being able to charge your watch and phone (and tablet) at the same time. Many people may not have a problem with this and it’s easily remedied for a few bucks on Amazon, but Garmin still should have included it.

Software

On the software side, things are a bit different for me. Here, things are heavily lacking. Using the 220 feels like a throwback to my old Nokia 5125 dumbphone from 2000. The menus are reasonably clean and mostly intuitive, but everything feels overly cumbersome to do some things. A lot of stuff seems to take an extra button click than should be necessary.

The biggest thing that drives me nuts about the watch is not being able to use both auto lapping and manual lapping together. The omission of this feature is completely mind-boggling to me. So much so that I didn’t find out I couldn’t do it until after I tried to do it during the Firecracker 4-miler. I was hitting the lap button at each mile marker and not looking down to see what my watch was saying so I didn’t even notice it was totally screwing everything up because I still had auto lap on. After the race, I had a mess to sort through.

To make matters worse, there is no way to access the mile splits if you’ve screwed this up. At the absolute least, the watch should be able to give you mile (or kilometer splits) no matter what else you do. These should be entirely different from any sort of lapping and always available as a separate list. It’s not as if this data doesn’t exist within the watch. Each GPS data point is stored anyway.

My issue here goes beyond just saving my butt if I accidentally hit the lap button and screw up my splits (which I’ve done on more than one occasion since the race). There are regular use cases for it as well. Often times, I want to be able to see data in two different ways. For some runs, I’d like to be able to hit the lap button right in the middle so I can easily see the difference between the first and second half of my run without having to add up all the mile times manually. Or, what if I want to run down to a track near my house, do a few laps, and run back. It’s entirely likely that I’d want to manually lap each lap around the track so I can check on it later, but still have my mile splits for my overall run. Sure, I could stop running when I get to the track and start a separate workout and end up with three runs in my watch (one for the run there, one for the track, and one for the way home), but I don’t want that, nor should I be forced to do it in such a sloppy way. Even if I’m not running down to the track, if I program a workout for the watch to prompt me though, I have to give up having mile splits for that run.

The more I think about this, the angrier it makes me. It’s not as if this is a difficult engineering issue. I can’t claim to know the inner workings of Garmin’s code, but if enabling the separation of manual lapping, auto lapping, and splits based on default distance unit is more than ten minutes worth of programming, someone’s doing it wrong at Garmin. Even free smartphone apps can do this. The person (or people) at Garmin responsible for this need to be slapped across the face. It’s a classic case of a developer not taking a moment to think from the user’s perspective.

Okay, I have to move on before I throw someone through the window.

Why does the watch not include builtin shoe tracking? We all should be tracking mileage on shoes so we can retire them early, why would it not be built into the watch? I’m sure we all have our own ways of keeping track of this, I personally keep track with DailyMile. However, I don’t always enter my runs into DailyMile immediately. With the iPhone app I used to use, this wasn’t a problem. It kept track of which shoe I wore on each run so I’d always have access to this information. Now, I have to enter my run into DailyMile immediately so I don’t forget which shoes I wore. I don’t know about you, but when I get home from a run, I’m not typically running right to my computer. Most of the time, it goes something like this…rip off shoes and clothes, set up a Nuun, eat one of those cheapo freezer pop if it’s a warm day, chug a cup of water while waiting for the Nuun to finish dissolving, drink my Nuun, grab something to nibble on, and then go find dry clothes to put on. By the time I do all that, it’s usually time to start/eat dinner/breakfast or get ready for work or collapse lifelessly on the couch. Most runs don’t get logged in DailyMile until the next morning…or even the Monday morning of the following week as I scramble to get all my miles logged before the weekly email goes out. At this point, I don’t always remember which shoes I wore on which run. The watch should be able to store this basic bit of information for me without me having to remember later on. Again, this is something free smartphone apps do.

There are some things to like with the software on the watch itself and I don’t want to gloss over them. I actually like the fact that the “current pace” is rounded to five second increments. My wife used to have a Forerunner 205 (which we replaced with the 220 at the same time I bought mine). I ran with it a couple times and it would drive me nuts that the “current pace” was an exact time. I always know to take this measurement with a grain of salt, but seeing it jumping around was always annoying. Five seconds is good enough for me. I also like that you can configure what data shows on the screen and how it’s displayed. I only wish you could also configure the screen for when you’re doing a workout too.

I do like that there’s an accompanying smartphone app that can be used to communicate with the app via bluetooth. This is actually a ton more convenient than having to plug into your computer to get the data off your watch. However, the app isn’t exactly all that great. Why can I not create and edit workouts on the app? Why am I forced to go to the Garmin Connect website on my computer for this? Yet again, this is something free smartphone running apps can do without any trouble at all. Why can’t I configure watch settings via the app? Being able to go through all the stuff in the settings menu via the Garmin Connect app on my phone would be a ton quicker than doing it on the phone itself. This is not some radical concept in 2014. We have thermostats, household appliances…even lightbulbs that allow you to do this. This should be standard on a $250 smartphone-connected watch. What it comes down to is there is no excuse for the app to be a read-only window into your watch and the data you’ve set up on the website. Moving onto the computer, whyyyyy am I forced to physically plug the watch into my computer to sync it when it can connect to my phone via bluetooth? Why can I not also use bluetooth with my computer? This is absurd. And then, when I do plug it into my computer the watch is inoperable. If I want to change something on the watch, I need to unplug it first. This means that even if I’m just charging the watch, I can’t use it to look at data or change settings or do anything. What even is this? The Garmin Connect site itself isn’t actually terrible. The site was very recently redone, which is good because the version that was there when I first got the watch was pretty bad. Garmin Connect isn’t exactly amazing now, it’s got a bit too much going on, but it’s functional enough to do what I’m asking of it. However, it seems as though Garmin is hoping you’ll use it to connect with friends and other runners and do a whole bunch of other stuff on there. Yeah, not going to happen. All I want to use it for is setting up workouts and looking at data from my runs. That’s it. Since it works well for that, I’m happy. My biggest complaint is that it doesn’t seem to ever keep you logged in. It asks me to log in every single time I go to the site which is a little maddening. Verdict Now that I’ve gone on for 2,000 words, it’s probably time to wrap this thing up. Ultimately, a lot of people seem to really like this watch. It was highly recommended to me by MANY folks on Twitter and got good reviews around the internet. Unfortunately, for me, I can’t share such enthusiasm. As I mentioned, I love the hardware and I think they pretty much nailed it there, but the software makes me want to curl up in a ball and cry. Okay, that’s a little hyperbolic, but it’s highly disappointing and lacking. At$150, most of it would be forgivable. For \$250…just, no.

Not only can I not recommend the Garmin Forerunner 220, but I wish I could return it. Literally, within the first ten minutes of the package being open, our kitten, Hattie, had already left teeth marks on the band so I think I’m stuck with this thing.

For many runners, these things just may not matter that much, but considering most of the issues I have with this watch have been taken care of long ago by _free_ smartphone apps, I find it to be inexcusable. Garmin spent time adding in all kinds of other little features and building out a website that no one is going to use the way they’d hope instead of focusing on putting core no-brainer features in place. Garmin isn’t knew to this game, they are multiple generations deep in the GPS watch arena, this stuff should be there already.


text:
# Differences

This shows you the differences between two versions of the page.

 — preprints:2002:ttp02-20 [2016/03/17 11:03] (current) Line 1: Line 1: + ====== TTP02-20 Understanding Bottom Production ====== + + + <hidden TTP02-20  Understanding Bottom Production > We describe calculations of $b \overline b$ + production to next-to-next-to-leading order (NNLO) and next-to-next-to-leading + logarithm (NNLL) near threshold in $pp$ interactions.  Our calculations are + in good agreement with the $b \overline b$ total cross section measured by HERA-B.  +  + |**N. Kidonakis, E. Laenen, S. Moch and R. Vogt**  | + |**  Nucl.Phys.  A715 549-552 2003  **  | + | {{preprints:2002:ttp02-20.pdf|PDF}} {{preprints:2002:ttp02-20.ps|PostScript}} [[http://arxiv.org/abs/hep-ph/0208119|arXiv]]   | + | |


text:
Search
Question: CRISPRseek scoring clarification
0
20 months ago by
elspeth.ransom0 wrote:

I am working with the CRISPRseek R package and I am unsure on the meaning of the off target scores.

Please could you clarify how the off-target score is calculated for the summary output (top 5 off target total score) and whether a higher or lower score is better (in terms of having lower chance of off-target effects).

Many Thanks!

modified 13 months ago by Julie Zhu3.8k • written 20 months ago by elspeth.ransom0
1
13 months ago by
Julie Zhu3.8k
United States
Julie Zhu3.8k wrote:

Dawid,

FYI, I have updated the CRISPRseek package (Version: 1.17.5) to handle situations when the input gRNAs do not have any perfect match in the searching genome. I tested the package with your example code and gRNAs. Please let me know how it works out for you. Thanks for the feedback!

Best regards,

Julie

Julie,

Thank you for your help. Is 1.17.5 version available as a devel version on Bioconductor? I can only see 1.17.3 (from 2017-09-05).

Thanks,
Dawid

1
Dawid, Please try to use the following command to download the most recent version. git clone git@git.bioconductor.org:packages/CRISPRseek Best regards, Julie From: "Dawid G. Nowak [bioc]" <noreply@bioconductor.org> Reply-To: "reply+0df74aaa+code@bioconductor.org" <reply+0df74aaa+code@bioconductor.org> Date: Thursday, October 19, 2017 at 4:39 PM To: "Zhu, Lihua (Julie)" <julie.zhu@umassmed.edu> Subject: [bioc] C: CRISPRseek scoring clarification Activity on a post you are following on support.bioconductor.org<https: support.bioconductor.org=""> User Dawid G. Nowak<https: support.bioconductor.org="" u="" 6790=""/> wrote Comment: CRISPRseek scoring clarification<https: support.bioconductor.org="" p="" 93049="" #101857="">: Julie, Thank you for your help. Is 1.17.5 version available as a devel version on Bioconductor? I can only see 1.17.3 (from 2017-09-05). Thanks, Dawid ________________________________ Post tags: crisprseek You may reply via email or visit C: CRISPRseek scoring clarification

Hi Julie,

Thanks it works!

I noticed that OffTarget file doesn't have columns: inExon, inIntron, entrez_id, gene. Is there any particular reason to skip them? Information coming from these columns is still interesting when you design non-targeting guide (negative/scramble control) to see if potential OffTargets are in exon, intron etc. What do you think?

Best regards,

Dawid

1
Dawid, Glad that it works for you. If you set annotateExon = TRUE, txdb and orgAnn, then you should get the annotation information. I removed them for speeding up the test. BTW, I added your example as one of the integration tests in CRISPRseek. Hope it is all right with you. FYI, I changed the value for top1Hit.onTarget.MMdistance2PAM to “perfect match not found” in the summary output when there is no on-target found. I am running the integration tests. I will commit the changes later with version 1.17.6. Best, Julie Best, Julie From: "Dawid G. Nowak [bioc]" <noreply@bioconductor.org> Reply-To: "reply+e3e084e4+code@bioconductor.org" <reply+e3e084e4+code@bioconductor.org> Date: Thursday, October 19, 2017 at 9:54 PM To: "Zhu, Lihua (Julie)" <julie.zhu@umassmed.edu> Subject: [bioc] C: CRISPRseek scoring clarification Activity on a post you are following on support.bioconductor.org<https: support.bioconductor.org=""> User Dawid G. Nowak<https: support.bioconductor.org="" u="" 6790=""/> wrote Comment: CRISPRseek scoring clarification<https: support.bioconductor.org="" p="" 93049="" #101873="">: Hi Julie, Thanks it works! I noticed that OffTarget file doesn't have columns: inExon, inIntron, entrez_id, gene. Is there any particular reason to skip them? Information coming from these columns is still interesting when you design non-targeting guide (negative/scramble control) to see if potential OffTargets are in exon, intron etc. What do you think? Best regards, Dawid ________________________________ Post tags: crisprseek You may reply via email or visit C: CRISPRseek scoring clarification

Dawid

0
20 months ago by
Julie Zhu3.8k
United States
Julie Zhu3.8k wrote:
Elspeth, CRISPRseek adds the topN offtarget scores per user's choice of N (parameter topN.OfftargetTotalScore, default 10 )and outputs the topN.OfftargetTotalScore in the Summary.xls file, e.g., top10.OfftargetTotalScore or top50.OfftargetTotalScore. The rational is that the top off-targets are the most critical ones. The lower topN.OfftargetTotalScore is, the better. For detailed information on individual offtarget score, please look at the OfftargetAnalysis.xls file. BTW, if you are working on spCas9 (gRNA length 20 and PAM = "NGG"), then you can set scoring.method = "CFDscore" to use an improved off target scoring algorithm which ranges from 0 to 1 instead of 0-100 for the Hsu-Zhang method. For detailed parameter setting and references, please type help(offTargetAnalysis) in a R session. Best, Julie From: "elspeth.ransom [bioc]" <noreply@bioconductor.org<mailto:noreply@bioconductor.org>> Reply-To: "reply+8cb73ff9+code@bioconductor.org<mailto:reply+8cb73ff9+code@bioconductor.org>" <reply+8cb73ff9+code@bioconductor.org<mailto:reply+8cb73ff9+code@bioconductor.org>> Date: Friday, February 24, 2017 12:32 PM To: Lihua Julie Zhu <julie.zhu@umassmed.edu<mailto:julie.zhu@umassmed.edu>> Subject: [bioc] CRISPRseek scoring clarification Activity on a post you are following on support.bioconductor.org<https: support.bioconductor.org=""> User elspeth.ransom<https: support.bioconductor.org="" u="" 12442=""/> wrote Question: CRISPRseek scoring clarification<https: support.bioconductor.org="" p="" 93049=""/>: I am working with the CRISPRseek R package and I am unsure on the meaning of the off target scores. Please could you clarify how the off-target score is calculated for the summary output (top 5 off target total score) and whether a higher or lower score is better (in terms of having lower chance of off-target effects). Many Thanks! ________________________________ Post tags: crisprseek You may reply via email or visit CRISPRseek scoring clarification

Hi Julie,

I have a question about "CFDscore". My understanding is that top50.OfftargetTotalScore is calculated by adding adding topN scores together.

I can see my top50.OfftargetTotalScore/top100.OfftargetTotalScore is NA (which I assume no offTargets?). When I look for offTarget at guide with the top10 score NA I can see a a "CFD score" calculated for only one site and I see a number i.e. 0.2. I would assume that top10 would be still calculated but would only contain 0.2 even if there are no other values?

### my code below, I test a set of mine guides

offTargetAnalysis(inputFilePath,

REpatternFile = REpatternFile,
scoring.method = "CFDscore",
format = "fasta",
findgRNAs = FALSE, # important for testing to set FALSE
findgRNAsWithREcutOnly = FALSE, # if FALSE not restr. enzymes
findPairedgRNAOnly = FALSE,
gRNA.name.prefix = "sg.",
orgAnn = orgAnn,
BSgenomeName = BSgenomeName,
txdb = txdb,
chromToSearch= "all", # change here for all to look at all chromosomes
min.gap = 0, max.gap = 20,
max.mismatch = 3,
min.score = 0.1,
topN = 100,
topN.OfftargetTotalScore= 10, # 10 top Offtarget will be calculated
annotateExon = TRUE,
fetchSequence = TRUE, upstream = 250, downstream = 250,
overlap.gRNA.positions = c(17, 18),
PAM.size = 3,
PAM = "NGG",
gRNA.size = 20,
outputDir = outputDir,
overwrite = TRUE)

Hi Dawid, Is this a unique problem with scoring.method = "CFDscore"? Thanks! Best regards, Julie From: "Dawid G. Nowak [bioc]" <noreply@bioconductor.org> Reply-To: "reply+c0630670+code@bioconductor.org" <reply+c0630670+code@bioconductor.org> Date: Tuesday, October 17, 2017 at 1:36 PM To: "Zhu, Lihua (Julie)" <julie.zhu@umassmed.edu> Subject: [bioc] C: CRISPRseek scoring clarification Activity on a post you are following on support.bioconductor.org<https: support.bioconductor.org=""> User Dawid G. Nowak<https: support.bioconductor.org="" u="" 6790=""/> wrote Comment: CRISPRseek scoring clarification<https: support.bioconductor.org="" p="" 93049="" #101727="">: Hi Julie, I have a question about "CFDscore". My understanding is that top50.OfftargetTotalScore is calculated by adding adding topN scores together. I can see my top50.OfftargetTotalScore/top100.OfftargetTotalScore is NA (which I assume no offTargets?). When I look for offTarget at guide with the top10 score NA I can see a a "CFD score" calculated for only one site and I see a number i.e. 0.2. I would assume that top10 would be still calculated but would only contain 0.2 even if there are no other values? ### my code below, I test a set of mine guides offTargetAnalysis(inputFilePath, REpatternFile = REpatternFile, scoring.method = "CFDscore", format = "fasta", findgRNAs = FALSE, # important for testing to set FALSE findgRNAsWithREcutOnly = FALSE, # if FALSE not restr. enzymes findPairedgRNAOnly = FALSE, gRNA.name.prefix = "sg.", orgAnn = orgAnn, BSgenomeName = BSgenomeName, txdb = txdb, chromToSearch= "all", # change here for all to look at all chromosomes min.gap = 0, max.gap = 20, max.mismatch = 3, min.score = 0.1, topN = 100, topN.OfftargetTotalScore= 10, # 10 top Offtarget will be calculated annotateExon = TRUE, fetchSequence = TRUE, upstream = 250, downstream = 250, overlap.gRNA.positions = c(17, 18), PAM.size = 3, PAM = "NGG", gRNA.size = 20, outputDir = outputDir, overwrite = TRUE) ________________________________ Post tags: crisprseek You may reply via email or visit C: CRISPRseek scoring clarification

Hi,

I just tested both scoring methods and I see this situation with NA in both cases. I made some comments below, I started to notice them when I test target and off-target analysis for my specified gRNAs. I use CRISPRseek 1.16.0

 1) When I assign x <-  offTargetAnalysis(), then I can see x$summary but I cannot see anything in Summary.xls created by the package. 2) I also noticed a discrepancy between TopN score calculated in Summary and OfftargetAnalysis., i.e. if I take top5 hits from OfftargetAnalysis and sum up I see a different number than in Summary. Thanks, Dawid # below example of guide that gave me NA scores but scores where still calculated >sg.test2 GACCGGAACGATCTCGCGTANGG ADD REPLYlink written 13 months ago by Dawid G. Nowak10 Dawid, Thanks for testing both scoring methods! It might be an issue with data type. Could you please send me the testing input file, the code and the output?My email is Julie.zhu@umassmed.edu<mailto:julie.zhu@umassmed.edu>. Thanks! Best regards, Julie From: "Dawid G. Nowak [bioc]" <noreply@bioconductor.org> Reply-To: "reply+0ad43044+code@bioconductor.org" <reply+0ad43044+code@bioconductor.org> Date: Tuesday, October 17, 2017 at 4:46 PM To: "Zhu, Lihua (Julie)" <julie.zhu@umassmed.edu> Subject: [bioc] C: CRISPRseek scoring clarification Activity on a post you are following on support.bioconductor.org<https: support.bioconductor.org=""> User Dawid G. Nowak<https: support.bioconductor.org="" u="" 6790=""/> wrote Comment: CRISPRseek scoring clarification<https: support.bioconductor.org="" p="" 93049="" #101731="">: Hi, I just tested both scoring methods and I see this situation with NA in both cases. I made some comments below, I started to notice them when I test target and off-target analysis for my specified gRNAs. I use CRISPRseek 1.16.0 1) When I assign x <- offTargetAnalysis(), then I can see x$summary but I cannot see anything in Summary.xls created by the package. 2) I also noticed a discrepancy between TopN score calculated in Summary and OfftargetAnalysis., i.e. if I take top5 hits from OfftargetAnalysis and sum up I see a different number than in Summary. Thanks, Dawid # below example of guide that gave me NA scores but scores where still calculated >sg.test2 GACCGGAACGATCTCGCGTANGG ________________________________ Post tags: crisprseek You may reply via email or visit C: CRISPRseek scoring clarification
1
Dawid, Thanks for the test script and input! When there is no on-target found for any input gRNAs, summary.xls file will be empty. Also, the topN score is calculated assuming the on-target is present for the gRNA (sum(2nd, Nth)) I am updating the dev code to handle this exception and will post an update in the support site. Thanks again for reporting the issue! Best, Julie

Hi Julie,

I noticed recently for couple tests that  I am getting “NA" for top5OfftargetTotalScore or top10OfftargetTotalScore. I tested guides with NA values for top5OfftargetTotalScore with different online tools and it showed me very low off-target risks. When there is no off-target found for any input gRNAs, summary.xls file will be NA because (sum(2nd=NA,  Nth=NA))?

Thanks,
Dawid

Hi Dawid,

Could you please let me know your session info? If possible, could you please post your code and an example input file? Thanks!

Best regards,

Julie


text:
# Clay derived materials for environmental management

Omonmhenle, Selina Ilunakan (2014). Clay derived materials for environmental management. University of Birmingham. Ph.D.

 Preview
Omonmhenle14PhD.pdf
PDF - Accepted Version

## Abstract

Hydrotalcite-like compounds with Mg$$^2$$$$^+$$/Al$$^3$$$$^+$$ and Zn$$^2$$$$^+$$/Al$$^3$$$$^+$$ cations in the layer at different mole ratios with different anions in the galleries were synthesised in this study. The materials have been characterised by a range of techniques. The influence of layer cations, and interlayer anions, which in turn influences the crystallinity, can affect the properties of the hydrotalcites.
Dodecylsulfate (DS) and dodecylbenzenesulfonate (DBS) anions were intercalated successfully into the galleries and characterisation studies by the same technique that were used for the parent hydrotalcites show that the hydrotalcites structure was maintained and the interlayer space expanded, suggesting that intercalation of other organic compounds may be possible. The intercalated dodecylsulfate and dodecylbenzenesulfonate anions arranged themselves in monolayer and bilayer configuration in the interlayer. These modified hydrotalcites have well-ordered layered structures, divalent/trivalent mole ratios that are close to those of the host precursors, and hydrophobic properties. SEM images show that the modification led to many of the particles being broken down into smaller pieces due to thermal pre-treatment and regeneration with organic anions, but overall morphology was maintained as the host. They show thermal transitions that are comparable to the host, exhibiting three decomposition steps but with increase in the temperature at which weight losses are completed. They show capacity to uptake phenol and 2-chlorophenol (2-CP) from aqueous solution with the compounds containing DBS anions showing higher sorption capacities for 2-CP than the corresponding DS-containing compounds. A pseudo second order reaction best described the sorption process.

Type of Work: Thesis (Doctorates > Ph.D.)
Award Type: Doctorates > Ph.D.
Supervisor(s):
Supervisor(s)EmailORCID
Shannon, IanUNSPECIFIEDUNSPECIFIED
Licence:
College/Faculty: Colleges (2008 onwards) > College of Engineering & Physical Sciences
School or Department: School of Chemistry
Funders: None/not applicable
Subjects: Q Science > QD Chemistry
URI: http://etheses.bham.ac.uk/id/eprint/5332

### Actions

 Request a Correction View Item


text:
Timezone: »

Poster
Adversarial Auto-Augment with Label Preservation: A Representation Learning Principle Guided Approach
Kaiwen Yang · Yanchao Sun · Jiahao Su · Fengxiang He · Xinmei Tian · Furong Huang · Tianyi Zhou · Dacheng Tao

Tue Nov 29 09:30 AM -- 11:00 AM (PST) @ Hall J #101

Data augmentation is a critical contributing factor to the success of deep learning but heavily relies on prior domain knowledge which is not always available. Recent works on automatic data augmentation learn a policy to form a sequence of augmentation operations, which are still pre-defined and restricted to limited options. In this paper, we show that a prior-free autonomous data augmentation's objective can be derived from a representation learning principle that aims to preserve the minimum sufficient information of the labels. Given an example, the objective aims at creating a distant hard positive example'' as the augmentation, while still preserving the original label. We then propose a practical surrogate to the objective that can be optimized efficiently and integrated seamlessly into existing methods for a broad class of machine learning tasks, e.g., supervised, semi-supervised, and noisy-label learning. Unlike previous works, our method does not require training an extra generative model but instead leverages the intermediate layer representations of the end-task model for generating data augmentations. In experiments, we show that our method consistently brings non-trivial improvements to the three aforementioned learning tasks from both efficiency and final performance, either or not combined with pre-defined augmentations, e.g., on medical images when domain knowledge is unavailable and the existing augmentation techniques perform poorly. Code will be released publicly.

#### Author Information

##### Fengxiang He (JD.com Inc)

Fengxiang He received his BSc in statistics from University of Science and Technology of China, MPhil and PhD in computer science from the University of Sydney. He is currently an algorithm scientist at JD Explore Academy, JD.com Inc., leading its trustworthy AI team. His research interest is in the theory and practice of trustworthy AI, including deep learning theory, privacy-preserving ML, decentralized learning, and their applications. He has published in prominent journals and conferences, including TNNLS, TMM, TCSVT, ICML, NeurIPS, ICLR, CVPR, and ICCV. He is the area chair of AISTATS, BMVC, and ACML. He is the leading author of several standards on trustworthy AI.

##### Tianyi Zhou (University of Washington, Seattle)

Tianyi Zhou is a Ph.D. student in Computer Science at University of Washington and a member of MELODI lab led by Prof. Jeff A. Bilmes. He will be joining University of Maryland, College Park as a tenure-track assistant professor at the Department of Computer Science and affiliated with UMIACS in 2022. His research interests are in machine learning, optimization, and natural language processing. He has published ~60 papers at NeurIPS, ICML, ICLR, AISTATS, EMNLP, NAACL, COLING, KDD, ICDM, AAAI, IJCAI, ISIT, Machine Learning (Springer), IEEE TIP/TNNLS/TKDE, etc. He is the recipient of the Best Student Paper Award at ICDM 2013 and the 2020 IEEE TCSC Most Influential Paper Award.


text:
# How do I find the equation of a tangent line to a curve?

I'm given $x^2+2x-4$ at $x=2$ and I have to find the tangent line to this curve at that point...

-
You should essentially differentiate the quadratic $x^2 + 2x -4$ w.r.t. $x$ and plug in $x=2$. But since you have tagged this "precalculus", do you know how to differentiate a (polynomial) function? –  Srivatsan Dec 17 '11 at 3:44

Here's an algebraic approach that avoids the explicit use of derivatives.

We are given a quadratic function $f(x) = x^2 + 2x -4$, and we want to find the equation of the tangent to the parabola $y = f(x)$ at the point $(2, 4)$. (Note that $f(2) = 2^2 + 2 \cdot 2 - 4 = 4$.) Assume that it is given by the equation $$y = m(x-2) + 4, \tag{\ast}$$ where $m$ is its slope.

Let's consider the intersection of the parabola with the tangent; this is given by the system of equations $$\begin{cases} y &=& x^2 + 2x - 4, \\ y &=& m(x-2)+4. \end{cases}$$ In other words, to find the intersection, we should solve the quadratic equation $x^2 + 2x - 4 = m(x-2)+4$, or $$x^2 + (2-m)x+(2m-8) = 0. \tag{\ast\ast}$$ using the quadratic formula like so $$\frac{-(2-m)\pm\sqrt{(2-m)^2-4.1.(2m-8)}}{2.1}$$ Pictorially it is clear that the tangent meets the parabola meets in exactly one point, so we want $(\ast \ast)$ to have a unique solution. This implies that the discriminant of $(\ast \ast)$ vanishes: $$\begin{array}{crcl} &(2-m)^2 - 4 \cdot (2m-8) &=& 0 \\ \implies \qquad & m^2 - 12m + 36 &=& 0. \end{array}$$ Conveniently (although this is not a numerical coincidence), this equation has a unique solution $m=6$: this is the solution we are after. Plugging $m=6$ in $(\ast)$, we get the equation of the tangent at $(2, 4)$ to be $y = 6x-8$.

-
Thanks this was very helpful –  Max Dec 17 '11 at 4:13

Another method that can be used which is traditionally taught before derivatives is the limit (they're very similar but this is more intuitive):

Let $f(x) = x^2 + 2x - 4$ and $f'(x)$ be the tangent line at any point $a$ on the curve $f(x)$

Difference quotient:

$$f'(x) =\lim_{h \rightarrow 0}\frac{f(a + h) - f(a)}{h}$$

What this essentially means is that we we take the slope between two points $a$ and $a+h$ as $h$ gets very small or as $h\rightarrow0$ the point $a+h$ gets closer to $a$ until there mathematically the slope is tangent to the point $a$.

$$f'(x) =\lim_{h \rightarrow 0} \frac{[(a+h)^2+ 2(a+h) - 4] - [(a)^2 - 2(a) - 4]}{h}$$ $$=\lim_{h \rightarrow 0} \frac{[(h^2 + 2ah + a^2) + (2a + 2h) - 4] - [a^2 - 2a - 4]}{h}$$ $$=\lim_{h \rightarrow 0} \frac{h^2 + 2ah + 2h}{h}$$ $$=\lim_{h \rightarrow 0} h + 2a + 2$$ $$= 2a + 2$$

There's your formula for the slope at any value $a$ along the curve $f(x)$

Sorry, I misread your post now I see that you want the equation!

We'll right the formula out in the form $y = mx + b$

Well we can begin with finding the slope of the line at $a = 2$

$$m = 2a + 2$$ $$= 2(2) + 2$$ $$= 6$$

The point at $x = 2$ is $(2,4)$ since if we plug $x = 2$ into $f(x)$ we end up with $y = 4$

So,

$$y = mx+b$$ $$4 = 6(2) + b$$ $$4 - 12 = b$$ $$-8 = b$$

$$y = 6x - 8$$


text:
# Distance geometry in quasihypermetric spaces. I

Journal Article

### Abstract

• Let $\Xd$ be a compact metric space and let

$\MX$ denote the space of all finite signed Borel measures on~$X$.

Define $I \colon \MX \to \R$ by

$\Imu = \int_X \! \int_X d(x,y) \, d\mu(x) d\mu(y),$

and set

$\mbar(X) = \sup \Imu,$

where $\mu$ ranges over the collection of signed measures in $\MX$

of total mass~$1$.

The metric space $\Xd$ is \textit{quasihypermetric} if

for all $n \in \N$, all $\alpha_1, \ldots, \alpha_n \in \R$

satisfying

$\sum_{i=1}^n \alpha_i = 0$ and all $x_1, \ldots, x_n \in X$,

one has

$\sum_{i,j=1}^n \alpha_i \alpha_j d(x_i, x_j) \leq 0$.

Without the quasihypermetric property $\mbar(X)$ is infinite,

while with the property a natural semi-inner product structure

becomes available on $\Mzero(X)$,

the subspace of $\MX$ of all measures of total mass~$0$.

This paper explores: operators and functionals

which provide natural links between the metric structure

of~$\Xd$, the semi-inner product space structure of $\Mzero(X)$

and the Banach space~$C(X)$ of continuous real-valued functions

on~$X$; conditions equivalent to the quasihypermetric property;

the topological properties of $\Mzero(X)$ with the topology

induced by the semi-inner product, and especially

the relation of this topology to the \wstar{} topology

and the measure-norm topology on $\Mzero(X)$;

and the functional-analytic properties of $\Mzero(X)$

as a semi-inner product space, including the question

of its completeness.

A~later paper [Peter Nickolas and Reinhard Wolf,

\emph{Distance Geometry in Quasihypermetric Spaces.~II}]

will apply the work of this paper to a detailed analysis

of the constant $\mbar(X)$.

\end{abstract}

• 2009

### Citation

• Nickolas, P. & Nickolas, P. (2009). Distance geometry in quasihypermetric spaces. I. Bulletin of the Australian Mathematical Society, 80 (1), 1-25.

### Scopus Eid

• 2-s2.0-67149101171

### Ro Full-text Url

• http://ro.uow.edu.au/cgi/viewcontent.cgi?article=10570&context=infopapers

• http://ro.uow.edu.au/infopapers/3234

• 24

• 1

• 25

• 80

• 1

### Abstract

• Let $\Xd$ be a compact metric space and let

$\MX$ denote the space of all finite signed Borel measures on~$X$.

Define $I \colon \MX \to \R$ by

$\Imu = \int_X \! \int_X d(x,y) \, d\mu(x) d\mu(y),$

and set

$\mbar(X) = \sup \Imu,$

where $\mu$ ranges over the collection of signed measures in $\MX$

of total mass~$1$.

The metric space $\Xd$ is \textit{quasihypermetric} if

for all $n \in \N$, all $\alpha_1, \ldots, \alpha_n \in \R$

satisfying

$\sum_{i=1}^n \alpha_i = 0$ and all $x_1, \ldots, x_n \in X$,

one has

$\sum_{i,j=1}^n \alpha_i \alpha_j d(x_i, x_j) \leq 0$.

Without the quasihypermetric property $\mbar(X)$ is infinite,

while with the property a natural semi-inner product structure

becomes available on $\Mzero(X)$,

the subspace of $\MX$ of all measures of total mass~$0$.

This paper explores: operators and functionals

which provide natural links between the metric structure

of~$\Xd$, the semi-inner product space structure of $\Mzero(X)$

and the Banach space~$C(X)$ of continuous real-valued functions

on~$X$; conditions equivalent to the quasihypermetric property;

the topological properties of $\Mzero(X)$ with the topology

induced by the semi-inner product, and especially

the relation of this topology to the \wstar{} topology

and the measure-norm topology on $\Mzero(X)$;

and the functional-analytic properties of $\Mzero(X)$

as a semi-inner product space, including the question

of its completeness.

A~later paper [Peter Nickolas and Reinhard Wolf,

\emph{Distance Geometry in Quasihypermetric Spaces.~II}]

will apply the work of this paper to a detailed analysis

of the constant $\mbar(X)$.

\end{abstract}

• 2009

### Citation

• Nickolas, P. & Nickolas, P. (2009). Distance geometry in quasihypermetric spaces. I. Bulletin of the Australian Mathematical Society, 80 (1), 1-25.

### Scopus Eid

• 2-s2.0-67149101171

### Ro Full-text Url

• http://ro.uow.edu.au/cgi/viewcontent.cgi?article=10570&context=infopapers

• http://ro.uow.edu.au/infopapers/3234

• 24

• 1

• 25

• 80

• 1


text:
# Tag Info

5

I'm writing only a partial answer, because I currently lack time. That means that I'm not properly sourcing everything, and largely working from my own memory. I don't believe that anything I say below will be wrong, though it is definitely possible that I might be forgetting a few things. In any case, hopefully this will be enough to get you started / ...

4

Since we're missing a lot of information, this answer will be fairly bare-bones. There are no "right" or "wrong" answers here. Everything hinges on the goal of the course. And this is as it should be. Usually, you choose the learning goals for the course, and then choose a language that helps you to achieve them. If the goal is to ...

3

I think the two situations are entirely different in applications. In the case that the internal nodes are only search keys we find applications in database indices. By associating keys with internal nodes we obtain space efficient dictionary types. The contrast between the two cases could help learners understand the concepts more easily. By focusing on the ...

2

I would probably go with expression trees. 2 + ( 6 * x * 3 ) ---> + / \ 2 * / \ * 3 / \ 6 x It demystifies something, it's based on pre-existing knowledge, there are umpteen ways to generate practical exercises and it represents an abstract use of the data type. It's also fun. ...

1

In his Algorithms Jeff Erickson discusses and analyses a similar variant, which he calls binary search (a terrible name, if you ask me): For a table of size a power of 2 when searching for key $k$, the idea is to check positions $h(k) \oplus r$, where $\oplus$ is bit-by-bit exclusive or and $r$ is the number of the try. It shares the benefit of quadratic ...

1

History in your browser, recurrence in functions, "undo" like control-z in many programs are examples of stack usage

Only top voted, non community-wiki answers of a minimum length are eligible


text:
# How do you round 298,431 to the nearest hundred?

Then teach the underlying concepts
Don't copy without citing sources
preview
?

Write a one sentence answer...

#### Explanation

Explain in detail...

#### Explanation:

I want someone to double check my answer

Describe your changes (optional) 200

1
Mar 12, 2018

In order to round $298 , 431$, you have to look at the tens place, and then the hundreds place.

#### Explanation:

You first have to look at the tens place. Since $3$ is less than $5$, you have to let it rest. In this case, the digits stay the same. But if the digits are $5$ or greater, you add $1$ and the remaining numbers are changed into zeros. So when rounding this number, it will remain the same answer.

##### Just asked! See more
• 20 minutes ago
• 21 minutes ago
• 22 minutes ago
• 28 minutes ago
• 2 minutes ago
• 3 minutes ago
• 15 minutes ago
• 16 minutes ago
• 17 minutes ago
• 17 minutes ago
• 20 minutes ago
• 21 minutes ago
• 22 minutes ago
• 28 minutes ago


text:
## Beyond Sub-Gaussian Noises: Sharp Concentration Analysis for Stochastic Gradient Descent

Wanrong Zhu, Zhipeng Lou, Wei Biao Wu; 23(46):1−22, 2022.

### Abstract

In this paper, we study the concentration property of stochastic gradient descent (SGD) solutions. In existing concentration analyses, researchers impose restrictive requirements on the gradient noise, such as boundedness or sub-Gaussianity. We consider a much richer class of noise where only finitely-many moments are required, thus allowing heavy-tailed noises. In particular, we obtain Nagaev type high-probability upper bounds for the estimation errors of averaged stochastic gradient descent (ASGD) in a linear model. Specifically, we prove that, after $T$ steps of SGD, the ASGD estimate achieves an $O(\sqrt{\log(1/\delta)/T} + (\delta T^{q-1})^{-1/q})$ error rate with probability at least $1-\delta$, where $q>2$ controls the tail of the gradient noise. In comparison, one has the $O(\sqrt{\log(1/\delta)/T})$ error rate for sub-Gaussian noises. We also show that the Nagaev type upper bound is almost tight through an example, where the exact asymptotic form of the tail probability can be derived. Our concentration analysis indicates that, in the case of heavy-tailed noises, the polynomial dependence on the failure probability $\delta$ is generally unavoidable for the error rate of SGD.

[abs][pdf][bib]


text:
# Motivating the Unintuitive Properties of Spinors

In the usual treatment of (Dirac) spinors, one usually starts with "factoring" the energy-momentum relation, deducing the properties of the $$\gamma$$ matrices by requiring the cross terms to cancel, and going on to show that quantities like $$\bar{\psi}\gamma^\mu\psi$$ transform like four-vectors.

I'm wondering, essentially, if the same argument can be run "in reverse", and what assumptions are necessary to re-derive all of the desired properties. What I'm imagining goes something like this:

If we want a theory described by a Lagrangian, that Lagrangian needs to be composed of Lorentz-invariant terms. Since our dynamical terms will presumably include factors of $$\partial_\mu$$, we'll need something that looks like a four-vector so we can pair it $$\partial_\mu$$ and form a scalar. Motivated by that requirement, let's suppose we can cook up something of the form $$\bar{\psi}\gamma^\mu\psi \equiv \big\lbrace \bar{\psi}\gamma^0\psi,\;\bar{\psi}\gamma^1\psi,\;\bar{\psi}\gamma^2\psi,\;\bar{\psi}\gamma^3\psi \big\rbrace$$ that behaves like a four-vector under Lorentz transformations.

Using only that assumption, how much can we deduce about the behavior of $$\psi$$, $$\bar{\psi}$$, and the $$\gamma^\mu$$s? In particular, I'm interested in whether we can show the following:

1. The $$\gamma^\mu$$s satisfy the Clifford relations (and are therefore (at least) $$4\times4$$ matrices)
2. $$\psi$$ and $$\bar{\psi}$$ are related to each other by $$\gamma^0$$
3. $$\psi$$'s and $$\bar{\psi}$$'s discrete components (in the appropriate bases) correspond to eigenstates of a family of spin-like operators
4. $$\psi$$ and $$\bar{\psi}$$ transform under Lorentz transformations in the expected way (in particular, they require the expected rotation of $$4\pi$$ to return their original state).

I find the idea of deriving Property 4 in this way especially appealing, since it seems to suggest (albeit through a bogus "proof by notation") that the infamously unintuitive "$$4\pi$$" property is basically a consequence of the fact that our four-vector object, which behaves as we'd intuitively expect, contains 2 copies of $$\psi$$; that, in a sense, rotating the entire object naturally requires rotating $$\psi$$ twice, hence $$4\pi$$'s-worth of rotation to return to the original state.

Does that argument actually hold water? Or is it "freshman's dream" wishful thinking? If just "being a four-vector" isn't enough to derive all the desired properties, what other minimal assumptions do we need (e.g. unitarity-of-something for probability conservation, further transformation properties of tensor-like $$\bar{\psi}\sigma^{\mu\nu}\psi$$ quantities, etc.)?

• Factoring the energy-momentum relation may have been how spinors and $\gamma$s were developed historically (and still in many texts), but the modern perspective is more similar to what you described: observables are constructed from fields, but fields themselves don't need to be observables. A field $\psi$ can transform according to a covering group of the Lorentz group, instead of the Lorentz group itself. The covering group is naturally described using a (matrix) representation of the Clifford algebra. Then we can use $\psi$ to construct bilinear observables like $\overline\psi\gamma\psi$. – Dan Yand Dec 14 '18 at 3:44
• Ok, I think that makes sense... I guess what I'm really wondering is, can we construct a bilinear covariant out of anything besides spinors, or are they unique in that regard? – TheMac Dec 16 '18 at 0:50
• If derivatives are not allowed, then using spinors like you described is the only way I know how to construct bilinears that behave like a vector, but I don't have a proof or even a compelling argument that that's the only way (which is why I haven't posted a real answer). Hopefully somebody else will chime in with a more satisfying insight. – Dan Yand Dec 16 '18 at 1:26


text:
# Net angular acceleration of a two wheel system

Tags:
1. Jun 15, 2015

### kostoglotov

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

The problem

Direct imgur link to problem: http://i.imgur.com/QCc0zj6.jpg

2. Relevant equations

$$\alpha = \frac{\tau_{net}}{I}$$

$$I = \frac{1}{2}MR^2$$

$$\tau = rF = rmg$$

3. The attempt at a solution

I have figured that the moment of inertia of the entire system must be used for both torques pulling on the system, so the one I is

$$I = \frac{1}{2}(5.0\times (0.05)^2 + 20\times (0.10)^2)$$

So shouldn't the net angular acceleration just be the net torque of the two competing weights divided by the moment of inertia of the entire system?

$$\frac{0.10\times 2.5\times 9.8 + (- 0.05 \times 4.0 \times 9.8)}{\frac{1}{2}(5.0\times (0.05)^2 + 20\times (0.10)^2)} \approx 4.6 \frac{rad}{s^2}$$

[The second torque trying to turn CW, so therefore is negative torque.]

However, the answer from the back of the text says $3.5 \frac{rad}{s^2}$

What am I doing wrong? Do I need to consider this is terms of the tensions in the ropes instead? When considering the torque applied to the system by one hanging weight, does the other hanging weight count towards the moment of the inertia of the system?

2. Jun 15, 2015

### Staff: Mentor

Yes. It is the rope tension that acts on the cylinders, not the weight of the hanging masses.

Hint: Apply Newton's 2nd law three times.

3. Jun 15, 2015

### kostoglotov

Are the tensions in the ropes equal? The masses have different accelerations, though one is twice the other.

4. Jun 15, 2015

### kostoglotov

Since the angular acceleration for the entire system is the same throughout

$$\frac{\tau_1}{I} = \frac{\tau_2}{I} ?$$

$$\frac{r_1(m_1a_1+m_1g)}{I} = \frac{r_2(-m_2 \frac{1}{2}a_1+m_2g)}{I}$$

And now I just solve for a, and then solve for the angular acceleration knowing the radii...?

Last edited: Jun 15, 2015
5. Jun 15, 2015

### kostoglotov

I am really struggling with this one.

I can see that the angular acceleration will be the same for the whole system, and so the tangential acceleration of the weight on the inner cylinder will be -1/2 the tangential acceleration of the weight on the outer cylinder.

I know that the net torque divided by the moment of inertia of the entire system will get me the angular acceleration. I am just struggling to resolve how the forces and torque are interacting to produce the net torque.

So, net torque will be +ve torque from 2.5 kg weight - 0.50 Nm from friction - torque from 4.0 kg weight. I am assuming that the CCW is the positive direction.

Ok, so the force creating the torque will be the tension in the rope minus the weight on the end of the rope.

I get $T_1 - 24.5 = 2.5a_1$ and $T_2 - 39.2 = 4.0a_2$, but $a_2 = -\frac{1}{2}a_1$ so $T_2 - 39.2 = -2.0a_1$

But I don't think the two tensions in the ropes are the same, they are different ropes, and the masses that they are supporting are undergoing differing linear accelerations.

I've tried $T_2 = \frac{\tau_{net}}{r_2}$ is this correct? Is the second tension raising the other weight the result of the overall torque divided by the radius of that particular cylinder. But subbing back in to other equations gives an acceleration for the first dropping weight greater than gravity.

6. Jun 15, 2015

### SammyS

Staff Emeritus
The tensions are not equal.

Yes, the acceleration of one mass is twice the other. Which has the greater acceleration ?

True, there is only one angular acceleration for the combined cylinders. However, it's the difference (or the sum) of the torques that produces the angular acceleration. Those quantities are not equal.

7. Jun 16, 2015

### dean barry

For the total moment of inertia (I), add the two seperate cylinder moment of inertias together:
I = ( ½ * 5 * 0.05 ² ) + ( ½ * 20 * 0.1 ² )

Calculate the net torque (T) provided by the hanging masses.
Calculate the angular acceleration (in rad/sec) from ( as you said ) α = T / I

8. Jun 16, 2015

### Staff: Mentor

No.

Exactly. You'll need to relate the accelerations of the masses with the angular acceleration of the cylinder.

9. Jun 16, 2015

### Staff: Mentor

To make things easier, I recommend that you write equations for each mass and the cylinder, expressing Newton's 2nd law. That will give you three equations.

Using the relationship between the linear accelerations of the masses and the angular acceleration of the cylinder, you should be able to solve for the angular acceleration. (And you can solve for the other unknowns, if you like, such as the tension in the rope and the accelerations of the masses.)

Express everything symbolically. Don't plug in numbers until the very end.

10. Jun 16, 2015

### kostoglotov

I did that it got the wrong answer...maybe I'm putting the friction factor in in the wrong way.

edit: Wait, there is no friction factor...great, that was a part of a different problem that got mixed in...

11. Jun 16, 2015

### haruspex

How are you proposing to find the net torque? The masses accelerate too.
You can handle that by including the masses in the MoI as well.

12. Jun 17, 2015

### dean barry

My previous post was wrong, it did not not account for the two hanging masses in the acceleration.
Apologies.
This problem can be solved by moving the cylinder(s) at an arbitrary constant rate (say 10 rad/sec) and calculating the KE of each part at that rate, then you can give each part a relative moi value by dividing its KE value by the KE value of the large cylinder and multiplying by the large cylinders moi.

13. Jun 17, 2015

### haruspex

As I wrote, your first method can be rescued by representing the hanging masses as moments of inertia. Can you see how to do that?


text:
# Who first proved Fubini's theorem for abstract measure spaces?

Fubini's theorem relates the double integral of a function $$f(x,y)$$ to an iterated integral with respect to $$x$$ and $$y$$. The basic idea of this theorem for Riemann integrals of continuous functions was known for centuries, but Lebesgue proved it for bounded Lebesgue measurable functions, then Fubini proved it for Lebesgue integrable functions, then Tonelli fixed a flaw in Fubini's proof and proved it in a bit more generality.

The results of Lebesgue, Fubini, and Tonelli all pertain to Lebesgue measure. Yet today we commonly see in textbooks a Fubini-Tonelli theorem for product measures on products of abstract measure spaces. My question is, who is the first person who proved this result for abstract measure spaces? And what technique(a) did they use to prove it?

• Ulam's 1932 ICM announcement (of joint work with Łomnicki) does not mention the Fubini theorem, but rather it states that given two probability spaces $(X,\mu_X),(Y,\mu_Y)$ we can define a complete probability measure $\mu$ on $X \times Y$ such that $\mu(S \times T) = \mu_X(S) \cdot \mu_Y(T)$ when $S,T$ are measurable. The 1934 paper contains generalizations to infinite products, and no Fubini theorem, as far as I can see. Oct 3, 2020 at 13:28
• Hahn's 1933 paper contains the Fubini theorem for sets, rather than integrable functions, as statement XXXIX in §5 (i.e. $\mu(S) = \int_Y \mu_X(S_y) d\mu_Y$ in the notation of my previous comment, with $S \subseteq X \times Y$ measurable). Oct 3, 2020 at 13:31


text:
## Access

You are not currently logged in.

Access your personal account or get JSTOR access through your library or other institution:

## If You Use a Screen Reader

This content is available through Read Online (Free) program, which relies on page scans. Since scans are not currently available to screen readers, please contact JSTOR User Support for access. We'll provide a PDF copy for your screen reader.

# Error Bounds for Gauss-Turán Quadrature Formulae of Analytic Functions

Gradimir V. Milovanović and Miodrag M. Spalević
Mathematics of Computation
Vol. 72, No. 244 (Oct., 2003), pp. 1855-1872
Stable URL: http://www.jstor.org/stable/4100023
Page Count: 18
Preview not available

## Abstract

We study the kernels of the remainder term $R_{n,s}(f)$ of $Gauss-Tur\acute{a}n$ quadrature formulas $\int_{-1}^{1} f(t)w(t)dt = \sum\limits_{\nu=1}^{n} \sum\limits_{i=0}^{2s} A_{i, \nu}f^{(i)}(\tau_{\nu}) + R_{n,s}(f)\;\;\;\;\;(n \in \mathbb{N}; s \in \mathbb{N}_{0})$ for classes of analytic functions on elliptical contours with foci at ± 1, when the weight w is one of the special Jacobi weights $w^{(\alpha, \beta)}(t) = (1 - t)^{\alpha}(1 + t)^\beta$ ($\alpha = \beta = -1/2$; $\alpha = \beta = 1/2 + s$; $\alpha = -1/2$, $\beta = 1/2 + s$; $\alpha = 1/2 + s$, $\beta = -1/2$). We investigate the location on the contour where the modulus of the kernel attains its maximum value. Some numerical examples are included.

• 1855
• 1856
• 1857
• 1858
• 1859
• 1860
• 1861
• 1862
• 1863
• 1864
• 1865
• 1866
• 1867
• 1868
• 1869
• 1870
• 1871
• 1872


text:
# Vector

vector<T> is the only primitive collection type provided by Move. A vector<T> is a homogenous collection of T's that can grow or shrink by pushing/popping values off the "end".

A vector<T> can be instantiated with any type T. For example, vector<u64>, vector<address>, vector<0x42::MyModule::MyResource>, and vector<vector<u8>> are all valid vector types.

## Literals

### General vector Literals

Vectors of any type can be created with vector literals.

SyntaxTypeDescription
vector[]vector[]: vector<T> where T is any single, non-reference typeAn empty vector
vector[e1, ..., en]vector[e1, ..., en]: vector<T> where e_i: T s.t. 0 < i <= n and n > 0A vector with n elements (of length n)

In these cases, the type of the vector is inferred, either from the element type or from the vector's usage. If the type cannot be inferred, or simply for added clarity, the type can be specified explicitly:

vector<T>[]: vector<T>vector<T>[e1, ..., en]: vector<T>

#### Example Vector Literals

(vector[]: vector<bool>);(vector[0u8, 1u8, 2u8]: vector<u8>);(vector<u128>[]: vector<u128>);(vector<address>[@0x42, @0x100]: vector<address>);

### vector<u8> literals

A common use-case for vectors in Move is to represent "byte arrays", which are represented with vector<u8>. These values are often used for cryptographic purposes, such as a public key or a hash result. These values are so common that specific syntax is provided to make the values more readable, as opposed to having to use vector[] where each individual u8 value is specified in numeric form.

There are currently two supported types of vector<u8> literals, byte strings and hex strings.

#### Byte Strings

Byte strings are quoted string literals prefixed by a b, e.g. b"Hello!\n".

These are ASCII encoded strings that allow for escape sequences. Currently, the supported escape sequences are:

Escape SequenceDescription
\nNew line (or Line feed)
\rCarriage return
\tTab
\\Backslash
\0Null
\"Quote
\xHHHex escape, inserts the hex byte sequence HH

#### Hex Strings

Hex strings are quoted string literals prefixed by a x, e.g. x"48656C6C6F210A".

Each byte pair, ranging from 00 to FF, is interpreted as hex encoded u8 value. So each byte pair corresponds to a single entry in the resulting vector<u8>.

#### Example String Literals

script {fun byte_and_hex_strings() {    assert!(b"" == x"", 0);    assert!(b"Hello!\n" == x"48656C6C6F210A", 1);    assert!(b"\x48\x65\x6C\x6C\x6F\x21\x0A" == x"48656C6C6F210A", 2);    assert!(        b"\"Hello\tworld!\"\n \r \\Null=\0" ==            x"2248656C6C6F09776F726C6421220A200D205C4E756C6C3D00",        3    );}}

## Operations

vector provides several operations via the std::vector module in the Move standard library, as shown below. More operations may be added over time. Up-to-date document on vector can be found here.

FunctionDescriptionAborts?
vector::empty<T>(): vector<T>Create an empty vector that can store values of type TNever
vector::is_empty<T>(): boolReturn true if the vector v has no elements and false otherwise.Never
vector::singleton<T>(t: T): vector<T>Create a vector of size 1 containing tNever
vector::length<T>(v: &vector<T>): u64Return the length of the vector vNever
vector::push_back<T>(v: &mut vector<T>, t: T)Add t to the end of vNever
vector::pop_back<T>(v: &mut vector<T>): TRemove and return the last element in vIf v is empty
vector::borrow<T>(v: &vector<T>, i: u64): &TReturn an immutable reference to the T at index iIf i is not in bounds
vector::borrow_mut<T>(v: &mut vector<T>, i: u64): &mut TReturn a mutable reference to the T at index iIf i is not in bounds
vector::destroy_empty<T>(v: vector<T>)Delete vIf v is not empty
vector::append<T>(v1: &mut vector<T>, v2: vector<T>)Add the elements in v2 to the end of v1Never
vector::reverse_append<T>(lhs: &mut vector<T>, other: vector<T>)Pushes all of the elements of the other vector into the lhs vector, in the reverse order as they occurred in otherNever
vector::contains<T>(v: &vector<T>, e: &T): boolReturn true if e is in the vector v. Otherwise, returns falseNever
vector::swap<T>(v: &mut vector<T>, i: u64, j: u64)Swaps the elements at the ith and jth indices in the vector vIf i or j is out of bounds
vector::reverse<T>(v: &mut vector<T>)Reverses the order of the elements in the vector v in placeNever
vector::reverse_slice<T>(v: &mut vector<T>, l: u64, r: u64)Reverses the order of the elements [l, r) in the vector v in placeNever
vector::index_of<T>(v: &vector<T>, e: &T): (bool, u64)Return (true, i) if e is in the vector v at index i. Otherwise, returns (false, 0)Never
vector::insert<T>(v: &mut vector<T>, i: u64, e: T)Insert a new element e at position 0 <= i <= length, using O(length - i) timeIf i is out of bounds
vector::remove<T>(v: &mut vector<T>, i: u64): TRemove the ith element of the vector v, shifting all subsequent elements. This is O(n) and preserves ordering of elements in the vectorIf i is out of bounds
vector::swap_remove<T>(v: &mut vector<T>, i: u64): TSwap the ith element of the vector v with the last element and then pop the element, This is O(1), but does not preserve ordering of elements in the vectorIf i is out of bounds
vector::trim<T>(v: &mut vector<T>, new_len: u64): u64Trim the vector v to the smaller size new_len and return the evicted elements in ordernew_len is larger than the length of v
vector::trim_reverse<T>(v: &mut vector<T>, new_len: u64): u64Trim the vector v to the smaller size new_len and return the evicted elements in the reverse ordernew_len is larger than the length of v
vector::rotate<T>(v: &mut vector<T>, rot: u64): u64rotate(&mut [1, 2, 3, 4, 5], 2) -> [3, 4, 5, 1, 2] in place, returns the split point ie. 3 in this exampleNever
vector::rotate_slice<T>(v: &mut vector<T>, left: u64, rot: u64, right: u64): u64rotate a slice [left, right) with left <= rot <= right in place, returns the split pointNever

## Example

use std::vector;let v = vector::empty<u64>();vector::push_back(&mut v, 5);vector::push_back(&mut v, 6);assert!(*vector::borrow(&v, 0) == 5, 42);assert!(*vector::borrow(&v, 1) == 6, 42);assert!(vector::pop_back(&mut v) == 6, 42);assert!(vector::pop_back(&mut v) == 5, 42);

## Destroying and copying vectors

Some behaviors of vector<T> depend on the abilities of the element type, T. For example, vectors containing elements that do not have drop cannot be implicitly discarded like v in the example above--they must be explicitly destroyed with vector::destroy_empty.

Note that vector::destroy_empty will abort at runtime unless vec contains zero elements:

fun destroy_any_vector<T>(vec: vector<T>) {    vector::destroy_empty(vec) // deleting this line will cause a compiler error}

But no error would occur for dropping a vector that contains elements with drop:

fun destroy_droppable_vector<T: drop>(vec: vector<T>) {    // valid!    // nothing needs to be done explicitly to destroy the vector}

Similarly, vectors cannot be copied unless the element type has copy. In other words, a vector<T> has copy if and only if T has copy. However, even copyable vectors are never implicitly copied:

let x = vector::singleton<u64>(10);let y = copy x; // compiler error without the copy!

Copies of large vectors can be expensive, so the compiler requires explicit copy's to make it easier to see where they are happening.

For more details see the sections on type abilities and generics.

## Ownership

As mentioned above, vector values can be copied only if the elements can be copied. In that case, the copy must be explicit via a copy or a dereference *.