text:
# Archive | work

## solutions to exercises 1.26

Exercise: Find the determinants of Jacobi matrices with $$a=1,bc=-1$$ and $$a=-1,bc=-1$$.
Solution: First assume $$a=1,bc=-1$$, and use the regression obtained in the lecture notes, i.e $$j_{k+1}=aj_k-bcj_{k-1} = j_k+j_{k-1}$$

Those are Fibonacci numbers with initial conditions obtained by the first two …

## 1.26 determinants

$$\def\Real{\mathbb{R}}\def\Comp{\mathbb{C}}\def\Rat{\mathbb{Q}}\def\Field{\mathbb{F}}\def\Fun{\mathbf{Fun}}\def\e{\mathbf{e}} \def\f{\mathbf{f}}\def\bv{\mathbf{v}}\def\i{\mathbf{i}} \def\eye{\left(\begin{array}{cc}1&0\\0&1\end{array}\right)} \def\bra#1{\langle #1|}\def\ket#1{|#1\rangle}\def\j{\mathbf{j}}\def\dim{\mathrm{dim}} \def\ker{\mathbf{ker}}\def\im{\mathbf{im}}$$

1. Determinant is a function of square matrices (can be defined for any operator $$A:U\to U$$, but we’ll avoid this abstract detour). It can be defined as a function that has the following …

## 1.24 linear operators

$$\def\Real{\mathbb{R}}\def\Comp{\mathbb{C}}\def\Rat{\mathbb{Q}}\def\Field{\mathbb{F}}\def\Fun{\mathbf{Fun}}\def\e{\mathbf{e}} \def\f{\mathbf{f}}\def\bv{\mathbf{v}}\def\i{\mathbf{i}} \def\eye{\left(\begin{array}{cc}1&0\\0&1\end{array}\right)} \def\bra#1{\langle #1|}\def\ket#1{|#1\rangle}\def\j{\mathbf{j}}\def\dim{\mathrm{dim}} \def\ker{\mathbf{ker}}\def\im{\mathbf{im}}$$

1. Linear mappings, or linear operators are just linear functions taking values in a linear space:
$A:U\to V,\ \mathrm{where\ both\ } U\ \mathrm{and\ } V\ \mathrm{ are\ linear\ spaces.}$
The same …

## 1.19 Linear spaces

$$\def\Real{\mathbb{R}}\def\Comp{\mathbb{C}}\def\Rat{\mathbb{Q}}\def\Field{\mathbb{F}}\def\Fun{\mathbf{Fun}}\def\e{\mathbf{e}} \def\f{\mathbf{f}}\def\bv{\mathbf{v}}\def\i{\mathbf{i}} \def\eye{\left(\begin{array}{cc}1&0\\0&1\end{array}\right)} \def\bra#1{\langle #1|}\def\ket#1{|#1\rangle}\def\j{\mathbf{j}}\def\dim{\mathrm{dim}} \def\ker{\mathbf{ker}}\def\im{\mathbf{im}}$$

1. Linear (or vector) spaces (over a field $$k$$ – which in our case will be almost always the complex numbers) are sets that satisfy the following standard list of properties:

• There exists

## solutions to exercises 1.17

Exercise 1: describe the curve $$1/z$$, where $$z=1+ti, ~~t\in (-\infty,\infty)$$.

Solution: apply $$\frac{1}{z} = \frac{\bar z}{|z|^2}$$ and get $$\frac{1}{1+ti} = \frac{1-ti}{1+t^2}$$, which is a parametric curve  of the form $$p(t) = x(t)+iy(t)$$ where $$x(t) = \frac{1}{1+t^2},~~~ y(t) = \frac{-t}{1+t^2}$$.…

## 1.17 Complex numbers

$$\def\Real{\mathbb{R}}\def\Comp{\mathbb{C}}\def\Rat{\mathbb{Q}}\def\Field{\mathbb{F}}\def\Fun{\mathbf{Fun}}\def\e{\mathbf{e}}\def\f{\mathbf{f}}\def\bv{\mathbf{v}}\def\i{\mathbf{i}} \def\eye{\left(\begin{array}{cc}1&0\\0&1\end{array}\right)}$$

Complex numbers are expressions $$z=x+\i y$$, where $$\i$$ is the imaginary unit, defined by $$\i^2=-1$$. Note the ambiguity ($$-\i$$ would work just as well).

Complex numbers can be added subtracted, multiplied the usual way, with the …

## mock final

Here. (Disregard the points for the problems.)final_mock

## week 13

$$\def\Real{\mathbb{R}} \def\Comp{\mathbb{C}} \def\Rat{\mathbb{Q}} \def\Field{\mathbb{F}} \def\Fun{\mathbf{Fun}} \def\e{\mathbf{e}} \def\f{\mathbf{f}} \def\bv{\mathbf{v}}$$

#### Interior point methods

Logarithmic barriers. Central path. Convergence and quality of solution estimates from duality. (Boyd, chapt.11).

#### Ellipsoid method

(Use Boyd’s notes).

#### Sample problems

• Find the central path for the

## week 12

$$\def\Real{\mathbb{R}} \def\Comp{\mathbb{C}} \def\Rat{\mathbb{Q}} \def\Field{\mathbb{F}} \def\Fun{\mathbf{Fun}} \def\e{\mathbf{e}} \def\f{\mathbf{f}} \def\bv{\mathbf{v}}$$


text:
# Tag Info

18

The reason that salts are used is that people tend to choose the same passwords, and not at all randomly. Many used passwords out there are short real words, to make it easy to remember, but this also enables for an attack. As you may know, passwords are generally not stored in cleartext, but rather hashed. If you are unsure of the purpose of a ...

14

"In my system, there are no user names, only passwords." This is the real problem. Using the same value for both identification and authorization is usually a bad idea, for several reasons: Two accounts cannot have the same password. An on-line attacker needs only a single query to determine if any password in the system matches their guess; thus, ...

12

Usually, when the user registers, you will generate a random value to become the salt. Then, in the user database, you store the user's name, salt, and hash generated using the password and salt (and whatever else is relevant for a user table). Note that doing it this way allows each user to have a unique salt. Each user having a unique salt greatly ...

12

If your system already has some other unique user identifier (be it an ID, user-name, or an EmailAddress) is there any effective decrease in your security if you simply use that value as your salt? The salt in a hash actually forms two different purposes. Generally, it is acceptable for a salt to be known, so let us consider H() a hash function, S, some ...

12

A second reason that a hash is usually present in RSA signature schemes (apart from being able to sign long messages) is to prevent existential forgery attacks. These look like this: Assume we have the public key $n$, $e$. Choose some random garbage $s$ (smaller than $n$), and calculate $m = s^e \mod n$ (i.e. "RSA encryption"). If you used "text book RSA ...

9

Looking at the MSDN link given by Tangurena, they use the word salt in this paragraph (and the following ones): To prevent discovery of plain text content by comparing encrypted values (the second attack), most encryption algorithms include a salt value. Specifying a different salt value generates a very different encrypted output. When using the ...

9

In any public key system, you don't encrypt with private key. You encrypt with public key, or sign with private key. If your goal is signing (resp. encrypting) one small value with the RSA private (resp. public) key, keeping the signature small: forget about it, that's not directly possible. Under RSA, a cryptogram is always of size at least comparable to ...

8

