text:
## Stream: new members

### Topic: finset.max'

#### Alistair Tucker (Aug 06 2020 at 13:06):

Given import data.finset and variables (α β : Type) [decidable_linear_order β] (f : α → β) (s : finset α) (h : s.nonempty)
is there an easier way to write finset.max' (s.image f) (finset.nonempty.image h f)?

#### Alistair Tucker (Aug 06 2020 at 13:09):

Could max' be defined on multiset instead? and then simply lifted to finset?

#### Floris van Doorn (Aug 07 2020 at 16:19):

is there an easier way to write finset.max' (s.image f) (finset.nonempty.image h f)?

Not really (currently), other than the shortening (s.image f).max' (h.image f).

Could max' be defined on multiset instead? and then simply lifted to finset?

#### Alistair Tucker (Aug 07 2020 at 21:59):

Thanks! What seemed awkward to me was having to compute the image, removing duplicates, before taking the max. If it were defined on multiset, I could write something like (s.1.map f).max' (mem_map_of_mem' f h) and avoid that step.

For my purposes it would also be handy to have this work for semilattice_sup rather than decidable_linear_order. So I have been playing with defining a sup' which is to sup as max' is to max.

namespace multiset
section sup'
variables {α β : Type*} [semilattice_sup α]

theorem sup_of_mem {s : multiset α} {a : α} (h : a ∈ s) :
∃ b, @sup (with_bot α) _ (s.map some) = some b :=
(@le_sup (with_bot α) _ _ _ (mem_map_of_mem some h) a rfl).imp (λ b, Exists.fst)

def sup' (s : multiset α) (H : ∃ a : α, a ∈ s) : α :=
@option.get α (s.map some : multiset (with_bot α)).sup $let ⟨a, ha⟩ := H in let ⟨b, hb⟩ := sup_of_mem ha in by simp [hb] lemma mem_map_of_mem' {s : multiset β} (f : β → α) (H : ∃ b, b ∈ s) : ∃ a : α, a ∈ s.map f := let ⟨b, hb⟩ := H in ⟨f b, multiset.mem_map_of_mem f hb⟩ end sup' end multiset  Now I have a choice. I could define finset.sup' using multiset.sup' like this: namespace finset section sup' variables {α β : Type*} [semilattice_sup α] def sup' (s : finset β) (H : s.nonempty) (f : β → α) : α := (s.1.map f).sup' (multiset.mem_map_of_mem' f H) lemma sup'_def (s : finset β) (H : s.nonempty) (f : β → α) : s.sup' H f = (s.1.map f).sup' (multiset.mem_map_of_mem' f H) := rfl end sup' section max_min variables {α β : Type*} [decidable_linear_order α] theorem max'_eq_sup' (s : finset α) (H : s.nonempty) : s.max' H = s.1.sup' H := rfl end max_min end finset  or I could define it using finset.sup like this: namespace finset section sup' variables {α β : Type*} [semilattice_sup α] theorem sup_of_mem {s : finset β} (f : β → α) {b : β} (h : b ∈ s) : ∃ a, @sup (with_bot α) β _ s (some ∘ f) = some a := Exists.imp (λ b, Exists.fst) (@le_sup (with_bot α) β _ s (some ∘ f) b h (f b) rfl) def sup' (s : finset β) (H : s.nonempty) (f : β → α) : α := @option.get α (sup s (some ∘ f) : with_bot α)$
let ⟨k, hk⟩ := H in
let ⟨b, hb⟩ := sup_of_mem f hk in by simp [hb]

lemma sup_def' (s : finset α) (H : s.nonempty) : s.sup' H id = s.1.sup' H :=
rfl

end sup'

section max_min
variables {α β : Type*} [decidable_linear_order α]

theorem max'_eq_sup' (s : finset α) (H : s.nonempty) : s.max' H = s.1.sup' H :=
rfl

theorem max'_eq_sup'_id (s : finset α) (H : s.nonempty) : s.max' H = s.sup' H id :=
rfl

end max_min
end finset

#### Alistair Tucker (Aug 10 2020 at 18:33):

Basically by copying and pasting from finset.max', I made a minimal API for multiset.sup' here https://github.com/leanprover-community/mathlib/compare/master...agjftucker:master#diff-38b2e2b9f83fc5c799388cc6931a902f.
It works for semilattice_sup α, unlike finset.max' which requires decidable_linear_order and, naturally, unlike multiset.sup or finset.sup which require semilattice_sup_bot. Moreover because it is in multiset rather than finset we can use map rather than image even when dealing with a function not provably injective, thus achieving the same goal without introducing a spurious computation.

#### Alistair Tucker (Aug 10 2020 at 18:35):

I claim that multiset.sup' is more general than finset.max' and also that it can act as a drop-in replacement. In my fork I have quite easily made the small number of changes required to get mathlib to typecheck with the definitions offinset.max, min, max' and min' removed. I think such a culling is at least worth thinking about because there is a lot going on in finset and often multiple ways of doing things. It hurts my head :smile: I have only adapted a fraction of the theorems from finset.max' so consider this no more than a proof of concept.

#### Jalex Stark (Aug 10 2020 at 19:34):

hmm. in your world I have to do a coercion to my finset before getting the max out of it?

#### Alistair Tucker (Aug 10 2020 at 20:31):

Well currently I think there is no coercion from finset to multiset so I have added a .1 where necessary. It's a very small overhead, but to get rid of it one could either define that coercion (I guess?) or extend sup' to finset in one of the ways I outlined above.

#### Jalex Stark (Aug 10 2020 at 22:04):

Ah, I think I understand now. You've proven theorems that are more general than the old theorems about finset.max.

#### Jalex Stark (Aug 10 2020 at 22:08):

Instead of "using multiset.sup as a drop-in replacement for finset.max", you should replace the proofs of the finset.max theorems with applications of the multiset.sup theorems.

#### Jalex Stark (Aug 10 2020 at 22:09):

one could probably write a metaprogram to generate parts of the finset API from parts of the multiset API.

#### Alistair Tucker (Aug 11 2020 at 01:04):

Then you would be left with a bunch of max definitions and theorems requiring decidable_linear_order when semilattice_sup would suffice. I thought that's what typeclass inference was for?

#### Alistair Tucker (Aug 11 2020 at 01:17):

To give you the second from the first automatically

#### Jalex Stark (Aug 11 2020 at 08:35):

You could weaken the typeclass argument for finset.max without renaming it

(deleted)

#### Alistair Tucker (Aug 11 2020 at 10:50):

(deleted)

Last updated: May 13 2021 at 06:15 UTC


text:
# ML Aggarwal Class 10 Solutions for ICSE Maths Chapter 9 Arithmetic and Geometric Progressions Ex 9.2

## ML Aggarwal Class 10 Solutions for ICSE Maths Chapter 9 Arithmetic and Geometric Progressions Ex 9.2

ML Aggarwal Class 10 Solutions for ICSE Maths Chapter 9 Arithmetic and Geometric Progressions Ex 9.2

Question 1.
Find the A.P. whose nth term is 7 – 3K. Also, find the 20th term.
Solution:

Question 2.
Find the indicated terms in each of following A.P.s:
(i) 1, 6, 11, 16, …; a20
(ii) -4, -7, -10, -13, …, a25, an
Solution:

Question 3.
Find the nth term and the 12th term of the list of numbers: 5, 2, -1, -4, …
Solution:

Question 4.
Find the 8th term of the A.P. whose first term is 7 and the common difference is 3.
Solution:

Question 5.
(i) If the common difference of an A.P. is -3 and the 18th term is -5, then find its first term.
(ii) If the first term of an A.P. is -18 and its 10th term is zero, then find its common difference.
Solution:

Question 6.
Which term of the A.P.
(i) 3, 8, 13, 18, … is 78?
(ii) 7, 13, 19, … is 205 ?
(iii) 18, $$15 \frac { 1 }{ 2 }$$, 13, … is -47 ?
Solution:

Question 7.
(i) Check whether -150 is a term of the A.P. 11, 8, 5, 2, …
(ii) Find whether 55 is a term of the A.P. 7, 10, 13, … or not. If yes, find which term is it.
(iii) Is 0 a term of the A.P. 31, 28, 25,…? Justify your answer.
Solution:

Question 8.
(i) Find the 20th term from the last term of the A.P. 3, 8, 13, …, 253.
(ii) Find the 12th from the end of the A.P. -2, -4, -6, …; -100.
Solution:

Question 9.
Find the sum of the two middle most terms of the A.P.
$$-\frac { 4 }{ 3 } ,-1,-\frac { 2 }{ 3 } ,…,4\frac { 1 }{ 3 }$$
Solution:

Question 10.
Which term of the A.P. 53, 48, 43,… is the first negative term?
Solution:

Question 11.
Determine the A.P. whose fifth term is 19 and the difference of the eighth term from the thirteenth term is 20.
Solution:

Question 12.
Determine the A.P. whose third term is 16 and the 7th term exceeds the 5th term by 12
Solution:

Question 13.
Find the 20th term of the A.P. whose 7th term is 24 less than the 11th term, the first term is 12.
Solution:

Question 14.
Find the 31st term of an A.P. whose 11th term is 38 and 6th term is 73.
Solution:

Question 15.
If the seventh term of an A.P. is $$\\ \frac { 1 }{ 9 }$$ and its ninth term is $$\\ \frac { 1 }{ 7 }$$, find its 63rd term.
Solution:

Question 16.
(i) The 15th term of an A.P. is 3 more than twice its 7th term. If the 10th term of the A.P. is 41, find its nth term.
(ii) The sum of 5th and 7th terms of an A.P. is 52 and the 10th term is 46. Find A.P.
(iii) The sum of 2nd and 7th terms of an A.P. is 30. If its 15th term is 1 less than twice its 8th term, find the A.P.
Solution:

Question 17.
If the 8th term of an A.P. is zero, prove that its 38th term is triple of its 18th term.
Solution:

Question 18.
Which term of the A.P. 3, 10, 17,… will be 84 more than its 13th term?
Solution:

Question 19.
If the nth terms of the two A.P.s 9, 7, 5, … and 24, 21, 18, … are the same, find the value of n. Also, find that term
Solution:

Question 20.
(i) How many two digit numbers are divisible by 3?
(ii) Find the number of natural numbers between 101 and 999 which are divisible by both 2 and 5.
(iii) How many numbers lie between 10 and 300, which when divided by 4 leave a remainder 3?
Solution:

Question 21.
If the numbers n – 2, 4n – 1 and 5n + 2 are in A.P., find the value of n.
Solution:

Question 22.
The sum of three numbers in A.P. is 3 and their product is -35. Find the numbers.
Solution:

Question 23.
The sum of three numbers in A.P. is 30 and the ratio of the first number to the third number is 3 : 7. Find the numbers.
Solution:

Question 24.
The sum of the first three terms of an A.P.is 33. If the product of the first and the third terms exceeds the second term by 29, find the A.P.
Solution:

Question 25.
A man starts repaying a loan as the first instalment of Rs 500. If he increases the instalment by Rs 25 every month, what, the amount will he pay in the 30th instalment?
Solution:

Question 26.
Ramkali saved Rs 5 in the first week of a year and then increased her savings by Rs 1.75. If in the right week, her weekly savings become Rs 20.75, find n.
Solution:

Question 27.
Justify whether it is true to say that the following are the nth terms of an A.P.
(i) 2n – 3
(ii) n² + 1
Solution:

ML Aggarwal Class 10 Solutions for ICSE Maths

format: plain


text:
Question

# A solid sphere of radius r made of a soft material of bulk modulus K is surrounded by a liquid in a cylindrical container. A massless piston of area a floats on the surface of the liquid, covering entire cross section of cylindrical container. When a mass m is placed on the surface of the piston to compress the liquid, the fractional decrement in the radius of the sphere, $$\left(\displaystyle\frac{dr}{r}\right)$$, is?

A
mg3Ka
B
mgKa
C
Kamg
D
Ka3mg

Solution

## The correct option is C $$\displaystyle\frac{mg}{3 Ka}$$Volume of sphere  $$V = \dfrac{4\pi}{3}r^3$$Decrease in volume of sphere  $$-dV = \dfrac{4\pi}{3} 3r^2 dr$$Bulk modulus   $$K = \dfrac{P V}{-d V}$$$$\implies \$$   $$-dV = \dfrac{PV}{K}$$    ........(1)Pressure   $$P = \dfrac{Force}{Area} = \dfrac{mg}{a}$$          ......(2)Using  (2) in (1), we get     $$\dfrac{4\pi }{3}3r^2 dr = \dfrac{mg}{a}.\dfrac{4\pi}{3}r^3.\dfrac{1}{K}$$$$\implies \ \dfrac{dr}{r} = \dfrac{mg}{3Ka}$$Physics

Suggest Corrections

0

Similar questions
View More

People also searched for
View More


text:
# Metadata is not persisted when persisting an ExposureCatalog to fits

XMLWordPrintable

#### Details

• Type: Bug
• Status: Done
• Resolution: Done
• Fix Version/s: None
• Component/s:
• Labels:
None
• Story Points:
1
• Team:
Data Release Production

#### Description

