text:
# Homotopy of real projective space

This article describes the value (and the process used to compute it) of some homotopy invariant(s) for a topological space or family of topological spaces. The invariant is homotopy group and the topological space/family is real projective space
Get more specific information about real projective space | Get more computations of homotopy group

## Statement

This article describes the homotopy groups of the real projective space. This includes the set of path components $\pi_0$, the fundamental group $\pi_1$, and all the higher homotopy groups.

### The case $n = 0$

The space $\mathbb{P}^0(\R)$ is a one-point space and all its homotopy groups are trivial groups, and the set of path components is a one-point space.

### The case $n = 1$

In the case $n = 1$ we get $\mathbb{P}^1(\R)$ is homeomorphic to the circle $S^1$. We have $\pi_0(S^1)$ is the one-point space (the trivial group), $\pi_1(S^1) \cong \mathbb{Z}$ is the group of integers, and $\pi_k(S^1)$ is the trivial group for $k > 1$.

### The case of higher $n$

For $n > 1$, $\mathbb{P}^n(\R)$ has the $n$-sphere $S^n$ as its double cover and universal cover. Thus, $\pi_k(\mathbb{P}^n(\R)) \cong \pi_k(S^n)$ for $k > 1$ and $\pi_1(\mathbb{P}^n(\R))\cong \mathbb{Z}/2\mathbb{Z}$. The problem of computing the homotopy of real projective space therefore reduces to the problem of computing the homotopy of spheres.

Hence:

• $\pi_0(\mathbb{P}^n(\R))$ is the one-point space.
• $\pi_1(\mathbb{P}^n(\R))$ is the cyclic group:Z2, i.e., $\mathbb{Z}/2\mathbb{Z}$.
• $\pi_k(\mathbb{P}^n(\R))$ is the trivial group for $1 < k < n$.
• $\pi_n(\mathbb{P}^n(\R))$ is isomorphic to $\mathbb{Z}$, the group of integers.
• $\pi_3(\mathbb{P}^2(\R))$ is isomorphic to $\mathbb{Z}$, the group of integers.
• $\pi_k(\mathbb{P}^n(\R)) \cong \pi_k(S^n)$ is a finite group for $k > n, k \ne 2n - 1$.


text:
# Trait for specifying a type parameter for Into::into

There are occasionally times when it would be nice to be able to specify a type parameter for Into::into.

This doesn't happen very often—mostly just when you have a long-ish chain of method calls where the object type is changing. In that case, wrapping one part of the chain with T::from, or splitting it into multiple statements so you can specify the type in the variable binding would be kind of awkward.

I put together the following trait:

pub trait TypedInto {
fn typed_into<T>(self) -> T where Self: Into<T> { self.into() }
}

impl<T> TypedInto for T {}

And I can now specify the type for into:

let clip = clips::table.find(id).first::<db::Clip>(&*conn)?
.typed_into::<models::Clip>()
.with_associations(&*conn)?;

Am I going to regret using this? This is in the context of an application rather than a library, so I don't necessarily need to worry about anyone other than myself reading it. Is this a bad habit? Should I just be more verbose?

• One question per question, please. You are welcome to re-post the second half as a separate question. – 200_success Oct 4 '17 at 17:01
• @200_success, the second half wasn't really a second question; it was just more examples for my main question, which is whether "global" convenience functions like these are worth it in Rust. I think that question does belong here and may be specific to Rust; I haven't felt anxiety about doing things like this in other programming languages. My particular implementation of typed_into isn't even especially interesting or relevant. – kardeiz Oct 4 '17 at 17:20
• On Code Review, we have concrete discussions about specific code. If you're looking for a general opinion on the value of global convenience functions, with these code samples serving merely as examples, that's too broad. – 200_success Oct 4 '17 at 17:31
• Why not just do first::<models::Clip> and avoid the transformation? – Shepmaster Oct 7 '17 at 15:13
• @Shepmaster, db::Clip is a struct for use with Diesel where each field maps directly to a database column. models::Clip is a slightly different struct with additional fields (e.g., fields for a record's "associations"). It's just easier with Diesel to map to the DB struct and then expand from there. – kardeiz Oct 7 '17 at 21:38

The most common way to handle type-hinting Into::into in stable Rust today is via temporaries. So for the use case you have here, I'd probably write something like:

let clip = {
let clip: models::Clip = clips::table_find(id).first::<db::Clip>(&*conn)?.into();
clip.with_associations(&*conn)?
};

But honestly, I don't think anyone will get up in arms about you using TypedInto. I know I've typed .into::<Type>() a couple times, and the common place you'd see the turbofish, .collect::<Vec<_>>(), is exactly this.

For this specific case, why don't you make a common db::T -> model::T conversion? It seems to be a common thing that happens, so making it explicit may be beneficial.

But that said, why don't we take a look at nightly feature gates? Because since 2015 the RFC for Type Ascription has been merged. It introduces an expr : ty syntax to the language meant to address cases like this. So rewriting your example to use type ascription,

let clip = ((clip::table.find(id)
.first(&*conn)? : db::Clip)
.into() : models::Clip)
.with_associations(*&conn)?;

Unfortunately, the binding of type ascription, while the same as as, is lower than method call syntax (.), so the parenthesis are necessary (and rustfmt would probably not approve of the formatting I used here). There is a patch written which would cause type ascription to bind more tightly than method calls, but it was closed in favor of waiting to later RFC the change (which would be backwards compatible (probably)).

There has been some recent noise around the feature, since it would make working with Futures a lot easier (though impl Trait may also help as well). Stabilization (since it has been approved through RFC) is blocked on ensuring soundness and allowing &[1, 2, 3] : &[u8] to work, so if you'd love to see type ascription stabilize, you can help with one of those.

format: plain


text:
Solving Projectile Motion Using Energy Video Lessons

Example

# Problem: 1. Use H and b values with uncertainty to calculate the predicted range and its uncertainty in meters. Compare your predicted range to your measured range: are they consistent? Can you determine whether energy has been lost on the ramp?2. Assume that the energy lost was entirely due to friction and that the total energy of the PVC pipe is 1 meter. Use this length to compute the average force of friction. Let the values of b and H, Range measured in an experiment be:H = 64.8 ± 0.05cmb = 92.5 ± 0.05 cmRange = 120 ± 0.05cmm = 16.3g

###### FREE Expert Solution

Law of conservation of energy:

$\overline{){{\mathbf{K}}}_{{\mathbf{i}}}{\mathbf{+}}{{\mathbf{U}}}_{{\mathbf{i}}}{\mathbf{+}}{{\mathbf{W}}}_{{\mathbf{nc}}}{\mathbf{=}}{{\mathbf{K}}}_{{\mathbf{f}}}{\mathbf{+}}{{\mathbf{U}}}_{{\mathbf{f}}}}$, where Wnc is the work done by non-conservative forces such as friction.

We are required to apply the concept of uncertainty.

Rules for handling propagation of uncertainties:

Rule 1: When adding or subtracting quantities with uncertainties, we add the absolute uncertainties

Rule 2: When multiplying the quantity by a constant, the absolute uncertainty should be multiplied by the constant.

87% (196 ratings)
###### Problem Details

1. Use H and b values with uncertainty to calculate the predicted range and its uncertainty in meters. Compare your predicted range to your measured range: are they consistent? Can you determine whether energy has been lost on the ramp?

