text:
How to test for “parallelness” of two distributions?

23 patients suffering from bruxism (grinding of teeth) have been given a treatment. Their baseline bruxism has been measured for three nights, then they were treated for 23 nights, then again the "post" baseline was measured for three nights.

The raw data looks like this:

patient night   score   duration    minutes of sleep
1       1       20      25          480
1       2       28      67          480

The values are:

• patient = patient number
• night = night (1 to 26)
• score = total number of bruxism attacks during that night
• duration = total seconds of bruxism (sum over all attacks) for that night
• minutes of sleep = the observed timespan (rounded to a quarter hour)

In all, there are 598 datasets, 26 consecutive nights for 23 different patients.

The interesting variables have been defined as:

nph = number of bruxism attacks per hour (score * 60 / minutes of sleep) sph = duration of bruxism in seconds per hour (duration * 60 / minutes of sleep)

The nightly means over all patients are:

nph <- c(8.808858, 8.364923, 11.932373, 9.108704, 8.135258, 6.886013, 6.379688, 6.034062, 5.731728, 5.823831, 5.128421, 4.526408, 5.145101, 5.860569, 7.691637, 5.645240, 5.151750, 7.496109, 5.375605, 5.994595, 5.650951, 6.459269, 4.490204, 7.891916, 7.684742, 7.583042)
sph <- c(23.528665, 16.382689, 29.492815, 23.752084, 19.966185, 16.104159, 15.135596, 13.218658, 11.626881, 11.321739, 13.418337, 8.391212, 9.062977, 10.665424, 9.535756, 9.925929, 9.040313, 14.635182, 8.549451, 10.346057, 9.742318, 16.437902, 7.443140, 14.204343, 12.648306, 13.401150)

These are mean number of bruxism attacks per hour (nph) and total duration of bruxism in seconds per hour (sph), over 26 nights, with treatment from night 4 to 23.

A plot of these two variables shows that their progress over the 26 nights is roughly "parallel", indicating that both react in roughly the same way to the treatment.

The filled circles are the three nights pre and three nights post treatment. Due to the scaling the maximum value for both variables fall on the same point (third night).

My question is:

How can I analyse how "parallel" these two "curves" are?

• Please close stats.stackexchange.com/questions/62927/… (even delete it) in order not to leave little messes in your wake. To the point here, what you do you mean "homogeneous" here? – Nick Cox Jun 30 '13 at 12:35
• What is it you are actually trying to do? As far as I know "homogenous" does not apply to continuous data. But what is your research question? – Peter Flom - Reinstate Monica Jun 30 '13 at 13:15
• If you water two tomato plants growing side by side on your window sill at the same time with the same amount of water, you'd expect them both to grow equally. You could measure their height or weight or number of leaves (or whatever) and test the resulting distribution for homogeneity. If the curves are heterogeneous, then there is an influence beyond the water you give them. – user14650 Jun 30 '13 at 13:17
• There's no contradiction. You are misled by a practically useless and theoretically worthless typonymy of data. Instead of trying to shoehorn your data into Stephens' classification ("continuous," "categorical," etc), focus on their statistical properties and your analytical objectives. E.g., in knowing the data are derived from counts, we can infer many of their likely statistical properties. However, your analytical objectives are unclear. In a comment you state you are looking for "an influence beyond" some third variable. I would recommend you clarify how this applies to your data. – whuber Jun 30 '13 at 13:43

As numerous comments have shown, we are having a hard time understanding what you want here, but it seems to me that

1. Your variables have different units of measurement, so even in principle it makes no sense to ask whether their distributions are the same or different, except in a very loose sense that they might have similar shape (skewness, kurtosis, etc.).

2. Neither variable as presented is categorical. Deep down there is a categorical variable, bruxism attack or not, but that does not affect analysis of the data. You have measured rates that could be fractional. That rules out chi-square testing absolutely, quite apart from the point above.

3. Two simple analyses show that your variables are related, a scatter plot of one against the other and a line plot of both against time. The first suggests a simple correlation or regression. It's possible that looking at logarithmic scales would help. Presumably these are just an illustrative example and you have much more data. If there were zeros in other data, logarithmic scale would be more problematic.

(LATER) Your situation is now clearer. I still advise against talking about this as a problem in comparing distributions. It is not what you are seeking and the terminology is just confusing even to statistically-minded people, as this thread and its predecessor show amply.

There are at least three aspects to an analysis in addition to points stressed earlier.

1. You have several patients. At some point a serious analysis would have to look at variations between patients as well as means.

2. You can plot your data as time series. I note that in each case the highest mean is immediately before treatment starts. Is this important? Is it suggestive, e.g. that patients are more stressed in anticipation of treatment? Once treatment starts, there seems to be an initial effect which then fades away and fluctuations return.

3. The analysis closest to your focus on parallel lines (or not) is, as already stated, some kind of correlation or regression, but the time series structure would be ignored by such a correlation or regression. In examining e.g. proportionality there is a question of which variable, if any, is to be regarded as response (outcome, dependent variable).

• Thank you. ad (1) Each day, two plants recieve 1 l water each (baseline). Each day they grow 1 cm in height and 2 leaves. Now we vary the amount of water per day and measure height and leaves. Of course the units (cm, n of leaves) are different, but obviously it makes total sense to ask, wether their distributions are the same. ad (2) The numbers given are means over 23 patients. The data of the individual patients had integers (whole numbers). ad (3) This is the whole data there is (after calculating means). It is not an example but real data from a study (not mine). – user14650 Jul 1 '13 at 10:06
• My question relates to your no. 3: How related are the lines? Can it be said that they are theoretically the same (i.e. they would be the same if we measured the whole population) and just differ due to random sampling (and a small sample at that)? Or are they theoretically different and their seeming similarity is just an accident? -- I feel like statisticians (you and my professor) and non-statisticians (me) have world views so radically different, that communication is virtually impossible. :-) – user14650 Jul 1 '13 at 10:13
• I've already answered your last comment by pointing you to correlation and regression. FWIW, I am not a statistician, but a geographer. I learned what statistics I know by reading books and analysing data. So your assumption is inaccurate. Also, please stop running your analogy of tomato plants; your thread is confusing enough already. – Nick Cox Jul 1 '13 at 11:04
• It makes "total sense to say w[h]ether their distributions are the same". I disagree and have already explained why. The fact that the data are means is completely new to us. You can plot the means and correlate them, but I don't think any serious analysis is possible without considering variations between patients. In all good faith, I have to recommend finding a statistical consultant or collaborator. If you want better advice from us, you may need to put the really important information you are now providing for the first time upfront in a new question. – Nick Cox Jul 1 '13 at 11:11
• More added to answer. – Nick Cox Jul 1 '13 at 12:34


text:
# Numbering the elements of a list

From a vector q={Gamma,x,y}, I would like to create the following corresponding list : qn={1,2,3}.

Other example, if I have q={Gamma,x,y,theta}, I would like to retrieve qn={1,2,3,4}.

Is there a better way than Table[i, {i, 1, Length[q]}]?

Thank you

• Range[Length[q]] Nov 12 '15 at 10:26
• @JasonB probably you should post it as an answer. Nov 12 '15 at 10:38
• Right! For me, it is perfect. Thank you Nov 12 '15 at 10:39
• What would you like to get for {Gamma, x, x, Gamma}?
– Kuba
Nov 12 '15 at 10:44

This will give what you are looking for

q = {Gamma, x, y, theta};
Range[Length[q]]
(* {1, 2, 3, 4} *)

Or, with less typing,

Range@Length@q
(* {1, 2, 3, 4} *)

As @Jason already commented, the usual form would be

Range @ Length @ q;

If your goal is to number the list you can do

> Transpose[{Range @ Length @ q, q}]

{{1, Gamma}, {2, x}, {3, y}, {4, theta}}

or use MapIndexed

MapIndexed[List, q]

{{Gamma, {1}}, {x, {2}}, {y, {3}}, {theta, {4}}}

• Or, do MapIndexed[Reverse@*Flatten@*List, q] to get it in the normal form. Nov 12 '15 at 17:17

format: plain


text:
Thread: Relativity of Simultaneity View Single Post
P: 3,181
 Quote by mangaroosh [..] Thanks for going through the above; the part I don't understand is the initial equations; I read $t'=t-vx$ as meaning $t'$ equals t minus the velocity along the X-axis, but I don't understand why the velocity comes into it. [..] My interpretation of it would be that, if the clocks which give the time co-ordinates all ran at the same rate, then absolute simultaneity should prevail; and in order for RoS to prevail clocks would have to give different times (co-ordinates). [..]
Just a primer: If you start with a reference clock in your hand, how would (indeed, how could!) you determine what time it is at a distance? That has little or nothing to do with clock rate.


text:
# Order of << operator.

This topic is 2160 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hiya,

I've written a couple of wrapper classes for ODBC, and I'm using the << operator in a test application.

 while(resultSet->fetchNext()) { std::cout << "ID " << resultSet->getUInt32(1) << ", " << resultSet->getString(2) << "\n"; }