Salts must be unique. Randomness (with a "good" random generator) is sufficient to ensure uniqueness. A per-user ID (e.g. the user login name) is not sufficient for uniqueness, because it does not capture some occurrences which do happen in practice: two users on two distinct systems (running the same software) which share the same ID (how many Joes and ...

8

This is not a limitation of the cryptographic functions, like SHA or PBKDF, since the zero byte isn't processed any differently. Since the purpose of a salt is generally to travel alongside a human password, libraries that handle the password as a zero-terminated string might also handle the salt as such a string. Obviously, a 0x00 in the salt would ...

8

Let's get terminology right. If you talk of "unknown s" then s is not a salt; when some piece of data is secret, we call it a key. And your "hash function" is then a MAC. In the context of "password hashing", such things are sometimes called "peppering" (as always, technical terminology is, at its core, a collection of bad puns). If your MAC is correct ...

7

The salt has two main purposes as I understand it. (1) To ensure that two users who choose the same password, get different password hashes. Say the CEO, and the janitor, choose the same password. Without a salt, they'd both get the same hash. This means that an attacker who managed to download the password file, could instantly see that the CEO, and the ...

7

This construction has two advantages over a plain hash of param1||param2: It's immune to length-extensions You can't get collisions of the form param1=A||B param2=C vs. param1=A param2=B||C. But neither of those is relevant to password hashing, so it doesn't offer any advantage there. The construction looks like it's inspired by HMAC:  HMAC(K,m) = ...

7

With the message padding scheme of SHA-2/SHA-256 as it stands (add one 1 bit, a minimal number of 0 bits so that the overall padded message will end on a block boundary, then the original message length over some fixed number of bits), I know no attack enabled by allowing a different IV. However, allowing an arbitrary IV renders ineffective one of the two ...

7

I'd use HKDF's "expand" step to generate multiple keys from one masterkey. Use PBKDF2 to derive that masterkey from the password and salt. i.e. replace the "extract" step of HKDF with PBKDF2. //Extract MasterKey = PBKDF2(salt, password, iterations) //Expand AES-Key = HMAC(MasterKey, "AES-Key" | 0x01) MAC-Key = HMAC(MasterKey, "MAC-Key" | 0x01) (where | ...

7

Identical passwords will still get unique PBKDF2 hashes given a unique salt, regardless of which mechanism you use. I don't think explicitly adding the salt improves the security of this scheme. The designer PBKDF2 have already considered and solved this problem. There is no need for you to try to duplicate their efforts. I think it's safer to use the ...

6

The answer to that depends on the details of your system, and specifically whether someone other than you can modify the hash. If you store the hash in your database, and retrieve the expected hash value from your own database to compare it with the actual hash (when checking to make sure that those certain values have not been altered), there's no point in ...

6

Well, the reason we add salt when hashing passwords is not to make a single hashed password stronger (it doesn't, except in a way I'll explain below), it's to fix up some weaknesses that appear when you have a collection of hashed passwords. If the attacker somehow gets a single hashed password, then adding a salt doesn't really slow the attacker down ...

6

In a scenario such as yours, where there is only one password/passphrase, but it is used as key material for the encryption of multiple CBC encrypted files, you will (as you noted yourself) obviously not make it any harder for an attacker to compute your password, should you use a salt. However, using a salt would mean that the encryption of each file is ...

5

Do I have to store the salt used on the specified password in the database so it knows what to use next time? Yes that is exactly correct. Salts are not secret values but they do need to be randomly selected (without bias) distinct. This is why using dates may require some care: they have low entropy. Dynamic salt doesn't mean the salt is changing ...

5

Looks right to me, assuming you know what the 10 salts are. If you don't know a priori what the salts are (which is typically the case when building a rainbow table), you'd have to compute for the entire salt space. This is where the big gain comes into play as for each additional salt bit, the storage requirement doubles. Thus you get exponential growth ...

5

There is an advantage. Cracking a password from its hash without knowing the salt is extremely difficult, as you're essentially increasing the password length by the length of the salt. If you're storing the hash in such a way that it isn't obvious that it's been salted by the application, the attacker likely won't go looking for it. If the application ...

5

If the hash function is a random oracle, then the salt can go wherever you wish, it will do its job. On the other hand, there is, arguably, no such thing as a random oracle. On an existing, real, tangible hash function, details on how you input things may or may not trigger slight structural weaknesses in the function, which could impair the role of the ...

5

In general you shouldn't mess with standard algorithms/protocols, because of the innumerable ways you can break semantic security, like adaptive chosen ciphertext attacks. Use optimal asymmetric encryption padding if you must roll something yourself.

5

Signing a hash is cheaper than signing the whole document. RSA is relatively costly, and, as long as the hash function is not weak, there isn't any practical difference in security between signing the whole plaintext and signing its hash, because the hash uniquely identifies the plaintext. Wikipedia says: There are several reasons to sign such a hash ...

5

No, it is not better. To send the salt encrypted, one would need a key and IV (another salt) to encrypt it. This adds unnecessary complexity as the security of the ciphertext does not depend on the salt being kept private. So, encrypting the salt adds negligible security yet adds a fair amount of complexity. Keeping things as simple as possible is often a ...

5

Let's try to avoid random per-password salts. If the only requirement for salt is to be unique, which is the case for good password hashing schemes, you'll need: $globalSalt$ is a secret random 32-byte string. $userId_n$ is a unique user identifier. You can use, for example, $HMAC$-$SHA256(globalSalt, userId_i)$ to generate salt for each user $i$. Or, ...

5

Edit: I missed a detail in the original question when writing the below. I compared the effects of including the salt in each iteration to including the password, but the original question asked about including the salt versus only iterating on the previous hash output. Mea culpa. My link to Thomas Pornin's answer to a related question contains an ...

5

Given that SHA-512 is used, there is no practical benefit to iterating hash = sha512(salt + hash) compared to iterating just hash = sha512(hash). For some parameters, it even weakens the scheme by a factor of nearly 2 against the attack that most matters: guessing the password. Let's first justify the weakening. Assume salt is 125 bytes. salt + hash is ...

4

At one past employer, we used some tables substantially like the following: The web app would switch out different algorithms based on which hash algorithm was being used. And if the hash used for a particular customer was now obsolete, they would be required to change their password, and it would update their row in the user table with the new hash. For ...

4

Basically, salting a password means that you compute a hash value which depends on the password and on a salt (a non-secret random value of sufficient length, e.g, 64 bits). Remember that salting a password allows to better resist attacks such as dictionnary attacks or time-memory tradeoffs (e.g., rainbow tables), i.e., attacks involving an offline ...

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

format: plain


text:
# $On \forall\Sigma_1^b$ sentences provable in bounded arithmetic

Presented by:
P Pudlak [Academy of Sciences, Prague]
Date:
Monday 10th April 2006 - 10:00 to 11:00
Venue:
INI Seminar Room 1
Abstract:

We shall give a characterization of \forall\Sigma_1^b sentences provable in theories S_2^i. We shall consider also certain unrestricted versions of the principles that characterize these sentences and prove that they require iterated exponential time. This gives partial evidence that the hierarchy of \forall\Sigma_1^b sentences provable in S_2^i is strictly increasing.

Presentation Material:


text:
# To calculate how many times a certain year repeats itself in the calendar within a given year range

Let's say I have a year $$Y$$. I wanna know how can I calculate the number of times the calendar configuration of the year $$Y$$ repeats itself in the year range $$[A, B]$$.

Is there any method to it without brute force, in a pretty efficient way?

NOTE: I'm talking about the Gregorian Calendar.

• Can you precise what you mean by configuration ? I suppose it is the week day corresponding to each month day. How do you consider leap years ? for instance you want every day of the year to have the same week day or only the 1-1 ? – Optidad Feb 13 '20 at 9:03
• @Optidad By configuration I mean the exact same calendars. For example, consider years 2003, 2014, 2025. The years have the exact same calendar. Leap years are considered to be those years which are divisible by 400, and if it isn't divisible by 400, then it should be divisible by 4 but not divisible by 100. For example, 2400 is a leap year but 2300 isn't. – UrbanCentral Feb 13 '20 at 9:53

Basically, the "configuration" of a year, if I understand well can be described as a state $$Y_i = (D_i, L_i)$$ with $$D_i$$ the weekday of January the $$1^{st}$$ (0 to 6 for monday to sunday) and $$L_i$$ which is 1 if $$Y_i$$ is a leap year and 0 else.

So, comparing the state of 2 years, you can decide wether they have the same configuration.

As a year has 365 days (366 for a leap year) and $$365 \mod 7 = 1$$ (2 for a leap year), there is a simple relation:

$$D_{i+1} = D_i+L_i+1 \mod 7$$

As there is one leap year every four years (without 100-exception), it is interesting to also notice there is a 5-step on weekday every 4 years:

$$D_{i+4} = D_i+5 \mod 7$$

Now, how to not loop on all year ?

Let's consider leap years are all years divisible by 4 without exception. Then, from a starting year $$Y_0$$, we seek the next year with same configuration $$Y_s$$. Let's consider all possibles values of $$M_0 = Y_0 \mod 4$$ :

• $$M_0 = 0$$, then $$Y_0$$ is a leap year, as $$GCD(5, 7) = 1$$, 7 of the 5 steps (28 years) are necessary to reach the same configuration: $$Y_s = Y_0 + 28$$ and $$M_s = 0$$
• $$M_0 = 1$$, then $$Y_s = Y_0 + 6$$ and $$M_s = 3$$
• $$M_0 = 2$$, then $$Y_s = Y_0 + 11$$ and $$M_s = 1$$
• $$M_0 = 3$$, then $$Y_s = Y_0 + 11$$ and $$M_s = 2$$

Thus, if the considered year is a leap year, you have exactly the same configuration every 28 years, else, you have 3 times the same configuration every 28 years. In the latter case, the $$B-A \mod 28$$ reamaining years may be simply considered with above rule.

To consider the 100-exception, you may do the same work adding an extra variable modulo 100 (quite more laborious).

Optidad’s answer is almost perfect, but only if you ignore week numbers.

If the first four days of a year or more fall into the same week, then they are in the first calendar week of the year. But if only one, two, or three of the first days fall into the same week, then they are in the last calendar week of the previous year.

The last calendar week of the previous year is usually the 52nd week. There is an exception if the previous year was a leap year, and it had the first four days in the first calendar week, and the last four says in the last (53rd) calendar week.

So you have fifteen, not fourteen different configurations. If exactly the first three days are in the same calendar week, then you have a different configuration if the previous year was a leap year.

One more complication: The rules what is a “calendar week” and what is the first day of a week are different from country to country. In some countries the week is from Sunday to Saturday, in others it is Monday to Sunday. In the first case the exception is a year starting on Thursday after a leap year, in the second case it is a year starting on Friday. Lucky enough we don’t have consecutive leap years.


text:
# Lesson 2: Simple Comparative Experiments

Lesson 2: Simple Comparative Experiments

## Overview

This lesson should be a review for most students who have the required prerequisites. We included it to focus the course and confirm the basics of understanding the assumptions and underpinnings of estimation and hypothesis testing.

## Objectives

Upon completion of this lesson, you should be able to:

• review basic statistical concepts
• review sample size calculation for two sample problems based on the t-test
• review the difference between two independent samples and paired comparison design
• review the assumptions underlying the t-test and how to test for these assumptions

# 2.1 - Simple Comparative Experiments

2.1 - Simple Comparative Experiments

Simple comparative experiments are not only preliminary to this course but this takes you back probably into your first course in statistics. We will look at both hypothesis testing and estimation and from these perspectives, we will look at sample size determination.

### Two Sample Experiment

Here is an example from the text where there are two formulations for making cement mortar. It is hard to get a sense of the data when looking only at a table of numbers. You get a much better understanding of what it is about when looking at a graphical view of the data.

Dot plots work well to get a sense of the distribution. These work especially well for very small sets of data.

Another graphical tool is the boxplot, useful for small or larger data sets. If you look at the box plot you get a quick snapshot of the distribution of the data.

Remember that the box spans the middle 50% of the data (from the 25th to the 75th percentile) and the whiskers extend as far out as the minimum and maximum of the data, to a maximum of 1.5 times the width of the box, or 1.5 times the Interquartile range. So if the data are normal you would expect to see just the box and whisker with no dots outside. Potential outliers will be displayed as single dots beyond the whiskers.

This example is a case where the two groups are different in terms of the median, which is the horizontal line in the box. One cannot be sure simply by visualizing the data if there is a significant difference between the means of these two groups. However, both the box plots and the dot plot hint at differences.

## Testing: The two sample t-test

For the two-sample t-test, both samples are assumed to come from Normal populations with (possibly different) means $$\mu_i$$ and variances $$\sigma^2$$. When the variances are not equal we will generally try to overcome this by transforming the data. Using a metric where the variation is equal we can use complex ANOVA models, which also assume equal variances. (There is a version of the two sample t-test which can handle different variances, but unfortunately, this does not extend to more complex ANOVA models.) We want to test the hypothesis that the means $$\mu_i$$ are equal.

Our first look at the data above shows that the means are somewhat different but the variances look to be about the same. We estimate the mean and the sample variance using formulas:

$$\bar{y}=\dfrac{\sum\limits_{i=1}^n y_i}{n} \;\;\; \text{and}\;\;\; s^2=\dfrac{\sum\limits_{i=1}^n (y_i-\bar{y})^2}{n-1}$$

We divide by n - 1 so we can get an unbiased estimate of $$\sigma^2$$. These are the summary statistics for the two sample problem. If you know the sample size, n, the sample mean, and the sample standard deviation (or the variance), these three quantities for each of the two groups will be sufficient for performing statistical inference. However, it is dangerous to not look at the data and only look at the summary statistics because these summary statistics do not tell you anything about the shape or distribution of the data or about potential outliers, both things you'd want to know about to determine if the assumptions are satisfied.

The two sample t-test is basically looking at the difference between the sample means relative to the standard deviation of the difference of the sample means. Engineers would express this as a signal to noise ratio for the difference between the two groups.

If the underlying distributions are normal then the z-statistic is the difference between the sample means divided by the true population variance of the sample means. Of course, if we do not know the true variances -- we have to estimate them. We, therefore, use the t-distribution and substitute sample quantities for population quantities, which is something we do frequently in statistics. This ratio is an approximate z-statistic -- Gosset published the exact distribution under the pseudonym "Student" and the test is often called the "Student t" test. If we can assume that the variances are equal, an assumption we will make whenever possible, then we can pool or combine the two sample variances to get the pooled standard deviation shown below.

Our pooled statistic is the pooled standard deviation $$s_p$$ times the square root of the sum of the inverses of the two sample sizes. The t-statistic is a signal-to-noise ratio, a measure of how far apart the means are for determining if they are really different.

Does the data provide evidence that the true means differ? Let's test $$H_0 \colon \mu_1 = \mu_2$$

We will now calculate the test statistic, which is

2-sample t-Test Statistic
$$t=\dfrac{\bar{y}_1-\bar{y}_2}{S_p \sqrt{\dfrac{1}{n_1}+\dfrac{1}{n_2}}}$$

This is always a relative question. Are they different relative to the variation within the groups? Perhaps, they look a bit different. Our t-statistic turns out to be -2.19. If you know the t-distribution, you should then know that this is a borderline value and therefore requires that we examine carefully whether these two samples are really far apart.

We compare the sample t to the distribution with the appropriate d.f.. We typically will calculate just the p-value which is the probability of finding the value at least as extreme as the one in our sample. This is under the assumption of the null hypothesis that our means are equal. The p-value in our example is essentially 0.043 as shown in the Minitab output below.

### Two-Sample T-test and CI:y, Trt

#### Two-sample T for y

Trt N Mean StDev SE Mean
1 10 16.764 0.316 0.10
2 10 17.042 0.248 0.078

Difference = mu(1) - mu(2)

Estimate for difference: -0.278

95% CI for difference: (-0.546, -0.010)

T-Test of difference = 0 (vs not =): T-Value = -2.19 P-Value = 0.043 DF = 17

Normal probability plots look reasonable.

Confidence intervals involve finding an interval, in this case, the interval is about the difference in means. We want to find upper and lower limits that include the true difference in the means with a specified level of confidence, typically we will use 95%.

In the cases where we have a two-sided hypothesis test which rejects the null hypothesis, then the confidence interval will not contain 0. In our example above we can see in the Minitab output that the 95% confidence interval does not include the value 0, the hypothesized value for the difference, when the null hypothesis assumes the two means are equal.

# 2.2 - Sample Size Determination

2.2 - Sample Size Determination

The estimation approach to determining sample size addresses the question: "How accurate do you want your estimate to be?" In this case, we are estimating the difference in means. This approach requires us to specify how large a difference we are interested in detecting, say B for the Bound on the margin of error, and then to specify how certain we want to be that we can detect a difference that large. Recall that when we assume equal sample sizes of n, a confidence interval for $$\mu_1-\mu_2$$ is given by:

$$\left\{\bar{Y}_1-\bar{Y}_2 \pm t(1-\alpha/2;df)\cdot s\cdot \sqrt{\frac{2}{n}}\right\}$$

Where n is the sample size for each group, and df = n + n - 2 = 2(n - 1) and s is the pooled standard deviation. Therefore, we first specify B and then solve this equation:

$$B=t(1-\alpha/2;df)\cdot s\cdot \sqrt{\frac{2}{n}}$$

for n. Therefore,

$$n=\left[t(1-\alpha/2;df)\cdot s\cdot \frac{\sqrt{2}}{B}\right]^2=\left[\dfrac{t^2(1-\alpha/2;df)\cdot s^2\cdot 2}{B^2}\right]$$

Since in practice, we don't know what s will be, prior to collecting the data, we will need a guesstimate of $$\sigma$$ to substitute into this equation.  To do this by hand and we use z rather than t since we don't know the df if we don't know the sample size n - the computer will iteratively update the d.f. as it computes the sample size, giving a slightly larger sample size when n is small.

So we need to have an estimate of $$\sigma^2$$, a desired margin of error bound B, that we want to detect, and a confidence level 1-$$\alpha$$. With this, we can determine the sample size in this comparative type of experiment. We may or may not have direct control over $$\sigma^2$$, but by using different experimental designs we do have some control over this and we will address this later in this course. In most cases, an estimate of $$\sigma^2$$ is needed in order to determine the sample size.

One special extension of this method is when we have a binomial situation. In this case where we are estimating proportions rather than some quantitative mean level, we know that the worst-case variance, p(1-p), is where p (the true proportion) is equal to 0.5 and then we would have an approximate sample size formula that is simpler, namely $$n = 2/B^2 \text{ for } \alpha = 0.05$$.

## Another Two-Sample Example – Paired Samples

In the paired sample situation, we have a group of subjects where each subject has two measurements taken. For example, blood pressure was measured before and after a treatment was administered for five subjects. These are not independent samples, since for each subject, two measurements are taken, which are typically correlated – hence we call this paired data. If we perform a two-sample independent t-test, ignoring the pairing for the moment we lose the benefit of the pairing, and the variability among subjects is part of the error. By using a paired t-test, the analysis is based on the differences (after – before) and thus any variation among subjects is eliminated.

In our Minitab output, we show the example with Blood Pressure on five subjects.

By viewing the output, we see that the different patients' blood pressures seem to vary a lot (standard deviation about 12) but the treatment seems to make a small but consistent difference with each subject. Clearly, we have a nuisance factor involved - the subject - which is causing much of this variation. This is a stereotypical situation where because the observations are correlated and paired and we should do a paired t-test.

These results show that by using a paired design and taking into account the pairing of the data we have reduced the variance. Hence our test gives a more powerful conclusion regarding the significance of the difference in means.

The paired t-test is our first example of a blocking design. In this context, the subject is used as a block, and the results from the paired t-test are identical to what we will find when we analyze this as a Randomize Complete Block Design from lesson 4.

# 2.3 - Determining Power

2.3 - Determining Power

We begin this part by defining the power of a hypothesis test. This also provides another way of determining the sample size. The power is the probability of achieving the desired outcome. What is the desired outcome of a hypothesis test? Usually rejecting the null hypothesis. Therefore, power is the probability of rejecting the null hypothesis when in fact the alternative hypothesis is true.

Decision $$H_0$$ $$H_A$$
Reject Null Hypothesis
Type I Error - $$\alpha$$
OK
Accept Null Hypothesis OK

Type II Error - $$\beta$$

Note!

P(Reject $$\mathbf{H_0}$$ | $$\mathbf{H_0}$$ is true) = $$\alpha$$: P(Type I Error)

P(Accept $$\mathbf{H_0}$$ | $$\mathbf{H_A}$$ is true) = $$\beta$$: P(Type II Error)

Therefore the power of the test is P(Reject $$\mathbf{H_0}$$ | $$\mathbf{H_A}$$ is true) = 1-$$\beta$$.

Before any experiment is conducted you typically want to know how many observations you will need to run. If you are performing a study to test a hypothesis, for instance in the blood pressure example where we are measuring the efficacy of the blood pressure medication, if the drug is effective there should be a difference in the blood pressure before and after the medication. Therefore we want to reject our null hypothesis, and thus we want the power (i.e. the probability of rejecting the $$\mathbf{H_0}$$ when it is false) to be as high as possible.

We will describe an approach to determine the power, based on a set of operating characteristic curves traditionally used in determining power for the t-test. Power depends on the level of the test, $$\alpha$$, the actual true difference in means, and n (the sample size). Figure 2.13 (2.12 in 7th ed) in the text gives the operating characteristic curves where $$\beta$$ is calculated for $$n* = 2n - 1$$ for an $$\alpha = 0.05$$ level test. When you design a study you usually plan for equal sample size, since this gives the highest power in your results. We will look at special cases where you might deviate from this but generally, this is the case.

To use the Figure in the text, we need to first calculate the difference in means measured in numbers of standard deviation, i.e. $$\lvert \mu_1-\mu_2 \rvert / \sigma$$. You can think of this as a signal to noise ratio, i.e. how large or strong is the signal, $$\lvert \mu_1-\mu_2 \rvert$$, in relation to the variation in the measurements, $$\sigma$$ We are not using the symbols in the text, because the 2 editions define d and $$\delta$$ differently. Different software packages or operating characteristic curves may require either $$\lvert \mu_1-\mu_2 \rvert / \sigma$$ or $$\lvert \mu_1-\mu_2 \rvert / 2 \sigma$$ to compute sample sizes or estimate power, so you need to be careful in reading the documentation. Minitab avoids this by asking for $$\lvert \mu_1-\mu_2 \rvert$$ and $$\sigma$$ separately, which seems like a very sensible solution.

Again,

#### Example calculations

Let's consider an example in the two sample situation. We will let $$\alpha = .05, |\mu_1 - \mu_2| = 8$$ (the difference between the two means), and the sigma (assumed true standard deviation) would equal 12, and finally, let the number of observations in each group n = 5.

In this case, $$\lvert \mu_1-\mu_2 \rvert / \sigma = 8/12 = .66$$, and $$n* = 2n - 1 = 9$$.

If you look at the Figure you get approximately a $$\beta$$ of about 0.9. Therefore, power - or the chance of rejecting the null hypothesis prior to doing the experiment is $$1 - \beta$$ or $$1 - 0.9 = 0.1$$ or about ten percent of the time. With such low power we should not even do the experiment!

If we were willing to do a study that would only detect a true difference of, let's say, $$\lvert \mu_1-\mu_2 \rvert = 18$$ then and n* would still equal 9, then figure 2-12 the Figure shows that $$\beta$$ looks to be about .5 and the power or chance of detecting a difference of 18 is also 5. This is still not very satisfactory since we only have a 50/50 chance of detecting a true difference of 18 even if it exists.

Finally, we calculate the power to detect this difference of 18 if we were to use n = 10 observations per group, which gives us $$n* = 19$$. For this case $$\beta = 0.1$$ and thus $$\text{power} = 1- \beta = 0.9$$ or 90%, which is quite satisfactory.

These calculations can also be done in Minitab as shown below. Under the Menu > Stat > Power and Sample Size > 2-sample t, simply input sample sizes, $$n = 10$$, differences $$\delta = 18$$, and standard deviation $$\sigma = 12$$.

Another way to improve power is to use a more efficient procedure - for example, if we have paired observations we could use a paired t-test. For instance, if we used the paired t-test, then we would expect to have a much smaller sigma – perhaps somewhere around 2 rather than 12. So, our signal to noise ratio would be larger because the noise component is smaller. We do pay a small price in doing this because our t-test would now have degrees of freedom $$n - 1$$, instead of $$2n - 2$$.

The take-home message here is:

If you can reduce variance or noise, then you can achieve an incredible savings in the number of observations you have to collect. Therefore the benefit of a good design is to get a lot more power for the same cost or much-decreased cost for the same power.

We now show another approach to calculating power, namely using software tools rather than a graph. Let's take a look at how Minitab handles this below.

You can use these dialog boxes to plug in the values that you have assumed and have Minitab calculate the sample size for a specified power or the power that would result, for a given sample size.

## Try It!

Use the assumptions above, and confirm the calculations of power for these values.

 [1] Link ↥ Has Tooltip/Popover Toggleable Visibility


text:
• 9
• 16
• 15
• 12
• 9

# Interpolating rotation matrices

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

## Recommended Posts

The recent "Why do game programmers use quaternions to rotate a vector?" made me remember a related problem that i had (and unelegantly solved with quaternions IMO) a while ago. It's quite simple, really. Let's say that you have a 3D vector representing a position P, and a 3D vector representing the velocity V at a given time t. Then, to interpolate this position, you simply do:
P' = P + t.V
My question is, what's the equivalent for orientations ? Each "current" orientation at a given time is represented by a rotation matrix M. From the physics engine (i use ODE) i get back an angular velocity represented as a 3D vector W. How do i calculate M', roughly equivalent (bad notation incoming) to this: ?
M' = M + t.W
At the moment, my solution involves converting everything to quaternions, using the slerp operator and converting back to a matrix, but i don't feel it's good... Y.

##### Share on other sites
I'm not quite sure the word "interpolation" is the correct term for this... It's used when you approximate the change of a known state into another -also known- state. What you're asking, is -basically- how you calculate the next orientation from the current one and the angular velocity.
Consider a vector v representing a vertex on a mesh, and the angular velocity for a given frame. Both the vertex's position and the angular velocity are expression of time -in general. To see how the vertex will move, one has to differentiate its position vector with respect to time.

It turns out that the the derivative of this vector must be a vector perpendicular to both the normal vector to the plane of rotation (that one is merely the angular velocity), as well as to the vector v itsself. (Because you want v to actually rotate) and its magnitude is given by the magnitude of the rate of change of the angle it rotates by, with respect to time.

This sums up to the rate of change of the vector v, being ω X v, where ω is the vector of angular velocity, and X denotes the cross product.

The above holds for all vectors in the model, thus it should also hold for its axes too. Since they are the ones that define the model's orientation (through its world/model matrix) one simply has to apply the above to each column vector (or row depending on the convention) of that matrix.

At that point, a specific form of anti-symmetrix matrix is quite often used. It's called the "anti-symmetrix skew" matrix ("cross-product" matrix is usual too), and has the property that given a cross product of vectors: y X v, it creates a matrix Y which yields the exact same result when it transforms v, thus: y X v == Y*v.
That matrix takes a vector y =(y1,y2,y3) and returns the matrix:
[ 0   -y3   y2 ][y3    0   -y1 ][-y2   y1    0 ]
.

It turns out that if you multiply this matrix by another matrix, it performs the effect described above, on each axis-vector in the second matrix. This way, you can differentiate the current orientation, and use the result to integrate it.
E.g. with simple euler integration:
O = O + O'*dt, where O is the orientation matrix, and O'= AntiSymmetricSkewMatrix(angularVelocity)*O.

This way you can keep track of an object's orientation, when you know its angular velocity.

##### Share on other sites
Using quaternions will help deal with drift, matrix-skew issues (you can use the "Star" matrix method as shown by someusername, but should periodically orthogonalize the orientation matrix).

From my vector library:

/*Two methods to update rotation with velocity:(currentVel is in world coordinates).1:Quat4 adr = .5f*mulQuat4BwIs0(currentRot,currentVel);              // Note w is 0.f.currentRot += adr*dt;   // Add derivative.currentRot.normalize();2:flt hdt = .5f*dt;Quat4 rdr(hdt*currentVel.x,hdt*currentVel.y,hdt*currentVel.z,1.f); // Note w is 1.f.currentRot = rdr ^ currentRot; // Rotate by delta transform.currentRot.normalize();*/

The first method is discussed in Baraff's papers. I derived the 2nd method while experimenting with basic quaternion/velocity concepts (which is also well known, though I have not seen the method in a publication). The methods are effectively equivalent (for small time steps, within float error, etc.).

Method 1 above and the "Star-matrix" method are both explained in Baraff's paper. Note that method 1 above is useful for higher order integration methods (RK2, RK4, etc.).

##### Share on other sites
Indeed, quaternions do much better with numerical drift. Especially in -self driven- physical simulations, it will be much longer till one starts noticing visible distortion in the models, when compared to matrices. (if they don't normalize every once in a while)

Also, the method I described is what is often seen in tutorials/papers on physical simulations with matrices; probably because it's the standard approach: "differentiate and then integrate".
However, one doesn't have to integrate the current orientation. In fact, this is where most of the error accumulates.

Just like the 2nd method suggested by John Schultz, the angular velocity can be used directly to create an axis-angle matrix that represents the instantaneous change in orientation. Once you have that matrix, you simply multiply it with the current orientation, to concatenate their effects, just like you do with most matrices.

This way you can limit the error introduced by integration to a minimum; just in the angle of rotation: dt*|ω|. However, an occasional normalization wouldn't hurt either...


text:
# Probability in flipping coins

### Yihui Xie & Lijia Yu / 2017-04-04

This function provides a simulation to the process of flipping coins and computes the frequencies for heads and tails.

If faces is a single integer, say 2, a sequence of integers from 1 to faces will be used to denote the faces of a coin; otherwise this character vector just gives the names of each face.

When the $$i$$-th face shows up, a colored thin rectangle will be added to the corresponding place (the $$i$$-th bar), and there will be corresponding annotations for the number of tosses and frequencies.

The special argument grid is for consideration of a too large number of flipping, in which case if you still draw horizontal lines in these rectangles, the rectangles will be completely covered by these lines, thus we should specify it as NA.

At last the frequency for each face will be computed and shown in the header of the plot – this shall be close to prob if ani.options('nmax') is large enough.

This animation has provided a simulation of flipping coins which might be helpful in understanding the concept of probability.

library(animation)
ani.options(interval = 0.2, nmax = 100)
## a coin would stand on the table?? just kidding :)
flip.coin(faces = c("Head", "Stand", "Tail"), type = "n", prob = c(0.45,
0.1, 0.45), col = c(1, 2, 4))

flip.coin(bg = "yellow")


text:
# Subordination

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

If $T_t$ is a strongly continuous semigroup of contraction operators on a Banach space and $\mu_t$ is a semigroup of sub-probabilistic measures on $[0, \infty)$, then $\tilde{T}_t u = \int_{[0, \infty)} T_r u \mu_t(\mathrm d r)$ defines another semigroup of operators $\tilde{T}_t$, which is said to be subordinate (in the sense of Bochner) to $\tilde{T}_t$.[1]

## Relation to Bernstein functions

For some Bernstein function $f$, $\int_{[0, \infty)} e^{-r z} \mu_t(\mathrm d r) = e^{-t f(z)} .$ Conversely, for any Bernstein function $f$ there exists a semigroup of sub-probabilistic measures $\mu_t$ satisfying the above equality.

## Functional calculus

Let $-L$ and $-\tilde{L}$ be the generators of $T_t$ and $\tilde{T}_t$, respectively. If $f$ is the Bernstein function described above, then it is customary to write $\tilde{L} = f(L)$.

This notation agrees with spectral-theoretic definition of $f(L)$ if the underlying Banach space is a Hilbert space. Furthermore, if $f_1$, $f_2$ are Bernstein functions and $c > 0$, then \begin{align*} c f_1(L) & = (c f_1)(L) , \\ f_1(L) + f_2(L) & = (f_1 + f_2)(L) , \\ f_1(f_2(L)) & = (f_1 \circ f_2)(L) , \end{align*} and if $f_1 f_2$ is also a Bernstein function, then $f_1(L) f_2(L) = (f_1 f_2)(L) .$

Since $z^s$ is a Bernstein function for $s \in (0, 1)$, subordination gives a way to define the fractional power $L^s$ of an operator $L$ on a Banach space, provided that $-L$ generates a strongly continuous semigroup of contractions.

## References

1. Schilling, R. (1998), "Subordination in the sense of Bochner and a related functional calculus", J. Aust. Math. Soc. Ser. A 64: 368–396


text:
Please use this identifier to cite or link to this item: https://hdl.handle.net/11147/5910
 Title: Search for vector-like T quarks decaying to top quarks and Higgs bosons in the all-hadronic channel using jet substructure Authors: CMS CollaborationKarapınar, Güler Keywords: Compact Muon SolenoidLarge Hadron Collider (LHC)Quark Issue Date: Jun-2015 Publisher: Springer Verlag Source: Khachatryan, V., Sirunyan, A.M., Tumasyan, A., Adam, W., Bergauer, T., Dragicevic, M.,...CMS Collaboration (2015). Search for vector-like T quarks decaying to top quarks and Higgs bosons in the all-hadronic channel using jet substructure. Journal of High Energy Physics, 2015(6). doi:10.1007/JHEP06(2015)080 Abstract: A search is performed for a vector-like heavy T quark that is produced in pairs and that decays to a top quark and a Higgs boson. The data analysed correspond to an integrated luminosity of 19.7 fb−1 collected with the CMS detector in proton-proton collisions at s=8$$\sqrt{s}=8$$ TeV. For T quarks with large mass values the top quarks and Higgs bosons can have significant Lorentz boosts, so that their individual decay products often overlap and merge. Methods are applied to resolve the substructure of such merged jets. Upper limits on the production cross section of a T quark with mass between 500 and 1000 GeV/c2 are derived. If the T quark decays exclusively to tH, the observed (expected) lower limit on the mass of the T quark is 745 (773) GeV/c2 at 95% confidence level. For the first time an algorithm is used for tagging boosted Higgs bosons that is based on a combination of jet substructure information and b tagging. URI: http://doi.org/10.1007/JHEP06(2015)080http://hdl.handle.net/11147/5910 ISSN: 1029-8479 Appears in Collections: Mathematics / MatematikScopus İndeksli Yayınlar Koleksiyonu / Scopus Indexed Publications CollectionWoS İndeksli Yayınlar Koleksiyonu / WoS Indexed Publications Collection

###### Files in This Item:
File Description SizeFormat

CORE Recommender

#### SCOPUSTM Citations

20
checked on Mar 18, 2023

#### WEB OF SCIENCETM Citations

39
checked on Mar 18, 2023

#### Page view(s)

56
checked on Mar 20, 2023

114
checked on Mar 20, 2023


text:
Idealist 2 years ago Find the second derivative of f(x)=sinxcosx.

1. inkyvoyd

Well, what's the first derivative?

2. inkyvoyd

use the product rule...

3. saifoo.khan

4. Idealist

The first derivative is (cosx)^2-(sinx)^2. But how do I take the derivative of that?

5. inkyvoyd

well, remember that cos(a+b)=cos a cos b-sin a sin b...

6. hcmathkim

use the chain rule

7. inkyvoyd

in other words, use the double angle formula for to reduce the following expression you have obtained. And then use the chain rule.

8. Sujay

$f'(x)=cosx(\cos(x))+(-\sin(x)\sin(x))$ Product Rule and Derivatives of Trigs Simplify. $f'(x)=\cos ^{2}x-\sin ^{2}x$ $f''(x)=2\cos(x)(-\sin(x))-2\sin(x)(\cos(x))$ Derivative of Trig and Chain Rule

9. hcmathkim

bring the power down, keep the inside, differentiate inside

10. inkyvoyd

Since no one seems to get it USE COS^2 X-SIN^2 X=COS(2x) TO SIMPLIFY EXPRESSION

11. inkyvoyd

simplified expression is dy/dx=cos(2x) then take the dervative of that

12. inkyvoyd

@Idealist are you followign?

13. Idealist

Yes. I got it. Thanks for the help, guys.

14. inkyvoyd

I like medals. LOL but yeah, nice to see :) let me know your final answer so I can check it


text:
Technical Article

# Rapid Power Prototyping Speeds up the Development of Custom High Performance Power Converters

October 19, 2016 by Iain Mosely

## This article discusses the reduction of risk in new system development of rapid prototyping of custom power electronics systems using modular technology.

Development of high-performance power electronic systems is a complex task involving the careful design of many different interdependent subsystems such as power stage, gate drivers, fault protection, digital circuits and embedded software.

## Introduction

Most companies are resource-limited and under increasingly tight product development timescales. In order to lower the barrier to development and adoption of novel power electronic systems, Converter Technology has developed a rapid power prototyping technology platform to significantly reduce the time needed in the early stage of a project to get to first functional prototype.

## Modular Concept

The modular concept shown in Figure 1 allows the first prototype of a new converter to be realised by using custom high-performance power electronic modules. System partitioning of the modules has been chosen carefully to separate the key functionality onto individual PCBs with a common interface. The mechanical arrangement allows a fully functional system ‘stack’ to be built which includes high-performance digital control, advanced gate drive/protection and power devices. This approach can prove out system performance at a very early stage in the project. Availability of early-stage prototype hardware is critical to de-risking overall project plans.

##### Figure 1: Modular Concept

A number of key features have been implemented into the platform from the outset:

• Highly modular architecture to allow for rapid system configuration
• SIC MOSFET based power boards currently support up to 15kW in a single system. Systems can be paralleled to provide higher power levels. Powerboards with other device types are currently under development.
• Custom advanced digitally addressable intelligent gate drive board suitable for driving many device types including MOSFETS, IGBT’s and new wideband gap transistors.
• DC link capability to 800V
• Control board based around high-performance 32-bit Delfino processors. The function and behaviour of the stack is defined in software and allows reconfiguration as the core part of most common isolated and non-isolated topologies including bidirectional two or four quadrant converters. Examples include three-phase AFE/inverter, multiphase buck or boost, resonant converters such as phase-shifted full bridge or LLC and hard-switched converters such as full bridge.
• The control board includes three 12-bit DACs which allow digital values within the control system to be output for display on a scope in real-time to aid system debug and analysis.
• Robust isolated CANBUS communications to ease integration into Labview automated test environment.
• Extensive fault monitoring and protection to allow the power stage to independently look after its own environment if key operating stress levels are exceeded. This protection prevents bugs in software during application development from damaging the power stage.

In addition to early-stage prototyping, the platform acts as a useful tool to aid in-depth learning about how different power topologies operate in practice. Since the behaviour is software-defined, the impact of switching frequency, duty cycle and phase relationship can be easily explored in real-time on real hardware. Closed-loop current or voltage control can be implemented along with custom soft-start algorithms.

### Example Application – HV Synchronous Buck Converter

As an example of the flexible capability of modular technology, a stack was configured to explore the complex factors impacting conversion efficiency in a high voltage synchronous buck converter. The present stack system power board supports three Cree SIC MOSFET half-bridge legs so, for this set of tests, two of the switching legs were disabled and one leg configured to operate as a synchronous buck converter. An external power inductor and capacitor were used to complete the Synchronous buck power stage as shown in Figure 2.

##### Figure 2: Synchronous buck with external inductor and capacitor

In this example, the synchronous buck converter is operated under hard-switching conditions and of particular interest was the behaviour of the power conversion efficiency as a function of both load current and switching frequency. The CANBUS port was used to allow a custom Labview script to vary the power stage switching frequency as part of an automated test.

For the test, the input supply rail was set to 400V,  the demand output set to 300V and efficiency was measured from input to output as a function of load current from 0 to 10A and switching frequency from 20kHz to 180kHz. The ability to automate the data capture allows many data points to be captured in a short timeframe. In the example here, 4000 individual efficiency measurements were taken over the range of load current and switching frequency in a two-hour period. Figure 3 shows the behaviour of the efficiency as a function of the two key variables whilst Figure 4 shows an equivalent contour plot highlighting regions of constant efficiency.

##### Figure 4: Regions of constant efficiency

The actual shape of the surface plot shows an interesting region at lighter load currents where the efficiency peaks and then falls away. Consideration of the operating waveforms indicates that the region corresponds to the point whereby the forced synchronous operation results in a negative inductor current for part of the operating waveform. With bipolar inductor current, each switching transition becomes lossless due to natural commutation of the node voltage during the dead-time. This provides a temporary boost to the efficiency before the reduction in load current dominates the efficiency profile and efficiency falls again. The boundary conduction mode point is a function of switching frequency and load current as shown in equation 1.

"IOUT"=(V_("in")*δ*(1-δ))/(2*"Fs"*L)

Where Vin = Input Voltage (V), δ = duty cycle (p.u.), Fs = Switching Frequency (Hz) and L = Output Inductance (H)

For this particular example, the island of the highest efficiency of 99% occurs towards the maximum load current and at the lower end of the operating frequency range. Performance over the wider range of operating conditions is excellent. Figure 5 shows the clean operating waveforms possible with SiC devices with the switching node voltage shown on Channel 1 (Yellow) and inductor current on Channel 2 (Red).

##### Figure 5: Clean operating waveforms possible with SiC

Overall efficiency of the converter is impacted by all power loss mechanisms and these mechanisms are functions of the particular operating point of the converter. For example, wide bandgap devices such as SIC or GaN have low body capacitance and natively high-performance body diodes with negligible reverse recovery charge. This makes these parts suitable for high-frequency operation since reverse recovery and capacitive losses are minimal. IGBT’s and traditional MOSFETS would most likely show a stronger system level degradation in efficiency at higher frequencies which would change the location of the island of efficiency to a different point in the solution space.

IGBT switching loss is very much higher than MOSFETs and wide bandgap power devices so will tend to have an island of maximum efficiency at much lower frequency. However, at high load currents, the conduction loss of an IGBT can be much lower than that due to the Rdson of a MOSFET. For high current applications, IGBT based converters would show an efficiency plot which may exceed that of other technologies but only if the frequency was low and the demand current high enough to allow the conduction behaviour of the IGBT to dominate the loss mechanisms.

The loss mechanisms in the passives will be dominated by the inductor loss. Core loss and winding loss are strongly dependant on switching frequency and the ratio of DC to AC currents flowing. In general, a given inductor loss profile will reduce as the frequency comes down. However, at a certain point, the increased flux density variation will begin to dominate and the losses will begin to rise. The point of transition will be dependent on many aspects of the inductor design and their impact on overall efficiency will depend on how much other external loss mechanisms change with frequency.

## Conclusions

Rapid prototyping of custom power electronics systems using modular technology can significantly reduce risk in new system development. Furthermore, the flexibility of software-defined function within the modular system allows the system to be re-tasked easily and can form the heart of a useful learning and experimentation platform. Converter Technology has used this approach now with multiple applications including high power LLC systems. Further applications under development using the platform include an Active Front End and multi-phase converters.

The system has proved robust and significantly enhances the productivity of the hardware teams using it.


text:
# Working with Real/Imaginary/Modulus parts of an complex Interpolating Function?

From solving n times a numerical (complex) equation, like:

n = 10;
eq = Range[n];

For[a = 1, a < (n + 1), a++,
eq[[a]] =
NDSolve[{y''[x] + a*y[x] == 0, y[0] == 1 + I, y'[0] == 1 + 0 I},
y, {x, 0, 30}]]

I get the (complex) n solutions in the variable value:

value = Range[n];

For[a = 1, a < (n + 1), a++,
value[[a]] =
With[{exp = Through[({y} /. First[eq[[a]]])[#]]}, exp &]];

Which is a list of 10 complex interpolating functions. I can plot the real and imaginary parts of each element of value with no problem.

Now, I'm interested in working with the squared modulus of value, i.e. its squared real part plus its squared imaginary part. I'm trying to define two new variables as the real and imaginary parts of value:

valuereal = Range[n];
valueim = Range[n];

For[a = 1, a < (n + 1), a++,
valuereal[[a]] =
Re[value[[a]]]];

For[a = 1, a < (n + 1), a++,
valueim[[a]] =
Im[value[[a]]]];

But it seems that I can't plot these new variables (maybe I can't define the real/imaginary parts in this way?). How can I work correctly with the real/imaginary part of value (an complex interpolating function)?

Question: How can work with the real/imaginary parts of an complex Interpolating function?

Note: I tried to work with:

Abs[value[[a]]]

But I had the same problem.

I'd appreciate all kind of answers a lot.

• there is no need to use For. Use Table instead. Something like f[a_] := NDSolve[{y''[x] + a*y[x] == 0, y[0] == 1 + I, y'[0] == 1 + 0 I}, y, {x, 0, 30}]; eq = Table[f[a], {a, 1, n}]; – Nasser Jun 9 '16 at 9:02
• Besides what Nasser already suggested, you should also have a look at this mathematica.stackexchange.com/q/2158/21606 and this mathematica.stackexchange.com/q/7924/21606. – Lukas Jun 9 '16 at 9:06
• Nasser: That was somewhat I already had, but In a (much) simpler (and nicer) form. But my problem still there: how can I name a new variable as the real part of an element of eq? – Guillermo Martínez Somonte Jun 9 '16 at 9:23
• Nasser: what does a stand for? I have to suppose that f(a) is the solution function y(x)? – Guillermo Martínez Somonte Jun 23 '16 at 10:16

Your problem is that you cannot distinguish f[g][x] and f[g[x]]

All your code are in a form like defining com=Im[sol], but when plotting, you plot like com[x] which, after inserting com's definition, becomes Im[sol][x] instead of Im[sol[x]] which will generate the correct result.

So, try use LeftComposition instead of your method.

com=Im@*sol
Plot[com[x],{x,0,1}]

This code will yield desired result.


text:
# Anisotropic and crystalline mean curvature flow of mean-convex sets

created by novaga on 25 Mar 2020
modified on 22 Jan 2021

[BibTeX]

Accepted Paper

Inserted: 25 mar 2020
Last Updated: 22 jan 2021

Journal: Ann. Scuola Normale Sup. Pisa
Year: 2020

ArXiv: 2004.00270 PDF

Abstract:

We consider a variational scheme for the anisotropic (including crystalline) mean curvature flow of sets with strictly positive anisotropic mean curvature. We show that such condition is preserved by the scheme, and we prove the strict convergence in $BV$ of the time-integrated perimeters of the approximating evolutions, extending a recent result of De Philippis and Laux to the anisotropic setting. We also prove uniqueness of the flat flow obtained in the limit.


text:
+0

# 1 minus 32 over 100

-1
46
2

1-32 over 100

Jul 8, 2022

#1
+1105
+10

just solve for the numerator and then you get the answer. I'm not sure if this is a troll post...

1-32= -31

that's your denominator. i hope you can do the rest on your own because it's simple fractions.

Jul 8, 2022
#2
+17
+3

You're obviously trolling. The wording of this question makes it hard to interpret. We don't know if you're asking for

$$\frac{(1-32)}{100}$$, or 1 - $$\frac{32}{100}$$

Besides, this is an incredibly simple problem. It's disappointing that you would try to cheat on basic schoolwork.

Jul 8, 2022


text:
# Show $\lim_{n\rightarrow\infty}(\frac{1}{n^2}-\frac{1}{n})=0$.

Please evaluate my sketch of below proof on scale 1-5 in clarity, conciseness, and validity.

Show $\lim_{n\rightarrow\infty}(\frac{1}{n^2}-\frac{1}{n})=0$, $n\in\mathbb{R}$ using the epsilon-delta limit definition.
Sketch of the Proof:

For simplicity, assume ($\mathbb{R},d$) with $d$, the usual Euclidean metric on $\mathbb{R}$.
Use triangle inequality to break down the inside of limit expression as $\mid\frac{1}{n^2}-0\mid$+$\mid\frac{1}{n}-0\mid$.
Denote $(x_n)=\frac{1}{n^2}$,$(y_n)=\frac{1}{n}$ .
$\forall\frac{\epsilon}{2}>0,\exists N_{1_\epsilon}\in\mathbb{N},\forall n>N_{1_\epsilon}$, $d(x_n,0)<\frac{\epsilon}{2}$, because by Archimedean property, given epsilon, there exists a positive number $\sqrt\frac{1}{2N_{1_\epsilon}}$ where all terms higher than this number is in the open ball centered at 0 with radius epsilon.
Similarly, for $(y_n)$, for a given epsilon, you can find $\frac{1}{2N_{2_\epsilon}}$.
Denote $N^*=max\{N_1,N_2\}+2$.
Then, it follows for all epsilon greater than 0 there exists $N^*$ where for any term higher than $N^*$ the sequence $(x_n+y_n)$ converges to zero. QED.

• 4-5. But why using that technique? ))). – kolobokish Nov 5 '16 at 23:10

Observe $\left|\dfrac{1}{n^2} - \dfrac{1}{n}\right|\le \dfrac{1}{n^2} + \dfrac{1}{n} \le \dfrac{2}{n}$. Thus choose $N \in \mathbb{N}$, such that $N \ge \dfrac{2}{\epsilon}$. So if $n > N$, then $\left|\dfrac{1}{n^2} - \dfrac{1}{n} \right| < \epsilon$, proving the limit is $0$.


text:
# The inverse

The inverse matrix for matrix A has a determinant value of 0.333. What value has a determinant of the matrix A?

Correct result:

d =  3.003

#### Solution:

$d=1/0.333=\dfrac{ 1000 }{ 333 }=3.003$

Our examples were largely sent or created by pupils and students themselves. Therefore, we would be pleased if you could send us any errors you found, spelling mistakes, or rephasing the example. Thank you!

Please write to us with your comment on the math problem or ask something. Thank you for helping each other - students, teachers, parents, and problem authors.

Showing 0 comments:

## Next similar math problems:

• Inverse matrix
Find how many times is the larger determinant is the matrix A, which equals 9 as the determinant of its inverse matrix.
• Inverse matrix
Find out inverse by Gauss elimination or by reduction method. A=[2/3. 1 -3. 1/3]
• The determinant
The determinant of the unit matrix equals 7. Check how many rows the A matrix contains.
• Asymptote
What is the vertical asymptote of ?
• Researchers
Researchers ask 200 families whether or not they were the homeowner and how many cars they had. Their response was homeowner: 14 no car or one car, two or more cars 86, not homeowner: 38 no car or one car, two or more cars 62. What percent of the families
• Expressions 3
If k(x+6)= 4x2 + 20, what is k(10)=?
• Quadratic function 2
Which of the points belong function f:y= 2x2- 3x + 1 : A(-2, 15) B (3,10) C (1,4)
• Derivation
Exists a function whose derivation is the same function?
• Roots
Determine the quadratic equation absolute coefficient q, that the equation has a real double root and the root x calculate: ?
• College 2
College student is moving into a dormitory. The student rent a truck for $19.95 plus$0.99 per mile. Before returning the truck the student fills the tank with gasoline, which cost $65.32. Total cost$144.67. Using a linear equation, explain the process t
• Sequence 3
Write the first 5 members of an arithmetic sequence: a4=-35, a11=-105.
• Median and modus
Radka made 50 throws with a dice. The table saw fit individual dice's wall frequency: Wall Number: 1 2 3 4 5 6 frequency: 8 7 5 11 6 13 Calculate the modus and median of the wall numbers that Radka fell.
• Fish tank
A fish tank at a pet store has 8 zebra fish. In how many different ways can George choose 2 zebra fish to buy?
• Quadratic equation
Find the roots of the quadratic equation: 3x2-4x + (-4) = 0.
• Trinity
How many different triads can be selected from the group 43 students?
• Linsys2
Solve two equations with two unknowns: 400x+120y=147.2 350x+200y=144
• Six terms
Find the first six terms of the sequence a1 = -3, an = 2 * an-1


text:
# Varying R-squared value

I'm new to machine learning, I have been doing a multiple linear regression (with 3 features,1 target). I'm using train_test_split module from sklearn to split the data into training and test data. Each time when I run the model I get different R-square values such as 0.6, 0.7, -0.122, 0.2, 0.9. How can I interpret this varying R-square value for the multiple linear regression? Is this behavior suggesting me to go for a non-linear regression?

• You are doing something wrong. First $R^2$ can't be negative. Second, while there could be some variation in it on re-runs of the model, what you post is not reasonable. But we'd need to know a lot more to be able to tell what you are doing wrong. It could be your N is too small, it could be an error in the code, it could be a problem in how you are splitting the data, and I'm sure there are other posssibilities. – Peter Flom - Reinstate Monica Jul 15 '18 at 16:57
• My data set is too small it contains only 18 rows, Training data size is 14 and test data size is 4. – PreeJackie Jul 15 '18 at 17:05


text:
Image Details

Choose export citation format:

The Bipolar Magnetic Emergence in the Solar Polar Region

• Authors: Chunlan Jin, Guiping Zhou, Yuzong Zhang, and Jingxiu Wang

2020 The Astrophysical Journal Letters 889 L26.

• Provider: AAS Journals

Caption: Figure 5.

Direction distribution of magnetic axis for these BMEs in the southern and northern polar regions. Each arrow starts from the magnetic barycenter of the positive polarity of the corresponding BME. The blue arrows in the top left corner and the red arrows in the bottom left mean the distributions of tilt direction for BMEs in a concentric circle in the corresponding polar region.


text:
Saturday, February 05, 2011

GAGA-1: Voiding the warranty (for great justice!)

Having dug out and insulated the hole for the camera that will fly on GAGA-1 there was one last camera-related task to perform: make sure that it didn't move during the flight.

If you've seen any videos of other high-altitude balloon projects you'll know that there's quite a lot of buffeting of the capsule (especially in the jet stream) and so the camera needs to be fixed in place.

I had been planning to use strong Velcro mounts but after shaking the capsule around it was obvious that the camera was going to move around and the pictures would be spoilt. So, Plan B.

Plan B is a M6 nylon threaded rod that pierces the capsule wall and holds the camera in place with nuts. To do that a suitable 6mm hole needs to be drilled in the camera itself.

I dismantled my spare Canon A560 (the one that's partly broken) to see where I could drill. It was pretty obvious that the safest place was right through the view finder from the front. There are no electronics in the way. The view finder is a self-contained unit with plastic lenses. (A note of caution: the flash in the camera stores a lot of voltage in a small capacitor. Touch it and you'll get a big shock. I found that out the hard way.)

So, I first drilled a guide hole through the camera using a 2mm drill straight through the middle of the view finder lens on the front:

Next I used a 6mm drill to complete the hole. There was a load of debris inside the camera (contained within the view finder housing) that I removed using very thin pliers (it was the mangled guts of the view finder).

Then a quick check that the hole was good by threading through the M6 rod:

And then it was just a matter of making an appropriate hole in the capsule wall and pushing through the rod. To make sure it doesn't move there's a nut and the whole thing is hot glued in place.

And here's the finished mounting. The camera is held snugly in place.

A similar arrangement is used to hold the board containing the computers in place:

In other news, I've ordered one of the final bits that I didn't have: the parachute. It's a 36" parachute from Spherachutes with the balloon option (a point on the top where it can be attached to the line going to the balloon). It weighs just 50g but should slow the capsule for a safe landing.

Since Spherachutes makes them to order I've chosen alternating neon green and black panels. Neon green so that it can easily be seen on the ground, and black to find it in the sky.

Labels:

If you enjoyed this blog post, you might enjoy my travel book for people interested in science and technology: The Geek Atlas. Signed copies of The Geek Atlas are available.

<$BlogCommentBody$>

<$BlogCommentDateTime$> <$BlogCommentDeleteIcon$>

Links to this post:

<$BlogBacklinkControl$> <$BlogBacklinkTitle$> <$BlogBacklinkDeleteIcon$>
<$BlogBacklinkSnippet$>
Create a Link


text:
# Carnival of Mathematics 189

Published by Ganit Charcha | Category - Math Articles | 2021-01-07 05:00:21

We are excited to host 189-th Carnival of Mathematics for January 2021. Carnival of Mathematics is a monthly blogging round up that is organised by The Aperiodical. We choose to host Carnivals in December / January because 22nd of December is celebrated as National Mathematics Day of India. Indian legendary Mathematician Srinivasa Ramanujan was born on 22nd December 1887. In order to recognize his immense contribution towards Mathematics the Government of India has declared Ramanujan's birthday to be celebrated every year as the National Mathematics Day of India. That is why we celebrate Carnival of Mathematics during December/January and we are doing it for last six consecutive years including this one.Earlier versions that we have celebrated are 129th, 141th, 153rd, 165th, 176th/177th.

We start by writing an interesting property of the integer 189. 189 can be written as sum of two cubes in 2 ways and they are $4^{3} + 5^{3}$ and $6^{3} + (-3)^{3}$. There are two types of numbers which we can think of after seeing this and they are TaxiCab and CabTaxi numbers. $TaxiCab(n)$ is defined as the smallest number which can be expressed as sum of cubes of $2$ distinct positive integers in $n$ different ways. $CabTaxi(n)$ is defined as the smallest number which can be expressed as sum of cubes of $2$ distinct integers (positive or negative) in $n$ different ways. We must mention here that 189 is not a CabTaxi number, because CabTaxi(2) is 91. We should also mention that TaxiCab(2) is 1729. Interested readers who want to know little more about these numbers can refer 'A Short Note on TaxiCab and CabTaxi Numbers'.

Kartik has shared with us a beautiful thought-provoking post titled Public Time and the Privacy of Time where he has described how the math behind interference patterns can let one tune guitars just by watching the strings vibrate!

Peter Lynch has provided us with a light hearted, aesthetic post titled Decorating Christmas Trees with the Four Colour Theorem which has got seasonal application of the four colour theorem.

A very interesting post titled Pen-and-Paper Arithmetic Is Useful When You're Selling Textiles has been forwarded to us by the author of the post Virginia Postrel.

Sam Hartburn has shared with us a beautiful post titled Swirled Series: The Result  which exhibits a wonderful example of collaborative mathematical art. The post was written by Craig S. Kaplan.

On a lighter note, we would like to share the post titled Playing Cards – Extraordinary Ordinary Things which attempts to justify why playing cards is an ''Extraordinary Ordinary Things''.

Abhik Jain has forwarded us with a nice post written by John Pavlus titled Super Slow Computer Programs Reveal Math's Fundamental Limits which illuminates on some connections of “busy beavers” game with mathematics and the recent advances on the topic. In 1962, hungarian mathematician Tibor Radó asked the question “How long can a simple computer program possibly run before it terminates?” which was popularly known as “busy beavers” game.

We have been shared by Katie Steckles a nice post titled Menger-Sierpinski which is very illuminative and can help us to know surprising findings of the fractals Menger Sponge and Sierpinski Carpet.

We have found out a illuminating preprint titled COVID-19: Risks of Re-emergence, Re-infection, and Control Measures – A Long Term Modeling Study which has tried to modify SIER model to assess the risks of re-emergence and re-infection of Covid-19 on a long term perspective.

A class VII student, Priyadarshini Mukhopadhyay, of a Kolkata based school has shared with us some hand drawn beautiful images of Sierpinski Triange and Sierpinski Square. We appreciate her efforts and as per her this is a nice activity to do at liesure time.

With this we end the 189th version of Carnival of Mathematics. Next version of Carnival will be hosted by

comments powered by Disqus

## Subscribe GanitCharcha

Enter your email address:

Delivered by FeedBurner


text:
# The behavior of an ionized gas in an electric field

Say, I have a gas and then I ionize it (provide enough energy for the electrons to escape the nucleus' potential).And there exists, a SLIGHTLY positively charged surface beside the gas. Now, will the electrons just hit the surface with no additional energy requirement, or will the gas act like a plasma and electrons need additional energy to part themselves from the plasma and hit the surface? And how charged is the surface supposed to be to do this.

The mechanical forces holding the charged surface ruin the plasma approximation (i.e., quasi-neutrality). Since the charged surface cannot physically move, the ions and electrons cannot modify it or the charge distribution on the surface using long-range (i.e., Coulomb potentials) interactions. In the absence of pre-existing magnetic field the Lorentz force reduces to just $\mathbf{F} = q \ \mathbf{E}$. Thus, initially the electrons would move toward the charge sheet and the ions away. If the electrons were numerous enough and slowly impacted the surface (i.e., slow enough to not eject more charged particles), the electrons could eventually reduce the charge on the sheet. I do not think the sheet would ever reach zero net charge though because as the ions move away, they will start to generate a charge imbalance of their own. This will lead to another electric field that will attempt to drag electrons away from the charged surface. The system would eventually reach an equilibrium state.