text:
## Understanding Shallow Network Data Structures

This topic discusses how the format of input data structures affects the simulation of networks. It starts with static networks, and then continues with dynamic networks. The following section describes how the format of the data structures affects network training.

There are two basic types of input vectors: those that occur concurrently (at the same time, or in no particular time sequence), and those that occur sequentially in time. For concurrent vectors, the order is not important, and if there were a number of networks running in parallel, you could present one input vector to each of the networks. For sequential vectors, the order in which the vectors appear is important.

### Simulation with Concurrent Inputs in a Static Network

The simplest situation for simulating a network occurs when the network to be simulated is static (has no feedback or delays). In this case, you need not be concerned about whether or not the input vectors occur in a particular time sequence, so you can treat the inputs as concurrent. In addition, the problem is made even simpler by assuming that the network has only one input vector. Use the following network as an example.

To set up this linear feedforward network, use the following commands:

net = linearlayer;
net.inputs{1}.size = 2;
net.layers{1}.dimensions = 1;

For simplicity, assign the weight matrix and bias to be W = [1 2] and b = [0].

The commands for these assignments are

net.IW{1,1} = [1 2];
net.b{1} = 0;

Suppose that the network simulation data set consists of Q = 4 concurrent vectors:

${p}_{1}=\left[\begin{array}{l}1\\ 2\end{array}\right],{p}_{2}=\left[\begin{array}{l}2\\ 1\end{array}\right],{p}_{3}=\left[\begin{array}{l}2\\ 3\end{array}\right],{p}_{4}=\left[\begin{array}{l}3\\ 1\end{array}\right]$

Concurrent vectors are presented to the network as a single matrix:

P = [1 2 2 3; 2 1 3 1];

You can now simulate the network:

A = net(P)
A =
5     4     8     5

A single matrix of concurrent vectors is presented to the network, and the network produces a single matrix of concurrent vectors as output. The result would be the same if there were four networks operating in parallel and each network received one of the input vectors and produced one of the outputs. The ordering of the input vectors is not important, because they do not interact with each other.

### Simulation with Sequential Inputs in a Dynamic Network

When a network contains delays, the input to the network would normally be a sequence of input vectors that occur in a certain time order. To illustrate this case, the next figure shows a simple network that contains one delay.

The following commands create this network:

net = linearlayer([0 1]);
net.inputs{1}.size = 1;
net.layers{1}.dimensions = 1;
net.biasConnect = 0;

Assign the weight matrix to be W = [1 2].

The command is:

net.IW{1,1} = [1 2];

Suppose that the input sequence is:

${p}_{1}=\left[1\right],{p}_{2}=\left[2\right],{p}_{3}=\left[3\right],{p}_{4}=\left[4\right]$

Sequential inputs are presented to the network as elements of a cell array:

P = {1 2 3 4};

You can now simulate the network:

A = net(P)
A =
[1]    [4]    [7]    [10]

You input a cell array containing a sequence of inputs, and the network produces a cell array containing a sequence of outputs. The order of the inputs is important when they are presented as a sequence. In this case, the current output is obtained by multiplying the current input by 1 and the preceding input by 2 and summing the result. If you were to change the order of the inputs, the numbers obtained in the output would change.

### Simulation with Concurrent Inputs in a Dynamic Network

If you were to apply the same inputs as a set of concurrent inputs instead of a sequence of inputs, you would obtain a completely different response. (However, it is not clear why you would want to do this with a dynamic network.) It would be as if each input were applied concurrently to a separate parallel network. For the previous example, Simulation with Sequential Inputs in a Dynamic Network, if you use a concurrent set of inputs you have

${p}_{1}=\left[1\right],{p}_{2}=\left[2\right],{p}_{3}=\left[3\right],{p}_{4}=\left[4\right]$

which can be created with the following code:

P = [1 2 3 4];

When you simulate with concurrent inputs, you obtain

A = net(P)
A =
1     2     3     4

The result is the same as if you had concurrently applied each one of the inputs to a separate network and computed one output. Note that because you did not assign any initial conditions to the network delays, they were assumed to be 0. For this case the output is simply 1 times the input, because the weight that multiplies the current input is 1.

In certain special cases, you might want to simulate the network response to several different sequences at the same time. In this case, you would want to present the network with a concurrent set of sequences. For example, suppose you wanted to present the following two sequences to the network:

$\begin{array}{c}{p}_{1}\left(1\right)=\left[1\right],{p}_{1}\left(2\right)=\left[2\right],{p}_{1}\left(3\right)=\left[3\right],{p}_{1}\left(4\right)=\left[4\right]\\ {p}_{2}\left(1\right)=\left[4\right],{p}_{2}\left(2\right)=\left[3\right],{p}_{2}\left(3\right)=\left[2\right],{p}_{2}\left(4\right)=\left[1\right]\end{array}$

The input P should be a cell array, where each element of the array contains the two elements of the two sequences that occur at the same time:

P = {[1 4] [2 3] [3 2] [4 1]};

You can now simulate the network:

A = net(P);

The resulting network output would be

A = {[1 4] [4 11] [7 8] [10 5]}

As you can see, the first column of each matrix makes up the output sequence produced by the first input sequence, which was the one used in an earlier example. The second column of each matrix makes up the output sequence produced by the second input sequence. There is no interaction between the two concurrent sequences. It is as if they were each applied to separate networks running in parallel.

The following diagram shows the general format for the network input P when there are Q concurrent sequences of TS time steps. It covers all cases where there is a single input vector. Each element of the cell array is a matrix of concurrent vectors that correspond to the same point in time for each sequence. If there are multiple input vectors, there will be multiple rows of matrices in the cell array.

In this topic, you apply sequential and concurrent inputs to dynamic networks. In Simulation with Concurrent Inputs in a Static Network, you applied concurrent inputs to static networks. It is also possible to apply sequential inputs to static networks. It does not change the simulated response of the network, but it can affect the way in which the network is trained. This will become clear in Neural Network Training Concepts.


text:
# Homework Help: Velocity in a Spiral Path

1. Apr 14, 2012

### roam

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

http://img534.imageshack.us/img534/6164/questionv.jpg [Broken]

2. Relevant equations

ω = dθ/dt

v = dS/dt

3. The attempt at a solution

I used the second expression for the tangential speed:

$v = \frac{dS}{dt} = r \frac{d \dot{\theta}}{d t} = (b-ct) \frac{d(kt)}{dt}$

$\therefore \ v(t) = (b-ct) k$

So is this a correct expression for speed as a function of time?

So when r=0, the velocity would also be 0?

Last edited by a moderator: May 5, 2017
2. Apr 14, 2012

### pcm

in polar coordinates v2=(dr/dt)2+(rd$\theta$/dt)2

3. Apr 14, 2012

### pcm

is it dimensionally correct?

4. Apr 16, 2012

### roam

I just substituted the rate of change of radial distance into the equation v = r.dθ/dt, and then I differentiated it. What's wrong with that?

5. Apr 25, 2012

### roam

I think it's dimensionally correct. Why? Did I use the wrong equations?

6. Apr 25, 2012

### Vipho

In this case, I think this formula isn't correct.
So, $\vec{r}=r\cos(\theta)\hat{x}+r\sin(\theta)\hat{y} \\ \vec{v}=\frac{d\vec{r}}{dt} \\ v_x=\frac{d(r\cos(\theta))}{dt}=\cos(\theta)\frac{dr}{dt}+r\frac{d(\cos\theta)}{dt}=\cos(\theta) \frac{dr}{dt}-r\sin\theta \frac{d\theta}{dt} \\ v_y=\frac{d(r\sin(\theta))}{dt}=\sin(\theta)\frac{dr}{dt}+r\cos\theta\frac{d\theta}{dt} \\ v^2=(v_x)^2+(v_y)^2=(\frac{dr}{dt})^2+(r\frac{d \theta}{dt})^2$

format: plain


text:
### jdurie's blog

By jdurie, history, 2 weeks ago,
Solution
Solution
Solution
Solution
Solution
Solution

• +104

 » 2 weeks ago, # |   -111 С sucks
•  » » 2 weeks ago, # ^ |   -34 You sucks
•  » » » 2 weeks ago, # ^ |   -9 Your grammar sucks.
•  » » » » 2 weeks ago, # ^ |   0 Good profile photo!
•  » » » » 2 weeks ago, # ^ |   0 Why?
•  » » 2 weeks ago, # ^ | ← Rev. 3 →   +36 Yes, example test case for B sucks so I got many WA on pretest 2 and problem С also sucks. And I am trying to hit -100 contribution, So downvote me.
•  » » » 2 weeks ago, # ^ |   +19 Why do I get upvotes, I need downvote!!!.
•  » » » » 2 weeks ago, # ^ |   0 Alright let's click the upvote...
•  » » » 2 weeks ago, # ^ |   0 Good reverse psychology lol
•  » » » 2 weeks ago, # ^ |   0 no it's actually helpful
 » 2 weeks ago, # |   +11 Thanks for the fast editorial!
 » 2 weeks ago, # |   -52 Fix picture for C please
 » 2 weeks ago, # |   +112 Statement of Problem A was incomprehensible. These days, I feel that in cf contests it's not the problem that's hard but the way it's written which makes it harder to understand :/ Had to blindly solve it using the given test cases
•  » » 2 weeks ago, # ^ | ← Rev. 2 →   +20 I agree. I anticipate the description of A as short as AtCoder problems.
•  » » 2 weeks ago, # ^ | ← Rev. 2 →   +2 NarrationForces
•  » » » 2 weeks ago, # ^ |   +12 Unclear Ad-Hoc based GridForces
•  » » 2 weeks ago, # ^ |   0 same as problem D
•  » » 2 weeks ago, # ^ |   +21 problem A was mad to read tbh
 » 2 weeks ago, # |   0 Tough contest!! Great Explanation!!
 » 2 weeks ago, # | ← Rev. 4 →   +45 Let $f[i][j][k]$ be whether there is a path whose end point is $(i, j)$ and the sum on the path is $k$.We can use bitset to calculate this DP with a $O\left(\dfrac{nm(n + m)}{64}\right)$ complexity.Submission: 161091846
