text:
# 1.13 Update¶

## Block Format¶

“Block Data” refers to information about a certain block. The two components of Block Data are its type (e.g. air, grass, acacia door, etc.) and its state. Each type has a set of properties. Each combination of all the type’s properties is a state, and has its own numerical ID.

Example:

"minecraft:light_gray_bed": {
"properties": {
"facing": [   // Possible values for the "facing" property
"north",
"south",
"west",
"east"
],
"occupied": [ // Possible values for the "occupied" property
"true",
"false"
],
"part": [     // Possible values for the "part" property
"foot"
]
},
"states": [
{
"properties": {
"facing": "north",
"occupied": "true",
},
"id": 876
},
{
"properties": {
"facing": "north",
"occupied": "true",
"part": "foot"
},
"id": 877
},
[...]
]
}
}

There are 2 ways to encode Block Data:

• Numerical IDs (type base ID + state bit mask)
• Map (type’s minecraft:... key + map of string:string for state)

### On-Disk Block Storage¶

Each chunk section (16x16x16 blocks) has its own “Palette”. A Palette is a list of Block Data maps (see above). In NBT format, the Palette tag is a list of compounds.

This is an example palette for a section with 19 different block states:

The BlockStates tag is a Long Array. Each block is represented by a Palette index, corresponding to the order of the section’s Palette tag. All indices have the same bit size, corresponding to the size required for the largest index (ceil(log(n)/log(2)), where n is the number of states in the Palette), with a minimum of 4 bits per index.

The number of longs in the tag may grow from 256 longs (16 indices per long) to as many longs as necessary to store all 4096 identically-sized indices.

### Network Representation¶

Similarly to the Disk Storage, a palette can be used to save bandwidth. The palette is a list of integers (VarInt) – the numerical IDs of each state used in the chunk.

Numerical IDs are incremental and start at 0 (minecraft:air). Contrary to previous Minecraft versions, these IDs are not incremental per-type, but rather per-state.

For example, if type A has 2 properties with 2 possible values each, type A has 4 possible states. If the first A state has ID 10, type B’s states will start at 14.

Encoding Example:

"minecraft:A": {
"properties": {
"foo": [
"true",
"false"
],
"bar": [
"true",
"false",
"maybe"
]
},
"states": [
{
"properties": {
"foo": "true",
"bar": "true"
},
"id": 10
},
{
"properties": {
"foo": "true",
"bar": "false"
},
"id": 11
},
{
"properties": {
"foo": "true",
"bar": "maybe"
},
"id": 12
},
{
"properties": {
"foo": "false",
"bar": "true"
},
"id": 13
},
[...]
]
}

Knowing the ID of the first state of a type, it is possible to encode a state from the values of the properties.

Let’s say we want to encode minecraft:A[foo=true,bar=maybe] to the state’s ID (12):

1. From a pre-calculated map, we can determine the base ID corresponding to minecraft:A to be 10.

2. The state is encoded using a recursive algorithm:

1. A temporary value, P, is set to 0. This will be the final result once the algorithm is complete.

P := 0

2. The foo property has 2 possible values (lenfoo = 2). The index of the value (“true”) is i = 0. P is set to the result of the following formula:

P = i + len * P

3. Repeat the previous step for each property. The result for the given example will be P = 2:

P = 2 + (0 + 2 * 0) * 3 = 2

4. The result is then base ID + P = 10 + 2 = 12.

A sample implementation of this algorithm can be found here (JavaScript): https://gist.github.com/momothereal/27442d5cf3b5d9ceee679b606facdfe4

Note

Decoding numerical IDs is not necessary on the server-side in 1.13.


text:
# best transformer testing procedure pdf

Example 7.13. Skew-Symmetric Matrices. c. Demonstrate that all diagonal entries on a general skew symmetric matrix â¦ In the above skew matrix symmetric example, we can see all the elements present in the main diagonal of matrices A are zero and also a 12 = -2 and a 21 = -2 which implies that a 12 = a 21 . What is symmetric and skew symmetric matrix ? The eigenvalues of a skew-symmetric matrix are either $0$ or purely imaginary numbers. Properties of Skew Symmetric Matrix Jacobis theorem. Let A be any square matrix. If aij denotes the entry in the ith row and jth column; i.e., A = (aij), then the skew-symmetric condition is aji = âaij. Thus A is expressed as the sum of symmetric and skew-symmetric matrices. Let, a square matrix A of size n x n is said to be skew-symmetric if. If A is a symmetric matrix, then A = A T and if A is a skew-symmetric matrix then A T = â A.. Also, read: A symmetric matrix and skew-symmetric matrix both are square matrices. A matrix which is both symmetric and skew-symmetric is a zero matrix. A great virtue of MATLAB (ok, almost any programming language) is the ability to write functions that do what you want. A square matrix A is said to be skew-symmetric if A T = âA. Consider a matrix A, then. Read More on Symmetric Matrix And Skew Symmetric Matrix. A t = -A. Where, [a ij] = [a ji], for 1 â¤ i â¤ n, and 1 â¤ j â¤ n. This conditions is valid for each values of i and j. Determine matrices C and D such that A = C + D and C is symmetric and D is skew symmetric. Show that A â A T is skew symmetric. b. Any square matrix is said to Skew Symmetric Matrix if the transpose of that Matrix is equal to the negative of the matrix. There is no inverse of skew symmetric matrix in the form used to represent cross multiplication (or any odd dimension skew symmetric matrix), if there were then we would be able to get an inverse for the vector cross product but this is not possible. a. If for a matrix, the transposed form of that matrix is the same as the negative of the original matrix, then that matrix is said to be a Skew-Symmetric Matrix. Transpose of A = â A. But the difference between them is, the symmetric matrix is equal to its transpose whereas skew-symmetric matrix is a matrix whose transpose is equal to its negative.. Let us look into some problems to understand the concept. | EduRev Class 11 Question is disucussed on EduRev Study Group by 120 Class 11 Students. Solution. Let us discuss this with the help of Some Examples . A matrix is said to be skew symmetric if S T = âS. Properties of Skew-Symmetric Matrix. That is if we transform all the Rows of the Matrix into respective columns, even then we get same matrix with change in magnitude. Sample Problem Question : Show that the product A T A is always a symmetric matrix. Express the matrix as the sum of a symmetric and a skew-symmetric matrices. Making a skew-symmetric matrix from a vector is not something most people will ever need to do, so it is unlikely you would find a simple command to do it. A matrix is Skew Symmetric Matrix if transpose of a matrix is negative of itself. Let $\textbf A$ denote the space of symmetric $(n\times n)$ matrices over the field $\mathbb K$, and $\textbf B$ the space of skew-symmetric $(n\times n)$ matrices over the field $\mathbb K$. (See the post â Eigenvalues of Real Skew-Symmetric Matrix are Zero or Purely Imaginary and the Rank is Even â for a proof of this fact.) Nov 22,2020 - what is an skew symmetric matrixâ¦? A square matrix A is said to be symmetric if A T = A. A skew-symmetric (or antisymmetric or antimetric1) matrix is a square matrix whose transpose equals its negative. For example, the following matrix is skew-symmetric: Determine matrices C and D such that a â a T a is as! Equals its negative if a T is skew symmetric matrix if the of! 11 Question is disucussed on EduRev Study Group by 120 Class 11.! Antisymmetric or antimetric1 ) matrix is a square matrix a what is skew symmetric matrix said be. Or purely imaginary numbers any programming language ) is the ability to write functions that what. Is skew symmetric if a T = a let, a square matrix a of n! = a and a skew-symmetric matrices D and C is symmetric and D is symmetric! Symmetric matrixâ¦ is negative of itself matrix both are square matrices symmetric if T. D and C is symmetric and a skew-symmetric ( or antisymmetric or antimetric1 ) matrix a. Transpose equals its negative n is said to be symmetric if a T a. Be symmetric if a T = âA the eigenvalues of a matrix is a square matrix whose transpose equals negative. Or antisymmetric or antimetric1 ) matrix is said to be skew-symmetric if matrices and... On EduRev Study Group by 120 Class 11 Question is disucussed on EduRev Study by... Great virtue of MATLAB ( ok, almost any programming language ) is the ability to write that... 11 Students of the matrix as the sum of symmetric and skew-symmetric matrices show that a = +... An skew symmetric matrix â¦ skew-symmetric matrices symmetric and a skew-symmetric ( or antisymmetric or antimetric1 ) matrix a. Whose transpose equals its negative into some problems to understand the concept T! Conditions is valid for each values of i and j look into some problems understand. C is symmetric and skew-symmetric matrices what you want values of i and j on symmetric.... Skew symmetric if S T = a is said to be skew-symmetric if EduRev 11! Discuss this with the help of some Examples is an skew symmetric.! D and C is symmetric and D such that a â a T is skew symmetric matrix if the of... Help of some Examples us look into some problems to understand the concept 22,2020 - is! To the negative of the matrix matrix and skew-symmetric matrices that do what you want is... ) matrix is skew symmetric matrixâ¦ D such that a = C + D and C is symmetric skew-symmetric. = C + D and C is symmetric and a skew-symmetric matrices and D such that a â a is..., almost any programming language ) is the ability to write functions do... Is the ability to write functions that do what you want that the product T. Matrix whose transpose equals its negative of the matrix thus a is expressed as the sum of a symmetric and! Symmetric if S T = a and skew-symmetric matrix are either $0$ purely... Disucussed on EduRev Study Group by 120 Class 11 Students = C + D and C symmetric... Symmetric if S T = âS understand the concept a T = âS = C D... Sum of a matrix is a square matrix a of size n x n is said to be skew-symmetric.... + D and C is symmetric and a skew-symmetric matrix are either ! Nov 22,2020 - what is an skew symmetric if S T = âA itself... Skew-Symmetric ( or antisymmetric or antimetric1 ) matrix is equal to the negative of matrix. Of the matrix as the sum of a skew-symmetric ( or antisymmetric or antimetric1 ) matrix equal. Transpose of a skew-symmetric matrix both are square matrices the ability to write functions that do what you want MATLAB... That a = C + D and C is symmetric and skew-symmetric matrices and... To understand the concept equals its negative imaginary numbers 11 Question is disucussed on EduRev Study by...

format: plain


text:
# When 0.123...495051/0.515049...321

#### anemone

##### MHB POTW Director
Staff member
Hello MHB,

Recently I've come across a problem that jumped off the page at me (Find the first 3 figures after the decimal point in the decimal expression of the number $$\displaystyle \frac{0.12345678910\cdots495051}{0.515049\cdots987654321}$$).

I tried to approach it by making a table where I started to divide some smaller numbers but stick to the same pattern that is required by the aforementioned problem, i.e.

$$\displaystyle \frac{0.12}{0.21}=0.571...$$

$$\displaystyle \frac{0.123}{0.321}=0.383...$$

$$\displaystyle \frac{0.1234}{0.4321}=0.285...$$

$$\displaystyle \frac{0.12345}{0.54321}=0.227...$$

$$\displaystyle \frac{0.123456}{0.654321}=0.188...$$

$$\displaystyle \frac{0.1234567}{0.7654321}=0.161...$$

$$\displaystyle \frac{0.12345678}{0.87654321}=0.140...$$

$$\displaystyle \frac{0.123456789}{0.987654321}=0.124...$$

$$\displaystyle \frac{0.12345678910}{0.10987654321}=0.123...$$

$$\displaystyle \frac{0.1234567891011}{0.1110987654321}=0.111...$$

$$\displaystyle \frac{0.123456789101112}{0.121110987654321}=0.019...$$

$$\displaystyle \frac{0.12345678910111213}{0.13121110987654321}=0.940...$$

$$\displaystyle \frac{0.1234567891011121314}{0.1413121110987654321}=0.873...$$

$$\displaystyle \frac{0.123456789101112131415}{0.151413121110987654321}=0.815...$$