This is causing an ODBC error, and I believe it's because the API requires me to access columns in increasing order.. column 1, column 2, etc.

I can see that the code is actually calling the get...() methods from right to left, which is the complete opposite of what I've always assumed...

Does anyone know a way of making it call from 'left to right' instead, without splitting into multiple lines?

Many thanks for any suggestions!

##### Share on other sites
The order of evaluation of subexpressions within an expression is undefined. Only between sequence points can you guarantee order of evaluation (expressions before a sequence point are guaranteed to be evaluated any expression after a sequence point). That is, it is possible for getString(2) to be evaluated before getString(1), but don't mistake that for one being printed before the other one though; the order of what is passed through the stream is well defined and guaranteed.

There is no real way to guarantee the order of evaluation inside an expression. But what is the problem with splitting it in multiple lines?
[source]
while(resultSet->fetchNext())
{
unsigned int r1 = resultSet->getUInt32(1);
unsigned int r2 = resultSet->getUInt32(2);
std::cout << "ID " << r1 << ", " << r2 << "\n";
}

[/source]

##### Share on other sites
No problem really.

Thanks, I didn't know that.


text:
What axioms are used to prove Godel's Incompleteness Theorems? - MathOverflow most recent 30 from http://mathoverflow.net 2013-05-23T15:34:07Z http://mathoverflow.net/feeds/question/118183 http://www.creativecommons.org/licenses/by-nc/2.5/rdf http://mathoverflow.net/questions/118183/what-axioms-are-used-to-prove-godels-incompleteness-theorems What axioms are used to prove Godel's Incompleteness Theorems? Andrew Critch 2013-01-06T05:58:18Z 2013-01-07T21:45:59Z
I understand Godel's Incompleteness Theorems to be statements about effectively generated formal systems, which basically makes them theorems about algorithms. This is cool, because despite being very abstract, they actually constrain my expectations about how computers and human beings can behave. But, being theorems, what formal system are they theorems in? That is, what formal language is used to express them, how do I interpret that language as being about algorithms, what axioms are assumed, and what rules of inference are used to derive the incompleteness theorems?

I ask because I am looking for a better answer than "ZFC", which has been given to me in person a few times now. ZFC refers to all sorts of things I don't believe exist (e.g. non recursively enumerable sets, choice functions for uncountable families...), at least not in the same way I believe in concrete things like computers and algorithms. I can see from skimming the proofs that I could probably make up a formal system in which the theorems could be expressed and proven, which did not refer to all the monstrosities of ZFC. I just want to know what standard, "simplest" formal system(s) can be used for this purpose.
 http://mathoverflow.net/questions/118183/what-axioms-are-used-to-prove-godels-incompleteness-theorems/118189#118189 Answer by Ali Enayat for What axioms are used to prove Godel's Incompleteness Theorems? Ali Enayat 2013-01-06T08:06:39Z 2013-01-07T21:45:59Z
As Andres Caicedo points out in his comment (to the Question), the modest fragment $\sf{PRA}$ (Primitive Recursive Arithmetic) of $\sf{PA}$ (Peano arithmetic) is already is able to verify the incompleteness theorems.

Indeed, the proof of the Gödel-Rosser incompleteness proof is entirely syntactic and can be readily implemented in a fragment of $\sf{PRA}$ known as $I\Delta_0 + exp$, where $I\Delta_0$ is the weakening of $PA$ in which the induction scheme is only available for $\Delta_0$-formulas, and $exp$ asserts the totality of the exponential function $2^x$ (it is well-known that $I\Delta_0$ is unable to prove the totality of the exponential function).

It is worth noting that in the above $I\Delta_0 + exp$ can be even reduced to $I\Delta_0 + \Omega_1$, where $\Omega_1$ is the axiom asserting the totality of the function $2^{\left| x\right|^2 }$, where $\left| x\right|$ denotes the length of the binary expansion of $x$. The theory $I\Delta_0 + \Omega_1$ is commonly viewed as the weakest fragment of $\sf{PA}$ in which one can develop a workable "theory of syntax".

PS. As pointed out by Jeřábek, the incompleteness theorems can be implemented in even weaker systems.
 http://mathoverflow.net/questions/118183/what-axioms-are-used-to-prove-godels-incompleteness-theorems/118198#118198 Answer by abo for What axioms are used to prove Godel's Incompleteness Theorems? abo 2013-01-06T12:39:35Z 2013-01-06T12:39:35Z
Here's a different way of looking at things. Use FPA to denote second-order Peano Arithmetic minus the Successor Axiom (the axiom which says that every natural number has a successor). FPA is neither weaker nor stronger than IΔ0+Ω1, since the latter assumes the Successor Axiom but assumes a weaker form of induction.

FPA can prove the First Incompleteness Theorem. Undoubtedly, fragments of FPA can as well.

More interesting is when one clarifies the nature of the logical system under metalogical study. Usually, the syntax of first-order logic is defined so that one can always concatenate two strings to form a larger one. E.g. one uses this principle in the Deduction Theorem, which is one of the first metalogical theorems one tends to prove. But this assumption, essentially equivalent to the Successor Axiom, is not necessary, and one can refrain from making it.

In this environment (where the syntax is not assumed to be unboundedly long), one can say this: FPA can prove the First Incompleteness Theorem. But Godel's proof seems only to work in the case of FPA + Successor Axiom. In the case FPA + not Successor Axiom, one basically formalizes the idea that a proof is generally longer than any axiom. It does not appear that Godel's proof of the Second Completeness Theorem goes through, and I do not know whether this can be repaired.
 http://mathoverflow.net/questions/118183/what-axioms-are-used-to-prove-godels-incompleteness-theorems/118231#118231 Answer by Timothy Chow for What axioms are used to prove Godel's Incompleteness Theorems? Timothy Chow 2013-01-06T23:04:29Z 2013-01-06T23:04:29Z
You might already know this, but if you're looking for foundations of mathematics which are so weak that they don't prove the existence of non-r.e. sets, then you should study Simpson's book Subsystems of Second-Order Arithmetic, the "bible" of reverse mathematics. The weakest system in that book, RCA0, has as a model the recursive sets, and suffices for Goedel's first incompleteness theorem and even a weak version of Goedel's completeness theorem. More importantly, RCA0 suffices for a large amount of mathematics.

Simpson's book of course also investigates what can't be proved in RCA0. For example, Brouwer's fixed point theorem is unprovable in RCA0, roughly speaking because one can construct a continuous recursive map from the square into itself that has no recursive fixed point.


text:
# Could really use a hand with a complex exponential and integral problem

1. Oct 22, 2006

### Geronimo85

I have two homework problems that have been driving me nuts:

1.) evaluate the indefinite integral:

integral(dx(e^ax)cos^2(2bx))

where a and b are real positive constants. I just don't know where to start on it.

2.) Find all values of i^(2/3)

So far I have:

i^(2/3)
= e^(2/3*ln(i))
= e^(2/3*i*(Pi/2 + 2*n*Pi))
= e^(i*Pi/3)*e^(i*n*4Pi/3)

I know my three solutions should end up being (1+i*sqrt(3))/2, (1-i*sqrt(3))/2, -1. But I can't seem to get there. I'd really appreciate any help. Sorry if my shorthand is confusing.

2. Oct 22, 2006

### Hurkyl

Staff Emeritus
Can't you write it as nothing but complex exponentials?

Have you tried plugging in values for n?

Last edited: Oct 22, 2006
3. Oct 22, 2006

### Geronimo85

When I plugged in values for n, I drew out my

e^(i*Pi/3)* +/- (1/2 + i*sqrt(3)/2)

I don't see how I get any of my three answers out of that.

4. Oct 22, 2006

### Hurkyl

Staff Emeritus
(1) You know the value of e^(i*Pi/3).
(2) n ranges over all integers... not just 0 and 1.

5. Oct 22, 2006

### Geronimo85

I am assuming that it is just -1 as that is the only way it will end up as one of my answers, when n=0. I don't understand why though.

-Got that, I was having a brain fart and thinking that for n=2, theta was 10Pi/4

6. Oct 22, 2006

### Hurkyl

Staff Emeritus
But it's not -1... why do you think the n=0 solution has to be the one that's -1?

7. Oct 22, 2006

### Geronimo85

it should be 1/2 + i*sqrt(3)/2, but then how do I ever get -1 for a value?

8. Oct 22, 2006

### Geronimo85

because i'm an idiot... got it, thanks a bunch. Also, with the integral problem (I haven't done calc in a long long time), once I substitute

cosx = (e^ix - e^-ix)/2

how do I solve?

9. Oct 22, 2006

### Hurkyl

Staff Emeritus
Well, what did you get when you simplified after substituting?

10. Oct 22, 2006

### Geronimo85

something really ugly that doesn't seem to cancel out:

integral(dx(e^ax)cos^2(2bx))

=(e^ax)*(2e^(-4*b^2*x^2)-2e^(4*b^2*x^2))

