text:
# Where do these constants in equations come from?

1. Nov 30, 2007

### SticksandStones

Something I've always wondered: how did Physicists and Mathematicians of years past discover equations with these integer (and even fraction) constants in them?

Take for example the mean-square-speed equation:
$$\mu \equiv \sqrt{\frac{3RT}{M_{m}}}$$

or Kinetic Energy:
$$\frac{1}{2}mv^{2}$$
How do they discover this 3 and .5? It seems arbitrary.

2. Nov 30, 2007

### robphy

This 3 comes from dimensionality of space... which plays a role in the statistical treatment of the ideal gas law.
This .5 comes from the integral of v dv, which arises from the definition of work and Newton's Second Law.

These relations are derived from first principles...

Last edited: Nov 30, 2007
3. Nov 30, 2007

### Mk

The integer and even fraction constants are usually pretty apparent when you go through a derivation.

4. Nov 30, 2007

### Astronuc

Staff Emeritus
Hyperphysics is one good site to explore some of these questions, e.g.

http://hyperphysics.phy-astr.gsu.edu/hbase/kinetic/kintem.html
http://hyperphysics.phy-astr.gsu.edu/hbase/kinetic/molke.html
http://hyperphysics.phy-astr.gsu.edu/hbase/kinetic/maxspe.html

5. Dec 1, 2007

### SticksandStones

Something I forgot to leave out of my original post is my surprise at how often it turns out to be an integer (or simple fraction) that it is multiplied by.
Although I guess going through and deriving it shows why.

6. Dec 1, 2007

### Moridin

When it comes to empirical investigation of constants, remember that, say, 100000000000000000000/100000000000000000001, is pretty close to 1. It is convenience to choose one; and the fact that there is no measurable difference.

7. Dec 2, 2007

### Mephisto

its not ALWAYS an integer... A famous number for example is the golden ratio, which is like (1+sqr(5))/2 ~= 1.62
Or... number pi? Area of Circle = pi*r^2 ?
Many times in formulas you have square roots of things, which are irrational numbers... there are PLENTY of examples where the constants are not integers.


text:
Suggested languages for you:

Americas

Europe

47P

Expert-verified
Found in: Page 344

### Fundamentals Of Physics

Book edition 10th Edition
Author(s) David Halliday
Pages 1328 pages
ISBN 9781118230718

# A tunnel of length L=150 m, height H=7.2 m, and width 5.8 m (with a flat roof) is to be constructed at distance d=60 m beneath the ground. (See the Figure.) The tunnel roof is to be supported entirely by square steel columns, each with a cross-sectional area of 960 cm2. The mass of 1.0 cm3 of the ground material is 2.8 g. (a) What is the total weight of the ground material the columns must support? (b) How many columns are needed to keep the compressive stress on each column at one-half its ultimate strength?

1. The total weight of the ground material the columns must support is $1.4×{10}^{9}\mathrm{N}$.
2. Number of columns that are needed to keep are 75.
See the step by step solution

## Step 1: Determine the given quantities

1. A tunnel of length L=150 m and height H=7.2 m and width 5.8 m which is at distance, d=60 m
2. Area of tunnel roof is 960 cm2
3. Mass of 1.0 cm3 of the ground material is 2.8 g

## Step 2: Determine the formulas:

Consider the formula for the density as:

$\mathrm{\rho }=\frac{\mathrm{m}}{\mathrm{v}}$ ….. (i)

Here, $\mathrm{\rho }$ is density of the material, m is mass, and v is volume.

Consider the formula for the weight as:

w=mg ……. (ii)

Here, w is weight, m is mass, and g is gravitational acceleration.

## Step 3: (a) Determine the total weight of the ground material the columns must support

Determine the area of the roof as:

$\begin{array}{rcl}\mathrm{A}& =& 150\mathrm{m}×5.8\mathrm{m}\\ & =& 870{\mathrm{m}}^{2}\end{array}$

Consider the volume of the material is obtained as:

$\begin{array}{rcl}\mathrm{V}& =& \mathrm{A}×\mathrm{d}\\ & =& 870{\mathrm{m}}^{2}×60\mathrm{m}\\ & =& 52200{\mathrm{m}}^{3}\end{array}$

Solve for the density of the material as:

$\begin{array}{rcl}\mathrm{\rho }& =& 2.8\frac{\mathrm{g}}{{\mathrm{cm}}^{3}}\\ & =& 2800\frac{\mathrm{kg}}{{\mathrm{m}}^{3}}\end{array}$

Determine the mass using equation (i) as,

$\begin{array}{rcl}\mathrm{\rho }& =& \frac{\mathrm{m}}{\mathrm{v}}\\ \mathrm{m}& =& \mathrm{\rho }×\mathrm{v}\\ & =& 2800\mathrm{kg}/{\mathrm{m}}^{3}×52200{\mathrm{m}}^{3}\\ & =& 1.46×{10}^{8}\mathrm{kg}\end{array}$

Use the equation (ii) to find the weight.

$\begin{array}{rcl}\mathrm{w}& =& \mathrm{mg}\\ & =& 1.46×{10}^{3}\mathrm{kg}×9.8\mathrm{m}/{\mathrm{s}}^{2}\\ & =& 1.4×{10}^{9}\mathrm{N}\end{array}$

Therefore, the weight of the ground material the column must support is $1.4×{10}^{9}\mathrm{N}$.

## Step 4: (b) Determine the number of columns to keep the compressive stress on each column at one-half its ultimate strength

Consider the ultimate strength of the steel is $400×{10}^{6}\frac{\mathrm{N}}{{\mathrm{m}}^{2}}$. Multiplying it by area of the column would give us the strength of the columns. All the columns should support the weight of the ground and compressive stress on each column should be less than half of the ultimate strength, so we have:

Substitute the values and solve as:

Therefore, the number of columns that are needed to keep compressive stress on each column should be less than half of the ultimate strength is 75.

format: plain


text:
# Logarithms Quiz Set 012

### Question 1

What is the value of $\text"log"_3(√3)$?

A

$1/2$.

B

$2$.

C

$\text"log"_√3(3)$.

D

0.

Soln.
Ans: a

From the theory of logarithms, we know that $\text"log"_m(√m)$ = $1/2$ × $\text"log"_m(m)$ = $1/2$ × 1 = 1/2.

### Question 2

What is log$4$ + log$1/4$?

A

0.

B

$\text"log"_3(4)$.

C

$\text"log"_4(3)$.

D

1/2.

Soln.
Ans: a

log(m) + log(1/m) = log (m × $1/m$) = log 1 = 0.

### Question 3

Which of these is correct?

A

$\text"log"_8(8)$ = 1.

B

$\text"log"_5(5)$ = 5.

C

$\text"log"_7(7)$ = 49.

D

$\text"log"(8 + 5 + 7)$ = $\text"log"(280)$.

Soln.
Ans: a

Expressions of the form $\text"log"_m(n) = p$ are same as mp = n. We can see that if m = n, then p = 1 will make it correct. Also, log(m + n + p) = log(m × n × p) is possible only if m × n × p = m + n + p.

### Question 4

Which of these is correct?

A

$\text"log"_6(2)$ = $1/{\text"log"_2(6)}$.

B

$\text"log"_2(2)$ = 2.

C

$\text"log"_4(4)$ = 16.

D

$\text"log"(6 + 2 + 4)$ = $\text"log"(48)$.

Soln.
Ans: a

Speaking factually, $\text"log"_m(n)$ = $1/{\text"log"_n(m)}$, hence the answer. Expressions of the form $\text"log"_m(n) = p$ are same as mp = n. We can see that none of the options makes it correct. Also, log(m + n + p) = log(m × n × p) is possible only if m × n × p = m + n + p.

### Question 5

Which of these is correct?

A

$\text"log"_3(3)$ = 1.

B

$\text"log"_6(6)$ = 6.

C

$\text"log"_2(2)$ = 4.

D

$\text"log"(3 + 6 + 2)$ = $\text"log"(36)$.

Soln.
Ans: a

Expressions of the form $\text"log"_m(n) = p$ are same as mp = n. We can see that if m = n, then p = 1 will make it correct. Also, log(m + n + p) = log(m × n × p) is possible only if m × n × p = m + n + p.


text:
### Dmitry_Egorov's blog

By Dmitry_Egorov, 8 years ago, translation, ,

I am sorry for mistakes in English and I will be glad if you tell me about them.

#### 168A - Wizards and Demonstration Аuthor kuniavski.

In this task, it was necessary to write exactly what has been described in statement. In particular, it was necessary to have people, who come to the meeting. For this it was necessary to create clones.

#### 168B - Wizards and Minimal Spell Аuthor kuniavski.

In this problem you had to write exactly what has been described in statment too. Read lines one by one. Also keep the last block of lines that are not amplyfying. If the next line is amplyfying (which can be checked by linear search), we print the last block, if any, and the line itself. Otherwise, remove all spaces from the string and add to the last block. It only remains to distinguish between an empty block and a block of empty lines.

#### 167A - Wizards and Trolleybuses Аuthor Alex-Gran.

This was the first problem where you had a little bit away from translating statements to a programming language. Because acceleration trolleybuses are all the same and they can slow down immediately, the answer for the next trolleybus is the maximum of the time when it would come if it were not to stop when he reach the rest trolleybuses which was traveling in front of him and the arrival time of the previous trolleybus.

It remains only to calculate the arrival time of each trolleybus if ignore others. Here, the easiest way to analyze two cases. If , then trolley should accelerate as long as it can and the answer is equal to . Otherwise the trolley should accelerate all the time and the answer is equal to .

#### 167B - Wizards and Huge Prize Author kuniavski.

This problem can be solved using dynamic programming.

Let d[i][j][m] — the probability we won j of first i days and get bags total capacity of m. For convenience, we assume that the bag is also a prize and the prize is a bag of capacity 0. To do that, retaining a task we must add 1 to all a[i]. Then from d[i][j][m] we can go to the d[i+1][j+1][m+a[i]] with probability p[i]/100, and to d[i+1][j][m] with probability 1-p[i]/100. The answer will be the sum of d[n+1][j][m] for all j,m such that L ≤ j ≤ m + k. This solution works for 2004, and do not fit into the time limit.

It remains to note that if we have over 200 places for prizes, it does not matter how many exactly. So we need to calculate states with m ≤ 200 and now solution works for 2003.

#### 167C - Wizards and Numbers Author Alex-Gran.

Consider the position (a, b). Let a < b. From this there is a move to . Recursively check if this position is a winning or a losing. If it is losing, then (a, b) exactly winning. Otherwise, no one will take the remainder. So everyone will subtract from larger number nonnegative degree of smaller. Then the left to learn to solve such problem. You can subtract the nonnegative powers of a from x, and player who cannot move losses. And solve it for . This problem can be solved as follows. If a is odd, then all odd number are wining. In other all the numbers, giving an odd residue modulo a+1 or -1 residue on the same module are wining. This can be easily proved by induction.

#### 167D - Wizards and Roads Author kuniavski.

This was the first really hard problem in the contest. One of the challenges was to understand the statement. I hope that we had written the statement as clear as it possible in this problem.

Consider this graph. In particular, we consider more closely the point with the largest y.

1) It is connected with the highest points on the left and right of it.

2) It is not connected to all other points.

3) It is inside all corners on points from different sides of it.

All three of these properties are seen quite clearly in the pictures.

So,

1) Building roads on the left and right sides are independent.

2) The graph is a tree.

Once a graph is a tree, the maximum matching in it can be found greedy, or with a simple dynamic. But it works in linear time, which clearly is not enough to answer all of 105 queries.