•  » » 2 weeks ago, # ^ |   +1 I am not able to get why is the time complexity divided by 64. Would be great if you could explain it.
•  » » » 2 weeks ago, # ^ | ← Rev. 2 →   +2 It's because of use of the bitset. I am not sure but I think each position contributes only 1 bit to the space complexity and not the space required for storing 64-bit integer (size of long long)
•  » » » 2 weeks ago, # ^ |   +2 The size of the bitset is roughly $\dfrac{(m+n-1)}2$. On 32 bit systems, bit operations on bitsets take $O(\dfrac{n}{32})$, where $n$ is the size of the bitset. This means each operation takes about $O(\dfrac{m+n}{64})$. Then, the loop makes it $O(\dfrac{nm(n+m)}{64})$.
•  » » 2 weeks ago, # ^ |   +2 what is this line doing ? f[i][j] = (f[i - 1][j] | f[i][j - 1]) << a[i][j];
•  » » » 2 weeks ago, # ^ | ← Rev. 3 →   0 In this solution the bitset is used as below- - If i th bit is 1 then sum i can be attained - If ith bit is 0 then sum i can't be attained.Let's take an example to understand logic behind f[i][j] = (f[i - 1][j] | f[i][j - 1]) << a[i][j];.Let's say we want f[i][j], and we have- - f[i-1][j] = 010010, note that 2nd and 5th bit are set i.e sum 2 and 5 is attainable at f[i-1][j]. - And, f[i][j-1] = 001011, i.e sum 1, 2 and 4 is attainable at f[i][j-1].We can reach grid[i][j] from grid[i-1][j] or grid[i][j-1]. So- - If grid[i][j] = 0, Then sum 2,5 or 1,2,4 is attainable here which can also be written as- 010010 | 001011 = 011011 - If grid[i][j] = 1, Then sum (2+1),(5+1) or (1+1),(2+1),(4+1) is attainable at [i][j], which is simply (010010 | 001011) followed by a left shift as all (i + 1)th bit will be set now.Hope you understood :).
•  » » 2 weeks ago, # ^ |   0 Same way with me and my submission is 161081121
•  » » 2 weeks ago, # ^ |   0 woc ，nong！
 » 2 weeks ago, # | ← Rev. 2 →   +128 If the editorial for D doesn't make sense, you can check out this one over here on page 17.
•  » » 2 weeks ago, # ^ |   +8 Thanks. Appreciated (I mistakenly downvoted you and now I can't change it.)
 » 2 weeks ago, # | ← Rev. 2 →   -15 [submission:161072909]Why is it wrong?
•  » » 2 weeks ago, # ^ |   +6 because k is initialized by a[x][y], that means k equals 0 ( k=a[x][y]; )but when all the values in the grid are negative the result will be incorrect.
•  » » » 2 weeks ago, # ^ |   +1 Thanks
 » 2 weeks ago, # |   +23 There is a solution that does not require any observation in D2 from D1 — just re-root the tree.|First, calculate the answer for any root.If you want to change u to v, push all changes into a stack, recalc dp[u] to what it was before you added v, then recalc v as if it is the root. Then, do it recursively for all children son such that son != u. After you finished, roll back the changes to dp. It takes O(1) to roll back, O(1) to recalc, so it is still O(n)
•  » » 2 weeks ago, # ^ |   +4 I solved it in the same way (sadly after contest).
 » 2 weeks ago, # |   +6 If you are/were getting a WA/RE verdict on problems from this contest, you can get the smallest possible counter example for your submission on cfstress.com. To do that, click on the relevant problem's link below, add your submission ID, and edit the table (or edit compressed parameters) to increase/decrease the constraints.Divison 2 If you are not able to find a counter example even after changing the parameters, reply to this thread (only till the next 7 days), with links to your submission and ticket(s).
•  » » 2 weeks ago, # ^ |   0 not available for python? I entered my submission ID, it said python support disabled
•  » » » 2 weeks ago, # ^ |   0 Yes, only available for C++ for now.
•  » » 2 weeks ago, # ^ |   0 Hello, it generated a wrong testcase for problem C. Ticket We can only have 1 or -1 in the grid, but it showing a testcase with 2.
•  » » » 2 weeks ago, # ^ |   0 Hi, the generated testcase is actually correct. The input format is the same as the problem, so 1 1 2 -1 1 means that you have one testcase, where the number of rows is 1, number of columns is 2, and the elements are -1 1. (Here, 2 is the dimension of the matrix, not the matrix element).
•  » » » » 2 weeks ago, # ^ |   0 Oh ok. Sorry!
•  » » 38 hours ago, # ^ |   0 Actually it wont work for python code as of now right?Anyway must submission id is 162665384 can u tell me where I made a mistake?
 » 2 weeks ago, # | ← Rev. 2 →   0 Can anyone tell the answer to the test case: 8 2 1 3 4 3 6 2 8 according to cf stress test it should be joe but according to me winner will be mike as in 2nd iteration 2nd element will be already 0 that was joes pile.
•  » » 2 weeks ago, # ^ |   0 Here the winner is Mike as you said
•  » » » 2 weeks ago, # ^ |   +1 I am really dumb there was a typo in finding the minimum value in my code and due to that i was not able to get ac on b and wasted a lot of time and i suddenly noticed it now.
•  » » 2 weeks ago, # ^ |   0 Huh, I think you got confused by the color coding.The expected output is displayed by a green bar, while your output is displayed with a red bar. However, when computing the difference, your output appears to the right, hence it has a green highlight, denoting that the correct answer was deleted and an incorrect one was added there.CF Stress prints the expected output as Mike for this testcase.
•  » » » 2 weeks ago, # ^ |   0 what is cfstress? and how it helps in contests?
•  » » » » 2 weeks ago, # ^ |   0 CF stress is a website that will tell which test case the solution failed. But it does not work during the contest. You can help it to speed up the up solving or while practicing. Refer to this official blog for more info: https://codeforces.com/blog/entry/99278.
•  » » » » » 2 weeks ago, # ^ |   0 Thank you.
 » 2 weeks ago, # |   0 If anyone was curious, you can solve C with the bitset dp: https://codeforces.com/contest/1695/submission/161121586
•  » » 2 weeks ago, # ^ |   +2 what a ironical name!
 » 2 weeks ago, # | ← Rev. 2 →   -34 Statement for problem A was hideous, the hard thing is to understand this problem.Problem B bad sample tests which gives us nothing in understanding the problem also explanation of second test case was very weird and confusing.Problem C is very weird.Problem D also as in Problem B no sample tests and explanations.
 » 2 weeks ago, # |   +1 I have some doubt about the solution to problem A. Consider following case: 1 4 4 0 -14 8 9 17 -26 20 30 21 5 -24 -19 -7 -13 14 -4 Based on the solution, the answer is 12. But if we take a subrectangle with $(h, w) = (4, 3)$ and upper-left corner placing on $(1, 1)$, the maximum value inside is 21, which is not the global maximum value(30). So if Joe chooses this subrectangle, Michael will lose.I think the answer should be 16. Am I missing something?
•  » » 2 weeks ago, # ^ |   +3 Michael can instead take a subrectangle with $(h,w) = (3,4)$. this includes the global maximum wherever the subrectangle is.
•  » » » 2 weeks ago, # ^ |   0 Oh, I completely forgot Michael was the one who chooses h, w values... Thanks!
•  » » 2 weeks ago, # ^ |   0 the answer 12 is getting by choosing 3*4 ,not 4*3 (both are different as stated in problem)
 » 2 weeks ago, # |   0 161122420 what is wrong with this solution for C . i used recursion + memoization
•  » » 2 weeks ago, # ^ |   0 solution will be tle but for the wrong answer initiate dp with false then if the dp[i][j]!=false return dp[i][j] because if at some point we find a path we will need that
 » 2 weeks ago, # |   -19 I'm not gonna argue about the quality of the problems (there's already much argument going on), however I think the pretests for A was pretty much garbage 161068768 a solution which scans from -32768 got through pretests. this means that pretests didnt even have a testcase with less than -32768 as minimum 161081758 a weird solution, and I dont understand how it even went through the pretests 161078731 what even is this
•  » » 2 weeks ago, # ^ |   0 deepmind practicing
 » 2 weeks ago, # |   0 Is there any way of using dfs in problem C?i can make a graph for possible path from a cell and apply dfs to check whether the sum is zero or not?
•  » » 2 weeks ago, # ^ |   0 In the worst case(when n,m = 1000), there would be 1998C999(1998 Choose 999) different paths from 1,1 to n,m. (This because we need to make 999 right turns and 999 down turns, so total 1998 turns. Just need to select 999 out of these for a right turn)Which would exceed the time limit easily.
•  » » » 2 weeks ago, # ^ |   +1 Thanks for your nice explanation. Got it!
 » 2 weeks ago, # |   +4 I have done this contest with a really bad result and I think I need to say something. As a habbit, I always initialize the max = -999999999 and min = 999999999, my brain thinks 999999999 > 1e9 and actually I don't understand why I has not had any problems with this before. As you can easily guess, in this contest, I had problems with A.Subrectangle Guess and B.Circle Game. I should have solved A and B in under 15 minutes; I passed pre-tests of problem A, and I never think it will be terrible for me, until now. If I recieved WA in problem A, I would soon find the mistake(max = -999999999), because the idea is clear, I would not have to check the idea, I could concentrate on the code and find my mistake, I just lost 50 points, and next I would easily solve problem B and have over 1h30m to think promblem C or D1. But no, I recieved WA on test 3 in problem B, and although I could prove my idea is correct, I still spent the whole time to find the mistkae in my idea, until some last mintues, I found the mistake in my code, and I passed B on exactly the last minute, and did not have enough time to submit A. As a result, I did not pass the main test of problem A. Anyway, thank you for this contest, if I don't fail in this contest, maybe I will fail in the contests which are more important to me because of this mistake.
•  » » 2 weeks ago, # ^ | ← Rev. 2 →   0 instead initialize max = INT_MIN, min = INT_MAX no issue of thinking numbers
•  » » » 2 weeks ago, # ^ |   0 based opinion
 » 2 weeks ago, # |   0 The tutorial doesn't have any hints and I don't want to see the solutions directlyCan someone give me some hints for problem E?