11. Oct 22, 2006

### Hurkyl

Staff Emeritus
Aha! There shouldn't be any x²'s in there. Remember your exponent laws: what is $(a^b)^c$?

12. Oct 22, 2006

### Geronimo85

but I have:

(e^ax)cos^2(2bx) = (e^ax)* [((e^(i*2*b*x)-e^(-i*2*b*x)/2)^2]

when I square [""] how do I not end up with x^2?

13. Oct 22, 2006

### Hurkyl

Staff Emeritus

First off, remember how to compute (a + b)².
Secondly, as I said in my previous post, remember your exponent laws: what is
$$\left( a^b \right)^c?$$

14. Oct 22, 2006

### Geronimo85

I know that (a + b)² = a² + 2ab + b² and (a^b)^c = a^b*c

so if:

(e^ax)cos^2(2bx) = (e^ax) [(e^(i*2*b*x) - e^(-i*2*b*x))/2]

because: cosx = (e^ix - e^-ix)/2

why when I square inside the brackets don't I get

(e^ax)* [((e^(i*2*b*x)-e^(-i*2*b*x)/2)^2] ?

I'm just really not getting something here

15. Oct 23, 2006

$$\cos 2bx = \frac{e^{2ibx}+e^{-2ibx}}{2}$$
$$\cos 2bx = \frac{1}{2} \left[ (e^{2ibx}+e^{-2ibx})(e^{2ibx}+e^{-2ibx}) \right]$$
$$\cos^2 2bx = \frac{e^{4bix}}{4} + \frac{e^{-4bix}}{4} + \frac{1}{2}$$

right?

16. Oct 23, 2006

### quasar987

$$\cos^2 2bx = \frac{1}{4} \left[ (e^{2ibx}+e^{-2ibx})(e^{2ibx}+e^{-2ibx}) \right]$$

17. Oct 23, 2006

Woops. That line was all kinds of messed up.

18. Oct 23, 2006

### Geronimo85

yes, that makes sense, but how is that any easier to integrate when multiplied by e^ax?

19. Oct 23, 2006

What's $$(e^{ax})(e^{bix})$$ ?
$$(e^{ax})(e^{bix}) = e^{ax + bix} = e^{(a+bi)x}$$
$$\int e^{(a+bi)x} \, dx = \frac{1}{a+bi} e^{(a+bi)x}$$


text:
+0

# something

0
131
2

$D$ is on side $\overline {AB}$ of $\triangle ABC.$ We know $\triangle ABC \sim \triangle ACD$ and $\angle A =48^\circ.$ If $BC=BD,$ what is $\angle B$ in degrees?

Oct 1, 2021

#1
0

y=49 in that case but try reading that again and really think about I t

Oct 1, 2021
#2
0

https://web2.0calc.com/questions/geometry-help-asap-pls_1#r2

Oct 1, 2021


text:
# The Tech of Bitcoin

Now we can get to the stuff about bitcoin that’s actually interesting. How does it work?

Before I start, one major caveat. I’m deliberately talking about this in vague terms – enough so that you an understand how and why it works, but not enough so that you could do something like implement it. Like anything else involving cryptography: if you’re thinking about implementing your own crpytosystem, don’t!

Cryptography is an area where even seasoned experts can easily make mistakes. A serious crpytosystem is built by a team of professionals, including people whose entire job is do everything in their power to break it. And even then, it’s all to easy to wind up with un-noticed bugs! When it comes to something like bitcoin, an inexperienced cryptographer trying to implement a new agent for the bitcoin network is insane: you’re dealing with money, and you’re risking losing a whole lot of it if you screw up. (That’s basically what appears to have happened to mtgox – and if the reports I’m reading are correct, they managed to lose hundreds of millions of dollars worth of bitcoins.

On to the fun part!

Basically, bitcoin is a protocol. That means that it’s really just a system that defines how to communicate information between a collection of computers. Everything about bitcoin is defined by that protocol.

At the heart of the protocol is the ledger. The ledger is a list of transactions that says, essentially A gave N bitcoins to B. The only way to get a bitcoin is by a transaction: there needs to be a transaction saying that someone or something gave you a bitcoin. Once you have one, you can transfer it to someone else, by adding a new transaction to the ledger.

That’s the basic idea of it. The beauty of bitcoin is that at the core, it’s incredibly simple – it’s just a list of transactions. What makes it interesting is the crpytographic magic that makes it work. In theory, the ledger could be simple text. Each line would contain a sender, a receiver, and a quantity. If you have that, it’s enough to manage transactions. But there are a bunch of problems with a simple ledger approach, which mostly involve making sure that transactions in the ledger are valid and that they can’t be changed.

In addition, there are problems that come about because of the fact that bitcoin wants to be completely decentralized. There is no authority in charge of bitcoin. That means that you need to have a consensus based system. Anyone can join the network of bitcoin managers at any time, and anyone in the network can drop out at any time – but the network as a whole must always have a consensus about what the current ledger is. There’s also the question of where the coins come from!

Suppose I own a bitcoin, and I want to use it to buy a loaf of bread from friendly baker, Barbera. I need to give Barbera my bitcoin. To do that, I need to add an entry to the ledger saying “MarkCC gave one bitcoin to Barbera”. The problem is, the ledger entry needs to contain something to prove that I’m really the owner of the bitcoin that I’m trying to transfer! If it doesn’t do that, then my arch-nemesis, Tony the thief, could just add a ledger entry saying “MarkCC gave one bitcoin to Tony”. Only I should be able to add a ledger entry transferring my bitcoin.

This one is simple: it’s a textbook use-case for public key crpytography. In a public key system, you have key-pairs. One member of the key pair is called the public key, and the other is the private key. Anything encrypted with the public key can only be decrypted using the private key; anything encrypted with the private key can only be decrypted with the public key. So you get a key pair, lock the private key away somewhere safe, and give away copies of the public key to anyone who wants it. Then if someone sees a message that can be decoded with your public key, it means that you must have been the one who sent it. No one else could encrypt a message using your private key!

In the bitcoin ledger, the lines are signed. Instead of directly saying “MarkCC gave one bitcoin to Barbera”, they say “One bitcoin was transferred from the owner of MarkCCs cryptokey to the owner of Barbera’s cryptokey”. The ledger entry for that transaction is signed using a signature generated from the ledger entry using MarkCC’s private key. Anyone can verify the validity of the transaction by checking the signature using MarkCC’s public key. Once that’s in the ledger, Barbera now own a bitcoin, and only Barbera (or whoever has access to Barbera’s private key) can do transfer that bitcoin to anyone else.

Now, on to the complicated part! There is no authoratative ledger in bitcoin. There are many copies – thousands of copies! – of the ledger, and they’re all equal. So how can you be sure that a transaction is real? Someone could write a transaction to a ledger, show you the ledger, and then you could find out that in every ledger except the one you looked at, the transaction doesn’t exist! If you there is no single place that you can check to be sure that a transaction is in the ledger, how can you be sure that a transaction is real?

The answer is a combination of a consensus protocol, and a bit of computational cleverness. When you want to add a ledger entry, you broadcast a message to the bitcoin network. Every 10 minutes or so, participants in the bitcoin network take whatever transactions were added to the current ledger, put them into a structure called a block, and perform a very difficult, semi-random computational task using the block. When they find a solution, they sign the block using the solution, and broadcast it to the network.

The first agent in the bitcoin network that completes a solution and broadcasts it to the network “wins” – their block becomes the new basis for the next block.

The blocks form a chain: block one contains some transactions; block 2 contains more transactions that happened after block1 was broadcast; block 3 contains transactions that happened after block 2 was broadcast, and so on.

At any time, the consensus ledger – that is the master, canonical ledger – is the one with the longest verifiable chain. So someone can broadcast a new solution to an old block, but it will be ignored, because there is already a longer chain in the consensus. You can be certain that your transaction can’t be revoked or lost once you see a new block issued that builds on the block containing your transaction.

This all relies on people finding solutions to computationally expensive problems. Why would anyone do it? That’s why this process of computing hashes for the blocks is called mining: because if you’re the first one who finds a solution for a block, then you get to add a transaction giving yourself 25 brand new bitcoins to yourself! Mining – the process of maintaining the ledger – becomes a sort of lottery, where the people doing the mining randomly get bonuses to motivate them to do it.

The computational side of it is clever in its simplicity. The bitcoiners want the problem to be hard enough to make it effectively impossible to cheat. But they also want to be sure that it’s easy enough that they get blocks frequently. If it takes an hour before anyone has a solution for a new block, that’s also a problem: if it takes that long to commit a transaction to the ledger, then people aren’t going to trust bitcoin for fast transactions. They can’t be sure that a bitcoin was transferred to them unless they know that the transaction was committed in an accepted block. But there’s a trick there: people want to get the mining rewards. That means that they’re constantly trying to push the limits of what they can get away with computationally. People started with bunches of PCs, and then discovered that the GPUs on their graphic cards could do it faster, and then started building custom PCs with tons of graphics cards to do bitcoin mining computations in parallel. And of course, there’s always Moore’s law: computers are constantly getting faster. That means that they can’t just pick a particular complexity for the problem and stick with it.

The solution is to make the problem variable. They start with a well known algorithm that’s a very good one-way problem (meaning that it’s relatively easy to compute a result given an input; but very, very hard to figure out the inverse – to get an input that produces a desired result. In slightly more mathematical terms, if $y=f(x)$, then computing $y$ is easy if you know $x$, but it’s very hard to compute $x$ if you know $y$.

There are a bunch of well known one-way computations. They just picked one, called SHA-256 computation. Now the clever part: they make SHA-256 computation into a variable complexity problem by picking a threshold $T$, agreed on by consensus in the bitcoin ledger protocol. The solution for a block is a hashcode for the block plus a bit of extra data which is smaller than $T$: for a ledger block $L$, they need to find a value $N$ called a Nonce where $\textbf{SHA}(L + N) < T$.

Because SHA-256 is a one-way function, there’s no good way to predict what value of $N$ will give them a hashvalue that’s smaller than the threshold – the only way to do it is to just keep guessing new $N$-values, and hoping that one of them will produce an acceptable result. By reducing the value of $T$, you can make the problem harder; by increasing the value of $T$, you can make it easier. The bitcoin protocol specifies a regular interval and an algorithm for selecting a new $T$.

When a miner solves the problem, they publish the new ledger block to the bitcoin network, with the new ledger section and its $(H, N)$ values. Once a new block is issued, all of the future ledger entries can only get added to the next unsolved block in the ledger.

The reason that this is safe is a matter of computation. You can go back in time, and find an old transaction, remove an entry from it, and recalculate the block. But it takes time, and other people are still moving on, computing new blocks. For your change to be accepted by the bitcoin network, you would need to issue new version of the altered block, plus new versions of any other blocks issued since the one you altered, and you’d have to do it before anyone else could issue a new block. The consensus is the longest block-chain, so issuing blocks that aren’t longer than the longest chain in the network is a waste of time. Because the computation is hard, even being one block behind is enough to make it effectively impossible to be able to change the ledger: to become the new largest chain when you’re just one block behind means you’d need to compute solutions for three blocks before anyone could find a solution for just one more block!

That last bit isn’t so clear when you read it, so let’s work through an example.

1. Block B is issued
2. Block C is issued
3. You want to change block B.
4. The current longest blockchain is […, B, C].
5. To replace B with a new block B’, you need to issue a
longer blockchain that the current consensus of […, B, C].
6. That means that you need to issue B’, C’, and a new block D’ before anyone else can just issue D.
7. By falling just one block behind, you need to issue 3 three new blocks before anyone else can issue just one.

And that, my friends, is effectively impossible.

## 6 thoughts on “The Tech of Bitcoin”

1. Øystein

But, if the ledger is only a list of transactions then how can you know how many bitcoins you have? Must the whole ledger be scanned to count the deposits and withdrawals to the private key?

And how is people kept from transferring bitcoins they don’t have?

1. markcc Post author

The ledger is the total list of all transactions ever, in the history of bitcoin. Each transaction in the ledger has a unique identifier. The way that you maintain your bitcoins is with a piece of software called a wallet. The wallet has a list of the transactions that were performed with your keys.

So you know exactly where in the ledger your transactions are. You don’t need to look through the entire history; you know exactly where to go. Knowing the transaction identifiers, you can verify that the transactions in your wallet are in the ledger by sending a request to the bitcoin network.

People can’t transfer bitcoins that they don’t have because a transaction is only accepted into the ledger if it’s properly signed by a private key. If no one has your private key, then they can’t sign a transaction authorizing a transfer of your coins.

2. _Arthur

When a new bitcoin transaction is announced, there is a race to be the first to scuccessfully chain it to the ledger.
The winner of that computing race gets 25 bitcoins, worth \$1000 or more.

Nothing prevents those organizations to generate a 1 BitCoin transaction, just to get the 25 BC premium ?
If they don’t win the “race”, they have lost nothing, except a little computing time.

1. markcc Post author

When it’s time to build a new ledger block, there’s a race to be the first successful miner. But a block isn’t generated for every transaction. Blocks are created every 10 minutes, with all of the transactions that occurred in the previous 10 minutes. So randomly adding transactions doesn’t get you anything.

Even if that weren’t the case, there are a lot of transactions going on with bitcoin. Transferring a coin from one of your keys to another wouldn’t make much of a dent in the transaction stream.

And finally: there are so many people competing in the mining race that your odds of winning any specific block are quite small. And you’re competing against people who are throwing serious resources at the problem: there are thousands of GPUs doing nothing but computing hashcodes for the current blocks. To compete with them in a serious way, you need to be throwing in serious resources of your own.

If you wanted to be seriously competitive in bitcoin mining, and you were starting off today, you’d have to invest 10s of thousands of dollars in hardware, and just the power cost of running those mining rigs would be tremendously expensive. So just trying to scam a couple of mining results won’t pay off.


text:
# OpenSuSE issues with a few things for cluster

First off, it appears that the zypper problem is solved. Zypper shares some similer command line bits with yum. This helped with a faster learning curve. Zypper also supports a feature I wish were in yum, but I use grep for.
zypper search gcc
and
yum list | grep gcc
are the same in function. Zypper is also much faster than yum. Interpreted languages don’t work so well with large data sets, such as many installation packages, and dense dependency trees they have to construct and traverse.
Also, our configuration file almost completely works with minor modifications. I’ll have to fix the package naming differences, but thats about it.
What doesn’t work? Funny you should ask.

The compilers. Intel compilers that the customer has installed are incompatible with OpenSuSE 11.1. Looking on intel’s forum support, they provide instructions for a work around … that doesn’t work.
The queuing system. SGE, or at least as it is installed right now, doesn’t work on OpenSuSE 11.1 . I have to look into this.
So the options for a fully operational OFED 1.4.2 stack are this OpenSuSE 11.1 but without the needed compilers or queueing system, OpenSuSE 10.3 which is nearing EOL, some other Linux.
I am thinking about this. Might just give in and go Centos 5.3, load OFED 1.4.2, update the kernel (most distro kernels are not appropriate for HPC). This could conceivably solve the problem. And the Intel compilers will work, as will the queuing system.
The end user shouldn’t care which OS is on their cluster as long as it works. The only real upgrade challenge will be the head node. The other nodes can be redone remotely without a problem.
Ugh.
Not pretty no matter how it is spun.

### 1 thought on “OpenSuSE issues with a few things for cluster”

1. You can also do:
yum list '*gcc*'
to do roughly the same as your zypper command (guessing from your yum/grep translation as I’ve not touched SuSE since SLES9, phew!).


text:
Drug response pre- and post-treatment between timepoints across conditions
1
0
Entering edit mode
@ibrahimakkouh-23133
Last seen 15 months ago

Hi, I have a dataset like this:

              Subject_ID Treatment Duration Pasient_Kontroll Age    CTP_NPC
NSC-2019-290      K5137      DMSO   6hours          Control  47 0.28845794
NSC-2019-291      K5039      DMSO   6hours          Control  62 0.06154937
NSC-2019-292     K50128      DMSO   6hours          Control  45 0.25351167
NSC-2019-293       U815      DMSO   6hours          Patient  32 0.22540896
NSC-2019-294       U793      DMSO   6hours          Patient  23 0.25467268
NSC-2019-295       U162      DMSO   6hours          Patient  38 0.20031763
NSC-2019-299      K5137      DMSO    1week          Control  47 0.21114240
NSC-2019-300      K5039      DMSO    1week          Control  62 0.11281822
NSC-2019-301     K50128      DMSO    1week          Control  45 0.23429267
NSC-2019-302       U815      DMSO    1week          Patient  32 0.20184951
NSC-2019-303       U793      DMSO    1week          Patient  23 0.35476381
NSC-2019-304       U162      DMSO    1week          Patient  38 0.19938699
NSC-2019-308      K5137        Li   6hours          Control  47 0.30317057
NSC-2019-309      K5039        Li   6hours          Control  62 0.28853031
NSC-2019-310     K50128        Li   6hours          Control  45 0.31602120
NSC-2019-311       U815        Li   6hours          Patient  32 0.42000711
NSC-2019-312       U793        Li   6hours          Patient  23 0.36429453
NSC-2019-313       U162        Li   6hours          Patient  38 0.37220548
NSC-2019-317      K5137        Li    1week          Control  47 0.18130258
NSC-2019-318      K5039        Li    1week          Control  62 0.12880417
NSC-2019-319     K50128        Li    1week          Control  45 0.31397647
NSC-2019-320       U815        Li    1week          Patient  32 0.14236717
NSC-2019-321       U793        Li    1week          Patient  23 0.28045362
NSC-2019-322       U162        Li    1week          Patient  38 0.30689310

I.e., 6 donors: 3 controls and 3 patients. For each donor, we have generated iPSC-derived NPCs and split these into 4 samples before running RNA-seq. One sample treated with DMSO (control treatment) for 6 hours, one sample treated with lithium (Li) for 6 hours, one sample treated with DMSO for 1 week, and one sample treated for lithium for 1 week. In total, 24 samples.

We want to identify the genes that are DE between Li-DMSO at 6 hours and Li-DMSO at 1 week across patient/control status (i.e. different treatment response in patients and controls) while adjusting for age and CPT_NPC effects. I understand that this is a very complex design (including paired samples), and I have not seen anyone do something similar before. What would be the appropriate R package and procedure? Any help is highly appreciated.

2
Entering edit mode
@kevin
Last seen 2 hours ago
Naas, Republic of Ireland

I would take a look at DESeq2's vignette. There are also useful examples given at the end of the manual page for results(), accessible via ?results.

In summary, you can do what you want by merging 2 or more of the metadata columns, and creating an interaction. A quick look tells me that you could probably do:

~ Treatment_PasientKontroll + Duration + Treatment_PasientKontroll:Duration + Age + CTP_NPC

Here, Treatment_PasientKontroll is a merged variable.

Kevin

0
Entering edit mode

Hi Kevin Blighe,

Your solution does not seem to take into account the paired design, i.e. multiple samples from the same subject. I am pretty sure DEseq2 cannot handle paired designs while accounting for additonal variables. I think limma is more suitable for this kind of analysis, but I am not sure how to proceed.

Best, Ibrahim

0
Entering edit mode

Paired designs are usually handled by including the sample pairing as a covariate / blocking factor (Subject_ID). In this case, your design formula is already expansive, but you may want to try that. There are also many previous questions on this topic. If you have a particular / specific question regarding pairing in, e.g., limma, then you could possibly create a new question on that very topic. This current question (above) was somewhat general).

Traffic: 591 users visited in the last hour
FAQ
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.


text:
# Gain

Gain

In electronics, gain is a measure of the ability of a circuit (often an amplifier) to increase the power or amplitude of a signal from the input to the output. It is usually defined as the mean ratio of the signal output of a system to the signal input of the same system. It may also be defined on a logarithmic scale, in terms of the decimal logarithm of the same ratio ("dB gain"). A gain greater than one (zero dB), that is, amplification, is the defining property of an active component or circuit, while a passive circuit will have a gain of less than one.

Thus, the term gain on its own is ambiguous. For example, "a gain of five" may imply that either the voltage, current or the power is increased by a factor of five, although most often this will mean a voltage gain of five for audio and general purpose amplifiers, especially operational amplifiers, but a power gain for radio frequency amplifiers, and for directional aerials will refer to a signal power change compared with a simple dipole. Furthermore, the term gain is also applied in systems such as sensors where the input and output have different units; in such cases the gain units must be specified, as in "5 microvolts per photon" for the responsivity of a photosensor. The "gain" of a bipolar transistor normally refers to forward current transfer ratio, either hFE ("Beta", the static ratio of Ic divided by Ib at some operating point), or sometimes hfe (the small-signal current gain, the slope of the graph of Ic against Ib at a point).

In laser physics, gain may refer to the increment of power along the beam propagation in a gain medium, and its dimension is m−1 (inverse meter) or 1/meter.

## Logarithmic units and decibels

### Power gain

Power gain, in decibels (dB), is defined by the 10 log rule as follows:

$\text{Gain}=10 \log \left( {\frac{P_{\mathrm{out}}}{P_{\mathrm{in}}}}\right)\ \mathrm{dB}$

where Pin and Pout are the input and output powers respectively.

A similar calculation can be done using a natural logarithm instead of a decimal logarithm, and without the factor of 10, resulting in nepers instead of decibels:

$\text{Gain} = \ln\left( {\frac{P_{\mathrm{out}}}{P_{\mathrm{in}}}}\right)\, \mathrm{Np}$

### Voltage gain

When power gain is calculated using voltage instead of power, making the substitution (P=V 2/R), the formula is:

$\text{Gain}=10 \log{\frac{(\frac{{V_\mathrm{out}}^2}{R_\mathrm{out}})}{(\frac{{V_\mathrm{in}}^2}{R_\mathrm{in}})}}\ \mathrm{dB}$

In many cases, the input and output impedances are equal, so the above equation can be simplified to:

$\text{Gain}=10 \log \left( {\frac{V_\mathrm{out}}{V_\mathrm{in}}} \right)^2\ \mathrm{dB}$

and then the 20 log rule:

$\text{Gain}=20 \log \left( {\frac{V_\mathrm{out}}{V_\mathrm{in}}} \right)\ \mathrm{dB}$

This simplified formula is used to calculate a voltage gain in decibels, and is equivalent to a power gain only if the impedances at input and output are equal.

### Current gain

In the same way, when power gain is calculated using current instead of power, making the substitution (P = I 2R), the formula is:

$\text{Gain}=10 \log { \left( \frac { {I_\mathrm{out}}^2 R_\mathrm{out}} { {I_\mathrm{in}}^2 R_\mathrm{in} } \right) } \ \mathrm{dB}$

In many cases, the input and output impedances are equal, so the above equation can be simplified to:

$\text{Gain}=10 \log \left( {\frac{I_\mathrm{out}}{I_\mathrm{in}}} \right)^2\ \mathrm{dB}$

and then:

$\text{Gain}=20 \log \left( {\frac{I_\mathrm{out}}{I_\mathrm{in}}} \right)\ \mathrm{dB}$

This simplified formula is used to calculate a current gain in decibels, and is equivalent to the power gain only if the impedances at input and output are equal.

The "current gain" of a bipolar transistor, hFE or hfe, is normally given as a dimensionless number, the ratio of Ic to Ib (or slope of the Ic-versus-Ib graph, for hfe).

### Example

Q. An amplifier has an input impedance of 50 ohms and drives a load of 50 ohms. When its input (Vin) is 1 volt, its output (Vout) is 10 volts. What is its voltage and power gain?

A. Voltage gain is simply:

$\frac{V_\mathrm{out}}{V_\mathrm{in}}=\frac{10}{1}=10\ \mathrm{V/V}.$

The units V/V are optional, but make it clear that this figure is a voltage gain and not a power gain. Using the expression for power, P = V2/R, the power gain is:

$\frac{V_\mathrm{out}^2/50}{V_\mathrm{in}^2/50} = \frac{V_\mathrm{out}^2}{V_\mathrm{in}^2}=\frac{10^2}{1^2}=100\ \mathrm{W/W}.$

Again, the units W/W are optional. Power gain is more usually expressed in decibels, thus:

$G_{dB}=10 \log G_{W/W}=10 \log 100=10 \times 2=20\ \mathrm{dB}.$

A gain of factor 1 (equivalent to 0 dB) where both input and output are at the same voltage level and impedance is also known as unity gain.

This article incorporates public domain material from the General Services Administration document "Federal Standard 1037C".

Wikimedia Foundation. 2010.

Synonyms:

### Look at other dictionaries:

• gain — gain …   Dictionnaire des rimes

• gain — [ gɛ̃ ] n. m. • XIIe; de gagner 1 ♦ Littér. Action de gagner. Le gain d une bataille. ⇒ succès, victoire. Le gain d un procès. Cour. Avoir, obtenir gain de cause. Absolt Chances égales de gain et de perte. 2 ♦ Ce qu on gagne; profit, bénéfice… …   Encyclopédie Universelle

• gain — n 1: an increase in value, capital, or amount compare loss capital gain: a gain realized on the sale or exchange of a capital asset (as a stock or real estate) ca·su·al·ty gain: a gain realized by an insured because property insurance benefits… …   Law dictionary

• gain — GAIN. s. m. Profit, lucre. Grand gain. petit gain. gain mediocre. gain sordide, illicite, deshonneste. travailler pour le gain. faire à moitié de gain. entrer avec quelqu un à moitié de gain & de perte. à perte & à gain. apporter grand gain.… …   Dictionnaire de l'Académie française

• Gain — Gain, v. t. [imp. & p. p. {Gained} (g[=a]nd); p. pr. & vb. n. {Gaining}.] [From gain, n. but. prob. influenced by F. gagner to earn, gain, OF. gaaignier to cultivate, OHG. weidin[=o]n, weidinen to pasture, hunt, fr. weida pasturage, G. weide,… …   The Collaborative International Dictionary of English

• Gain — (g[=a]n), n. [OE. gain, gein, ga[yogh]hen, gain, advantage, Icel. gagn; akin to Sw. gagn, Dan. gavn, cf. Goth. gageigan to gain. The word was prob. influenced by F. gain gain, OF. gaain. Cf. {Gain}, v. t.] 1. That which is gained, obtained, or… …   The Collaborative International Dictionary of English

• gain — gain1 [gān] n. [ME < OFr gaaigne < gaaignier: see GAIN1 the vt.] 1. an increase; addition; specif., a) [often pl.] an increase in wealth, earnings, etc.; profit; winnings b) an increase in advantage; advantage; improvement 2. the act of… …   English World dictionary

• Gain — Gain, v. i. To have or receive advantage or profit; to acquire gain; to grow rich; to advance in interest, health, or happiness; to make progress; as, the sick man gains daily. [1913 Webster] Thou hast greedily gained of thy neighbors by… …   The Collaborative International Dictionary of English

• Gain — ist das englische Wort für Verstärkung (Physik), wird in der Technik verwendet die Eingangsverstärkung, etwa bei einem Mischpult oder Gitarrenverstärker der Gain (Mawddach), Quellfluss des Mawddach in Wales eine Namensvariante der… …   Deutsch Wikipedia

• gain — ► VERB 1) obtain or secure. 2) reach or arrive at. 3) (gain on) come closer to (a person or thing pursued). 4) increase the amount or rate of (weight, speed, etc.). 5) increase in value. 6) (gain in) improve o …   English terms dictionary