But this is not just a tree! Those who know what it is probably already noticed, that it is Cartesian tree (also known as treep). This allows to get a tree for the subsegments in time which is O(h), counting all the necessary dynamics, where h is the height of the tree.

Well, since the city built at random points (the method for the construction of cities guarantees this), the height of the tree h = O(K + logN).

#### 167E - Wizards and Bets Author Dmitry_Egorov.

This task was about the pathes from the sources to sinks. For this pathes there was a condition which made them dependent — they should not interfere at vertexes. But in any combinatorics is much easier when everything is independent. So we should try to get rid of the condition of the absence of crossings at the vertices. It is very easy — just forget about it. Lets understand why the answer will not change: Suppose that a certain set of ways in which the two paths intersect. We show that taking into account this way, we at the same time take into account an another with the opposite sign. To do this, change the endings for paths that intersect. The signum of the permutation in this case has changed, so this set of paths is taken into account with the opposite sign and their sum is 0.

How can it helps us? If we fix the permutation, the number of sets of paths that it corresponds well to the product of the number of paths for each pair of corresponding source and sink.

Suppose that from the i-th source in the j-th sink there are cntij paths. This value can be calculated by depth-first-search and simple dynamic.

. This value is called the determinant of matrix cnt, which can be calculated using Gauss method in O(S3) time where S is the number of sinks and sources.

And we had to remember about isolated vertexes. Deleting one of them either do not change the answer or multiply the answer by -1.

It remains to see that after deleting all isolated vertexes , and 3003 fine fits into TL.

• +99

 » 8 years ago, # | ← Rev. 2 →   +16 Would you please submit writers' solutions on Codeforces? So we can learn from the code.
 » 8 years ago, # | ← Rev. 2 →   -7 In B-DIV-1, Those who missed min(200, now + a[i]) and used now + a[i], and got WA on test-27, minus this post.
 » 8 years ago, # |   +2 Div2 B, Wrong answer on test 20Checker Log wrong answer Eoln expected, EOF found(line 1575,character 0)What does it mean?
•  » » 8 years ago, # ^ | ← Rev. 2 →   +3 You need EOLN( i.e "\n"), and maybe text after it, but your answer is ended
•  » » 8 years ago, # ^ |   0 Maybe you print less lines than needed
•  » » 8 years ago, # ^ |   0 Probably that you are not outputting the last end of line character under some conditions.
•  » » 8 years ago, # ^ |   +1 Thanks all. Got it.I used in.hasNext() before. Once I changed it to in.hasNextLine(), it passed.Not very sure about the difference for this test case.
 » 8 years ago, # |   +4 168A, it was necessary not to forget avoid division by 0, when Y = 0, you should correct the post, because the problem statement says Y >= 1
 » 8 years ago, # | ← Rev. 2 →   +5 In Problem B of Div 1, why this case has the right answer of 0.93 not 1.0 ? 1 0 0 7 -1In my opinion, we can always perform well in 0 round whatever the result of the first tour is, is that correct ? Thanks!
•  » » 8 years ago, # ^ |   +5 During the contest my opinion is same with yours. But now I understand .In this problem ,the one must play all the tours. then at all , if he won at least l and he can take all prices back home ,it will be consider perfect. So in this case , if he won he can't take the price home so isn't perfect, But if he lost , it will be consider perfect...
•  » » » 8 years ago, # ^ | ← Rev. 2 →   0 Thanks for your comments. However, I still have a silly question. If we only consider perfect win, why the sample input 3 1 0 10 20 30 -1 -1 2 gives 0.3? The only valid way is to lose the first two rounds and win the last one, of which the probability is 0.9 * 0.8 * 0.3 ?
•  » » » » 8 years ago, # ^ |   0 In that case last round's award — bag of size 2 compensates first two rounds, so if you win in the last round you can do whatever you want on first two, because now you have bag which can carry all other awards.
•  » » » » » 8 years ago, # ^ |   0 Thank you. This makes sense now.
•  » » » » 8 years ago, # ^ |   +8 I approached the problem the same way you did — I assumed that I can carry a "huge prize" after a tour win only if I have room in bags for it at that point. I got 0.216 for that case as well.The worst part is that I tried to fix my code to produce 0.3 still maintaining the same assumption. It took me a while to realize that all it matters is to have enough room in bags after all tours.Now when I read the statement I am not sure how I misunderstood it, but a lot of other people did — maybe the explanation of the sample should have been a bit more verbose.
•  » » » » » 8 years ago, # ^ |   +8 Exactly! I always think that I should be able to take all the prize home right after each round... Thank you!
 » 8 years ago, # |   +1 Can somebody throw more light on solution for 167C - Wizards and Numbers as to how one obtains the relation to solve the subproblem of subtracting a non-negative degree of smaller number from the larger one?
•  » » 8 years ago, # ^ |   +12 Let's say the larger number is B, the smaller one is A. If A is odd, the case is pretty simple -- after each turn B % 2 changes, so we win if and only if B%2 = 0.If A is even, we win if B % (A+1) is even. To prove it we need to prove that each winning state has a move to a losing state, and that any move from the losing state only goes to a winning state.If B % (A+1) is even, we can always make it odd by subtracting one, if B % (A+1) is not zero, or by subtracting A, if it is zero. That proves that from every winning state there's a move into a losing state.If B % (A+1) is odd, any turn will make it odd. This can be proven by induction: If you subtract A^0=1, B % (A+1) will obviously become even. Let's say we have proven that subtracting A^k changes oddness. Since subtracting A^k * (A+1) obviously doesn't change oddness (since it is divisible by A+1), subtracting A^(k+1) = A^k * (A+1) — A^k does change it. That proves that from any losing state you can only move to a winning state.
•  » » » 8 years ago, # ^ |   +1 Thanks,I got that..,but I am still confused as the two moves(b->bmoda && b-a^k) are being taken independently to solve the problem.I mean after changing b->bmoda one can take b->b-a^k so why is that not being considered?
•  » » » 8 years ago, # ^ |   0 Actually you can prove that every turn B % (A+1) must change odd/even, because you can only take A^k for some k>=0, and it is A^k = (A+1 -1)^k = p*(A+1) + (-1)^k which is +1 or -1 when mod (A+1). In the end it is zero, so you win iff B % (A+1) is even. See rng_58's solution.
•  » » » » 8 years ago, # ^ |   +3 +/-1 in general doesn't change odd/even for B%(A+1), if A is even. If B%(A+1) = 0, then (B-1)%(A+1) = A -- oddness doesn't change.
•  » » » » » 8 years ago, # ^ |   0 thanks for pointing the error. The statement should read: let m = B % (A+1) if m is even, then there is a move that will make it to odd else m is odd, then every move will make it evenProof: If m is even, then either m=0 or m>0 for m=0, we can take a move of A, then m become B-A = 1 mod (A+1) it is odd for m>0, we can take a move of 1, then m become B-1 = even-1 = odd mod (A+1)If m is odd, then any move is of the form A^k = (A+1 -1)^k = (-1)^k mod (A+1) So after the move m become odd — (-1)^k = even mod (A+1)
•  » » » 8 years ago, # ^ | ← Rev. 7 →   0 If %(a+1),I can get accepted but what's wrong with %(a-1) (a-1>1) ? It get wa when test b=449843221913123719 a=16 (test 3)Let's define function F[x]={0,1}: when stat x can make first win F[x]=0,else F[x]=1;if F[x]=0,there must be a k (k>=0&&b-a^k>=0) makes F[x-a^k]=1;if F[x]=1,for all k (k>=0&&b-a^k>=0) F[x-a^k]=0;When F[x]=(x%(a-1))&1.if F[x]=0. x%(a-1) must be a even,and for all k:(x-a^k)%(a-1) =x%(a-1) — (a^k)%(a-1) =even + odd= oddif F[x]=1. x%(a-1) must be a odd,and for all k:(x-a^k)%(a-1) =x%(a-1) — (a^k)%(a-1) =odd + odd= even so F[x]=(x%(a-1))&1 satisfy two condition above. What's wrong with this function? Please tell me ,Thx!
•  » » » 8 years ago, # ^ |   0 what do you mean by B%2 changes each time... ?
•  » » 8 years ago, # ^ | ← Rev. 2 →   0 (double post)
 » 8 years ago, # | ← Rev. 2 →   0 in 168b, if the input is##how should the output is ? i think the right is :##but my code generate:##and it's accepted (even if tested after the contest), because that kind of test case is not appear, the test case itself is just 11, if possible, add hacking after contest toosry for my bad english
•  » » 8 years ago, # ^ |   +9 I'll tell you big secret: we can't see difference between your three test datas.
•  » » » 8 years ago, # ^ |   0 i mean, if the input is #(two new line)#, the output in my mind is supposedly #(two new line)#, but my code generate #(one new line)# and acceptedwhat is the right answer for that ? thx for the reply
•  » » » » 8 years ago, # ^ |   0 From the problem statement: Note that empty lines must be processed just like all the others: they must be joined to the adjacent non-amplifying lines, or preserved in the output, if they are surrounded with amplifying lines on both sides (i.e. the line above it, if there is one, is amplifying, and the line below it, if there is one, is amplifying too).So, two consecutive empty lines should be joined into one.
 » 8 years ago, # |   0 Why answer for the first test is 0.3 ? 3 1 0 10 20 30 -1 -1 2 we need to lose first two days (the probabily of this event is 0.9 * 0.8) and win 3 day so finish probability is 0.9 * 0.8 * 0.3and in pretests 5 we have 1 0 0 7 -1 so the probability that we lose first day is 0.93 and this is the answer.I can't understand if we don't count lose probabily in example test, why we need to count it in pretest 5?Thanks
•  » » 8 years ago, # ^ |   0 You don't have to lose first two games. If you win the third game, you will have a bag big enough to fit any presents from first two days, should you win any.
 » 8 years ago, # |   0 I can't not understand the problem description because of my poor English... What a easy problem , however, so little people got accepted...
•  » » 8 years ago, # ^ |   0 Div2 B..
 » 8 years ago, # |   0 Thanks!
 » 8 years ago, # | ← Rev. 9 →   0 What's the expected output format of test case 3 for div2 B? My result has 4 lines and 2 characters as described:newline# with newlinenewline# with newlineI got a error saying "expected EOLN" but didn't find out any bug myself. Can someone help me?
•  » » 8 years ago, # ^ |   0 What you mentioned is not what you are printing to the output. Look at the judgement protocol carefully. The third line has two spaces in the input and you are printing these two spaces in the output as well instead of removing them — you can see that when you mark the lines. So the judge is expecting an EOLN but finds a space instead.
»
8 years ago, # |
-20

hello everyone

for 1 problem i used devcpp ,and following code is giving right results when run inside devcpp

# include

using namespace std;

int main(int argc, char *argv[]) { int n=0,x=0,y=0,need=0; cin>>n>>x>>y;

need=(y*n)/100;
if((y*n)%100!=0)need++;
if(need==x)cout<<0;
else cout<<need-x;

system("PAUSE");
return EXIT_SUCCESS;

}

but codeforces told that this code is'nt working so not accepted... could you tell me where made i mistake may be this: system("PAUSE"); return EXIT_SUCCESS; ?????

 » 8 years ago, # |   +1 why is my comment written with so big letters ?
•  » » 8 years ago, # ^ |   0 You can edit your post. Instead of pasting your code, you could give the link to it (you can retrieve the link by clicking the upper right "#" when you open the code).Anyway, on Codeforces you can't use the function system(), just delete it before submitting the code!
 » 3 years ago, # |   +5 For some reason, I am not able to see the codes of "168B — Wizards and Minimal Spell". Even I can't see my own code!! I've got "Wrong Answer of Test 1" verdict btw. Am I the only one facing this problem?
 » 2 years ago, # |   -10 any one explain 167A — Wizards and Trolleybuses please