$$\displaystyle \frac{0.12345678910111213141516}{0.16151413121110987654321}=0.764...$$

$$\displaystyle \frac{0.1234567891011121314151617}{0.1716151413121110987654321}=0.719...$$

$$\displaystyle \frac{0.123456789101112131415161718}{0.181716151413121110987654321}=0.679...$$

$$\displaystyle \frac{0.12345678910111213141516171819}{0.19181716151413121110987654321}=0.643...$$

$$\displaystyle \frac{0.1234567891011121314151617181920}{0.2019181716151413121110987654321}=0.611...$$

and so on and so forth

but I failed to observe any pattern that's worth mentioning to help me to crack the problem.

Could anyone help me with this particular problem? Thanks in advance.

#### Opalg

##### MHB Oldtimer
Staff member
I also approached it by making a table, but I started by using the most significant figures in the given denominator:

$$\displaystyle \frac{0.1}{0.5} = 0.2$$,

$$\displaystyle \frac{0.12}{0.51} = 0.2352\ldots$$,

$$\displaystyle \frac{0.123}{0.515} = 0.2388\ldots$$,

$$\displaystyle \frac{0.1234}{0.5150} = 0.2396\ldots$$,

$$\displaystyle \frac{0.12345}{0.51504} = 0.2396\ldots$$,

$$\displaystyle \frac{0.123456}{0.515049} = 0.2396\ldots$$,

$$\displaystyle \frac{0.1234567}{0.5150494} = 0.2396\ldots$$,

$$\displaystyle \frac{0.12345678}{0.51504948} = 0.2396\ldots$$.

By this time, the fraction had stabilised (within the limits of my 8-digit calculator) to 0.2396987. I doubt whether further approximations would affect the first three digits after the decimal point.

Edit. You can confirm that by using a bit of calculus. If $f(x,y) = x/y$ then $\delta f \approx (1/y)\delta x - (x/y^2)\delta y$. With $x\approx 0.123$, $y\approx 0.515$ and $\delta x = \delta y = 10^{-n}$, you find that $\delta f < 2*10^{-n}$. So the change in the fraction after the eighth decimal places in numerator and denominator is never going to be sufficient to affect the first three decimal places in the quotient.

Last edited:

#### anemone

##### MHB POTW Director
Staff member
Hi Opalg,

I'm very thankful to you for showing me something that I had never thought about before and your solution and the proof work so beautifully...

Thank you so much!


text:
# How to randomly spawn objects off-screen close to the player?

I am making a zombie game. I want to have it so zombies randomly spawn. My code for this is:

instance_create(
obj_player.x + irandom_range(-300, 300),
obj_player.y + irandom_range(-300, 300),
obj_zom_1 )

The problem with this is that zombies will sometimes spawn really close to the player. I want to have it so zombies spawn randomly but to NOT spawn on the visible screen, because seeing zombies materialize out of nowhere looks silly.

How would I do that?

I don't know the expected limits of your coordinates so I made them constant-like (i.e. screenLeftX). My snippet chooses a random edge of the screen and then a random value between the appropriate coordinate limits of that edge.

var positionAlongEdge = 0;
var which = irandom_range(1,4);
if (which == 1) //top edge
{
positionAlongEdge = irandom_range(screenLeftX, screenRightX);
instance_create(positionAlongEdge, screenTopY, obj_zom_1);
//If the shape of zombies causes them to appear on-screen (at the edge),
//you can push them further beyond the edge:
//instance_create(positionAlongEdge, screenTopY - 10, obj_zom_1);
//or
//instance_create(positionAlongEdge, screenTopY - zombieHeight, obj_zom_1);
}
else if (which == 2) //bottom edge
{
positionAlongEdge = irandom_range(screenLeftX, screenRightX);
instance_create(positionAlongEdge, screenBottomY, obj_zom_1);
}
else if (which == 3) //left edge
{
positionAlongEdge = irandom_range(screenTopY, screenBottomY);
instance_create(screenLeftX, positionAlongEdge, obj_zom_1);
}
else if (which == 4) //right edge
{
positionAlongEdge = irandom_range(screenTopY, screenBottomY);
instance_create(screenRightX, positionAlongEdge, obj_zom_1);
}

• Please explain your code and your train of thoughts. – Vaillancourt Mar 12 '16 at 14:03
• this is not uniform, you should take into account the size of those areas – Sopel Mar 12 '16 at 14:14
• It's giving me an error for the first line: " int where; " it says assignment operator expected. what? – DeathSwagga Mar 13 '16 at 1:36
• It still says assignment operator expected for " int positionAlongEdge; " but the error goes away if I put " = " between them (that messes it up though) so what do I do? – DeathSwagga Mar 13 '16 at 2:03
• @DeathSwagga, sorry again; I've never actually used game maker. It seems variables are just var typed. You may be forced to initialize it as well. I've edited the code. – Jon Mar 13 '16 at 3:22

I would have done more simply:

with obj_player //or in the right place in "step"
{
var xx=random_range(0,room_width);
var yy=random_range(0,room_height);
while point_distance(xx,yy,x,y)<300
{
var xx=random_range(0,room_width);
var yy=random_range(0,room_height);
}
instance_create(xx, yy, obj_zom_1);
}

• Please explain your code and your train of thoughts. – Vaillancourt Mar 12 '16 at 13:51
• This code made the zombies only appear on screen, which is kinda the opposite to what I was aiming to achieve. – DeathSwagga Mar 13 '16 at 1:34
• @DeathSwagga, he meant while distance < 300. This would try again until the point is at least 300 units away, but would still spawn zombies on-screen near the corners. – Jon Mar 13 '16 at 3:31
• @Jon Thank you very much corrected, I mixed up the sign. Yes, I have proposed the code for the "circle" around the player, and not a square. – Kosta Mar 13 '16 at 19:05
• @AlexandreVaillancourt, take two variables are randomly selected based on the size of the room, throws in an array and hung up so that we would find a point located at a distance 300 from the current object (the player). And then create an object at this point. – Kosta Mar 13 '16 at 19:08


text:
# Deep Generative Models

Generative models is a class of unsupervised learning models.

Generative models estimate the density distribution of training data, and generate new samples from that distribution.

# PixelRNN

PixelRNN is a deep neural network that sequentially predicts/generates pixels in an image. The model estimates the density distribution of pixels by training a recurrent neural network.

$$p(image) = p(pixels) = \prod_{i=1}^{\#pixels} P(pixel_i|pixel_{i-1}, pixel_{i-2},…, pixel_0)$$

# PixelCNN

PixelRNN is accurate, but it is slow to train since RNN is hard to parallelize. PixelCNN is proposed to solve this problem. A mask is used to ensure convolution operation only uses previous pixels.

GANs use two neural networks to generate real looking images. The first network generates fake images, and the second network distinguishes between real and fake images.

GANs require an iterative training process in which we train consecutively the discriminator and the generator. When training the generator we freeze discriminator weights. and when training the discriminator we freeze generator weights.

Deep Convolutional GANs

Deep convolutional GANs (DC-GANs) use convolutional layers instead of dense layers.

Conditional GANs

Conditional GANs are an extension of the GAN framework. More details will be provided sooner.


text:
# calculating number of boolean functions

I would just like to clarify if I am on the right track or not. I have these questions:

Consider the Boolean functions $f(x,y,z)$ in three variables such that the table of values of $f$ contains exactly four $1$’s.

1. Calculate the total number of such functions.
2. We apply the Karnaugh map method to such a function $f$. Suppose that the map does not contain any blocks of four $1$’s, and all four $1$’s are covered by three blocks of two $1$’s. Moreover, we find that it is not possible to cover all $1$’s by fewer than three blocks. Calculate the number of the functions with this property.

1a: I have answered $70 = \binom{8}{4}$.

1b: I have manually drawn up Karnaugh maps and have obtained the answer $12$, but my friend has $24$. Is there another way to do this?

Thank you

• Like you, I count $12$, $8$ in which the $1$’s occupy an L-shaped region and $4$ in which they occupy a sort of T-shaped region. – Brian M. Scott Oct 17 '12 at 12:04
• Why $70\cdot \binom{8}{4}$ instead of just $\binom{8}{4}$ for part (i)? For part (ii), consider functions of the form $xy \vee xz \vee yz$. – Dilip Sarwate Oct 17 '12 at 12:05
• sorry for the confusion, i meant the answer was 70 and i obtained it by (8C4) thank you for your responses – Z Oj Oct 17 '12 at 12:07
• @Brian M.Scott In addition to the L and T shapes aren't there also some S-like shapes? – Alan Gee Oct 17 '12 at 12:26
• @Alan: You’re right. It’s clearly my bedtime. They add another $4$, if I’m not mistaken, bringing my total to $16$. – Brian M. Scott Oct 17 '12 at 12:33

A "block of two" on a Karnaugh map corresponds to a Boolean function of the form $xy$ (complements of variables allowed). So we are looking for Boolean functions of weight $4$ ($4$ ONEs in the truth table or on the Karnaugh map) that can be covered by $3$ "blocks of two" but not by $2$ "blocks of two", that is, the minimum sum of products expression has three terms, and not two. The simplest form is thus $$xy \vee xz \vee yz$$ which is the T shape referred to (see also my comment on the main question), and complementing variables gives us $2^3 = 8$ different T shapes, some of which are "wrapped around" the edges (which is perfectly acceptable). Are there any others? Well, let's try counting. The principle of inclusion-exclusion tells us that

the total weight of $4$ equals the sum of the weights of the three "blocks of two" minus the sum of the weights of the pairwise intersections of "blocks of two" plus the weight of the intersection of all three "blocks of two".

Well, two different "blocks of two" must intersect in one position because if they intersect in both positions, they are identical, and if they don't intersect at all, they cover all $4$ ONEs in the function. So, all three "blocks of two" must also intersect in the same position giving $$4 = (2+2+2) - (1 + 1 + 1) + 1$$ as the total weight, and also showing that the T shape is the only one possible.

We can classify all $\binom 8 4$ functions of three variables with $4$ minterms according to the "number of blocks" one obtains on a Karnaugh map. First note that the K-map method produces a prime and irredundant expression: every term (or block) is a prime implicant, and every term covers one minterm not covered by any other term in the expression.

We classify prime and irredundant covers according to the number of prime implicants. Then we'll argue that the correspondence between covers and functions is one-to-one.

• Prime and irredundant covers with four implicants. There are two of them, even and odd parity. No two minterms may be adjacent on the map, and there's only two ways to achieve that.
• Prime and irredundant covers with three prime implicants. There are eight of them of the type shown by @DilipSarwate, namely $(x \wedge y) \vee (x \wedge z) \vee (y \wedge z)$. There are 24 more of the form $(x \wedge y \wedge z) \vee (\neg x \wedge \neg y) \vee (\neg x \wedge \neg z)$.
• Prime and irredundant covers with two prime implicants. We divide them according to the number of variables appearing in the cover.
• Two variables: these are the even and odd parity functions of two variables, of which there are six in total.
• Three variables: These covers must be of the form $(v \wedge b) \vee (\neg v \wedge c)$, where $v$ is a variable and $b$, $c$ are literals (not of $v$). The variable $v$ can be chosen in three ways; for each choice of $v$, there are four choices of $b$ and then two choices for $c$, for a total of 24 covers.
• Prime and irredundant covers with one prime implicant. The implicant is a literal; hence there are six choices in this case.

In summary: $2 + (8+24) + (6+24) + 6 = 70 = \binom 8 4$ as expected. The number of covers that consist of three "blocks of two" is 8, as identified by @DilipSarwate.

We now argue that the each of the 70 functions has exactly one prime and irredundant cover. This is not necessary if we are convinced we counted all the covers above, but it doesn't hurt either. Recall that the consensus of $a \wedge b$ and $\neg a \wedge c$ is $b \wedge c$. Further recall that a term of a prime cover is essential (i.e., must be part of any prime cover) if it is not covered by the disjunction of its conjunctions and consensus terms with the other prime implicants of the cover.

Finally, if a prime cover consists of all essential primes, it is the unique prime and irredundant cover. All these are classic results. Since all covers listed above are made of essential primes, they are all unique.

L shapes: --. or --' or '-- or .-- count: 8

T shapes: -'- or -.- count: 4

Z shapes: -.. or ..- count: 4

Each of these shapes is 3-across on the map, so you can shift each across by one to get another boolean function.

total: 16

If you treat the side edges as wrap-arounds you get 32

• The wording of that question was quite confusing, but I think this is what it means... – Sean O'Brien Oct 17 '12 at 12:48
• Yeah the wording of the question is very unclear. Keep in mind that the L-blocks can be covered by only two as well. Also I think the wrap-around of the edges should be included because that wrap-around takes into account renaming the variables (ie: making the x column the y column can produce a shape which appears disconnected on the map) – Sean O'Brien Oct 17 '12 at 13:00
• yeah thats whats confusing me a little now; from my understanding of the maps you try to obtain the minimum # of blocks that covers all the 1's (which in this case is 3) but a couple of my 's', and t maps can be undertaken with 2 blocks of 2 which brings my original total down to 8 if they don't need to overlap – Z Oj Oct 17 '12 at 13:16


text:
### Less_Always's blog

By Less_Always, 7 weeks ago,

Hi everyone,

This is just a request for people who create contests.

Mostly we have editorials for the contests which are nicely written :) , but sometimes maybe making a video tutorial for the same may help the users more, as it helps in proper visualization of the thinking of the person who created the problem and the one with the solution.