2. Assume that the energy lost was entirely due to friction and that the total energy of the PVC pipe is 1 meter. Use this length to compute the average force of friction.

Let the values of b and H, Range measured in an experiment be:

H = 64.8 ± 0.05cm

b = 92.5 ± 0.05 cm

Range = 120 ± 0.05cm

m = 16.3g


text:
Technical Article

# Five Tips for Using Functions in C-Language Firmware

January 30, 2019 by Robert Keim

## In this article we’ll conclude our exploration of C functions with some additional information and a few useful implementation techniques.

In this article we’ll conclude our exploration of C functions with some additional information and a few useful implementation techniques.

A basic C function—e.g., one or two arguments and a return value—is not a complicated thing. However, C functions are quite flexible, and by going beyond the basics you can write code more easily and introduce some beneficial characteristics into your firmware.

### Supporting Information

Sometimes I wonder if a person has to be a computer science major to fully understand C-language function prototypes. It really is a rather complicated issue. I think that firmware engineers can safely ignore the details and simply adopt a standard course of action such as the following: always include a prototype for your functions, and place these prototypes in a header file.

A function prototype is one line of code that gives the compiler the data types for a function’s arguments and return value. For example:

float ArithmeticMean(char Value1, char Value2, char Value3);

It actually is not necessary to include the name of the input parameter, because all the compiler wants to know at this point is the data type. Thus, you could also write the prototype as follows:

float ArithmeticMean(char, char, char);

I prefer to include the parameter names, probably because it allows me to create the function prototype by copying and pasting from the function definition.

Strange things can happen when function prototypes are omitted or misplaced, and in my experience the easiest way to eliminate these concerns is to place all of your function prototypes in a header file that is included in all of your project’s source files. This ensures that you can safely use any of your functions in any of your source files, because each function will always be declared (i.e., in the header file) before it is invoked.

For example, the following code snippet is taken from a file called “Project_DefsVarsFuncs.h”.

//function prototypes
void Delay_us(unsigned int DelayCount);
void Delay_10ms(unsigned int DelayCount);
void Delay_seconds(unsigned int DelayCount);
void Update_LCD(unsigned char SensorNumber, unsigned long DisplayValue);
void LCD_Clear_All();

This header file is included in my source files as follows:

//-----------------------------------------------------------------------------
// Includes
//-----------------------------------------------------------------------------
#include "Project_DefsVarsFuncs.h"

### 2. Declare Functions as Static to Avoid Naming Conflicts

As a firmware project becomes larger and more complicated, you might find that you want to reuse the same function name in different source files. You can accomplish this by using the “static” keyword. This is a situation in which you would not place the function prototype in a header file, as described above.

The “static” keyword restricts the scope of the function to one source file. This allows you to use the same function name for a different function in a different source file. In the example shown below, the project needs three different ProcessData() functions—one for analyzing ADC data, one for responding to UART commands, and one for handling I2C messages.

I would place the “static” keyword in front of the function prototype, and then the function prototype goes toward the top of the source file (i.e., before the “normal” code consisting of processor instructions inside function bodies).

The “static” keyword is also handy when multiple engineers will be working on the same firmware project. If two engineers are working in different source files, the use of static functions allows Engineer A to choose function names without worrying about the possibility that Engineer B will choose the same name for a different function.

### 3. Use a Pointer to Pass an Array to a Function

Embedded applications make frequent use of arrays—sequences of sensor readings, ADC values, short ASCII messages, and so forth. It might seem that functions are a bit awkward in this sort of development context, because you cannot pass an array to a C function. Well, it’s true that you cannot pass an array in the way that you pass an individual variable, but you can give a function access to an array’s data by using pointers.

If you include a pointer as one of the arguments and then pass the array identifier when you call the function, the statements in the function body can use that pointer to read and modify the contents of the array. If you find this concept a bit confusing, I recommend that you first read my article on arrays in C and then the first article on pointers.

### 4. You Can Call Functions Using a Pointer

A pointer is a variable that holds a memory address. This address often identifies the location of a variable or of the zeroth element of an array. However, pointers can also point to functions.

If you’ve read my first article on C functions, you know that functions are stored at specific locations in code memory just as variables are stored at specific locations in data memory. If the value stored in a pointer is the starting address of a function, you can call that function using the pointer. If you change the pointer’s value such that it equals the starting address of a different function, you can call that different function using the same pointer.

The following code snippet shows you how to declare a function pointer that can be used with functions that have three char arguments and a return type of float.

float (*Ptr_to_Function)(char, char, char);

An array identifier is essentially a pointer to the zeroth element of the array. Likewise, the name of a function is interpreted as the starting address (in code memory) of the function. Thus, you can assign a function to a function pointer as follows:

Ptr_to_Function = ArithmeticMean;

You can now invoke the function ArithmeticMean() using Ptr_to_Function. The following two statements are equivalent:

Average = ArithmeticMean(Temperature1, Temperature2, Temperature3);

Average = (*Ptr_to_Function)(Temperature1, Temperature2, Temperature3);

### 5. Use Local Variables When Possible

I think that in many cases our first instinct is to define all variables at the top of the source file and leave it at that. However, it’s good to get in the habit of using local variables in your functions. The scope of a local variable is limited to the function in which it is defined; in other words, the variable is created when the function is called and disappears when the function has completed its task.

I recommend local variables for two reasons. First, they allow you to reuse the same variable name in different functions. A complicated project may include numerous functions that need basic variables such as a loop counter. I like to repeatedly use “n” for my loop counters instead of gradually cycling through all the letters in the alphabet.

Second, use of local variables might result in faster code. I’m not an expert on compilers, but I think that a local variable is likely to be placed in a register rather than a memory location, and access to registers is faster than access to memory.

### Conclusion

We’ve covered quite a few details here related to the use of functions in the C language, and I hope that this information will help you to make your firmware more efficient and functional (no pun intended). If you have any function-related tips, feel free to share them in the comments section below.

### C Language Series

• Share
• Robin Mitchell January 31, 2019

Point 4 - That is a very handy practice in firmware!
I remember an engineering team I used to work with used this technique to create an array of functions that was used as a task schedule where each function was written as a finite state machine. That way, a simple multi-tasking system can be designed!

Like.
• Robin Mitchell January 31, 2019

Point 4 - That is a very handy practice in firmware!
I remember an engineering team I used to work with used this technique to create an array of functions that was used as a task schedule where each function was written as a finite state machine. That way, a simple multi-tasking system can be designed!

Like.
• RK37 February 14, 2019
Robin! Thanks for leaving this comment. I actually was having trouble thinking of a truly beneficial usage example for point #4, and you supplied it!
Like.


text:
Abstract and Applied Analysis

Three Homoclinic Solutions for Second-Order $p$-Laplacian Differential System

Abstract

We consider second-order $p$-Laplacian differential system. By using three critical points theorem, we establish the new criterion to guarantee that this $p$-Laplacian differential system has at least three homoclinic solutions. An example is presented to illustrate the main result.

Article information

Source
Abstr. Appl. Anal., Volume 2013, Special Issue (2013), Article ID 183585, 10 pages.

Dates
First available in Project Euclid: 26 February 2014

https://projecteuclid.org/euclid.aaa/1393450109

Digital Object Identifier
doi:10.1155/2013/183585

Mathematical Reviews number (MathSciNet)
MR3102728

