text:
August 05, 2019 · 5 mins read

# Lesson 4 - Autocompletion while typing

Virtually all mobile phones support autocompletion nowadays. This might look like a casual feature but when you start thinking about how to implement this, something I’ve been wanting to know for a very long time, it can be quite complex. If you know a little bit about deep learning, it’s not that hard to implement autocomplete yourself using the fastai library.

This is the fourth post on the fast.ai course. Be sure to check out the previous posts like yesterdays post on self driving cars.

Before we start, make sure to copy the notebook on Google Colab to your account so you can follow along. Don’t forget to set the accelator to GPU.

## Introduction to Natural Language Processing

Natural language processing, or NLP for short, is a subfield or machine learning that focuses on text processing and understanding. As I described in an earlier post, natural language processing increases the rate at which humans and computers can communicate.

They key step in natural language processing is tokenization. This is a preprocessing step that turns words and phases into tokens which can be easier understood by a computer. A few things tokenization does are

• Removing HTML code;
• Dealing with punctuation;
• Splitting words as “aren’t” into “are n’t” to make to make the presence of negation more obvious;
• Substituting names with a special token.

Other preprocessing steps are:

• Stemming: turning words with the same meaning into a shared abbreviated form. “Works, worked” -> “work” for example. In Python, this can be done using NaturalLanguageToolKit.
• Lemmatization: assigning a token to a group of words which together have a meaning. “Natural language processing” and “machine learning” are examples of groups a lemmatization algorithm would assign a single token to.

Unfortunately, there is no way to use those in fastai yet. I think it would be great to make a contribution to the library adding this feature after I get more familiar with the framework.

## Getting the data

Because this model will predict the next word in general texts, not just reviews, I used the [wiki text dataset] to train my model on in contrast to the IMDB dataset used in the lecture.

As this dataset is part of the fastai framework, downloading and loading is easy:

path = untar_data(URLs.WIKITEXT_TINY)
path.ls()

data_lm = (TextList.from_csv(path, 'train.csv')
.split_by_rand_pct(0.1)
# select 10% for validation
.label_for_lm()
# prepare the data to be used for NLP
.databunch(bs=bs))
data_lm.save('data_lm.pkl')

Because the tokenization process might take a while, we usually save the data so we only have to perform this step once. You could load the data from disk like so:

data_lm = load_data(path, 'data_lm.pkl', bs=bs)

What the dataset looks like:

Note the “xxmaij” tokens. These are tokens that were not recognized by the tokenizer and therefore updated to this placeholder. The language_model_learner will interpret these as names.

## Training

After the preprocessing step, we create a language_model_learner class. Similar to the vision models in previous posts, this model also uses transfer learning.

learn = language_model_learner(data_lm, AWD_LSTM, drop_mult=0.5)

Choosing the learning rate is almost always done using the lr_find() method of the model. In this case, the graph looks like this and it seems that $5 \cdot 10 ^{-2}$ would be an appropriate learning rate.

After training for 6 epochs, you should expect to see a validation accuracy of about $0.35$. This might seem very low compared to the image classifier, but it’s quite good considering the model is able to correctly predict the next word out of all 60 000 words present in the token set a third of the time.

learn.fit_one_cycle(6, 5e-02)

## Trying it out!

This is the most fun part of this project, having the model predict things you are going to say. Similar to the api of fastai.vision we can just call .predict to get the models prediction. Because learn is a language_model_learner, you can pass temperature to this call. Citing from the documentation: “Lowering temperature will make the texts less randomized.” This gives a vague sense of what it does, but in order to really understand it, you should try out some values.

text = "<Enter some text here>"
learn.predict(text, n_words = 1, temperature = 0.75)

You should definitely try out some sentences. You’ll find the model is quite good most of the time but sometimes it will also fail hilariously or in an ungraspable manner.

I set n_words equal to 1 because that’s what the auto prediction feature in the keyboard does. Higher values can be used though; the model is able to write entire sentences.

## Where to go from here?

If you want to learn more about natural language processing, here are some links you might find interesting:

• My post about natural language processing in Swift;
• Stanford’s course on natural language processing;
• The Natural Language Processing Toolkit: a Python framework for NLP.

## Citations

arXiv:1609.07843 [cs.CL]

A huge thanks to Sam Miserendino for proofreading this post!


text:
# Definition:Arabic Numerals/Historical Note/Mistake

## Source Work

Chapter $2$: Notations and Numbers
Indian number symbols

## Mistake

The earliest Indian numerals were more like the Egyptian system. For example, Khasrosthi numerals, used from $400$ bc to ad $100$, represented the numbers $1$ to $8$ as ...

The correct name is Kharosthi or related variants.

The symbols given (not reproduced here for lack of capability) do not match anything that can be found online.

It appears that Stewart may have misrepresented the nature of the Kharosthi symbols, and interpreted them to signify a $4$-based system.

format: plain


text:
# Any advice on identifying the HV wires on an old flyback.

#### RayRay1132

##### Member
How's $50 sound? Or I could pay even more if you want. Could we do$60?

#### Rebuff

##### New Member
That sounds good too. Especially if it's the exact number part that I'm looking for . How would I be able to give you my address? I wasn't sure if I could post information like that here on this form. Let me know. And thanks again.

#### RayRay1132

##### Member
That sounds good too. Especially if it's the exact number part that I'm looking for . How would I be able to give you my address? I wasn't sure if I could post information like that here on this form. Let me know. And thanks again.
I don't exactly know if you can post that kind of stuff on this forum, (new here myself). I guess I could give you my email. Its [email protected]

#### Rebuff

##### New Member
Okay then I can just go ahead and submit all that information at your email address in a few moments here. I know I'm going to need this part in order to get any kind of picture on the TV.

I have currently been working with another flyback which looks just like that one. And I paid \$30 for it plus shipping. But it's wired up differently inside than the original one is.

And I'm a little bit worried about trying to modify it in order to get it to work in the receiver. And I figure I don't want to damage anything in this television by trying to install another part which might not be the correct one for it.

So let's just go ahead and see if we can take care of this at the email address. And thanks so much again.

#### Skip West

##### New Member
Hello. Ditto. I could really use one of those transformers as well for a failed unit. please and thank you. 115876.

#### Attachments

• 2.1 MB Views: 3
• 154.7 KB Views: 3
• 231.8 KB Views: 4

#### RayRay1132

##### Member
Hello. Ditto. I could really use one of those transformers as well for a failed unit. please and thank you. 115876.
I'm currently all out of that flyback, except for the one in my tv. If you want I could try to re-wax it for you. (might solve issues with shorts in the secondary)

#### Skip West

##### New Member
Thank you, I appreciate the offer. It’s pretty burnt & haven’t had chance to see the extent of carbon arching, etc. I’ve peeled & re coated others, but a replacement would’ve been great. Thank you again.

#### Rebuff

##### New Member
I keep reading on the internet about how these RCA flybacks have been so prone to failing. Not sure if it was because of design. Or hot and humid weather.

But one thing I have noticed on receivers like mine is that there doesn't seem to be any ventilation holes in the metal housing which surrounds the flyback and the high voltage tube.

And I had thought about drilling ventilation holes in the metal housing before I installed this part. But then I dropped that idea altogether. Worrying that I might be running the risk of starting a fire since the cover is so close to the back of the cabinet.

I've only operated the new flyback for about 25 minutes and then turned the receiver off. Since I still have more work to do on this television in the future. Hardly using it at all right now.

#### Rebuff

##### New Member
I had to really clean out the inside of the high voltage box before installing the new flyback. Had to get rid of the burn smell from the other flyback.

Also spray painted the inside and outside metal cover where the 3A3A tube is installed. And really gave a good cleaning up of all dust and grime on the chassis as well as the inside and outside of the cabinet.

I can't wait until warmer weather gets here so I can start refinishing the whole cabinet.

#### Attachments

• 30.7 KB Views: 1
• 24.2 KB Views: 1

#### RayRay1132

##### Member
I keep reading on the internet about how these RCA flybacks have been so prone to failing. Not sure if it was because of design. Or hot and humid weather.

But one thing I have noticed on receivers like mine is that there doesn't seem to be any ventilation holes in the metal housing which surrounds the flyback and the high voltage tube.

And I had thought about drilling ventilation holes in the metal housing before I installed this part. But then I dropped that idea altogether. Worrying that I might be running the risk of starting a fire since the cover is so close to the back of the cabinet.

I've only operated the new flyback for about 25 minutes and then turned the receiver off. Since I still have more work to do on this television in the future. Hardly using it at all right now.
yeah, these flyback's were extremely prone to failing, usually due to lack of ventilation, humidity, the hv circuit being set wrong and a whole host of other problems.

#### RayRay1132

##### Member
I had to really clean out the inside of the high voltage box before installing the new flyback. Had to get rid of the burn smell from the other flyback.

Also spray painted the inside and outside metal cover where the 3A3A tube is installed. And really gave a good cleaning up of all dust and grime on the chassis as well as the inside and outside of the cabinet.