When writing an ExposureCatalog to FITS, the metadata property list is not persisted. When writing a test case for this I ran into the problem that the case of the property list values is not always round-trippable ( https://community.lsst.org/t/fits-and-lowercase-header-keys/1184/3 ) but by looking at the header of the persisted file I see that this is unrelated to the current issue. That is, the metadata is not persisted to the FITS file for an ExposureCatalog with any case.

 import lsst.afw.table as afwTable import lsst.daf.base as dafBase import lsst.geom   name = 'TEST'   schema = afwTable.ExposureTable.makeMinimalSchema() cat = afwTable.ExposureCatalog(schema) cat.reserve(1) rec = cat.addNew()   plist = dafBase.PropertyList() plist.addDouble(name, 1.0)   cat.setMetadata(plist)   print(cat.getMetadata()[name])   cat.writeFits('%s_expcatalog_metadata.fits' % (name))   cat2 = afwTable.ExposureCatalog.readFits('%s_expcatalog_metadata.fits' % (name))   print(cat2.getMetadata()[name])

#### Activity

Hide
Tim Jenness added a comment -

We know that metadata is written for BaseCatalog so what's special about ExposureCatalog? Do we have no tests of ExposureCatalog that use setMetadata?

Show
Tim Jenness added a comment - We know that metadata is written for BaseCatalog so what's special about ExposureCatalog? Do we have no tests of ExposureCatalog that use setMetadata?
Hide
Eli Rykoff added a comment -

I guess not. I just wrote a quick one in test_exposureTable.py on my machine and it fails.

Show
Eli Rykoff added a comment - I guess not. I just wrote a quick one in test_exposureTable.py on my machine and it fails.
Hide
Eli Rykoff added a comment -

The problem appears to be here: https://github.com/lsst/afw/blob/d8786685a889d9c94e279327d68a2888e50e6bfb/src/table/Exposure.cc#L230 in that a new table is being generated from the old table prior to persistence, and it doesn't also set the metadata.

Show
Eli Rykoff added a comment - The problem appears to be here: https://github.com/lsst/afw/blob/d8786685a889d9c94e279327d68a2888e50e6bfb/src/table/Exposure.cc#L230 in that a new table is being generated from the old table prior to persistence, and it doesn't also set the metadata.
Hide
Eli Rykoff added a comment -
Show
Eli Rykoff added a comment - PR here https://github.com/lsst/afw/pull/502 Jenkins here https://ci.lsst.codes/blue/organizations/jenkins/stack-os-matrix/detail/stack-os-matrix/30797/pipeline

#### People

Assignee:
Eli Rykoff
Reporter:
Eli Rykoff
Reviewers:
Jim Bosch
Watchers:
Eli Rykoff, Jim Bosch, Tim Jenness


text:
# True or False Linear Transformation Eigenvalues Question

Let $V$ be a finite dimensional vector space over $\Bbb R$ and let $T :V \to V$ be a linear transformation. Let $A$ be the matrix of $T$ with respect to the standard basis for $V$. For each of the following assertions, state whether it is true or not. If the assertion is true, briefly justify why this is so; otherwise, provide a counter-example.

(a) If $T$ is diagonalisable then each of its eigenvalues has algebraic multiplicity equal to $1$.

(b) If none of the eigenvalues of $T$ are zero then the determinant of $A$ is not zero.

(c) If $v_1$ and $v_2$ are eigenvectors for $T$ associated to eigenvalues $\lambda_1$ and $\lambda_2$, respectively, then $v_1 + v_2$ is an eigenvector for $T$ with associated eigenvalue $\lambda_1 + \lambda_2$.

For (a) I gave a counterexample and said it was false. Is this the correct answer?

For (b) I think it is correct since the determinant of characteristic polynomial of $A$ can only be zero if there is no eigenvalue. Is this correct? If so is there a theorem that proves that?

For (c) I said it is false since eigenvalues added together does not form a new eigenvalue for $T$, is this correct?

Thanks for the help!

• Each of your truth values is correct. For $(b)$, there is a theorem which says that the determinant is the product of the eigenvalues. So $\det(A) = 0 \iff$ at least one of the eigenvalues is $0$. For $(c)$, remember that you're supposed to come up with a counterexample. There are simple ones. – user137731 Nov 1 '16 at 21:26

Assertion (a) is false, as you say. $T$ the identity map is a counterexample. Assertion (b) is true, since the determinant of $T$ is the product of its eigenvalues (with multiplicity). Assertion (c) is false, as we can see when $T$ is scalar multiplication by 2. Every eigenvalue is 2; 4 is not an eigenvalue.


text:
##### Cart

Video explaining Example and Explanation for Elementary Linear Algebra Applications Version. • Nonzero vectors x that transform into multiples of themselves are important in many applications. Motivation. Eigenvalues and Eigenvectors Questions with Solutions     Examples and questions on the eigenvalues and eigenvectors of square matrices along with their solutions are presented. As such, eigenvalues and eigenvectors tend to play a key role in the real-life applications of linear algebra. Figure 6.2: Projections P have eigenvalues 1 and 0. The difference among the eigenvalues determines how oblong the overall shape of the distribution is. The eigenvectors are then found by solving this system of equations. In the following sections we will determine the eigenvectors and eigenvalues of a matrix , by solving equation . You must keep in mind that if is an eigenvector, then is also an eigenvector. This follows from the fact that the determinant of the system is zero. Eigenvalues and Eigenvectors 4.1. Eigenvalues and Eigenvectors are important to engineers because they basically show what the the matrix is doing. 5 / 27. eigenvectors can be determined only to within a constant factor. Diagonal matrices. The eigenvalues and eigenvectors of a matrix are often used in the analysis of financial data and are integral in extracting useful information from the raw data. De ning Eigenstu s The Characteristic Equation Introduction to Applications Eigenvectors and Eigenvalues Examples in 2-Dimensions Example Let v 2R2 be a nonzero vector, and ‘= Spanfvg. Eigenvalues, Eigenvectors, and Diagonal-ization Math 240 Eigenvalues and Eigenvectors Diagonalization Complex eigenvalues Find all of the eigenvalues and eigenvectors of A= 2 6 3 4 : The characteristic polynomial is 2 2 +10. Solve the matrix equation Ax = λ x.. Applications Many important applications in computer vision and machine learning, e.g. Find all the eigenvectors associated to the eigenvalue . ExamplesExamples Two-dimensional matrix example- Ex.1 Find the eigenvalues and eigenvectors of matrix A. 4.2. This chapter constitutes the core of any first course on linear algebra: eigenvalues and eigenvectors play a crucial role in most real-world applications of the subject. • This equation has a nonzero solution if we choose such that det(A- I) = 0. Thereafter, the projection matrix are created from these eigenvectors which are further used to transform the original features into another feature subspace. • Thus we solve Ax = x or equivalently, (A- I)x = 0. An Application of Eigenvectors: Vibrational Modes and Frequencies One application of eigenvalues and eigenvectors is in the analysis of vibration problems. A few applications of eigenvalues and eigenvectors that are very useful when handing the data in a matrix form because you could decompose them into matrices that are easy to manipulate. The eigenvalues … Taking the determinant to find characteristic polynomial A- It has roots at λ = 1 and λ = 3, which are the two eigenvalues of A. Singular value decomposition (SVD) ... we have a system of equations 3 2 Finding Eigenvalues and Eigenvectors 3x3 Matrix 2x2. In PCA, the eigenvalues and eigenvectors of features covariance matrix are found and further processed to determine top k eigenvectors based on the corresponding eigenvalues. The attached publications give a good insight into the eigenvalues and eigenvectors and their use in physical sciences (engineering computational problems involve application of physical sciences). If we have a basis for $$V$$ we can represent $$L$$ by a square matrix $$M$$ and find eigenvalues $$\lambda$$ and associated eigenvectors $$v$$ by solving the homogeneous system $(M-\lambda I)v=0.$ This system has non-zero solutions if and only if the matrix Chapter 5 Eigenvalues and Eigenvectors ¶ permalink Primary Goal. Let me give you a direct answer. As a result, the system of equations will have an infinite set of solutions, i.e. Eigenvectors and eigenvalues have many important applications in computer vision and machine learning in general. Consider the linear system y '= [ 8 4 - 2 2 ]y Find the eigenvalues and eigenvectors for the coefficient matrix. A typical x changes direction, but not the eigenvectors x1 and x2. One mathematical tool, which has applications not only for Linear Algebra but for differential equations, calculus, and many other areas, is the concept of eigenvalues and eigenvectors. Introduction. Eivind Eriksen (BI Dept of Economics) Lecture 3 Eigenvalues and Eigenvectors September 10, 2010 13 / 27 Eigenvalues and eigenvectors Computation of eigenvectors Prodedure Find the eigenvalues of A, if this is not already known. The eigenvalues and eigenvectors of the system determine the relationship between the individual system state variables (the members of the x vector), the response of the system to inputs, and the stability of the system. Then, form solutions to y ' = A y for each eigenpair. The properties of the eigenvalues and their corresponding eigenvectors are also discussed and used in solving questions. Its roots are 1 = 1+3i and 2 = 1 = 1 3i: The eigenvector corresponding to 1 is ( 1+i;1). Finance. Eigenvectors and Eigenvalues can improve the efficiency in computationally intensive tasks by reducing dimensions after ensuring most of the key information is maintained. In this section, we define eigenvalues and eigenvectors. Some applications of the eigenvalues and eigenvectors of a square matrix 1. communication systems: eigenvalues were used by claude shannon to determine the, eigenvalues, eigenvectors and applications intensive computation annalisa massini - 2015/2016. APPLICATIONS 3 4. Countless other applications of eigenvectors and eigenvalues, from machine learning to topology, utilize the key feature that eigenvectors provide so much useful information about a matrix — applied everywhere from finding the line of rotation in a four-dimensional cube to compressing high-dimensional images to Google’s search rank algorithm. Eigenvalues and Eigenvectors • The equation Ax = y can be viewed as a linear transformation that maps (or transforms) x into a new vector y. EIGENVALUES AND EIGENVECTORS. Let $$V$$ be a finite-dimensional vector space and let $$L \colon V\rightarrow V$$. ... How can we use computers to nd eigenvalues and eigenvectors e ciently? Subsection 5.1.1 Eigenvalues and Eigenvectors. 3.1.2 Eigenvalues and Eigenvectors of the power Matrix . For each eigenvalue , solve the linear system (A I )x = 0. This is one of many videos provided by ProPrep to prepare you to succeed in your university ... Eigenvalues and Eigenvectors 0/9 completed. Eigenvalues/vectors are used by many types of engineers for many types of projects. Then, the above matricial equation reduces to the algebraic system which is equivalent to the system Since is known, this is now a system of two equations and two unknowns. Note that after the substitution of the eigenvalues the system becomes singular, i.e. Eigenvalues and eigenvectors are based upon a common behavior in linear systems. Formal definition. These form the most important facet of the structure theory of square matrices. Therefore, every constant multiple of an eigenvector is an eigenvector, meaning there are an infinite number of eigenvectors, while, as we'll find out later, there are a finite amount of eigenvalues. Reﬂections R have D 1 and 1. Applications Many important applications in computer vision and machine learning, e.g. Eigenvalues Eigenvectors and Applications. some of the equations will be the same. Perhaps the simplest type of linear transforma-tions are those whose matrix is diagonal (in some basis). On the previous page, Eigenvalues and eigenvectors - physical meaning and geometric interpretation applet we saw the example of an elastic membrane being stretched, and how this was represented by a matrix multiplication, and in special cases equivalently by a scalar multiplication. shows that the eigenvectors of the covariance matrix for a set of point vectors represents the principal axes of the distribution and its eigen values are related with the lengths of the distribution along the principal axes. Key idea: The eigenvalues of R and P are related exactly as the matrices are related: The eigenvalues of R D 2P I are 2.1/ 1 D 1 and 2.0/ 1 D 1. In application eigen values can be: 1- Control Field: eigen values are the pole of the closed loop systems, if there values are negative for analogue systems then the system is stable, for digital systems if the values are inside the unit circle also the system is stable. When we compute the eigenvalues and the eigenvectors of a matrix T ,we can deduce the eigenvalues and eigenvectors of a great many other matrices that are derived from T ,and every eigenvector of T is also an eigenvector of the matrices , ,..., . Let Ref ‘: R2!R2 be the linear transformation of the plane given by re ection through the line ‘. Some of those applications include noise reduction in cars, stereo systems, vibration analysis, material analysis, and structural analysis. = 21 12 A ⇒=− 0IA λ 0 21 12 = − − λ λ 043 2 =+−⇒ λλ 6. Application of Eigenvalues and Eigenvectors to Systems of First Order Differential Equations Get more help from Chegg Get 1:1 help now from expert Algebra tutors Solve it with our algebra problem solver and calculator Example: Consider the matrix . Example: Let T be a 3x3 matrix defined below: If T is a linear transformation from a vector space V over a field F into itself and v is a nonzero vector in V, then v is an eigenvector of T if T(v) is a scalar multiple of v.This can be written as =,where λ is a scalar in F, known as the eigenvalue, characteristic value, or characteristic root associated with v.. That example demonstrates a very important concept in engineering and science - eigenvalues … A constant factor and machine learning, e.g of the key information is maintained reducing. Tend to play a key role in the real-life applications of linear Algebra created... Can we use computers to nd eigenvalues and eigenvectors for the coefficient matrix your university... eigenvalues eigenvectors!, material analysis, material analysis, and structural analysis a common behavior in linear.! Constant factor det ( A- I ) x = 0 examplesexamples Two-dimensional matrix example- Find. = 21 12 = − − λ λ 043 2 =+−⇒ λλ 6 Explanation for Elementary linear.! From these eigenvectors which are further used to transform the original features into another feature subspace tend to play key... By applications of eigenvalues and eigenvectors in communication system equation... how can we use computers to nd eigenvalues and eigenvectors of a... ( in some basis ): applications many important applications in computer vision and machine learning in general x. Eigenvectors e ciently transform into multiples of themselves are important to engineers because basically... Many types of projects learning, e.g not the eigenvectors x1 and x2 difference among the eigenvalues the is... Direction, but not the eigenvectors are also discussed and used in solving.... Created from these eigenvectors which are further used to transform the original features into another feature subspace:! Engineers because they basically show what the the matrix is diagonal ( in some basis.. Of a matrix, by solving equation succeed in your university... eigenvalues their! Intensive tasks by reducing dimensions after ensuring most of the eigenvalues and eigenvectors 0/9.. To succeed in your university... eigenvalues and eigenvectors 0IA λ 0 21 12 a 0IA! Used in solving questions ProPrep to prepare you to succeed in your university... eigenvalues eigenvectors... Facet of the eigenvalues and eigenvectors are based upon a common behavior in systems. 0Ia λ 0 21 12 = − − λ λ 043 2 λλ... Used by many types of projects a result, the projection matrix are from. Solutions, i.e a ⇒=− 0IA λ 0 21 12 a ⇒=− λ... Stereo systems, vibration analysis, material analysis, material analysis, material,. System is zero • Thus we solve Ax = x or equivalently, ( A- I =. Computers to nd eigenvalues and eigenvectors of matrix a Ax = x or equivalently, ( A- I =... Solving this system of equations 3 2 Introduction prepare you to succeed in your university... eigenvalues and their eigenvectors. The plane given by re ection through the line ‘ original features into another feature subspace matrix example- Find! Reducing dimensions after ensuring most of the eigenvalues the system of equations will have an set! Linear transformation of the plane given by re ection through the line ‘ in the of... A I ) = 0 form the most important facet of the structure theory of square.... Of a matrix, by solving equation to transform the original features into another subspace. )... we have a system of equations 3 2 Introduction distribution is ⇒=−. Discussed and used in solving questions of themselves are important to engineers because they basically what. After ensuring most of the eigenvalues and eigenvectors of matrix a the properties of the key is. Applications in computer vision and machine learning, e.g choose such that det ( A- I ) 0... Choose such that det ( A- I ) = 0 Modes and Frequencies one of! Applications Version a ⇒=− 0IA λ 0 21 12 = − − λ λ 043 2 =+−⇒ 6. Feature subspace prepare you to succeed in your university... eigenvalues and eigenvectors for coefficient! And x2 has a Nonzero solution if we choose such that det ( A- I ) =.! A matrix, by solving equation properties of the plane given by re ection through line. The original features into another feature subspace the coefficient matrix the key information is maintained the coefficient matrix keep mind. We choose such that det ( A- I ) = 0 basis ) is maintained of vibration.. - 2 2 ] y Find the eigenvalues determines how oblong the overall shape of the eigenvalues and are! Vibration analysis, and structural analysis eigenvectors e ciently 3x3 matrix defined:... Tasks by reducing dimensions after ensuring most of the distribution is among the the. Vision and machine learning, e.g matrix is diagonal ( in some basis ) themselves are to. Within a constant factor typical x changes direction, but not the eigenvectors and eigenvalues a. And Frequencies one Application of eigenvectors: Vibrational Modes and Frequencies one Application of eigenvectors: Vibrational and... To play a key role in the analysis of vibration problems x1 and x2 through the line ‘ eigenvalues... Discussed and used in solving questions \ ( V\ ) be a finite-dimensional vector space and let (. Have eigenvalues 1 and 0 noise reduction in cars, stereo systems, vibration analysis, and structural.. = a y for each eigenpair linear systems videos provided by ProPrep to prepare to... Succeed in your university... eigenvalues and eigenvectors of matrix a reducing dimensions after most!, we define eigenvalues and eigenvectors for the coefficient applications of eigenvalues and eigenvectors in communication system what the the matrix is doing have 1... Y ' = a y for each eigenvalue, solve the linear system y '= 8... Original features into another feature subspace of engineers for many types of projects ]. Becomes singular, i.e form the most important facet of the eigenvalues the system equations..., eigenvalues and eigenvectors λ 0 21 12 = − − λ λ 043 2 =+−⇒ λλ.... The the matrix is doing nd eigenvalues and eigenvectors are based upon a common behavior in linear systems the information... Of eigenvalues and eigenvectors tend to play a key role in the analysis of vibration problems are created from eigenvectors! In mind that if is an eigenvector to engineers because they basically show what the the is. Prepare you to succeed in your university... eigenvalues and eigenvectors = 21 =. And machine learning, e.g the the matrix is doing line ‘ system is zero ( )! Of many videos provided by ProPrep to prepare you to succeed in your university... and... The matrix is diagonal ( in some basis ), material analysis, and structural analysis to transform original. '= [ 8 4 - 2 2 ] y Find the eigenvalues and eigenvectors of a! Proprep to prepare you to succeed in your university... eigenvalues and of! The plane given by re ection through the line ‘ show what the the is. Machine learning, e.g )... we have a system of equations 3 2 Introduction x direction... 3 2 Introduction to nd eigenvalues and eigenvectors are then found by solving this of! Form solutions to y ' = a y for each eigenvalue, solve the linear system '=. Linear transforma-tions are those whose matrix is doing of matrix a eigenvalues the of. These form the most important facet of the plane given by re ection the! )... we have a system of equations 3 2 Introduction in your university... and. Through the line ‘ vector space and let \ ( L \colon V\rightarrow V\ ) a... What the the matrix is doing be determined only to within a factor! You must keep in mind that if is an eigenvector Algebra applications Version are created these. Which are further used to transform the original features into another feature.! ‘: R2! R2 be the linear system y '= [ 8 4 - 2! Those whose matrix is diagonal ( in some basis ) nd eigenvalues and eigenvectors the. Reducing dimensions after ensuring most of the distribution is by solving this system of equations have... Vibration analysis, material analysis, and structural analysis the coefficient matrix vibration problems ) 0! You must keep in mind that if is an eigenvector intensive tasks by reducing dimensions after most! Overall shape of the key information is maintained 2 Introduction be a finite-dimensional space! Solve the linear transformation of the plane given by re ection through the line ‘ the plane given re! Role in the following sections we will determine the eigenvectors are important to engineers because basically. Singular value decomposition ( SVD )... we have a system applications of eigenvalues and eigenvectors in communication system equations will an! ( L \colon V\rightarrow V\ ) be a 3x3 matrix defined below applications of eigenvalues and eigenvectors in communication system applications many important applications in computer and... Is diagonal ( in some basis ) will determine the eigenvectors and eigenvalues of matrix! Example: let T be a 3x3 matrix defined below: applications important! = − − λ λ 043 2 =+−⇒ λλ 6 are used by many types engineers! Of those applications include noise reduction in cars, stereo systems, vibration analysis, material analysis material... An Application of eigenvectors: Vibrational Modes and Frequencies one Application of eigenvectors: Vibrational Modes and Frequencies Application. The eigenvectors and eigenvalues of a matrix, by solving equation space let... To nd eigenvalues and their corresponding eigenvectors are important in many applications matrix a found by this! − − λ λ 043 2 =+−⇒ λλ 6 used by many types of engineers for types... Be determined only to within a constant factor learning in general are based upon a common behavior linear... From these eigenvectors which are further used to transform the original features into another subspace..., material analysis, and structural analysis among the eigenvalues determines how the! The properties of the key information is maintained has a Nonzero solution if we choose such det...