•  » » 2 weeks ago, # ^ |   +5 hint1In what situtaion, the answer is -1? hint2For hint 1, the answer is "when there is a connected block with only 1 edge".Otherwise, the puzzle grid alaways could be constructed with a 2*n martix. hint3dfs/eulerian.
 » 2 weeks ago, # |   +12 In problem D, you make your queries first and then you get the distance values, altogether... I'm writing this because I somehow missed/overlooked that crucial point while reading the problem. I guess some others may have unknowingly made the same mistake.
 » 2 weeks ago, # |   0 0-1 BFS also works for C with a deque.
•  » » 2 weeks ago, # ^ |   +3 Can you share your implementation?
•  » » » 2 weeks ago, # ^ |   0 You can see in his submission. here
•  » » 5 days ago, # ^ |   0 Could you explain what's your approach ?
 » 2 weeks ago, # | ← Rev. 2 →   0 Can someone please explain why 161082582 got accepted but 161062638 did not in prob A UPD: got it
 » 2 weeks ago, # | ← Rev. 2 →   +19 Hey jdurie! Feedback as a low-ranking coder:Personally, I feel that the problem statements were a bit unnecessarily lengthy, and thus difficult to understand (especially A). Not much problem with sample test cases (just speaking for myself).Overall, I really liked the contest though, and thank you for the fast editorial. Trying to upsolve a few questions now!
•  » » 2 weeks ago, # ^ |   -11 I don't agree at all, problem A was very clear and sample test cases for B were just horrible.
 » 2 weeks ago, # |   +3 Problem B sample tests were horrible. It was very easy to get them correct. For example, I submited 8 times before getting AC.
 » 2 weeks ago, # |   0 nice solutions
 » 2 weeks ago, # |   0 Can someone tell the proof written for Problem C in the editorial in simpler words stating that we can get the sum as 0 if the maximum and minimum path sum ending at (n,m) cover's 0 if the max_sum >= 0 >= min_sum
•  » » 2 weeks ago, # ^ |   0 Basically they are saying that we can change the path that gave minimum sum to the path that gave maximum sum and on each step of changing that , sum will change by 2,0,-2 . Since we know that number of cells in any path = n+m-1 (which is even) Hence both min_sum and max_sum is also even ,and we are changing min_sum to max_sum by +-2 , so we will definitely hit 0 given that 0 is in the range of [min_sum,max_sum]
•  » » » 2 weeks ago, # ^ |   0 " so we will definitely hit 0 given that 0 is in the range of [min_sum,max_sum]"Thanks! I was not getting this.
•  » » » 2 weeks ago, # ^ | ← Rev. 2 →   0 let's say min_sum is -4 and max_sum is 4, so there exist a path which gives me zero sum,but how can we sure of that diagonal swaps , it may be possible that we are only able to do negative swap 1 time(change sum at most by +2) resulting -2 or positive swap resulting 2, but we are not reaching zero. can you please help me with that?
•  » » » » 2 weeks ago, # ^ |   0 we will always reach zero because we can always reach from minimum to maximum by swapping diagonally and in each swap we can only do (-2 or 0 or +2) hence it will always be possible to reach 0 , which comes in between minimum and maximum given that -> min <= 0 && max >= 0 . both minimum and maximum are even numbers. i hope it Helped =)
 » 2 weeks ago, # |   0 I guess in problem C's solution the condition for no path should be 0>minnm or maxnm<0 and not 0
•  » » 2 weeks ago, # ^ |   0 it's correct only, 0
 » 2 weeks ago, # |   +4 Very understandable and clear editorial. Thank you! :)
 » 2 weeks ago, # | ← Rev. 2 →   0 I have written the recursive code for problem C. Can someone help me in memoising it. I know that the dp array will be 3D array as there are 3 states i,j, and sum at that point. Here's the recursive code for reference-Code
 » 2 weeks ago, # |   +1 I have not yet learned much, but i keep seeing dp in the discussions C and D. Can anyone explain what is dp ?
•  » » 2 weeks ago, # ^ |   0 You can google yourself some pretty awesome resources.Here is what I think will be great for you:-A great introductory video by Errichtoor if you prefer text resource then, The CPH book
 » 2 weeks ago, # |   0 Can anyone explain the solution for E? Don't really understand why the order of dfs matters.
•  » » 2 weeks ago, # ^ |   +6 I would explain it in a slightly different way, which is similar to the editorial's solution.For any dominoes $(a,\,b)$ we have, add an edge between node $a$ and $b$. Merging the two solutions, we found out that these dominoes form cycles. Therefore we may think about finding the Eulerian Cycle of the graph obtained by two copies of the dominoes. If we successfully found it, the solution is the odd edges and the even ones of the Eulerian Cycles. However, these cycles we found may not guarantee that two dominoes from the different copies have different parity. It can be solved by letting the same dominoes from the different copies be adjacent in the adjacent lists and all the adjacent lists have the same order of edges. Note this is the same we do in the editorial's solution. For each cycle, if the length is $2$ then there must be no solution, otherwise, we arrange them in a $2 \times \frac{\text{length}}{2}$ grid. It is always possible since each connected component contains an even number of edges.
 » 2 weeks ago, # |   +3 The proof part of problem C is brilliant and that's what made the problem a bit hard in my opinion.I was unsure before submitting my solution and got gently surprised when it got accepted.
 » 2 weeks ago, # |   0 Come on, I didn't even try to implement O(n^3) solution, since I thought it would be too slow. Turns out that it is under 1s even in java..
 » 2 weeks ago, # |   -8 Why not just set $\sum n\times m \leq 10^7$ or else everyone will pass with $O(\dfrac{nm(n+m)}{w})$???I thought of this kind of way to solve in square time complexity, but i still decided to write the code above. However, you can just make the constraints much bigger, and maybe there will be most people coding the tutorial's solution.
•  » » 2 weeks ago, # ^ |   0 I don't think this solution should be hacked. At least it showed an important way to improve the time complexity($O(\frac{1}{\omega})$). In my point of view, various solutions are also important and inspiring.
 » 2 weeks ago, # |   +7 For problem D1 Div2, in the editorial, can anyone explain the benefit of having this condition: we can assume that either v or some vertex not in the subtree of v has already been queried while calculating the answer.Also D2 Div2, why is this statement true: The way we compute values in the DFS ensures that at least degree[root]−1≥2 subtrees of the root will have at least one query.
 » 2 weeks ago, # | ← Rev. 2 →   +1 I think Problem A has a subtle detail and would like to share it here.We are not choosing a minimum area such that any rectangle >= that area covers the maxval. Instead, we are choosing a minimum pair (h, w) such that any h*w rectangle covers the maxval, and by saying "minimum pair" I mean the pairs are ordered by the areas that they form.Those two are different! For example, consider the following case. 1 2 3 4 5 6 7 8 9 10 11 12 99 14 15 16 17 18 19 20 21 22 23 24 25 If we follow the standard answer we get the pair (h, w) = (3, 3) such that any 3*3 rectangle covers 99. But it is not "a minimum area such that any area >= 9 covers 99", for example you can consider the following area. 1 2 3 4 5 6 7 8 9 10 It has an area 10 >= 9 but does not cover 99.
•  » » 2 weeks ago, # ^ | ← Rev. 2 →   0 It's not minimum area, it's minimum value for h and minimum value for w.
 » 2 weeks ago, # |   +1 Though my rating dropped after the contest, I think it's a pretty good round.Because it made me realize my poor ability in dp on tree :)
•  » » 2 weeks ago, # ^ |   0 That's a good example of positive mindset. I see a lotta people perform bad and start trolling the authors, problems or Codeforces itself.
 » 2 weeks ago, # |   +60 Why the timelimit of E is 8s?
 » 2 weeks ago, # | ← Rev. 2 →   0 Hey everyone! Can someone please explain the solution for problem C? I do not see how does this proof in the editorial conclude there exists a zero path. Thanks in advance!Statement from editorial I am confused about: Therefore, because both minnm and maxnm are even, and minnm≤0≤maxnm, at some point in this sequence of operations, the sum of the path must be zero.
•  » » 2 weeks ago, # ^ |   0 It's just like the intermediate value theorem.
•  » » 2 weeks ago, # ^ |   0 Oh I get it now. Lets say your min sum was -10 and max sum was 10. You will only move from -10 to +10 in increment of +2 because at an point in time the sum has to remain even. This way we will always cross the 0 mark. Hence it is possible. Ingenious proof! loved it. I am new to codeforces and I am loving it here! (for now :P)
•  » » » 2 weeks ago, # ^ |   0 The part I'm not convinced with is the fact that, given a path P with sum less than 0, there exists a path P' where the sum is sum(P) + 2.Otherwise, yeah, the proof is dope!
 » 2 weeks ago, # |   0 got an FST on div2 A :(
 » 2 weeks ago, # |   0 In D2, how does querying any vertex with degree >= 3 will ensure the answer to be minimum. Why don't we need to do it for all vertices with degree >= 3?
•  » » 2 weeks ago, # ^ | ← Rev. 2 →   +29 The $ans[v]$ can be understood as "the answer of an subtree with root $v$ if there are at least one query vertex not in this subtree." The condition that the degree of top most vertex $\ge 3$ is to guarantee for all the subtree, there are a least one query point not in it.
 » 2 weeks ago, # |   0 Can someone recheck the test cases for C ? Even the code given in editorial gives wrong answer for the last test case.
 » 2 weeks ago, # |   0 The Solution Given for "C", does this kind of algo have some name(belong some where like div & conq etc) or just plain problem solving