• Gain — Gain, a. [OE. gein, gain, good, near, quick; cf. Icel. gegn ready, serviceable, and gegn, adv., against, opposite. Cf. {Ahain}.] Convenient; suitable; direct; near; handy; dexterous; easy; profitable; cheap; respectable. [Obs. or Prov. Eng.]… …   The Collaborative International Dictionary of English


text:
## Likelihood Ratio

A quantity used to test Nested Hypotheses. Let be a Nested Hypothesis with Degrees of Freedom within (which has Degrees of Freedom), then calculate the Maximum Likelihood of a given outcome, first given , then given . Then

Comparison of this ratio to the critical value of the Chi-Squared Distribution with Degrees of Freedom then gives the Significance of the increase in Likelihood.

The term likelihood ratio is also used (especially in medicine) to test nonnested complementary hypotheses as follows,


text:
# Arduino frequency and duty cycle with 2 pots

#### Bogdan.m

Joined Apr 20, 2019
46
Hello everyone, i am using a simple sketch for a PWM signal, However every time i need to change the frequency i have to upload a new sketch, is there a way to set the frequency using a 2nd pot ?

Code:
#include <PWM.h>
int32_t frequency = 25000;

const int Pin = 9;
int PWM = 0;
void setup() {
bool succes = SetPinFrequencySafe(9, frequency);
}