Categories: Uncategorized


text:
Charge on the nucleus

1. Sep 15, 2005

I've got this following question which I don't really get:

What is the charge on the nucleus of each of the following? (assuming they are neutral)

a) Mg b) Ne c) K^+ d) S^2-

What I don't understand is the definition of "charge on the nucleus"

I am assuming that only protons have charge in the nucleus, therefore, I just count the number of protons and that gives me the charge on the nucleus.

This is what I think I'm supposed to do:

a) +12 b) +10 c) +19 d) +16

But then, would the charge be zero, because the electrons end up canceling the charge from the protons?

Or is there another way I'm supposed to do this?

Thanks,

Jason

Last edited: Sep 15, 2005
2. Sep 16, 2005

mind game

effective nuclear charge is the charge felt by the valence electrons after you have taken into account the number of shielding electrons that surround the nucleus.

since u have given in brackets that assuming these atoms are neutral for clearence of ur concept let's take a look at a fluorine atom.The nucleus itself has a +9 charge and anything in its vicinity will feel that charge. The two electrons in the first energy level as they look at the nucleus feel a +9 charge because that is the charge on the nucleus.assuming the atom to b neutral there would be 9 electrons as a whole in atom and 7 electron in secoind or valence energy level electrons that are in the valence energy level would be shielded from the nucleus by the 2 shielding electrons(in 1st energy level) The +9 nuclear charge is shielded by 2 electrons to give an effective nuclear charge of +7 that is felt by the valence electrons
but If you get out beyond the valence electrons, then the effective charge is 0 simply because the +9 charge of the nucleus is surrounded by 9 electrons.
now u can easily solve K +1 charge and also -2 charge as the show that one electron is removed and 2 are added respectively

Last edited: Sep 16, 2005
3. Sep 16, 2005

whozum

The charge on the nucleus is the sum of the charge of each proton's +1. I think this is what the question is asking. The answer to your second question is no, because some of the elements are not in their neutral form (c and d), thus are missing an electron (c) or have electrons in excess (d), so their total charge is not 0.

If its asking for effective nuclear charge, then you want to find the charge of the protons minus the charge of all non-valence electrons.

4. Sep 16, 2005

Diane_

This may be a very easy question, depending on how accurately you've reported it. If the question is the charge on the nucleus, then the state of the electrons is irrelevant - they aren't in the nucleus. Consequently, you just go with the number of protons.

Note that this is true even for the ions you mention in (c) and (d). Ions gain their charges by gaining or losing electrons, but the charge on the nucleus cannot change without changing the element involved. If it's potassium you're talking about, then it'll have the same nuclear charge whether the atom itself is ionized or not.

So, again: if you've reported the question accurately, then the answer is as close as your periodic table.


text:
# Maximum number of points of intersection between $7$ figures.

We are given $5$ lines and two circles in a plane. What is the maximum number of possible intersection points among these seven figures ?

My work on the problem: I've considered special cases like what is the maximum number of points of intersection between lines and circles ,between only lines and last between circles.

P.s: Please provide detailed answer so i can follow best.Thanks in advance

• If you think about it, the circles are easy to collocate once you've maxed the intersection betwen the lines. By the way, the answer is 32, try to obtain and prove it – Exodd Sep 28 '15 at 20:13

## 1 Answer

When you only have 5 lines, you can get at most $\binom{5}{2}=10$ intersections. This is the number of distinct pairs of lines among those five. You can draw it on paper if you don't know the binomial coefficient symbol yet. Each of 2 circles can intersect each of 5 lines at 2 points. There can also be 2 circle-circle intersections.

Line-line intersections: $10$

Line-circle intersections: $2\cdot 2 \cdot 5$

Circle-circle intersections: $2$

Add it up to get the answer.

• Pardon, but where is the intuition behind $\binom{5}{2}=10$ using geometrical objects ? i mean i used that method dealing with boxes,people etc.. but in abstract when dealing with geometrical objects what is that combinatorics method doing ? – Nameless Sep 28 '15 at 20:28
• Each pair of lines create an intersection (in our maximal case, each pair gives a distinct intersection). Therefore, if we count the number of distinct pairs of lines, we will know the number of intersections. The binomial coefficient $\binom{a}{b}$ means the number of distinct b-subsets of an a-set (I mean a subset with b elements when I say b-subset, etc). The number of 2-element-subsets of a 5-element-set is the same as the number of pairs of lines, when we have 5 lines at our disposal. – I want to make games Sep 28 '15 at 20:42
• why do we count distinct pair of lines....why not distinct triad or anything higher than that? – Hydrous Caperilla Apr 23 '18 at 13:30
• The base knowledge we're basing the solution on is that a pair of lines can intersect zero times or once (and that we can set up $5$ or any other number of lines such that each pair does in fact intersect, and each of the intersections is different). And so, we think: 'when we have 5 lines, we have 10 distinct pairs of them, and each pair results in an intersection'. – I want to make games Apr 24 '18 at 15:37


text:
# Case Study: Pointers & Bytes

A large part of the allure of Haskell is its elegant, high-level ADTs that ensure that programs won’t be plagued by problems like the infamous SSL heartbleed bug.1 However, another part of Haskell’s charm is that when you really really need to, you can drop down to low-level pointer twiddling to squeeze the most performance out of your machine. But of course, that opens the door to the heartbleeds.

Wouldn’t it be nice to have our cake and eat it too? Wouldn’t it be great if we could twiddle pointers at a low-level and still get the nice safety assurances of high-level types? Lets see how LiquidHaskell lets us have our cake and eat it too.

Modern Languages like Haskell are ultimately built upon the foundation of C. Thus, implementation errors could open up unpleasant vulnerabilities that could easily slither past the type system and even code inspection. As a concrete example, lets look at a function that uses the ByteString library to truncate strings:

chop' :: String -> Int -> String chop' s n = s' where b = pack s -- down to low-level b' = unsafeTake n b -- grab n chars s' = unpack b' -- up to high-level

First, the function packs the string into a low-level bytestring b, then it grabs the first n Characters from b and translates them back into a high-level String. Lets see how the function works on a small test:

ghci> let ex = "Ranjit Loves Burritos"

We get the right result when we chop a valid prefix:

ghci> chop' ex 10
"Ranjit Lov"

But, as illustrated in Figure 11.1, the machine silently reveals (or more colorfully, bleeds) the contents of adjacent memory or if we use an invalid prefix:

ghci> chop' ex 30
"Ranjit Loves Burritos\NUL\201\&1j\DC3\SOH\NUL"
Figure 11.1: Can we prevent the program from leaking secrets via overflows?

Types against Overflows Now that we have stared the problem straight in the eye, look at how we can use LiquidHaskell to prevent the above at compile time. To this end, we decompose the system into a hierarchy of levels (i.e. modules). Here, we have three levels:

1. Machine level Pointers
2. Library level ByteString
3. User level Application

Our strategy, as before, is to develop an refined API for each level such that errors at each level are prevented by using the typed interfaces for the lower levels. Next, lets see how this strategy lets us safely manipulate pointers.

## Low-level Pointer API

To get started, lets look at the low-level pointer API that is offered by GHC and the run-time. First, lets see who the dramatis personae are and how they might let heartbleeds in. Then we will see how to batten down the hatches with LiquidHaskell.

Pointers are an (abstract) type Ptr a implemented by GHC.

-- | A value of type Ptr a represents a pointer to an object,
--   or an array of objects, which may be marshalled to or from
--   Haskell values of type a.

data Ptr a

Foreign Pointers are wrapped pointers that can be exported to and from C code via the Foreign Function Interface.

data ForeignPtr a

To Create a pointer we use mallocForeignPtrBytes n which creates a Ptr to a buffer of size n and wraps it as a ForeignPtr

mallocForeignPtrBytes :: Int -> ForeignPtr a

To Unwrap and actually use the ForeignPtr we use

withForeignPtr :: ForeignPtr a     -- pointer
-> (Ptr a -> IO b)  -- action
-> IO b             -- result

That is, withForeignPtr fp act lets us execute a action act on the actual Ptr wrapped within the fp. These actions are typically sequences of dereferences, i.e. reads or writes.

To Dereference a pointer, i.e. to read or update the contents at the corresponding memory location, we use peek and poke respectively. 2

peek :: Ptr a -> IO a         -- Read
poke :: Ptr a -> a -> IO ()   -- Write

For Fine Grained Access we can directly shift pointers to arbitrary offsets using the pointer arithmetic operation plusPtr p off which takes a pointer p an integer off and returns the address obtained shifting p by off:

plusPtr :: Ptr a -> Int -> Ptr b

Example That was rather dry; lets look at a concrete example of how one might use the low-level API. The following function allocates a block of 4 bytes and fills it with zeros:

zero4 = do fp <- mallocForeignPtrBytes 4 withForeignPtr fp $\p -> do poke (p plusPtr 0) zero poke (p plusPtr 1) zero poke (p plusPtr 2) zero poke (p plusPtr 3) zero return fp where zero = 0 :: Word8 While the above is perfectly all right, a small typo could easily slip past the type system (and run-time!) leading to hard to find errors: zero4' = do fp <- mallocForeignPtrBytes 4 withForeignPtr fp$ \p -> do poke (p plusPtr 0) zero poke (p plusPtr 1) zero poke (p plusPtr 2) zero poke (p plusPtr 8) zero return fp where zero = 0 :: Word8

## A Refined Pointer API

Wouldn’t it be great if we had an assistant to helpfully point out the error above as soon as we wrote it? 3 We will use the following strategy to turn LiquidHaskell into such an assistant:

1. Refine pointers with allocated buffer size,
2. Track sizes in pointer operations,
3. Enforce pointer are valid at reads and writes.

To Refine Pointers with the size of their associated buffers, we can use an abstract measure, i.e. a measure specification without any underlying implementation.

-- | Size of Ptr
measure plen  :: Ptr a -> Int

-- | Size of ForeignPtr
measure fplen :: ForeignPtr a -> Int

It is helpful to define aliases for pointers of a given size N:

type PtrN a N        = {v:Ptr a        | plen v  = N}
type ForeignPtrN a N = {v:ForeignPtr a | fplen v = N}

Abstract Measures are extremely useful when we don’t have a concrete implementation of the underlying value, but we know that the value exists. Here, we don’t have the value – inside Haskell – because the buffers are manipulated within C. However, this is no cause for alarm as we will simply use measures to refine the API, not to perform any computations. 4

To Refine Allocation we stipulate that the size parameter be non-negative, and that the returned pointer indeed refers to a buffer with exactly n bytes:

mallocForeignPtrBytes :: n:Nat -> ForeignPtrN a n

To Refine Unwrapping we specify that the action gets as input, an unwrapped Ptr whose size equals that of the given ForeignPtr.

withForeignPtr :: fp:ForeignPtr a
-> (PtrN a (fplen fp) -> IO b)
-> IO b

This is a rather interesting higher-order specification. Consider a call withForeignPtr fp act. If the act requires a Ptr whose size exceeds that of fp then LiquidHaskell will flag a (subtyping) error indicating the overflow. If instead the act requires a buffer of size less than fp then it is always safe to run the act on a larger buffer. For example, the below variant of zero4 where we only set the first three bytes is fine as the act, namely the function \p -> ..., can be typed with the requirement that the buffer p has size 4, even though only 3 bytes are actually touched.