•  » » 2 weeks ago, # ^ | ← Rev. 2 →   +3 Intermediate Value TheoremOther IMVT problem: https://www.codechef.com/problems/B01T
•  » » » 2 weeks ago, # ^ |   +1 Thanks bhai!
•  » » » 2 weeks ago, # ^ |   0 I thought the intermediate value theorem was for continuous valued functions only? This is why I'm still not convinced with the proof for C. How can we say that just because $min_{nm} < 0 \text{ and } max_{nm} > 0 \Rightarrow \exists \text{ a path } p \text{ such that } \Sigma p = 0?$Can we prove that for every value between min and max there exists a path whose sum equals that value?
•  » » » » 2 weeks ago, # ^ | ← Rev. 2 →   0 The conditions which you're assuming is not sufficient. You are missing the change at every steps. Change at every step is 2, -2, 0. Previously it was negative even number and later positive even number and everytime there is a change of 2, -2, 0. So you'll get 0 for sure.
•  » » » » » 2 weeks ago, # ^ |   0 Don't we have to prove that it's always possible to find a path with change +2 or -2?
•  » » » » » » 2 weeks ago, # ^ |   0 Its already proven in the editorial bro.
•  » » » » » » » 2 weeks ago, # ^ |   0 Hm so the proof is done by saying that you can swap two adjacent "but different" squares. However, they don't show that there always exists an adjacent different square, which I think would be required, no?(Thanks again for your responses + help)
•  » » » » 2 weeks ago, # ^ |   0 The idea is that suppose you already have a path to achieve the max sum, and a path to achieve a minimum sum; the claim is that any sum (of the same parity) in between the max and min are achievable.Now, why should this hold true? The intuition here is that because paths only go right and down, you can convert the two paths between each other by a multiple operations of flipping a "turn" (i.e. if a turn goes right then down, make it go down then right). In particular, we note that each time we flip a turn, it can change the sum by at most absolute value 2. This happens when we step on a -1 instead of a 1 (or vice versa) as a result of flipping. (Note that a single flipping operation changes exactly one cell on the path.)
 » 2 weeks ago, # | ← Rev. 2 →   -16 .
 » 2 weeks ago, # |   0 Learnt a new thing which I was doing wrong for years. #define inf 1e9 + 7 int val = -inf; Here val is not -(1e9 + 7) but -1e9 + 7
•  » » 2 weeks ago, # ^ | ← Rev. 2 →   0 That's beacuse inf is not an integer variable. It's just the substitution of 1e9+7. So when you write int val = -inf;  it is actually parsed as int val = -1e9 + 7;. Could be avoided using something like const int inf = 1e9+7;.
 » 2 weeks ago, # |   0 Good Question on DP+Matrices => https://codeforces.com/problemset/problem/429/B
 » 2 weeks ago, # |   0 Although it is not required, Problem A can be solved using Sparse Matrix as well. See my submissions
 » 2 weeks ago, # |   0 did anyone know why D2 only dfs a vertex more than two sub is ok, but not dfs all vertex which has more than two sub. i think the answer didn't say clearly
 » 2 weeks ago, # |   0 How does considering any node of a tree with a degree greater than or equal to 3 as the root in 1695D2 - Tree Queries (Hard Version) always result in the minimum number of required queries?
 » 2 weeks ago, # |   +8 Problem C was a good one.
 » 2 weeks ago, # |   0 Does anybody know what's wrong in my C-Problem Code
 » 2 weeks ago, # |   0 Can someone please explain the proof for C? I'm not convinced how if there is a min path and a max path with sum less than 0 and greater than 0 respectively, how we can assume there exists a path with sum = 0.Thank you.
•  » » 2 weeks ago, # ^ |   0 since the sum is changing by 1 unit its always possible to get all the sum in between minSum to maxSum
 » 2 weeks ago, # |   +8 For problem D, what is the smallest k(the worst situation in any possible hidden-X with an optimal strategy) if we are able to use online query, instead of quering all the node at once?Are they the same?If not the same，what is the best optimal strategy？
•  » » 2 weeks ago, # ^ |   +5 Let's try the following reasoning — root the tree at u — that is our first ask. For every ask concerning two sons, we can answer no as long as there are some other possibilities. This is very similar to our offline dp — we cannot toss out more than all sons by one query. So I think that the answer is the same.
•  » » » 2 weeks ago, # ^ |   0 thanks！
 » 2 weeks ago, # |   0 For Problem-D2, why is it that performing our greedy DFS for any of the nodes with degree greater than 3 works?
 » 2 weeks ago, # |   0 Problem-Bhttps://codeforces.com/contest/1695/submission/161367637Can someone kindly explain why my submission is hitting WA in pretest 2? Or provide a case where it fails?
•  » » 2 weeks ago, # ^ |   0 Query solved.
 » 11 days ago, # |   0 How to Solve Problem C using BFS algorithm?


text:
FANDOM

48 Pages

Floats are a primitive data-type that describe floating point numbers.
Floating point numbers include a mantisse and a exponent of 2. An example:
$1.42 * 2^7$ In ther the 1.42 is the mantisse and the 7 is the exponent.
The range of this numbers are 64-Bit numbers (on a 64-Bit computer) with a maximum exponent of 127 - BIAS where the BIAS is 127 (by convention).
Note that in Python there does not exist floats with double precision (double).

Casting Edit

To convert something into a float, type:

float(your_variable)
Community content is available under CC-BY-SA unless otherwise noted.


text:
# Complex number

Printable View

• October 16th 2009, 05:03 AM
pankaj
Complex number
1.Let $z$ be a complex number such that $|z| = 1.$

Find the minimum and maximum value of

$|1 + z| + |1 - z + z^2|$

2.If $a>0$ and $|z+\frac{1}{z}|=a$.

Then find minimum and maximum value of $|z|$

What does the equation

$|z+\frac{1}{z}|=a$

denote geometrically.
• October 16th 2009, 07:59 AM
Deadstar
Perhaps use the triangle equality for part 1.

|z + w| <= |z| + |w| would help you find the max.


text:
# Increase in equilibrium concentration of the reactant via decrease in container volume

Consider the hypothetical reaction $\ce{3A(g) -> B(g) + C(g)}$; how to increase the equilibrium concentration of $\ce{A}$, given that the reaction is endothermic?

1. increasing the volume of the container
2. decreasing the temperature
3. decreasing the volume of the container
4. adding $\ce{B(g)}$ at equilibrium

Answer given - 2, 3, and 4. I have trouble with the option 3.

I know according to the Le Chatelier's principle, equilibrium will shift forward on reducing the container volume, but the solution says it still manages to have an increase in the overall equilibrium molar concentration of $\ce{A(g)}$; and that's what I'm not understanding.

The catch here is that when the reaction shifts forward - to counter-balance the decrease in volume - the reduction in the moles of $\ce{A}$ is much lesser than the decrease in volume, hence, the overall ratio, $\frac{\text{moles}}{\text{volume}}$ actually increases!
You can demonstrate this via your own reaction. Assume $K_\mathrm{c}=\pu{1M-1}$, and all equilibrium concentrations to be $\pu{1M}$. When volume is halved, the concentrations double, so $Q=\pu{0.5M-1}$. The reaction thus shifts forward as $Q<K$.
Let the new concentrations be $\pu{2M}-3x, \pu{2M}+x, \pu{2M}+x$ for $\ce{A,B,C}$ respectively. Solving for $x$, you'll get $x\approx0.117$. Hence, the new equilibrium concentrations are $\pu{1.64M}, \pu{2.117M}, \pu{2.117M}$. In fact, not only the reactant, but all species show an increase in their concentration!
Moreover, the same result is obtained in the reverse direction. If the container volume was increased instead, all species would show a decrease in their volume. (the overall ratio $\frac{\text{moles}}{\text{volume}}$ decreases, as the moles increase far less proportionately as compared to the volume)


text:
# zbMATH — the first resource for mathematics

Hereditarily hypercylic operators. (English) Zbl 0941.47002
The notion of hereditarily hypercyclic operator is introduced and discussed. Hypercyclicity is closely related to linear chaos on infinite dimensional spaces. It is shown that a continuous linear operator $$T$$ on a Fréchet space satisfies the hypercyclicity criterion [see C. Kitai, “Invariant closed sets for linear operators” (Ph.D. thesis, Univ. of Toronto) (1982); R. M. Gethner and J. H. Shapiro, Proc. Am. Math. Soc. 100, No. 2, 281-288 (1987; Zbl 0618.30031)] if and only if it is hereditarily hypercyclic, and if and only if the direct sum $$T\oplus T$$ is hypercyclic. As a consequence, it is shown that two classes of hypercyclic operators, namely the hypercyclic operators with a dense generalised kernel and hypercyclic operators with a dense set of periodic points [i.e., chaotic operators in the sense of R. L. Devaney, “An introduction to chaotic dynamical systems, 2nd ed.”, Addison-Wesley (1989; Zbl 0695.58002)] must satisfy the hypercyclicity criterion. In connection with the work of H. N. Salas [Trans. Am. Math. Soc. 347, No. 3, 993-1004 (1995; Zbl 0822.47030)] on hypercyclic weighted shifts, a characterisation of those weighted shifts $$T$$ that are hereditarily hypercyclic with respect to a given sequence $$(n_k)$$ of positive integers is provided, as well as conditions under which $$T$$ and $$\{T^{n_k}\}_{k\geq 1}$$ share the same set of hypercyclic vectors.

##### MSC:
 47A16 Cyclic vectors, hypercyclic and chaotic operators 47A15 Invariant subspaces of linear operators 47A65 Structure theory of linear operators 47B37 Linear operators on special spaces (weighted shifts, operators on sequence spaces, etc.) 46A04 Locally convex Fréchet spaces and (DF)-spaces