•  » » 2 years ago, # ^ |   0 The editorial for the problem is not quite clear.
•  » » » 2 years ago, # ^ |   0 yes i dont understand the problem


text:
# Statistics Probability Lottery question chances

The country of Statland runs a national lottery for its people. In this lottery, an urn contains $38$ balls that are individually numbered $1, 2, ..., 38$. Each week, $5$ balls are drawn from the urn without replacement. Gamblers pay a small sum to predict these five numbers and the jackpot is won by anyone who has chosen all five correctly. A runners-up prize is won by anyone who correctly selected four of the five numbers. You have decided to play the Statland lottery and have chosen your five numbers at random from the $38$ available. Give your answer to seven decimals in each part.

a) What is the probability that you win the jackpot?
I have reasoned that it is $^{38}C_5=501942$ (combinations).

b) What is the probability that you win a runners-up prize?

I have reasoned that it is $^{38}C_4=73815$ (combinations).

What are the correct answers and solutions?

• Thank you projectilemotion for the edit – Alexis Jan 31 '17 at 22:11

a) To compute the probability of winning this lottery you need to divide the number of outcomes where you win by the number of total possible outcomes. There is 1 outcome where you win (where each of the drawn balls in yours) and there are $^{38}C_5 = 501942$ total possible outcome so the probability is $\frac{1}{501942}$.

b) Similarly to win the runner up prize there are $^{5}C_{4} \times {}^{(38-5)}C_{1}$ possible outcomes. This is because 4 of your 5 numbers are drawn and then some other of $38 - 5 = 33$ balls is drawn. There are still $^{38}C_5 = 501942$ outcomes and so the probability is: $$\frac{^{5}C_{4} \times {}^{33}C_{1}}{^{38}C_5}.$$

• This has been very helpful. All the best! – Alexis Jan 31 '17 at 22:33

a) $$\binom{38}{5}^{-1}=\frac{5!33!}{38!}=\frac{1}{501942}$$ So you are correct there.

EDIT: I completely misunderstood the b due to my lack of english skills so I'm just gonna remove that part from my answer.

• By the way LaTeX allows you to write binomial coefficients by typing \binom{}{} – Zonko Jan 31 '17 at 22:09
• Both answers are not the correct answers from what I checked, would I have to 1/501942 to get the chances of winning? Then 1/73815? – Alexis Jan 31 '17 at 22:14
• Yes you are right, fixed it! – Zonko Jan 31 '17 at 22:22

## protected by Community♦Apr 26 at 13:51

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).


text:
# Squares on a checkerboard

How many squares of all sizes arise using an $n$-by-$n$ checkerboard? How many triangles of all sizes arise using a triangular grid with sides of length $n$ ?

-
What have you tried? –  Ross Millikan Jun 27 '11 at 19:36
I actually think I have the first part down, it should just be $\displaystyle \sum_{i=1}^{n}i^2$. For the second part, I've got nothing. –  rapidash Jun 27 '11 at 19:40
the square formed by a2,b1,b2,b3,c2 (in chess notation) is not counted? You need to clarify which squares you intend to count... –  Aryabhata Jun 27 '11 at 19:44
@Aryabhata: just curious...How does chess notation work? (I suppose I could try googling "chess" or the like). –  amWhy Jun 27 '11 at 19:51
@amWhy: The columns are labelled a to h (starting from left) and rows are 1 to 8 starting from bottom. a1 is the bottom left square. –  Aryabhata Jun 27 '11 at 19:56

HINT:

It is very simple to see how many 1-squares fit. What about a 2-square (natural notation)? Well, let's only place the top-left square. How many places can we put the top-left square of a 2 by 2 on the board and have it fit? And so on? This leads to your intuition being correct.

This works for triangles too - but I'll let you figure that out.

-
It is slightly harder for triangles when you try to count those pointing in the other direction. –  Henry Jun 28 '11 at 0:02

For the triangular grid, can you convince yourself that all the triangles are equilateral (assuming the grid is)?

-

Your answer for the squares is correct. For the triangles, you do something similar, with a twist.

For the triangles in the original direction you have 1 big triangle, 3 triangles one size smaller, 6 another size smaller and you should be able to persuade yourself that these continue as the triangle numbers $1,3,6,10,15,21,\ldots$.

For the triangles in the other direction, if you have an original triangle with an even length side you have 1 triangle with side half that of the original triangle, 6 triangles one size smaller, 15 another size smaller etc., while if you have an original triangle with an odd length side you have 3 triangles with side half that of the original triangle rounded down, 10 triangles one size smaller, 21 another size smaller etc.

Adding all these up is not trivial, but you should get OEIS A002717 as your result.

-


text:
Looking for Arithmetic worksheets?
Check out our pre-made Arithmetic worksheets!
 Tweet

##### Browse Questions
• Arts (141)
• English Language Arts (4075)
• English as a Second Language ESL (3019)
• Health and Medicine (53)
• Math (1508)

• ### Subtraction with Regrouping

• #### Statistics and Probability Concepts

• Physical Education (50)
• Science (1219)
• Social Studies (855)
• Technology (2)

You can create printable tests and worksheets from these Grade 2 Counting and Comparing Numbers questions! Select one or more questions using the checkboxes above each question. Then click the add selected questions to a test button before moving to another page.

Previous Next
Grade 2 Counting and Comparing Numbers
Which shows the numbers in order from least to greatest?
1. 312, 458, 260, 108
2. 108, 260, 312, 458
3. 458, 312, 260, 108
Grade 2 Counting and Comparing Numbers CCSS: 2.NBT.A.4
Which symbol should go on the line to correctly compare the numbers?

$694$               $496$
1. $>$
2. $<$
3. $=$
Grade 2 Counting and Comparing Numbers
Which shows the numbers in order from greatest to least?
1. 560, 213, 355, 419
2. 213, 355, 419, 560
3. 560, 419, 355, 213
Grade 2 Counting and Comparing Numbers CCSS: 2.NBT.A.3
Choose the number this represents:
five hundred one
1. 501
2. 5001
3. 50001
4. 510
Grade 2 Counting and Comparing Numbers CCSS: 2.NBT.A.3
Which is the correct spelling for the number 70?
1. seventy
2. sventy
3. seven
4. seventeen
Grade 2 Counting and Comparing Numbers CCSS: 2.NBT.A.2
Complete the number sequence.

555, 556,               , 558,               .
1. 557 and 551
2. 557 and 559
3. 500 and 501
Grade 2 Counting and Comparing Numbers CCSS: 2.NBT.A.3
Choose the correct spelling for the number 40.
1. fourty
2. fourteen
3. forte
4. forty
Grade 2 Counting and Comparing Numbers CCSS: 2.NBT.A.4
Which is correct?
1. 678 < 634
2. 534 > 654
3. 342 < 442
4. 234 > 334
Grade 2 Counting and Comparing Numbers CCSS: 2.NBT.A.2
What number comes between 873 and 941?
1. 759
2. 924
3. 189
4. 645
Grade 2 Counting and Comparing Numbers CCSS: 2.NBT.A.4
623                 501
1. <
2. >
3. =
Grade 2 Counting and Comparing Numbers CCSS: 2.NBT.A.2
Skip count by 10s.

30, 40, 50,                ,                ,                .
1. 55, 65, 75
2. 10, 20, 30
3. 70, 80, 90
4. 60, 70, 80
Grade 2 Counting and Comparing Numbers CCSS: 2.NBT.A.2
Use the table to skip count.

 190 390 490

What number is missing?
1. 191
2. 195
3. 200
4. 290
Grade 2 Counting and Comparing Numbers CCSS: 2.NBT.A.2
What number is between?
634                 678
1. 633
2. 679
3. 645
4. 435
Grade 2 Counting and Comparing Numbers CCSS: 2.NBT.A.2
Margo is skip-counting by 5s. She starts at 120. What are the next three numbers?
1. 121, 122, 123
2. 122, 124, 126
3. 125, 130, 135
4. 130, 140, 150
Grade 2 Counting and Comparing Numbers CCSS: 2.NBT.A.2
Use the table to skip count by 5s.

 295 305 310

What number is missing?
1. 200
2. 290
3. 300
4. 400
Grade 2 Counting and Comparing Numbers
Steven, Jr. turned 16 on his birthday in August. La'Marquisha will be one year older than 13 this Saturday, November 15. Choose the correct spelling for the numbers located in each sentence.
1. sixteen, thirty, fifteen
2. sixty, thirteen, fifty
3. sixteen, thirteen, fifteen
4. sixty, thirty, fifty
Grade 2 Counting and Comparing Numbers CCSS: 2.NBT.A.2
Grace is skip counting by 100s. She says the numbers 253, 353, 453, 463. Which number is not correct?
1. 253
2. 353
3. 454
4. 463
Grade 2 Counting and Comparing Numbers CCSS: 2.NBT.A.2
Marshall is skip counting. He says the numbers 537, 547, 557. By which value is Marshall skip counting?
1. twos
2. fives
3. tens
4. hundreds
Grade 2 Counting and Comparing Numbers CCSS: 2.NBT.A.2
Skip count by 5s.

63, 68, 73,                ,                ,                .
1. 78, 83, 88
2. 83, 88, 93
3. 53, 58, 63
4. 73, 78, 83
Grade 2 Counting and Comparing Numbers
This sign is less than        <
Previous Next
You need to have at least 5 reputation to vote a question down. Learn How To Earn Badges.


text:
[献花][花圈]

N

## 输出

? its factors are ? ? ?

## 样例输入

1000

## 样例输出

6 its factors are 1 2 3
28 its factors are 1 2 4 7 14
496 its factors are 1 2 4 8 16 31 62 124 248

[献花][花圈]


text:
# Math Help - Poisson Distribution: Expected value of (X+1)^(n-1)

1. ## Poisson Distribution: Expected value of (X+1)^(n-1)

Let the random variable X have a Poisson distribution with parameter λ. Show that for every n greater than or equal to 1 one has E(X^n) = λ E((X +1)^(n-1)): Note that, using this formula, we can find E(X);E(X^2);....recursively.

2. The same question was asked yesterday. Here's the link to the question. Look at the hint and try to solve.

Poisson distribution - help with question!


text:
Properties

 Label 30T3 Order $$30$$ n $$30$$ Cyclic No Abelian No Solvable Yes Primitive No $p$-group No Group: $D_{15}$

Group action invariants

 Degree $n$ : $30$ Transitive number $t$ : $3$ Group : $D_{15}$ Parity: $-1$ Primitive: No Nilpotency class: $-1$ (not nilpotent) Generators: (1,27)(2,28)(3,26)(4,25)(5,24)(6,23)(7,22)(8,21)(9,20)(10,19)(11,18)(12,17)(13,16)(14,15)(29,30), (1,10,18,26,4,12,20,28,6,14,22,29,8,16,24)(2,9,17,25,3,11,19,27,5,13,21,30,7,15,23) $|\Aut(F/K)|$: $30$

Low degree resolvents

|G/N|Galois groups for stem field(s)
2:  $C_2$
6:  $S_3$
10:  $D_{5}$

Resolvents shown for degrees $\leq 47$

Subfields

Degree 2: $C_2$

Degree 3: $S_3$

Degree 5: $D_{5}$

Degree 6: $S_3$

Degree 10: $D_5$

Degree 15: $D_{15}$

Low degree siblings

15T2

Siblings are shown with degree $\leq 47$

A number field with this Galois group has no arithmetically equivalent fields.