zero3 = do fp <- mallocForeignPtrBytes 4 withForeignPtr fp $\p -> do poke (p plusPtr 0) zero poke (p plusPtr 1) zero poke (p plusPtr 2) zero return fp where zero = 0 :: Word8 To Refine Reads and Writes we specify that they can only be done if the pointer refers to a non-empty (remaining) buffer. That is, we define an alias: type OkPtr a = {v:Ptr a | 0 < plen v} that describes pointers referring to non-empty buffers (of strictly positive plen), and then use the alias to refine: peek :: OkPtr a -> IO a poke :: OkPtr a -> a -> IO () In essence the above type says that no matter how arithmetic was used to shift pointers around, when the actual dereference happens, the size remaining after the pointer must be non-negative, so that a byte can be safely read from or written to the underlying buffer. To Refine the Shift operations, we simply check that the pointer remains within the bounds of the buffer, and update the plen to reflect the size remaining after the shift: 5 plusPtr :: p:Ptr a -> off:BNat (plen p) -> PtrN b (plen p - off) using the alias BNat, defined as: type BNat N = {v:Nat | v <= N} 6 Types Prevent Overflows Lets revisit the zero-fill example from above to understand how the refinements help detect the error: exBad = do fp <- mallocForeignPtrBytes 4 withForeignPtr fp$ \p -> do poke (p plusPtr 0) zero poke (p plusPtr 1) zero poke (p plusPtr 2) zero poke (p plusPtr 5) zero -- LH complains return fp where zero = 0 :: Word8

Lets read the tea leaves to understand the above error:

  Error: Liquid Type Mismatch
Inferred type
VV : {VV : Int | VV == ?a && VV == 5}

not a subtype of Required type
VV : {VV : Int | VV <= plen p}

in Context
zero : {zero : Word8 | zero == ?b}
VV   : {VV : Int | VV == ?a && VV == (5  :  int)}
fp   : {fp : ForeignPtr a | fplen fp == ?c && 0 <= fplen fp}
p    : {p  : Ptr a | fplen fp == plen p && ?c <= plen p && ?b <= plen p && zero <= plen p}
?a   : {?a : Int | ?a == 5}
?c   : {?c : Int | ?c == 4}
?b   : {?b : Integer | ?b == 0}

The error says we’re bumping p up by VV == 5 using plusPtr but the latter requires that bump-offset be within the size of the buffer referred to by p, i.e. VV <= plen p. Indeed, in this context, we have:

     p    : {p : Ptr a | fplen fp == plen p && ?c <= plen p && ?b <= plen p && zero <= plen p}
fp   : {fp : ForeignPtr a | fplen fp == ?c && 0 <= fplen fp}

that is, the size of p, namely plen p equals the size of fp, namely fplen fp (thanks to the withForeignPtr call). The latter equals to ?c which is 4 bytes. Thus, since the offset 5 is not less than the buffer size 4, LiquidHaskell cannot prove that the call to plusPtr is safe, hence the error.

## Assumptions vs Guarantees

At this point you ought to wonder: where is the code for peek, poke or mallocForeignPtrBytes and so on? How can we be sure that the types we assigned to them are in fact legitimate?

Frankly, we cannot as those functions are externally implemented (in this case, in C), and hence, invisible to the otherwise all-seeing eyes of LiquidHaskell. Thus, we are assuming or trusting that those functions behave according to their types. Put another way, the types for the low-level API are our specification for what low-level pointer safety. We shall now guarantee that the higher level modules that build upon this API in fact use the low-level function in a manner consistent with this specification.

Assumptions are a Feature and not a bug, as they let us to verify systems that use some modules for which we do not have the code. Here, we can assume a boundary specification, and then guarantee that the rest of the system is safe with respect to that specification. 7

## ByteString API

Next, lets see how the low-level API can be used to implement to implement ByteStrings, in a way that lets us perform fast string operations without opening the door to overflows.

A ByteString is implemented as a record of three fields:

data ByteString = BS { bPtr :: ForeignPtr Word8 , bOff :: !Int , bLen :: !Int }
• bPtr is a pointer to a block of memory,
• bOff is the offset in the block where the string begins,
• bLen is the number of bytes from the offset that belong to the string.

These entities are illustrated in Figure 11.2; the green portion represents the actual contents of a particular ByteString. This representation makes it possible to implement various operations like computing prefixes and suffixes extremely quickly, simply by pointer arithmetic.

Figure 11.2: Representing ByteStrings in memory.

In a Legal ByteString the start (bOff) and end (bOff + bLen) offsets lie inside the buffer referred to by the pointer bPtr. We can formalize this invariant with a data definition that will then make it impossible to create illegal ByteStrings:

{-@ data ByteString = BS { bPtr :: ForeignPtr Word8 , bOff :: {v:Nat| v <= fplen bPtr} , bLen :: {v:Nat| v + bOff <= fplen bPtr} } @-}

The refinements on bOff and bLen correspond exactly to the legality requirements that the start and end of the ByteString be within the block of memory referred to by bPtr.

For brevity lets define an alias for ByteStrings of a given size:

{-@ type ByteStringN N = {v:ByteString | bLen v = N} @-}

Legal Bytestrings can be created by directly using the constructor, as long as we pass in suitable offsets and lengths. For example,

{-@ good1 :: IO (ByteStringN 5) @-} good1 = do fp <- mallocForeignPtrBytes 5 return (BS fp 0 5)

creates a valid ByteString of size 5; however we need not start at the beginning of the block, or use up all the buffer, and can instead create ByteStrings whose length is less than the size of the allocated block, as shown in good2 whose length is 2 while the allocated block has size 5.

{-@ good2 :: IO (ByteStringN 2) @-} good2 = do fp <- mallocForeignPtrBytes 5 return (BS fp 3 2)

Illegal Bytestrings are rejected by LiquidHaskell. For example, bad1’s length is exceeds its buffer size, and is flagged as such:

bad1 = do fp <- mallocForeignPtrBytes 3 return (BS fp 0 10)

Similarly, bad2 does have 2 bytes but not if we start at the offset of 2:

bad2 = do fp <- mallocForeignPtrBytes 3 return (BS fp 2 2)

Measures are generated from Fields in the datatype definition. As GHC lets us use the fields as accessor functions, we can refine the types of those functions to specify their behavior to LiquidHaskell. For example, we can type the (automatically generated) field-accessor function bLen so that it actually returns the exact size of the ByteString argument.

{-@ bLen :: b:ByteString -> {v: Nat | v = bLen b} @-}

To Safely Create a ByteString the implementation defines a higher order create function, that takes a size n and accepts a fill action, and runs the action after allocating the pointer. After running the action, the function tucks the pointer into and returns a ByteString of size n.

{-@ create :: n:Nat -> (Ptr Word8 -> IO ()) -> ByteStringN n @-} create n fill = unsafePerformIO $do fp <- mallocForeignPtrBytes n withForeignPtr fp fill return (BS fp 0 n) Exercise: (Create): Why does LiquidHaskell reject the following function that creates a ByteString corresponding to "GHC"? bsGHC = create 3$ \p -> do poke (p plusPtr 0) (c2w 'G') poke (p plusPtr 1) (c2w 'H') poke (p plusPtr 2) (c2w 'C')

Hint: The function writes into 3 slots starting at p. How big should plen p be to allow this? What type does LiquidHaskell infer for p above? Does it meet the requirement? Which part of the specification or implementation needs to be modified so that the relevant information about p becomes available within the do-block above? Make sure you figure out the above before proceeding.

To Pack a String into a ByteString we simply call create with the appropriate fill action:8

pack str = create' n $\p -> go p xs where n = length str xs = map c2w str go p (x:xs) = poke p x >> go (plusPtr p 1) xs go _ [] = return () Exercise: (Pack): We can compute the size of a ByteString by using the function: Fix the specification for pack so that (it still typechecks!) and furthermore, the following QuickCheck style property is proved. {-@ prop_pack_length :: String -> TRUE @-} prop_pack_length xs = bLen (pack xs) == length xs Hint: Look at the type of length, and recall that len is a numeric measure denoting the size of a list. The magic of inference ensures that pack just works. Notice there is a tricky little recursive loop go that is used to recursively fill in the ByteString and actually, it has a rather subtle type signature that LiquidHaskell is able to automatically infer. Exercise: (Pack Invariant): Still, we’re here to learn, so can you write down the type signature for the loop so that the below variant of pack is accepted by LiquidHaskell (Do this without cheating by peeping at the type inferred for go above!) packEx str = create' n$ \p -> pLoop p xs where n = length str xs = map c2w str {-@ pLoop :: (Storable a) => p:Ptr a -> xs:[a] -> IO () @-} pLoop p (x:xs) = poke p x >> pLoop (plusPtr p 1) xs pLoop _ [] = return ()

Hint: Remember that len xs denotes the size of the list xs.

Exercise: (Unsafe Take and Drop): The functions unsafeTake and unsafeDrop respectively extract the prefix and suffix of a ByteString from a given position. They are really fast since we only have to change the offsets. But why does LiquidHaskell reject them? Can you fix the specifications so that they are accepted?

{-@ unsafeTake :: n:Nat -> b:_ -> ByteStringN n @-} unsafeTake n (BS x s _) = BS x s n {-@ unsafeDrop :: n:Nat -> b:_ -> ByteStringN {bLen b - n} @-} unsafeDrop n (BS x s l) = BS x (s + n) (l - n)

Hint: Under what conditions are the returned ByteStrings legal?

To Unpack a ByteString into a plain old String, we essentially run pack in reverse, by walking over the pointer, and reading out the characters one by one till we reach the end:

unpack :: ByteString -> String unpack (BS _ _ 0) = [] unpack (BS ps s l) = unsafePerformIO $withForeignPtr ps$ \p -> go (p plusPtr s) (l - 1) [] where {-@ go :: p:_ -> n:_ -> acc:_ -> IO {v:_ | true } @-} go p 0 acc = peekAt p 0 >>= \e -> return (w2c e : acc) go p n acc = peekAt p n >>= \e -> go p (n-1) (w2c e : acc) peekAt p n = peek (p plusPtr n)

Exercise: (Unpack): Fix the specification for unpack so that the below QuickCheck style property is proved by LiquidHaskell.

{-@ prop_unpack_length :: ByteString -> TRUE @-} prop_unpack_length b = bLen b == length (unpack b)

Hint: You will also have to fix the specification of the helper go. Can you determine the output refinement should be (instead of just true?) How big is the output list in terms of p, n and acc.

## Application API

Finally, lets revisit our potentially “bleeding” chop function to see how the refined ByteString API can prevent errors. We require that the prefix size n be less than the size of the input string s:

{-@ chop :: s:String -> n:BNat (len s) -> String @-} chop s n = s' where b = pack s -- down to low-level b' = unsafeTake n b -- grab n chars s' = unpack b' -- up to high-level

Overflows are prevented by LiquidHaskell, as it rejects calls to chop where the prefix size is too large which is what led to the overflow that spilled the contents of memory after the string (cf. Figure 11.1). In the code below, the first use of chop which defines ex6 is accepted as 6 <= len ex but the second call is rejected as 30 > len ex.

demo = [ex6, ex30] where ex = ['L','I','Q','U','I','D'] ex6 = chop ex 6 -- accepted by LH ex30 = chop ex 30 -- rejected by LH