void loop() {
PWM = map(analogRead(A0), 0, 1023, 0, 255);
analogWrite (Pin, PWM);
delay(100);
}

#### ericgibbs

Joined Jan 29, 2010
11,122
hi B,
Do you mean the PWM frequency or the Mark/Space ratio of the PWM signal.?
E

#### Bogdan.m

Joined Apr 20, 2019
46
The PWM frequency. I found that using this library, the frequency can be changed really easy, but idk if it can be changed by a pot.

#### Alec_t

Joined Sep 17, 2013
11,744
If A0 is being use to set the duty-cycle then you could use the pot and another analog port to set the frequency. Does that Arduino PWM library allow frequency to be set to an arbitrary value, or just to preset values?

#### djsfantasi

Joined Apr 11, 2010
6,962
The simple answer is yes, you can use a second pot to adjust the PWM frequency out of the Arduino.

You will need to use two Arduino commands.
• map()
Read the descriptions of these commands on the Arduino reference pages, to make sure you use the correct data types.

Connect the 2nd pot’s wiper to an analog input pin; the ends to ground at +5V. Read the value of the input pin using analogRead(). It should return a value from 0 to 1023.

Map this input value to the desired range for the PWM frequency, using the map() function.

That’s all you should have to do.

#### Bogdan.m