Full Text:
##### References:
 [1] Ansari, S.I., Hypercyclic and cyclic vectors, J. funct. anal., 128, 374-383, (1995) · Zbl 0853.47013 [2] Aron, R.; Bès, J., Hypercyclic differentiation operators, Function spaces, Contemporary mathematics, 232, (1999), Am. Math. Soc Providence, p. 39-46 · Zbl 0938.47004 [3] Bès, J., Three problems on hypercyclic operators, (1998), Kent State University [4] Birkhoff, G.D., Démonstration d’un théorème élémentaire sur LES fonctions entières, C. R. acad. sci. Paris, 189, 473-475, (1929) · JFM 55.0192.07 [5] Bonet, J.; Peris, A., Hypercyclic operators on non-normable Fréchet spaces, J. funct. anal., 159, 587-595, (1998) · Zbl 0926.47011 [6] Bourdon, P.S.; Shapiro, J.H., Cyclic phenomena for composition operators, Mem. amer. math. soc., 125, (1997) · Zbl 0996.47032 [7] Chan, K.C.; Shapiro, J.H., The cyclic behaviour of translation operators on Hilbert spaces of entire functions, Indiana univ. math. J., 40, 1421-1449, (1991) · Zbl 0771.47015 [8] Devaney, R.L., An introduction to chaotic dynamical systems, (1989), Addison-Wesley Reading · Zbl 0695.58002 [9] Gethner, R.M.; Shapiro, J.H., Universal vectors for operators on spaces of holomorphic functions, Proc. amer. math. soc., 100, 281-288, (1987) · Zbl 0618.30031 [10] Godefroy, G.; Shapiro, J.H., Operators with dense, invariant, cyclic vector manifolds, J. funct. anal., 98, 229-269, (1991) · Zbl 0732.47016 [11] Grosse-Erdmann, K.-G., Universal families and hypercyclic operators, Bull. amer. math. soc., 36, 345-381, (1999) · Zbl 0933.47003 [12] Gulisashvili, A.; MacCluer, C.R., Linear chaos in the unforced quantum harmonic oscillator, J. dynam. systems measure. control, 118, 337-338, (1996) · Zbl 0870.58057 [13] Herrero, D.A., Hypercyclic operators and chaos, J. operator theory, 28, 93-103, (1992) · Zbl 0806.47020 [14] Herzog, G.; Schomoeger, C., On operators T such that f(T) is hypercyclic, Studia math., 108, 209-216, (1994) · Zbl 0818.47011 [15] Kitai, C., Invariant closed sets for linear operators, (1982), Univ. of Toronto [16] León-Saavedra, F.; Montes-Rodrı́guez, A., Linear structure of hypercyclic vectors, J. funct. anal., 148, 524-545, (1997) · Zbl 0999.47009 [17] F. León-Saavedra, and, A. Montes-Rodrı́guez, Spectral theory and hypercyclic subspaces, Trans. Amer. Math. Soc. (to appear). [18] Maclane, G.R., Sequences of derivatives and normal families, J. anal. math., 2, 72-87, (1952) · Zbl 0049.05603 [19] Montes-Rodrı́guez, A., Banach spaces of hypercyclic vectors, Michigan math. J., 43, 419-436, (1996) · Zbl 0907.47023 [20] Protopopescu, V.; Azmy, Y.Y., Topological chaos for a class of linear models, Math. models methods appl. sci., 2, 79-90, (1992) · Zbl 0770.58024 [21] Read, C., The invariant subspace problem for a class of Banach spaces 2: hypercyclic operators, Israel J. math., 63, 1-40, (1998) · Zbl 0782.47002 [22] Rolewicz, S., On orbits of elements, Studia math., 32, 17-22, (1969) · Zbl 0174.44203 [23] Salas, H., A hypercyclic operator whose adjoint is also hypercyclic, Proc. amer. math. soc., 112, 765-770, (1991) · Zbl 0748.47023 [24] Salas, H., Hypercyclic weighted shifts, Trans. amer. math. soc., 347, 993-1004, (1995) · Zbl 0822.47030 [25] Seidel, W.P.; Walsh, J.L., On approximation by euclidean and non-Euclidean translates of an analytic function, Bull. amer. math. soc., 47, 916-920, (1941) · Zbl 0028.40003 [26] Shapiro, J.H., Composition operators and classical function theory, (1993), Springer-Verlag New York · Zbl 0791.30033
This reference list is based on information provided by the publisher or from digital mathematics libraries. Its items are heuristically matched to zbMATH identifiers and may contain data conversion errors. It attempts to reflect the references listed in the original paper as accurately as possible without claiming the completeness or perfect precision of the matching.


text:
sim_weibdf {discfrail} R Documentation

## Simulation of grouped time-to-event data with Weibull baseline hazard and discrete shared frailty distribution

### Description

This function returns a dataset generated from a Weibull proportional hazards model with a shared discrete frailty term, for given Weibull parameters, hazard ratios, distribution of groups among latent populations, frailty values for each latent population, and randomly-generated covariate values.

### Usage

sim_weibdf(J, N = NULL, lambda, rho, beta, p, w_values, cens_perc)

### Arguments

 J number of groups in the data N number of individuals in each group lambda Weibull baseline rate parameter (see below), interpreted as the rate parameter with covariate values of 0 and frailty ratio 1. For rho=1 this is the baseline hazard. rho Weibull shape parameter (see below) beta covariate effects in the Weibull distribution, interpreted as log hazard ratios (see below) p vector of K elements. The kth element gives the proportion of groups in the kth latent population of groups. w_values vector of K distinct frailty values, one for each latent population. cens_perc cens_perc percentage of censored events. Censoring times are assumed to be distributed as a Normal with variance equal to 1.

### Details

The "proportional hazards" parameterisation of the Weibull distribution is used, with survivor function S(t) = exp(-\lambda t^{\rho} w exp(x^T {\beta}) ). Note this is different from the "accelerated failure time" parameterisation used in, e.g. dweibull. Distribution functions for the proportional hazards parameterisation can be found in the flexsurv package.

### Value

A data frame with one row for each simulated individual, and the following columns:

family: the group which the individual is in (integers 1, 2, ...)

time: the simulated event time.

status: the simulated survival status. Censoring times are generated from a Normal distribution with standard deviation equal to 1 and the mean is estimated in order to guarantee the determined percentage of censored events. The event time is observed (status=1) if it is less than the censoring time, and censored otherwise (status=0).

x: matrix of covariate values, generated from a standard normal distribution.

belong: the frailty hazard ratio corresponding to the cluster of groups in which the individual's group has been allocated.

### References

Wan, F. (2017). Simulating survival data with predefined censoring rates for proportional hazards models. Statistics in medicine, 36(5), 838-854.

### Examples

J <- 100
N <- 40
lambda <- 0.5
beta <- 1.6
rho <- 1
p <- c( 0.8, 0.2 )
w_values <- c( 0.8, 1.6 )
cens_perc <- 0.2
data <- sim_weibdf( J, N, lambda, rho, beta, p, w_values, cens_perc)


text:
•
Sök i SwePub databas

# Träfflista för sökning "WFRF:(Zhao Fang) srt2:(2015-2019);srt2:(2016)"

• Resultat 1-10 av 36
• [1]234
Sortera/gruppera träfflistan