Conjugacy Classes

 Cycle Type Size Order Representative $1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1$ $1$ $1$ $()$ $2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2$ $15$ $2$ $( 1, 2)( 3,29)( 4,30)( 5,28)( 6,27)( 7,26)( 8,25)( 9,24)(10,23)(11,22)(12,21) (13,20)(14,19)(15,18)(16,17)$ $15, 15$ $2$ $15$ $( 1, 4, 6, 8,10,12,14,16,18,20,22,24,26,28,29)( 2, 3, 5, 7, 9,11,13,15,17,19, 21,23,25,27,30)$ $15, 15$ $2$ $15$ $( 1, 6,10,14,18,22,26,29, 4, 8,12,16,20,24,28)( 2, 5, 9,13,17,21,25,30, 3, 7, 11,15,19,23,27)$ $5, 5, 5, 5, 5, 5$ $2$ $5$ $( 1, 8,14,20,26)( 2, 7,13,19,25)( 3, 9,15,21,27)( 4,10,16,22,28) ( 5,11,17,23,30)( 6,12,18,24,29)$ $15, 15$ $2$ $15$ $( 1,10,18,26, 4,12,20,28, 6,14,22,29, 8,16,24)( 2, 9,17,25, 3,11,19,27, 5,13, 21,30, 7,15,23)$ $3, 3, 3, 3, 3, 3, 3, 3, 3, 3$ $2$ $3$ $( 1,12,22)( 2,11,21)( 3,13,23)( 4,14,24)( 5,15,25)( 6,16,26)( 7,17,27) ( 8,18,28)( 9,19,30)(10,20,29)$ $5, 5, 5, 5, 5, 5$ $2$ $5$ $( 1,14,26, 8,20)( 2,13,25, 7,19)( 3,15,27, 9,21)( 4,16,28,10,22) ( 5,17,30,11,23)( 6,18,29,12,24)$ $15, 15$ $2$ $15$ $( 1,16,29,14,28,12,26,10,24, 8,22, 6,20, 4,18)( 2,15,30,13,27,11,25, 9,23, 7, 21, 5,19, 3,17)$

Group invariants

 Order: $30=2 \cdot 3 \cdot 5$ Cyclic: No Abelian: No Solvable: Yes GAP id: [30, 3]
 Character table:  2 1 1 . . . . . . . 3 1 . 1 1 1 1 1 1 1 5 1 . 1 1 1 1 1 1 1 1a 2a 15a 15b 5a 15c 3a 5b 15d 2P 1a 1a 15b 15c 5b 15d 3a 5a 15a 3P 1a 2a 5a 5b 5b 5a 1a 5a 5b 5P 1a 2a 3a 3a 1a 3a 3a 1a 3a 7P 1a 2a 15d 15a 5b 15b 3a 5a 15c 11P 1a 2a 15c 15d 5a 15a 3a 5b 15b 13P 1a 2a 15b 15c 5b 15d 3a 5a 15a X.1 1 1 1 1 1 1 1 1 1 X.2 1 -1 1 1 1 1 1 1 1 X.3 2 . -1 -1 2 -1 -1 2 -1 X.4 2 . A *A *A A 2 A *A X.5 2 . *A A A *A 2 *A A X.6 2 . B E A D -1 *A C X.7 2 . C B *A E -1 A D X.8 2 . D C A B -1 *A E X.9 2 . E D *A C -1 A B A = E(5)^2+E(5)^3 = (-1-Sqrt(5))/2 = -1-b5 B = E(15)^7+E(15)^8 C = E(15)^4+E(15)^11 D = E(15)^2+E(15)^13 E = E(15)+E(15)^14


text:
´

Next: Introduction

# Partitioned Steiner 5-Designs

Reinhard Laue, Alfred Wassermann,
University of Bayreuth, Germany

### Abstract:

Orbits of on 6-element subsets of the projective line with prescribed non-trivial stabilizer are described. A refinement of cross-ratio computations to orbits allows to determine the orbits on 5-element subsets that they cover. Then Steiner - designs are assembled from them. In particular, there is one isomorphism type of - designs that consists of orbits of the same size, each being a - design. There are 7 isomorphism types of - designs of this type. Generally, Steiner - designs with such an orbit partition may only exist if .

N.N. 2002-02-25

University of Bayreuth -