Joined Apr 20, 2019
46
to make things more easy (for me at least) i have split the code into 2 halves, they work independently, but when i put them together my duty cycle pot only works from 0 to about 2% and then goes to full on.

Code:
#include <PWM.h>

void setup() {
}
void loop() {

int32_t frequency = map(analogRead(A1), 0, 1023, 0, 25000);
}


text:
# Ergodicity in hidden Markov models

Assume that we have a hidden Markov model, where we have a sequence of hidden variables $Z_1, \dots, Z_m$ which form a Markov chain. Now, at each "time point" $i$, an observation $Y_i$ is drawn from the conditional distribution given $Z_i$, i.e., $Y_i\sim F(\cdot | Z_i)$.

This leads to a sequence $(Z_1, Y_1), \dots, (Z_m, Y_m)$ which is a Markov chain. Now assume that the generation of the hidden variables $Z_1, \dots, Z_m$ ensures that $Z_1, \dots, Z_m$ is a stationary and ergodic sequence. Further, we even know that $(Z_1, Y_1), \dots, (Z_m, Y_m)$ then is an ergodic Markov chain.

My question is whether also the sequence of observations $Y_1, \dots, Y_m$ is ergodic given that both the sequence of hidden variables, as well as the joint sequence are ergodic. Papers such as this one seem to address the opposed question whether the sequence of hidden variables is ergodic.


text:
# Elliptic flow of electrons from beauty-hadron decays in Pb-Pb collisions at $\sqrt{s_{\rm NN}}$ = 5.02 TeV

The elliptic flow of electrons from beauty hadron decays at midrapidity ($|y|$ $<~$ 0.8) is measured in Pb-Pb collisions at $\sqrt{s_{\rm NN}}$ = 5.02 TeV with the ALICE detector at the LHC. The azimuthal distribution of the particles produced in the collisions can be parameterized with a Fourier expansion, in which the second harmonic coefficient represents the elliptic flow, $v_{\rm 2}$. The $v_{\rm 2}$ coefficient of electrons from beauty-hadron decays is measured for the first time in the transverse momentum ($p_{\rm{T}}$) range 1.3-6 GeV/$c$ in the centrality class 30-50%. The measurement of electrons from beauty-hadron decays exploits their larger mean proper decay length $c\tau \approx$ 500 $\mu$m compared to that of charm hadrons and most of the other background sources. The $v_{\rm 2}$ of electrons from beauty hadron decays at midrapidity is found to be positive with a significance of 3.75$\sigma$. The results provide insights on the degree of thermalization of beauty quarks in the medium. A model assuming full thermalization of beauty quarks is strongly disfavoured by the measurement at high $p_{\rm{T}}$, but is in agreement with the results at low $p_{\rm{T}}$. Transport models including substantial interactions of beauty quarks with an expanding strongly-interacting medium describe the measurement.


text:
# Filter¶

class acoular.tprocess.Filter

Abstract base class for IIR filters based on scipy lfilter implements a filter with coefficients that may be changed during processing

Should not be instanciated by itself

ba = Property()

Filter coefficients

result(num)

Python generator that yields the output block-wise.

Parameters
numinteger

This parameter defines the size of the blocks to be yielded (i.e. the number of samples per block).

Returns
Samples in blocks of shape (num, numchannels).

Delivers the bandpass filtered output of source. The last block may be shorter than num.


text:
+0

# Algebra

0
123
1

If -5 <= a <= -2 and 2 <= b <= 5, what is the least possible value of $\displaystyle\left(\frac{1}{a}+\frac{1}{b}\right)\left(\frac{1}{b}-\frac{1}{a}\right)$? Express your answer as a common fraction.

Jan 25, 2022

#1
+2455
0

In order to get the smallest value, you want as big of a negative number x as big of a positive number, so the answer is a super small negative. The way we can do this is by having a = -2, and b = 5.

Plug these values in:

$${({-1 \over 2} + {1\over 5})}* {({1 \over 5} - {-1 \over 2})}$$. This yields $$\color{red} -21/100$$.

Jan 25, 2022


text:
# Frequency-domain zero padding - special treatment of X[N/2]

Suppose we wish to interpolate a periodic signal with an even number of samples (e.g. N=8) by zero-padding in the frequency domain.

Let the DFT X=[A,B,C,D,E,F,G,H]
Now let's pad it to 16 samples to give Y. Every textbook example and online tutorial I have seen inserts zeros at [Y4...Y11] giving
Y=[2A,2B,2C,2D,0,0,0,0,0,0,0,0,2E,2F,2G,2H].
(Then y = idft(Y) is the interpolated signal.)

Why not instead use Y=[2A,2B,2C,2D,E,0,0,0,0,0,0,0,E,2F,2G,2H]?

As far as I can tell (my math knowledge is limited):

• It minimises the total power
• It ensures that if x is real-valued then so is y
• y still intersects x at all the sample points, as required (I think this is true for any p where Y=[2A,2B,2C,2D,pE,0,0,0,0,0,0,0,(2-p)E,2F,2G,2H])

So why is it never done this way?

Edit: x is not necessarily real-valued or band-limited.