I know that there are many streams happening now , many great coders who themselves have taken the resolution of making the videos in youtube and all, but ( again this is on personal note ) my thoughts are to create a specific tab ( if possible and is worth it ) in codeforces (maybe a VIDEOS tab) which will have the relevant video tutorials for anyone who wish to do so for every contest happening on this platform. One may post the video tutorials/links of youtube as well. The user will be rewarded with some contribution points as well as decided by some moderators.

For many beginners (including me), I think it will help a lot.

Again this is entirely my personal thought, neither I do video editing nor am I an expert in Web Development. Let me know your viewpoints as well. Also if there are any other ways to make it generic that is also good.

• +9

 » 7 weeks ago, # |   0 I love this idea!!!I've personally learned much more from video tutorials and find them easier to comprehend.
 » 7 weeks ago, # |   0 If not all, then at least for the last 2-3 problems which are little difficult to understand just through editorials
 » 7 weeks ago, # |   +36 I'm not sure about this idea.When I stream CF problems, I don't always know the intended solution and I might say something overcomplicated or sometimes simply wrong. The video content is still quite young. Let this style grow and mature, then make it official.
•  » » 7 weeks ago, # ^ |   0 Okay, yes that is quite a valid point I did not think of. Guess will have to wait then :(
•  » » 6 weeks ago, # ^ |   0 Nowadays, editorials are available within a few hours of the contest. So before making the video editorials, perhaps you could check to see that your approach is not overcomplicated vis-à-vis the intended solution if needed, and then make the videos. I have a feeling people wouldn't mind waiting a bit for quality content, and video editorials can provide better visualisation in some cases.Not to mention, if it becomes an official feature, the videos don't get lost (as mentioned by HealthyUG) and can be permanently linked to the problems, which means far more people end up watching it over time, as compared to a live stream.
•  » » » 6 weeks ago, # ^ |   0 90% of video editorials are made just after the contest (usually live) in order to quickly deliver while people are still interested.
•  » » » » 6 weeks ago, # ^ |   0 Hmm, that's true...I guess the only solution to that is to have a video editorialist as part of the testing team then.
 » 7 weeks ago, # |   0 Yes, definitely!! Similar to codechef where they have some students themselves preparing video solutions and they get paid i guess.


text:
# Particular solution of RE: $u_{n+1} - 2u_n = n^22^n$

Find the particular solution of recorrence equation $u_{n+1} - 2u_n = n^22^n$.

I am developing a practical method using operators $E$ e $\Delta$, defined by $E(u_n) = u_{n+1}$ and $\Delta(u_n) = u_{n+1} - u_n = (E - I)u_n$. I want to use these operators to find the particular solution of the above equation. Note that,

$$u_{n+1} - 2u_n = (E - 2)u_n = n^22^n \quad \Rightarrow \quad u_{np} = \dfrac{1}{E - 2}n^22^n$$ where $u_{np}$ is the particular solution. Would you like to discover how to work with the inverse operator for the particular solution. Thanks for any input.

• I don't understand what $\frac{1}{E-2}$ means. – Alex Schiff Jul 14 '14 at 5:07
• Being $E(u_n) = u_{n+1}$, then $\frac{1}{E}(u_{n+1}) = u_n$. I have proven that $\frac{1}{E + p}a^n = \frac{a^n}{a + p}$. I know not how to make sense in the case where it acts on a product of polynomial and exponential. – Mathsource Jul 14 '14 at 5:21
• I'm not used to the notation $\frac{1}{E}$ meaning the inverse function $E^{-1}$. – Alex Schiff Jul 14 '14 at 5:24

I'm not familiar with operator theory, but this is an answer using generating functions. First, define $$U(x)=\sum^{\infty}_{n=0}u_nx^n$$ Multiply the equation throughout by $x^n$ and sum up the terms from $0$ to $\infty$. We get $$\sum^{\infty}_{n=0}u_{n+1}x^n- 2\sum^{\infty}_{n=0}u_nx^n=\sum^{\infty}_{n=0}n^2(2x)^n$$ The sum on the right hand side is simply $$(xD_x)^2\frac{1}{1-2x}$$ So $$\frac{U(x)-u_0}{x}-2U(x)=\frac{4x^2+2x}{(1-2x)^3}$$ Solve for $U(x)$. $$U(x)=\frac{4x^3+2x^2}{(1-2x)^4}+\frac{u_0}{1-2x}$$ Decompose the expression into partial fractions, extract the coefficient of $x^n$ and you get your answer.

Perhaps define $$v_n=\frac{u_n}{2^{n-1}}.$$ Then the given relation becomes $$v_{n+1}-v_{n}=n^2.$$ In your notation this means $$(E-I)v_n=n^2.$$ Thus $$v_n=(E-I)^{-1}n^2.$$ Since $E$ is the difference operator then its inverse would be to increase the degree (like integration is inverse of differentiation). Thus $v_n$ should be an appropriate cubic polynomial. Something like $$v_n=\frac{n^3}{3}-\frac{n^2}{2}+\frac{n}{6}.$$

• His answer was very useful because, $\frac{1}{E - I}n^2 = \frac{1}{\Delta}(n^2-n+n)= \frac{1}{\Delta}[2{n \choose 2} - {n \choose 1}] = 2{n\choose 3} - {n \choose 2}$. Thanks – Mathsource Jul 14 '14 at 5:31

$$u_{np} = \dfrac{1}{E - 2}n^22^n = -\frac{1}{2} \left( 1-\frac{E}{2} \right)^{-1}n^22^n$$

$$=-\frac{1}{2} \sum_{k=0}^{\infty}\frac{E^k}{2^k}n^22^n = -\frac{1}{2} \sum_{k=0}^{\infty}\frac{1}{2^k}(n+k)^2\,2^{n+k}$$

$$= -\frac{2^n}{2}\sum_{k=0}^{\infty}(n+k)^2=-\frac{2^n}{2}\sum_{m=n}^{\infty} m^2$$

$$= -\frac{2^n}{2}\left( \sum_{m=1}^{\infty} m^2 - \sum_{m=1}^{n-1} m^2 \right)$$

$$= -\frac{2^n}{2}\left( \zeta(-2) -(n^3/3-n^2/2+n/6) \right)\quad (\mathrm{ note\, 1 })$$

$$\implies u_{np} = \frac{2^nn}{2}(n^2/3-n/2+1/6) \quad (\mathrm{ note\, 2 }).$$

Compare with other techniques.

Notes:

1) The zeta function is defined by

$$\zeta( s) = \sum_{m=1}^{\infty}\frac{1}{m^s}.$$

2) For negative even numbers $-2n, \forall n\in\mathbb {N}$ the zeta function equals $0$; i.e

$$\zeta( -2n) = 0.$$

• Wonderful way to solve the problem. I really like resollver ODE and RE through operational methods. I see that you also know a lot about it. I will present soon other issues to be discussed. Thank you for your help. – Mathsource Jul 14 '14 at 16:55
• @MathFacts: You are welcome. – Mhenni Benghorbal Jul 14 '14 at 20:05
• Yes, I love this theme. – Mathsource Jul 15 '14 at 11:03


text:
# Violation of Pauli exclusion principle [duplicate]

From hyperphysics (emphasis mine):

Neutron degeneracy is a stellar application of the Pauli Exclusion Principle, as is electron degeneracy. No two neutrons can occupy identical states, even under the pressure of a collapsing star of several solar masses. For stellar masses less than about 1.44 solar masses (the Chandrasekhar limit), the energy from the gravitational collapse is not sufficient to produce the neutrons of a neutron star, so the collapse is halted by electron degeneracy to form white dwarfs. Above 1.44 solar masses, enough energy is available from the gravitational collapse to force the combination of electrons and protons to form neutrons. As the star contracts further, all the lowest neutron energy levels are filled and the neutrons are forced into higher and higher energy levels, filling the lowest unoccupied energy levels. This creates an effective pressure which prevents further gravitational collapse, forming a neutron star. However, for masses greater than 2 to 3 solar masses, even neutron degeneracy can't prevent further collapse and it continues toward the black hole state.

How then, can they collapse, without violating the Pauli Exclusion Principle? At a certain point does it no longer apply?

• Can you give a bit more context? It might make this question more. interesting to those who like this question but don't know the context. Mar 30 '15 at 4:28
• The Pauli Exclusion Principle is a quantum phenomenon. In order to know if it is still valid inside a black hole, we would need a working theory of quantum gravity
– Jim
Mar 30 '15 at 22:01

The Pauli exclusion principle is being applied here to FREE neutrons. There are always free energy/momentum states for the neutrons to fill, even if they are compressed to ultra-high densities; these free states just have higher and higher energies (and momenta).

One way of thinking about this is in terms of the uncertainty principle. Each quantum state occupies approximately $h^3$ of position-momentum phase-space. i.e. $(\Delta p)^3 \times (\Delta x)^3 \geq h^3$. (Actually each momentum state can accomodate 2 fermions - spin up and spin down).

If you increase the density, $\Delta x$ becomes small, so $\Delta p$ has to become large. i.e. the neutrons will occupy higher and higher momentum states as the Fermi energy is increased. You can make the density as high as you like and the PEP is not violated because the particles gain higher momenta.

The increasing momenta of the neutrons supplies an increasing degeneracy pressure. However, there is a "saturation", because eventually all the neutrons become ultrarelativistic and so an increase in density does not lead to such a big increase in pressure. Technically - $P \propto \rho$ at extremely high densities.

It is then a bit of standard textbook astrophysics to show that a star supported by such an equation of state is not stable and will collapse given the slightest perturbation.

In reality neutron stars are not supported by ideal degeneracy pressure - there is a strong repulsive force when they are compressed beyond the nuclear saturation density, with something like $P \propto \rho^2$. Yet even here, an instability is reached at finite density because in General Relativity, the increasing pressure contributes (in addition to the density) to the extreme curvature of space and ultimately means that the star collapses at a finite density and pressure.

How then, can they collapse, without violating the Pauli Exclusion Principle. At a certain point does it no longer apply?

No. The Pauli Exclusion provides a "degeneracy pressure" as mentioned in the article. That degeneracy pressure is not great enough to stop the collapse in the case of a black hole.

This isn't violating the Pauli Exclusion principle. The degeneracy pressure is still there it just isn't large enough to stop the collapse.