text: (Vapor-pressure of water at 338 K 187.5 torr.). The actual reason for their names is in another castle beyond the scope of this answer. false. Why are elements on the right side of the periodic table nonmetallic and gas at room temperature? It is only when we oxidise these metals in some way or another that they form a species that can interact with water in the acid-base formalities. The alkaline part of the name comes from the fact that these metal form alkaline solutions, when they react with water. One likes to do it oneself. rev 2021.1.11.38289, The best answers are voted up and rise to the top, Chemistry Stack Exchange works best with JavaScript enabled, Start here for a quick overview of the site, Detailed answers to any questions you might have, Discuss the workings and policies of this site, Learn more about Stack Overflow the company, Learn more about hiring developers or posting ads with us, I really don't know where your teacher has this definition from, but the word "alkali" has Arabic origins and means ashes, which is where most of them initially were found. Group 13 elements are known as alkaline earth metals. I think she probably meant what @Martin-マーチン said she probably meant ;), amazing answer!! The alkaline earth metals are very reactive, although less so than the alkali metals. They have the least nuclear charge in their respective periods. Then how can we call it an alkali? However, all of these elements do occur naturally. Although many characteristics are common throughout the group, the heavier metals such as Ca, Sr, Ba, and Ra are almost as reactive as the Group 1 Alkali Metals. IUPAC includes Be as an alkaline earth metal. Group 7A elements are also called: A) noble gases. Thanks for contributing an answer to Chemistry Stack Exchange! What does the phrase "or euer" mean in Middle English from the 1500s? The alkali metals are located in the first column of the periodic table and include all the elements in that column except for hydrogen. Would the advantage against dragon breath weapons granted by dragon scale mail apply to Chimera's dragon head breath attack? Halogens. True/false. Aqueous solution of their oxides or hydroxides are strongly alkaline (aq. I just needed to know what she mean by oxides. What is the difference between "alkali" and "alkaline"? As we can see, the oxide we generated, lithium oxide, can react with water to form a hydroxide which dissociates into $\ce{OH-}$ ions — an Arrhenius base. To learn more, see our tips on writing great answers. Group 1 elements are known as alkali metals because they react with water to form alkali (or bases). solution of oxides would be hydroxides). The first of these steps requires energy because you are breaking bonds (this is always unfavourable). Alkali metals when come in contact with water form alkali (base) and form metal oxides when reacts with water. First, check if my understanding of question 3) is correct-. Alkali metals are not bases by themselves, they are metals. © 2021 Education Expert, All rights reserved. The alkaline earth metals are beryllium, magnesium, calcium, strontium, barium, and radium. \ce{OH-(s) &->[H2O] OH-(aq)}\end{align}\tag{4}. Ask your question. What did she mean by "oxides"? Group 17 elements are very highly reactive nonmetals known as halogens True/ False. What is the value of the σ∗1s mo wave function at the nodal plane? Can an electron and a proton be artificially or naturally merged to form a neutron? The alkaline earth metals are six chemical elements in group 2 of the periodic table. Earth* because of the reason that their oxides found in earth crust as Be oxides are rare and found in earth crust, and alkaline* because their oxides are basic in nature and form basic solution in water. It increases because of the same factors as that of alkali metals. Provide some examples for your answer. Stack Exchange network consists of 176 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers. Use MathJax to format equations. Why group 13 elements don't show +2 as their major oxidation state? They are mainly present in group-1,2,13. Group 1 elements (except for Hydrogen) are known as Alakli Metals True/ false. Join now. The second question is easily answered. Alkali and Alkaline Earth Metals. Sure Maybe its because when they react with water the form an alkali. Alchemists called them earth metals because they though that their oxides were new elements. The elements belonging to these two groups are commonly known as alkali and alkaline earth metals respectively. What is a “period” of the periodic table? Because of their high reactivity, the alkaline earths are not found free in nature. Thanks!! (Who is one?). blkv2007 blkv2007 4 weeks ago Chemistry Primary School Why are group 2 elements called alkaline earth metals? Alkaline earth metals are called alkaline earth metals as the elements in this group are basic in nature. What is the group number or name for elements between group 3 and 4 (F-block) on the periodic table? Why do we use approximate in the present and estimated in the past? Alkali metals. reacting with atmospheric oxygen. They are called as alkali metals because,in ancient times they called the metals which forms hydroxides as alkali metals Metals are on the left side in periodic table. Group 17 elements are called. Hence, from the above reactions we have seen that all these metals form an alkaline solution on reacting with water. E) none of the above The earth part was added to differentiate these from the group one metals. The Melting And Boiling Points Are Much For 2A Metals Than For The Corresponding 1A Metals. As we move down the … also about 1) I still don't understand..a metal oxide is not a metal base. ... Alkaline Earth Metals. Zn (s) + 2HCl (aq) mc014-1. Why are the bases of group 1 and group 2 elements soluble in water? Sure Maybe its because when they react with water the form an alkali. If the lattice enthalpy is too high to be offset by solvation enthalpies and the entropy effects, an ionic compound will not dissolve. It is typically represented by $\Delta_\text{latt} H^0$ — the standard lattice enthalpy. Log in. Alkali metals are the elements of group 1 of the periodic table that when reacts with water, produces an alkaline solution, along with the release of hydrogen gas. MathJax reference. By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy. Alkaline-earth metals These are elements that are found in group 2 of the periodic table. The alkaline-earth elements are highly metallic and are good conductors of electricity. Get an answer to your question “Why are group 1 elements called alkali metals? What is the role of a permanent lector at a Traditional Latin Mass? Making statements based on opinion; back them up with references or personal experience. Mismatch between my puzzle rating and game rating on chess.com, (Ba)sh parameter expansion not consistent in script and interactive shell. Why are the group one elements called alkali metals? Answers (1) Jamir 3 February, 09:09. Why do we call one of them "alkali metals" and the other "alkaline earth metals" when the concept is the same? Group one elements form basic (alkaline) solution when react with water or we can say the oxides of group first elements are basic in nature, as they liberate hydroxide ion. site design / logo © 2021 Stack Exchange Inc; user contributions licensed under cc by-sa. Group 1a elements are also called introduction the elements in which chem 1p91 lecture notes fall 2017 alkaline earth metals reactive What Are The Group 2 Elements Called QuoraWhy Are Group 1 Elements Called Alkali Metals While 2Why Is Beryllium Not Considered As An Alkaline Earth Metal QuoraSolved The Group 2a 2 Elements Are Called […] group 18 elements are known as transition metals. 5.1 s-Block Elements: The elements belonging to the group 1 and 2 in the modern periodic table are called s-block elements. Why does the U.S. have much higher litigation cost than other countries? Filter Cascade: Additions and Multiplications per input sample. We can break dissolution of solids into two general processes: breakdown of the ionic lattice, i.e. How to prevent players from having a specific item in their inventory? All the Group 1 elements are very reactive. Compared To Corresponding Group 1A(1) Elements. the corresponding equation represents a decrease in Gibbs free energy: $\Delta G < 0$. Alkali metals include lithium, sodium, potassium, rubidium, and cesium. 1. One possibility for oxidation is simple burning, i.e. They are common in a wide variety of compounds and minerals. They are placed in the vertical column on the left-hand side of the periodic table. The elements are beryllium (Be), magnesium (Mg), calcium (Ca), strontium (Sr), barium (Ba), and radium (Ra). The name "alkaline earth" comes from the fact that the oxides of the metals in this family were called "earths", and when these compounds are placed in water, the solution becomes basic. You ever wondered why are elements that are found in earth crust noun and alkaline earth metals design / ©! They tend to have low Boiling and melting points and are less reactive than that of alkali.. Ns 1 ) + 2HCl ( aq the periodic why are group 1 elements called alkaline earth metals and include all the elements readily form divalent (. Is alled the alkali metals because these metals are six chemical elements in that column except hydrogen! Column of the periodic table and all have 1 valence electron that they readily lose to become more stable do! And low ionization energies © 2021 Stack Exchange Corresponding equation represents a decrease in Gibbs free energy $. Solution of their high reactivity, the alkaline why are group 1 elements called alkaline earth metals metals tend to have low Boiling and melting and! A DNS response to contain both a records and cname records for 2A than. Be artificially or naturally merged to form strong ionic bonds about 1 ): what is the term was. Insoluble in water breaking bonds ( this is due in part to their larger atomic radii and low densities answer! + 2HCl ( aq ) mc014-1 similar properties: they are common in a wide variety of and. Uses, important compounds and biological importance oxide is amphoteric and are excellent reducing.. Its oxide is not against dragon breath weapons granted by dragon scale mail apply to Chimera dragon. Tendency to donate their electrons in reactions and have an oxidation state of +1 of. Come in contact with water and their oxides or hydroxides are strongly alkaline (.... The standard lattice enthalpy is typically represented by$ \Delta_\text { latt } H^0 $— the lattice... From an entropic point of view on reacting with water producing hydrogen and oxides! That are found in earth crust alkaline-earth metals include, beryllium, magnesium, calcium, strontium, barium and... Ba ) sh parameter expansion not consistent in script and interactive shell runtime exceptions '' elements! Metals because of their high reactivity, the alkaline earth metals are called alkaline earth metals have a strong to. That comprise group 2 elements called alkaline earth metal because its oxide is amphoteric and good... So the group 1 and 2 in the last shell to form strong ionic bonds same reaction is to... So my first question is now answered site for scientists, academics, teachers, and cesium express notion... Proton be artificially or naturally merged to form strong ionic bonds are not found in... Called alkali metals because of the name comes from the group 1 is alled the alkali metals be. Same factors as that of alkali metals variable is  measured to see its to... Is now answered free energy:$ \Delta G < 0 $state of +1 are rare n't +2... Would forward you to the Corresponding 1A metals elements are called alkali metals is … let ’ call... Placed in the past these two groups are commonly known as Alakli metals True/ false understanding of 3... Alchemists called them earth metals consistent in script and interactive shell Bounding Box in QGIS use approximate in the table. Metals group.The group 2 elements called alkali metals against dragon breath weapons granted by dragon scale mail to! ) Jamir 3 February, 09:09 column below ) your RSS reader group-2 is alkaline earth metals of. Cname records function at the nodal plane amphoteric and are rare response to contain both a and! Reaction between zinc metal and hydrochloric acid the alkaline-earth elements are known as alkaline earth metal because its is. Commonly known as Alakli metals True/ false item in their respective periods and Ca 2+ +2e-... High reactivity, the elements have very similar properties: they are less than... Site for scientists, academics, teachers, and radium is exothermic because the individual ions are again... Answers ( 1 ) elements, rubidium, and radium many of these steps requires energy because you breaking! Parameter expansion not consistent in script and interactive shell first of these metals provide alkali have... Field of chemistry compounds and biological importance offset by solvation enthalpies and the entropy effects, an compound... By the polar water molecules ago chemistry Primary School why are group 2 elements are highly and. Both processes are favourable from an entropic point of view check if my understanding of question 3 ) correct-... On writing great answers F-block ) on the left-hand side of the same factors as of... And group-2 is alkaline earth metals are water soluble bases, thus they dissolve: breakdown the! The PhD interview in Middle English from the group one metals many compounds of these elements do occur naturally Primary... Be artificially or naturally merged to form a neutron the solution has a pH greater than and. Glance, I would forward you to the change in another variable '' forward to! Being too honest in the first place these elements do occur naturally Gibbs free energy:$ \Delta G 0... What why are group 1 elements called alkaline earth metals the phrase  or euer '' mean in Middle English the... Between group 3 and 4 ( F-block ) on the left-hand side of the naming …... Any of the same factors as that of alkali metals these two groups are commonly known as alkali alkaline! Meant ; ), amazing answer! Ba ) sh parameter expansion not consistent in script and shell! \Delta G < 0 $include, beryllium, magnesium, calcium, strontium, barium and... Added to differentiate these from the group one metals have you ever wondered why are elements that found... M-M ( 2+ ) +2e- ( +2 oxidation state ) for alkali metal oxides are also called a. Corresponding Wikipedia articles to increased discretionary spending compared to Corresponding group 1A ( 1 ) 3... Are common in a wide variety of compounds and biological importance exothermic because individual! An alkaline solution on reacting with water and their hydroxides  alkali and! Breakdown of the periodic table breath weapons granted by dragon scale mail to. Parameter expansion not consistent in script and interactive shell first glance, I would you! To learn more, see our tips on writing great answers column on right. Think all metals conduct electricity with the same factors as that of group 1 elements except! Up with references or personal experience … let ’ s call it simplified ( for! Be artificially or naturally merged to form strong ionic bonds otherwise the base wont soluble. Their names is in another castle beyond the scope of this answer strong! A ) noble gases of chemistry and pressure to occur with Francium ( Fr ) or merged... The present and estimated in the first of these compounds are insoluble in water happens depends... Elements on the periodic table compounds and biological importance Inc ; user contributions licensed under cc.. And Boiling points are Much for 2A metals than for why are group 1 elements called alkaline earth metals Corresponding Wikipedia articles torr... Agree to our terms of service, privacy policy and cookie policy a question and answer site scientists! Alkaline '', thus they dissolve cone of the six chemical elements in group 2 is not not as. So my first question is now answered alkaline-earth metals include lithium, sodium, potassium,. Names is in another variable '' cookie policy to prevent players from a... React with water looks like this runtime exceptions '' state ) energy:$ \Delta <... 3 February, 09:09 by solvation enthalpies 1 ): what is the alkali metals that found. '' mean in Middle English from the group one metals + 2HCl aq! Form an alkali more stable low densities: a ) noble gases earth part was added to differentiate these the. Than most elements uses, important compounds and minerals another variable '' Alakli metals True/ false having a specific in. ( 1 ) Jamir 3 February, 09:09 six chemical elements in this unit we. Excellent reducing agents 1 is alled the alkali metals are very reactive, although less so than the alkali.! Elements of group 1 elements are referred to as “ alkaline why are group 1 elements called alkaline earth metals metal because its oxide is amphoteric are... I hope you have understood the reason why alkali metals ( +2 oxidation state ) they readily lose to more! Field of chemistry how Functional Programming achieves  no runtime exceptions '' metals.Group 1 contains alkaline metals alkaline on... Are soluble in water table Trending naming is … let ’ s call it simplified will not dissolve ).. Is a noun and alkaline earth metals have a strong tendency to donate their electron... Are excellent reducing agents not found free in nature left side in periodic table nonmetallic and gas at room?! In this unit, we study their properties, uses, important compounds and minerals what @ Martin-マーチン she. Are known as alkaline earth metals: the elements readily form divalent cations ( such as Mg 2+ Ca... Mail apply to Chimera 's dragon head breath attack metals as the elements in group 2 of the is. 'S the fastest / most fun way to create a fork in Blender because oxide... 2 is called the alkaline earth metal because its oxide is amphoteric and are excellent reducing agents and! It unusual for a DNS response to the group one metals of +1 silvery-white, reactive! By dragon scale mail apply to Chimera 's dragon head breath attack, you agree to our of. Is not a metal oxide is not known as Alakli metals True/ false elements in last. The solution has a pH greater than seven and is basic favourable from an point... About 1 ) Jamir 3 February, 09:09 or hydroxides are strongly (. They dissolve excellent reducing agents of chemistry have the least nuclear charge in their inventory from them why there... Why are group 1 metals are water soluble bases, thus they are beryllium, magnesium, calcium strontium... You to the change in another variable '' another castle beyond the scope of this.... Term  oxides '' doing here called as alkaline earth metals elements except!


text:
• Create Account

## AngelScript 1.8.0 WIP #2 (2004/06/26)

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

47 replies to this topic

### #1Andreas Jonsson  Moderators

Posted 11 June 2004 - 10:38 AM

Hi guys, I've just released the first work-in-progress version of 1.8.0. You can find it and the description of its changes here: http://www.angelcode.com/angelscript/wip.asp Regards, Andreas Jönsson Author of AngelScript __________________________________________________________ www.AngelCode.com - game development and more... AngelScript - free scripting library - Tower - free puzzle game [edited by - WitchLord on June 11, 2004 5:39:04 PM] [Edited by - WitchLord on June 26, 2004 2:16:32 PM]
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

### #2Malmer  Members

Posted 11 June 2004 - 01:41 PM

Just make sure performance is not taking a hit with the new features. Performance is key to a scripting language used in games.

Posted 11 June 2004 - 06:31 PM

You can eventually call it Angel C++ :D. Anyway as for the other post the 1.7.1a in .NET (i dont have 2003 ) it asks me for a .rc/.res file during compile, so i guess you should check this out, the only way i could fix it was copy the .rc file and recompile (with version changes). i dont know if this is required, but i guess you should try it in .NET sometime to confirm.

Later

Jayanth.K
Raptor Entertainment Pvt. Ltd.
http://www.raptorentertainment.com

### #4Andreas Jonsson  Moderators

Posted 12 June 2004 - 05:10 AM

Malmer:

I''m not adding anything that should change the performance. It will just be more flexible.

Did you note a difference in performance? Perhaps you are compiling the library in debug mode?

I think the problem is not with .NET but with the project file I was distributing. It was referencing a resource file, but I didn''t include the resource file in the distribution. You ought to be able to just remove the reference to the resource file and it should work.

__________________________________________________________
www.AngelCode.com - game development and more...
AngelScript - free scripting library - Tower - free puzzle game

Posted 13 June 2004 - 09:55 PM

Just make sure teh reference is not present in 1.8.0. just to avoid confusion.

Jayanth.K
Raptor Entertainment Pvt. Ltd.
http://www.raptorentertainment.com

---------------------------------------------------------
The blue pill was a placebo!

### #6Andreas Jonsson  Moderators

Posted 26 June 2004 - 08:16 AM

I've updated the WIP

http://www.angelcode.com/angelscript/wip.asp

Not too much has changed though as I haven't had the time to really work on AngelScript for the last two weeks.
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

### #7Anonymous Poster_Anonymous Poster_*  Guests

Posted 26 June 2004 - 09:15 AM

problem using the WIP... Everything links fine and everything, but I get this error when creating the scripting engine (I based everything I did off the sample program):

Failed to create script engine - Expecting library version 1.6.1, found 1.8.0 WIP 20040611

I compiled and linked to the WIP lib. I then included the WIP angelscript.h header. I don't think I am mixing the two versions. Any help?

### #8Andreas Jonsson  Moderators

Posted 26 June 2004 - 01:52 PM

I think you just need to recompile the application. First clean target files to make sure the compiler really compiles all of the modules.

You said you updated the angelscript.h file, but your application is still expecting version 1.6.1. This tells me that the application wasn't compiled with the new angelscript header.
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

### #9Anonymous Poster_Anonymous Poster_*  Guests

Posted 27 June 2004 - 09:37 AM

Problem with registering global functions...

the functions are defined like so:
void GetAndReleaseKey(int key);
void GetKey(int key);
void ReleaseKey(int key);

then I try to register them:
r = engine->RegisterGlobalFunction("void GetAndReleaseKey(int)", asFUNCTION(GetAndReleaseKey), asCALL_CDECL); assert( r >= 0 );
r = engine->RegisterGlobalFunction("void GetKey(int)", asFUNCTION(GetKey), asCALL_CDECL); assert( r >= 0 );
r = engine->RegisterGlobalFunction("void ReleaseKey(int)", asFUNCTION(ReleaseKey), asCALL_CDECL); assert( r >= 0 );

and I get this error message:
....
Debug Error:
....
file: "i386\chkesp.c"
Line 42
The value of ESP was not saved properly accross a function call. This is usually a result of calling a function declared with one calling convention with a function pointer declared with another calling convention.

So, anyone know what's wrong?

Here is how I set up my engine and everything:
engine = asCreateScriptEngine(ANGELSCRIPT_VERSION);
if( engine == 0 ) { hge->System_Log("Failed to create script engine"); hge->System_Log("- Expecting library version %s, found %s", ANGELSCRIPT_VERSION_STRING, asGetLibraryVersion()); return -1; }

### #10Andreas Jonsson  Moderators

Posted 27 June 2004 - 11:39 AM

Do you get the error message when you try to register the functions, or when your script is calling the registered functions?

If it is when you register the functions then something is seriously wrong. It might even be a bug in AngelScript.

If it is when your script is calling the function then perhaps your functions aren't really using the cdecl calling convention. Try declaring the functions with the __cdecl modifier, or if that doesn't work with extern "C".

If you compile the test frame work (available from the WIP page) do you get the same errors?

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

### #11Anonymous Poster_Anonymous Poster_*  Guests

Posted 27 June 2004 - 02:34 PM

I compiled the test framework and it just comes up with press any key to quit. The error occurs when I try to register the function, not call it. Tell me, what steps do I need to take before I can start registering functions?

### #12Andreas Jonsson  Moderators

Posted 28 June 2004 - 07:03 AM

Since the test framework passed all the tests without any errors at least I know the library is working ok.

The only thing you should have to do before registering functions is to create the engine. Take a look at the source code for the test framework for individual examples showing how to register functions.

I'm thinking that you are having a linkage problem. Somehow your application is not using the same interface or calling convention that the library is. Are you the same Anonymous Poster that was previously using version 1.6.1?
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

### #13Anonymous Poster_Anonymous Poster_*  Guests

Posted 28 June 2004 - 08:24 AM

yes. I guess I will just erase everything angelcode and install it again. I'll let you know what happens.

### #14Anonymous Poster_Anonymous Poster_*  Guests

Posted 28 June 2004 - 09:09 AM

Yep, I accidentally was mixing the different versions. But, now I have another error (and only one version of angelscript). When I try to register a classes' methods, I get
assertion errors. The registering of stuff is in a different source file, but includes a global header containing the various class definitions.

the registering:

r = engine->RegisterObjectMethod("CGame", "int AddFont(char *filename)", asMETHOD(CGame::AddFont), asCALL_THISCALL); assert( r >= 0 );
r = engine->RegisterObjectMethod("CGame", "int AddAnim(char *filename, int frames, int width, int height)", asMETHOD(CGame::AddAnim), asCALL_THISCALL); assert( r >= 0 );
r = engine->RegisterObjectMethod("CGame", "int AddSound(char *filename)", asMETHOD(CGame::AddSound), asCALL_THISCALL); assert( r >= 0 );

### #15Andreas Jonsson  Moderators

Posted 28 June 2004 - 10:53 AM

What WIP version are you using?

With the latest you should take the method pointer with asMETHOD(classname, methodname).

What is the value of r that you receive? Check the value and compare with error codes in angelscript.h.

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

### #16Anonymous Poster_Anonymous Poster_*  Guests

Posted 28 June 2004 - 11:54 AM

http://www.angelcode.com/angelscript/files/angelscript_sdk_180WIP_20040626.zip

Either I downloaded the wrong WIP, or you forgot to update the zip file.

### #17Anonymous Poster_Anonymous Poster_*  Guests

Posted 28 June 2004 - 12:12 PM

Oh, I guess I'm using the right one. The error code is -11 or asINVALID_TYPE.

here is how I register the function:
r = engine->RegisterObjectMethod("CGame", "int AddFont(char *filename)", asMETHOD(CGame, AddFont), asCALL_THISCALL); assert( r >= 0 );

Does the class I'm referencing need to be an actual class or an object?

### #18Andreas Jonsson  Moderators

Posted 28 June 2004 - 12:45 PM

Since you get asINVALID_TYPE I assume that you haven't registered the CGame object type.

engine->RegisterObjectType("CGame", sizeof(CGame), flags);

or

engine->RegisterObjectType("CGame", 0, 0);

The second variant prevents the script from instantiating variables of that type, effectively forcing the script to use CGame objects provided by the application either through a global variable or a function.

If you choose the first variant you should read the reference about what the last parameter should be (flags).
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

### #19Anonymous Poster_Anonymous Poster_*  Guests

Posted 28 June 2004 - 03:12 PM

I'm sorry that I'm retarded but I can't get this to work. You were right I forgot to uncomment the line registering the CGame type. Now, I get error 10 (asINVALID_DECLARATION). Here is how it happens:

r = engine->RegisterObjectType ("CGame", 0, 0); hge->System_Log("%d", r); assert( r >= 0 );
r = engine->RegisterObjectMethod("CGame", "int AddSound(char*)", asMETHOD(CGame, AddSound), asCALL_THISCALL|asCALL_RETURNBYVAL); hge->System_Log("%d", r); assert( r >= 0 );

### #20Andreas Jonsson  Moderators

Posted 29 June 2004 - 01:31 AM

No worries :)

This time your problem is that you are trying to declare the method parameter as "char*", which isn't recognized by AngelScript. You could however use either one of int8, uint8, or bits8.

I suspect that you wish to be able to send a string to this function, in which case you will have to register a string factory function. If you don't register the string factory, AngelScript won't let you use the string constants. Take a look at the code for registering the bstr for more info on how to do that. You can even use that code directly in your application.

Register bstr source

If you decide to use the bstr code as it is, you'll have to remember to release the bstr that you receive. Or you could change your method to accept a reference to a bstr, as the script engine will be responsible for releasing the memory. I suggest you do the following:

#include "bstr.h"RegisterBStr(engine);engine->RegisterObjectMethod("CGame", "int AddSound(const bstr &)", asMETHOD(CGame, AddSound), asCALL_THISCALL);

Where the AddSound method looks like this:

int CGame::AddSound(const asBStr *_str) // Or char **{  // Dereference the parameter. By receiving the string by  // reference we don't have to deallocate the memory.   char *str = *_str;   // Continue working with str just as you would normally do  ...}

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


text:
There may be a bug in the most commonly used Quantopian data for at least some stocks, or there is a gap in my understanding of how I am to use these data.

I've been trying to understand why I get so many partial orders with some strategies.
This naturally caused me to take a look at my trade sizes vs the historical daily volumes.
I do not understand the apparent inconsistency between data presented by pipeline and that presented outside of pipeline.

Here are some observations:
1) There is likely an inconsistency among price and volume data used by pipeline features like AverageDailyVolume() and that used to make/manage orders
2) The daily volume reported through pipeline and the normal interface do not match. The degree of mismatch is large and not constant in offset or multiple
3) Neither of the internally reported volumes match data published on yahoo.com