• You write "Every textbook example and online tutorial I have seen inserts zeros at...", can you update your post with some references? Just curious because you also write that x is not necessarily real-valued and the first construction you mention does not (in general) produce a real result by inverse DFT. – niaren Sep 29 '11 at 19:26
• @niaren here's one example: dspguru.com/dsp/howtos/… – finnw Sep 29 '11 at 20:52
• It's worth noting that in order for $y$ to be real-valued, then you would need to let $Y=[2A,2B,2C,2D,E,0,0,0,0,0,0,0,E^*,2F,2G,2H]$ (i.e. when you duplicate E for the "negative-frequency" half of the frequency-domain vector, you need to conjugate it. Signals that are real in the time domain have conjugate-symmetric DFTs. – Jason R Oct 6 '11 at 3:48
• @Jason R, if the input signal is real-valued then so is E so [2A,2B,2C,2D,E,0,0,0,0,0,0,0,E,2F,2G,2H] satisfies this condition. If the input is not real-valued then it is not necessary to force the output to be real-valued. – finnw Oct 6 '11 at 12:19
• You are correct. That's what I get for writing a comment too late in the evening. – Jason R Oct 6 '11 at 16:27

Let's look at the frequencies of the bins in your 8-point DFT:

$$\begin{array}{c} \omega_A = 0,\\ \omega_B = \pi/4,\\ \omega_C = \pi/2,\\ \omega_D = 3\pi/4,\\ \omega_E = \pi = -\pi\ ({\tt mod}\ 2\pi),\\ \omega_F = 5\pi/4 = -3\pi/4\ ({\tt mod}\ 2\pi),\\ \omega_G = 3\pi/2 = -\pi/2\ ({\tt mod}\ 2\pi), \\ \omega_H = 7\pi/4 = -\pi/4\ ({\tt mod}\ 2\pi) \end{array}$$ So when you interpolate by a factor of 2, point $E$'s frequency becomes $-\pi$ or $+ \pi$.

At a first glance, I can't see what the problem is with your approach as it's not clear whether $E$ should be put into the bin associated with $\pi$ or $-\pi$.

On Julius O. Smith III's page, he states a condition:

Furthermore, we require $x(N/2) = x(-N/2) = 0$ when $N$ is even, while odd requires no such restriction.

And his example there is for an odd $N$, which avoids the problem.

Not sure it's required, but here's the full reference to Julius's work:

Smith, J.O. Mathematics of the Discrete Fourier Transform (DFT) with Audio Applications, Second Edition, http://ccrma.stanford.edu/~jos/mdft/, 2007, online book, accessed September 28, 2011.

There are many ways to interpolate data. Interpolation in my mind means that you 'draw' lines between some data points. This can be done many ways. One type of interpolation which is useful in DSP (especially in multirate DSP) is 'Bandlimited interpolation'. If you google that you will get many interesting and useful hits. What you propose is not bandlimited interpolation. In your 'upsampled' x you have frequency components not present in the original x.

Edit (too long to fit into a comment):

There is a quite significant difference between your construction, starting with $X=[A,B,C,D,E,F,G,H]$ and the example in the reference you provide.

Considering real input

$X=[A,B,C,D,E,D^*,C^*,B^*]$

Upsampling by a factor of 2 for fullband input. In this case upsampling can be performed by first placing zeros in the input interleaved (that is $x_0,0,x_1,0,...$. The result is a signal with a frequency spectrum containing a compressed version of the frequency spectrum of x (in range $0-\pi/2$) and an image extending from $\pi/2 - \pi$ (considering only the positive frequency axis). If x2 is the upsampled version then

$X2=[A,B,C,D,E,D^*,C^*,B^*,A,B,C,D,E,D^*,C^*,B^*]$

In the ideal case an ideal brick-wall filter with cutoff frequency $\pi/2$ is required in order to remove the image. That is (for infinite input)

$y_n = \sum_{k=-\infty}^{\infty} x2_k sinc(0.5n - k)$

In practice though there will be some distortion because the brick-wall filter is not realistic. The practical filter can suppress/remove frequencies in the input or it can leave in some of the frequency components in the image in the upsampled signal. Or the filter can make a compromise between the two. I think your frequency-domain construction also reflects this compromise. These two examples, represents two different choices:

$Y=[A,B,C,D,E,0,0,0,0,0,0,0,E^*,D^*,C^*,B^*]$

$Y=[A,B,C,D,0,0,0,0,0,0,0,0,0,D^*,C^*,B^*]$

If the input is bandlimited below the nyquist frequency as in your reference this issue disappears.

Maybe it is possible to find a value of $\rho$ below, such that some error function, for instance the squared error between the input spectrum and the upsampled output spectrum is minimum.

$Y=[A,B,C,D,\rho,0,0,0,0,0,0,0,\rho^*,D^*,C^*,B^*]$

• Sure it's bandlimited interpolation. What do you mean, frequency components not present in the original $x$? – leftaroundabout Sep 28 '11 at 13:44
• @leftaroundabout The original x is bandlimited (in this example to the Nyquist frequency). OP wants to upsample x by a factor of 2 (my interpretation). One way to upsample x is to insert zeros in the frequency response as shown by OP (the example without E, the one shown in DSP text books) and do an inverse FFT. I believe the same could have been achived by inserting zeros (interleaved) in x and (low-pass) filter by a sinc. By inserting E as shown by OP, the upsampled x is not bandlimited to the original Nyquist frequency. This is typically not desired (it is distortion). Do you agree? – niaren Sep 28 '11 at 15:17
• Inserting zeroes interleaved and convoluting with a sinc (multiplied by 2) should indeed be the corresponding time-domain operation. — I don't think it's distortion: the two bins the OP put $E$s in represent both the same frequency, $\frac\pi2\sim\frac{-\pi}2$. – leftaroundabout Sep 28 '11 at 18:09
• I am assuming the frequency ±N/2 is present in x. If it is not (due to bandlimiting or otherwise) then E would be 0 anyway so there would be no difference between padding with E (or 2E) and padding with 0. – finnw Sep 28 '11 at 18:13
• A bandlimited signal can still have content in bin N/2 due to "spectral leakage" from any non-periodic-in-DFT-aperture spectral content, especially near (but not at) Fs/2. – hotpaw2 Sep 29 '11 at 17:45


text:
https://www.barnebys.se/realized-prices/lot/vase-schneider

Activity report 2017 - Institut Mittag-Leffler

A theorem relating to the quantum mechanics of crystals stating that the wave function ψ for an electron in a periodic potential has the form ψ(r) = exp(ik · r)U(r),   one electron Schrödinger equation for a periodic potential are called Bloch electrons and obey Bloch's theorem. • Bloch's theorem can be written in two. 2.4.1.1 Bloch's Theorem. Bloch's theorem states that the solution of equation ( 2.65) has the form of a plane wave multiplied by a function with the period of the  An alternative formulation of Bloch's theorem is that the eigenstates of a periodic Hamitonian Ĥ can be chosen so that for any lattice vector R of the Hamitonian,  27 Dec 2019 The Bloch theorem in ordinary quantum mechanics means the absence of the total electric current in equilibrium. In the present paper, we  In complex analysis, a field within mathematics, Bloch's theorem gives a lower bound on the size of a disc in which an inverse to a holomorphic function exists. Bloch's theorem. Here is the statement of Bloch's theorem: For electrons in a perfect crystal, there is a basis of wave functions  The single-electron Bloch states and the corresponding energy bands are the result of Bloch's theorem and arise from the interaction between an electron and   Bloch theorem.

\] Substituting the Bloch form of the solution for the right going wave ($\psi_+ = e^{ikx} u_{k+}$) into the Schrödinger equation yields, BLOCH THEOREM || BAND THEORY OF SOLIDS || ENGINEERING PHYSICS 2016-03-01 Bloch’s Theorem ‘When I started to think about it, I felt that the main problem was to explain how the electrons could sneak by all the ions in a metal…. By straight Fourier analysis I found to my delight that the wave differed from the plane wave of free electrons only by a periodic modulation’ F. BLOCH Bloch’s Theorem and Krönig-Penney Model - Free download as Powerpoint Presentation (.ppt / .pptx), PDF File (.pdf), Text File (.txt) or view presentation slides online. A lecture note on Bloch’s Theorem and Krönig-Penney Model. Explain the meaning and origin of … Here is the statement of Bloch's theorem: Each of these wave functions is an energy eigenstate Each of these wave functions is a Bloch state, meaning that this wave function ψ {\displaystyle \psi } … Bloch's theorem is a proven theorem with perfectly general validity. We will first give some ideas about the proof of this theorem and then discuss what it means for real crystals. As always with hindsight, Bloch's theorem can be proved in many ways; the links give some examples.

Lectures on Quantum Mechanics av Steven Weinberg

. . .

Sök i programutbudet Chalmers studentportal

• Mats Bodin, Measures on Sets with Fractal  lect. reciprocal lattice lect.

Denna fil är nu ersatt av File:Bloch Sphere.svg.
Underlakare sommarvikariat 2021

Electron Dilemma Also Found in Optics 2. Bloch theorem. Solution to Schroedinger equation for an electron in a periodic potential must be of a form. (Bloch function) where has the periodicity of the  29 May 2020 Bloch functions appear naturally in connection with Bloch's theorem.

. . .
Skola eslov

barns behov i centrum
vat eesti
vasagymnasiet
ingela elfström uppföljning och utvärdering för förändring
commissioner gordon
usa 1700 talet