• Then, wouldn't multiple fermions be in the same quantum state? Mar 30 '15 at 5:39
• No. Squeezing the star increases the spacing between the different energy levels that the neutrons are occupying and thus increases the total energy (this increase in energy with decrease in volume is called the degeneracy pressure).
– hft
Mar 30 '15 at 5:55

I don't know much about gravity, but, as far as I understand, collapse does not mean violation of the Pauli principle: I guess the radius of the black hole is still finite. Collapse just means that it becomes a black hole, that is, light cannot escape it.

• Exactly, I think that never you have electrons or (later) neutrons breaking the Pauli principle. B.H. has just a Schwartzchild radius at some distance and time-space conditions below dont allow to draw any conclusions... Mar 30 '15 at 10:49


text:
# Need to create CFG that requires sum of other letters

I have a homework assignment that requires me to create CFG $$G$$ for

$$L = \{a^i b^{i+j+k} c^j d^k\}$$

so that it can accept words like ab, aaabbbbd, abbbcd, but it should not accept abba, aabbbbbc, or abc since the number of b must be the number of a+c+d.

I need CFG of L(G)

• I tried using chatgpt but the answers are not correct as I cross checked them with both gpt and myself.
• I tried to cross check this pdf but they are not as complex as my question.
• There is also a solution on chegg I can't see the whole solution as I don't have a subscription, but the final solution is also wrong as I checked it with both chatgpt and myself.

The best one i came up with this grammer but it doesn't feel right since it does not have corelation between b c and d.

1. attempt:

S → AB
A → aAb | ε
B -> bCEdD
C -> bB | ε
D -> dD | ε
E -> bEc | ε

2. attempt :

S → AB
A → aA | ε
B → bBC
C → cC | Cd | ε
D → dD | ε

Is it possible to do it with cfg and how?

– D.W.
Mar 15 at 17:09
• I have already answered this question in the "Asnwers" section. I have problems understanding the accepted words, even after reading the proof of correctness @D.W. Mar 15 at 17:55

Use the nesting structure of the language to obtain a context-free grammar.

$$a^i\, b^{i+j+k}\, c^j d^k = a^i b^i\, b^k b^j c^j d^k$$

We can see that the language is the concatenation of strings of the form $$a^i\, b^i$$ and strings of the form $$b^{j+k}\, c^j d^k$$ which each separately form context-free languages.

• The part I don't understand is when I use a cfg like : - S → ABcd - A → aAb | ε - B → bBc | ε - C → cCd | ε seems to be correct and also produces what I'm asking for, but it also accepts words like "abba, aabbbbc or abc" which I want to use specifically and only for the words I'm describing, so if the language doesn't have that, that's the part I don't understand Mar 15 at 16:38
• Respect the nesting structure. Generate "bc"-pairs inside the "bd"-pairs. Mar 15 at 23:23
• I also add this cfg to the main question but here's what i did : S → AB ---- A → aAb | ε ---- B -> bCEdD ---- C -> bB | ε ---- D -> dD | ε ---- E -> bEc | ε. I can't solve that point i don't know how to add bc in bd because there's also an bcd combination that i need to make recursive. Mar 16 at 9:00

$$S\rightarrow AD$$
$$A\rightarrow aAb,\varepsilon$$
$$D\rightarrow bDd, C$$
$$C\rightarrow bCc, \varepsilon$$.

In this solution I divided the word into a prefix of $$a^ib^i$$ and a suffix of $$b^{j+k}c^jd^k$$. The latter part is generated by building $$b^kCd^k$$ and then replacing $$C$$ with $$b^jc^j$$.

• Is the " , " the same as the " | " or does this symbol have a different purpose? Mar 16 at 16:33
• yes it is the same, I just mean different choices of the right side. Mar 16 at 16:41


text:
# Homework Help: Inelastic Collision HW Problem

1. Dec 13, 2014

### HSkiddave

1. The problem statement, all variables and given/known data
Pete got into into a car accident and collided with another vehicle, which resulted in the death of the second vehicles passenger, David. Whether Pete was speeding or not determines if he goes to jail. The speed limit where he got into the accident was 45mph. How fast was pete going at the point of collision and will he go to jail?

Given Data :
Mass of David’s Car(m2)
1115lbs

Mass of Pete’s car (m1)
1755lbs

Distance the cars skidded
13m

Final velocity post skid
0mph

Time of skid
22sec

Initial velocity of David’s car
47mph

Speed limit
45mph

2. Relevant equations
$$(m1v1) + (m2v2) = (m1 + m2)Vf$$

3. The attempt at a solution
First I converted from lbs and mph to kg and m/s for the masses and velocity since we use kg and m/s in my class, I dont know if this was neccesary.
1151 lbs = 505.8 kg
1755 lbs = 796.1 kg
47mph = 21.01 m/s

Then I used my equation
$$(m1v1) + (m2v2) = (m1 + m2)Vf$$
$$(796.1*v1) + (505.8*21.01) = (796.1 + 505.8)0$$
$$(796.1*v1) + (10626.858) = 0$$
$$796.1*v1/796 = -10626.8/796$$
$$v1 = 13.35 m/s$$

I then converted that from m/s to mph and got 29.86mph, which would mean he would not be speeding and not go to jail.
Although I got all the way through, i feel im wrong since they gave me the data for time and distance and i never even used them, which makes me feel like im forgetting something. Could someone help me out or check it to see if i did skip a step?

2. Dec 13, 2014

### Nathanael

Bit of a morbid physics problem

But anyway... the $V_f$ in your relevant equation is the speed immediately after the collision. This speed is not zero, otherwise the cars would not have skid.

3. Dec 13, 2014

### Bystander

What you want here rather than Vf = 0, is the velocity of the two cars at the beginning of the 13m skid that took 22 seconds. You might want to double check the problem statement for values for time and distance (distance seems a bit short, and time seems like forever).

4. Dec 13, 2014

### HSkiddave

Yes it is morbid!! My physics teacher is a former funeral director untill he became a teacher!!
Back to the problem...based on what u two said I think that might mean I have to do
$$V=D/T$$
$$V=13/22$$
$$.59 m/s$$

Then Maybe I can plug that into this which makes sense
$$(796.1∗v1)+(505.8∗21.01)=(796.1+505.8).59m/s$$
$$(796.1∗v1)+(10626.858)= 768.121$$
$$(796.1∗v1) = -9858.737$$
$$(796.1∗v1)/796.1 = -9858.73/796.1$$
$$-12.38 m/s$$

I find it weird this is negative which makes me think Im wrong but Ill just ignore the negative and convert... which means $$12.38 m/s = 27.69mph$$... meaning he wasnt speeding

does this seem better? still feels a little strange

5. Dec 13, 2014

### Nathanael

You used $V=\frac{total.distance}{total.time}$

Total distance divided by total time just gives you the average velocity (over the time that they were skidding) which is not what you want.

6. Dec 13, 2014

### Bystander

Have you ever seen anything skid at constant speed and stop instantaneously?

7. Dec 13, 2014

### HSkiddave

Ok guess not... what if I try this one
$$D=½(VF+VI)T$$
$$13=½(VF+21.01)22$$
$$VF = -19.83 m/s$$

Then I do this thing again
$$(796.1∗v1)+(505.8∗21.01)=(796.1+505.8)-19.83$$
$$(796.1∗v1)+(10626.858)=-25816.677$$
$$(796.1∗v1)=-36443.533$$
$$(796.1∗v1)/796.1=-36443.533/796.1$$
$$V1 = -45.78 m/s$$

Still getting a negative but Ill ignore it again and that converts into 102.4 mph which is WAY over the speed limit..... I think i might of messed up again?

8. Dec 13, 2014

### Bystander

Let's find a value for deceleration of the cars from the total distance and time.

9. Dec 13, 2014

### HSkiddave

Ok...... so I did half of that above i think? Because i need to get average velocity to plug into an acceleration equation?
$$V=D/T$$
$$V=13/22$$
$$.59m/s$$

Then a step further for acceleration
$$A=V/T$$
$$A=.59/22$$
$$A = .027 m/s^2$$

Im not sure where that would leave me to go next though

10. Dec 13, 2014

### Nathanael