NumreringReferensOmslagsbildHitta
1.
• Ablikim, M., et al. (författare)
• Amplitude analysis of the π$^0$π$^0$ system produced in radiative J/ψ decays
• 2016
• Ingår i: PHYSICAL REVIEW D. - 2470-0010. ; 93:3
• Tidskriftsartikel (refereegranskat)abstract
• An amplitude analysis of the π0π0 system produced in radiative J/ψ decays is presented. In particular, a piecewise function that describes the dynamics of the π0π0 system is determined as a function of Mπ0π0 from an analysis of the (1.311±0.011)×109 J/ψ decays collected by the BESIII detector. The goal of this analysis is to provide a description of the scalar and tensor components of the π0π0 system while making minimal assumptions about the properties or number of poles in the amplitude. Such a model-independent description allows one to integrate these results with other related results from complementary reactions in the development of phenomenological models, which can then be used to directly fit experimental data to obtain parameters of interest. The branching fraction of J/ψ→γπ0π0 is determined to be (1.15±0.05)×10-3, where the uncertainty is systematic only and the statistical uncertainty is negligible.
•
2.
• Ablikim, M., et al. (författare)
• Improved measurement of the absolute branching fraction of D+ -> (K)over-bar(0)mu(+)nu(mu)
• 2016
• Ingår i: European Physical Journal C. - : SPRINGER. - 1434-6044 .- 1434-6052. ; 76:7
• Tidskriftsartikel (refereegranskat)abstract
• By analyzing 2.93 fb(-1) of data collected at root s = 3.773 GeV with the BESIII detector, we measure the absolute branching fraction B(D+ -> (K) over bar (0) (+)(mu)nu(mu)) = (8.72 +/- 0.07(stat). +/- 0.18(sys).) %, which is consistent with previous measurements within uncertainties but with significantly improved precision. Combining the Particle Data Group values of B(D-0 -> K- mu(+)nu(mu)), B(D+-> (K) over bar (0)e(+)nu(e)), and the lifetimes of the D-0 and D+ mesons with the value of B(D+ -> (K) over bar (0)mu(+)nu(mu)) measured in this work, we determine the following ratios of partial widths: Gamma (D-0 -> (K) over bar (-)mu(+)nu(mu))/Gamma (D+ -> (K) over bar (0)mu+nu(mu)) = 0.963 +/- 0.044 and Gamma (D+ -> (K) over bar (0) mu+nu(mu))/Gamma(D+ -> (K) over bar (0)e+nu(e)) = 0.988 +/- 0.033.
•
3.
• Ablikim, M., et al. (författare)
• Measurement of azimuthal asymmetries in inclusive charged dipion production in $e^+e^-$ annihilations at $\sqrt{s}$ = 3.65 GeV
• 2016
• Ingår i: PHYSICAL REVIEW LETTERS. - 0031-9007 .- 1079-7114. ; 116:4
• Tidskriftsartikel (refereegranskat)abstract
• We present a measurement of the azimuthal asymmetries of two charged pions in the inclusive process $e^+e^-\rightarrow \pi\pi X$ based on a data set of 62 $\rm{pb}^{-1}$ at the center-of-mass energy $\sqrt{s}=3.65$ GeV collected with the BESIII detector. These asymmetries can be attributed to the Collins fragmentation function. We observe a nonzero asymmetry, which increases with increasing pion momentum. As our energy scale is close to that of the existing semi-inclusive deep inelastic scattering experimental data, the measured asymmetries are important inputs for the global analysis of extracting the quark transversity distribution inside the nucleon and are valuable to explore the energy evolution of the spin-dependent fragmentation function.
•
4.
• Ablikim, M., et al. (författare)
• Measurement of Singly Cabibbo Suppressed Decays Lambda(+)(c) -> p pi(+)pi(-) and Lambda(+)(c) -> pK(+)K(-)
• 2016
• Ingår i: Physical Review Letters. - 0031-9007 .- 1079-7114. ; 117:23
• Tidskriftsartikel (refereegranskat)abstract
• Using 567 pb(-1) of data collected with the BESIII detector at a center-of-mass energy of root s = 4.599 GeV, near the Lambda(+)(c)->(Lambda) over bar (-)(c) threshold, we study the singly Cabibbo-suppressed decays Lambda c(+) -> p pi(+) pi(-) and Lambda(+)(c) -> pK(+) K- By normalizing with respect to the Cabibbo-favored decay Lambda(+)(c)-> p pi(+)pi(-) we obtain ratios of branching fractions: [B(Lambda(+)(c) -> p pi(+)pi(-))/B(Lambda(+)(c) -> pK(-)pi(+))] = (6.70 +/- 0.48 +/- 0.25)% [B Lambda(+)(c) -> p phi)/B(Lambda(+)(c) -> pK(-)pi(+))] = (1.81 +/- 0.33 +/- 0.13)%,and [B(Lambda(+)(c) -> pK(+)K(non-phi)(-)/B(Lambda(+)(c) -> pK(-)pi(+))] (9.36 +/- 2.22 +/- 0.71)x10(-3), where the uncertainties are statistical and systematic, respectively. The absolute branching fractions are also presented. Among these measurements, the decay Lambda(+)(c) -> p pi(+)pi(-) is observed for the first time, and the precision of the branching fraction for Lambda(+)(c) -> pK(+)K(non-phi)(-) and Lambda(+)(c) -> p phi is significantly improved.
•
5.
• Ablikim, M., et al. (författare)
• Measurement of the absolute branching fraction of D+ → K̅0 e+νe via K̅0 → π 0 π 0
• 2016
• Ingår i: Chinese Physics C, High Energy Physics & Nuclear Physics. - 1674-1137 .- 0899-9996. ; 40:11
• Tidskriftsartikel (refereegranskat)abstract
• By analyzing 2.93 fb(-1) data collected at the center-of-mass energy root s = 3.773 GeV with the BESIII detector, we measure the absolute branching fraction of the semileptonic decay D+ -> (K) over bar (0)e(+)nu(e) to be B(D (+) -> (K) over bar (0)e(+)nu(e)) = (8.59 +/- 0.14 +/- 0.21)% using (K) over bar (0) -> K-S(0) -> pi(0) pi(0), where the first uncertainty is statistical and the second systematic. Our result is consistent with previous measurements within uncertainties..
•
6.
• Ablikim, M., et al. (författare)
• Measurement of the branching fraction for psi(3770) -> gamma chi c0
• 2016
• Ingår i: Physics Letters B. - 0370-2693 .- 1873-2445. ; 753, s. 103-109
• Tidskriftsartikel (refereegranskat)abstract
• By analyzing a data set of 2.92 fb(-1) of e(+) e(-) collision data taken at root s = 3.773 GeVand 106.41 x 10(6) psi(3686) decays taken at root s = 3.686 GeVwith the BESIII detector at the BEPCII collider, we measure the branching fraction and the partial decay width for psi(3770)->gamma chi c0 to be B(psi(3770)->gamma chi c0) = (6.88 +/- 0.28 +/- 0.67) x 10(-3) and Gamma[psi(3770)->gamma chi c0] = (187 +/- 8 +/- 19) keV, respectively. These are the most precise measurements to date.
•
7.
• Ablikim, M., et al. (författare)
• Measurement of the center-of-mass energies at BESIII via the di-muon process
• 2016
• Ingår i: Chinese Physics C. - 1674-1137. ; 40:6
• Tidskriftsartikel (refereegranskat)abstract
• From 2011 to 2014, the BESIII experiment collected about 5 fb$^{-1}$ data at center-of-mass energies around 4 GeV for the studies of the charmonium-like and higher excited charmonium states. By analyzing the di-muon process $e^{+}e^{-}\rightarrow\gamma_{\rm ISR/FSR}\mu^{+}\mu^{-}$, the center-of-mass energies of the data samples are measured with a precision of 0.8 MeV. The center-of-mass energy is found to be stable for most of time during the data taking.
•
8.
• Ablikim, M., et al. (författare)
• Measurement of the Ds<(+)-> l(+)ve branching fractions and the decay constant fDs
• 2016
• Ingår i: PHYSICAL REVIEW D. - 2470-0010. ; 94:7
• Tidskriftsartikel (refereegranskat)abstract
• Using 482 pb(-1) of e(+) e(-) collision data collected at a center-of-mass energy of root s = 4.009 GeV with the BESIII detector, we measure the branching fractions of the decays D-s(+) -> u(+)v(u) and D-s(+) -> tau(+)v(tau). By constraining the ratio of decay rates of Ds(+) to tau(+)v(u) and to u(+)v(u) to the Standard Model prediction, the branching fractions are determined to be B(D-s(+) -> u(+)v(u) = (0.495 +/- 0.067 +/- 0.026)% and B(D-s(+) -> tau(+)v(tau) = (4.83 +/- 0.65 +/- 0.26)% Using these branching fractions, we obtain a value for the decay constant f(Ds+) of (241.0 +/- 16.3 +/- 6.5) MeV, where the first error is statistical and the second systematic.
•
9.
• Ablikim, M., et al. (författare)
• Measurement of the e(+)e(-) -> pi(+) pi(-) cross section between 600 and 900 MeV using initial state radiation
• 2016
• Ingår i: Physics Letters B. - 0370-2693 .- 1873-2445. ; 753, s. 629-638
• Tidskriftsartikel (refereegranskat)abstract
• We extract the e(+) e(-) -> pi(+) pi(-) cross section in the energy range between 600 and 900 MeV, exploiting the method of initial state radiation. A data set with an integrated luminosity of 2.93 fb(-1) taken at a center-of-mass energy of 3.773 GeV with the BESIII detector at the BEPCII collider is used. The cross section is measured with a systematic uncertainty of 0.9%. We extract the pion form factor vertical bar F pi vertical bar(2) as well as the contribution of the measured cross section to the leading-order hadronic vacuum polarization contribution to (g - 2)(mu). We find this value to be a(mu)(pi pi,LO) (600-900 MeV) = (368.2 +/- 2.5(stat)+/- 3.3(sys)).10(-10), which is between the corresponding values using the BaBar or KLOE data.
•
10.
• Ablikim, M., et al. (författare)
• Measurement of the leptonic decay width of J/psi using initial state radiation
• 2016
• Ingår i: Physics Letters B. - 0370-2693 .- 1873-2445. ; 761, s. 98-103
• Tidskriftsartikel (refereegranskat)abstract
• Using a data set of 2.93 fb(-1) taken at a center-of-mass energy of root s = 3.773 GeV with the BESIII detector at the BEPCII collider, we measure the process e(+) e(-) -> J/psi gamma -> mu(+)mu(-)gamma and determine the product of the branching fraction and the electronic width B-mu mu . Gamma(ee) = (333.4 +/- 2.5(stat) +/- 4.4(sys)) eV. Using the earlier-published BESIII result for B-mu mu = (5.973 +/- 0.007(stat) +/- 0.037(sys))%, we derive the J/psi electronic width Gamma(ee) = (5.58 +/- 0.05(stat) +/- 0.08(sys)) keV. (C) 2016 The Author(s). Published by Elsevier B.V.
•
Skapa referenser, mejla, bekava och länka
• Resultat 1-10 av 36
• [1]234

### Avgränsa träffmängd

Kungliga biblioteket hanterar dina personuppgifter i enlighet med EU:s dataskyddsförordning (2018), GDPR. Läs mer om hur det funkar här.
Så här hanterar KB dina uppgifter vid användning av denna tjänst.

Stäng

Kopiera och spara länken för att återkomma till aktuell vy


text:
# Are questions about writing an assembler on-topic?

The question How is a two-pass assembler designed? can be seen as on- or off-topic.

On one hand, it's about tools that are pretty much exclusive to our site. On Stackoverflow, the call to as is implied by calls to GCC. Writing your own assembler for x86 would be mostly pointless. It's quite likely that users here are dealing with processors with tiny, tiny instruction sets and rudimentary tools, possibly even building their own on FPGAs. Writing assembly by hand and writing an assembler to put that code together seems perfectly normal.

On the other hand, it's about a programming concept. We're programmers too; it's OK to take a programming question to Stack Overflow. They've got tags like [avr], [pic], and [fpga], and they've got a fair amount of activity. Seems that at least a few people over there could help.

It would be awesome if we could get a concrete test to determine whether a question should be here or on Stack Overflow. I think that the reality is more likely to be a set of topics that fit on both places.

• I took that question to be more about wanting to understand two-pass assemblers to better use them than about writing your own assembler. – Olin Lathrop Feb 9 '12 at 15:36

I think there will always be some overlap between electrical engineering and computer science and software engineering. As such, some questions fit both sites and are probably best left wherever the OP asked. A concrete test would be great, but I just don't see how that is possible.

I am a full time professional electrical engineer, and probably spend at least half my time dealing with firmware as apposed to designing circuits, board layout, etc. That's the reality of the field nowadays. Of course sometimes I write host code too, but I wouldn't expect to talk about that here.

The line between firmware that a electrical engineer does as part of designing electronic thingies, and higher level software that a software engineer that doesn't need to know about electronics does is and always will be blurry. As a first approximation, I consider it part of electronics if the code runs on a small resource-limited system with no operating system. That means the code has to touch the hardware directly, which requires understanding of the hardware in the micro and the external circuit it is connected to. Even that definition is vague because "small" and "resource-limited" are judgement calls. It may be hard to define, but I think most of us know it when we see it. Assembler being used is another point in favor of belonging with electrical engineering. Not only does that require knowledge of the hardware, but demonstrates a higher willingness to learn about it and the answers can be more hardware-related. Generic C questions, for example, are still just that and don't belong here just because the code happens to run on a microcontroller. It requires a issue specific to the "small" or "resource-limited" or direct hardware access to qualify.

As for the specific question that brought this up, I felt it was on topic because

1. I didn't take it as asking how to write a assembler (that's a computer science question), but wanting to understand how the assembler works, which may allow one to use it better.

2. It was about assembler, not a high level language. That pushes more into electrical engineering because nowadays even device drivers are written in high level languages on general purpose systems.

All that said, I agree this question falls into the gray area and I can respect others' reactions that it should be elsewhere.

• I agree - it's hard to define exactly but I think small/resource limited, dealing with common uC peripherals in code, etc gets close. I think a reasonable indication it fits here is it it's something most folk over on Stack Overflow wouldn't be able to answer. – Oli Glaser Feb 9 '12 at 19:44
• I like your answer, but more than talking about size and resources (and I know that you were relatively speaking) I would focus on "programming with an eye on the hardware and one on the application"... – clabacchio Feb 10 '12 at 11:09
• I'd say programming questions only belong here if it's directly something to do with peripherals setup & readout, timing issues and other stuff that goes along datasheet of electronic components. (inter-chip/device communication for example) – Hans Feb 12 '12 at 0:17

Questions about Programming Tools are specifically on-topic at Stack Overflow, per the faq.

That said, it took me about 30 seconds of Googling to find this: http://en.wikipedia.org/wiki/Assembly_language#Number_of_passes

If the OP is asking someone to teach them how to write an assembler, the question is probably off-topic everywhere.

I vote to close. I don't see any electronics design going on here. Firmware written in assembler doesn't need that deep a knowledge of how an assembler works. Writing an assembler is a purely software task, so it belongs on StackOverflow, even if that's not currently attracting the relevant people who can answer it. The fact that assemblers are tools to electronic designers/firmware designers is insufficient to make it on topic here. Asking how an oscilloscope works would be on topic because its a piece of electronics itself; asking how to write a book on electronics would be off topic because books are not electronic (ok apart from ebooks, but that's again a software issue). So there is a limit to the information on tools and support items that we should provide.

Another example - how to use Eclipse with an embedded C toolchain would be on topic, but how to write a replacement IDE instead of Eclipse really belongs on SO.

I voted to close the question Kevin refers to. In a comment Kevin writes "we do support asking questions about tools, and if you need to write your own tool, it makes sense that we'd be able to help with that."
The assembler as a tool is only remotely related to electronics; we only suppose there's a relation because it's been posted here on electronics.stackexchange. Nothing in the question makes the link clear. It might as well be an assembler for a Pentium level CPU in a PC.
Even if it would be related to electronics it would only be about the software in an electronic product, not about the electronics itself. Like when you would need an enclosure for your electronic design, we are not going to accept questions about injection molding as on topic, are we?

So, I think questions about the design of an assembler are off topic. Questions about assembly code which is clearly hardware-related should be acceptable. Example: the code to initialize I/O ports on an ARM controller.


text: # Certificates Distributing public keys is a way to enable authentication of machines. Machine A sends a message to machine B, claiming the identity K_A, by signing with k_A. B verifies that signature, hence the identity. But this protocol requires B to know or to ascertain K_A. Until now, we've just assumed there's a way for B to do that. Let's actually solve the problem now. ### Digital Certificates A *digital certificate* (henceforth, *certificate*) is a signature Sign(id_S, K_S; k_I) on the pair of an identity id_S and public key K_S of a subject S. A certificate is created by an *issuer* I, whose signing key is k_I. The certificate binds id_S to K_S according to I. As a simpler notation for this idea, let Cert(S; I) be a certificate issued by I for S. Hence Cert(S; I) = Sign(id_S, K_S; k_I). If machine A has acquired a certificate Cert(S; I), and if A trusts I to issue that certificate, then A has a basis to verify S's identity. **Authentication with Certificates**  1. S: Let m = "I'm id_S". Compute s = Sign(m; k_S). 2. S -> A: m, s 3. A: Find a certificate Cert(S; I) from a trusted issuer I. Verify the signature of I on the certificate. Verify that the identifier in the certificate is id_S. Retrieve K_S from the certificate. Accept if Ver(m; s; K_S).  In step 1, m could contain additional information to be authenticated beyond the identity of S. In step 3, one common implementation error is to forget to verify id_S. Indeed, sometimes crypto libraries will not do this for you by default. The most common format for certificates is X.509, an international standard. Beyond id_S, K_S, and the signature, an X.509 signature also contains a serial number, a validity interval, and several other data. ### Public Key Infrastructure The final step above requires verifying a signature on a certificate. If A already knows I's public key, that's not a problem. But if not, it seems like all we've done is to make a recursive call: to verify S's key, A needs to verify I's key. And that might involve finding and verifying even more certificates. Where does the recursion end? At some point, A needs to reach a certificate issued by a principal that A is willing to trust. To solve this problem, we need a system to help mangage the distribution of certificates. Such systems are called *public key infrastructures* (PKIs). There are two philosophies for building PKIs: - **Decentralized:** anarchy, no publicly recognized leaders, e.g., PGP - **Centralized:** oligarchy, leadership of a few elite, e.g., CAs ### PGP: Pretty Good Privacy PGP, a program implementing encryption and digital signature schemes, was invented by Phil Zimmerman in 1991. He made it and source code publicly available. This was notable as the first time there had been popular open source for public-key cryptography. The US Customs Service launched a criminal investigation for violation of export laws. High-strength cryptography was classified as a munition, so there was some question that Zimmerman might have been guilty of arms trafficking. After three years, the investigation was dropped. The philosophy of PGP is decentralized. Management of certificates devolves to users; anyone can certify anyone else and distribute that certificate as they wish. With PGP, a user A accumulate certificates that she trusts on a *keyring*. The user's own key is on that keyring as a *self-signed* certificate Cert(A; A). From time to time, A might synchronize with another user B, importing keys from B's keyring. When a user acquires a certificate, she records how much trust to place in the issuer, hence in the certificate. The result is a *web of trust*: a user can have multiple certificates for a given key from multiple issuers. There's no central repository of certificates that has to be trusted. So there's also no central service that could be taken down, DOS'd, coerced, seized by law enforcement, etc. Nonetheless, it's convenient to have such servers, and they do exist. [MIT runs one](https://pgp.mit.edu/), for example. **Example.** *Suppose Bob sends Alice a message that he signs. Alice now needs to verify the signature, and to do that, she needs a certificate for Bob. She searches for certificates for Bob, and manages to find Cert(Bob;Dave), Cert(Bob;Bob), and Cert(Bob;Carol). Alice doesn't happen to know Dave, Bob, or Carol. So she searches around for certificates for them. She manages to find a certificate Cert(Carol; Ellen), and realizes that Ellen is a friend of her that she trusts, and that Ellen's public key is already in her (Alice's) keyring, as Cert(Ellen;Alice). So Alice has Cert(Alice; Alice), Cert(Ellen; Alice), Cert(Carol; Ellen), Cert(Bob; Carol). After verifying all those certificates, Alice can create a new certificate Cert(Bob; Alice), put it in her keyring, and later distribute it to others. And, of course, she can verify Bob's signature on the message.* In the example above, Alice ends up with a list of certificates: Cert(Alice; Alice), Cert(Ellen; Alice), Cert(Carol; Ellen), Cert(Bob; Carol). This list forms a *certificate chain*, starting with a certificate for Alice and ending with a certificate for Bob. At the *root* is a key that Alice trusts (her own), called the *root of trust*. In this case, Alice was able to find a chain, but in general it might not be possible to find a path through the web of trust that enables creation of a certificate chain with a trusted root. PGP was designed to help humans manage their security, so the discussion above is phrased in terms of humans. But it applies equally well to machines, and could be used for authentication of machines. More common for that task, however, is the use of certificate authorities.


text:
# Introduction

You may remember sudoku, where there can only be one of each number in each row, column and block of nine. The general idea is that if the array contains but one element, you can submit that as a deterministic solution. If there are already filtered arrays (by rows, columns and 3×3 blocks) the remainder can still be deterministic. Where

• a=[1,2];
• b=[1,3];
• c=[2,3];
• d=[1,2,3,4]

d should be reduced to [4] as it apparently cannot be anything else.

# Challenge

Provide a sniplet that compares n arrays. For every X, if only X numbers appear at least once in a set of X arrays, then all those X numbers should be removed from each array not in the set. The elements are integer numbers ranging [1, n].

# Winning criterion

Lowest character count.

## "I'm too young to die" version

9 arrays at most, 9 elements at most.

# Test Cases

[1,2]; [2,3]; [1,3]; [1,2,3,4]
[1,2,3]; [2,3,4]; [1,5,6]; [2,3]; [1,4]; [1,2,3,4,6]

## Test outputs

[1,2]; [2,3]; [1,3]; [4]
[1,2,3]; [2,3,4]; [5]; [2,3]; [1,4]; [6]

• "the numerosity of elements of 1 to n arrays' union equals to the numerosity of arrays". Does this mean that there are n arrays in the input, and their union is exactly [1,2,...,n]? Also, I don't really understand the challenge. What should the output be in your example? Feb 6, 2015 at 11:10
• The output should be in the above case [1,2]; [1,3]; [2,3] and [4]. The numerosity of arrays is not necessarily the same as the numerosity of their union's elements, the array reduction is a more general operation. Feb 6, 2015 at 11:18
• What is this about ""I'm too young to die" version"? The formatting suggests that it's part of the winning criterion, but that makes no sense. I think you probably want cascading deductions, but the question doesn't mention them: it should (either to say that they're required or that they aren't). Feb 6, 2015 at 11:24
• It would also be helpful to state whether the elements of the arrays are always integers, and if so whether they always fall within a given range. That could allow some answers to save bytes. Feb 6, 2015 at 11:26
• The "I'm too young to die" version is for lazy bums who don't want to test what they've written. Larger set combinatorics are a nasty thing. Anyways, the tests (sorry for the edit) fall within the bottleneck of 9 elements, 9 sets. Feb 6, 2015 at 11:29

# Pyth: 3729 28 bytes

um?d|-lHl{sHsmg{kdH-dsHGtyQQ

Input is a list of lists like [[1,2], [2,3], [1,3], [1,2,3,4]]. Try it online: Pyth Compiler/Executor

## Explanation:

um?d|-lHl{sHsmg{kdH-dsHGtyQQ
u                          Q  G = input array
u                       tyQQ  For each H in powerset(input):
m                     G        G = [            ...        for d in G]
?d               -dsH             [d if ... else d-sum(H) for d in G]
-lHl{sH                        len(H)-len(set(sum(H)))!=0
|                                     or
smg{kdH                 sum(d is subset of k for k in H)>0

• I love this. Clear, concise. Feb 9, 2015 at 10:58

# C# - 231 characters

static int[][] P(int[][]a){var m=a.GetUpperBound(0)+1;var j=0;for(var i=0;i<m;i++){var u=new List<int>();for(j=0;j<=i;j++)u=u.Union(a[j]).ToList();if(u.Count()==m)for(j=0;j<m;j++)if(i!=j)a[i]=a[i].Except(a[j]).ToArray();}return a;}

Ungolfed and harness

using System.Collections.Generic;
using System.Linq;

namespace ArrayCombCompar
{
class Program
{
static void Main(string[] args)
{
var testArray1 = new int[][] {
new int[] {1,2},
new int[] {2,3},
new int[] {1,3},
new int[] {1,2,3,4}
};
var testArray2 = new int[][] {
new int[] {1,2,3},
new int[] {2,3,4},
new int[] {1,5,6},
new int[] {2,3},
new int[] {1,4},
new int[] {1,2,3,4,6}
};
var result1 = P(testArray1);
var result2 = P(testArray2);
} // Put breakpoint here to see results

static int[][] P(int[][]a)
{
var m = a.GetUpperBound(0) + 1;
var j = 0;
for (var i = 0; i < m; i++)
{
var u = new List<int>();
for (j = 0; j <= i; j++)
u = u.Union(a[j]).ToList();
if (u.Count() == m)
for (j = 0; j < m; j++)
if (i != j) a[i] = a[i].Except(a[j]).ToArray();
}
return a;
}

}
}


text:
# Faber–Jackson relation

(Redirected from Faber-Jackson relation)
Velocity dispersion (y-axis) plotted against absolute magnitude (x-axis) for a sample of elliptical galaxies, with the Faber–Jackson relation shown in blue.

The Faber–Jackson relation is an early empirical power-law relation between the luminosity $L$ and the central stellar velocity dispersion $\sigma$ of elliptical galaxies, first noted by the astronomers Sandra M. Faber and Robert Earl Jackson in 1976. The original relation can be expressed mathematically as:

$L \propto \sigma^ \gamma$

where the index $\gamma$ is observed to be approximately equal to 4, but depends on the range of galaxy luminosities that is fitted. The Faber–Jackson relation is now understood as a projection of the fundamental plane of elliptical galaxies. One of its main uses is as a tool for determining distances to external galaxies.

## Theory

The gravitational potential of a mass distribution of radius $R$ and mass $M$ is given by the expression:

$U=-\alpha \frac{GM^2}{R}$

Where α is a constant depending e.g. on the density profile of the system and G is the gravitational constant. For a constant density, $\alpha\ = \frac{3}{5}$

The kinetic energy is (recall $\sigma$ is the 1-dimensional velocity dispersion. Therefore $3\sigma^2 = V^2$):

$K = \frac{1}{2}MV^2$
$K = \frac{3}{2}M \sigma^2$

From the virial theorem ($2 K + U = 0$ ) it follows

$\sigma^2 =\frac{1}{5}\frac{GM}{R}.$

If we assume that the mass to light ratio, $M/L$, is constant, e.g. $M \propto L$ we can use this and the above expression to obtain a relation between $R$ and $\sigma^2$:

$R \propto\frac{LG}{\sigma^2}.$

Let us introduce the surface brightness, $B = L/(4 \pi R^2)$ and assume this is a constant (which from a fundamental theoretical point of view, is a totally unjustified assumption) to get

$L=4\pi R^2 B.$

Using this and combining it with the relation between $R$ and $L$, this results in

$L \propto 4\pi\left(\frac{LG}{\sigma^2}\right)^2B$

and by rewriting the above expression, we finally obtain the relation between luminosity and velocity dispersion:

$L \propto\frac{\sigma^4}{4\pi G^2 B},$

that is

$L \propto \sigma^4.$

When account is taken of the fact that massive galaxies originate from homologous merging, and the fainter ones from dissipation, the assumption of constant surface brightness can no longer be supported. Empirically, surface brightness exhibits a peak at about $M_V=-23$. The revised relation then becomes

$L \propto \sigma^{3.1}$

for the less massive galaxies, and

$L \propto \sigma^{15.0}$

for the more massive ones. With these revised formulae, the fundamental plane splits into two planes inclined by about 11 degrees to each other.

Even first-ranked cluster galaxies do not have constant surface brightness. A claim supporting constant surface brightness was presented by astronomer Allan R. Sandage in 1972 based on three logical arguments and his own empirical data. In 1975, Donald Gudehus showed that each of the logical arguments was incorrect and that first-ranked cluster galaxies exhibited a standard deviation of about half a magnitude.

## Estimating distances to galaxies

Like the Tully–Fisher relation, the Faber–Jackson relation provides a means of estimating the distance to a galaxy, which is otherwise hard to obtain, by relating it to more easily observable properties of the galaxy. In the case of elliptical galaxies, if one can measure the central stellar velocity dispersion, which can be done relatively easily by using spectroscopy to measure the Doppler shift of light emitted by the stars, then one can obtain an estimate of the true luminosity of the galaxy via the Faber–Jackson relation. This can be compared to the apparent magnitude of the galaxy, which provides an estimate of the distance modulus and, hence, the distance to the galaxy.

By combining a galaxy's central velocity dispersion with measurements of its central surface brightness and radius parameter, it is possible to improve the estimate of the galaxy's distance even more. This standard yardstick, or "reduced galaxian radius-parameter", $r_g$, devised by Gudehus in 1991, can yield distances, free of systematic bias, accurate to about 31%.


text:
# Show that if $A$ and $B$ are sets, then $A \subseteq B$ if and only if $A \cap B = A$.

I'm working through a real analysis textbook, and it starts out with set theory. The first exercise is

Show that if $A$ and $B$ are sets, then $A \subseteq B$ if and only if $A \cap B = A$.

I think I proved it correctly but I'm not sure. Here's what I did. I proved that if $A \subseteq B$, then $A \cap B = A$ the same way as this answer did (https://math.stackexchange.com/a/446114/93114), but I want to make sure I proved the converse correctly because it seems really easy (yes it's the first problem in the book, but still) and math usually isn't this easy for me, even the basic stuff!

Proof of "If $A \cap B = A$, then $A \subseteq B$."

If $x \in A \cap B$, then $x \in A$ and $x \in B$, but this applies to all $x \in A$ because $A \cap B = A$. So, for any $x \in A$, we know that $x \in B$, so $A \subseteq B$.

Am I on the right track?

• Yes, although you're doing it in a convoluted way. Let $x\in A$; since $A=A\cap B$ we have $x\in B$. – egreg Oct 12 '13 at 22:27
• @egreg So if $x \in A$, then because $A = A \cap B$, we know that $x \in A \cap B$. By definition that implies that $x \in A$ and $x \in B$, which is enough to show that $A \subseteq B$. – M T Oct 12 '13 at 22:28
• @egreg Sorry I replied to your other comment that disappeared, but we're doing it the same way now. – M T Oct 12 '13 at 22:30
• I realized to have misread your argument, so I changed my first comment. – egreg Oct 12 '13 at 22:32

Since you are just starting, I would suggest to be verbose instead of pulling everything in a single sentence.

To prove $A \subseteq B$ iff $A \cap B = A$, you have to

1. show $A \cap B = A$ given $A \subseteq B$. That is to
1. show $A \cap B \subseteq A$.
2. show $A \subseteq A \cap B$.
2. show $A \subseteq B$ given $A \cap B = A$.

Proof:

1.1) It is trivially true. You don't need to be given $A \subseteq B$ for it to be true.

1.2) If $x \in A$, then $x \in B$ since we are given $A \subseteq B$. Then $x \in A$ and $x \in B$ are both true. Therefore, $x \in A \cap B$.

2) From $A \cap B = A$, we know $x \in A$ and $x \in B$ whenever $x \in A$. If $x \in A$, then it must be the case that $x \in B$. Therefore, $A \subseteq B$.

• Thanks for the answer. I think I'm slowly starting to catch the hang of these proofs. – M T Oct 13 '13 at 1:58

Suppose $A\cap B=A$. To prove $A\subseteq B$, suppose $x\in A$. Since $A\cap B=A$, $x\in A\cap B$ and thus $x\in B$. Since $x$ was an arbitrary element of $A$, this holds for all $x$ and thus $A\subseteq B$.

The above proves $A\cap B=A\implies A\subseteq B$. You will then need to prove the reverse implication to establish $A\cap B=A\iff A\subseteq B$.

Here is another way to approach this type of problem: start with the most complex part (here: $\;A \cap B = A\;$), expand the definitions so that you get from the set level to the element level, then simplify using predicate logic, and finally go back to the set level as suggested by the shape of the formula.

In this case, \begin{align} & A \cap B = A \\ \equiv & \;\;\;\;\;\text{"set extensionality, i.e., the definition of $\;=\;$ for sets"} \\ & \langle \forall x :: x \in A \cap B \equiv x \in A \rangle \\ \equiv & \;\;\;\;\;\text{"definition of $\;\cap\;$"} \\ & \langle \forall x :: x \in A \land x \in B \equiv x \in A \rangle \\ \equiv & \;\;\;\;\;\text{"logic: $\;p \equiv p \land q\;$ is one way to write $\;p \Rightarrow q\;$"} \\ & \langle \forall x :: x \in A \Rightarrow x \in B \rangle \\ \equiv & \;\;\;\;\;\text{"definition of $\;\subseteq\;$"} \\ & A \subseteq B \\ \end{align}