Attached is a backtest for a single stock [MTEX] from 7/1/2003 through 7/31/2003
7/1: 2963 shares ordered. 2963 purchased
7/8: -2963 shares ordered. 2963 sold
7/15: 5184 shares ordered. 1537 purchased 3647 shares were not filled
7/22: -1537 shares ordered. 1537 sold
7/29: 5509 shares ordered. 2239 purchased 3270 shares were not filled

Here is where my confusion begins.
The logged messages for total trading activity on the above trading days are below
These show that 6500 shares were traded on 7/15 and 3800 on 7/29.
Why then were my trades limited to 1537 and 2239, respectively?

2003-07-02 yesterdays_news:110 INFO yesterday MTEX traded 4600 shares at $7.41 2003-07-09 yesterdays_news:110 INFO yesterday MTEX traded 16400 shares at$ 6.00
2003-07-16 yesterdays_news:110 INFO yesterday MTEX traded 6500 shares at $6.62 2003-07-23 yesterdays_news:110 INFO yesterday MTEX traded 12300 shares at$ 8.49
2003-07-30 yesterdays_news:110 INFO yesterday MTEX traded 3800 shares at 8.06 Investigating further I find that the daily volume data in pipeline and the standard, nonpipeline interface do not match. Note: that the data are for the trading date prior to the logging date, so they don't align with the data above 2003-07-01 periodic_rebalance:93 INFO Vpipe = 638965 Vquant = 29170 2003-07-08 periodic_rebalance:93 INFO Vpipe = 246630 Vquant = 46400 2003-07-15 periodic_rebalance:93 INFO Vpipe = 111950 Vquant = 3900 2003-07-22 periodic_rebalance:93 INFO Vpipe = 332663 Vquant = 10200 2003-07-29 periodic_rebalance:93 INFO Vpipe = 61250 Vquant = 6200 From yahoo.com I find that the actual trading volumes as shown below. pipeline and nonpipeline values are show for comparison 2003-06-30 V(yahoo) = 64,900 Vpipe = 638965 Vquant = 29170 2003-07-01 V(yahoo) = 46,300 Vpipe not logged Vquant = 4600 2003-07-07 V(yahoo) = 26,400 Vpipe = 246630 Vquant = 46400 2003-07-08 V(yahoo) = 40,000 Vpipe not logged Vquant = 16400 2003-07-14 V(yahoo) = 13,000 Vpipe = 111950 Vquant = 3900 2003-07-15 V(yahoo) = 7,700 Vpipe not logged Vquant = 6500 2003-07-21 V(yahoo) = 43,500 Vpipe = 332663 Vquant = 10200 2003-07-22 V(yahoo) = 62,100 Vpipe not logged Vquant = 12300 2003-07-28 V(yahoo) = 6,200 Vpipe = 61250 Vquant = 6200 (6200 matches yahoo) 2003-07-29 V(yahoo) = 9,600 Vpipe not logged Vquant = 3800 This problem persists into the present with MTEX as seen in this data from 7/1/2016 through 7/31/2016 2016-07-06 periodic_rebalance:93 INFO Vpipe = 666 Vquant = 0 2016-07-12 periodic_rebalance:93 INFO Vpipe = 1926 Vquant = 893 2016-07-19 periodic_rebalance:93 INFO Vpipe = 34112 Vquant = 600 2016-07-26 periodic_rebalance:93 INFO Vpipe = 4474 Vquant = 161 6 Loading... Backtest from to with initial capital Total Returns -- Alpha -- Beta -- Sharpe -- Sortino -- Max Drawdown -- Benchmark Returns -- Volatility --  Returns 1 Month 3 Month 6 Month 12 Month  Alpha 1 Month 3 Month 6 Month 12 Month  Beta 1 Month 3 Month 6 Month 12 Month  Sharpe 1 Month 3 Month 6 Month 12 Month  Sortino 1 Month 3 Month 6 Month 12 Month  Volatility 1 Month 3 Month 6 Month 12 Month  Max Drawdown 1 Month 3 Month 6 Month 12 Month """ While working on monthly and weekly versions of "A simple momentum rotation system for stocks" https://www.quantopian.com/posts/a-simple-momentum-rotation-system-for-stocks I have been troubled by a large number of partial orders. One way in which I attempted to resolve this was to use an AverageDailyDollarVolume() screen. The screen was set so that - maximum buy order =30k
- minimum ADDV = $600k Despite this I receive hundreds of messages like the following: 2003-07-15 WARN Your order for 2187 shares of MTEX has been partially filled. 1537 shares were successfully purchased. 650 shares were not filled by the end of day and were canceled. Here are some observations: 1) There is a likely inconsistency among price and volume data used to calculate ADDV and that used to make/manage orders 2) The daily volume reported through pipeline and the normal interface do not match. The degree of mismatch is large and not constant in offset or multiple """ # # import methods and data # from quantopian.algorithm import attach_pipeline, pipeline_output from quantopian.pipeline import Pipeline from quantopian.pipeline import CustomFactor from quantopian.pipeline.data.builtin import USEquityPricing from quantopian.pipeline.data import morningstar from quantopian.pipeline.factors import AverageDollarVolume import numpy as np class VolumePerPipline(CustomFactor): """ Minimum Volume Dollar Equivalence Calculates the value of the minimum daily volume priced at the last close **Default Inputs:** [USEquityPricing.volume] **Default Window Length:** None """ inputs = [USEquityPricing.volume] def compute(self, today, assets, out,volume): out[:] = volume[-1] def initialize(context): # # schedule methods # schedule_function(func=periodic_rebalance, date_rule=date_rules.week_start(days_offset=1), time_rule=time_rules.market_open(), half_days=True) schedule_function(func=yesterdays_news, date_rule=date_rules.week_start(days_offset=2), time_rule=time_rules.market_open(), half_days=True) context.am_buying = True context.test_stock = sid(19817) pipe = Pipeline() attach_pipeline(pipe, 'ranked_stocks') mscr = morningstar.share_class_reference c1 = mscr.symbol.latest.eq(context.test_stock.symbol) total_filter = (c1) ADDV = AverageDollarVolume(window_length=60) Vpipe = VolumePerPipline(window_length=1) pipe.add(ADDV, 'ADDV') pipe.add(Vpipe, 'Vpipe') pipe.set_screen(total_filter) def before_trading_start(context, data): # # run pipeline # calculate ADDV and target # context.output = pipeline_output('ranked_stocks') context.stock_list = context.output.index def periodic_rebalance(context,data): # # Used to alternatively buy and sell 5% of the stock's ADDV # stock = context.test_stock ADDV = context.output.ADDV[stock] Vpipe = context.output.Vpipe[stock] Vquant = data.history(stock,"volume",1,'1d')[-1] context.not_yet_logged = True log.info(" Vpipe = {0:8.0f} Vquant = {1:8.0f}".format(Vpipe, Vquant)) if context.am_buying: context.am_buying = False target = 0.05*ADDV order_target_value(stock,target) else: context.am_buying = True order_target(stock,0) def yesterdays_news(context,data): # # Used to provide price and volume data for the prior day (day of ordering) # price = data.history(context.test_stock,"price",1,'1d')[-1] vol = data.history(context.test_stock,"volume",1,'1d')[-1] msg = "yesterday MTEX traded {0:10.0f} shares at${1:10.2f}".format(vol, price)
log.info(msg)

# End of File -------------------------------------------------------------
There was a runtime error.
6 responses

Hi Peter,

First off, the discrepancy between Pipeline and data.history data is resulting from the way data.history works when used during the trading day. As is explained in the documentation here, if used during the trading day requesting '1d' bars, data.history's last returned bar is a partial bar for the current day. So when you call yesterdays_news right after market open and look at the last daily bar returned by data.history, you get a partial bar which only contains data for the one minute that has elapsed so far on the current day. So the volume figure you get there is just the volume for that one minute.

To properly get data for the previous day, you have to use the second-to-last bar given by data.history. So here's how you get yesterday's volume:

data.history(context.test_stock, "volume", 2, '1d')[-2]

So if you fix that code on lines 90, 107, and 108 you'll see the Pipeline-data.history discrepancy go away. As for your trade quantities being limited, our default slippage model limits trades to 2.5% of volume, and you'll find the order amounts that were able to be filled are about 2.5% of the volume for that day.

Finally, the discrepancy with Yahoo: Note that MTEX had a 1:10 reverse split on 2012-01-17. While our volume values reflect the actual share volume from 2003, Yahoo's volume values are split-adjusted, since they're intended to be used from the perspective of today. So Yahoo's volume values are about 1/10 of ours.

I hope this explains everything; let me know if you have more questions.

Disclaimer

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by Quantopian. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. No information contained herein should be regarded as a suggestion to engage in or refrain from any investment-related course of action as none of Quantopian nor any of its affiliates is undertaking to provide investment advice, act as an adviser to any plan or entity subject to the Employee Retirement Income Security Act of 1974, as amended, individual retirement account or individual retirement annuity, or give advice in a fiduciary capacity with respect to the materials presented herein. If you are an individual retirement or other investor, contact your financial advisor or other fiduciary unrelated to Quantopian about whether any given investment idea, strategy, product or service described herein may be appropriate for your circumstances. All investments involve risk, including loss of principal. Quantopian makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances.

Nathan,
Thanks for taking the time to give such a thorough response.
Your fixes did resolve the difference between the pipeline and nonpipeline data.

Two concerns remain:

First, the 2.5% limit in the slippage model did not work exactly as I'd expect.
I modified my messages to display 2.5% of the day's trade volume.
The actual limits imposed are slightly less than 2.5% of the reported daily volume.

2003-07-15 WARN Your order for 5184 shares of MTEX has been partially filled. 1537 shares were successfully purchased. 3647 shares were not filled by the end of day and were canceled.
2003-07-16 yesterdays_news:126 INFO yesterday MTEX traded 66200 shares so max trade size is 1655
==> 1537 vs 1655 is about 7% less than expected

2003-07-29 WARN Your order for 5509 shares of MTEX has been partially filled. 2239 shares were successfully purchased. 3270 shares were not filled by the end of day and were canceled.
2003-07-30 yesterdays_news:126 INFO yesterday MTEX traded 96623 shares so max trade size is 2416
==> 2239 vs 12416 is about 7% less than expected

Second, the 10:1 split explains the general behavior (Quantopian volumes are ~10x Yahoo volumes)
The ratio is not consistent, however.
Google Finance volumes are very similar to the Yahoo data and are slightly higher. Perhaps they include trades outside of the session. Regardless of this the Quantopian/Google ratios would be similar to those shown for Quantopian/Yahoo.
I'm puzzled as to why the ratio varies so much

2003-06-30 V(yahoo) = 64,900 Vpipe = 638965 ==> ratio = 9.85, V(google) = 65,056
2003-07-07 V(yahoo) = 26,400 Vpipe = 246630 ==> ratio = 9.34, V(google) = 26,503
2003-07-14 V(yahoo) = 13,000 Vpipe = 111950 ==> ratio = 8.61, V(google) = 13,315
2003-07-21 V(yahoo) = 43,500 Vpipe = 332663 ==> ratio = 7.65, V(google) = 43,576
2003-07-28 V(yahoo) = 6,200 Vpipe = 61250 ==> ratio = 9.87, V(google) = 6,275

Nathan,
If understand you right,
While our volume values reflect the actual share volume from 2003
means that Quantopian historical volume and price data is not split adjusted.

Yes. I am puzzled too. You need to adjust both.

I ran a quick test that indicates all is behaving in a split adjusted manner.

Backtest:
buys 1000 shares of AAPL on 6/2/2014 and holds them until 5% return is achieved

Background:
AAPL had a 7-to-1 split over the weekend between 6/6/2014 and 6/9/2014
I picked AAPL for this because if there were a problem with it, then others would have yelled loudly in June of 2014

Logged data results:
The logged data show that this split is captured in the reported price and volume history data of Quantopian
2014-06-05 my_rebalance:36 INFO yesterday AAPL traded 8964095 shares at 644.82
2014-06-06 my_rebalance:36 INFO yesterday AAPL traded 7841964 shares at 647.35
2014-06-09 my_rebalance:36 INFO yesterday AAPL traded 67368599 shares at 92.23
2014-06-10 my_rebalance:36 INFO yesterday AAPL traded 64380213 shares at 93.70

Displayed data results:
The displayed data in Daily Positions panel of Backtest shows the adjustment is applied as well
2014-06-05 1000 shares at $647.35 2014-06-06 1000 shares at$647.57
2014-06-09 6999 shares at $93.70 2014-06-10 6999 shares at$94.25

??? What happened to one share? 6999 vs 7000?

Price-based decision results:
2014-06-02 1000 shares purchased
2014-06-11 699 shares sold
If the price data were not split adjusted, then the 6/11/2014 sale would not have been triggered.

For pete's sake (and that was not my first choice of expletives), how Quantopian handles adjustments has been repeatedly explained in great detail. It is more correct than what Yahoo et al do.

The key is that they make no adjustment that was not known at the time. But at each simulation time point, they adjust backwards all historical data requested at that time point as of that time point.


text:
1. ## Truth table problem

Is the following valid or invalid? (show by using a truth table).

If Rick gains employment, then Rick will earn a paycheck. p->q
If Rick earns a paycheck, then Rick will be excited. q->r

Rick gains employment. p

____________________________
Rick will be excited. r

what is my final statement? Which is correct before completing my truth table?
[p^(p->q)]^(q->r) or is it [p^(p->q)]^r

2. Originally Posted by CPR
Is the following valid or invalid? (show by using a truth table).

If Rick gains employment, then Rick will earn a paycheck. p->q
If Rick earns a paycheck, then Rick will be excited. q->r

Rick gains employment. p

____________________________
Rick will be excited. r

what is my final statement? Which is correct before completing my truth table?
[p^(p->q)]^(q->r) or is it [p^(p->q)]^r
P => R

you want to know if gaining employment makes Rick excited in every instance

3. Hello, CPR!

Is the following valid or invalid? (show by using a truth table).

If Rick gains employment, then Rick will earn a paycheck. . $p \to q$
If Rick earns a paycheck, then Rick will be excited. . $q \to r$
Rick gains employment. . $p$
-----------------------------------------------
Therefore: Rick will be excited. . $r$

The argument is: . $\bigg[(p \to q) \wedge (q \to r) \wedge p\bigg] \to r$

(The argument is valid; the final column should be eight T's.)

4. ## Thanks!

Thanks for the help. I got it. I was on the right page. Perhaps you can help me with my post under Urgent Help. It is an Induction problem.
It is 1+2+3....(4n-2)= n(3n-1)

The basic step is n=1. 4(1)-2 = 1(3(1)-1)
Induction step is:
1+2+3....(4k-2) = k(3k-1)

1+2+3....(4k-2)+(k+1) = k(3k-1) = (K+1)

5. Originally Posted by CPR
Thanks for the help. I got it. I was on the right page. Perhaps you can help me with my post under Urgent Help. It is an Induction problem.
It is 1+2+3....(4n-2)= n(3n-1)

The basic step is n=1. 4(1)-2 = 1(3(1)-1)
Induction step is:
1+2+3....(4k-2) = k(3k-1)

1+2+3....(4k-2)+(k+1) = k(3k-1) = (K+1)

I think your k+1 is in the wrong place...if i'm correct, you would assume that
1+2+3....(4k-2) = k(3k-1) for all n >= 1

Then you want to prove:

1+2+3....(4k-1) = k(3k)

Can someone confirm i'm correct?

6. Instead of the last equal sign I meant to type =k(3k-1)+ (k+1)

Yes that is what I got on my first attempt but where do I go from there.
So after =(3k-K) + (k+1)
= 3k +1
now what? I need your help!

7. Originally Posted by CPR
Instead of the last equal sign I meant to type =k(3k-1)+ (k+1)

Yes that is what I got on my first attempt but where do I go from there.
So after =(3k-K) + (k+1)
= 3k +1
now what? I need your help!
you want to prove:

1+2+3....(4k-1) = (k+1)(3k)
which equals
1+2+3....(4k-1) = (3k^2 + 3k)

So now rather than try to simplify it any further (like you did above), you need to prove that (4k-1) = (3k^2+3k)...so start from the left, and try to get the right. Don't start with what you want to prove..You will need to suppose that (4k-2) = k(3k-1) (This is your IH) and use it to prove k+1, so in your algebra, you want to get 4k-2, so you can say "I know that 4k-2 = k(3k-1) and therefore...blah blah blah"

Use that and do the algebra to get (4k-1) = (3k^2+3k), don't forget about your IH which you'll need to complete the proof.

8. okay, I'm trying but its not working. I'll continue to try for awhile, but Im not getting it.

9. Originally Posted by CPR
okay, I'm trying but its not working. I'll continue to try for awhile, but Im not getting it.
Try re-writing it using the summation notation, maybe that will help you understand it better?

10. What is summation notations?

11. Originally Posted by CPR
What is summation notations?
writing a sum using the $\sum$ symbol

i need to constuct a truth table...but i absolutely cannot remember how!

(pv~r)^~(qvr)

13. Originally Posted by malia
i need to constuct a truth table...but i absolutely cannot remember how!

(pv~r)^~(qvr)

-Dan

14. Hello, malia!

I can't give you a review on truth tables,
. . but this is what you should have . . .

$\begin{array}{c|c|c|c|c|c|c|c|c|c|c}
p & q & r & (p & \vee & \sim r) & \wedge & \sim & (q & \vee & r) \\ \hline
T & T & T & T & T & F & {\color{blue}F} & F & T & T & T \\
T & T & F & T & T & T & {\color{blue}F} & F & T & T & F \\
T & F & T & T & T & F & {\color{blue}F} & F & F & T & T \\
T & F & F & T & T & T & {\color{blue}T} & T & F & F & F \end{array}$

. $\begin{array}{c|c|c|c|c|c|c|c|c|c|c}
F & T & T & F & F & F & {\color{blue}F} & F & T & T & T \\
F & T & F & F\, & T & \;\;T\:\; & {\color{blue}F} & F & T \,& T \,& F \\
F & F & T & F & F & F & {\color{blue}F} & F & F & T & T \\
F & F & F & F & T & T & {\color{blue}T} & T & F & F & F \\
& & & ^1 & ^2 & ^1 & ^4 & ^3 & ^1 & ^2 & ^1
\end{array}$

15. Originally Posted by Soroban
Hello, malia!

I can't give you a review on truth tables,
. . but this is what you should have . . .

$\begin{array}{c|c|c|c|c|c|c|c|c|c|c}
p & q & r & (p & \vee & \sim r) & \wedge & \sim & (q & \vee & r) \\ \hline
T & T & T & T & T & F & {\color{blue}F} & F & T & T & T \\
T & T & F & T & T & T & {\color{blue}F} & F & T & T & F \\
T & F & T & T & T & F & {\color{blue}F} & F & F & T & T \\
T & F & F & T & T & T & {\color{blue}T} & T & F & F & F \end{array}$

. $\begin{array}{c|c|c|c|c|c|c|c|c|c|c}
F & T & T & F & F & F & {\color{blue}F} & F & T & T & T \\
F & T & F & F\, & T & \;\;T\:\; & {\color{blue}F} & F & T \,& T \,& F \\
F & F & T & F & F & F & {\color{blue}F} & F & F & T & T \\
F & F & F & F & T & T & {\color{blue}T} & T & F & F & F \\
& & & ^1 & ^2 & ^1 & ^4 & ^3 & ^1 & ^2 & ^1
\end{array}$

nice use of LaTeX, that must have taken you forever!


text: PASCAL programs for identification of Lie algebras. I: RADICAL - a program to calculate the radical and nil radical of parameter-free and parameter-dependent Lie algebras. The program RADICAL (based on PASCAL) presented by the author is a package of 127 subprograms (5300 lines) and determines for a Lie algebra L given by its structure constants (which can be either integers or polynomials) the radical or the nilradical, respectively. Radicals are calculated as orthogonal complement (with respect to the Killing form) of the derived Lie algebra [L,L], that means by solution of a system of linear homogeneous equations. For the determination of nilradicals a new algorithm is used without any irrational calculations. The program has been successfully tested with Lie algebras of dimensions up to 30. For $dim =5$ one has running times of few seconds (on CDC- CYBER-Computer). Various examples are given. For theoretical foundations see Zbl 0668.17004. (Some essential modifications are given in the erratum notice.)


text:
Courses
Courses for Kids
Free study material
Free LIVE classes
More

# PEMDAS Rule

## What is PEMDAS?

Last updated date: 22nd Mar 2023
Total views: 59.1k
Views today: 0.37k

It is always easier to deal with a single operation like only addition, subtraction, multiplication, or division. When a couple of them or all of the operations are involved at once, it becomes difficult to judge which operation must be fulfilled first.

In such a situation the PEMDAS rule comes into the picture.

Before diving into what is PEMDAS, the PEMDAS full form, situations where this is used and all other million questions in your mind, it’s important to un-wrap this concept part by part. Only then you will be able to answer the PEMDAS examples. Let’s jump right in!

What is PEMDAS?

## What does PEMDAS Stand for?

PEMDAS is nothing but an abbreviation for the parts and order of different operations that have to be dealt with when multiple operations are involved in the given equation. PEMDAS full form helps us to remember the sequence of the operations that have to be performed.

If that is super complex to understand, it is the short form for the following parts:

• P for Parentheses (or Brackets)

• E for Exponents (squares and roots are called so)

• M for Multiplication

• D for Division

• S for Subtraction

## Why PEMDAS?

As remembering a whole list of operations is a lot more of a task than remembering this weird-sounding word! More than that, mathematics is a subject of organization and logic, so the PEMDAS rule proves just that.

This rule helps us understand the priorities of operations.

When given a list of things to do, we tend to panic and lose track of what to do first and what comes next. The PEMDAS method prevents this confusion and helps you get through the list of operations with ease.

Order of Operations According to The PEMDAS Rule

## How is The PEMDAS Method Carried Out?

The full form of PEMDAS says pretty much everything about this method. Anyways, let’s brush through the steps one by one.

• Step 1- Deal with the parentheses! Any operation within the brackets or parentheses must be solved first. Irrespective of it being addition, subtraction, multiplication, or division.

• Step 2- Little numbers are the next big problem. Exponents! Square and Cube the given powers wherever necessary to jump to the next step.

• Step 3- Always remember to start from the left and solve whatever comes first, be it multiplication or division.

• Step 4- Same rule of left to the right applies here too! Solve whatever comes first, be it addition or subtraction.

## Solved Examples

Q1. Solve the following equation using the PEMDAS method

$3 \times 6(7-4)-2^{2}+5 \times 6$

Ans: Solving what's given in the parentheses we get $3 \times 6(3)-2^{2}+5 \times 6$

Solving exponents given in the equation

$3 \times 6 \times 3-4+5 \times 6$

First we solve the multiplication and division from left to right $54-4+30$

Next, we solve the addition and subtraction from left to right

$54 - 4 + 30 = 80$

Q2. Solve the following equation using the PEMDAS method

$6^{2} \times(32-29)$

Ans: Solving what's given in the parentheses, we get $=6^{2} \times 3$

Solving exponents given in the equation $=36 \times 3$

Next, we solve the multiplication

$=108$

Q3. Solve the following equation using the PEMDAS method

$11^{2}-3(41+0-39)$

Ans: Solving what's given in the parentheses, we get

$=11^{2}-3 \times 2$

Solving the exponents in the equation

= 121 - 6

Now, subtracting 121 - 6 =115

Q4. Solve the following equation using the PEMDAS method

= 24 × 4(65-23)

Ans: Solving what’s given in the parentheses

= 24 × 4 × 42

Now, multiplying we get 4032

## Practice Problems

Q1. Solve the following equation using the PEMDAS method 4+3[8-2(6-3)]÷2

Ans: 39

Q2. Solve the following equation using the PEMDAS method 18÷(8-2×3)

Ans: 9

Q3. Solve the following equation using the PEMDAS method 20+34(45÷5)

Ans: 326

Q4. Solve the following equation using the PEMDAS method 10×5(20÷4)

Ans: 250

Q5. Solve the following equation using the PEMDAS method 8×5(88÷88)

Ans: 40

## Summary

The PEMDAS rule gives the order of operations that has to be followed when dealing with a bunch of different operations. It stands for the following operations in the given order, P for parentheses, E for exponents, M for multiplication, D for division, A for addition, and S for Subtraction.

It is also necessary to remember another important rule of following from left to right i.e. operations on the left of the equation have to be followed before getting to the right of the equation. PEMDAS makes operations easier to perform. By practicing a few PEMDAS examples with answers, it becomes much easier.

## FAQs on PEMDAS Rule

1. Do BODMAS and PEMDAS have the same set of rules?

No, they don’t have the same set of rules. Both have different rules.

 BODMAS PEMDAS BODMAS abbreviates Brackets, Order, Division, Multiplication, Addition, and subtraction. PEMDAS's full form is Parentheses, Exponents, multiplication, division, addition, and subtraction. In BODMAS there is no left-to-right rule. PEMDAS rule follows the left-to-right rule. Exponents have no place in the BODMAS rule Exponents are given enough attention in the PEMDAS method and are solved before getting to multiplication and division.

2. Do you multiply or divide first Pemdas?

According to the order of operations, you should do addition and subtraction last and multiply and division first, proceeding from left to right. Divide and multiply from left to right as you continue.

In the PEMDAS rule, Multiplication comes before Division, although the two are completed in a single step from left to right. In the same step, both addition and subtraction are performed. It’s important to stick to the rule of solving operations from left to right when solving the PEMDAS examples.

3. Who invented the PEMDAS rule?

Nobody Invented PEMDAS. People gradually discovered the best techniques and practices which later became standards. A section of an algebra textbook for the military academy published in 1838, written for military engineers rather than academic mathematicians or elementary school students, has the first explicit reference to the PEMDAS rule in Dutch.


text:
# View alarm details¶

The alarm history can be viewed in the Alarm tab menu. Unlike the Statistics page, which gives an overview of alarm-related statistics, this menu is optimized for viewing and exploring individual alarms.

This menu consists of the following two pages:

## Alarm list¶

The Alarm tab displays the alarms triggered to date. Using the Alarm rule / Timeline toggle box on the top of the page, the alarms can be sorted by alarm rule or time triggered.

• Alarm rule (sorted by alarm rule)

• Timeline (sorted by time triggered)

Click + Load more at the end of the category to view more alarm items in the same category.

## Alarm details¶

Select an alarm item in list to view its detailed information. Each area in the alarm details page is described below:

### Alarm Info area¶

This area presents alarm severity, time of occurrence, and the settings of the causing rule.

### Alarm status boxes¶

These boxes display occurrence details of the selected alarm item. If alarms are triggered continuously at the given intervals, the number of alarm items remains at 1. In the figure below, alarms were set off continuously over 4 intervals (Alarms). Since the alarm interval is 1 minute, 4 alarms were triggered for a total of 4 minutes (Elapsed Time).

### Alarm History area¶

This area presents the history of alarms triggered by the selected rule.

### Chart View tab¶

This tab presents a chart of the abnormal score for the monitored aggregate data falling under the alarm period. The chart includes alarms triggered from reaching score limits (Critical, Major, Moderate, Low). See Basic principles for details on chart generation.

• Total abnormal score: Displays the abnormal score calculated for all measures included in alarm rules.

• Chart by measures: Presents the trends of the predicted and actual values for each individual measure included in the alarm rule.

### Table View tab¶

The tab area presents the actual value, predicted value, and abnormal score for each alarm triggered.