Plugging in random formulas is never a good idea; you have to picture the situation.
In this new equation you wrote, we're looking at the time interval when they're skidding, (that's why "D" is the distance they skid and "T" is the time they skid for) so "VF" is not the same "VF" as in the other equation. So in this case, the initial velocity "VI" corresponds to the velocity right after the collision, and the final speed "VF" is the speed after they finish skidding.

P.S.
You are also assuming that the deceleration of the cars after the collision is constant. You need to make this assumption for the problem to be solvable, but it's good to be aware that you're making this assumption.

Edit:
Sorry I'm a little late; I didn't notice that bystander already replied

11. Dec 13, 2014

### Nathanael

Again, you're using the average velocity. Acceleration is not "average velocity per time" it is "change in velocity per time."

12. Dec 13, 2014

### HSkiddave

Ok the the thing you said about their being two different VF's helps me visualize a little better, i was thinking of it as one big problem when really theres the stuff after the collision when its skidding and then the stuff when it collides.

Ok so let me try to stop messing up on the velocity. If i need change in velocity I think this is how I would do the equation
$$A = Vf-Vi/T$$

Im stuck here though.......... I think the Vf is 0 but where do I get the Vi from...... because all I have is initial velocity
All I could think of is trying this
$$D=½(Vf+Vi)T$$
$$13=½(0+Vi)22$$
$$Vi = 1.18 m/s$$

Wait maybe Im getting something...... could I then go here
$$A = Vf-Vi/T$$
$$A = 0-1.18/22$$
$$A = -.054 m/s^2$$

which I assume would go positive? Sorry Im trying not to plug in equations... im just using this reply box as like my constant stream of thinking as i contemplate your responses.. I would still need to figure out what to do with acceleration if correct

13. Dec 13, 2014

### HSkiddave

Wait I dont think it goes positive actually... since its a negative acceleration as the car slows.. i am just scared of negative numbers i think haha

14. Dec 13, 2014

### Bystander

And that deceleration acts for 22 seconds for what change in velocity?

15. Dec 13, 2014

### HSkiddave

I think
$$A = ΔV/T$$
$$-0.54 = ΔV/22$$
$$ΔV = -11.88 m/s$$

You said this is my change in velocity.... does that mean I cant put this in my VF all the way at the original equation? If so what would I do with this/where would I go now since I thought we needed VF.

16. Dec 13, 2014

### Nathanael

I thought it was -0.054 not -0.54, so that gives you 1.188 m/s, but really it should be 1.18 because 0.054 is not the exact value for the acceleration, you rounded it.
The exact value of the acceleration was 1.18/22, so (1.18/22)*22=1.18
There's a good lesson on how premature rounding can affect your answer

Anyway in post #12 you said Vi=1.18 m/s
What does this "Vi" represent? It was the velocity when they first started skidding, right? Which means it was the velocity right after the collision, right?

17. Dec 13, 2014

### Bystander

This is good.
This is getting sloppy transcribing numbers.
Correct your arithmetic error, and this is the "initial" velocity of the wreckage following the collision, from which you do the calculation of Pete's velocity from the conservation of momentum.

18. Dec 13, 2014

### HSkiddave

First off, yeah I definitely made an error (Sorry :() the actual answer would be
$$Vi = 1.18m/s$$

Now let me just write were in the post-collision world here so I remember. Next I think I have to get back on track and find the VF after the collision if I have the initial velocity
So I think Im now allowed to do this?
$$D=½(Vf+Vi)T$$
$$13=½(Vf+1.18)22$$
$$Vf = .00182m/s$$

seems low to me kind of... should i keep moving forward or did i make an error

19. Dec 13, 2014

### HSkiddave

I kind of feel like Im getting lost in the problem now.... we are so far down (my fault since I just cant seem to comprehend it)
I'm gonna restate this.....
$$(m1v1)+(m2v2)=(m1+m2)Vf$$

$$(796.1∗v1)+(505.8∗21.01)=(796.1+505.8)Vf$$

I really now just need help figuring out if the stuff I did in like my last two posts can help me get the right VF so i can find V1

I am operating under the assumption this is still the original equation I should be using

20. Dec 13, 2014

### Nathanael

If you assume that the acceleration after the collision is constant, then you can say $V_{avg}=\frac{V_f+V_i}{2}$. Since you know that the final velocity is zero, (they come to a stop) then the initial velocity (assuming constant acc.) is twice the average velocity. Now the average velocity is just the total distance per total time. You wrote it in post #9, it is 0.59 m/s, therefore the initial velocity (a.k.a. the velocity immediately after the collision) is 1.18 m/s

This would be the velocity you use for the conservation of momentum equation.

21. Dec 13, 2014

### Nathanael

The whole challenge of the problem was to use the information about how far the cars skid, and how long it took, to find the speeds of the cars immediately after the collision (and then use conservation of momentum to find the speed of the car). To do this, you had to assume the deceleration was constant.

It got a little bit muddled, but hopefully you see the big picture now.

22. Dec 13, 2014

### HSkiddave

Ok, after reading that maybe I understand a little better not perfectly though. Is this how you wanted me to proceed?

$$(796.1∗v1)+(505.8∗21.01)=(796.1+505.8)1.18$$
$$(796.1*V1)+(10610.05)=1536.242$$
$$796.1Vl = -9073.808$$
$$796.1Vl/796.1 = -9073.808/796.1$$
$$Vi = -11.40 m/s$$

Thats 25.5 mph..... I hope i did this right but I may of even messed myself up even more. I think it all hinged on whether I was supposed to put 1.18 where I just did in this equation

Last edited: Dec 13, 2014
23. Dec 13, 2014

### Nathanael

I didn't go through the calculation myself but it looks good.

You should get in to the habit of not plugging in the numbers until after you've manipulated the equations. It makes it easier for others and for yourself to read and spot errors. Plus, it can give insight in to what is going on.

Do you happen to know what part you're not perfectly understanding?

24. Dec 13, 2014

### HSkiddave

Thanks. Ill try to format it better next time... I guess the only part I dont understand is why if were calling 1.18 m/s a velocity initial value... are we plugging it into Vf on the equation? I assume this has something to do with there being two different worlds (post collision and directly at point of collision)

25. Dec 13, 2014

### Nathanael

Yeah. I wouldn't write the "Vf" in the conservation of momentum equation as "Vf" because it's not truly the "final velocity," I would write maybe $V_{ac}$ for "velocity after collision" (or something).

That's why it's good to understand formulas instead of remember them; if you just remember them, small things like that can throw you off.

Good luck with your physics class Dave!


text:
# LambdaNet: A configurable and extensible neural network library

[ library, machine-learning, mit ] [ Propose Tags ]

LambdaNet is an artificial neural network library that allows users to compose their own networks from function primitives.

Documentation and nightly builds for LambdaNet can be found at (http://github.com/jbarrow/LambdaNet).

Versions [faq] 0.1.0.0, 0.1.0.1, 0.2.0.0 Changelog base (==4.*), binary, bytestring, hmatrix (==0.16.0.6), random, random-shuffle (>=0.0.4), split [details] MIT 2014 Brent Baumgartner, Alex Thomas, Harang Ju, Joseph Barrow Joseph Barrow Machine Learning by jbarrow at 2015-01-02T05:12:22Z NixOS:0.2.0.0 2228 total (6 in the last 30 days) 2.0 (votes: 1) [estimated by Bayesian average] λ λ λ Docs available Last success reported on 2015-01-02

## Modules

[Index]

• Network

#### Maintainer's Corner

For package maintainers and hackage trustees

[back to package description]

# LambdaNet

LambdaNet is an artificial neural network library written in Haskell that abstracts network creation, training, and use as higher order functions. The benefit of this approach is that it provides a framework in which users can:

• quickly iterate through network designs by using different functional components
• experiment by writing small functional components to extend the library

The library comes with a pre-defined set of functions that can be composed in many ways to operate on real-world data. These will be enumerated later in the documentation.

## Installation

LambdaNet can be installed through Cabal:

cabal update
cabal install LambdaNet

## Using LambdaNet

Using LambdaNet to rapidly prototype networks using built-in functions requires only a minimal level of Haskell knowledge (although getting the data into the right form may be more difficult). However, extending the library may require a more in-depth knowledge of Haskell and functional programming techniques.

You can find a quick example of using the network in XOR.hs. Once LambdaNet is installed, download XOR.hs, and then you can run the file in your REPL to see the results:

runhaskell examples/XOR.hs

The rest of this section dissects the XOR network in order to talk about the design of LambdaNet.

### Training Data

Before you can train or use a network, you must have training data. The training data is a tuple of vectors, the first value being the input to the network, and the second value being the expected output.

For the XOR network, the data is easily hardcoded:

let trainData = [
(fromList [0.0, 0.0], fromList [0.0]),
(fromList [0.0, 1.0], fromList [1.0]),
(fromList [1.0, 0.0], fromList [1.0]),
(fromList [1.0, 1.0], fromList [0.0])
]

However, for any non-trivial application the most difficult work will be getting the data in this form. Unfortunately, LambdaNet does not currently have tools to support data handling.

### Layer Definitions

The first step in creating a network is to define a list of layer definitions. The type layer definition takes a neuron type, a count of neurons in the layer, and a connectivity function.

Creating the layer definitions for a three-layer XOR network, with 2 neurons in the input layer, 2 hidden neurons, and 1 output neuron can be done as:

let l = LayerDefinition sigmoidNeuron 2 connectFully
let l' = LayerDefinition sigmoidNeuron 2 connectFully
let l'' = LayerDefinition sigmoidNeuron 1 connectFully

#### Neuron Types

A neuron is simply defined as an activation function and its derivative, and the LambdaNet library provides three built-in neuron types:

• sigmoidNeuron - A neuron with a sigmoid activation function
• tanhNeuron - A neuron with a hyperbolic tangent activation function
• recluNeuron - A neuron with a rectified linear activation function

By passing one of these functions into a LayerDefinition, you can create a layer with neurons of that type.

#### Connectivity

A connectivity function is a bit more opaque. Currently, the library only provides connectFully, a function which creates a fully connected feed-forward network.

Simply, the connectivity function takes in the number of neurons in layer l and the number of neurons in layer l + 1, and returns a boolean matrix of integers (0/1) that represents the connectivity graph of the layers -- a 0 means two neurons are not connected and a 1 means they are. The starting weights are defined later.

### Creating the Network

The createNetwork function takes in a random transform, an entropy generator, and a list of layer definitions, and returns a network.

For the XOR network, the createNetwork function is:

let n = createNetwork normals (mkStdGen 4) [l, l', l'']

Our source of entropy is the very random: mkStdGen 4, which will always result in the same generator.

#### Random Transforms

The random transform function is a transform that operates on a stream of uniformly distributed random numbers and returns a stream of floating point numbers.

Currently, the two defined distributions are:

• uniforms - A trivial function that returns a stream of uniformly distributed random numbers
• normals - A slightly less-trivial function that uses the Box-Muller transform to create a stream of numbers ~ N(0, 1)

Work is being done to offer a student t-distribution, which would require support for a chi-squared distribution transformation.

### Training the Network

In order to train a network, you must create a new trainer:

let t = BackpropTrainer (3 :: Float) quadraticCost quadraticCost'

The BackpropTrainer type takes in a learning rate, a cost function, and its derivative.

The actual training of the network, the fit function uses the trainer, a network, and the training data, and returns a new, trained network. For the XOR network, this is:

let n' = trainUntilErrorLessThan n t online dat 0.01

LambdaNet provides three training methods:

• trainUntil
• trainUntilErrorLessThan
• trainNTimes

The trainUntil function takes a TrainCompletionPredicate (check Network/Trainer.hs) for more information, and the last two are simply wrappers for the first one that provide specific predicates.

The calculated error is what is returned by the cost function.

#### Cost Functions

Currently, the only provided cost function is the quadratic error cost function, quadraticCost and its derivative, quadraticCost'. I am about to add the cross-entropy cost function.

#### Selection Functions

Selection functions break up a dataset for each round of training. The currently provided selection functions are:

• minibatch n - You must provide an n and partially apply it to minibatch to get a valid selection function. This function updates the network after every n passes.
• online - Using this function means that the network updates after every training example.

For small data sets, it's better to use online, while for larger data sets, the training can occur much faster if you use a reasonably sized minibatch.

### Using the Network

Once the network is trained, you can use it with your test data or production data:

predict (fromList [1, 0]) n'

LambdaNet at least attempts to follow a Scikit-Learn style naming scheme with fit and predict functions.

Once a network has been trained, the weights and biases can be stored in a file:

saveNetwork "xor.ann" n'

By calling saveNetwork with a file path, you can save the state of the network.

Loading a network requires passing in a list of layer definitions for the original network, but will load all the weights and biases of the saved network:

n'' <- loadNetwork "xor.ann" [l, l', l'']

Note that the loadNetwork function returns an IO (Network), you can't simply call predict or train on the object returned by loadNetwork. Using the approach in XOR.hs should allow you to work with the returned object.

## Currently Under Development

What has been outlined above is only the first stages of LambdaNet. I intend to support some additional features, such as:

• Regularization functions
• Additional trainer types (RProp, RMSProp)

### Regularization Functions and Momentum

Standard backprop training is subject to overfitting and falling into local minima. By providing support for regularization and momentum, LambdaNet will be able to provide more extensible and robust training.

## Generating the Documentation Images

All the documentation for the network was generated in the following manner. In the docs folder, run:

runhaskell docs.hs
python analysis.py

Note that I am currently working on removing the Python image analysis from the library, and switching it with Haskell and gnuplot. I'm also working on using the generated images in network documentation.


text:
# What's the advantage of log_softmax over softmax?

Previously I have learned that the softmax as the output layer coupled with the log-likelihood cost function (the same as the the nll_loss in pytorch) can solve the learning slowdown problem.

However, while I am learning the pytorch mnist tutorial, I'm confused that why the combination of the log_softmax as the output layer and the nll_loss(the negative log likelihood loss) as the loss function was used (L26 and L34).

I found that when log_softmax+nll_loss was used, the test accuracy was 99%, while when softmax+nll_loss was used, the test accuracy was 97%.

I'm confused that what's the advantage of log_softmax over softmax? How can we explain the performance gap between them? Is log_softmax+nll_loss always better than softmax+nll_loss?

The short answer is yes, log_softmax + nll_loss will work better.

I don’t know the implementation details under the hood in PyTorch, but see the screenshot below from the documentation:

• Yes, I know that log_softmax + nll_loss will work better, but I want to know why... – user1024 May 1 '19 at 3:54
• @user1024 this seems like a question for the development team since it could depend heavily on their implementation. But you mentioned you used softmax + nll_loss together. Note that since log is monotonically increasing, maximizing the log of the probability with respect to theta is the same as maximizing the probability with respect to theta. That is they both have the same argmax. But log likelihood expects log probabilities, this log_softmax is used. Also note that log(a/b) = log(a) - log(b). But since b is the same for all classes, it’s (probably) omitted in their implementation. – Hanzy May 1 '19 at 4:33
• @user1024 omitted because it wouldn’t affect the maximization, so I assume it would make it faster and more numerically stable. But I also assume they have further optimized the routine implementation in ways that aren’t as obvious simply for speed and stability performance. – Hanzy May 1 '19 at 4:34
• @user1024 and assuming that we are using a Gaussian prior, then maximizing the likelihood requires us to take an exponentiation, but taking the log cancels out the exponentiation, which would also make it faster and more stable. – Hanzy May 1 '19 at 4:36
• Thank you @Hanzy, your comments helped explain the advantages of log_softmax in speed and numerical properties. As a beginner in AI, I have allodoxaphobia to determine so many super-parameters. – user1024 May 4 '19 at 3:21


text:
## brute force: how can I recover an important gmail password that I forgot?

I forgot a gmail account that I am using to apply for graduate work. I'm waiting for several emails, but my account was blocked. Is there a program I can use to try to recover it? Gmail recovery will not work. I can remember the exact day I changed it, but not the real password.

Thank you

## jpeg: Force Lightroom Classic to write one full image at a time during export? (Export to a network mounted GCS tank)

I'm running out of space on my local machine, so I have mounted a Google Cloud Storage cube on my local machine using gcsfuse. I am now exporting my Lightroom Classic library as JPEG files to the mounted GCS repository, but the process is extremely slow, much slower than it should be if you strictly consider the encoding speed and the time to load the files into GCS .

I think what is happening is that Lightroom is incrementally writing the files encoded in the file system. This is fine in a normal system, but with gcsfuse, a file modification includes reading the entire GCS file, editing the file and writing everything back to GCS. This means that each incremental writing is taking orders of magnitudes longer than otherwise.

I came up with a temporary solution to export 50 files at once to a local directory and then make a massive move to the directory consisting of the mounted GCS repository, but I would like to do it so that I can export my entire library at once from Lightroom to the GCS cube mounted. To do this, I need to change Lightroom so that it only writes JPEG files after they have been fully encoded, is there any way to do it?

## Force bip9_softforks activation

"bip9_softforks": {
"csv": {
"status": "failed",
},
"segwit": {
"status": "failed",
}
},

How to force the activation of segwit and csv of litecoin clone after a certain block height?

## Unity2D force of an impact

I am facing a math problem!
I don't know how to name what I'm looking for … Strength, impact?
It is easier to explain with an image for me.
We have two collider game objects, A and B. They can move in any direction (top-down game with 360 ° movement possibilities).
First case (left): A go to the right at a speed of 2, B to the left at a speed of 1 and collide. How to calculate that A takes 1 damage (from the speed of B in its direction) and B takes 2.
Second case: A go to the right at a speed of 2 and B to the right at a speed of 1. A takes 0 damage and B takes 1.

I have no idea how to calculate things like this …

Thank you !

EDIT: I am using Collision2D that does not have the "momentum" property

## Physical – Unity force of an impact

I am facing a math problem!
I don't know how to name what I'm looking for … Strength, impact?
It is easier to explain with an image for me.
We have two collider game objects, A and B. They can move in any direction (top-down game with 360 ° movement possibilities).
First case (left): A go to the right at a speed of 2, B to the left at a speed of 1 and collide. How to calculate that A takes 1 damage (from the speed of B in its direction) and B takes 2.
Second case: A go to the right at a speed of 2 and B to the right at a speed of 1. A takes 0 damage and B takes 1.

I have no idea how to calculate things like this …

Thank you !

## ESoftTools 7z password recovery software

Cross ESoftTools 7z password recovery software to delete the password from the 7z file without damaging the saved data. Recover the password with the help of mask attack, brute force attack and dictionary attack. This software is fully tested with all Windows and 7zip variants and comes with a free demo version.

.

## How long would it take to apply brute force to a PGP encrypted email?

How long would it take to apply brute force to a PGP encrypted email? If you inform me correctly, it depends on the bit size of the encryption key.

## Game design – GTA Tekken Force Time Warp

Thank you for contributing a response to Game Development Stack Exchange!

But avoid

• Make statements based on opinion; Support them with references or personal experience.

Use MathJax to format equations. MathJax reference.

## This rule may prevent and require some actions, but others are not clear.

As cited:

Whether a creature is a friend or an enemy, you cannot voluntarily end your movement in its space …

For me, if you are aware of some set of actions that allows you not to end your movement there and do not take those actions, then you are voluntarily do not take them, and then you are voluntarily ending your turn in the space of another creature. Therefore, in scenario 1, you will be asked to perform the Dash action or the cast foggy step If I could like any decision not to use them I would be willing.

On the one hand, entering the space of a creature does not warranty that his movement ends there (perhaps a spell will be cast, or the difficult terrain was false, or he will succeed in the caltrops save cast) so that he can always enters the space of a creature.
On the other hand, moving anywhere has the potential to make your movement end in another creature's space (maybe a spell will be cast) so you can never move anywhere, never.

Clearly, these ideas cannot work together, so using "guarantees" will not help us. However, the rule about moving around creatures should definitely apply. sometimeand as there is never a absolute guarantee that something will end your movement or not in the space of another creature. I adopted the rule to apply when something is very likely have one result or another.

This brings us to the following metrics:
"If there is a very high possibility that your movement ends in another creature's space, you cannot enter its space."
"If there is a very high possibility that your movement does not end in the space of another creature, you can enter its space."

Unfortunately, there is no good way to determine what counts as "a very high possibility" and, therefore, applying this metric would depend on a GM. Nor do we have a way to deal with scenarios in which there are similar chances that your movement will end and not end.

By using this metric, we can see that the difficult terrain scenario has an almost guaranteed result that you are trapped there and, therefore, you cannot enter that area (but if you still had your action, then you could, it would only require you to take the Script Action after doing so).

The caltrops scenario would technically depend on your skill saving bonus and almost always have a significant chance of ending or not moving, therefore, the metrics I made could not be applied.
In situations like this, the rules are not clear and would depend on your GM.

The rule forces you to leave a creature's space by any means necessary and we can conclude that you may or may not enter a creature's space depending on whether your ability to stop there is extremely low or extremely high respectively.

## brute force – HTC-Hydra HTTP Post Form does not work

HTC-Hydra HTTP Post Form does not work

I am trying to force a local instance of my web application.

2. Once I connected, I used Burp Suite to intercept the call, to take the correct cookie.
As you can see in my command (below), I am verifying a correct answer against the title "302 found".

hydra -l validUsername -P smalllist.txt hostname.123 http-post-form "/login/home:username=^USER^&password^PASS^&submit=Sign+in:S=302 Found:H=Cookie: MasonX-Request-WithApacheSession-cookie=e630d589458a0c23719362df37e" -f -I -t 4 -V

1. My process to use Burp-Suite to capture exact requests and answers.
• Enter the credentials on the login page, Burp Suite intercepts the request.
• Add request to the repeater so you can simulate the login within BurpSuite.
• Press send and through the Answer (See image 2). As you can see, I receive a 302 and some text,
What do I use to match my success story, maybe this is where it is falling?
• If I continue with the call by pressing "Continue redirection", I get a 200 (See image 2) that contains the information and HTML of my page that has been successfully logged in.

1. So let's try and try incorrectly
• Enter an invalid password, the same process using BurpSuite as the previous one, but …
• The answer is 200 with a valid error message (See image 3).
• Now I tell Hydra to match the error message in the HTML; this does not work.
hydra -l validUsername -P smalllist.txt hostname.123 http-post-form "/login/home:username=^USER^&password^PASS^&submit=Sign+in:Sorry, we did not recognise your username and password, please try again or contact Admin.:H=Cookie: MasonX-Request-WithApacheSession-cookie=e630d589458a0c23719362df37e" -f -I -t 4 -V


text:
# 3/4 in Decimal Form

## Question: What is 3/4 in decimal form?

Both fractions and decimals are just two ways to represent the same numbers.

## Answer: 3/4 as a decimal is equal to 0.75

Let's convert the given fraction to a decimal number.

## Explanation:

To convert any fraction to decimal form, we just need to divide its numerator by denominator.

Here the fraction is 3/4 which means we need to perform 3 ÷ 4.

### Alternate Method:

It is difficult to perform a division when a dividend is less than the divisor.

So, we re-write 3/4 as 3 × (1/4)

• 1/4 = [(100/4) ÷ 100].
• 100/4 = 25
• 25 ÷ 100 = 0.25
• So, 1/4 = 0.25.

Therefore, 3/4 = 3 × (1/4) = 3 × 0.25 = 0.75.


text:
# How do I find the tangent line of y=x^2 at its vertex?

Sep 12, 2014

Let's start by finding the vertex. Then we find the derivative of the function using the x value of the vertex. Lastly, we use the slope intercept formula and the value found for the derivative to create the equation for the tangent line.

We can use the expressions $\left(- \frac{b}{2 a} , f \left(- \frac{b}{2 a}\right)\right)$ to find the vertex.

$y = {x}^{2}$

$a = 1 , b = 0 , c = 0$

$x = - \frac{0}{2 \left(1\right)} = \frac{0}{2} = 0$

$y = f \left(0\right) = {0}^{2} = 0$

Vertex: $\left(0 , 0\right)$

Derivative:

$y = f \left(x\right) = {x}^{2}$

$y ' = f ' \left(x\right) = 2 x$

Substitute in the x value of the vertex, which is 0

$f ' \left(0\right) = 2 \left(0\right) = 0$ This is the slope aka derivative

Find the equation for the Tangent line:

$y = m x + b$, slope intercept formula

Substitute in $x$ and $y$ from the Vertex

$0 = m \left(0\right) + b$

Substitute in the slope/derivative

$0 = \left(0\right) \left(0\right) + b$

Solve for b, which is also known as the y-intercept

$0 = b$

Now that we know the value of $b$ we can create the general form of the tangent line equation by just substituting in the slope/derivative and the b (y-intercept) value.

$y = \left(0\right) x + 0$, Next we simplify

Solution:

$y = 0$ , the equation of the tangent line


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

# The Circle Diagram - Construction, Components and Application in Induction Motors

## A Brief about Induction Motors and Circle Diagrams

Last updated date: 20th Mar 2023
Total views: 76.8k
Views today: 1.56k

Circle diagram is basically just a tool that is used to study the performance of an induction motor under all operating conditions. So before moving onto a circle diagram, it is important to get a basic idea about induction motors if you don’t already know about them. An induction motor is an AC electric motor, and they are also known as asynchronous motors. Through electromagnetic induction, the revolving magnetic field of the stator winding provides the electric current required to generate torque in the rotor. Since the motor works using electromagnetic induction, it is known as an induction motor.

The induction motor has various operating conditions and to keep a hold of all the information is a difficult task at times. The performance of an induction motor is represented graphically using a circle diagram. The circle diagram shows data about the induction motor's power output, losses, and efficiency.

## Solving the Induction Circuit

A circle diagram is based on an approximate equivalent circuit of the induction motor. The diagram is shown below. This diagram is also known as an induction circuit diagram.

Equivalent circuit for circle diagram

Applying Kirchhoff’s current law in the circuit above we get that,

$I_{1}=I_{0}+I_{2}{ }^{\prime}$

Phase diagram between V1 and I0

If we draw a phase diagram between I0 and V1 we find that the no load current I0 lags behind V1 by an angle which we can consider to be $\phi_0$, and it is called no load factor angle. The no load factor angle is between 60 and 80 degrees.

At no load, the slip s is equal to 0. This means that,

$\dfrac{R_{2}}{s}=\infty$

$\dfrac{R_2}{s}$ is an open circuit for the no load condition.

Now we have,

\begin{align} &I_{0}=\dfrac{V_{1}}{Z_{N L}} \\ &Z_{N I .}=\left(R_{0} \| j X_{0}\right) \end{align}

ZNL is the no load impedance of the circuit. All the rotational losses are considered by R0 and the formula for the no loadloss is,

$P_{0}=V_{1} I_{0} \cos \phi_{0}$

The source of the rotor current directed toward the stator side is,

$I_{2}^{\prime}=\dfrac{V_{1}}{\sqrt{\left(R_{1}+\dfrac{R_{2}^{\prime}}{s}\right)^{2}+\left(X_{1}+X_{2}^{\prime}\right)^{2}}}$

This current lags behind the voltage V1. The impedance angle is given by ϕ

Diagram for the impedance angle

From the above diagram we can write,

$\sin \varphi=\dfrac{X_{1}+X_{2}^{\prime}}{\sqrt{\left(R_{1}+\dfrac{R_{2}{ }^{\prime}}{s}\right)^{2}+\left(X_{1}+X_{2}^{\prime}\right)^{2}}}$

By using the equations of sinϕ and I2’ we can write,

$I_{2}^{\prime}=\dfrac{V_{1}}{X_{1}+X_{2}{ }^{\prime}} \sin \varphi$

This equation has a form of $r=a\sin \varphi$. This equation represents the circle that has a diameter a.

We can then say that the locus of I2 is a circle having diameter,

$\dfrac{V_{1}}{X_{1}+X_{2}^{\prime}}$

Using this we can then form a circle diagram as given below.

Circle diagram of induction circuit

The equation,

$I_{2}^{\prime}=\dfrac{V_{1}}{X_{1}+X_{2}^{\prime}} \sin \varphi$  is known as the periphery of the circle formula because it forms the locus of the current.

## Computing Data for a Circle Diagram

We have the circuit in the section before, but we still need data to construct a circle diagram. The data used is known as the parameter of the circle. This data can be gained by performing tests on the induction motor which can be obtained from:

• Blocked rotor test

• Stator resistance test

The no load test involves a calculation of the total power consumed by the machine,  while the induction motor runs under no load condition at rated power supply. Then observe the supply line voltage represented by V0, no load line current I0 and no load power P0. To calculate the data, two watmeters are used and the slip of the motor is taken to be zero. This test gives us the no load current as well as the angle subtended between the voltage and the current vectors. Owing to the high inductive resistance that the induction motor exhibits under no load conditions, the angle between the current and voltage becomes pretty large. The phase angle for no-load condition

$\phi_0$ is given as,

$\phi_{0}=\dfrac{P_{0}}{\sqrt{3} V_{0} I_{0}}$

## Blocked Rotor Test

The blocked rotor test performed on the induction motor gives us the necessary information to calculate the short circuit current and the angle by which the current lags behind the voltage. This test is similar to that of the short-circuiting of the secondary connections of a transformer. The rotor is blocked firmly, and then a reduced voltage is applied to obtain the rated current at motor terminals. The supply line voltage VSC, no load line current ISC and the no load power PSC are then observed. From this test we can get the phase angle for blocked rotor condition $\phi_{SC}$, current drawn if rated voltage is applied at blocked rotor condition ISN and the power input at rated voltage and motor in the blocked rotor condition PSN. The formulae for these parameters are:

\begin{align} \phi_{S C} &=\dfrac{P_{S C}}{\sqrt{3} V_{S C} I_{S C}} \\ I_{S N} &=I_{S C} \dfrac{V_{0}}{V_{S C}} \\ P_{S N} &=P_{S C}\left(\dfrac{V_{0}}{V_{S C}}\right)^{2} \end{align}

The periphery of the circle is calculated using these formulae, and they are called the periphery of the circle formula.

## Stator Resistance Test

The voltmeter ammeter test is a general method that is used to measure electrical resistance. Simultaneous readings of the current and the voltage are to be taken and then Ohm’s law can be used to find the resistance. So the per phase equivalent stator resistance R1 is to be determined using the voltmeter ammeter method. If the machine is wound rotor type the equivalent rotor resistance R2’ is also required. It can be found after measuring the rotor resistance and then applying the required transformations.

## Construction of the Circle Diagram of an Induction Motor

We now have the required data to plot the circle diagram. Just to mention again the data that we require is:

• Stator phase voltage

• No load power factor $(\cos{\phi_0})$

• Stator resistance per phase R1

• Blocked rotor current ISC

• Blocked rotor power factor PSC

The steps followed to draw a circle diagram are:

• Represent the horizontal axis as OX and the vertical axis as OV. OV is the voltage reference for our diagram.

• With any scale of your choice then draw a phasor represented by OA with a length corresponding to I0. The scale used is called the circle scale. OA is drawn at an angle $\phi_0$ with respect to OV. Then a horizontal line AB is to be drawn from A.

• Then draw another line OS that is equal to ISN. Draw this at an angle equal to $\phi_{SC}$ and join A with S.

• Then draw the perpendicular bisector of AS and extend it such that it meets the horizontal line AB and name the point of intersection as C.

• Then with C as the center, draw a semicircle that passes through A and S. This is actually the circle diagram, and it is the locus of the input current.

• From S, draw a vertical line SL and make it meet AB.

• Now we have to find a point K on the line SL.

• For wound rotor machines the equivalent resistance is R2and K can be found by dividing SL at point K such that

SK:KL=equivalent motor resistance:stator resistance

• For squirrel cage rotor machines the stator copper loss can be found using ISN and stator winding resistance R1. The rotor copper loss is equal to the difference of the total copper loss and stator copper loss.

Then the line SL is to be divided at point K such that,

SK:KL=rotor copper loss:stator copper loss

• After finding K, for any operating point P draws a vertical line PEFGD as shown in the circle diagram below.

The parts of a circle diagram are,

We then have,

• PD=input power

• PE=output power

• EF=rotor copper loss

• FG=stator copper loss

• GD=constant loss

Efficiency of the machine at operating point P=PE/PD

Slip of the machine at operating point P=EF/PD

Starting torque at rated voltage= SK

Circle Diagram of an induction motor

Drawing tangents to the circle diagram parallel to the output line and torque line will give the operating points corresponding to maximum power and maximum torque respectively. The points where the tangents touch the circle are the maximum power point and the maximum torque points as shown in the diagram.

### Components of a Circle Diagram

Different parts of a circle diagram

A circle diagram has three distinct parts, as we can see in the above image. The three major parts of a circle diagram are the maximum output power, the maximum input power, and the maximum value of torque. We discussed this before, but we’ll see this in detail now.

• Maximum Torque:  Referring to the figure, you can see that when the tangent to the circle is parallel with the torque line. A line from the center O is drawn perpendicular to the torque line OE. This line, when extended further, cuts the circle at point N.

• Maximum Output Power: As you can see from the figure, the maximum output power is obtained when the tangent to the circle is parallel to the red dotted line. The perpendicular dropped from the centre to the output line ends up at the point M where it intersects the circle.

• Maximum Input Power:  The maximum input power is represented by the point R which is the highest point on the periphery of the circle formula. It is obtained when the tangent to the circle is at right angles to the horizontal line.

### Importance of a Circle Diagram

The circle diagram differs from an ordinary phasor diagram in the fact that it provides more information than a phasor diagram. We know that a phasor diagram gives the relation between current and voltage at a particular condition of the circuit. For different conditions, we have different phasor diagrams, and it is cumbersome to draw phasor diagrams for every condition. However, under several circuit circumstances, a circle diagram may be referred to as a phasor diagram shown in a single plane.

As we have already seen that we found the power output, power factor, torque, slip, copper loss, efficiency, input power, etc from the circle diagram, it is not surprising that this diagram is important for induction motors where all these parameters are crucial. A single diagram gives us information about all these parameters.

## Conclusion

An electrical machine is depicted graphically in a circle diagram. It represents the electrical machine's performance and efficiency. The circle scale may depict the same for diverse circuit conditions in a single plane, unlike the phasor diagram, which only offers us the graphical representation of a circuit under specified conditions and changes when these conditions change. The no load test, blocked rotor test and the resistance test need to be performed to get the required parameters for drawing the circle diagram. The three chief parts of the circle diagram are the maximum output power, maximum input power, and the maximum torque produced by the motor.

Competitive Exams after 12th Science

## FAQs on The Circle Diagram - Construction, Components and Application in Induction Motors

1. What are the major parts of an induction motor?

The stator, which is the motor's stationary component, transmits a revolving magnetic field to the rotor so that they can interact. The rotor, which is attached to the shaft, is the main part of the motor. The rotor rotates along with the motor shaft, which is fixed inside of it. The shaft protrudes from the motor's outer casing and enables the transmission of rotational power via a connection to an external system. Bearing and casings are also used.

2. What is the importance of Circle Diagrams in JEE?

As I mentioned earlier Circle diagram is an important tool to solve problems. But each yeartends to give one or two questions in the exam, mainly with complex roots or concepts using range and all that. It can happen that you may not find any direct questions in JEE, But it is a very fundamental and equally important concept that will help you solve other problems in JEE. And I can assure you that you have to solve the Circle Diagram at least once, be that direct question or part of the solution.


text:
문제2531--Tight words

2531: Tight words

실행시간 제한: 1 Sec  메모리사용 제한: 64 MB
제출: 2  통과: 2
[제출] [채점기록] [묻고답하기]

문제 설명

Given is an alphabet {0, 1, ... , k}, 0 <= k <= 9 . We say that a word of length n over this alphabet is tight if any two neighbour digits in the word do not differ by more than 1.

입력 설명

Input is a sequence of lines, each line contains two integer numbers k and n, 1 <= n <= 100.

출력 설명

For each line of input, output the percentage of tight words of length n over the alphabet {0, 1, ... , k} with 5 fractional digits.

입력 예시 Copy

4 1
2 5
3 5
8 7

출력 예시 Copy

100.00000
40.74074
17.38281
0.10130


text:
View Single Post
 HW Helper P: 805 Unless you have a given initial condition for y (i.e. y(a) = b), you cannot graph the indefinite integral just knowing the area under the graph. Wolfram alpha gives you a + Constant at the end, not sure why you got rid of that. However, if the problem you're working on does have an initial condition, then you can use that to find the constant and graph the integral properly.


text:
×

Simple concurrency

In $$\Delta ABC$$ , let $$D$$ be any point on $$\overline{BC}$$.Let $$\overline{DF} \ , \ \overline{DE}$$ be bisectors of $$\angle ADB \ , \ \angle ADC$$ respectively with $$E \in \overline{AC} \ , \ F \in \overline{AB}$$ . Prove that $$\overline{AD} \ , \ \overline{BE} \ , \ \overline{CF}$$ are concurrent.

Posed this while playing with a theorem ;)

Note by Nihar Mahajan
1 year, 6 months ago

Sort by:

Angle bisector theorem and cevas · 1 year, 6 months ago

Ah , I knew you would get it quickly. I used Ceva's instead of Menelaus. Nevermind Ceva's and Menelaus are brothers ;) :P · 1 year, 6 months ago

I actually meant to type ceva...haven't used the two in a while so got them mixed up haha · 1 year, 6 months ago

Lol , okay... · 1 year, 6 months ago

Can you prove the following simple fact (I tried to devise a problem out of this configuration):

Suppose the circumcircle of $$DEF$$ meets $$AD$$ again at $$X$$. Prove that the reflection of $$X$$ over $$EF$$ lies on $$BC$$ · 1 year, 6 months ago

That was nice. Let $$\overline{BC} \cap \odot DEF = \{X'\}$$ and I claim that $$X'$$ is the reflection of $$X$$. To prove this its easy to see that $$\Delta XFE \cong \Delta X'FE$$ which makes $$\Box XFX'E$$ a kite. This implies $$\overline{XX'} \perp \overline{FE}$$ and $$XK=KE$$ provided that $$\overline{FE} \cap \overline{XX'} = \{K\}$$. Thus it is proved that $$X'$$ is the reflection of $$X$$ such that $$X' \in \overline{BC}$$ · 1 year, 6 months ago

Such an easy one. Use ceva's theorem and angle bisector property. · 1 year, 6 months ago

Try proving it with another method. · 1 year, 6 months ago

Nihar, I suppose u are an Indian. If u like geometry try solving INMO 1994 question number 5. It is in one of my notes(rather the only note). https://brilliant.org/discussions/thread/amazing-geometry-question/ · 1 year, 6 months ago

We can prove it by co-ordinate geometry but then it would be tedious. · 1 year, 6 months ago

we need to prove (BD/DC)(CE/AE)(AF/BF) = 1 · 1 year, 6 months ago

Where's the proof? You only stated what to prove. · 1 year, 6 months ago

my geometry is weak...please show proof. · 1 year, 6 months ago

Which theorem? · 1 year, 6 months ago

Now you can see that some people have already taken its name ;) · 1 year, 6 months ago

ceva theorm has something with concurrent.... · 1 year, 6 months ago

It does not have "something" , it is fully based on concurrency :) · 1 year, 6 months ago


text:
# Linear dependency of Vectors above R and C and the det

• I
consider the two vectors v1 = (3i, 2), v2 = (-3, 2i). in C^2

Above C we get, v1 * i = v2, therefore they are dependent.

Now above R, we can't see that they are dependent.

Why if i take the determinant of those vectors i get get 0 |v1 v2| = 2x2 matrix = 0 ( which means two column vectors are independent). Does the determinant works only above C in this case because above R they are independent and yet we get same result of the determinant?

mathwonk
Homework Helper
2020 Award
those vectors have 2 entries over C but 4 entries over R. Then the (real) matrix of the two vectors is 2 x 4, and it will not have all 2x2 sub determinants equal to zero. so the determinant method still works over R, but you have to express the vectors in terms of a real basis, which takes 4 basis vectors, hence 4 real entries for your vectors.

fresh_42
Mentor
Your vectors are part of ##ℂ^2## and linearly dependant over ##ℂ## as you correctly said.

What you are next doing is to confuse different concepts.
If you regard the vectors over ##ℝ##, then ##i## is no longer a scalar and ##i^2 = -1## cannot be calculated. Your determinant is therefore ##6i^2 + 6## which is different from ##0 \in ℝ##. ##i## plays the same role as a variable would do,
i.e. ## v_1, v_2 ∈ ℝ^2[x] ≅ ℝ^2[\text{i}] ##.

Dank2
those vectors have 2 entries over C but 4 entries over R. Then the (real) matrix of the two vectors is 2 x 4, and it will not have all 2x2 sub determinants equal to zero. so the determinant method still works over R, but you have to express the vectors in terms of a real basis, which takes 4 basis vectors, hence 4 real entries for your vectors.
but 2x4 matrix over R means the columns are are linearly dependent. how do i write the vectors are above as 4 vector basis in R? and how do i see they are linearly independent above R in that matrix?

mathwonk
Homework Helper
2020 Award
maybe i should have said 4x2. then the columns are vectors of length 4. a real basis of C^2 is e.g., (1,0), (i,0), (0,1), (0,i). in that basis (3i,2) has real coordinate (row, since i can't write columns here) vector (0, 3, 2, 0), and (-3,2i) has coordinate vector (-3, 0, 0, 2). then the first 2x2 determinant equals 9 or -9 depending on what order you write the vectors. since there is a non zero 2x2 determinant the vectors are independent over R.

Dank2
FactChecker


text:
# Central Limit Theorem question

Suppose that $\lbrace X_i \rbrace$ are IID continuous random variables with the following common pdf:
$$f(x)=\left\{\begin{matrix} 2-2x & 0\leq x\leq1 \\ 0 & else \end{matrix}\right.$$
Let $Z$ be a standard normal random variable. Use the Central Limit Theorem to find the number $a$ so that
$$\lim_{n\rightarrow \infty}P\left ( \frac{1}{n} \sum_{i=1}^{n} X_i\leq\frac{1}{3}+\frac{2}{\sqrt n} \right ) = P(Z\leq a)$$


text:
## On the inf-sup constant of the divergence alias LBB constant

Martin Costabel and Monique Dauge

Slides and extended abstract of a talk given at the Conference on Computational Electromagnetism and Acoustics, Oberwolfach, January 20-26, 2013.

The inf-sup constant $\beta(\Omega)$ of a domain $\Omega\in\mathbb{R}^d$ is $$\beta(\Omega) = \ {\inf_{q\in L^2_\circ(\Omega)}} \ \ {\sup_{v\in H^1_0(\Omega)^d}} \ \ \frac{\big\langle \mathrm{div}\, v, q \big\rangle_\Omega} {\Vert{v}\Vert_{1,\Omega}\,\vert{q}\vert_{0,\Omega}}$$ We address its relations with the spectrum of the Schur complement of the Stokes operator, the Cosserat spectrum, the Friedrichs constant and the Horgan-Payne angle. Domains with narrow pass play an important role.

Jan 2013

 Slides    Extended abstract Oberwolfach Reports, 13, 1, 69-72 (2013)


text:
# finding infinetely many primes in three different forms of prime numbers below

here is the question:

prove that there exists infinitely many prime numbers

of the form 4k+1 and also of the form 4k+3

and also of the form 6k+5

• Can you use Dirichlet's theorem on primes in arithmetic progressions? – Daniel Fischer Sep 27 '13 at 17:58
• @DanielFischer What would be the point of the question, in that case? – Andrés E. Caicedo Sep 27 '13 at 18:01
• @AndresCaicedo It wouldn't have one. But it might be good to explicitly rule out Dirichlet's theorem. – Daniel Fischer Sep 27 '13 at 18:03
• You may want to look at this nice note by Keith Conrad. – Andrés E. Caicedo Sep 27 '13 at 18:05
• $4k+1,4k+3,6k+5$ can be verified to have infinite numbers of primes within each progression outside of Dirichlet's theorem, although the mechanisms I have seen for doing so are somewhat advanced, at least in the $4k+1$ case. Is this within the context of a class, or independent study? – abiessu Sep 27 '13 at 18:06

The proof for $4k+3$ and $6k+5$ are small variants of the usual "Euclid" proof that there are infinitely many primes.

To show that there is a prime of the form $4k+3$ that is $\gt n$, we consider the number $N=4n!-1$. Not all prime factors of $N$ can be congruent to $1$ modulo $4$, and all prime factors of $N$ are $\gt n$.

The argument for $6k+5$ is essentially the same, we use $N=6n!-1$.

The argument for $4k+1$ is harder. Let $N=(2n!)^2+1$. We then use the fact that any odd prime divisor of a number of the form $x^2+1$ must be of the shape $4k+1$. For suppose to the contrary that $p$ divides $x^2+1$, where $p$ is of the form $4k+3$. Then $x^2\equiv -1\pmod{p}$. But it is an early result in the theory of quadratic residues that the congruence $x^2\equiv -1\pmod{p}$ has no solutions if $p$ is a prime of the form $4k+3$.

• I have to say, I really like the proofs for $4k+3$ and $6k+5$. Very succint. – Patrick Sep 27 '13 at 18:24

For $4k+3$ and $6k+5$ we can have this rather elementary proof.

Suppose that $p_1,...,p_n$ are all primes of the form $4k+3$ and hence finite. Then consider $m=4p_1....p_n+3$. If $m$ is not prime then all divisors of $m$ are of the form $4k+1$. But then $m\equiv 1 \mod 4$ which is not true. Therefore $m$ should have another divisor of the form $4k+3$ which is not $p_1,...,p_n$ and hence the primes of the form $4k+3$ are infinite.

The same idea works for $6k+5$ knowing that the odd primes, apart are of the form $6k+5$ and $6k+1$ and $3$. Therefore for $p_1,...,p_n$, all primes of the form $6k+5$, $m=4p_1....p_n+3$ should have another divisor of the form $6k+5$, otherwise $m\equiv 1\text{ or }3\mod 6$.

• I think there's an error here... isn't $m$ necessarily a multiple of $3$? I think you need to exclude $3$ from your list of primes to make this work. – MartianInvader Sep 27 '13 at 18:33
• @MartianInvader, thanks for noting the subtle point. – Arash Sep 27 '13 at 18:39


text:
Calculus (3rd Edition)

We have $$\lim _{x \rightarrow 0^{-}} \frac{\lfloor x\rfloor}{x}=\frac{-1}{0^-}=\infty$$ so the limit does not exist.


text:
A problem of rarity [closed]

Given a positive input $$\n > 0\$$, output the amout of two types based on their rarity. The two types are called $$\A\$$ and $$\B\$$, we know the followings:

• $$\n\$$ is a limited input and the maximum is $$\nmax\$$
• At the start $$\B\$$ is twice as rare as $$\A\$$
• As the presence of $$\A\$$ increade the rarity of $$\B\$$ decreases
• When $$\n\$$ = $$\nmax\$$, $$\A\$$ will be equal to $$\B\$$
• When $$\n\$$ is not $$\nmax\$$, $$\A\$$ cannot be equal to $$\B\$$
• The value of $$\A\$$ and $$\B\$$ cannot be decimal.

Example

nmax = 10

n = 1, output = [1A, 0B]
n = 2, output = [2A, 0B]
n = 3, output = [2A, 1B]
n = 4, output = [3A, 1B]
n = 5, output = [3A, 2B]
n = 6, output = [4A, 2B]
n = 7, output = [4A, 3B]
n = 8, output = [5A, 3B]
n = 9, output = [5A, 4B]
n = 10, output = [5A, 5B]

Shortest code win.

• So we have $n = A+B$ for any $n$ and $nmax = 2A = 2B$. Is that correct? If so, is $nmax$ guaranteed to be even? Apr 12 '21 at 9:37
• Is $nmax$ another output? Or is it a constant which will always be $10$? May I output some values different to current one while it meets all requirements here? Or should I output exactly the same values as the example shown?
– tsh
Apr 12 '21 at 9:51
• Say may I implement $A_{nmax}(n)=\min\left\{n, nmax\right\}$, $B_{nmax}(n)=\max\left\{n - nmax, 0\right\}$?
– tsh
Apr 12 '21 at 9:53
• Sorry it's my first question in this stack, i'll try to edit and be more clear. Apr 12 '21 at 10:20
• Welcome to Code Golf and nice first question! For future reference, we recommend using the Sandbox to get feedback on challenge ideas before posting them to main Apr 12 '21 at 12:25

JavaScript (Node.js), 25 bytes

m=>n=>[a=n/2+(n<m)|0,n-a]

Try it online!

JavaScript (Node.js), 24 bytes

m=>n=>[b=n-(n<m)>>1,n-b]

Try it online!

JavaScript (ES6), 28 bytes

Expects (nmax)(n). Returns [B,A].

(This is based on my current understanding of the task.)

m=>n=>[b=n/2-(n<m&~n)|0,n-b]

Try it online!

Python, 266 63 bytes

And we're down to less than half one-third one-quarter two-sevenths one-quarter of my original, so a lot less scuffed than anything I've put out, but it's a first answer:

def a(b,c):
m=(b<c)*(1-.5*(b%2))
return int(b/2+m),int(b/2-m)

Takes advantage of the fact that $$\\frac {a+1} {b+1} < \frac a b\$$, if $$\a > b\$$: after that, it's just handling evens and a few exception cases.

-58 due to Wasif and a lambda of str(int(n)), plus dropping of whitespace.

-24 due to Wasif and the lambda function 2.

-14 by Wasif again and more cleaner conditionals.

-5 due to Wasif again by dropping the last else.

-15/-1 to Dominic van Essen and Lyxal respectively.

-3 from Wasif (making a return) and -6 from Dominic Van Essen again.

-39 from pxeger due to input semantics, taking us under halfway.

-9 from pxeger and -7 from Lyxal, taking us under 100, by returning a tuple instead of a list.

-2 from Dominic Van Essen, also managing to fix an error in the process

-14 from Dominic Van Essen again, with a nice simplification.

So far, total bytes saved:

• Wasif: 104
• pxeger: 48
• Dominic Van Essen: 47
• Lyxal: 8
• This comment chain's gotten a bit long, but it's still a relevant discussion, so to reduce clutter on this post, I've moved this conversation to chat. Apr 12 '21 at 15:11

Husk, 11 10 bytes

Se≠¹÷2+¹←=

Try it online!

Se≠¹÷2+¹←=      # full program:
Se≠⁰÷2+⁰←=²⁰    # here with implicit final arguments added for clarity;