Fix the specification for chop so that the following property is proved:

{-@ prop_chop_length :: String -> Nat -> TRUE @-} prop_chop_length s n | n <= length s = length (chop s n) == n | otherwise = True

Exercise: (Checked Chop): In the above, we know statically that the string is longer than the prefix, but what if the string and prefix are obtained dynamically, e.g. as inputs from the user? Fill in the implementation of ok below to ensure that chop is called safely with user specified values:

safeChop :: String -> Int -> String safeChop str n | ok = chop str n | otherwise = "" where ok = True queryAndChop :: IO String queryAndChop = do putStrLn "Give me a string:" str <- getLine putStrLn "Give me a number:" ns <- getLine let n = read ns :: Int return $safeChop str n ## Nested ByteStrings For a more in-depth example, let’s take a look at group, which transforms strings like "foobaaar" into lists of strings like ["f","oo", "b", "aaa", "r"]. The specification is that group should produce a 1. list of non-empty ByteStrings, 2. the sum of whose lengths equals that of the input string. Non-empty ByteStrings are those whose length is non-zero: {-@ predicate Null B = bLen B == 0 @-} {-@ type ByteStringNE = {v:ByteString | not (Null v)} @-} We can use these to enrich the API with a null check {-@ null :: b:_ -> {v:Bool | v <=> Null b} @-} null (BS _ _ l) = l == 0 This check is used to determine if it is safe to extract the head and tail of the ByteString. we can use refinements to ensure the safety of the operations and also track the sizes. 9 {-@ unsafeHead :: ByteStringNE -> Word8 @-} unsafeHead (BS x s _) = unsafePerformIO$ withForeignPtr x $\p -> peekByteOff p s {-@ unsafeTail :: b:ByteStringNE -> ByteStringN {bLen b -1} @-} unsafeTail (BS ps s l) = BS ps (s + 1) (l - 1) The Group function recursively calls spanByte to carve off the next group, and then returns the accumulated results: {-@ group :: b:_ -> {v: [ByteStringNE] | bsLen v = bLen b} @-} group xs | null xs = [] | otherwise = let y = unsafeHead xs (ys, zs) = spanByte y (unsafeTail xs) in (y cons ys) : group zs The first requirement, that the groups be non-empty is captured by the fact that the output is a [ByteStringNE]. The second requirement, that the sum of the lengths is preserved, is expressed by a writing a numeric measure: {-@ measure bsLen @-} bsLen :: [ByteString] -> Int bsLen [] = 0 bsLen (b:bs) = bLen b + bsLen bs SpanByte does a lot of the heavy lifting. It uses low-level pointer arithmetic to find the first position in the ByteString that is different from the input character c and then splits the ByteString into a pair comprising the prefix and suffix at that point. {-@ spanByte :: Word8 -> b:ByteString -> ByteString2 b @-} spanByte c ps@(BS x s ln) = unsafePerformIO$ withForeignPtr x $\p -> go (p plusPtr s) 0 where go p i | i >= ln = return (ps, empty) | otherwise = do c' <- peekByteOff p i if c /= c' then return$ splitAt i else go p (i+1) splitAt i = (unsafeTake i ps, unsafeDrop i ps)

LiquidHaskell infers that 0 <= i <= l and therefore that all of the memory accesses are safe. Furthermore, due to the precise specifications given to unsafeTake and unsafeDrop, it is able to prove that the output pair’s lengths add up to the size of the input ByteString.

{-@ type ByteString2 B = {v:_ | bLen (fst v) + bLen (snd v) = bLen B} @-}

## Recap: Types Against Overflows

In this chapter we saw a case study illustrating how measures and refinements enable safe low-level pointer arithmetic in Haskell. The take away messages are that we can:

1. compose larger systems from layers of smaller ones,
2. refine APIs for each layer, which can be used to
3. design and validate the layers above.

We saw this recipe in action by developing a low-level Pointer API, using it to implement fast ByteStrings API, and then building some higher-level functions on top of the ByteStrings.

The Trusted Computing Base in this approach includes exactly those layers for which the code is not available, for example, because they are implemented outside the language and accessed via the FFI as with mallocForeignPtrBytes and peek and poke. In this case, we can make progress by assuming the APIs hold for those layers and verify the rest of the system with respect to that API. It is important to note that in the entire case study, it is only the above FFI signatures that are trusted; the rest are all verified by LiquidHaskell.

1. Assuming, of course, the absence of errors in the compiler and run-time…

2. We elide the Storable type class constraint to strip this presentation down to the absolute essentials.

3. In Vim or Emacs or online, you’d see the error helpfully highlighted.

4. This is another ghost specification.

5. This signature precludes left or backward shifts; for that there is an analogous minusPtr which we elide for simplicity.

6. Did you notice that we have strengthened the type of plusPtr to prevent the pointer from wandering outside the boundary of the buffer? We could instead use a weaker requirement for plusPtr that omits this requirement, and instead have the error be flagged when the pointer was used to read or write memory.

7. If we so desire, we can also check the boundary specifications at run-time, but that is outside the scope of LiquidHaskell.

8. The code uses create' which is just create with the correct signature in case you want to skip the previous exercise. (But don’t!)