I can't wait until warmer weather gets here so I can start refinishing the whole cabinet.
Is there any chance you could post the spec sheet for the flyback if you have it, (couldn't find it on the internet)


text:
# When is Hom(G,H) cyclic?

Let $G$ and $H$ be two finitely generated groups, where $H$ is abelian. I'm curious in which cases $Hom(G,H)$ turns out to be cyclic or virtually cyclic.

• Note that $Hom(G,H)$ has in general no natural group structure, only if $H$ is abelian. – Ralph Feb 25 '12 at 18:12
• $\text{Hom}(G, H)$ doesn't carry a natural group structure unless $H$ (and therefore $G$ WLOG) is abelian or $G$ is free (this is a theorem of Kan). In the first case you can finish using the structure theorem and the second case ought to be undecidable even when $G = \mathbb{Z}$. – Qiaochu Yuan Feb 25 '12 at 18:13
• Sorry, I missed one assumption. Of course I require $H$ to be abelian. – Sebastian Feb 25 '12 at 18:22
• Qiaochu - in your second case, $Hom(F_r,H)\cong H^r$. So, undecidable or not, it's never cyclic unless $H$ is, in which case we're back in the abelian case anyway. – HJRW Feb 27 '12 at 10:01

If $H$ is abelian, any homomorphism $G \to H$ factors through the abelianization $G/[G, G] \to H$, so we may assume WLOG that $G$ is also abelian, so we can apply the structure theorem to both $G$ and $H$. Then $\text{Hom}(G, H)$ is virtually cyclic if and only if it has rank at most $1$, hence if and only if both $G$ and $H$ themselves have rank at most $1$, and this is easy to test (it reduces to linear algebra over $\mathbb{Q}$ given a presentation of $G$ and $H$).

To see when $\text{Hom}(G, H)$ is cyclic, write $G_p, H_p$ for the $p$-parts of $G, H$ respectively and $\mathbb{Z}^a, \mathbb{Z}^b$ for the torsion-free parts. Then $$\text{Hom}(G, H) \cong H^a \oplus \bigoplus_p \text{Hom}(G_p, H_p).$$

In particular, it has rank $ab \le 1$. If $ab = 1$, then $H \cong \mathbb{Z}$ and $G$ has rank $1$ so that $\text{Hom}(G, H) \cong \mathbb{Z}$.

If $ab = 0$, then $\text{Hom}(G, H)$ is finite, so it is cyclic if and only if its $p$-parts $$\text{Hom}(G, H)_p \cong H_p^a \oplus \text{Hom}(G_p, H_p)$$

are cyclic. This can occur in a few different ways; either $\text{Hom}(G_p, H_p) = 0, a = 1$, and $H_p$ is cyclic, or $H_p = 0$, or $a = 0$ and $G_p, H_p$ are both cyclic.

• Why is it that H=Z if ab=1? – Hiro Feb 25 '12 at 19:54
• @Hiro: if $\text{Hom}(G, H)$ has rank $1$ then it is cyclic if and only if it is torsion-free. Since $G$ has a free summand, $H$ cannot itself have any torsion. – Qiaochu Yuan Feb 25 '12 at 19:59
• @Qiaochu Yuan: I understood clearly, thanks! – Hiro Feb 25 '12 at 20:04


text:
## 19.3 Queueing Theory Framework

There is a standard notation that is used to describe large families of queueing systems: the Kendall-Lee notation [379].

### 19.3.1 Kendall-Lee Notation

Queuing systems can be described via six characteristics: $x_1/x_2/x_3/x_4/x_5/x_6.$ The first characteristic $$x_1$$ specifies the nature of the arrival process. The following standard abbreviations are used:

 $$M$$ inter-arrival times are independent identically distributed (iid) exponentials $$D$$ inter-arrival times are iid and deterministic $$E_{k}$$ inter-arrival times are iid Erlangs with shape parameter $$k$$ $$G$$ inter-arrival times are iid and governed by some general distribution

The second characteristic $$x_2$$ specifies the nature of the service times:

 $$M$$ service times are iid and exponential $$D$$ service times are iid and deterministic $$E_{k}$$ service times are iid Erlang with shape parameter $$k$$ $$G$$ service times are iid and follow some general distribution

The third characteristic $$x_3$$ represents the number of parallel servers; it is a positive integer.

The fourth characteristic $$x_4$$ describes the queue discipline:

 FCFS first come, first served LCFS last come, first served SIRO service in random order GD general queue discipline

The fifth characteristic $$x_5$$ specifies the maximum allowable number of customers in the system (including customers who are waiting and customers who are in service).

The sixth characteristic $$x_6$$ gives the size of the population from which customers are drawn. Unless the number of potential customers is of the same order of magnitude as the number of servers, the population size is considered to be infinite.

In many important models $$x_4/x_5/x_6$$ is $$\textrm{GD}/\infty/\infty$$; when this is the case, these characteristics are often omitted. As an example, $$M/M/3/\textrm{FCFS}/20/\infty$$ could represent a bank with 3 tellers, exponential arrival times, exponential service times, a “first come, first served” queue discipline, a total capacity of 20 customers, and an infinite population pool from which to draw. The situation is partly illustrated in Figure 19.4.

Examples: here are some commonly-used/studied queueing systems:

Name Notation Example
simple system $$M/M/1$$ customer service desk in a small store
multi-server system $$M/M/c$$ airline ticket counter
constant service $$M/D/1$$ automated car wash
general service $$M/G/1$$ auto repair shop
limited capacity $$M/M/1/N$$ barber shop with $$N$$ waiting seats

### 19.3.2 Birth-Death Processes

The state of a queueing system at time $$t$$ is defined to be the number of customers in the queuing system, either waiting in line or in service, at time $$t$$. At $$t = 0$$, the state of the system is the initial number of customers in the system. This state is worth recording because it clearly affects the state at future times $$t$$.

Knowing this, we define $$P_{i,j} (t)$$ as the probability that the state at time $$t$$ is $$j$$, given that the state at $$t = 0$$ was $$i$$. For large $$t$$, $$P_{i,j} (t)$$ becomes independent of $$i$$ and approaches a limit $$\pi_{j}$$. This limit is known as the steady-state of state $$j$$.

It is generally quite difficult to determine the steps of arrivals and services that lead to a steady-state $$\pi_j$$. Likewise, starting from an early $$t$$, it is difficult to determine exactly when a system will reach its steady state $$\pi_j$$, if such a state even exists.

For simplicity’s sake, when a queuing system is studied, we begin by assuming that the steady-state has already been reached. A birth-death process is a Markov process in which states are indexed by non-negative integers, and transitions are only permitted between “neighbouring” states. After a “birth”, the state increases from $$n$$ to $$n+1$$; after a “death”, the state decreases from $$m$$ to $$m-1$$.

Typically, we denote the set of birth rates and death rates by $$\lambda_n$$ and $$\mu_m$$, respectively (see Figure 2).

Pure birth processes are those for which $$\mu_m=0$$ for all $$m$$; pure death processes those for which $$\lambda_n=0$$ for all $$n$$. The steady-state solution of a birth-death process, i.e., the probability $$\pi_n$$ of being in state $$n$$, can actually be computed: \begin{aligned} \pi_{n} &= \pi_{0}\frac{\lambda_{0} \lambda_{1} \cdots \lambda_{n-1}}{\mu_{1} \mu_{2} \cdots \mu_{n}},\quad \text{for } n=1,2,\cdots \end{aligned} where $$\pi_{0}$$ is the probability of being in state 0 (i.e., without users). It can further be shown [376] that: $\pi_{0} = \frac{1}{1+ \displaystyle{\sum^{\infty}_{n=1} \prod^{n-1}_{j=0} \frac{\lambda_{j}}{\mu_{j+1}}}}.$

### 19.3.3 Little’s Queuing Formula

It is often the case that clients and end users are interested in determining the amount of time that a typical customer spends in the queuing system. Let $$W$$ be the expected waiting time spent in the queuing system, including time in line plus time in service, and $$W_{q}$$ be the expected time a customer spends waiting in line.

Both $$W$$ and $$W_{q}$$ are computed under the assumption that the steady state has been reached. By using a powerful result known as Little’s queuing formula, $$W$$ and $$W_{q}$$ are easily related to the number of customers in the queue and those waiting in line. For any queuing system (or any subset of a queuing system), consider the following quantities:

• $$\lambda =$$ average number of arrivals entering the system per unit time;

• $$L =$$ average number of customers present in the queuing system;

• $$L_{q} =$$ average number of customers waiting in line;

• $$L_{s} =$$ average number of customers in service;

• $$W =$$ average time a customer spends in the system;

• $$W_{q} =$$ average time a customer spends in line, and

• $$W_{s} =$$ average time a customer spends in service.

Customers in the system can only be found in the queue or being serviced, so that $$L = L_{q} + L_{s}$$ and $$W = W_{q} + W_{s}$$. In these definitions, all averages are steady-state averages.

For most queuing systems in which a steady-state exists, Little’s queuing formula are summarized by: \begin{aligned} L &= \lambda W, \quad L_{q} = \lambda W_{q}, \quad\mbox{and} \quad L_{s}= \lambda W_{s}.\end{aligned}

Example: if, on average, 46 customers enter a restaurant each hour it is opened, and if they spend, on average, 10 minutes (1/6 hours) waiting to be served, then we should expect $$46\cdot 1/6 \approx 7.7$$ customers in the queue at all time (on average).

### References

[376]
L. Kleinrock, Queueing Systems, Volume I. Wiley, 1974.
[379]
D. G. Kendall, Stochastic Processes Occurring in the Theory of Queues and their Analysis by the Method of the Imbedded Markov Chain,” The Annals of Mathematical Statistics, vol. 24, no. 3, pp. 338–354, 1953, doi: 10.1214/aoms/1177728975.


text:
# A calculus of the absurd

##### 22.2.4 Performing LU decomposition

This is all very well, but how do we split $$A$$ into $$LU = A$$ (where $$L$$ is lower-triangular and $$U$$ is upper-triangular)? Well, we can obtain an upper-triangular matrix by using Gaussian elimination, but what about the lower-triangular matrix? We can represent the series of elementary row operations which we need to perform in order to write $$A$$ as an upper-triangular matrix as $$E_{n}E_{n-1} ... E_{1}$$. We also know that these operations have an inverse (the set of matrices which "undo" all the elementary row operations which we have applied)! If we are lucky, we didn’t have to swap any rows, and this inverse is a lower-triangular matrix. If not, then we cannot write $$A = LU$$ where $$L$$ is a lower-triangular matrix, but we can write $$PA = LU$$. Why?

After Gaussian elimination, if we carried out steps represented by the matrix $$E$$, then we have

\begin{align} A &= IA \\ &= (E^{-1} E) A && \text {As any matrix multiplied by its inverse is $I$} \\ &= (E^{-1}) EA && \text {As matrix multiplication is associative} \‚ \end{align}

Now we have an equation in the form

\begin{align} A = (E^{-1}) EA \end{align}

Unfortunately, $$E^{-1}$$ is not a lower-triangular matrix (we considered the case where it is above), but what we can do is rearrange some of the rows to make it into one, i.e. we have a matrix $$P$$ which swaps rows (a “transposition matrix”) of a matrix. In this case,

\begin{align} PA = P(E^{-1})EA \end{align}

That is, we have

$$PA = LU$$

Where $$L=PE^{-1}$$ and $$U=EA$$.


text:
### Author Guidelines

A. RESEARCH ARTICLES

1. Manuscripts should not exceed 10000 words.

2. Manuscripts must include sections below and need to be compiled in the following order:

I. Title

II. Abstract

III. Keywords

IV. Summary

V. Öz (Turkish Abstract)

VI. Anahtar Kelimeler (Turkish Keywords)

VII. Main Text

VIII. References

3. Texts need to be written in Microsoft Office Word.

4. Worksheets must be on A4 paper size and margins should be 3 cm.

5. Manuscripts should not contain any thing that gives away identity of author(s).

6. Introduction and conclusion are mandatory.

7. Abstract should include 200-250 words.

8. Summary should include 700-900 words.

9. If there is an explanation for the title, the sign * should be used.

10. Manuscript should neither contain header and footer nor page numbers.

11. No abbreviations should be made in the name of any works other than encyclopedia and classical works

Title: The ISNAD citation style, centered, Palatino Linotype font, 11 point-size. 6 nk space should be set above and below the title.

Headings: The ISNAD citation style, Palatino Linotype font, 11 point-size, not intended, justified, 0 nk space should be set above and below the headings.

Main Text: Palatino Linotype font, 10 point-size, justified, 1,15 line space.

Paragraphs: 1,25 intended on the left side, 0 nk space above the paragraphs and 6 nk space below the paragraphs need to be set.

Footnotes: The ISNAD citation style, Palatino Linotype font, 8 point-size, justified, single line space, 0 nk space above and below the lines. A line between the text and footnotes with 10 nk space above the line should be set.

Tables and Figures: Palatino Linotype font, 10 point-size, justified. Headings and references (if applies) of tables and figures should be in Palatino Linotype font, 8 point-size, justified, and single line space. Spaces should be 6 nk above and below the lines. Tables and figures should not exceed margins and need to be aligned along the left margin.

Quotations: MUST be in the ISNAD citation style. Long quotations need to be placed in a free-standing block of typewritten lines. Palatino Linotype font, 10 point-size, justified, single line space. The beginning of the paragraph quoted should not be intended, but quotation block needs to be intended 2 cm on the right and left sides. 6 nk space should be set above and below the paragraph.

References: MUST be in the ISNAD citation style, Palatino Linotype style, 10 point-size, justified, single line space. The first line of each reference should not be intended and the second line should be intended 1.25 cm along the left margin. Spaces should be set 0 nk above and 6 nk below each reference.

Abstract and Öz: Palatino Linotype font, 10 point-size, justified, and single line space.

Keywords and Anahtar Kelimeler: The ISNAD citation style, Palatino Linotype font, 10 point-size, justified, and single line space.

Abbreviations: The ISNAD citation style. If abbreviations cannot be found in the ISNAD citation style, the author should explain his/her preference in commands while submitting the manuscript.

B. BOOK REVIEWS

1. Manuscripts should be between 500-1500 words.

2. Texts needs to be written in Microsoft Office Word.

3. Worksheets must be on A4 paper size and margins should be 3 cm.

4. The title of the review should be the title of the book reviewed in ISNAD citation style.

5. If there is an explanation for the title, the sign (*) should be used.

6. Manuscript should neither contain header and footer nor page numbers.

Title: The ISNAD citation style, centered, Palatino Linotype font, 11 point-size, not intended. O nk space should be set above the title and 6 nk below the title.

Main Text: Palatino Linotype font, 10 point-size, justified, 1,15 line space.

Paragraphs: 1,25 intended on the left side, 0 nk space above the paragraphs and 6 nk space below the paragraphs need to be set.

Footnotes: The ISNAD citation style, Palatino Linotype font, 8 point-size, justified, single line space. 0 Nk space above and below should be set. A line between the text and footnotes with 10 nk space above should be set.

Tables and Figures: Palatino Linotype font, 10 point-size, justified. Headings and references (if applies) of tables and figures should be in Palatino Linotype font, 8 point-size, justified, and single line space. Spaces between the lines should be 6 nk above and below the lines. Tables and figures should not exceed margins and need to be aligned along the left margin.

Quotations: MUST be in the ISNAD citation style. Long quotations need to be placed in a free-standing block of typewritten lines. Palatino Linotype font, 10 point-size, justified, single line space. The beginning of the paragraph quoted should not be intended, but quotation block needs to be intended 2 cm on the right and left sides. 6 nk space should be set above and below the paragraph.

References: MUST be in the ISNAD citation style, Palatino Linotype style, 10 point-size, justified, single space. The first line of each reference should not be intended and the second line should be intended 1.25 cm along the left margin. Spaces should be set 0 nk above and 6 nk below each reference.

Abstract and Öz: Palatino Linotype font, 10 point-size, justified, and single line space.

Keywords and Anahtar Kelimeler: The ISNAD citation style, Palatino Linotype font, 10 point-size, justified, and single line space.

Abbreviations: The ISNAD citation style. If abbreviations cannot be found in the ISNAD citation style, the author should explain his/her preference in commands while submitting the manuscript.

C. CONFERENCE REVIEWS

1. Manuscripts should be between 500-1500 words.

2. Texts needs to be written in Microsoft Office Word.

3. Worksheets must be on A4 paper size and margins should be 3 cm.

4. The title of the review should be the title of the conference reviewed in the ISNAD citation style.

5. If there is an explanation for the title, the sign (*) should be used.

6. Manuscript should neither contain header and footer nor page numbers.

Title: The ISNAD citation style, centered, Palatino Linotype font, 11 point-size, not intended. O nk space should be set above the title and 6 nk below the title.

Main Text: Palatino Linotype font, 10 point-size, justified, 1,15 line space.

Paragraphs: 1,25 intended on the left side, 0 nk space above the paragraphs and 6 nk space below the paragraphs need to be set.

Footnotes: The ISNAD citation style, Palatino Linotype font, 8 point-size, justified, single line space. 0 Nk space above and below should be set. A line between the text and footnotes with 10 nk space above should be set.

Tables and Figures: Palatino Linotype font, 10 point-size, justified. Headings and references (if applies) of tables and figures should be in Palatino Linotype font, 8 point-size, justified, and single line space. Spaces between the lines should be 6 nk above and below the lines. Tables and figures should not exceed margins and aligned along the left margin.

Quotations: MUST be in the ISNAD citation style. Long quotations need to be placed in a free-standing block of typewritten lines. Palatino Linotype font, 10 point-size, justified, single line space. The beginning of the paragraph quoted should not be intended, but quotation block needs to be intended 2 cm on the right and left sides. 6 nk space should be set above and below the paragraph.

References: MUST be in the ISNAD citation style, Palatino Linotype style, 10 point-size, justified, single line space. The first line of each reference should not be intended and the second line should be intended 1.25 cm along the left margin. Spaces should be set 0 nk above and 6 nk below each reference.

Abstract and Öz: Palatino Linotype font, 10 point-size, justified, and single line space.

Keywords and Anahtar Kelimeler: The ISNAD citation style, Palatino Linotype font, 10 point-size, justified, and single line space.

Abbreviations: The ISNAD citation style. If abbreviations cannot be found in ISNAD citation style, the author should explain his/her preference in commands while submitting the manuscript.

D. TRANSLATIONS

1. Texts needs to be written in Microsoft Office Word.

2. Worksheets must be on A4 paper size and margins should be 3 cm.

3. Manuscripts should not contain the identity of translator(s).

4. The title of the translation should be the title of the piece translated and should not include name(s) of author(s).

5. With the sign (*) at the end of the title, the type of the piece translated (article, book chapter, presentation etc.) and the title of the piece in ISNAD citation style need to be added.

6. Manuscript should neither contain header and footer nor page numbers.

Title: The ISNAD citation style, centered, Palatino Linotype font, 11 point-size, not intended. O nk space should be set above the title and 6 nk below the title.

Main Text: Palatino Linotype font, 10 point-size, justified, 1,15-line space.

Headings: The ISNAD citation style, Palatino Linotype font, 11 point-size, not intended, justified, O nk space should be set above and below the headings.

Paragraphs: 1,25 intended on the left side, 0 nk space above the paragraphs and 6 nk space below the paragraphs need to be set.

Footnotes: The ISNAD citation style, Palatino Linotype font, 8 point-size, justified, single space. 0 Nk space above and below should be set. A line between the text and footnotes with 10 nk space above should be set.

Tables and Figures: Palatino Linotype font, 10 point-size, justified. Headings and references (if applies) of tables and figures should be in Palatino Linotype font, 8 point-size, justified, and single line space. Spaces between the lines should be 6 nk above and below the lines. Tables and figures should not exceed margins and aligned along the left margin.

Quotations: MUST be in the ISNAD citation style. Long quotations need to be placed in a free-standing block of typewritten lines. Palatino Linotype font, 10 point-size, justified, single line space. The beginning of the paragraph quoted should not be intended, but quotation block needs to be intended 2 cm on the right and left sides. 6 nk space should be set above and below the paragraph.

References: MUST be in the ISNAD citation style, Palatino Linotype style, 10 point-size, justified, single space. The first line of each reference should not be intended and the second line should be intended 1.25 cm along the left margin. Spaces should be set 0 nk above and 6 nk below each reference.

Abstract and Öz: Palatino Linotype font, 10 point-size, justified, and single line space.

Keywords and Anahtar Kelimeler: The ISNAD citation style, Palatino Linotype font, 10 point-size, justified, and single line space.

Abbreviations: The ISNAD citation style. If abbreviations cannot be found in ISNAD citation style, the author should explain his/her preference in commands while submitting the manuscript.


text:
What is Probabilistic number theory , could we rely on it ?

1. Apr 16, 2008

mhill

what is probabilistic Number theory ?? , i mean i think is the fact that you 'work' with the probability of a number being prime or square or something like that if possible i would like more info.

2. Apr 16, 2008

CRGreathouse

Google for "Cramer model of primes".


text:
## The authenticated Atom musings continue

Now that I’ve had a chance to think about this more than what was afforded by a quick response fired off between songs at a karaoke bar, I feel like expanding more on the details that I’d only implied (and probably badly) from the previous post. So, here’s how I think things could look.

For the purpose of this writeup I’ll use xx as a temporary placeholder XML namespace.

### Auth discovery

The feed would contain a <link rel="auth"> that points to the IndieAuth endpoint that validates the reader’s identity. This should, of course, support AutoAuth. (I assume that AutoAuth and IndieAuth can both be served from a single endpoint, incidentally.) Presumably the HTML renditions on the site would also include this <link> for the purpose of autodiscovery, so eventually browsers can get an extension to support AutoAuth so you never need to log in to IndieWeb sites manually.

If a feed declares this link, it is expected that supporting feed readers will fetch the feed individually per-user rather than trying to share it across all users (or will otherwise handle the fact that each user might have a different view of the feed).

Within the authenticated view, each item that is under an authentication wall should have metadata that indicates what the privacy settings are for the post. For example, there could be an <xx:privacy> tag with a rel attribute that gives a known name, and an optional text element that provides a human-readable message. If this tag exists it indicates which elements are allowed to be shared; by default, nothing is.

Possible examples:

<!-- never share anything about this item -->
<xx:privacy />

<!-- It's okay to spread the item's URN (in e.g. a favorites list) but nothing
else -->
<xx:privacy rel="id" />

<!-- Allow people to share that they liked a post and where to find it, but not
the content of the post -->

<!-- Just allow everything. Also this has a message associated with it. -->
<xx:privacy rel="*">This is a private entry but I'm okay with you reblogging it.</xx:privacy>

### Supporting WebSub and legacy readers

If someone is viewing the feed without any authorization at all, the feed should include one or more of the most recent unauthorized entries with the minimal set of metadata to indicate their existence, and with a tag indicating there’s more behind an authorization wall (and possibly a human-readable message in the <content>). For example:

<entry>
<id>urn:example:1</id>
<xx:private />
rel="alternate"
type="text/html" />
<published>1979-01-01 23:45</published>
<content type="html">This is a private entry.</content>
</entry>

The <link rel="alternate"> HREF should be one that would forward to the canonical URL if the reader were authorized, but should not provide any private information (e.g. a title slug). For example, this entry could have a URL of http://beesbuzz.biz/4594 which would then forward to its permalink. (The authorized rendition of the feed could instead link directly to the item.)

Optionally, <xx:private> could include an href attribute that points to a feed that should be pulled from by the authorized client upon receipt of this item’s WebSub notification. For example:

<entry>
<id>urn:example:2</id>
<xx:private href="http://example.com/feed?item=2" />
<!-- ... -->
</entry>

where http://example.com/feed?item=2 is a rendition of the feed that restricts it to only include this entry. (If the reader is not authorized to see the entry, the feed would simply have no entries in it.)

In any case, the purpose of this stub entry is to tell subscribers that there is new content to be seen, without necessarily indicating what the content is. It does unfortunately allow an unauthorized third party to see how many private items are being posted, however.

Anyway, when a feed reader receives a WebSub notification of an entry with this <xx:private /> element, it can initiate an authorized pull of the full feed on the behalf of every subscriber.

The inclusion of “one or more” such entry stubs allows for the possibility of letting legacy feed readers see stubs for arbitrarily many auth-walled entries, when multiple entries occur between polling intervals. The limit should probably be based on what’s a reasonable polling interval, and should probably not go back more than a day or so. This should of course be flexible based on the particular comfort level on the part of the content publisher; some might opt to limit it to 1, others might opt to put all their private entry stubs into their feeds (including RFC 5005 archive feeds). There is no single right answer for everyone.

But there definitely needs to be at least one, ideally the most recent one, to support WebSub.

### Implications of this approach

Off the top of my head:

Positives:

• Support for WebSub
• Doesn’t require complicated encryption or key exchange
• Bandwidth requirements are similar to those of a standard feed
• Low to no user impact

Downsides:

• No support for static publishing
• WebSub support requires a pull after a push, which is kind of wasteful
• More complexity for multi-user feed readers
• Leaks the existence of private posts, and statistics about private post counts can be inferred by third parties (but at least it doesn’t leak anything about how many recipients there are or how large the posts are)

Anyway, I’d personally be pretty comfortable with this set of tradeoffs. What do other folks think?


text:
# Page:Newton's Principia (1846).djvu/290

284
[Book II.
the mathematical principles

II of this Book) the moment KL of AK will be equal to ${\displaystyle \scriptstyle {\frac {2APQ+2BA\times PQ}{Z}}}$ or ${\displaystyle \scriptstyle {\frac {2BPQ}{Z}}}$, and the moment KLON of the area AbNK will be equal to ${\displaystyle \scriptstyle {\frac {2BPQ\times LO}{Z}}}$ or ${\displaystyle \scriptstyle {\frac {BPQ\times BD^{3}}{2Z\times CK\times AB}}}$.

Case 1. Now if the body ascends, and the gravity be as AB² + BD², BET being a circle, the line AC, which is proportional to the gravity, will be ${\displaystyle \scriptstyle {\frac {AB^{2}+BD^{2}}{Z}}}$, and DP² or AP² + 2BAP + AB² + BD² will be AK ${\displaystyle \scriptstyle \times }$ Z + AC ${\displaystyle \scriptstyle \times }$ Z or CK ${\displaystyle \scriptstyle \times }$ Z; and therefore the area DTV will be to the area DPQ as DT² or DB² to CK ${\displaystyle \scriptstyle \times }$ Z.

Case 2. If the body ascends, and the gravity be as AB² - BD², the line AC will be ${\displaystyle \scriptstyle {\frac {AB^{2}+BD^{2}}{Z}}}$, and DT² will be to DP² as DF² or DB² to BP² - BD² or AP² + 2BAP + AB² - BD², that is, to AK ${\displaystyle \scriptstyle \times }$ Z +

AC ${\displaystyle \scriptstyle \times }$ Z or CK ${\displaystyle \scriptstyle \times }$ Z. And therefore the area DTV will be to the area DPQ as DB² to CK ${\displaystyle \scriptstyle \times }$ Z.

Case 3. And by the same reasoning, if the body descends, and therefore the gravity is as BD² - AB², and the line AC becomes equal to ${\displaystyle \scriptstyle {\frac {BD^{2}-AB^{2}}{Z}}}$; the area DTV will be to the area DPQ, as DB² to CK ${\displaystyle \scriptstyle \times }$ Z: as above.

Since, therefore, these areas are always in this ratio, if for the area


text:
💬 👋 We’re always here. Join our Discord to connect with other students 24/7, any time, night or day.Join Here!

# At which points on the curve $y = 1 + 40x^3 - 3x^5$ does the tangent line have the largest slope?

## Slope is maximum at $(2,225)$ and $(-2,-233)$

Derivatives

Differentiation

Volume

### Discussion

You must be signed in to discuss.
##### Kristen K.

University of Michigan - Ann Arbor

##### Michael J.

Idaho State University

Lectures

Join Bootcamp

### Video Transcript

equals one plus 40 X cubed minus three X to the fifth. Does the tangent line have the largest? Look. Okay, so largest. We're gonna maximize something. Gonna maximize slope of the tangent line. All right? And to find the slope of the tangent line, we have to take the derivative. So m tan. Because why prime, which is 1 20 X square minus 15 x to the fourth. Okay, now, we're not gonna set that equal to zero because we're not looking for the tangent is equal to zero or looking for the maximum tangent. So we have to take the derivative of it in 10. Prime. So to 40 x minus 60 x cubed equals zero. We confected out of 60 x and we get four minus x squared. So X is plus or minus two. And so then why is one plus 40 times two cubed minus three times to to the fifth tomorrow. Plus too cute 40 minus 12 one. Plus, um, maybe why don't I just do this on my calculator? That might be easier. Okay, let's see now. You know what? I can do that to Cuba today. Eight times 43. 20 to do the 5th, 32 32 times 3 96. So 3. 21 minus 96 five two. So 2. 25. So two comma 2 25. And then if you put a minus in there, it's minus 3 28 plus 96. So it will be 3. 20 minus 97. So three forever tu minus 2 23 minus 2 a.m. minus 2. 23.

WZ

Derivatives

Differentiation

Volume

Lectures

Join Bootcamp


text:
# [freehaven-dev] Revocation

\subsection{Revocation}

The ability to revoke or unpublish shares would provide much greater
flexibility to the Free Haven system. Specifically, this would allow
a much more realistic emulation of an actual read-write filesystem,
where published documents could be updated as newer versions became
available. Indeed, it also allows political dissidents who publish under
their real name to realize their mistake and unpublish the documents.

Revocation could be implemented by allowing the author to come up with
a random private value $x$, and then publishing $H(x)$ inside each
share. If the author wants to unpublish a document, he would broadcast
an unpublish request along with his original value $x$ (and also $H(x)$
for the sake of convenience and efficiency), and all servers which are
currently holding shares of the document would expire them.

However, there are a number of extra attacks this allows on the system:
\begin{itemize}
\item It complicates the buddy system greatly, since we're not sure that
the unpublish request would reach the buddy of a given share. Indeed,
an adversary might send unpublishing requests to some members of the
servnet and not others, in an attempt to cause havoc in the trust system,
or even to try to gain insight into the current location of some shares.
\item Authors might use the same hash for new shares, and thus link'
documents. Adversaries might also use the same $H(x)$ even though they
are unaware of the value of $x$: this would cause artificial linking,
as observers might conclude that the publisher of the original document
also published the later documents.
\item The presence of an unpublishing tag $H(x)$ in a share assigns
a sort of ownership' to a share that is not present otherwise. This
may have subtle implications towards publisher and reader anonymity --
for instance, a publisher who remembers his $x$ has evidence on his
computer that he was associated with that share, thus breaking perfect
forward author-anonymity.
\end{itemize}

In addition, if revocation exists, then the Church of Scientology (or
other relevant intelligence agency) has an incentive to track down the
original author of the document, because chances are good he still has
the value $x$ which would allow them to remove the document from Free
Haven. Even if the author immediately destroys his $x$, the adversary has
sufficient reason to suspect that he still has it that it is worthwhile
for them to spend resources tracking him.

This problem can be ameliorated by making the unpublishing tag optional.
This means that the share itself will make it clear whether that share
can be unpublished, so if no unpublishing tag is present, there should
be no reason to try to track down the author.  However, even with
this protection the Church can still republish the document {\em with}
a revocation tag, and use that as reasonable cause' for hunting down
the publisher.

Because the ability to revoke shares potentially puts the original
publisher in increased physical danger, as well as increasing the set
of attacks on the servnet infrastructure, we chose to leave revocation
out of the current design.

`


text:
# How does a mostly non-polar molecule prevent a polar head from being pulled off by other polar molecules?

Linear-shaped molecules of a solute with a large non-polar section and a small polar head are not soluble in a polar solvent. Why is this? Why don't the attractive forces between a molecule of polar solvent and the small polar head of the solute molecule cause the polar head of the solute molecule to dissociate?

The typical explanation I find on google is that the non-polar section "outweighs" or "is greater than" the polar head, but I'm a little confused as to what that means.

Let's consider octanol $\ce{CH3(CH2)7OH}$ in water. We need to break the hydrogen bonds between octanol molecules and the London dispersion forces in them to separate the molecules, and we need to break the hydrogen bond network in water to accommodate each octanol molecule. Then, we surround each octanol molecule by water molecules. Only the polar head ($\ce{OH}$) will be able to form new hydrogen bonds (and account for the broken ones), but the interaction between water and the hydrophobic tail is merely permanent dipole-induced dipole, which are weak compared to all the hydrogen bonds we had to break between the water molecules to be able to accomodate the large hydrophobic portion, so we're losing energy rather than gaining it. Thus, this will be poorly soluble in water.


text:
5

# Find the following for each function: (a) $f(0)$,(b) $f(1)$,(c) $f(-1)$,(d) $f(-x)$,(e) $-f(x)$,(f) $f(x+1)$,(g) $f(2 x)$,(h) $f(x+h)$.$$f(x)=1- rac{1}{(x+2)^{2}}$$...

## Question

###### Find the following for each function: (a) $f(0)$,(b) $f(1)$,(c) $f(-1)$,(d) $f(-x)$,(e) $-f(x)$,(f) $f(x+1)$,(g) $f(2 x)$,(h) $f(x+h)$.$$f(x)=1- rac{1}{(x+2)^{2}}$$

Find the following for each function: (a) $f(0)$,(b) $f(1)$,(c) $f(-1)$,(d) $f(-x)$,(e) $-f(x)$,(f) $f(x+1)$,(g) $f(2 x)$,(h) $f(x+h)$. $$f(x)=1-\frac{1}{(x+2)^{2}}$$

#### Similar Solved Questions

##### Points BerrApCalBr7 5.6.071My NotesAn experimental drug lowers patient's blood serum cholesterol at the rate of administered (0 < t <5). Find the total change during the first days_ unitsunits per day, where Is the number of days since the drug was
points BerrApCalBr7 5.6.071 My Notes An experimental drug lowers patient's blood serum cholesterol at the rate of administered (0 < t <5). Find the total change during the first days_ units units per day, where Is the number of days since the drug was...
##### Use the Product Rule to differentiate the function:f(x) (2x + S)(x3 4)f(x)
Use the Product Rule to differentiate the function: f(x) (2x + S)(x3 4) f(x)...
##### Find fx(x,y) and fy(x,y): Then find fx(2, ~- 1) and Y_ (2,6). f(x,y) = - 4 e 9x ~ 4yfx(x,y)
Find fx(x,y) and fy(x,y): Then find fx(2, ~- 1) and Y_ (2,6). f(x,y) = - 4 e 9x ~ 4y fx(x,y)...
##### Sample of neon gas at a pressure of 0.781 atm and temperature of 205 C; occupies Folume of 636 mL. Ifthe gas is heated at constant pressure Until its volume is 778 mL_ the temperature of the gas sample Will beSubmit AnswerTry Another Version10 item attempts remaining
sample of neon gas at a pressure of 0.781 atm and temperature of 205 C; occupies Folume of 636 mL. Ifthe gas is heated at constant pressure Until its volume is 778 mL_ the temperature of the gas sample Will be Submit Answer Try Another Version 10 item attempts remaining...
##### FULL SCREEHPRINTER VERSIOHBACKChapter 7 Review Exercises, Question 069Incorrect:Solve the equation.42 (1 - 0.3') = 36Enter the exact answer.Note that "t =" is already provided_ Do not include this in your submitted response to this question.6 1EditClick if you would like to Show Work for this question: Qpen Show Work
FULL SCREEH PRINTER VERSIOH BACK Chapter 7 Review Exercises, Question 069 Incorrect: Solve the equation. 42 (1 - 0.3') = 36 Enter the exact answer. Note that "t =" is already provided_ Do not include this in your submitted response to this question. 6 1 Edit Click if you would like to...
##### How Question many 60 Moving valance to another electrons question does save need to Atnls share response make octet? polnts quoneeno 8Moving to another question will save this 'response:NOQuestic
How Question many 60 Moving valance to another electrons question does save need to Atnls share response make octet? polnts quoneeno 8 Moving to another question will save this 'response: NO Questic...
##### Locate the stereogenic center in each compound and draw both enantiomers.
Locate the stereogenic center in each compound and draw both enantiomers....
##### Which of the following E gives rise t0 1-hexene promincnt - Pcak in tbc mass sdecim mlz of 412 2-hexyne 3-hexanol 2-chlorohexaneQUESTION 16but does iet enepaby # Ioe-WM #iide" pakat E 10C0-1250cu (suah gives an infrared spectrum with compounds_ Which of the following
Which of the following E gives rise t0 1-hexene promincnt - Pcak in tbc mass sdecim mlz of 412 2-hexyne 3-hexanol 2-chlorohexane QUESTION 16 but does iet enepaby # Ioe-WM #iide" pakat E 10C0-1250cu (suah gives an infrared spectrum with compounds_ Which of the following...
##### Use mathematical induction to prove that each statement is true for every positive integer $n .$ $$2+7+12+\dots+(5 n-3)=\frac{n(5 n-1)}{2}$$
Use mathematical induction to prove that each statement is true for every positive integer $n .$ $$2+7+12+\dots+(5 n-3)=\frac{n(5 n-1)}{2}$$...
##### Propose a sequencing strategy for the followingpolypeptideAla-Arg-Met-Pro-Tyr-Trp-Gly-Cys-Met-Arg-Trp-Pro-Lys-Met-Val-Met-Lys-Cys-Arg-Pro-SerInclude the complete sequence of the fragments generatedbased on your sequencing strategy.Bonus: How many bands would you expect to see on an SDS-PAGE inthe presence and in the absence of 2-mercaptoethanol?
Propose a sequencing strategy for the following polypeptide Ala-Arg-Met-Pro-Tyr-Trp-Gly-Cys-Met-Arg-Trp-Pro-Lys-Met-Val-Met-Lys-Cys-Arg-Pro-Ser Include the complete sequence of the fragments generated based on your sequencing strategy. Bonus: How many bands would you expect to see on an SDS-PAGE in ...
##### (139) Problem 1: Suppose 1900 kg elephant is charging hunter at speed of 3.5 mls_select part33 % Part (a) Calculate the momentum of the elephant kilogram meters per second.Grade Summary Deductions Potential 100 %sin() coso tan() cotano) asino) acoso) atanO) acotano) sinho) cosho tanho cotanho Degrees RadiansTTOMESubmissions Attempts remaining: _Q per attempt) delailed viewBNDPACKSPA CRCLEARSubmitHintFeedbackgive UplHints: 09 deduction per hint. Hints remaining:Feedback: 0G_ deduction per feedb
(139) Problem 1: Suppose 1900 kg elephant is charging hunter at speed of 3.5 mls_ select part 33 % Part (a) Calculate the momentum of the elephant kilogram meters per second. Grade Summary Deductions Potential 100 % sin() coso tan() cotano) asino) acoso) atanO) acotano) sinho) cosho tanho cotanho ...
##### SWSSDF217.58Among Treatments679.71Error8782.29 LITotal
SW SS DF 217.58 Among Treatments 679.71 Error 8782.29 LI Total...
##### Evaluate the integral: (Remember to use absolute values where appropriate: Use â‚¬ for the constant of Integratlon: ) 7 tan?(x) sec(x) dx
Evaluate the integral: (Remember to use absolute values where appropriate: Use â‚¬ for the constant of Integratlon: ) 7 tan?(x) sec(x) dx...
##### Two narrow slits are separated by distance d. Their interference pattern is to be observed on screen large dlistance away: Calculate the spacing Y of the maxima of the screen for light of wavelength 500 nm wnen m and 0 = Would you expect to observe the interference of light on the screen for this situation? Explain_ How close together should the slits be placed for the maxima to be separated by mm for this wavelength and screen distance.
Two narrow slits are separated by distance d. Their interference pattern is to be observed on screen large dlistance away: Calculate the spacing Y of the maxima of the screen for light of wavelength 500 nm wnen m and 0 = Would you expect to observe the interference of light on the screen for this si...


text:
# Find density of mixture if the same mass of two fluids are mixed together. (densities of both the fluids are d1 and d2 )

19 views
in Physics
closed
Find density of mixture if the same mass of two fluids are mixed together. (densities of both the fluids are d1 and d2 )
1. ${d_1+d_2 \over 2}$
2. $\sqrt{d_1d_2 }$
3. ${1 \over d_1}+{1 \over d_2}$
4. ${2d_1d_2 \over d_1+d_2}$

by (30.0k points)
selected

Correct Answer - Option 4 : ${2d_1d_2 \over d_1+d_2}$

CONCEPT:

• The relation between mass, density, and volume is given by:

mass = density × Volume

m = d × V

EXPLANATION:

Given that both the fluids have the same mass. Let it is m.

The density of first fluid = d1

Volume of first fluid = V1 = m / d1 ................(i)

The density of second fluid = d2

Volume of second fluid = V2 = m / d2 ................(ii)

Now after mixing the fluids.

$Density ~of~ mixture = {Total~mass \over Total ~volume}$

$Density ~of~ mixture = {m+m \over V_1+ V_2}$

From eq (i) and (ii)

$Density ~of~ mixture = {2m \over {m \over d_1}+ {m \over d_2}}$

$Density ~of~ mixture = {2 \over {1 \over d_1} + {1 \over d_2}}$

$Density ~of~ mixture = {2 d_1 d_2 \over {d_1 + d_2}}$

So the correct answer is option 4.


text:
Theory

# ZOOM Yao Ma

Thursday, 2 July 2020 from to (Europe/Amsterdam)
at Nikhef
 Description Title: A Forest-based Infrared Subtraction for Wide-angle Scattering Abstract: For any hard QCD amplitude with massless partons, infrared (IR) singularities arise from pinches in the complex planes of loop momenta, called pinch surfaces. To organize and study their leading behaviors in the neighborhoods of these surfaces, we can construct approximation operators for collinear and soft singularities. In my talk, I will develop a BPHZ-like forest formula to subtract the IR singularities systematically. A related analysis has been carried out by Collins for the back-to-back Sudakov form factors, and is generalized here to any wide-angle kinematics with an arbitrary number of external momenta. After a brief introduction to Minkowskian IR divergences in momentum space, I will first illustrate that the approximations yield much richer IR structures than those of an original amplitude, then construct the forest formula and prove that all the singularities appearing in its subtraction terms cancel pairwise. Finally, with the help of this forest formula, the full amplitude can be reorganized into a factorized expression. (Password to access the Video recording: 6b\$B37x3) Material:


text:
## College Algebra (11th Edition)

Published by Pearson

# Chapter 7 - Section 7.2 - Arithmetic Sequences and Series - 7.2 Exercises: 12

#### Answer

$3-\sqrt{2},3,3+\sqrt{2}, 3+2\sqrt{2},3+3\sqrt{2}$

#### Work Step by Step

$\bf{\text{Solution Outline:}}$ To find the first $5$ terms, solve first the common difference. Then keep adding the common difference to the given second term. $\bf{\text{Solution Details:}}$ The common difference is the difference between a term and the term before it. Hence, the common difference, $d,$ is \begin{array}{l}\require{cancel} d=a_2-a_1 \\\\ d=3-(3-\sqrt{2}) \\\\ d=3-3+\sqrt{2} \\\\ d=\sqrt{2} ,\end{array} Adding the common difference, the third term is \begin{array}{l}\require{cancel} a_3=a_2+d \\\\ a_3=3+\sqrt{2} ,\end{array} the fourth term is \begin{array}{l}\require{cancel} a_4=a_3+d \\\\ a_4=3+\sqrt{2}+\sqrt{2} \\\\ a_4=3+2\sqrt{2} ,\end{array} and the fifth term is \begin{array}{l}\require{cancel} a_5=a_4+d \\\\ a_5=3+2\sqrt{2}+\sqrt{2} \\\\ a_5=3+3\sqrt{2} ,\end{array} Hence, the first $5$ terms are $3-\sqrt{2},3,3+\sqrt{2}, 3+2\sqrt{2},3+3\sqrt{2} .$

After you claim an answer you’ll have 24 hours to send in a draft. An editor will review the submission and either publish your submission or provide feedback.


text:
# How to determine the Jacobian Ratio for triangle element?

I am trying to implement an algorithm to find the Jacobian ratio for each triangle in mesh as a part of mesh quality check.

Let's say that I have vertices of the triangle: $$P_1(x_1, y_1, z_1)$$, $$P_2(x_2, y_2, z_2)$$, $$P_3(x_3, y_3, z_3)$$. Having this data how to determine the Jacobian ratio of the triangle?

• What is the Jacobian ratio? – nicoguaro Mar 6 at 13:24
• it is a measure of the deviation of a given element from an ideally shaped element – Aravindh SK Mar 6 at 13:37
• Do you have a reference where it is defined? – nicoguaro Mar 6 at 13:37
• I read on random website. – Aravindh SK Mar 6 at 13:39
• I believe that there are 3 things that define the mesh quality: 1) Aspect Ratio: which is the ratio between the largest and the smallest edge of the element. The closer to 1, the better. 2) Internal angles: they should be close to the angles of an element with no distortion. 3) Jacobian determinant: must be positive. – Gustavo Costa Apr 7 at 19:04

## 2 Answers

It seems that the Jacobian ratio is defined as the ratio between the maximum and minimum Jacobian determinant in an element [1, 2]. And, that a value between 0.33333 and 1 is good-enough [3].

Nevertheless, for linear elements, the Jacobian is constant and thus the same over each element. As mentioned by @GustavoCosta, 3 descriptors commonly used for element quality check are aspect Ratio, internal angles, and Jacobian determinant. But there are many more as mentioned in a previous answer and references there. You might also want to check reference 4.

### References

1. Kwok, W., & Chen, Z. (2000, October). A Simple and Effective Mesh Quality Metric for Hexahedral and Wedge Elements. In IMR (pp. 325-333).

2. Bi, Z. (2017). Finite Element Analysis Applications: A Systematic and Practical Approach. Academic Press.

3. Bucki, M., Lobos, C., Payan, Y., & Hitschfeld, N. (2011). Jacobian-based repair method for finite element meshes after registration. Engineering with Computers, 27(3), 285-297.

4. Shewchuk, J. R. (2002). What is a good linear finite element? interpolation, conditioning, anisotropy, and quality measures (preprint). University of California at Berkeley, 73, 137.

I suppose you have calculated the determinant of the Jacobian, and you may calculate the Jacobian ratio by the ratio of the maximum and the minimum of the determinant value. Please refer to this link if you have difficulties to calculate the Jacobian.

• Can you add a reference where they define this measure? – nicoguaro Mar 7 at 16:23
• You may refer to the "Basic Finite Element Method as Applied to Injury Biomechanics" books, they give examples to calculate the Jacobian ratio in Gaussian quadrature nodes. The definition of the Jacobian Ratio can be found in "Finite Element Analysis Applications: A Systematic and Practical Approach". – Lele Mabur Mar 8 at 3:24
• @Lele Mabur, I have already read but I didn't understand properly how they have defined J matrix. – Aravindh SK Mar 8 at 9:38
• @AravindhSK sorry for late response, I suggest you look an open source software for FE mesh generator, e.g. gmsh. They have build in function API to call in some programming language. Maybe the documentation will help you a bit. Thanks – Lele Mabur May 20 at 5:54
• @AravindhSK take a look at gitlab.onelab.info/gmsh/gmsh/-/blob/master/Mesh/… if you familiar with C++ – Lele Mabur May 20 at 6:11


text:
# Doppler method for detecting exoplanets

Why does the Doppler method for detecting exoplanets only give the minimum mass for the exoplanet and not the actual mass?

Is it to do with whether the exoplanet is a face on orbit or a side on orbit?

If the exoplanetary orbital plane is "face-on", then the velocity of the orbited host star, as viewed from Earth, will not change at all. If it is viewed "side-on", then the amplitude of the velocity variations will be equal to the orbital speed of the host star around the system centre of mass. At angles in between then the velocity amplitude gives a component of the host star speed, which is usually labelled $v_r \sin i$, where $i$ is the "inclination" of the orbital plane (zero for face-on, and 90 degrees for side-on).
Armed with this velocity amplitude one can estimate the mass of the exoplanet using Kepler's third law, which when rearranged to use the system properties that can be measured, yields $$\frac{(m \sin i)^3}{(m+M)^2} = \frac{P}{2\pi G} (v_r \sin i)^3,$$ where $m$ is the exoplanet mass, $M$ is the stellar mass (must be estimated somehow) and $P$ is the orbital period (which can also be estimated from the doppler velocity variation).
The things on the RHS of this equation are measured and allow you to infer what is on the LHS. But as you can see, the LHS still contains the unknown inclination angle. Since $\sin i \leq 1$, this means any estimate of $m$ is a lower limit.


text:
My quest for free and accessible data continues. This time turning to https://alpaca.markets/. They provide both stock and crypto trades and quotes with the ability to easily backload a database.

Enjoy these types of posts? Then you should sign up for my newsletter. It’s a short monthly recap of anything and everything I’ve found interesting recently plus any posts I’ve written. So sign up and stay informed!

I’m no stranger to writing API wrappers in Julia for various data sources, I revitalised AlphaVantage.jl and also behind CoinbasePro.jl, each providing a slightly different type of data. The same is now for Alpaca Markets data. AlphaVantage only provides candle data for stocks, whereas Alpaca gives you both quotes and trades. This gives a new angle to look at the markets with much more granular data. Likewise, with CoinbasePro.jl, it is good for providing real-time data, but when you try and get historical data it is limited. Alpaca removes these limits and lets you backfill as much as needed. It might take some time but gives your laptop to do something while you sleep.

Their data is from IEX (of Flash Boys fame). They provide the both the quote and trade data free from their website https://exchange.iex.io/products/market-data-connectivity/, so this AlpacaMarkets.jl acts as an easy wrapper around this data through Alpaca. Plus if Alpaca ever add more sources you will get this without too much trouble as well.

I’ve written exact wrappers to their exposed functions, but also added some functions that will help you get the data you need without worrying about formatting timestamps or managing pagination responses.

To get started with the API you’ll need to sign up to AlpacaMarkets and get some API keys.

## Getting API Credentials for Alpaca Markets

You need to sign up to Alpaca markets to obtain your developer keys to connect to their services. Once you have both the key and the secret you need to authenticate AlpacaMarkets.jl.

You can do this manually, using:

using AlpacaMarkets
AlpacaMarkets.auth(KEY, SECRET)

Where KEY and SECRET are the two values personal to you.

Or you can make sure you are always authenticated by including the keys in your startup.jl file in .julia/config/.

ENV["ALPACA_KEY"] = KEY
ENV["ALPACA_SECRET"] = SECRET

Once this is done you should all be good to go!

## Free Stock Data Market

Now we are set up, we can get going with pulling some data. A few packages are needed to make our lives easier. Most importantly, AlpacaMarkets.jl.

using AlpacaMarkets
using Dates, DataFrames, DataFramesMeta
using Statistics
using Plots
using TimesDates

## Stock Quote Data

A quote is a price you could buy or sell a stock for. Across the US equity landscape, there are different exchanges where you could trade a stock, so at any given time there is one place that offers the best price to buy and sell a stock.

If we look at just 1 second’s worth of quotes we get quite a bit of data back.

aapl = AlpacaMarkets.get_stock_quotes("AAPL",
DateTime("2022-01-27T15:00:00"),
DateTime("2022-01-27T15:00:01"))
first(aapl, 3)

3 rows × 10 columns (omitted printing of 2 columns)

apasaxbpbsbxct
Float64Int64StringFloat64Int64StringAnyString
1163.082Q163.061PR2022-01-27T15:00:00.007177Z
2163.082Q163.054QR2022-01-27T15:00:00.007566848Z
3163.082K163.054QR2022-01-27T15:00:00.010519578Z

In the ax and bx columns (ask exchange and bid exchange) we can see what venue was offering that price at a given time. More on that later.

If we want to look at this data we have to convert the timestamp into a Julia DateTime object. The values that come down the wire are a little funky, so I’ve written a help function in the AlpacaMarkets.jl module to help.

function convert_t_timestamp(x)
ts =  first(x, 23)

if endswith(ts, "Z")
ts = chop(ts)
end
DateTime(ts)
end

function convert_t_time(x)
ts = split(x, "T")[2]
ts = first(ts, 12)
if endswith(ts, "Z")
ts = chop(ts)
end
Time(ts)
end

However, Julia’s default DateTime type only allows up millisecond precision. When we look at our data we have up to nanoseconds, so need to use the TimeDate.jl package to account for these extra digits.

aapl = @transform(aapl, :TimeStamp = convert_t_timestamp.(:t),
:TimeStamp_nano = TimeDate.(string.(chop.(:t))));

We now plot the bid and ask price.

ticks = minimum(aapl.TimeStamp):Millisecond(250):maximum(aapl.TimeStamp)
tick_labels = Dates.format.(ticks, "HH:MM:SS.sss")

plot(aapl.TimeStamp, aapl.ap, label = "Ask Price", seriestype=:steppre, xticks = (ticks, tick_labels))
plot!(aapl.TimeStamp, aapl.bp, label = "Bid Price", seriestype=:steppre)

There we go, the movement of the best bid and ask price over one second. Most data sources would condense this into a single open-high-low-close bar, whereas AlpacaMarkets.jl is giving us the raw data underneath that data. All for free!

This means you can now calculate things like:

• Quote intensity - how often there is a new price in a set period,
• Order flow imbalance - how the supply and demand changes in the order book,
• Tick by tick models - predicting what the next tick will be, easier than predicting what the next price will be.

I’ve written about Order flow imbalance before in the crypto markets. It is about looking at frequent changes in the best ask/offer and the amount that corresponds to these prices. Each small change gives us an idea of the supply and demand and can reasonably predict future price movements.

Overall, getting the raw best bid/offers from Alpaca across all these stocks is a treasure trove of information, and using my package you can easily save a database worth of data for your project.

Alpaca Markets also give us access to what trades, so stock transactions, that happened over some time. This records how much stock was traded at a given time and for what price.

Again we will look at the same one-second period.

aaplTrades  = AlpacaMarkets.get_stock_trades("AAPL", DateTime("2022-01-27T15:00:00"), DateTime("2022-01-27T15:00:01"))

5 rows × 8 columns

cipstxzsymbol
AnyInt64Float64Int64StringStringStringString
1@39300163.07252022-01-27T15:00:00.010519578ZQCAAPL
2I39300163.07252022-01-27T15:00:00.010519578ZQCAAPL
3@39301163.081002022-01-27T15:00:00.010519578ZQCAAPL
4@39302163.081002022-01-27T15:00:00.010519578ZQCAAPL
5@7109163.081002022-01-27T15:00:00.010711251ZUCAAPL

We can see a new column, c which has different symbols for each row. This is the condition code and describes the type of trade. For the first two trades we see:

• @ : Is a regular trade
• I: is an odd lot trade

The x column dictates where the trade happened, so the venue that executed the trade. The z column tells us what tape the trade was recorded on. There are three possible tapes, A, B, and C.

Again, we convert the timestamp and plot it against the prices. We also want just the unique trade ids (i) to make sure each trade is represented once.

aaplTrades = unique(aaplTrades, :i)
:TimeStamp_nano = TimeDate.(string.(chop.(:t))));

plot(aapl.TimeStamp, aapl.ap, label = "Ask Price", seriestype=:steppre, xticks = (ticks, tick_labels))
plot!(aapl.TimeStamp, aapl.bp, label = "Bid Price", seriestype=:steppre)

The trades line up nicely with the prices at the same time and we can see the series of trades that drove the price higher between 500 and 750 milliseconds past 15:00.

We’ve now got quite a complete picture of what happened in the second between 15:00:00 and 15:00:01.

It’s now up to you to use that data how you see fit. Here I’ll demonstrate a few ideas.

## Equity Venue Analysis

There are so many stock trading venues in the US, but what ones are good? If you’ve read Flash Boys, you might think they are all bad except for IEX. If you’ve read The Lean Startup you might think that the Long Term Stock Exchange is a good idea. But marketing and popularity aside, this is a key question for people that are fine-tuning their execution to ensure the best possible price.

But generally, we want to consider two things:

• How long did they have the best price?
• How much volume did they have at this best price?

So using our quote data we can try and calculate some statistics.

Let’s pull some Apple quotes over one hour now.

aaplVenue = AlpacaMarkets.get_stock_quotes("AAPL", DateTime("2022-01-27T15:00:00"), DateTime("2022-01-27T16:00:00"))
first(aaplVenue, 4)

4 rows × 10 columns (omitted printing of 2 columns)

apasaxbpbsbxct
Float64Int64StringFloat64Int64StringAnyString
1163.082Q163.061PR2022-01-27T15:00:00.007177Z
2163.082Q163.054QR2022-01-27T15:00:00.007566848Z
3163.082K163.054QR2022-01-27T15:00:00.010519578Z
4163.082K163.061QR2022-01-27T15:00:00.010547447Z

Using the TimeDate package we can create an object with the correct resolution up to the nanosecond as reported by Alpaca Markets. We then calculate how long that price was the best bid or offer using diff.

function get_ns(x)
getfield(x, :value)
end

aaplVenue = @transform(aaplVenue, :TimeStamp = convert_t_timestamp.(:t),
:TimeStamp_nano = TimeDate.(string.(chop.(:t))));
aaplVenue = @transform(aaplVenue, :TimeDelta = [diff(:TimeStamp_nano); NaN])
aaplVenue = aaplVenue[1:(end-1), :]
aaplVenue = @transform(aaplVenue, :ns = get_ns.(:TimeDelta));

Now for each venue, plus bid and ask price, we group by the exchange and calculate the following:

• How many times it was the best bid and best offer
• The average number of shares available at this price
• How long was the quote the best bid or offer.

This gives us three different values to assess the ‘quality’ of each venue.

gdata_bids = groupby(aaplVenue, :bx)
venue_bids = @combine(gdata_bids, :n_best_bid = length(:c),
:avg_size_bid = mean(:as),
:avg_time_best_bid = mean(:ns) * 1e-9)
rename!(venue_bids, ["venue", "n_best_bid", "avg_size_bid", "avg_time_best_bid"])

venue = leftjoin(venue_bids, venue_asks, on = "venue")
venue = leftjoin(venue, rename!(AlpacaMarkets.STOCK_EXCHANGES, ["Name", "venue"]), on = "venue")

4 rows × 4 columns

String?Int64?Float64?Float64?
1NYSE American (AMEX)15361.834640.0107363
2NASDAQ OMX BX1611.956520.0152946
3National Stock Exchange483.333330.00691273
4MIAX294311.268290.00747923

Plus all the values for the bid side too.

Now let’s visualise it with a quadrant plot.

plot(log.(venue.n_best_bid), venue.avg_size_bid, seriestype = :scatter,
label = :none, group = venue.venue,
series_annotations = text.(venue.Name, :bottom, pointsize=8),
xlabel = "log (Number of Times Best Bid)",
ylabel = "Average Bid Size")
hline!([mean(venue.avg_size_bid)], label=:none, color=:black)
vline!([mean(log.(venue.n_best_bid))], label=:none, color=:black)

plot(log.(venue.n_best_ask), venue.avg_time_best_ask, seriestype = :scatter,
label = :none, group = venue.venue,
series_annotations = text.(venue.Name, :bottom, pointsize=8),
xlabel = "log (Number of Times Best Ask)",
ylabel = "Average Time Best Ask (seconds)")

There are two clusters of exchanges and those to the right look like the best. They are top of book the most and also quote the largest size. To give an idea of size IEX quotes about 0.5 more shares than the Members Exchange. For Apple with a share price of around $175, you can trade$87.5 more notional with IEX (on average) than the Members Exchange, so if you have a large order, it might mean going to the market fewer times and therefore paying fewer transaction costs.

Ok so that’s something interesting with the quotes, what about the trades?

When Alpaca Markets sends us the trades there is no indication if the trade was a buy or a sell. This can make analysis slightly harder as we first have to try and guess the sign of the trade. If we look at the plot of the trades again we can see that the trades happen predicatably.

Most of the trades happen at the higher ask price, so they are probably buying, and likewise, some trades fall on the bid price line. These are probably sales.

Now guessing what sign the trades has plenty of academic research behind it. One of the typical methods is the Lee-Ready algorithm which looks at where the trade is compared to the quoted mid-price at the time of the trade. If the trade is above the mid-price then it is likely that the trade was a buy and vice versa, if it was below it was likely a sell.

To evaluate this algorithm we have to join the trades with the closest prices. Normally this would just be an ASOF join, but we have to hack our way around this in Julia.

tradeTimes = aaplTrades.TimeStamp_nano
quoteTimes = aapl.TimeStamp_nano

aaplTrades[1:4, ["t", "TimeStamp_nano", "p", "ap", "bp", "Mid"]]

4 rows × 6 columns (omitted printing of 2 columns)

tTimeStamp_nanopap
StringTimeDateFloat64Float64
12022-01-27T15:00:00.010519578Z2022-01-27T15:00:00.010519578163.07163.08
22022-01-27T15:00:00.010519578Z2022-01-27T15:00:00.010519578163.07163.08
32022-01-27T15:00:00.010519578Z2022-01-27T15:00:00.010519578163.08163.08
42022-01-27T15:00:00.010519578Z2022-01-27T15:00:00.010519578163.08163.08

With the prices added we check the sign of the difference between the traded price and the mid-price to classify it as a buy or sell.

function classify_trade(x)
if x == 0
return "Unknown"
elseif x == 1
else
return "Sell"
end
end