Zentralblatt MATH identifier
1303.34023

Citation

Guo, Jia; Dai, Bin-Xiang. Three Homoclinic Solutions for Second-Order $p$ -Laplacian Differential System. Abstr. Appl. Anal. 2013, Special Issue (2013), Article ID 183585, 10 pages. doi:10.1155/2013/183585. https://projecteuclid.org/euclid.aaa/1393450109

References

• Z.-Q. Ou and C.-L. Tang, “Existence of homoclinic solution for the second order Hamiltonian systems,” Journal of Mathematical Analysis and Applications, vol. 291, no. 1, pp. 203–213, 2004.
• L. Wan and C.-L. Tang, “Homoclinic orbits for a class of the second order Hamiltonian systems,” Acta Mathematica Scientia. Series B, vol. 30, no. 1, pp. 312–318, 2010.
• Z.-H. Zhang and R. Yuan, “Homoclinic solutions for some second order non-autonomous Hamiltonian systems with the globally superquadratic condition,” Nonlinear Analysis: Theory, Methods and Applications, vol. 72, no. 3-4, pp. 1809–1819, 2010.
• A. Daouas, “Homoclinic orbits for superquadratic Hamiltonian systems without a periodicity assumption,” Nonlinear Analysis: Theory, Methods and Applications, vol. 74, no. 11, pp. 3407–3418, 2011.
• L. Yang, H.-B. Chen, and J.-T. Sun, “Infinitely many homoclinic solutions for some second order Hamiltonian systems,” Nonlinear Analysis: Theory, Methods and Applications, vol. 74, no. 17, pp. 6459–6468, 2011.
• Q.-Y. Zhang and C.-G. Liu, “Infinitely many homoclinic solutions for second order Hamiltonian systems,” Nonlinear Analysis: Theory, Methods and Applications, vol. 72, no. 2, pp. 894–903, 2010.
• X.-H. Tang and X.-Y. Lin, “Infinitely many homoclinic orbits for Hamiltonian systems with indefinite sign subquadratic potentials,” Nonlinear Analysis: Theory, Methods and Applications, vol. 74, no. 17, pp. 6314–6325, 2011.
• J. Yang and F.-B. Zhang, “Infinitely many homoclinic orbits for the second-order Hamiltonian systems with super-quadratic potentials,” Nonlinear Analysis: Real World Applications, vol. 10, no. 3, pp. 1417–1423, 2009.
• M.-H. Yang and Z.-Q. Han, “Infinitely many homoclinic solutions for second-order Hamiltonian systems with odd nonlinearities,” Nonlinear Analysis: Theory, Methods and Applications, vol. 74, no. 7, pp. 2635–2646, 2011.
• X.-H. Tang and L. Xiao, “Homoclinic solutions for a class of second-order Hamiltonian systems,” Nonlinear Analysis: Theory, Methods and Applications, vol. 71, no. 3-4, pp. 1140–1152, 2009.
• J.-C. Wei and J. Wang, “Infinitely many homoclinic orbits for the second order Hamiltonian systems with general potentials,” Journal of Mathematical Analysis and Applications, vol. 366, no. 2, pp. 694–699, 2010.
• M. Izydorek and J. Janczewska, “Homoclinic solutions for a class of the second order Hamiltonian systems,” Journal of Differential Equations, vol. 219, no. 2, pp. 375–389, 2005.
• X. Lv, S. Lu, and P. Yan, “Existence of homoclinic solutions for a class of second-order Hamiltonian systems,” Nonlinear Analysis: Theory, Methods and Applications, vol. 72, no. 1, pp. 390–398, 2010.
• D. Wu, X. Wu, and C. Tang, “Homoclinic solutions for a class of nonperiodic and noneven second-order Hamiltonian systems,” Journal of Mathematical Analysis and Applications, vol. 367, no. 1, pp. 154–166, 2010.
• A. Daouas, “Homoclinic orbits for superquadratic Hamiltonian systems with small forcing terms,” Nonlinear Dynamics and Systems Theory, vol. 10, no. 4, pp. 339–348, 2010.
• Y. Tian and W. Ge, “Applications of variational methods to boundary-value problem for impulsive differential equations,” Proceedings of the Edinburgh Mathematical Society, vol. 51, no. 2, pp. 509–527, 2008.
• B. Ricceri, “On a three critical points theorem,” Archiv der Mathematik, vol. 75, no. 3, pp. 220–226, 2000.
• Z. Du, X. Lin, and C.-C. Tisdell, “A multiplicity result for $p$-Lapacian boundary value problems via critical points theorem,” Applied Mathematics and Computation, vol. 205, no. 1, pp. 231–237, 2008.
• T. He and Y. Su, “On discrete fourth-order boundary value problems with three parameters,” Journal of Computational and Applied Mathematics, vol. 233, no. 10, pp. 2506–2520, 2010.
• G. Bonanno and R. Livrea, “Multiplicity theorems for the Dirichlet problem involving the $p$-Laplacian,” Nonlinear Analysis: Theory, Methods and Applications, vol. 54, no. 1, pp. 1–7, 2003.
• G.-A. Afrouzi and S. Heidarkhani, “Three solutions for a quasilinear boundary value problem,” Nonlinear Analysis: Theory, Methods and Applications, vol. 69, no. 10, pp. 3330–3336, 2008.
• L. Bai and B.-X. Dai, “Three solutions for a $p$-Laplacian boundary value problem with impulsive effects,” Applied Mathematics and Computation, vol. 217, no. 24, pp. 9895–9904, 2011.
• Y. Tian and W. Ge, “Multiple positive solutions for a second order Sturm-Liouville boundary value problem with a $p$-Laplacian via variational methods,” The Rocky Mountain Journal of Mathematics, vol. 39, no. 1, pp. 325–342, 2009.
• G. Bonanno and G. Riccobono, “Multiplicity results for Sturm-Liouville boundary value problems,” Applied Mathematics and Computation, vol. 210, no. 2, pp. 294–297, 2009.
• Y. Tian and W. Ge, “Second-order Sturm-Liouville boundary value problem involving the one-dimensional $p$-Laplacian,” The Rocky Mountain Journal of Mathematics, vol. 38, no. 1, pp. 309–327, 2008.
• B. Ricceri, “Existence of three solutions for a class of elliptic eigenvalue problems,” Mathematical and Computer Modelling, vol. 32, no. 11–13, pp. 1485–1494, 2000.
• J. Yang, Z. Wei, and K. Liu, “Existence of symmetric positive solutions for a class of Sturm-Liouville-like boundary value problems,” Applied Mathematics and Computation, vol. 214, no. 2, pp. 424–432, 2009.
• J. Mawhin and M. Willem, Critical Point Theory and Hamiltonian Systems, vol. 74 of Applied Mathematical Sciences, Springer, New York, NY, USA, 1989.
• J. Simon, “Régularité de la solution d'une équation non linéaire dans ${\mathbb{R}}^{n}$,” in Journées d'Analyse Non Linéaire (Proc. Conf., Besançon, 1977), P. Benilan and J. Robert, Eds., vol. 665 of Lecture Notes in Mathematics, pp. 205–227, Springer, Berlin, Germany, 1978.


text:
# Tag Info

## New answers tagged deep-learning

0