PDF Fishing for ways to thrive. Integrating zooarchaeology to

Blochs Theorem Survey of Solid State Physics. J.M. Martínez-Duart, F. Agulló-Rueda, in Nanotechnology for Microelectronics and Group Theory in Materials Science, Applications. Bloch's theorem predicts partly the form of the common eigenfunctions SEMICONDUCTOR PHYSICS | … Bloch theorem. In a crystalline solid, the potential experienced by an electron is periodic. V(x) = V(x +a) where a is the crystal period/ lattice constant. In such a periodic potential, the one electron solution of the Schrödinger equation is given by the plane waves modulated by a function that has the same periodicity as that of the lattice: Bloch theorem. A theorem that specifies the form of the wave functions that characterize electron energy levels in a periodic crystal.

GAMLA EXAMENSARBETEN VID - NanoPDF

Titta senare Titta  in crystalline matter, Bloch's Theorem is generalized via a reformulation of the the generalized Bloch Hamiltonian is also shown to provide a natural starting  -Quantum states in the periodic potentials, Bloch theorem, band structure. Transport properties - Semiclassical electron dynamics in electric  generalization of Bloch's Theorem which is applicable whenever translational in crystalline matter, Bloch's Theorem is generalized via a reformulation of the  Introducing the concepts of reciprocal space, Brillouin zones, and Bloch's theorem, the determination of electronic band structure using the pseudopotential  av T Marten — Theorem 1 For any system of interacting particles the external potential Vext(r) The result of Bloch's theorem is that the electronic structure problem of a solid. in crystalline matter, Bloch's Theorem is generalized via a reformulation of the the generalized Bloch Hamiltonian is also shown to provide a natural starting  Download Raymond Bloch - Latinska epigrafika download document. Bloch TheoremDocuments · Exceptions: BlochDocuments · Marxism, Romanticism  Bloch´s theorem.

Content Periodic potentials Bloch’s theorem Born – von Karman boundary condition Crystal momentum Band index Group velocity, external force Fermi surface Band gap Density of states van Hove singularities Central concepts Periodic potentials Bloch theorem. A theorem that specifies the form of the wave functions that characterize electron energy levels in a periodic crystal. Electrons that move in a constant potential, that is, a potential independent of the position r, have wave functions that are plane waves, having the form exp(i k · r). Note that Bloch’s theorem • is true for any particle propagating in a lattice (even though Bloch’s theorem is traditionally stated in terms of electron states (as above), in the derivation we made no assumptions about what the particle was); • makes no assumptions about the strength of the potential. 7You can check that u j,q Periodic systems and the Bloch Theorem 1.1 Introduction We are interested in solving for the eigenvalues and eigenfunctions of the Hamiltonian of a crystal. This is a one-electron Hamiltonian which has the periodicity of the lattice.


text:
# TikZ Mindmap: How can I make nodes autosize to fit the text?

How can I have the size of a mindmap node be calculated automatically by TikZ such that the text inside fits nicely inside? With inner sep=... I am able to have the height fit in such a way, but not the width. Btw.: I am using rectangles as nodes, not the standard circles.

\documentclass[tikz,border=5]{standalone}
\usetikzlibrary{mindmap}

\tikzset{
every node/.append style={concept, rectangle, minimum size=0cm, inner sep=2mm}
}

\begin{document}

\begin{tikzpicture}[mindmap,text=white]
\node {O} child { node {A} };
\end{tikzpicture}

\end{document}

• Please post a minimum working example (MWE). How are we to guess what you've done or how you've configured a non-standard mind map if you don't show us? – cfr Jan 2 '16 at 20:43
• @cfr: I don't quite see the necessity in this case, but here you go. – Make42 Jan 2 '16 at 21:07
• Well, it makes it much easier to answer. How else can I know what you've done? – cfr Jan 2 '16 at 21:42
• I like the rectangular style. I never realised you can do this. Does it work with the gradual change of colour in connections between the nodes? I guess it should? I guess it would be nice if the transition to the connection could be smoother, though. It keeps reminding me of Dairy Milk ads. – cfr Jan 2 '16 at 21:48

## 1 Answer

I think you can simply add

text width=

to the style for every node. The mindmap style applies styles for each level of the tree which set the width of the text. You could override these separately per level, but if you want to do this generally, just adding it for all nodes seems to make more sense.

This produces

Code:

\documentclass[tikz,border=10pt]{standalone}
\usetikzlibrary{mindmap}
\tikzset{
every node/.append style={concept, text width=, rectangle, minimum size=0cm, inner sep=2mm},
}
\begin{document}
\begin{tikzpicture}[mindmap,text=white]
\node {Orangutans} child { node {Aardvarks} child { node {Bees} } };
\end{tikzpicture}
\end{document}


text:
# Delta-Lambda: A demonstration interpreter for type system delta-lambda (of N.G. De-bruijn)

[ compilers-interpreters, mit, program ] [ Propose Tags ]

A demonstration package for the type system delta-lambda (of N.G. De-bruijn) in ~1000 lines of haskell. this is at the moment exceptionally ALPHA level software. no tests for the validity of the type checker (only the type synthesizer), or the parser, or the repl, etc... there are dragons in here (soon to be tamed), and lots of them! todo: profiling, unit testing, formal verification of type correctness adequacy proof of the implemented type system.

Versions [faq] 0.1.0.0, 0.2.0.0, 0.3.0.0 base (>=4.8 && <4.10), bytestring (>=0.10.6.0), Cabal (>=1.9.2), cereal (==0.5.*), cpphs (>=1.20), filepath (>=1.4.0.0), haskeline (==0.7.*), megaparsec (>=5.0 && <5.3), mtl (==2.2.*), options (==1.2.*), parallel (==3.2.*), text (>=1.2.2.0), wl-pprint (>=1.2) [details] MIT Copyright (c) 2016 James M Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. James M listofoptions@gmail.com Compilers/Interpreters https://github.com/listofoptions/delta-lambda https://github.com/listofoptions/delta-lambda/issues head: git clone git://github.com/listofoptions/delta-lambda.git by listofoptions at Thu May 11 01:32:18 UTC 2017 NixOS:0.3.0.0 Delta-Lambda 1405 total (70 in the last 30 days) (no votes yet) [estimated by rule of succession] λ λ λ Docs not available Last success reported on 2017-05-11

## Flags

NameDescriptionDefaultType
debug

Enable debugging

DisabledManual

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info

#### Maintainer's Corner

For package maintainers and hackage trustees

[back to package description]

# ΔΛ (Delta-Lambda)

## Introduction :

This language is a test language for an implementation of the type system ΔΛ (Delta-Lambda) described by de Bruijn for simplifying the semantics of his Automath project. Eventually I will post the Coq/Idris/Agda/etc... proofs for the compliance of the code to the inferential rules specified by De Groote.

## Syntax :

The syntax is expressed in EBNF.

### expression syntax

Expression  = 'type'
| Identifier
| '(' , Expression  , { ',' , Expression  } , ')' , Expression
| '[' , Declaration , { ',' , Declaration } , ']' , Expression
;
Declaration = [ Identifier , { ',' , Identifier } ] ':' Expression
;

## Semantics :

the semantics of delta-lambda are fairly simple, and involve inductive definitions on the structure of expressions. We will step through the inductive relations on terms and describe them in detail. We assume that beta equivalence is known to be the reflexive transitive symmetric closure of beta reduction, which is defined as normal. the notation [x := A]B is used to represent substitution, which also takes on the typical meaning (pedants may examine de Bruijn's paper) here are the relations (the names of which are the same in the code):

1. typeOf
• the typeOf function produces the type of a term, by replacing the tail variable with it's type

typeOf[context, x] = A if [x : A] in context typeOf[context, (A) B] = (A) typeOf[context, B] typeOf[context, [x : A] B] = [x: A] typeOf[[x : A] context, B])

1. ftype
• this function produces the 'final' type of a term, that is the term ends in type. (note that this essentially preforms eta expansion)

ftype[context, A] = A if tail[A] is type ftype[context, A] = typef[context, typeOf[context, A]] if tail[A] is not type

1. tail
• this function computes the term at the 'end' of a spine.

tail[type] = type tail[x] = x tail[(A) B] = tail[B] tail[[x : A] B] = tail[B]

1. correct
• this is the most important structural function, it's purpose is to prove (or disprove) that a given term is (or is not) correct.

correct[context, type] = true correct[context, x] = true iff (x A) in context, else false correct[context, [x : A] B] = correct[context, A] and correct[[x : A] context, B] correct[context, (A) B] = correct[B] and typing[context, A] is beta equivalent to some [x : C] D and typeOf[context, B] is beta equivalent to C and correct[context, [x := B]D] It must be reiterated that proofs of the conformance of these structural relations on Expressions have not been written yet, as the relations are not simply recursive, so a proof in Coq/Agda/Idris/etc... will be very difficult Also note that the code does not exactly follow this formalism.