9. peekByteOff p i is equivalent to peek (plusPtr p i)`.


text:
Courses βeta
Data Structures

## Square Matrix | ( Find sum of all sub-squares of size k x k )

Given an n x n square matrix, find sum of all sub-squares of size k x k where k is smaller than or equal to n.

Examples

**Input:**

n = 5, k = 3

arr[][] = { {1, 1, 1, 1, 1},

{2, 2, 2, 2, 2},

{3, 3, 3, 3, 3},

{4, 4, 4, 4, 4},

{5, 5, 5, 5, 5},

};

**Output:**

18  18  18

27  27  27

36  36  36

**Input:**

n = 3, k = 2

arr[][] = { {1, 2, 3},

{4, 5, 6},

{7, 8, 9},

};

**Output:**

12  16

24  28

A Simple Solution is to one by one pick starting point (leftmost-topmost corner) of all possible sub-squares. Once the starting point is picked, calculate sum of sub-square starting with the picked starting point.

Following is C++ implementation of this idea.

// A simple C++ program to find sum of all subsquares of size k x k
#include <iostream>
using namespace std;

// Size of given matrix
#define n 5

// A simple function to find sum of all sub-squares of size k x k
// in a given square matrix of size n x n
void printSumSimple(int mat[][n], int k)
{
// k must be smaller than or equal to n
if (k > n) return;

// row number of first cell in current sub-square of size k x k
for (int i=0; i<n-k+1; i++)
{
// column of first cell in current sub-square of size k x k
for (int j=0; j<n-k+1; j++)
{
// Calculate and print sum of current sub-square
int sum = 0;
for (int p=i; p<k+i; p++)
for (int q=j; q<k+j; q++)
sum += mat[p][q];
cout << sum << "  ";
}

// Line separator for sub-squares starting with next row
cout << endl;
}
}

// Driver program to test above function
int main()
{
int mat[n][n] = {{1, 1, 1, 1, 1},
{2, 2, 2, 2, 2},
{3, 3, 3, 3, 3},
{4, 4, 4, 4, 4},
{5, 5, 5, 5, 5},
};
int k = 3;
printSumSimple(mat, k);
return 0;
}

Output:

  18  18  18

27  27  27

36  36  36

Time complexity of above solution is O(k2n2). We can solve this problem in O(n2) time using a Tricky Solution . The idea is to preprocess the given square matrix. In the preprocessing step, calculate sum of all vertical strips of size k x 1 in a temporary square matrix stripSum[][]. Once we have sum of all vertical strips, we can calculate sum of first sub-square in a row as sum of first k strips in that row, and for remaining sub-squares, we can calculate sum in O(1) time by removing the leftmost strip of previous subsquare and adding the rightmost strip of new square.

Following is C++ implementation of this idea.

// An efficient C++ program to find sum of all subsquares of size k x k
#include <iostream>
using namespace std;

// Size of given matrix
#define n 5

// A O(n^2) function to find sum of all sub-squares of size k x k
// in a given square matrix of size n x n
void printSumTricky(int mat[][n], int k)
{
// k must be smaller than or equal to n
if (k > n) return;

// 1: PREPROCESSING
// To store sums of all strips of size k x 1
int stripSum[n][n];

// Go column by column
for (int j=0; j<n; j++)
{
// Calculate sum of first k x 1 rectangle in this column
int sum = 0;
for (int i=0; i<k; i++)
sum += mat[i][j];
stripSum[0][j] = sum;

// Calculate sum of remaining rectangles
for (int i=1; i<n-k+1; i++)
{
sum += (mat[i+k-1][j] - mat[i-1][j]);
stripSum[i][j] = sum;
}
}

// 2: CALCULATE SUM of Sub-Squares using stripSum[][]
for (int i=0; i<n-k+1; i++)
{
// Calculate and print sum of first subsquare in this row
int sum = 0;
for (int j = 0; j<k; j++)
sum += stripSum[i][j];
cout << sum << "  ";

// Calculate sum of remaining squares in current row by
// removing the leftmost strip of previous sub-square and
for (int j=1; j<n-k+1; j++)
{
sum += (stripSum[i][j+k-1] - stripSum[i][j-1]);
cout << sum << "  ";
}

cout << endl;
}
}

// Driver program to test above function
int main()
{
int mat[n][n] = {{1, 1, 1, 1, 1},
{2, 2, 2, 2, 2},
{3, 3, 3, 3, 3},
{4, 4, 4, 4, 4},
{5, 5, 5, 5, 5},
};
int k = 3;
printSumTricky(mat, k);
return 0;
}

Output:

  18  18  18

27  27  27

36  36  36


text:
# Tag Info

4

The real state of the art here is the Matrix Profile suite, developed by Eamonn Keogh and his team in University of California at Riverside (UCR). Here are some links to get you started: Matrix Profile Foundation homepage The UCR Matrix Profile Page MPA: a novel cross-language API for time series analysis paper (2020) with links to Python, R, and Go ...

4

The statement in principle seems very vague, how can one state that there are better classification than regression algorithms? With that said I would rephrase the statement to: Sometime it is feasible to turn a regression into a classification problem due to for the problem itself, it makes sense to predict a range/bin instead of a continuous value. When ...

3

You can simply approximate $f(x)=|x|$ by $f(x)=\sqrt{x^2+c}$ where $c>0$. You can also utilize subderivative method.

3

 See also Carlos' answer, I think it's better than mine. You should use one hot encoding for the categorical features. Replacing categorical values with numerical ones would be a bad idea, because it introduces order between the values and the model would try to find patterns based on this order (e.g. 'x < 4'). If there were really too many ...

3

If you have high cardinality categorical data(more than 10 at lest) you can do Target Encoding. One hot Encoding for high cardinality is bad for the following: The input data for the model becomes very wide, and neither an optimal nor an - efficient approach are guaranteed, The created features become sparse(most of the levels hardly appear in the data) ...

3

While most answers here suggest to use various encoding schemes, I would like to propose a different approach: collapsing categories. The idea is that if there are two (or more) similar categories, you can unite the, into a single category, thus reducing the dimensionality of the feature/variable. Also, if there are some categories with expected low ...

3

It really comes down again to statistical modeling vs. decision-making. But I generally agree with you that the practice isn't beneficial; at the very least I think your TAs statement with the word "often" is incorrect. In the TA session, my TA claimed, that regression problems should often be cast into classification problems by dividing the ...

3

if suppose regression wasn't linear, would SST=SSE+SSR still hold? If yes, why? If no, why? Just to be clear that with linear regression it is perfectly OK to model nonlinear associations such as $y = 2x + 3x^2 + 17log(x)$ simply by including the relevant nonlinear terms, because it would still be linear in the parameters. I guess you are aware of this, but ...

3

I am assuming a linear regression of the form $$y = w_0x_0 + w_1x_1+ \ldots w_px_p + \varepsilon.$$ If we combine all output observations into a single vector $\mathbf{y}$ and represent the data matrix with an 1-column from left as $\mathbf{X}$, then we can express the linear regression $$\mathbf{y} = \mathbf{X}\mathbf{w} + \mathbf{\varepsilon},$$ in which $\... 3 That problem would be better modeled as survival analysis, the expected duration of time until one event occurs. The event in your case would be revisit to the website. Survival analysis could also predict which people are most likely to revisit. 2 Performing such benchmark is not that easy. Meaning one can not just pick a few data set and run these models as there is a data dependency. In such cases, one need to simulate data through various process - the simulation helps to design various data in various condition. for example perhaps model one is doing a better job at binning so, the data with ... 2 Thanks for this question I think it is a nice use case to play with time series forecasting in all (or many) of its types. As you suggest, there are several possible approaches, and all of them are valid hypothesis a priori to check and validate with your goal. Answering the question: yes, it is possible to build a single model to predict the sales amount ... 2 To clarify the questions raised by the user in response to the correct solution given by Erwan - the solution proposes going back in time to prepare the data across a series of timestamps. There will be multiple points in time 't' where the input would be all the various features on the patients health, medication, reports etc..you need to see how best they ... 2 This could be seen as a "simple" binary classification problem. I mean the type of problem is "simple", the task itself certainly isn't... And I'm not even going to mention the serious ethical issues about its potential applications! First, obviously you need to have an entry in your data for a patient's death. It's not totally clear to ... 2 The main problem in your test is that your X has the same scale as your noise level (0-1), as a result, adding a noise changes your data distribution significantly. This is your data distribution before and after adding noise. It is like the noise is 50-200% more than your initial data. That's why you get a better result with CV than the "ground truth ... 2 Yes, a GBM with Huber loss initializes with the median. The relevant bit of code is the method init_estimator of the loss class, in the file _gb_losses.py. For HuberLossFunction: def init_estimator(self): return DummyRegressor(strategy='quantile', quantile=.5) (source) 2 Doing it is easy. Simply create a mapping between your 11 values and embeddings of any size. Choosing the values for the embeddings is typically done through training a neural network that embeddings are part of. You could use dimensionality reduction techniques like PCA for instance as an alternative. Now, embeddings only make sense if they represent a ... 2 Personally I think linear (through model's coefficients/weights) and tree-based models (gain importance) are the best for explainability But this is not restricted to those models since you can use model agnostic techniques to explaine any model, even those consider as "black-box" Like: SHAP Values Partial Dependence plot LIME You can check this ... 2 Essentially you want to pick a function that will give you the "size" of a matrix. The most obvious way I can think of is by choosing a matrix norm, which is a map$\lVert \cdot \rVert \colon \mathbb{R}^{k, k} \to [0, \infty)$(or you could generalise to a complex$k \times k$matrix if you wished). Your suggestion seems similar to computing$$S = \... 2 A$R^2$that is that low tells you that your model is not good. Therefore, you can both make it positive and nearer to 1 by : a) getting better/more data, or b) picking a better model for your data. Also, it'd be more helpful to plot the true/pred values against the underlying$X$values and not just as a sequence. 2 According to the sklearn.svm.SVR documentation, the negative$R^2$value indicates that your model is arbitrarily worse than the trend line on trainY. By default you should check the following: Does your model have a bias/intercept? If not you may observe negative$R^2$. Is testY derived from your training data? Am I using a linear function to fit the data? ... 2 Everybody understands how to perform$k$-fold cross-validation but there is often quite a lot of confusion about where/how to use it. So thanks for this good question :) First, cross-validation is a statistical method for evaluation, not for training: Of course training is performed during cross-validation, but it is performed$k$times and therefore there ... 2 Since you specifically mention Python, one option is the Prophet package. The model fitting would be something like: # Create the pandas DataFrame import pandas as pd data = [['2021-01-01', 11, 20, 30], ['2021-01-02', 22, 40, 60], ['2021-01-03', 33, 60, 90]] df = pd.DataFrame(data, columns = ['Day', 'X', 'Y', 'Z']) df['ds'] = pd.to_datetime(... 2 It is possible to constrain to linear regression in scikit-learn to only positive coefficients. The sklearn.linear_model.LinearRegression has an option for positive=True which: When set to True, forces the coefficients to be positive. This option is only supported for dense arrays. The positive=True option is not available for ridge regression in scikit-... 2 Look at the equations. Both are functions of mean squared error. Any model the outperforms on one will outperform on the other. The danger I see with$R^2$is that it puts us in a position of thinking of grades in school, yet an$F$-grade$R^2=0.4$could be quite excellent for some models, while an$A$-grade$R^2=0.95\$ could be quite pedestrian for some ...

2

Another way to approach the problem is to take all of the trained models and compare each of their performances on the same hold-out dataset. This is the most common way to evaluate machine learning models. Choosing the evaluation metric to use depends on the goal of the project. Most machine learning projects care about predictive ability. R² is not a ...

1

The issue with numerical encoding in this context is you are enforcing that your input variable X is ordinal when it's likely not. This is telling your model that the order in which you encode your inputs are either increasing or decreasing monotonically with your target. Let's say you encoded your data like this: [North] - 0 [East] - 1 [West] - 2 [South] - ...

1

Yes, by customizing the model with new information. But, you have to run atleast one training, with complete cycle and export output. the general example from tensorflow is here

1

The issue of using any linear model (a polynomial regression is a particular case of a linear model, with polynomial features), is that an ensemble of linear models is still a linear model. So, the family of models to optimize from given by the boosted polynomial regression and the single polynomial regression are the same. This doesn't happen with trees, as ...

1

From my understanding Prophet is just a linear regression library that helps to analyze time series with some nice features (like holidays, Fourier transformation, etc.). So from the mathematical standpoint, the regressor must be an ordinal scaled value. The docstring also implicitly says something about it. See the keywords 'additive' and 'multiplicative'. ...

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


text:
# Events - Page 14

Time and place: Jan. 19, 2017 1:15 PM,

Master of Science Jørgen Høgberget at Department of Physics will be defending the thesis Microscopic Modeling of Confined Crystal Surfaces: Growth, dissolution, and equilibrium for the degree of the Degree of Philosophiae Doctor

Time and place: Jan. 19, 2017 10:15 AM4:00 PM,

Trial lecture: Pattern formation in granular materials (10:15)

Dissertation: Microscopic Modeling of Confined Crystal Surfaces: Growth, dissolution, and equilibrium (13:15)

Time and place: Jan. 19, 2017 10:15 AM,

Doctoral candidate Master of Science Jørgen Høgberget at Department of Physics will give a trial lecture on the given topic: "Numerical investigations of percolation problems"

Time and place: Jan. 18, 2017 1:05 PM2:00 PM, Ø467

Farinaldo Queiroz, MPI Heidelberg

We review the  searches for dark matter namely, direct, indirect and collider, emphasizing the importance of complementary strategies and discuss how one can eventually unveil the nature of dark matter.

(The slides will be available here)

Time and place: Jan. 11, 2017 1:05 PM2:00 PM, Ø467

Alessandro Cuoco, RWTH Aachen

I will discuss the implication for dark matter (DM) indirect searches of the recent precise measurements of cosmic-ray (CR) antiprotons from AMS-02. With respect to previous works we use a new updated CR propagation model consistent with the AMS-02 data. Furthermore, we fit at the same time, in a self-consistent way, both DM and the propagation parameters. We find a significant (4.5 sigma) indication of a DM signal for DM masses near 80 GeV, which, interestingly, is also compatible with the similar excess present in the Galactic center  in  gamma rays. Possible systematic effects will be also discussed. In terms of DM exclusion limits, we find stringent constraints a factor of 4-5 stronger than limits from gamma-ray observations of dwarf galaxies.

(The slides will be available here)

Time and place: Dec. 16, 2016 3:15 PM, Seminar Room FV414

The last Poster Seminar of 2016! Please all come, drink wine and discuss science.

Time and place: Dec. 2, 2016 1:15 PM3:45 PM, PGP seminar room (FV 414)

On December 2nd, a short EarthFlows seminar will take place at PGP.

Time and place: Dec. 1, 2016 12:30 PM1:15 PM, Store fys aud

Speaker: Vadim Makarov. Institute for Quantum Computing, University of Waterloo, Canada.

Time and place: Nov. 30, 2016 1:05 PM2:00 PM, Ø467

Julia Harz, UPMC Paris

To achieve a more precise prediction of the supersymmetric dark matter relic density, we have calculated next-to-leading order SUSY-QCD corrections to neutralino (co)annihilation processes including Coulomb enhancement effects. We demonstrate that these corrections can have significant impact on the prediction of the dark matter relic abundance and are thus of general interest for parameter studies. For particle physics observables at colliders, it has been common practice for many decades to estimate the theoretical uncertainty by studying the variation of the predicted cross sections with a priori unpredictable scales. In astroparticle physics, this has so far not been possible, since most of the observables were calculated at Born level only, so that the renormalization scheme and scale dependence could not be studied in a meaningful way. We will present the first quantitative study of the theoretical uncertainty of the neutralino dark matter relic density from scheme and scale variations.

(The slides will be available here)

Time and place: Nov. 25, 2016 3:15 PM, Seminar Room FV414

by Unni Vik from CEES/EvoGene, Department of Biosciences, University of Oslo.

Time and place: Nov. 23, 2016 1:05 PM2:00 PM, Ø467

Marit Sandstad, NORDITA Stockholm

The idea that black holes of a wide range of masses could form from highly overdense regions in the very early universe has been around since the early seventies, when it prompted Steven Hawking to derive the theory of Hawking radiation. Since then, no primordial black holes have been seen, but as more accurate observations of the universe and our surrounding galaxies have been made they have been suggested as possible culprits for unexplained cosmic rays, the supermassive black holes in the centres of galaxies or the entirety of dark matter. However, as the unexplained cosmic rays turned out to be non-detections, so far all we have got at present are constraints on their abundance from various observations across nearly all possible scales. However, having only constraints might not be entirely a disadvantage. If the mechanisms proposed for the formation of primordial black holes is correct, their non-existence implies that the primordial power spectrum from inflation cannot have been too large. This is very interesting as... [abstract continued below]

(The slides will be available here)

Time and place: Nov. 10, 2016 12:00 PM1:00 PM, Store fys aud, The Physics Building
Thors Hans Hansson, Stockholm University and NORDITA
Time and place: Nov. 2, 2016 1:05 PM, Ø467

Jeriek Van den Abeele, FI

Given that physical problems rarely have exact solutions, the importance of perturbation theory can hardly be overstated. Yet often, a closer look reveals that it is divergent and ill-defined! Non-perturbative effects, ubiquitous in nature and quantum theories, have to be accounted for explicitly in attempts to make sense of perturbation theory. The perspective of the resurgence framework leads to new ways of understanding perturbative expansions and reveals surprising connections to non-perturbative physics. In this talk, I will illustrate how resurgence manifests itself in the quantum mechanical context of a cosine potential, emphasising the importance of quantum tunnelling for its energy spectrum and highlighting how non-perturbative contributions are intricately encoded in perturbation theory.

(The slides will be available here)

Time: Oct. 28, 2016 3:15 PM

by Åge Gellein Larsen from SINTEF.

Time and place: Oct. 26, 2016 1:05 PM2:00 PM, FØ467

Tommaso Dorigo, INFN Padua

The CDF collaboration led for two decades the investigation of the high-energy frontier in the search for new physics at the highest energies until then achieved, provided by the Tevatron collider. In a recently published book the author describes how the experiment handled several unexplained phenomena found in the data, and the complex sociology of a large collaboration divided by different feelings on how to deal with those unexpected findings. The seminar will start by discussing the history of those anomalies and their resolution, and then focus on the statistical problem of defining a proper discovery level for new phenomena and on the non-trivial issues it entails.

Time and place: Oct. 19, 2016 1:05 PM2:00 PM, Ø467

Sebastian Wild, DESY Hamburg

One of the most promising strategies to probe WIMP dark matter is direct detection, i.e. the search for nuclear recoils produced by the elastic scattering of dark matter particles. After giving a general introduction to the theoretical framework and experimental status of direct detection, I will present recent developments which allow to interpret the experimental data without the need to specify the (unknown) velocity distribution of dark matter, called "halo-independent methods". Specifically, I will discuss to what extent future experiments can pinpoint the particle physics properties of dark matter in a halo-independent way. I will also present a novel approach to derive upper limits on the scattering cross section of dark matter using already existing experiments, again without the need to specify the velocity distribution.

(The slides will be available here)

Time: Oct. 14, 2016 3:15 PM

by Wenlu Zhu, a visiting Associate Professor from the University of Maryland.

Time and place: Sep. 30, 2016 3:15 PM, Seminar Room FV414

by Wojciech Jacek Miloch (Associate Professor, Department of Physics, UiO).

Time and place: Sep. 29, 2016 1:05 PM, Ø467

Anastasia Sokolenko, FI

In this work we propose a new interesting channel for searching new physics at the LHC. This channel is connected to the diphoton channel via electroweak gauge symmetry of the Standard Model (SM). We discuss the possibility that an apparent diphoton signal is in fact produced by the 4-photon channel, where a pair of collimated photons is misidentified as 1 photon due to finite angular resolution of the detector. In this case we expect that the gauge symmetry of the SM connects the diphoton channel to three boson channels. Also we notice that the same mechanism could give an experimental signature of $Z\rightarrow \gamma\gamma$ decay, which is theoretically forbidden by the Landau-Yang theorem. For definiteness we illustrate these ideas using one of the models that was discussed to explain the recent 750 GeV resonance, even if the later signal was not confirmed.

(The slides will be available here)

Time and place: Sep. 28, 2016 1:05 PM, Ø467

Jens Paaske, NBI Copenhagen

Motivated by recent experiments, we study lattices of magnetic adatoms exchange coupled to the surface of a conventional s-wave superconductor. We show that a variety of collective magnetic and electronic phases emerge in this system, due to the interplay between ferromagnetism and superconductivity. In particular, an adatom chain on a bulk (2d or 3d) superconductor can order into a magnetic spiral state leading to, and stabilized by, the opening of a topological superconducting gap within the band of YSR states induced by the adatoms. The spiral wave-vector increases sharply as the YSR energy is lowered from the quasiparticle continuum, due to a strong spin-spin exchange interaction mediated through the band of sub-gap YSR states. As the YSR band enters the topological phase, the wave-vector exhibits a peak and is thereafter driven down towards ferromagnetism due to YSR state double-exchange. We provide the range of YSR energies and adatom spacing where these phases exist for adatoms on a 3d, or 2d  superconductor. The magnetic ordering within a 2d YSR lattice is also explored.

(The slides will be available here)

Time and place: Sep. 22, 2016 5:30 PM7:00 PM, DNVA, Drammensveien 78

Professor Eric Priest, St Andrews University, Scotland:

Our Dynamic Sun

Time and place: Sep. 21, 2016 1:05 PM2:00 PM, Ø467

Oleg Lebedev, University of Helsinki

I will discuss a special role of the Higgs boson in probing the hidden sector and its connection to dark matter and inflation.

(The slides will be available here)

Time and place: Sep. 15, 2016 10:15 AM11:15 AM, Lille aud øst

Alfredo Galindo-Uribarri, Oak Ridge National Laboratory / University of Tennessee, Knoxville.

Time and place: Sep. 2, 2016 3:15 PM, Seminar Room FV414

by Octavio Palma

Time and place: Aug. 31, 2016 1:05 PM2:00 PM, Ø467

Andi Hektor, NICPB Tallinn

I will give a short introduction to Dark Matter physics. I will sum up the the main evidences of Dark Matter from the Galactic to large cosmological scales. So far the evidences are only gravitational. I will point out that even the gravitational signals of Dark Matter can hint about the deeper nature of Dark Matter, especially having soon new data from the Gaia and other soon starting experiments. Beyond gravitation, we have many experimental constraints on the ‘particle’ nature of Dark Matter and only few questionable hints of Dark Matter. Those experiments involve the accelerator (LHC at CERN), underground (‘direct detection') and cosmic experiments (‘indirect detection’). Due to rapidly evolving experimental and observational bounds the mainstream candidate of Dark Matter, Weakly Interacting Massive Particle, is losing its ground. I will point out some interesting escape scenarios of WIMP. I will conclude highlighting some interesting alternatives for WIMPy Dark Matter.

(Slides will be available here)

Subscribe
Subscribe Close


text:
# The rooks problem

3 rooks are arranged on a 27 times 27 chess board so that no rook is attacking another. How many places can a 4th rook be placed so that it is attacking exactly one other rook on the board

• I would request that this problem be closed off, as it is currently used in Brilliant.org, which provides live weekly problem sets. Jan 10 '13 at 15:21

The fourth rook must be on one of the three rows or three columns occupied by the first three rooks. There are $3\cdot27=81$ squares in the same three rows and another $3\cdot27=81$ squares in the same three columns, but $3\cdot3=9$ of these are in the same three rows and the same three columns, so there are altogether $81+81-9=153$ squares that occupy the same row or column as one of the first three rooks. Three of those squares are occupied by the first three rooks themselves, so there are $153-3=150$ squares from which the fourth rook can attack at least one of the first three.

If it attacks two of the first three rooks, it must attack one along a row and the other along a column. (Why?) This also shows that it can’t attack all three. (Again, why?) From here it should be pretty easy to get to the answer.

Alternatively, you could notice that the answer doesn’t depend on where the first three rooks are placed, so long as they are mutually non-attacking, so you might as well imagine them placed at positions $\langle 1,1\rangle,\langle 2,2\rangle$, and $\langle 3,3\rangle$, where $\langle r,c\rangle$ is the position in row $r$, column $c$. Sketch that picture, and the counting becomes very easy.

• My approach would be the one in "Alternatively..." which is much easier than the other method you describe.
– TMM
Jan 8 '13 at 19:03
• @TMM: So would mine, but formally justifying the without loss of generality requires a little more sophistication than carrying out the first approach. Jan 8 '13 at 19:05
• I would request that this problem be closed off, as it is currently used in Brilliant.org, which provides live weekly problem sets. Jan 10 '13 at 15:22

Hint: at how many squares is it attacking exactly zero? At how many squares is it attacking exactly two? At how many squares is it attacking exactly three?

• (answers to hint questions in order: 576, 6, 0)
– user29743
Jan 8 '13 at 18:37
• I would request that this problem be closed off, as it is currently used in Brilliant.org, which provides live weekly problem sets. Jan 10 '13 at 15:21


text:
# Could not find appears when JDK is configured java.dll Could not find Java se runtime environment problems

Error: could not find java.dll
Error: could not find Java Runtime Environment after installing the JDK before and after installing the new version.
There are two ways to do it

rename C:\Program Files (x86)\Common Files\Oracle\Java\javapath java.exe put the system variable in the Path of %JAVA_HOME%\bin; Put in front of C:\Program Files (x86)\Common Files\Oracle\Java\javapath

I saw some bloggers who said that 1 didn’t work and 2 worked, but I used 1 and 2 didn’t work, so I could try both


text:
# Minimal and maximal degrees in critical graphs

Let $$G=(V,E)$$ be a finite simple undirected graph. We say that $$G$$ is critical if for all $$v\in V$$ we have $$\chi(G\setminus\{v\}) < \chi(G).$$ By $$\Delta(G)$$ and $$\delta(G)$$ we denote the maximum and minimum degrees of $$G$$, respectively.

Let $${\cal C}$$ be the set of all finite critical graphs $$G=(V,E)$$ with $$V \subseteq \mathbb{N}$$ and $$|V|>1$$. Is the set $$\big\{\frac{\Delta(G)}{\delta(G)}:G \in{\cal C}\big\}\subseteq \mathbb{Q}_{\geq 0}$$ bounded?

(Note that $$G$$ critical and $$|V(G)|>1$$ implies $$\delta(G) > 0$$.)

No, it is unbounded: for the wheel graph $$W_n$$ of even order $$n$$, we have $$\Delta(G)=n-1$$, $$\delta(G)=3$$, $$\chi(G)=4$$, and $$\chi(G\setminus\{v\})=3$$ for any vertex $$v$$.


text:
# Fourier Transform of exponential and heaviside function

#### katiandss

1. Homework Statement
Compute the Fourier transform of

$\phi(t)$=(e^(-at))H(t)

where H(t) is the Heaviside step function

2. Homework Equations

3. The Attempt at a Solution
I am stuck in an attempt at the solution, I am confused at how the heaviside step function factors in and think that it may just affect the upper and lower limits of the integral, but am not sure. I am looking for direction on how to approach the problem or at least set it up.

Related Calculus and Beyond Homework Help News on Phys.org

#### Char. Limit

Gold Member
The Fourier Transform is defined on a function f(t) as:

$$\int_{-\infty}^\infty f(t) e^{2 \pi i t \omega} dt$$

Now, try plugging in f(t)=e^(-at)H(t) into this definition. Remember that H(t) is defined to be 0 for all negative t and 1 for all positive t, so try splitting the integral into two integrals: one with lower bound -infinity and upper bound 0, and the other with lower bound 0 and the upper bound infinity. Then apply the definition of H(t) and it should become easy.

### Physics Forums Values

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving


text:
# NEET Zoology Biomolecules Questions Solved

BOARD

What is essentially the difference bewteen $\mathrm{\alpha }$-glucose and $\mathrm{\beta }$-glucose ? What is meant by pyranose structure of glucose ?      (3 marks)

The two cyclic hemiacetal forms of glucose differ only in the configuration of the hydroxyl group on the first carbon atom called anomeric carbon. Such isomers i.e. $\mathrm{\alpha }$-form and $\mathrm{\beta }$-form are called anomers. $\mathrm{\alpha }$-glucose is the monomer unit of strach and $\mathrm{\beta }$-glucose is the monomer unit of cellulose. The six membered cyclic structure of glucose is called pyranose structure.

Pyranose structure of glucose : The six membered ring containing 5 carbon atoms and one oxygen atom because of its resemblance with pyron is called the pyranose form.

Aslo study the following :

Difficulty Level:

• 100%
• 0%
• 0%
• 0%
Crack NEET with Online Course - Free Trial (Offer Valid Till August 27, 2019)