You have to use 1-D CNN. Before that you must prepare your dataset in a sequential format. e.g. Below is a depiction of how the Convolution will work [Source - D2L], Study these references for Conv1D: Machine learning mastery Dive into Deep Learning

0

Convolutional 1D layers require their input in 3 dimensions: [batch], [features], [channels]. This makes good sense for 2D Convolutional layers, which are often called upon to process color images, but it can be a little confusing for 1D convolutions. The simplest solution may be to reshape your data so that it's, ([samples], 6, 1). Edit: how to reshape your ...

0

I might not get what you meant by that. I have attached the arhitecture of the model which i am trying to do and the input shape which is my input variables.

1

Sliding window in this context is regarding what is given as input to the CNN. It is a sliding window of the input image. I have seen it being used in medical domain where the images are too large to fit into a network and reshaping them into smaller sizes doesn't help. So, a sliding window is done on the bigger image and the sliding window is fed into CNN ...

0

Each sample of your dataframe is a 1D vector, you need to Conv1D (1D convolutions) with filter sizes of 3 or 5. If you want to convert each sample of yours into an image, you need to do some pre-processing. Here's a paper which does that: paper. Also, since this a tabular data, if you want to stick to neural networks then consider TabNet. It has ...

0

This is an anomaly detection problem. In your case, we would refer to it as supervised anomaly detection problem as you have the labels of categories. This typically involves taking a large "normal" dataset, in this case, this would be receipts which are valid. And then using a machine learning method to learn features from this dataset (e.g. the ...

0

You can do structured pruning for MLPs. You would remove things like whole neurons or layers (not specific weights).

0

You can use tf.image.resize, as follows: (x_train, y_train), (_, _) = tf.keras.datasets.mnist.load_data() print(x_trian.shape) # (60000, 28, 28) # train set / data x_train = np.expand_dims(x_train, axis=-1) x_train = tf.image.resize(x_train, [32,32]) # if we want to resize print(x_train.shape) # (60000, 32, 32, 1)

2

For the latest practices of deep learning architectures, I follow the Kaggle latest Competition's notebooks. Say, for example, In the recent finished Cassava Leaf Deasese Computer Vision Competition, People are sharing the experimental notebooks on different State of the art Architectures Like Vision Transformer(Various versions pretrained - ...

1

Policies found by Deep Q-Learning, even after convergence, are not guaranteed to be optimal. The reason is that the neural networks that approximate the Q function in DQN inherently come with a statistical error (bias and variance), a pointer can be found here. Furthermore, convergence to the optimal policy for tabular Q-learning is only guaranteed when ...

0

What you are describing does not require a change in the deep learning models you would use but a change in how to estimate them: you need an online estimation procedure rather than an off-line one. You can have a look at the seminal work of Botou [1998], or Chapter 8 of the book by Goodfellow et al. (2016).

0

Given you already have the tf.data.Dataset, one way to do it would be to iterate over the dataset and each time you come across a new label, save that e.g. to a dictionary, otherwise skip an already seen label. Here is a short example just using the MNIST dataset that comes with tensorflow: import matplotlib.pyplot as plt import tensorflow as tf (x_train, ...

0

According to the Cambridge Dictionary saturation means the act or result of filling a thing or place completely so that no more can be added In this context, it refers to a function for which a bigger input will not lead to a relevant increase in output. So if the gradient is saturated (meaning it is extremely close to zero), a bigger upstream gradient ...

0

Well, yes there are. One of the applications of GANs is image inpainting which is widely used in Photoshop-like applications. You can omit an obstacle that prohibits you to see the entire image and use GANs to see, generate, the original object without any other disturbing objects that may not let you see the desired object entirely.

0

Your data is a good candidate for a mixed effect model. You have two potential random effects that look to be crossed: I see ID as one and state as another, as it seems that any ID can belong to any state. Essentially, you can leverage the fact that some states and some IDs will have less data than others (and in general, some states and IDs will vary more ...

1

In various ways suchs as momentum: think of momentum as a means of dampening oscillations and speeding up the iterations, leading to faster convergence. This means replacing gradients with a leaky average over past gradients. sparse features and preconditioning (Adagrad): decrease the learning rate dynamically on a per-coordinate basis. This means, use the ...

0

This might help if what you're asking is related to merging models: Merging two different models in Keras

0

Most Imagenet pretrained CNNs were trained on 224x224 image resolution. It is a common misconception, that when using these pretrained CNN, images need to be resized to 224x224. On the contrary, popular CNN are fully convolutional nets that can accept any input size. You can input any image size and these CNN output feature maps that are 32x times smaller. ...

0

There was a Contest in Kaggle - SIIM-ISIC Melanoma Classification. In this contest also tasks for participants to classify two class: malignant & benign. But in the dataset, there were the same images in both the class. And this produces the Dataleakage. Dataleakage, also can produce in the same class images both in the training and in the validation ...

1

For starters, it depends on why you're trying to create Document Embeddings. There's the TF-IDF algorithm; it's simple to grasp and implement, and it facilitates using cosine distance as a metric. To train in parallel, you could probably feed both documents to the model and have a synchronized counter doing the calculations such as Term Frequency and Inverse ...

0

Having N encoders would multiply the number of parameters of the encoder side N times, which would lead to different learning dynamics, so the results would probably not the same, and you may incur in overfitting. I don't think there is a case where that would make more sense than having a single encoder.

1

If the image will always be the same and your ROI will always be in the same location, then an RNN with CV2 is not necessary, you can mark the areas that you need to extract the texts. I even recommend you more like JaidedAI / EasyOCR. Here is the google colab of the papers you sent: Information extraction

1

Why is potentially hidden in your feature explanations. Given that your Features give some indication on why, like Patient demographics data, or some other Features that you can include here, you can use them to answer the why. Like this using shapley and or eli5 you can integrate it with your Standard predictor classes and for the explanations with user ...

0

Might your CNN architecture is not suitable for this data, but just slight modification can be better. You need to try other CNNs, vary parameters, and try.

1

I understand that you are doing only inference, so you shouldn't need your model to be trainable, and therefore you can set the parameter trainable to False when invoking hub.Module.

1

In multiclass problem use softmax activation function. For example, in Keras you put 3 neurons: model.add(Dense(3, activation='softmax')) As a loss function you can choose Categorical Crossentropy: loss=tf.keras.losses.CategoricalCrossentropy() So that you compile model: model.compile(loss=tf.keras.losses.CategoricalCrossentropy(), optimizer=...

2

Binary cross-entropy is only a suitable loss function if you are performing binary (two-class) classification problems. If you add a third "neutral" class, it's no longer appropriate. There are two ways you could frame your problem: Multi-class classification. In that case, the suggestion to use an output layer with three neurons and softmax ...

4

If you’re going to have more than two labels, you need to go with a softmax activation and a loss for multi class classification, ie cross entropy loss. Also, be cautious for multi-class versus multi-label (below). Multi-class One-of-many classification. Each sample can belong to ONE of $C$ classes. The model will have $C$ output neurons that can be ...

0

The solution for my problem was implementing Batch Renormalization: BatchNormalization(renorm=True). In addition normalizing the inputs helped a lot improving the overall performance of the neural network.

0

These numbers refer to minibatches, not individual samples. The data is not fed to the model one by one, but in small groups called "minibatches" or simply "batches". The size of the minibatch (the number of elements to be included in each minibatch) can be specified as a parameter to the fit method. As you did not provide any value, it ...

2

Disclaimer: i am one of the authors of the referenced link. If you are doing pure image classification/segmentation, I would say no. I would not store the output of convolution layers, noramlly. In principle, the output of models can be stored in the feature store, however. Feature stores store data in tabular file formats (like parquet) and are used to ...

0

Line search may help with exploding/vanishing gradient problem. However, line search does not work well with mini-batches and most training uses mini-batches. One of the main advantages of line search is that it tells you whether you have stepped too far. That advantage disappears when you subsample the data.

0

I've finally found a way to forecast values based on predicted values from the earlier observations. As expected, the predictions were rather accurate in the short-term, slightly becoming worse in the long term. It is not so surprising that the future predictions digress over time, as they no longer depend on the actual values. Reflecting on my results and ...

0

This is because the calculation of the loss and accuracy are done before the first weight update (i.e. the model with the initialized parameters). After the loss is calculated the first time the loss is used to backpropagate the error throughout the network and to update the parameters. The loss is not calculated again during training (since this would just ...

2

The teacher/student model approach (at least as I understand it) could be used. It is normally used to replace all layers, but there is nothing stopping you applying it to a subset of layers. First you create training data, by running your training data through the (trained) network, and recording the inputs to layer i, as your new training data (x) and the ...

1

The choice for the number of neurons in the last two dense layers and the number of filter is somewhat arbitrary and most of the time determined by trying different configurations (using something like a hyperparameter grid search). See also this answer on stats stackexchange. If you want to change the size of the 5x5 kernels you will only have to change the ...

1

All these parameters are trainable. Note that in normal Transformers it is typical to have fixed (non-trainable) positional embeddings, but in BERT they are learned. Note also the "pooler" component, which is an extra projection that was not mentioned in the paper, but which the authors commented on later.

1

I think that the "neurons" analogy is not very helpful to understand what is going on with artificial neural networks. Neural networks are not comprised by "neurons", but by differentiable operations. These operations are arbitrary, e.g. convolutions, indexing (in embeddings), pooling, etc. What you proposed is a perfectly valid building ...

0

There can be many answers for this question but probably cause it is just an unnecessary complexity. You can achieve same result (x2) with the current architecture (i.e. using multiplication layer; not to mention just squaring your input features). Why would you use something more specific and not something more general? Beside that why would your final ...

0

Following your example: The source sequence would be How are you <EOS> The input to the encoder would be How are you <EOS>. Note that there is no <start> token here. The target sequence would be I am fine <EOS> . The output of the decoder will be compared against this in the training. The input to the decoder would be <start> I ...

1

Backpropagation extends to the full model, through all decoder and encoder layers up to the embedding tables.

0

Why don't you use a lower number of filters in the last convolution? Instead of 128 you can just choose whatever number you want, e.g. 10. Also, normally after the convolutional (and pooling layers), you flatten the output (therefore losing the spatial information) and then project with a dense layer onto the final representation space. You can control the ...

1

The example you cited (using x^2 instead of x) is the idea more popular outside deep learning community, called feature engineering. The trend in neural network modeling is instead to, Play with weights (w) and fine tune them. Not change the input vector (x) but feed it to the network directly. If a single layer neural network is not good enough, add more ...

0

More gpu means more data in a batch. And the gradients of a batch data is averaged for back-propagation. If the learning rate of a batch is fixed, then the learning rate of a data is smaller. If the learning rate of a data is fixed, then the learning rate of a batch is larger. https://github.com/guotong1988/BERT-GPU

0

Usually, the input for LSTMs is a sequence that already happened regardless of train or test set. Of course you could also try inputting past predictions, but I think this would probably lead to bad results. If you want to predict further into the future you could increase the output dimension of your LSTM, however this will be more difficult for the model ...

1

I did a project with the CheXpert dataset which includes metadata and labels for uncertainty. I don't know if it's the right kind of metadata you are looking for. In general, medical datasets usually contain metadata. A similar one would be from the NIH. Otherwise, this is a decent index of high quality datasets.

0

Doesn't ConvNets allow parameters to be shared, detecting the similar features of different images? Your final statement holds true for convolutional layers which are in early layers, but final layers detect more abstract features, e.g. a full object. Consequently, the last layers of a CNN that is trained with images of flowers will not be helpful for a ...

1

I've used ECS (Fargate) to train models, the retraining trigger could be the start of an ECS service. While ECS has a little latency, it handles well long runtimes. You can then serve the model via a lambda.

1

Another option would be to apply an established Optical Character Recognition (OCR) system to the raw images. After converting the raw images to plain text, put the relevant data into a tabular dataframe. Once in a tabular dataframe, fit a deep learning or traditional machine learning model can be fit. It can be tempting to build an end-to-end deep learning ...

0

Keras should be accessed as tf.keras now with tf2 ,so your import should be written as tf.keras.callbacks.ModelCheckpoint Keras own documentation as well as tf api documentation can be easily accessed for this purpose. Keras ModelCheckpoint class mentions the following arguments in official docs: save_best_only: if save_best_only=True, it only saves when ...

Top 50 recent answers are included


text:
# Understanding out-of-sample performance metrics for Realized Volatility

I fitted several models on a realized volatility process and then proceeded to obtain out-of-sample results. I'm struggling to interpret these results apart from to tell model A seems better than model B. In particular, I am looking to answer the question: "Does model A have satisfactory forecasting performance?".

I seem to gravitate towards MAPE and MZ-R2 (Mincer-Zarnowitz R-squared). These seem to be absolute measures. I am not experienced enough to trust my judgement however.

Updated: Diebold-Mariano table.

              ARFIMA(0,d,0) HAR(1,5,22) HAR(1,4,30) S-GARCH(1,1) GJR-GARCH E-GARCH REAL-GARCH
ARFIMA(0,d,0)       1.00000     0.04714     0.04828      0.00005   0.00004 0.00000    0.48256
HAR(1,5,22)         0.04714     1.00000     0.29521      0.05598   0.05561 0.05718    0.01175
HAR(1,4,30)         0.04828     0.29521     1.00000      0.03824   0.03875 0.04002    0.01156
S-GARCH(1,1)        0.00005     0.05598     0.03824      1.00000   0.62604 0.81480    0.00031
GJR-GARCH           0.00004     0.05561     0.03875      0.62604   1.00000 0.73391    0.00030
E-GARCH             0.00000     0.05718     0.04002      0.81480   0.73391 1.00000    0.00002
REAL-GARCH          0.48256     0.01175     0.01156      0.00031   0.00030 0.00002    1.00000

• You cannot make a satisfactory conclusion from the out-of-sample loss functions between the models, since the marginal difference might be attributable to the sample size, length and time-interval. This is the reason you use forecast comparison methods: testing the statistical significance of the out-of-sample performance between the models. Above, the Mincer Zarnowitz regression would be your best choice of comparison method though.
– Pleb
Aug 23 at 15:47
• @Pleb The models all estimate the volatility process between the same dates and all use the same data. For example, REAL-GARCH gets the same RV series as ARFIMA() and HAR-RV. GARCH models estimate the volatility for the same dates in the RV process which is used as the "realized" volatility against which GARCH output can be compared.
– s5s
Aug 23 at 16:08
• Surely, but you haven't tested whether the out-of-sample loss differences are statistically different from 0 and thus I wouldn't not make the conclusion that one model is better than the other.
– Pleb
Aug 23 at 16:17
– s5s
Aug 23 at 16:25
• Yes, I'll do an answer and give you some literature you can read :-)
– Pleb
Aug 23 at 16:25

You can compare the losses against each model and determine the "best" model to be the one with the smallest losses. In many cases for larger studies, the results might be ambiguous where one or more models are favored by different loss functions. Therefore, we want to know if we can construct statistical tests that evaluates the significance of the performance, based on the loss differences between the models. It turns out that we can, and it has been studied extensively within academia.

# Forecast comparison analysis:

When we want to do a forecast comparison analysis, there is one thing we want to do: testing whether the forecast difference is statistically different from zero. If we let $$L(\theta_t, \Sigma_{it})$$ be your loss function (just think QLIKE or MSE) with $$\Sigma_{it}$$ be your covariance estimate for model $$i$$ at time $$t$$ and $$\theta_t$$ is your robust proxy (since volatility is latent). Then the loss difference can be defined as $$d_{ij,t}=L(\theta_t, \Sigma_{it}) - L(\theta_t, \Sigma_{jt})$$ with a corresponding constructed null hypothesis:

$$H_0: \quad \mathbb{E}\left[d_{ij,t}\right] = 0, \qquad \forall \: t.$$

Constructing the test-statistic, we need the standard error which is usually found by bootstrapping the loss-differences and then calculating the bootstrapped standard error (Intuitively and under enough regularity, the bootstrap standard error will be close to the population standard error). Be aware that the (composite) null hypothesis can differ slightly between each comparison method.

This is the starting point of many forecast comparison tests including the well-known Diebold-Mariano test, which is a pair-wise forecast comparison test. There exists a plephora of different forecast comparison methods, where most of them focus on comparing multiple out-of-sample forecasts at once. Before listing most of them, I want you to consider reading two articles that investigates different volatility models (measures) using forecast comparison methods:

The theoretical background for many of the forecast comparison methods is quite extensive and hard to comprehend. Thus, people tend to pick a few of the methods and get far by understanding the intuition and results behind them. From the many articles I have read, the Diebold-Mariano test is the favorite for pair-wise comparison and The Model Confidence Set for multiple forecast comparison.

# Listing different forecast comparison methods:

• Diebold-Mariano test: Diebold, Francis X., and Robert S. Mariano (2002). "Comparing predictive accuracy." They made an updated paper responding to their original paper by detailing the use and abuse of the test.

• White's test (Reality check or RC): White, Halbert (2000). "A reality check for data snooping." As described in the first article above, the RC test "lacks" in power and has a hard time distinguishing between "good" and "bad" forecasts.

• Hansens Superior Predictive Ability (SPA): Hansen, Peter Reinhard (2005). "A test for superior predictive ability." This forecast comparison method is more robust to the inclusion of poor forecast in contrast to RC.

• Romano-Wolf test: Romano, Joseph P., and Michael Wolf (2005). "Stepwise multiple testing as formalized data snooping." This is similar to SPA, however the primary difference is that the Romano-Wolf test identifies the set of models that are better than the benchmark, whereas the SPA asks the question whether any forecast is better than the benchmark.

• The Model Confidence Set (MCS) Hansen, Peter R., Asger Lunde, and James M. Nason (2011). "The model confidence set." Intuitively, this comparison test gives you a set of models within a given level of "confidence" where the selected models are "equal" in out-of-sample predictive ability. In my opinion, this is the most complicated forecast comparison method to understand from a theoretical perspective. In that regard, the authors also made another paper posing as a "guide" on using the MCS method and how to choose the best models. Here, they also lay an intuitive foundation for the test.

• Multi-Horizon SPA & MCS: R. Quaedvlieg (2020), "Multi-Horizon Forecast Comparison." In this recent article, R. Quaedvlieg provide extensions of the SPA & MCS tests to jointly compare multiple horizon forecasts. He further concludes that the tests lead to more coherent results. Comparing model forecasts at many individual horizons independently, will implicitly give us a multiple testing problem that leads to more type 1 errors ie. false rejections of the null (implying that models can significantly differ at a given forecast horizon). As such, in finite samples we are likely to find that a mis-specified model will outperform even the population model at one of the many horizons one could consider. Comparing all horizons jointly guards us against this problem. The multi-horizon tests are not restricted to economics, but can also be used to compare climate forecasts at different horizons et cetera.

Kevin Sheppard has provided good graphical illustrations of the SPA, Romano-Wolf, and MCS tests in a Python notebook. They are also implemented in his arch package.

I am by no means an expert on the forecast comparison methods detailed above. However, you can get far by understanding the intuition behind the methods (pick one or two out) and how to interpret the output. Understanding the theoretical results behind the tests are not needed in order to use them. I hope this helps.

• I should probably ask this as a separate question. If DM(modelA, modelB) > 0.05 and DM(modelB, modelC) > 0.05 but DM(modelA, modelC) < 0.05 then would one conclude that modelA and modelC have the same predictive power?
– s5s
Aug 23 at 19:09
• @s5s You're making isolated pairwise tests. Thus IMO, the interpretation will only lie on the DM(model A, model C). AFAIK, assuming you have many models, and make many DM-tests (multiple tests), then you'll not control for type 1 errors which will lead to more false rejections of the null. Many multiple comparison methods control for type 1 errors by controlling the familywise error rate FWER, including the MCS (briefly specified in the updated DM paper). Currently, this is the best answer I can give you. For a bulletproof answer you should ask on Stats.SE
– Pleb
Aug 23 at 21:30


text:
# Group Irregularity Strength of Connected Graphs

Group Irregularity Strength of Connected Graphs - Descarga este documento en PDF. Documentación en PDF para descargar gratis. Disponible también para leer online.

Descargar gratis o leer online en formato PDF el libro: Group Irregularity Strength of Connected Graphs
We investigate the group irregularity strength ($s g(G)$) of graphs, i.e. the smallest value of $s$ such that taking any Abelian group $\gr$ of order $s$, there exists a function $f:E(G) ightarrow \gr$ such that the sums of edge labels at every vertex are distinct. We prove that for any connected graph $G$ of order at least 3, $s g(G)=n$ if $n eq 4k+2$ and $s g(G)\leq n+1$ otherwise, except the case of some infinite family of stars.

Autor: Marcin Anholcer; Sylwia Cichacz; Martin Milanic

Fuente: https://archive.org/

DESCARGAR PDF


text:
NEW
New Website Launch
Experience the best way to solve previous year questions with mock tests (very detailed analysis), bookmark your favourite questions, practice etc...

GATE CE 2000

Exam Held on Thu Jan 01 1970 00:00:00 GMT+0000 (Coordinated Universal Time)
Click View All Questions to see questions one by one or you can choose a single question from below.

GATE CE

Consider the following two statements.
$$(I)$$ The maximum number of linearl...
If $$A,B,C$$ are square matrices of the same order then $${\left( {ABC} \right)^... The Taylor series expansion of sin$$x$$about$$x = {\pi \over 6}$$is given b... Limit of the function
$$f\left( x \right) = {{1 - {a^4}} \over {{x^4}}}\,\,...
If $$f\left( {x,y,z} \right) =$$
$${\left( {{x^2} + {y^2} + {z^2}} \right)... Consider the following integral$$\mathop {Lim}\limits_{x \to 0} \int\limits_1^a...
Let $$F\left( s \right) = L\left[ {f\left( t \right)} \right]$$ denote the Lapla...
Two Samples of Water A and B have pH values of a 4.4 and 6.4 respectively. How m...
Cavitation is caused by
A soil sample has a void ratio of 0.5 and its porosity will be closed to
A borrow pit soil has a dry density of 17 kN/m3. How many cubic meter...
If duty (D) is 1428 hectares/cumec and base period (B) is 120 days for an irriga...
A tube well having a capacity of 4 $$m^3 /hour$$ operates for 20 hours each day ...
The working stress method of design specifies the value of modular ratio, $$m = ... The following two statements are made with reference to a simply supported under... Assume straight line instead of parabola for stress-strain curve of concrete as... Assume straight line instead of parabola for stress-strain curve of concrete as... A continuous beam$$250\,mm \times 450\,mm$$carries$$6$$numbers of$$12m...
A simply supported rectangular prestressed concrete beam $$200$$ $$mm$$ wide an...
A $$12$$ $$mm$$ bracket plate is connected to a column flange as shown in the fi...
The stress-strain diagram for two materials A and B is shown below: <img alt="ga...
Pick the incorrect statement from the following four statements:
A frame $$ABCD$$ is supported by a roller at $$A$$ and is on a hinge at $$C$$ as...
A two span beam with an internal hinge is shown below. <img class="question-imag...
For the structure shown below, the vertical deflection at point $$A$$ is given b...
Four column of the same material having identical geometric properties are supp...
The following two statements are made with reference to the planar truss shown b...
Identify the FALSE statement from the following, pertaining to the methods of st...
A simply supported beam with an overhang is traversed by a unit concentrated mom...
For the structure shown below, the vertical deflection at point $$A$$ is given b...
A frame $$ABCD$$ is supported by a roller at $$A$$ and is on a hinge at $$C$$ as...
Identify the correct deflection diagram corresponding to the loading in the plan...
The four cross sections shown below are required to be ordered in the increasing...
A cantilever beam of length $$L$$ and a cross section with shape factor $$'f'$$ ...
Width of carriage way for a single lane is recommended to be
The ruling minimum radius of horizontal curve of a national highway in plain ter...
Design rate of super elevation for horizontal highway curve of radius 450 m for ...

Joint Entrance Examination

JEE Main JEE Advanced WB JEE


text:
# Security of RSA signature using PKCS 1.5

I'm using mbedTLS to generate RSA signatures, and using PKCS 1.5 I get consistent signature output.

I wanted to ask/confirm here that this is secure? There's surely got to be a reason for the PSS scheme, but some googling around left me feeling 1.5 is unbroken and 2.1 is just for a proof.

Consistent signatures a great for testing, and anything that RELIES on good entropy for security is a huge risk in my mind. So if someone can confirm my common sense isn't broken I'd much appreciated it.

If you do take shortcuts like checking only the hash part of the message hash representative, you may set yourself up Coppersmith- or Bleichenbacher-style attacks when $e = 3$, like the attack poncho sketched a while back.


text:
Want to see correct answers?
Login or join for free!

Looking for Geometry worksheets?
Check out our pre-made Geometry worksheets!
 Tweet
Filter By Grade

You are browsing Grade 7 questions. View questions in All Grades.

Seventh Grade (Grade 7) Circles Questions

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

1 2 3 4 ... 6
Grade 7 Circles CCSS: 7.G.B.4
Find the area of a circle where r = 7 m. Use pi = 3.14.
1. $153.86m^2$
2. $43.96m^2$
3. $13.28m^2$
4. $153m^2$
Grade 7 Circles
The distance around a circle
1. Circle
2. Circumference
3. Complementary
4. Coefficient
Grade 7 Circles CCSS: 7.G.B.4
Grade 7 Circles CCSS: 7.G.B.4
Grade 7 Circles
Grade 7 Circles CCSS: 7.G.B.4
Grade 7 Circles CCSS: 7.G.B.4
What is the formula to finding the circumference of a circle?
1. c = pi x diameter
2. c = pi x radius
3. c = pi x 3.14
Grade 7 Circles
Grade 7 Circles
How far will a wheel of radius 2 feet travel in 500 revolutions ?
1. $1500pi$
2. $1000pi$
3. $500pi$
4. $2000pi$
Grade 7 Circles CCSS: 7.G.B.4
Grade 7 Circles CCSS: 7.G.B.4
Grade 7 Circles
Which part of the circle is shown?
1. radius
2. center
3. diameter
Grade 7 Circles CCSS: 7.G.B.4
How do we find the area of a circle?
1. Length x Width
2. Base x Height
3. Pi x Radius Squared
4. Pi x Diameter
5. 1/2 x Base x Height
1 2 3 4 ... 6
You need to have at least 5 reputation to vote a question down. Learn How To Earn Badges.


text:
# Continued fractions and pi

I suggest the following activity for bright middle-school students who think that they know everything that there is to know about fractions.

The approximation to $\pi$ that is most commonly taught to students is $\displaystyle \frac{22}{7}$. As I’ll discuss, this is the closest rational number to $\pi$ using a denominator less than $100$. However, it is possible to obtain closer rational approximations to $\pi$ using larger numbers. Indeed, the ancient Chinese mathematicians were superior to the ancient Greeks in this regard, as they developed the approximation

$\pi \approx \displaystyle \frac{355}{133}$

It turns out that this is the best rational approximation to $\pi$ using a denominator less than $16,000$. In other words, $\displaystyle \frac{355}{133}$ is the best approximation to $\pi$ using a reasonably simple rational number.

Step 1. To begin, let’s find $\pi$ with a calculator. Then let’s now subtract $3$ and then find the inverse.

This calculation has shown that

$\pi = \displaystyle 3 + \frac{1}{7.0625133\dots}$

If we ignore the $0.0625133$, we obtain the usual approximation

$\pi \approx \displaystyle 3 + \frac{1}{7} = \frac{22}{7}$

Step 2. However, there’s no reason to stop with one reciprocal, and this might give us some even better approximations. Let’s subtract $7$ from the current denominator and find the reciprocal of the difference.

At this point, we have shown that

$\pi = \displaystyle 3 + \frac{1}{7 + \displaystyle\frac{1}{15.9965944\dots}}$

If we round the final denominator down to $15$, we obtain the approximation

$\pi \approx \displaystyle 3 + \frac{1}{7 + \displaystyle\frac{1}{15}}$

$\pi \approx \displaystyle 3 + \frac{1}{~~~\displaystyle \frac{106}{15}~~~}$

$\pi \approx \displaystyle 3 + \frac{15}{106}$

$\pi \approx \displaystyle \frac{333}{106}$

Step 3. Continuing with the next denominator, we subtract $15$ and take the reciprocal again.

At this point, we have shown that

$\pi = \displaystyle 3 + \frac{1}{7 + \displaystyle\frac{1}{15 + \displaystyle \frac{1}{1.00341723\dots}}}$

If we round the final denominator down to $1$, we obtain the approximation

$\pi \approx \displaystyle 3 + \frac{1}{7 + \displaystyle\frac{1}{16}}$

$\pi \approx \displaystyle 3 + \frac{1}{~~~\displaystyle \frac{113}{16}~~~}$

$\pi \approx \displaystyle 3 + \frac{16}{113}$

$\pi \approx \displaystyle \frac{355}{113}$

Step 4. Let me show one more step.

At this point, we have shown that

$\pi = \displaystyle 3 + \frac{1}{7 + \displaystyle\frac{1}{15 + \displaystyle \frac{1}{1 + \displaystyle \frac{1}{292.634598\dots}}}}$

If we round the final denominator down to $292$, we (eventually) obtain the approximation

$\pi \approx \displaystyle \frac{52163}{16604}$

The calculations above are the initial steps in finding the continued fraction representation of $\pi$. A full treatment of continued fractions is well outside the scope of a single blog post. Instead, I’ll refer the interested reader to the good write-ups at MathWorld (http://mathworld.wolfram.com/ContinuedFraction.html) and Wikipedia (http://en.wikipedia.org/wiki/Continued_fraction) as well as the references therein.

But I would like to point out one important property of the convergents that we found above, which were

$\displaystyle \frac{22}{7}, \frac{333}{106}, \frac{355}{113}, ~ \hbox{and} ~ \frac{52163}{16604}$

All of these fractions are pretty close to $\pi$, as shown below. (The first decimal below is the result for $22/7$.)

In fact, these are the first terms in a sequence of best possible rational approximations to $\pi$ up to the given denominator. In other words:

• $\displaystyle \frac{22}{7}$ is the best rational approximation to $\pi$ using a denominator less than $106$. In other words, no integer over $8$ will be any closer to $\pi$ than $\displaystyle \frac{22}{7}$.  No integer over $9$ will be any closer to $\pi$ than $\displaystyle \frac{22}{7}$. And so on, all the way up to denominators of $105$. Small wonder that we usually teach children the approximation $\pi \approx \displaystyle \frac{22}{7}$.
• Once we reach $106$, the fraction $\displaystyle \frac{323}{106}$ is the best rational approximation to $\pi$ using a denominator less than $113$.
• Then $\displaystyle \frac{355}{113}$ is the best rational approximation to $\pi$ using a denominator less than $16604$.

As noted above, the ancient Chinese mathematicians were superior to the ancient Greeks in this regard, as they were able to develop the approximation $\pi \approx \displaystyle \frac{355}{113}$. For example, Archimedes was able to establish that

$3\frac{10}{71} < \pi < 3\frac{1}{7}$


text:
# Thread: Laurent series and residue

1. ## Laurent series and residue

Find the Laurent series for the given function about the indicated point. Also, give the residue of the function at the point.

(1) $\frac{z^2}{z^2-1}$; $z_0=1$

Thanks

2. This is what I got so far:

$\frac{z^2}{z^2-1}$ = $\frac{1}{z^2-1} + 1$

= $1 + \frac{A}{z-1}+\frac{B}{z+1}$

$A=1/2, B=-1/2$

= $1+\frac{1}{2}(\frac{1}{z-1})-\frac{1}{2}(\frac{1}{z+1})$

$1 +\frac{1}{2}\frac{1}{z-1} = \frac{1}{2}\frac{1}{z+1}$

Any idea what I do from there? Thanks!

3. You have $1+1/2\frac{1}{z-1}-1/2\frac{1}{z+1}$ so need to express the last one in terms of $z-1$. That's not hard, just subtract and add one in the denominator:

$\frac{1}{z+1}=\frac{1}{z+1-1+1}=\frac{1}{2+(z-1)}=\frac{1}{2-(-(z-1))}=1/2\frac{1}{1-\frac{-(z-1)}{2}}$

Now, just finish it by expressing the last expression as a sum.

(1) $\frac{z^2}{z^2-1}$; $z_0=1$
The function has form $\frac{f(z)}{g(z)}$ and $g'(z_0) \not = 0$.
Therefore, the residue is given by $\frac{f(z_0)}{g'(z_0)} = \frac{1}{2}$.


text:
Exhibit the idempotents in a given semigroup of matrices

Let $S \subseteq \mathsf{Mat}_2([-1,1])$ denote the set of all $2 \times 2$ matrices with entries in $[-1,1] \subseteq \mathbb{R}$ such that one row consists of all 0s. Show that $S$ is a semigroup under matrix multiplication and exhibit its idempotents.

The elements of $S$ come in two flavors, $A$ and $B$, where $A = \left\{ \begin{bmatrix} a & b \\ 0 & 0 \end{bmatrix} \ |\ a,b \in [-1,1] \right\}$ and $B = \left\{ \begin{bmatrix} 0 & 0 \\ a & b \end{bmatrix} \ |\ a,b \in [-1,1] \right\}$. Clearly $A \cap B = 0$. (If $A$ is vanilla and $B$ is chocolate, then the zero matrix is swirl.)

Since $S$ is a subset of the known semigroup $\mathsf{Mat}_2(\mathbb{R})$ under multiplication, it suffices to show that $S$ is closed. To that end, it suffices to consider four cases. In what follows, let $a_i,b_i \in [-1,1]$. (Note that $[-1,1]$ is closed under multiplication.)

• $\begin{bmatrix} a_1 & b_1 \\ 0 & 0 \end{bmatrix} \begin{bmatrix} a_2 & b_2 \\ 0 & 0 \end{bmatrix} = \begin{bmatrix} a_1a_2 & a_1b_2 \\ 0 & 0 \end{bmatrix} \in S$
• $\begin{bmatrix} a_1 & b_1 \\ 0 & 0 \end{bmatrix} \begin{bmatrix} 0 & 0 \\ a_2 & b_2 \end{bmatrix} = \begin{bmatrix} b_1a_2 & b_1b_2 \\ 0 & 0 \end{bmatrix} \in S$
• $\begin{bmatrix} 0 & 0 \\ a_1 & b_1 \end{bmatrix} \begin{bmatrix} a_2 & b_2 \\ 0 & 0 \end{bmatrix} = \begin{bmatrix} 0 & 0 \\ a_1a_2 & a_1b_2 \end{bmatrix} \in S$
• $\begin{bmatrix} 0 & 0 \\ a_1 & b_1 \end{bmatrix} \begin{bmatrix} 0 & 0 \\ a_2 & b_2 \end{bmatrix} = \begin{bmatrix} 0 & 0 \\ b_1a_2 & b_1b_2 \end{bmatrix} \in S$

So $S$ is indeed a semigroup.

Suppose now that $M = \begin{bmatrix} a & b \\ 0 & 0 \end{bmatrix} \in A$ is a nonzero idempotent. Then we have $M = M^2 = \begin{bmatrix} a^2 & ab \\ 0 & 0 \end{bmatrix}$, and comparing entries, $a = a^2$ and $b = ab$. Now $a(a-1) = 0$ in $\mathbb{R}$, so that either $a = 0$ or $a = 1$. But if $a = 0$, then $b = 0$, so $M = 0$. Thus $a = 1$. Indeed, $\begin{bmatrix} 1 & b \\ 0 & 0 \end{bmatrix}$ is idempotent.

Similarly, if $M = \begin{bmatrix} 0 & 0 \\ a & b \end{bmatrix} \in B$ is a nonzero idempotent, then $b = 1$, and conversely.

So the idempotents in $S$ are either 0, $\begin{bmatrix} 1 & b \\ 0 & 0 \end{bmatrix}$ for some $b \in [-1,1]$, or $\begin{bmatrix} 0 & 0 \\ a & 1 \end{bmatrix}$ for some $a \in \mathbb{R}$.