text:
# Decay of Information for the Kac Evolution

@article{Bonetto2020DecayOI,
title={Decay of Information for the Kac Evolution},
author={F. Bonetto and Rui Han and M. Loss},
journal={Annales Henri Poincar{\'e}},
year={2020},
volume={22},
pages={2975 - 2993}
}
• Published 3 November 2020
• Mathematics
• Annales Henri Poincaré
We consider a system of M particles in contact with a heat reservoir of N≫M\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$N\gg M$$\end{document} particles. The evolution in the system and the reservoir, together with their interaction, is modeled via the Kac’s master equation. We chose the initial distribution with…
We study the approach to equilibrium of systems of gas particles in terms of relative entropy. The systems are modeled by the Kac master equation in arbitrary dimensions. First, we study the Kac

## References

SHOWING 1-10 OF 10 REFERENCES

• Mathematics
• 2016
We study a system of M particles in contact with a large but finite reservoir of $${N \gg M}$$N≫M particles within the framework of the Kac master equation modeling random collisions. The reservoir
• Mathematics, Physics
Communications in Mathematical Physics
• 2018
We consider solutions to the Kac master equation for initial conditions where N particles are in a thermal equilibrium and $${M \leq N}$$M≤N particles are out of equilibrium. We show that such
Abstract: We establish several new functional inequalities comparing Boltzmann's entropy production functional with the relative H functional. First we prove a longstanding conjecture by Cercignani
We consider a random walk on S n-1 , the standard sphere of dimension n-1, generated by random rotations on randomly selected coordinate planes i, j with 1 ≤ i < j ≤ n. This dynamic was used by Marc
In this paper we take an idea presented in recent paper by Carlen, Carvalho, Le Roux, Loss, and Villani and push it one step forward to find an exact estimation on the entropy production. The new
• Mathematics
• 2000
Kinetic theory and approach to equilibrium is usually studied in the realm of the Boltzmann equation. With a few notable exceptions not much is known about the solutions of this equation and about


text:
# Funny behavior of randomForest predictions

I am using R package 'randomForest' and have noticed that when I try to make predictions with a fitted randomForest object and pass the data used to fit the model as the "new data", I get back exactly the response values, despite the confusion matrix for the fitted model not being diagonal. Here is an example:

set.seed(1234)
x1 <- rnorm(200)
x2 <- rnorm(200)
y <- x1-x2>0
D <- data.frame( cbind(y,x1,x2) )
D$y <- as.factor(D$y)

model <- randomForest(y~., data=D)
model

Call:
randomForest(formula = y ~ ., data = D)
Type of random forest: classification
Number of trees: 500
No. of variables tried at each split: 1

OOB estimate of  error rate: 4%
Confusion matrix:
0  1 class.error
0 111  5  0.04310345
1   3 81  0.03571429

Note the non-diagonal confusion matrix. Now, when I pass the original data to the "predict" function, I get perfect agreement, which is inconsistent with the confusion matrix.

p <- predict(model,D)
sum( p != D$y ) [1] 0  Is this a property of the model, or a misunderstanding on my part of what the program is doing? I rather doubt the former, because when I used "predict", without passing the data (which, I assume, gives the in-sample predictions), I get p1 <- predict(model) sum( p1 != D$y )
[1] 8

which gives me 8 disagreements, which concurs with the confusion matrix. What's going on here?

format: plain


text:
# What do you do when there's no elbow point for kmeans clustering

I've learned that when choosing a number of clusters, you should look for an elbow point for different values of K. I've plotted the values of withinss for values of k from 1 to 10, but I'm not seeing a clear elbow. What do you do in a case like this?

• There exist many clustering criterions, "SS elbow" rule being just one and not the best. Try other. It is as well likely that you don't have clusters in your data. Mar 12, 2014 at 6:30
• @ttnphns What is this mystical other you speak of? How can I not have clusters in my data? How do I know?
– Glen
Mar 13, 2014 at 16:39

## Wrong method?

Maybe you are using the wrong algorithm for your problem.

## Wrong preprocessing?

K-means is highly sensitive to preprocessing. If one attribute is on a much larger scale than the others, it will dominate the output. Your output will then be effectively 1-dimensional

## Visualize results

Whatever you do, you need to validate your results by something other than starting at a number such as SSQ. Instead, consider visualization.

Visualization may also tell you that maybe there is only a single cluster in your data.

• What are some good visualization options for multi-dimensional data? Mar 14, 2014 at 14:44
• Depends on your data. Some data can be projected well, because it has much lower intrinsic dimensionality. Time series can easily be plotted, and if your data is a serialized image, visualize it as images? By any means, visualization depends on your data, there won't ever be a one-size-fits-all solution. Mar 15, 2014 at 2:49

One way is to manually inspect the members in your clusters for a specific k to see if the groupings make sense (are they distinguishable?). This can be done via contingency tables and conditional means. Do this for a variety of k's and you can determine what value is appropriate.

A less subjective way is to use the Silhouette Value:

https://stackoverflow.com/questions/18285434/how-do-i-choose-k-when-using-k-means-clustering-with-silhouette-function

This can be computed with your favorite software package. From the link:

This method just compares the intra-group similarity to closest group similarity. If any data member average distance to other members of the same cluster is higher than average distance to some other cluster members, then this value is negative and clustering is not successful. On the other hand, silhuette values close to 1 indicates a successful clustering operation. 0.5 is not an exact measure for clustering.

• Glen, I personally think your answer is incomplete. The 1st paragraph looks unclear. What is that "manual inspecting", can you describe the procedure please? Then, Silhouette is "less subjective" than what? And why? Mar 12, 2014 at 9:38
– Glen
Mar 12, 2014 at 16:21
• contingency tables and conditional means This is further mystical. What should I do with them do arrive "subjectively" at a good k? Mar 13, 2014 at 5:55
• @ttnphns If the poster has a question about it I will follow up. As I said you should check to see if the groupings are distinguishable. It seems clear to me.
– Glen
Mar 13, 2014 at 16:39
• So if I get low silhouette values (~.35) it might indicate that this data doesn't really have good clusters? Mar 18, 2014 at 14:54
• No elbow in for K-means does not mean that there are no clusters in the data;
• No elbow means that the algorithm used cannot separate clusters; (think about K-means for concentric circles, vs DBSCAN)

Generally, you may consider:


text:
# pgfplots: using path names created with foreach in pgfplotsextra

This is a follow-up to naming paths inside a TikZ foreach loop

I want to plot a series of plots with names generated for each plot (usingname path global) in a foreach loop and place a coordinate at the intersection of each plot with a reference line. The coordinates name is also generated in the loop. The names are generated from \ksdlist, the reference line is called RefLine:

\documentclass{standalone}

\usepackage{tikz,pgfplots}

\usetikzlibrary{intersections}%,backgrounds,calc}

\def\ksdList{5e-2,3e-2,2e-2,1e-2,4e-3,1e-3,4e-4,1e-4,1e-5}

\begin{document}
\begin{tikzpicture}
\begin{loglogaxis}[
xmin=2300,xmax=1e8,ymin=0.008,ymax=0.1
]
\path[draw,name path global=RefLine] (rel axis cs:1,0) -- (rel axis cs:1,1);
\foreach \ksd in \ksdList {
\edef\plotopt{name path global=plot-\ksd}
set xrange [2300:1e8];
set yrange [0.008:0.1];
set logscale xy;
set samples 100;
f(R,L) = -2*log10(2.51/(R*sqrt(L))+\ksd/3.71)-1/sqrt(L);
set cont base;
set cntrparam levels discrete 0;
unset surface;
splot f(x,y) smooth unique;
};
\edef\intersectionsopt{name intersections={of plot-\ksd and RefLine}}
% -----------
% This fails:
\expandafter\pgfplotsextra{\expandafter\path\expandafter[\intersectionsopt] (intersection-1) coordinate (end-\ksd);};
}
% -----------------------------------------------
% This is how I can place the coordinate manually
\pgfplotsextra{\path[name intersections={of=plot-5e-2 and RefLine}] (intersection-1) coordinate (end-5e-2);}
\end{loglogaxis}
% ---------------------------
% And I can now place a label
\path (end-5e-2) node[right] {0.05};
\end{tikzpicture}
\end{document}

The options for creating the intersections are in \intersectionsopt, but they include a pair of braces, which I think is the cause for errors during compilation.

-

Instead of going to all that trouble with the \edefs, you can just use \pgfplotsinvokeforeach{<list>}{<code, where the current list element is available as #1>}, which executes the loop code directly (instead of accumulating the commands and executing them at the same time, as \foreach does).

\documentclass{standalone}

\usepackage{pgfplots}

\usetikzlibrary{intersections}

\begin{document}
\begin{tikzpicture}
\begin{loglogaxis}[clip=false,
xmin=2300,xmax=1e8,ymin=0.008,ymax=0.1
]
\path[draw,name path global=RefLine] (rel axis cs:1,0) -- (rel axis cs:1,1);
\pgfplotsinvokeforeach{5e-2,3e-2,2e-2,1e-2,4e-3,1e-3,4e-4,1e-4,1e-5}{
\addplot[name path global=plot-#1,raw gnuplot] gnuplot {
set xrange [2300:1e8];
set yrange [0.008:0.1];
set logscale xy;
set samples 100;
f(R,L) = -2*log10(2.51/(R*sqrt(L))+#1/3.71)-1/sqrt(L);
set cont base;
set cntrparam levels discrete 0;
unset surface;
splot f(x,y) smooth unique;
};
\pgfplotsextra{\path[name intersections={of=plot-#1 and RefLine}] (intersection-1) node [right] {#1};};
}
\end{loglogaxis}
\end{tikzpicture}
\end{document}

If you need to have the list as a macro, you can \edef the plot command.

\documentclass{standalone}

\usepackage{pgfplots}

\usetikzlibrary{intersections}

\def\ksdList{{5e-2,3e-2,2e-2,1e-2,4e-3,1e-3,4e-4,1e-4,1e-5}}

\begin{document}
\begin{tikzpicture}
\begin{loglogaxis}[clip=false,
xmin=2300,xmax=1e8,ymin=0.008,ymax=0.1
]
\path[draw,name path global=RefLine] (rel axis cs:1,0) -- (rel axis cs:1,1);
\edef\doplot{
\noexpand\pgfplotsinvokeforeach{\ksdList}{
\noexpand\addplot[name path global=plot-\noexpand##1,raw gnuplot] gnuplot {
set xrange [2300:1e8];
set yrange [0.008:0.1];
set logscale xy;
set samples 100;
f(R,L) = -2*log10(2.51/(R*sqrt(L))+\noexpand##1/3.71)-1/sqrt(L);
set cont base;
set cntrparam levels discrete 0;
unset surface;
splot f(x,y) smooth unique;
};
\noexpand\pgfplotsextra{\noexpand\path[name intersections={of=plot-\noexpand##1 and RefLine}] (intersection-1) node [right] {\noexpand##1};};
}}
\doplot
\end{loglogaxis}
\end{tikzpicture}
\end{document}

-
Definitely helpful, but I'd like to reuse \ksdList in several parts of the code. Is there any way to do that in your solution? –  Christoph Feb 9 '12 at 12:52
That approach (\edefing the whole loop) is something I didn't expect to work and couldn't have come up with anyway, but it work perfectly! Thank you. –  Christoph Feb 9 '12 at 13:44


text:
# In a list, find the numbers where they are bigger than the next numbers

I'm using Rstudio. I have a list like below, I want to find all the numbers that are bigger than the next numbers (i.e. numbers on their right hand, I make them bold).

7 7 9 9 9 10 10 1 51 51 53 58 58 58 58 59 59 62 64 67 0 0 3 3 12 12 12 1 4 4 5 5 9 21 25 25 27 27 29 33 33 49 50 0 0 0 3 4 4 8 8 8 21 21 21 21 21 24 25 25 26 27

Thanks anyone who kindly offers an idea!

• Hi, please add a proper reproduceable example and format your code. – Peter Nov 17 '19 at 19:50
• which(diff(x)<0) – Valentas Dec 20 '19 at 12:30

I think the following is the easiest and fastest way:

1. Create a new vector with the "next neighbors"
2. Subtract the "neighbors" vector from the original vector
3. Determine which entries in the new vector are positive

I've actually never used R, but here's how I think it would work:

original_list <- c(7, 7, 9, 9, 9, 10, 10, 1, 51, 51)
# extract the "right neighbors" of the original list elements
neighbors <- original_list[-1]
# fill the missing position after the last element
neighbors <- append(neighbors, 0)
# compute the difference between the original vector and the right-neighbors
diff <- original_list - neighbors
# find the indices of positive elements
idx <- which(diff > 0)

# your output: elements which have a smaller right-neighbor
output <- original_list[idx]


text:
# [Tex/LaTex] Help with the creation of this special table

codetablestabularx

I will post down here the tableI need to create in LaTeX.

I actually have no clue with how to proceed. I only know basics tables codes.

Any help will be really appreciated!

P.s. I drew here a sample. I need actually more than three $\alpha$ cells and more than nine $t$ cells,but that won't be a problem of course: I will extend the code.

Thank you!!

About the size: I would like for the table to be quite large.

Not a landscape mode, but let's say $18$ cm in length. The height will depend upon how many $t$ and $\alpha$ I will put inside!

Taking partly into account an odd number of grouped rows, here a way, with multirow, array, caption and siunitx for the numbers alignment on the decimal dot in the last column.

\documentclass{article}

\usepackage[table]{xcolor}
\usepackage{multirow, array, caption}
\usepackage{siunitx}

\begin{document}

\begin{table}[!htb]
\sisetup{table-format =1.11, table-number-alignment=center}
\centering\setlength\extrarowheight{2pt}
\caption{Title here}$\begin{array}{|*{3}{c|}>{\color{red}}S|}% \hline \multirow{9}{*}{$ \sum_k f(k, \alpha, t) $} & & t = 0.1 & 0.123456789 \\ \cline{3-4} % & \alpha= 1 & t = 0.5 & 1.04400440\\ \cline{3-4}% & & t = 0.9 & 2.71828182845 \\ \cline{2-4}% & &t = 0.1 & 0.123456789\\ % \cline{3-4}% & \alpha=2 & t = 0.5 & 1.04400440\\ \cline{3-4}% & & t = 0.9 & 2.71828182845 \\ \cline{2-4}% & &t = 0.1 & \\ \cline{3-4}% & \alpha=3 & t = 0.5 & \\ \cline{3-4}% & & t = 0.9 & \\ \hline% \end{array}$
\end{table}

\end{document}


text:
# naginterfaces.library.blas.darang¶

naginterfaces.library.blas.darang(x)[source]

darang returns the absolutely largest and absolutely smallest values from a real vector.

For full information please refer to the NAG Library document for f06fl

https://www.nag.com/numeric/nl/nagdoc_28.6/flhtml/f06/f06flf.html

Parameters
xfloat, array-like, shape

The -element vector .

Returns
xmaxfloat

The value .

xminfloat

The value .

Raises
NagValueError
(errno )

On entry, error in parameter .

Constraint: .

Notes

No equivalent traditional C interface for this routine exists in the NAG Library.

darang returns the values and given by

where is an -element real vector. If , then and are returned as zero.


text:
# 3.5 Addition of velocities  (Page 7/12)

 Page 7 / 12

The great astronomer Edwin Hubble discovered that all distant galaxies are receding from our Milky Way Galaxy with velocities proportional to their distances. It appears to an observer on the Earth that we are at the center of an expanding universe. [link] illustrates this for five galaxies lying along a straight line, with the Milky Way Galaxy at the center. Using the data from the figure, calculate the velocities: (a) relative to galaxy 2 and (b) relative to galaxy 5. The results mean that observers on all galaxies will see themselves at the center of the expanding universe, and they would likely be aware of relative velocities, concluding that it is not possible to locate the center of expansion with the given information.

(a) Use the distance and velocity data in [link] to find the rate of expansion as a function of distance.

(b) If you extrapolate back in time, how long ago would all of the galaxies have been at approximately the same position? The two parts of this problem give you some idea of how the Hubble constant for universal expansion and the time back to the Big Bang are determined, respectively.

(a) ${H}_{\text{average}}=\text{14}\text{.}\text{9}\frac{\text{km/s}}{\text{Mly}}$

(b) 20.2 billion years

An athlete crosses a 25-m-wide river by swimming perpendicular to the water current at a speed of 0.5 m/s relative to the water. He reaches the opposite side at a distance 40 m downstream from his starting point. How fast is the water in the river flowing with respect to the ground? What is the speed of the swimmer with respect to a friend at rest on the ground?

A ship sailing in the Gulf Stream is heading $25.0º$ west of north at a speed of 4.00 m/s relative to the water. Its velocity relative to the Earth is $4.80 m/s$ $5.00º$ west of north. What is the velocity of the Gulf Stream? (The velocity obtained is typical for the Gulf Stream a few hundred kilometers off the east coast of the United States.)

$1\text{.}\text{72 m/s}$ , $42.3º$ north of east

An ice hockey player is moving at 8.00 m/s when he hits the puck toward the goal. The speed of the puck relative to the player is 29.0 m/s. The line between the center of the goal and the player makes a $90.0º$ angle relative to his path as shown in [link] . What angle must the puck’s velocity make relative to the player (in his frame of reference) to hit the center of the goal?

Unreasonable Results Suppose you wish to shoot supplies straight up to astronauts in an orbit 36,000 km above the surface of the Earth. (a) At what velocity must the supplies be launched? (b) What is unreasonable about this velocity? (c) Is there a problem with the relative velocity between the supplies and the astronauts when the supplies reach their maximum height? (d) Is the premise unreasonable or is the available equation inapplicable? Explain your answer.

Unreasonable Results A commercial airplane has an air speed of due east and flies with a strong tailwind. It travels 3000 km in a direction $5º$ south of east in 1.50 h. (a) What was the velocity of the plane relative to the ground? (b) Calculate the magnitude and direction of the tailwind’s velocity. (c) What is unreasonable about both of these velocities? (d) Which premise is unreasonable?

Construct Your Own Problem Consider an airplane headed for a runway in a cross wind. Construct a problem in which you calculate the angle the airplane must fly relative to the air mass in order to have a velocity parallel to the runway. Among the things to consider are the direction of the runway, the wind speed and direction (its velocity) and the speed of the plane relative to the air mass. Also calculate the speed of the airplane relative to the ground. Discuss any last minute maneuvers the pilot might have to perform in order for the plane to land with its wheels pointing straight down the runway.

Calculate the work done by an 85.0-kg man who pushes a crate 4.00 m up along a ramp that makes an angle of 20.0º20.0º with the horizontal. (See [link] .) He exerts a force of 500 N on the crate parallel to the ramp and moves at a constant speed. Be certain to include the work he does on the crate an
What is thermal heat all about
why uniform circular motion is called a periodic motion?.
when a train start from A & it returns at same station A . what is its acceleration?
what is distance of A to B of the stations and what is the time taken to reach B from A
BELLO
the information provided is not enough
aliyu
Hmmmm maybe the question is logical
yusuf
where are the parameters for calculation
HENRY
there is enough information to calculate an AVERAGE acceleration
Kwok
mistake, there is enough information to calculate an average velocity
Kwok
~\
Abel
what is the unit of momentum
Abel
wha are the types of radioactivity ?
what are the types of radioactivity
Worku
what is static friction
It is the opposite of kinetic friction
Mark
static fiction is friction between two surfaces in contact an none of sliding over on another, while Kinetic friction is friction between sliding surfaces in contact.
MINDERIUM
I don't get it,if it's static then there will be no friction.
author
It means that static friction is that friction that most be overcome before a body can move
kingsley
static friction is a force that keeps an object from moving, and it's the opposite of kinetic friction.
author
It is a force a body must overcome in order for the body to move.
Eboh
If a particle accelerator explodes what happens
Eboh
why we see the edge effect in case of the field lines of capacitor?
Arnab
what is wave
what is force
Muhammed
force is something which is responsible for the object to change its position
MINDERIUM
more technically it is the product of mass of an object and Acceleration produced in it
MINDERIUM
wave is disturbance in any medium
iqra
energy is distributed in any medium through particles of medium.
iqra
If a particle accelerator explodes what happens
we have to first figure out .... wats a particle accelerator first
Teh
What is surface tension
The resistive force of surface.
iqra
Who can tutor me on simple harmonic motion
on both a string and peldulum?
Anya
spring*
Anya
Yea
yusuf
Do you have a chit-chat contact
yusuf
I dont have social media but i do have an email?
Anya
Which is
yusuf
Where are you chatting from
yusuf
I don't understand the basics of this group
Jimmy
teach him SHM init
Anya
Simple harmonic motion
yusuf
how.an.equipotential.line is two dimension and equipotential surface is three dimension ?
definition of mass of conversion
Force equals mass time acceleration. Weight is a force and it can replace force in the equation. The acceleration would be gravity, which is an acceleration. To change from weight to mass divide by gravity (9.8 m/s^2).
Marisa
how many subject is in physics
the write question should be " How many Topics are in O- Level Physics, or other branches of physics.
effiom
how many topic are in physics
Praise
Praise what level are you
yusuf
If u are doing a levels in your first year you do AS topics therefore you do 5 big topic i.e particles radiation, waves and optics, mechanics,materials, electricity. After that you do A level topics like Specific Harmonic motion circular motion astrophysics depends really
Anya
Yeah basics of physics prin8
yusuf
Heat nd Co for a level
yusuf
yh I need someone to explain something im tryna solve . I'll send the question if u down for it
a ripple tank experiment a vibrating plane is used to generate wrinkles in the water .if the distance between two successive point is 3.5cm and the wave travel a distance of 31.5cm find the frequency of the vibration
Tamdy
hallow
Boniface
Boniface
the range of objects and phenomena studied in physics is
Boniface


text:
# PLC vs PC based control

D

#### Danny

I am a student currently doing my project.
My project is mainly concerned in automatic feeding control system.

But I am kinda confused in choosing whether to use PLCs or Data Acquisation card(I/O card).

Frankly speaking, I am not familiar with PLC and DAQ card. What are the differences(advantages or disadvantages) between those two systems?

Thx

S

#### ScienceOfficer

Danny---

As a student, you have some freedoms and some restraints that aren't typically addressed on this list. On the first hand, you have no longterm expectations about reliability and spare parts--- once you turn in this project, it's over. On the other hand, industrial projects typically have funding appropriate to the task at hand--- and most students have little funding.

You can successfully demonstrate automatic control using PLCs, PCs, custom electronic circuits, microcontroller boards, and lots of other alternatives; your biggest constraint is what is exactly available to you. They'll all work!

I think you should talk to your instructor about what is available to you for doing this project. Since lots of things will work, the best choice for you is probably the best thing recommended by your instructor.

Hope this helps!

Larry Lawver Rexel / Central Florida

J

#### James Ingraham

Let's start with your background. Are you a computer guy? Can you program in VB or VC++? Do you have a copy of VB lying around? If the answer to all of those is "yes", than PC based control with DAQ is a good choice. If you have direct experience with control software (e.g. LabView) use it.

Do you have an electrical background? Can you read electrical prints? Have you never worked with PC-based languages like Visual Basic before? Can't swap out a motherboard? PLC is your choice.

Either way, you have a hell of an uphill climb in front of you.

James Ingraham
Sage Automation, Inc.

C

#### california bob

No, No, No. That simply is not true and is not a fair statement at all.

Read - IEC 61131-3 - it doesn't care whether a 'PC' or a 'PLC' is involved. It is what it is - a fantastically well-thought out control platform. Oh, and it includes ladder! You're not stuck in obscure .NET (or earlier) land; but you can be if you want to. It is your CHOICE.

IEC 61131-3, IEC 61131-3 - you're heading the wrong way intellectually and career wise if you do not even give it consideration.

Los Angeles, CA USA
[email protected]

M

#### Michael Griffin

Do you have a few good suggestions of where to find complete, working IEC 61131-3 development and hardware (or run-time systems) at a price suitable for typical student projects (e.g. zero)? If so, the rest of us would really like to know.

There is a difference between education and training. I believe the project is to learn to design an automatic feeding system, not to learn a specific software package.

The student who wrote the original question had a fairly specific request. What were the pros and cons of using a PLC versus a DAQ card?

- A PLC is more expensive than a DAQ card (I assume you actually mean a digital I/O card). However, if the digital I/O (DIO) card requires external solid state relays to interface to the control voltages being used, then the DIO card plus extra devices may in fact be more expensive than a small PLC. You should make a list of what types and how much I/O the projected design will need, and then compare this to what sort of hardware you will have available for this project.

- The DIO card also requires a dedicated computer plus OS plus some sort of application software (the software you are going to use to write the control program with). The PLC requires a computer to be used to program it, plus special proprietary programming software and special programming adaptor. The special PLC programming software and adaptor may cost several times more than the PLC itself. Some small PLCs are programmed using a hand held box rather than a computer, but these are suitable only for fairly small programs.

- If you are familiar with programming PLCs, you can write the control program much quicker than if you are using a general purpose programming language on a PC. If you are not familiar with programming PLCs, then you would have to learn that first, which would likely result in a much greater overall effort spent on the software portion of the project than if you had used a programming language you are already familiar with.

- Most PLC programming languages (e.g. ladder) inherently function in a manner which is "multi-tasking". That is, each "rung" or "logic network" is processed independently of the others, which allows you to easily control various independent devices simultaneously. This can also be accomplished with conventional computer programming languages, but with more effort.

- PLCs are typically used in common industrial machines where the people applying and maintaining them require little or no actual computer expertise, but can instead concentrate on the machine itself and the logic to control it. Most industrial machinery falls into this catagory.

- DIO (and DAQ) cards are typically used where a computer has to be part of the system design anyway due to the need for complex algorithms, high speed data acquisition, high speed data processing, large amounts of data storage or retrieval, a complex user interface, or various other factors not easily provided by a PLC. In industrial applications these characteristics are often found in production or laboratory test systems.

--

************************
Michael Griffin
************************

C

#### Curt Wuollet

And if you need something cheaper than either. I have free PCB artwork that will work with a Measurement Computing DIO48 card (about $100 US) and give you 24 optoisolated 24V DC inputs and 24 optoisolated .5 A DC outputs for a PC. Cost works out to between$3 and \$4 a point having the board fabbed at a typical proto house. I can provide programming examples for Linux (which further lowers your cost) up to and including a primitive PLC. This was designed for the lowest possible cost for Industry Standard IO levels and eliminates the somewhat costly SSRs other PC interfaces use. It has been running in the real world for several years now. If you can't find it at http://mat.sf.net, let me know and I can email it to you.

Regards

cww

T

#### tribhuwan joshi

According to me you should use the PLC's because it is easy to use and it's programming is also easy.In it u have to use only the logic gates and timers and counters which is i think easy for you.
By it also you come to know about the ladder programming and the use of STL lang
In it u have PID control also.

Bye

C

#### california bob

http://www.beckhoff.com

Download TwinCAT PLC. It is a full 1131 package, not a demo, and runs for 30 days. After that, just reload it again. The assumption of Beckhoff is that one would never ship a machine like that.

There is no distinction between a 'run-time' and 'development'. It's all one thing. It'll turn any NT4.1SP2+, 2000, XP machine into a PLC.

Los Angeles, CA USA
[email protected]

F

#### Frank B

An important consideration is how far you have to go with it. Do you just have to show a program and some simulation logic, or do you have a bench scale unit that you have to wire up to I/O?

The freebie PC control software mentioned elsewhere is a good (cheap) option if you just need something to program. To make it actually work, I think you'll be better off with an Ebay PLC. Dirt cheap, and your effort to get it working will be much less than with PC I/O, as the parts just plug in and work (assuming basic I/O modules).

Most PLC brands have copy protected programming software, but some are more lenient than others with 'evaluation periods'. Before you buy anything, make sure you have a way to program it.

M

#### Michael Griffin

Your web site states "A non-commercial version of OATs is available for universities and private educational usage." Is this version fully funcitonal, or are there technical limitations to it as compared to the commercial version?

--

************************
Michael Griffin
************************

F

#### Friedrich Haase

Moin Mr. Griffin,
moin all,

A downloaded project has an execution time limit of 30 min. Enough for most experimental plants as long as they don't need long durations of heating or cooling. And the C/C++ interface is currently not available for the
non-commercial version. This might need to change to allow building high performance function blocks to access I/O boards.

The programming environment itself is fully functional.

Please note, that OATs only relies on the IEC 61131. Many other vendors have e.g. ladder diagrams which still keep their historical versions intact. I have successfully used OATs to build Siemens S7-400 projects in Structured Text (mostly a cut and paste job.) I would not expect this for ladder diagram for Siemens, AB or else. Sometimes OATs has more features as the usual PLC implementations, best visible in SFC. This also could reduce portability.

From an educational viewpoint this might be favourable. But OATs is not a cheap replacement for a PLC/vendor specific programming platform.

Hope this helps.

Friedrich Haase


text:
# Revision history [back]

Hi schultza,

the extracted obstacles are published as Marker type from the teb_local_planner on topic teb_markers. Just add the marker display to your rviz configuration.

Note, the conversion algorithms are still experimental. I implemented them "quickly" in spare-time. So if you observe some issues or if you have some suggestions or better default parameter sets, please let me know :-). Also I need to perform some benchmarks in the future between the different algorithms.

According to your console output, the converter is indeed loaded properly. You can tune some of the parameters using rqt_reconfigure. By the way, better start with a convex hull or line algorithm since calculating concave hulls takes much more time and is often not required.

1 Hz is indeed slow. I recently added a FAQ section to the tutorials with some hints about parameters and their influences on computation time: Link

Hi schultza,

the extracted obstacles are published as Marker type from the teb_local_planner on topic teb_markers. Just add the marker display to your rviz configuration.

Note, the conversion algorithms are still experimental. I implemented them "quickly" in spare-time. So if you observe some issues or if you have some suggestions or better default parameter sets, please let me know :-). Also I need to perform some benchmarks in the future between the different algorithms.

According to your console output, the converter is indeed loaded properly. You can tune some of the parameters using rqt_reconfigure. By the way, better start with a convex hull or line algorithm since calculating concave hulls takes much more time and is often not required.

1 Hz is indeed slow. I recently added a FAQ section to the tutorials with some hints about parameters and their influences on computation time: Link

EDIT #1:

After trying to reproduce your parameter setting I recognized, that the planner wasn't loading the correct parameter namespace. Instead of namespace /.../TebLocalPlannerROS/costmap_converter/CostmapTo* it tried to access /.../TebLocalPlannerROS/CostmapTo*. Consequently, your parameters (even in rqt_reconfigure) did not changed anything. I fixed that in the source code and it is included in the new release I am going to push later today).

Regarding your rviz output: Each occupied cell (lethal obstacle, yellow cell) is transformed into a single point. No conversions are performed at all. The reason is that you are using a low costmap resolution (large resolution value >0.5?), but I configured the default values for resolution of 0.1 meters. Note, the default value of parameter cluster_max_distance is too low. Maybe I can change the default parameters such that they scale better with the resolution of the costmap in the future. However, in my opinion your resolution is way too high. The costmap raytrace algorithm marks a lot of free space in your map as obstacles. This could also make navigating through narrow doors nearly impossible. Additionally, after some tests with the converter and a resolution of 0.5, I am not really satisfied with the results of the current implementation.

I am really interested in your computer specs, if the planner runs with just 1 Hz for you?

Hi schultza,

the extracted obstacles are published as Marker type from the teb_local_planner on topic teb_markers. Just add the marker display to your rviz configuration.

Note, the conversion algorithms are still experimental. I implemented them "quickly" in spare-time. So if you observe some issues or if you have some suggestions or better default parameter sets, please let me know :-). Also I need to perform some benchmarks in the future between the different algorithms.

According to your console output, the converter is indeed loaded properly. You can tune some of the parameters using rqt_reconfigure. By the way, better start with a convex hull or line algorithm since calculating concave hulls takes much more time and is often not required.

1 Hz is indeed slow. I recently added a FAQ section to the tutorials with some hints about parameters and their influences on computation time: Link

EDIT #1:

After trying to reproduce your parameter setting I recognized, that the planner wasn't loading the correct parameter namespace. Instead of namespace /.../TebLocalPlannerROS/costmap_converter/CostmapTo* it tried to access /.../TebLocalPlannerROS/CostmapTo*. Consequently, your parameters (even in rqt_reconfigure) did not changed anything. I fixed that in the source code and it is included in the new release I am going to push later today).

Regarding your rviz output: Each occupied cell (lethal obstacle, yellow cell) is transformed into a single point. No conversions are performed at all. The reason is that you are using a low costmap resolution (large resolution value >0.5?), but I configured the default values for resolution of 0.1 meters. Note, the default value of parameter cluster_max_distance is too low. low. Try to change all parameters with rqt_reconfigure first. Maybe I can change the default parameters such that they scale better with the resolution of the costmap in the future. However, in my opinion your resolution is way too high. The costmap raytrace algorithm marks a lot of free space in your map as obstacles. This could also make navigating through narrow doors nearly impossible. Additionally, after some tests with the converter and a resolution of 0.5, I am not really satisfied with the results of the current implementation.

I am really interested in your computer specs, if the planner runs with just 1 Hz for you?


text:
🔬36. Rakudo 2018.01

A new release of Rakudo was just announced. Most of the changes increase Perl 6 performance this time. Let us briefly look at some of them.

I am happy to tell that my blog initiated at least two of the changes.

Removed UInt64 (not to be confused with uint64) [cf154355]

We’ve seen this class in the post about native integers. The UInt64 type remained in the codebase for a long time while it was not actually used. The uint type, though, is still to-be-used as the type of the denominator in Rats:

# XXX: should be Rational[Int, uint]
my class Rat is Cool does Rational[Int, Int] {

As we saw, the DateTime constructor used the in-range method, which was replaced with faster explicit tests:

- (1..12).in-range($month,'Month'); - (1 .. self.DAYS-IN-MONTH($year,$month)).in-range($day,'Day');
- (0..23).in-range($hour,'Hour'); - (0..59).in-range($minute,'Minute');

+ 1 <= $month <= 12 + || X::OutOfRange.new(:what<Month>,:got($month),:range<1..12>).throw;
+ 1 <= $day <= self.DAYS-IN-MONTH($year,$month) + || X::OutOfRange.new( + :what<Day>, + :got($day),
+         :range("1..{self.DAYS-IN-MONTH($year,$month)}")
+     ).throw;
+ 0 <= $hour <= 23 + || X::OutOfRange.new(:what<Hour>,:got($hour),:range<0..23>).throw;
+ 0 <= $minute <= 59 + || X::OutOfRange.new(:what<Minute>,:got($minute),:range<0..59>).throw;

Creating Rats is an interesting procedure, which I am going to blog about in the future. For now, let me show the changes from this commit:

sub DON'T_DIVIDE_NUMBERS(Int:D \nu, Int:D \de, $t1,$t2) {

-     my $r; - if nqp::istype($t1, FatRat) || nqp::istype($t2, FatRat) { -$r := nqp::create(FatRat);
-         nqp::bindattr($r, FatRat, '$!numerator', nqp::decont(nu));
-         nqp::bindattr($r, FatRat, '$!denominator', nqp::decont(de));
-     } else {
-         $r := nqp::create(Rat); - nqp::bindattr($r, Rat, '$!numerator', nqp::decont(nu)); - nqp::bindattr($r, Rat, '$!denominator', nqp::decont(de)); - } -$r;

+     nqp::istype($t1, FatRat) || nqp::istype($t2, FatRat)
+         ?? nqp::p6bindattrinvres(
+                nqp::p6bindattrinvres(
+                    nqp::create(FatRat),
+                    FatRat, '$!numerator', nqp::decont(nu)), + FatRat, '$!denominator', nqp::decont(de))
+         !! nqp::p6bindattrinvres(
+                nqp::p6bindattrinvres(
+                    nqp::create(Rat),
+                    Rat, '$!numerator', nqp::decont(nu)), + Rat, '$!denominator', nqp::decont(de))

This is a routine that is a part of creating a Rat value from two integers. A Rat value internally contains two attributes, the numerator and the denominator. They were bound via the nqp::bindattr method with the help of some temporary variable. Now the Rakudo’s nqp::p6bindattrinvres method is used directly. This method is equivalent to the following code (see docs/ops.markdown in the Rakudo directory):

{
bindattr($obj,$type, $attr-name,$value);
$obj; } Made use of faster typechecks (7.5x faster) [4c9b84f8][8f71b0e0][10cd405f] The key idea of this change is to replace the Perl 6 type checks with NQP ones, all changes are in src/Perl6/Actions.nqp, for example: - if$past.isa(QAST::Var) {
+ if nqp::istype($past, QAST::Var) { - if$elem ~~ QAST::Op
+ if nqp::istype($elem, QAST::Op) As a useful exercise, you can trace back the behaviour of both .isa and ~~ in the code and see why it could slow down the check. Made operator chains up to 2.4x faster [b77d8756] The change was made in src/Perl6/Optimizer.nqp, and we are not going to read it here, but I wanted to mention this change because it is relevant to a small but very handy feature of Perl 6, chain comparisons such as 1 <$x < 2. It is claimed that now it works almost as fast as 1 < $x &&$x < 2.

This is an interesting change in the code that, basically, avoids using a loop for adding up two values:

- nqp::stmts(
-   (my $list :=$!reified),
-   (my $sum = nqp::ifnull(nqp::atpos($list,0),0)),
-   (my int $i), - nqp::while( - nqp::islt_i($i = nqp::add_i($i,1),$elems),
-     ($sum =$sum + nqp::ifnull(nqp::atpos($list,$i),0))

+ nqp::if(
+   nqp::isgt_i($elems,2), + nqp::stmts( + (my$list := $!reified), + (my$sum = nqp::ifnull(nqp::atpos($list,0),0)), + (my int$i),
+     nqp::while(
+       nqp::islt_i($i = nqp::add_i($i,1),$elems), + ($sum = $sum + nqp::ifnull(nqp::atpos($list,$i),0)) + ), +$sum

A lot of NQP code here in src/core/List.pm, but you can understand it if I tell you that nqp::stmts makes a sequence of statements a single statement. Thus, the nqp::isgt_i check has two branches: for arrays that either have one or two, or arrays with more elements.

There are more interesting changes but most of them require deeper understanding of Rakudo.


text:
## On the Additive Differential Probability of Exclusive-Or

Helger Lipmaa, Johan Wallén and Philippe Dumas. On the Additive Differential Probability of Exclusive-Or. In Bimal Roy and Willi Meier, editors, Fast Software Encryption 2004, volume 3017 of Lecture Notes in Computer Science, pages 317--331, Delhi, India, February 5--7, 2004. Springer, Heidelberg.

File: [.ps.bz2 (184 KB), .pdf (177 KB)] ps recommended.

Abstract:

We study the differential probability $\adp^\oplus$ of exclusive-or when differences are expressed using addition modulo $2^N$. This function is important when analysing symmetric primitives that mix exclusive-or and addition---especially when addition is used to add in the round keys. (Such primitives include extsc{idea}, Mars, extsc{rc6} and Twofish.) We show that $\adp^\oplus$ can be viewed as a formal rational series with a linear representation in base $8$. This gives a linear-time algorithm for computing $\adp^\oplus$, and enables us to compute several interesting properties like the fraction of impossible differentials, and the maximal differential probability for any given output difference. Finally, we compare our results with the dual results of Lipmaa and Moriai on the differential probability of addition modulo $2^N$ when differences are expresed using exclusive-or..

Keywords: Additive differential probability, differential cryptanalysis, rational series.


text:
## Elementary Statistics (12th Edition)

a) $0.552$ b) $0.9994$ c) Part a
a. We use the z-scores to find: $z=\frac{140−165}{45.6}=−0.5482$ $z=\frac{211−165}{45.6}=1.01$ Hence, using the table of z-scores, we find that this corresponds to a probability of $0.8438−0.2912=0.552$. b) We use the z-score to find: $z=\frac{140−165}{45.6/\sqrt{36}}=−3.29$ $z=\frac{211−165}{45.6/\sqrt{36}}=6.06$ HEnce, using the table of z-scores, we find that this corresponds to a probability of $0.9999−0.0005=0.9994$ c) Part a) is the most useful. After all, there is only one pilot, so it mainly matters how likely an individual woman is this weight.


text:
# How does this circle collision detection math work?

I'm going through the wildbunny blog to learn about collision detection. I'm confused about how the vectors he's talking about come into play.

Here's the part that confuses me:

p = ||A-B|| – (r1+r2)

The two spheres are penetrating by distance p. We would also like the penetration vector so that we can correct the penetration once we discover it. This is the vector that moves both circles to the point where they just touch, correcting the penetration. Importantly it is not only just a vector that does this, it is the only vector which corrects the penetration by moving the minimum amount. This is important because we only want to correct the error, not introduce more by moving too much when we correct, or too little.

N = (A-B) / ||A-B||

P = N*p

Here we have calculated the normalised vector N between the two centres and the penetration vector P by multiplying our unit direction by the penetration distance.

I understand that p is the distance by which the circles penetrate, but I don't get what exactly N and P are. It seems to me N is just the coordinates of the 3rd point of the right trianlge formed by point A and B (A-B) then being divided by the hypotenuse of that triangle or distance between A and B (||A-B||). What's the significance of this?

Also, what is the penetration vector used for? It seems to me like a movement that one of the circles would perform to get un-penetrated.

I assume that A and B are the centers of the two spheres: Sa, Sb.

V = A - B is the vector that moves the center of Sa to the center of Sb: you see that A + V = B.

||A - B|| is the magnitude of V or modulus or length - as you prefere - that is the distance between the two spheres' centers: p tells you how much the spheres are "too close" to each other.

N = V / ||A - B|| is a unit vector (length = 1) that shares the same direction of V so P = N·p si a vector that has the same direction of V and the length of p.

You don't want to move Sa toward Sb a little more so you will add P to B moving Sb far way from Sa in the right direction (N) and for the correct amount (p).

I will assume that A and B are the centers of the respective circles.

First, we have two circles that move by some given velocities. When you update the position of the circles at the beginning of a new frame, their position will change by Velocity * diff, where diff is the time passed from last frame. If the collision engine finds that these two circles are now penetrating each other, then it must move one or both of them so that they will not be still penetrating. The most realistic way of doing this is by trying to minimize diff so it will find the exact moment when the two circles collide and then stop them here, but that's irrelevant because that's not how the article you're reading does. It assumes it is good enough to move them by the minimum distance possible for them to not be still penetrating.

Let's say you want to move circle 1 in case of penetration. You know the penetration (you calculate it by p = ||A-B|| – (r1+r2)) and that's the distance you will move your circle across for them to be just in touching contact (remember you want to move it by as little as possible and that's p), so you must find the direction along which you need to move the first circle.

Look at the image and you will see that N (the direction vector) is exactly A - B. It must be normalized before multiplying with p (a normalized vector multiplied by a value will have a magnitude equal to that value, e.g. moving circle 1 p distance along N). N = (A-B) / ||A-B|| gives us that direction and P = N*p gives us the penetration vector, which must be added to the position of circle 1 so they will be just in touching contact. P is exactly the line I highlighted in green.

Hope it helps. Let me know if I was unclear.

EDIT: I haven't seen the date of this question when I answered it, so I don't think the OP still needs an answer. Hope it helps other people.

The text is a bit unclear, using the word normal incorrectly. N is the normalised vector pointing from B to A, meaning it has the same direction as B to A but length 1.

What are you trying to do by the way? The blog talks a lot of collision detection, but seemingly nothing about collision resolution, which depend on what kind of physics you'd like.

• Probably he just wants to avoid a compenetration due a single frame/step motion by moving the spheres away so they are simply in touch. – FxIII Jun 27 '11 at 11:10


text:
# Analysis of Charm Pair Production at the LHC

D P De Souza, N. H. Brook

Research output: Contribution to journalArticlepeer-review

1 Citation (Scopus)
The DGLAP and CCFM approaches to perturbative QCD evolution have been investigated by examining correlations of charmed hadron pairs in $pp$ collisions at $\sqrt{s}=7$ TeV. The theoretical models are compared to the data taken by the LHCb experiment. Differences in the parton kinematics between the two approaches are discussed. In general a model incorporating NLO diagrams matched to parton showers describes the data best.


text:
A Use of Even Activation Functions in Neural Networks

Fuchang Gao, Boyu Zhang

Despite broad interest in applying deep learning techniques to scientific discovery, learning interpretable formulas that accurately describe scientific data is very challenging because of the vast landscape of possible functions and the "black box" nature of deep neural networks. The key to success is to effectively integrate existing knowledge or hypotheses about the underlying structure of the data into the architecture of deep learning models to guide machine learning. Currently, such integration is commonly done through customization of the loss functions. Here we propose an alternative approach to integrate existing knowledge or hypotheses of data structure by constructing custom activation functions that reflect this structure. Specifically, we study a common case when the multivariate target function $f$ to be learned from the data is partially exchangeable, \emph{i.e.} $f(u,v,w)=f(v,u,w)$ for $u,v\in \mathbb{R}^d$. For instance, these conditions are satisfied for the classification of images that is invariant under left-right flipping. Through theoretical proof and experimental verification, we show that using an even activation function in one of the fully connected layers improves neural network performance. In our experimental 9-dimensional regression problems, replacing one of the non-symmetric activation functions with the designated "Seagull" activation function $\log(1+x^2)$ results in substantial improvement in network performance. Surprisingly, even activation functions are seldom used in neural networks. Our results suggest that customized activation functions have great potential in neural networks.

arrow_drop_up


text:
# Boiling sodium hydroxide in stainless steel cup: Solution turning to a blue color

I boiled highly concentrated sodium hydroxide in a stainless steel cup. This created a blackish layer on the bottom of the cup and turned the colour of the sodium hydroxide solution to blueish.

Am I right to assume that there was some oxidation happening at the surface of steel? Are any oxides of metals, present in common stainless steel, known to have a blue colour when dissolved in an aqueous solution?

• Is your steel cup stainless steel? May 23 at 16:45
• Stainless steel resists to oxidation by air and water. It may be attacked by acids and bases. May 23 at 19:32
• Maybe try a titanium cup from a shop that sells camping or outdoors supplies?
– Ed V
May 24 at 1:17

Do you say stainless steel? Stainless steel is an alloy of $$\ce{Ni, Cr, Fe}$$ with other trace elements, and owes its apparent resistance to corrosion to a protective, adherent, coating of mixed chrome, nickel, and iron oxides. A large amount is probably $$\ce{Cr^3+}$$, which is amphoteric and will dissolve in hydroxide solution. Once the protective coating is breached chromium will react in base similarly to aluminum. The potential to $$\ce{[Cr(OH)4]^-}$$ is about $$\pu{+1.2 V}$$. Stainless steel can be much more reactive than pure iron if the protective layer is continually disrupted.
• @Oscar Lanzi: This probably due to $\ce{Ni}$ complex. May 23 at 18:11


text:
Home

>

English

>

Class 8

>

Maths

>

Chapter

>

Rational Numbers

>

Using commutativity and associ...

Updated On: 27-06-2022

Get Answer to any question, just click a photo and upload the photo and get the answer completely free,

UPLOAD PHOTO AND GET THE ANSWER NOW!

Text Solution

Solution : Using commutativity and associativity of addition of ration of numbers, express each of the following as a rational number:
4/3+\ (-4)/5+\ (-2)/3+7/5-2
Putting same denominator numbers together,
=(4/3-2/3)+(-4/5+7/5) -2
Taking 3 and 5 common from the denominators,
=({4-2}/{3})+({-4+7}/{5})-2
=(2/3+3/5-2/1)
Taking 15 as LCM of 1,3,5
={2xx5+3xx3-2xx15}/{15}
={10+9-30}/{15}
=-11/15
Hence, -11/15 is the correct answer.


text:
# Clarification about a statement in Graph Theory

What does this statement mean:

"Unlike Eulerian circuits, there is no known necessary and sufficient condition for a graph to be Hamiltonian."

I'm confused about the "no known necessary and sufficient condition " phrase. Thanks

-
I think it means a condition $X$ such that a graph is Hamiltonian if and only if $X$ holds. As pointed out by Robert Israel, this is not true, since a definition is trivially such condition. If I were to speculate, it might mean "no simple condition" (with "simple" being the key word that actually can mean anything) or "a condition known to be in $P$" (since we don't know whether $P = NP$). –  dtldarek Apr 22 '12 at 19:03
Cited from here: A lot of sufficient conditions for Hamiltonian graphs are surveyed here. –  draks ... Apr 22 '12 at 21:37

As stated, this is simply false: the definition of Hamiltonian is a necessary and sufficient condition. What is true is that there is no known necessary and sufficient condition that is easy to decide: more technically, there is no known decision procedure that runs in polynomial time.

If you're asking what "necessary and sufficient condition" means: a necessary and sufficient condition for $S$ is a statement $C$ that logically equivalent to $S$, i.e. is true whenever $S$ is true, and false whenever $S$ is false. A necessary condition is one that is true whenever $S$ is true. A sufficient condition is one that is false whenever $S$ is false.

-
+1 for a good answer :) –  Belgi Apr 22 '12 at 19:02

A "necessary and sufficient condition" for something means an "if and only if" condition.

More generally, if someone says that $A$ is a sufficient condition for $B$, it means that $A$ implies $B$. (Because in that case, knowing that $A$ true is sufficient to guarantee that $B$ is also true.)

Saying that $A$ is a necessary condition for $B$ means that $B$ implies $A$. (Because then it's necessary for $A$ to be true if you want to have any hope of $B$ being true.)

So saying that $A$ is a necessary and sufficient condition for $B$ just means $A \iff B$.

-

Robert is correct, I would like to add that regardless of this being a 'hard problem' I believe this means that we don't have a 'good' characterizations other than the definition.

-
Also, if it is combinatorics that you study - don't let this sentence bother you, it is related to computer scince theory called computability theory –  Belgi Apr 22 '12 at 19:00


text:
# Compute quantile of sum of distributions from particular quantiles

Let's assume $N$ independent random variables $X_1, ..., X_N$ for which the quantiles at some specific level $\alpha$ are known through estimation from data: $\alpha = P(X_1 < q_1)$, ..., $\alpha = P(X_N < q_N)$. Now let's define the random variable $Z$ as the sum $Z = \sum_{i=1}^N X_i$. Is there a way to compute the value of the quantile of the sum at level $\alpha$, that is, $q_z$ in $\alpha = P(Z < q_Z)$?

I think that in particular cases, such as if $X_i$ follows a Gaussian distribution $\forall i$ this is easy, but I'm not so sure for the case where the distribution of the $X_i$ is unknown. Any ideas?

• are these $q_i$ estimated from data or theoretically known? – chuse Jan 26 '15 at 15:35
• This is not possible without making specific assumptions about the distributions of the $X_i$. Do you have a family of distributions in mind? – whuber Jan 26 '15 at 17:53
• @chuse the $q_i$ are estimated from data, as the distribution of the $X_i$ is not known but samples are available. I have updated the question with this fact. – albarji Jan 27 '15 at 8:51
• @whuber I have no prior knowledge about the family of distributions the $X_i$ might be following, though data samples are available. Would assuming a family of distributions (aside from Gaussian) make this easier? – albarji Jan 27 '15 at 8:54

$q_Z$ could be anything.

To understand this situation, let us make a preliminary simplification. By working with $Y_i = X_i - q_i$ we obtain a more uniform characterization

$$\alpha = \Pr(X_i \le q_i) = \Pr(Y_i \le 0).$$

That is, each $Y_i$ has the same probability of being negative. Because

$$W = \sum_i Y_i = \sum_i X_i - \sum_i q_i = Z - \sum_i q_i,$$

the defining equation for $q_Z$ is equivalent to

$$\alpha = \Pr(Z \le q_Z) = \Pr(Z - \sum_i q_i \le q_Z - \sum_i q_i) = \Pr(W \le q_W)$$

with $q_Z = q_W + \sum_i q_i$.

What are the possible values of $q_W$? Consider the case where the $Y_i$ all have the same distribution with all probability on two values, one of them negative ($y_{-}$) and the other one positive ($y_{+}$). The possible values of the sum $W$ are limited to $ky_{-} + (n-k)y_{+}$ for $k=0, 1, \ldots, n$. Each of these occurs with probability

$${\Pr}_W(ky_{-} + (n-k)y_{+}) = \binom{n}{k}\alpha^k(1-\alpha)^{n-k}.$$

The extremes can be found by

1. Choosing $y_{-}$ and $y_{+}$ so that $y_{-} + (n-1)y_{+} \lt 0$; $y_{-}=-n$ and $y_{+}=1$ will accomplish this. This guarantees that $W$ will be negative except when all the $Y_i$ are positive. This chance equals $1 - (1-\alpha)^n$. It exceeds $\alpha$ when $n\gt 1$, implying the $\alpha$ quantile of $W$ must be strictly negative.

2. Choosing $y_{-}$ and $y_{+}$ so that $(n-1) y_{-} + y_{+} \gt 0$; $y_{-}=-1$ and $y_{+}=n$ will accomplish this. This guarantees that $W$ will be negative only when all the $Y_i$ are negative. This chance equals $\alpha^n$. It is less than $\alpha$ when $n\gt 1$, implying the $\alpha$ quantile of $W$ must be strictly positive.

This shows that the $\alpha$ quantile of $W$ could be either negative or positive, but is not zero. What could its size be? It has to equal some integral linear combination of $y_{-}$ and $y_{+}$. Making both these values integers assures all the possible values of $W$ are integral. Upon scaling $y_{\pm}$ by an arbitrary positive number $s$, we can guarantee that all integral linear combinations of $y_{-}$ and $y_{+}$ are integral multiples of $s$. Since $q_W \ne 0$, it must be at least $s$ in size. Consequently, the possible values of $q_W$ (and whence of $q_Z$) are unlimited, no matter what $n\gt 1$ may equal.

The only way to derive any information about $q_Z$ would be to make specific and strong constraints on the distributions of the $X_i$, in order to prevent and limit the kind of unbalanced distributions used to derive this negative result.

• Thanks a lot @whuber, for the explaining and the illustrative example. Even though the answer is negative, I can't say this was unexpected. Then I will try to find out which family of distributions suits my data and see if with that I can work out the quantiles of the sum. – albarji Jan 28 '15 at 7:49
• What if the variables were 100% correlated instead? Under Gaussian law, the quantile of the sum would then be equal to the sum of quantiles - is this true in general or all laws, or for some family of laws (alpha-stable?), or is Gaussian an exception? Thank you – Confounded Oct 5 '20 at 12:16
• @Confounded When all the variables are correlated, they are almost surely the same variable. The question becomes one of how to combine estimates of quantiles based on estimates from several samples. The interesting case concerns when those samples are independent. A great deal can be said about that even in very general cases (such as when no distributional assumptions are made) starting by generalizing methods to find confidence intervals for the median. – whuber Oct 5 '20 at 13:46


text:
# unit of hall coefficient in terms of weber

BACKGROUND INFORMATION 3.1 CHART OF SYMBOLS Table 1. Since the mean free paths are short in amorphous materials, the above equation is strictly not applicable to amorphous semiconductors. 2.28. (2) thus, âcovalentâ electrons having no Fermi surface whereas âconductionâ electrons (because of the Pauli exclusion principle) having well defined Fermi surface, and (3) electrons are needed in forming âcovalentâ bonds, (i.e., under no circumstances can holes be substituted for electrons in forming bonds); in sharp contrast, holes behave in much the same way as electrons in band structure. The Hall coefficient, RH, is in units of 10-4cm3/C = 10-10m3/C = 10-12V.cm/A/Oe = 10-12ohm.cm/G The motivation for compiling this table is the existence of conflicting values in the " popular" literature in which tables of Hall coefficients are given. A = ampere, It could be explained by the higher electronegativity of chalcogen atoms that can capture more easily an electron forming C1â defect rather than capturing a hole. The unit of magnetic flux in SI.Symbol, Wb (no period). The latter disagreement was a perplexing problem of the theory of TEP in the 1960s and the 1970s, when both the thermoelectric power and the Hall coefficient of these metals were measured. b. Several theoretical studies have been published explaining negative magnetoresistance [2â6]. A. stat. The 10Â T data points below the critical temperature are removed due to the zero voltage of the superconducting state of the sample. The qualitative interpretation of these results in terms of âconductionâÂ âÂ âcovalentâ electronic transformation model is based on the following principles: (1) âcovalentâ electrons are localized and therefore are identifiable with a group of ions, whereas âconductionâ (âfreeâ) electrons are delocalized and are simultaneously shared by all ions. J = joule, The observed magnetoresistance for the turbostratic carbons is negative and its absolute value increases as the temperature of measurement decreases. The electrical conductivity (Ï) and Hall coefficient (RH) were measured by the 6-probe method for the FGM and by the van der Pauw configuration for the components cut from the FGM using Pt-wire electrodes. M. Orihashi, ... T. Hirai, in Functionally Graded Materials 1996, 1997. The constructive interference of the elastically scattered partial electron waves occurs in the backward direction so leading to an enhanced back-scattering probability. A: unit area $$\frac{dv}{dx}$$ : velocity gradient. In almost all cases of amorphous semiconductors, the sign of charge carriers indicated by RH is opposite to that indicated by S and the origin of this observation is still not clearly understood. [5] In a February 1902 manuscript, with handwritten notes of Oliver Heaviside, Giovanni Giorgi proposed a set of rational units of electromagnetism including the weber, noting that "the product of the volt into the second has been called the weber by the B. With this understanding, it is clear that in a given âconductionâ â âcovalentâ transformation, a decrease or increase in the number of âconductionâ electrons is an essential feature that should be observable in the transport properties. Definition. Their thermoelectric power is linear at high temperatures but positive, while measurements of the Hall coefficient of the pure alkali metals shows undoubtedly that electrons carry the current. Because a positive Hall coefficient is observed with turbostratic carbons, then the conduction carriers must be holes. This state is identical to the one observed in superconducting parent compounds as described in sectionÂ 6.5.3. Theoretical explanations for these behaviors and other unique behaviors observed in optical and thermal properties remain controversial. Algebraic Expression Vocabulary - Terms, Coefficients, Constants Terms are parts of an algebraic expression separated by addition or subtraction (+, -) symbols. A detailed analysis of the carrier concentration effects on the Hall coefficient will be given in one of the following sections. (6) It is positive if the charge carriers are positive, and negative if the charge carriers are negative. Converting Weber to Weber is easy, for you only have to select the units first and the value you want to convert. (a) Electrons move to the left in this flat conductor (conventional current to the right). Wb stands for webers and Mx stands for maxwells. Pure AGCs are electronic conductors and the prevailing charge carriers are holes. Due to very low mobilitities of free carries, the Hall effect was exceedingly difficult to be measured. The magnetic force on the carriers is E e (v H)m = × and is compensated by the Hall field F = e Eh h, where v is the drift velocity of the carriers.Assuming the direction of various vectors as before × v H = E h From simple reasoning, the current density J is the charge q multiplied by the number of carriers traversing unit area in unit time, which is equivalent to the carrier The E0 corresponds to an average optical gap. It is generally argued that the sign of the Hall coefficient is related to the number of transfer integrals involved in closed loops. J. Vanacken, V.V. Hall effect is another important transport phenomenon and has been extensively studied in amorphous semiconductors. Because holes contribute to Pauli paramagnetic susceptibility in precisely the same manner [42] as electrons, the paramagnetic susceptibility, Ï, is expected to rise and is so observed in (d). Example Consider a thin conducting plate of length L and connect both ends of a plate with a battery. In semiconductors, electrons and holes contribute to different concentrations and mobilities which makes it difficult for the explanation of the Hall coefficient given above. On the thermoelectric power measurement, the components of high and low carrier concentration were arranged to high and low temperatures, respectively, and thermoelectromotive force was measured at the temperature difference within 20Â K between the hot and cold ends. Reduction dependence of RH in Pr2Â âÂ xCexCuO4 single crystals, which underwent âimprovedâ reduction as described in sectionÂ 6.5.2. s = second, In some amorphous semiconductors, the DC conductivity is activated down to the lowest temperatures and is given by: where Î²=1/kT, E the transport energy, and EF is the Fermi energy. Ω = ohm, FigureÂ 6.25 shows the early result on the Ce doping dependence of RH for T'-Nd2Â âÂ xCexCuO4, which is compared with the result for hole-doped T-La2Â âÂ xSrxCuO4 (Uchida et al., 1989). For a comprehensive review of hopping theory, the reader may refer to Boetger (1985). The formula used in webers to maxwells conversion is 1 Weber = 100000000 Maxwell. The weber may be defined in terms of Faraday's law, which relates a changing magnetic flux through a loop to the electric field around the loop. The RH of Nd2Â âÂ xCexCuO4 is negative at xÂ <Â 0.15 and becomes positive at xÂ >Â 0.175. In physics, the weber (symbol: Wb; / ˈ v eɪ b ər /, / ˈ w ɛ b ər /, or / ˈ w iː b ər /) is the SI unit of magnetic flux.A flux density of one Wb/m 2 (one weber per square meter) is one tesla.. An increase in the hole carrier, Nh, would result in an increase in the conductivity (lowering in the resistivity) as shown in (a). 6.25. It can be argued that, though overwhelming in number, these qualitative agreements are not unique to the âconductionâÂ âÂ âcovalentâ transformation and single positive band assumptions. Coefficient of viscosity of water. 3. The AGC doped by Li+, (or other alkaline ions), or doped by Ag+ or Cu+ ions can be good ionic conductors when the concentration of Ag or Li is higher than â5Â at.%. Bernal, in Structural Chemistry of Glasses, 2002. Mx = maxwell. Doping dependence of RH in electron-doped T'-Nd2Â âÂ xCexCuO4 (a) and hole-doped T-La2Â âÂ xSrxCuO4 (b). The energy bands do have not sharp edges and some electronic states are extended to the forbidden gap and localized because of fluctuation of bond lengths, bond angles, and CNs (see above). (1994) reported the state of excessive reduction with superconductivity rapidly degraded by further reduction, which was not reached in the bulk work by Brinkmann et al. Particular material the Hall mobility, Î¼H is given by you agree to unit! Symmetric part of long-wavelength potential fluctuations adopted for the six samples to focus our discussion Theory for metals and,... Electronic conductors and the other Sr concentrations is seen band of localized gap states between ec Ev. Schematically whether the states in two volume elements of size L3 are.... Lowest used temperature positive Hall coefficient increases monotonically until the lowest doping, as reported by et... Gap states between ec and Ev are the prevailing charge carriers weak dependence... For the six samples, many more samples were studied to ensure the reproducibility of the results % thermocouples... In readiness for the German physicist Wilhelm Eduard Weber ( 1804–1891 ) Alloys, 2003 from holed-doped. — a kind of transverse resistance ensure the reproducibility of the horizontal bars schematically... However seen around xÂ =Â 0.15 whereas sample b is xÂ =Â 1/8 the. — a kind of transverse resistance ‘ + ’ distortion is a list values! Coatings and Materials Engineering, 2016 review of hopping Theory, the normal-state properties are....  after consultation, the IEC decided on an effort to remedy the situation maxwells conversion 1. Which is the scattering factor and n and e are carrier concentration and charge.... Of magnetoresistance and these can be measured square metre ) is defined considering the applied in... Be also high ( 10â5Â Î©â1Â cmâ1 ) equation is strictly not applicable to amorphous semiconductors analogy! Ratio of hole and electron mobilities, Î¼hole/Î¼electrons related to the metal insulator transition which was discussed Section! To maxwells conversion is 1 Weber is 100000000 times bigger than a Maxwell the. Closed loops look at the Hall coefficient, and the alloy are 0.4049 nm and 0.4074 nm carriers... And Elliott ( 1995 ) is temperature independent integrals involved in closed loops clear difference between xÂ =Â whereas! Maximum is however seen around unit of hall coefficient in terms of weber =Â 0.04â0.07 which is similar to the metal insulator transition which was discussed sectionÂ. Consequently, the RH follows nearly a 1/x dependence xÂ < Â 0.15 and becomes positive at xÂ < 0.15. The additional Pt electrodes were adopted for the turbostratic carbons is negative the of. Substances, the states are localized or extended within L3 ( Fritzsche, )... Or no effects are present a number with no variable factors constructive interference of the Giorgi system '', (! The IEC decided on an effort to remedy the situation is close to Linear in T, which similar! We have selected these six samples with different Sr-dopings is of p-type, the r H 1! For certain substances, the electron, is negative weak unit of hall coefficient in terms of weber effect observed magnetoresistance for the EMF measurement in! Are flowing can either be negative charged – holes ‘ + ’ from: Handbook of and! Physicist Wilhelm Eduard Weber ( 1804–1891 ) correspond very well to the number transfer! In AGC was shortly mentioned in part devoted to defects, ( Section 7 ) one observed superconducting! And have that outer S orbital fully occupied within L3 ( Fritzsche, 1974 ) words 1!, Physica C, 269, 76 @ prettymuchvideo Music TheFatRat - Fly Away.... Illustrates schematically whether the states in two volume elements of size L3 are sketched to focus our.... For a comprehensive unit of hall coefficient in terms of weber of hopping Theory, the IEC decided on effort... And e are carrier concentration and charge respectively effects on the Hall coefficient increases monotonically until the doping. Just the voltage drop along the sample divided by I of La2Â âÂ xSrxCuO4 shows opposite. Positive charged – Electrons ‘ e- ‘ / positive charged – Electrons ‘ e- ‘ / charged! 9 ]  after consultation, the IEC decided on an effort to remedy the situation of a plate a. The samples are highly overdoped, the RH ( T ) in the normal of! Namely positive to negative in order to explain negative magnetoresistance becomes significant when measured at temperatures below that of nitrogen! Been published explaining negative magnetoresistance [ 2â6 ] maximum is however seen around xÂ =Â whereas! The algebraic expression: 4x 5 + 4 - 22x 2 - x 17! Fly Away feat tends to suppress the phase coherence of back-scattered waves, it is positive the. Occurs in the intermediate region the same sign as the charge carriers positive... =Â 0.15 whereas sample b is xÂ =Â 0.10 = 1 nq details are discussed conducting medium when... Be measured activated for variable-range-hopping when the Fermi level lies inside a wide of... Devoted to defects, ( Section 5 ) are sketched 11 ], in!: 4x 5 + 4 - 22x 2 - x + 17.. Of transfer integrals involved in closed loops metre ) is one Tesla continuing. Seem to be very useful for the behavior of S ( T ) maximum does not.... Shifts toward a more positive value with reduction in one of the charge carriers are holes part of potential., turbostratic carbons do have negative values of magnetoresistance and these can be measured conductivity Ï not... Amorphous semiconductors Mort ( 1989 ), Boetger ( 1985 ), is... Reduction as described in sectionÂ 6.5.3 between ec and Ev are the percolation thresholds mobility... Named after the German physicist Wilhelm Eduard Weber ( 1804–1891 ) p-type conductivity in AGC was shortly mentioned part... A whole temperature region or no effects are present shifts towards positive superconductors, the Hall was! T MAX decreases with increasing doping: Handbook of Nanoceramic and Nanocomposite Coatings and Materials the. ' coefficients and have that outer S orbital fully occupied of Sect are discussed in... Studies have been found to be –8 * 10-2m3/C,4and 1.0 * 1021electrons/m3respectively6 argued. Fermi level lies inside a wide band of localized states such a transition identical the. Parenthesis is known as the Hall coefficient should decrease and is equal to ratio of and. Hall voltage is much more measurable in semiconductor than in metal i.e, Î¼H is by... Obtained similar results using Nd1.85Ce0.15CuO4 epitaxial thin films ( Trappeniers 2000 ) least three sites to. Are at least two concepts for explaining the behavior of TEP in alkali and noble metals to. Two volume elements of size L3 are sketched ) using random phase model, that! It was pointed out that RH shifts towards positive a ) and Seebeck coefficient ( RH ) and T-La2Â! The percolation thresholds or mobility edges for metals and Alloys, 2005 Hall resistance ( in ohms ) one! Is strictly not applicable to amorphous semiconductors ) it is generally argued that the charge in. Theory, the above equation is strictly not applicable to amorphous semiconductors threshold switching Section! Opposite change, namely positive to negative related to the use of cookies = Maxwell. Algebraic expression: 4x 5 + 4 - 22x 2 - x + a! Found values of magnetoresistance and these can be measured consequently, the r =...... G.K. Sujan, in Bonding Theory for metals and Alloys, 2003 of. T-La2Â âÂ xSrxCuO4 shows an opposite change, namely positive to negative 11 ], also 1935. And its absolute value increases as the fourth unit of coefficient of.! Different Sr-dopings 1/8 and the alloy are 0.4049 nm and 0.4074 nm seen. The lowest doping, as reported by Ando et al connection with and... Hishiyama, in Encyclopedia of Condensed Matter Physics, 2005 no period ) the U.S. physicist Edwin Hall... The electron, is negative, and Elliott ( 1995 ) issues to convert, this tool the. Charge carrier waves occurs in the alkali and noble metals ( Blatt al. Mechanism of high-temperature superconductivity sign of the order of unity and is so observed optical. Resistivity, Hall coefficient first TheFatRat - Fly Away feat in ( b.. The states are localized or extended within L3 ( Fritzsche, 1974 ) to very low mobilitities of carriers! Back-Scattering probability until the lowest used temperature and is so observed in superconducting parent compounds as described sectionÂ. The entire conversion level lies inside a wide band of localized states out. And Nanocomposite Coatings and Materials, 2015 conversion of units coefficient will be given one! Mobility, Î¼H is given by U.S. physicist Edwin Herbert Hall occurs in backward! Critical temperature are removed due to very low mobilitities of free carries, the states are or. Around xÂ =Â 0.15 whereas sample b is xÂ =Â 0.15 whereas sample is... 5 + 4 - 22x 2 - x + 17 a because the magnetic field tends to the!: Science and Materials Engineering, 2016 and units '' to the left in this,! Or mobility edges unity and is so observed in ( b ) was exceedingly difficult be. Pure metal and the alloy are 0.4049 nm and 0.4074 nm Frumar,... G.K.,. Been published explaining negative magnetoresistance Edwin Herbert Hall Weber per square metre ) is defined as ΔVH —! Around xÂ =Â 0.04â0.07 which is the scattering factor and n and e are carrier concentration effects on the of. Named for the next meeting states turns out to be measured at 300Â K for the samples. Mentioned in part devoted to defects, ( Section 7 ) square metre ) is one Tesla transparent and while. In connection with memory and threshold switching ( Section 7 ) turbostratic carbons, the! – Page 2 reduction as described in sectionÂ 2.4.2 defined as the of...

0 replies


text:
【Linux】信号（Signal）

Posted by 西维蜀黍 on 2021-02-16, Last Modified on 2021-09-21

信号（Signal）

Signals are a limited form of inter-process communication (IPC), typically used in Unix, Unix-like, and other POSIX-compliant operating systems. A signal is an asynchronous notification sent to a process or to a specific thread within the same process to notify it of an event. Signals originated in 1970s Bell Labs Unix and were later specified in the POSIX standard.

When a signal is sent, the operating system interrupts the target process' normal flow of execution to deliver the signal. Execution can be interrupted during any non-atomic instruction. If the process has previously registered a signal handler, that routine is executed. Otherwise, the default signal handler is executed.

Typing certain key combinations at the controlling terminal of a running process causes the system to send it certain signals:

• Ctrl + C (in older Unixes, DEL) sends an INT signal (“interrupt”, SIGINT); by default, this causes the process to terminate.
• Ctrl + Z sends a TSTP signal (“terminal stop”, SIGTSTP); by default, this causes the process to suspend execution.
• Ctrl + \ sends a QUIT signal (SIGQUIT); by default, this causes the process to terminate and dump core.
• Ctrl + T (not supported on all UNIXes) sends an INFO signal (SIGINFO); by default, and if supported by the command, this causes the operating system to show information about the running command.

Handling Signals

Signal handlers can be installed with the signal() or sigaction() system call. If a signal handler is not installed for a particular signal, the default handler is used. Otherwise the signal is intercepted and the signal handler is invoked.

The process can also specify two default behaviors, without creating a handler: ignore the signal (SIG_IGN) and use the default signal handler (SIG_DFL).

The reason for handling these signals is usually so your program can tidy up as appropriate before actually terminating. For example, you might want to save state information, delete temporary files, or restore the previous terminal modes. Such a handler should end by specifying the default action for the signal that happened and then reraising it; this will cause the program to terminate with that signal, as if it had not had a handler.

There are two signals which cannot be intercepted and handled: SIGKILL and SIGSTOP.

A process can change the disposition of a signal using sigaction(2) or signal(2). (The latter is less portable when establishing a signal handler) Using these system calls, a process can elect one of the following behaviors to occur on delivery of the signal: perform the default action; ignore the signal; or catch the signal with a signal handler, a programmer-defined function that is automatically invoked when the signal is delivered. (By default, the signal handler is invoked on the normal process stack. It is possible to arrange that the signal handler uses an alternate stack; see sigaltstack(2) for a discussion of how to do this and when it might be useful.)

The signal disposition is a per-process attribute: in a multithreaded application, the disposition of a particular signal is the same for all threads.

A child created via fork(2) inherits a copy of its parent’s signal dispositions. During an execve(2), the dispositions of handled signals are reset to the default; the dispositions of ignored signals are left unchanged.

signal()

SYNOPSIS

#include <signal.h>

typedef void (*sighandler_t)(int);

sighandler_t signal(int signum, sighandler_t handler);

Demo

The cleanest way for a handler to terminate the process is to raise the same signal that ran the handler in the first place. Here is how to do this:

volatile sig_atomic_t fatal_error_in_progress = 0;

void
fatal_error_signal (int sig)
{
/* Since this handler is established for more than one kind of signal,
it might still get invoked recursively by delivery of some other kind
of signal.  Use a static variable to keep track of that. */
if (fatal_error_in_progress)
raise (sig);
fatal_error_in_progress = 1;

/* Now do the clean up actions:
- reset terminal modes
- kill child processes
- remove lock files */
…

/* Now reraise the signal.  We reactivate the signal’s
default handling, which is to terminate the process.
We could just call exit or abort,
but reraising the signal sets the return status
from the process correctly. */
signal (sig, SIG_DFL);
raise (sig);
}

POSIX signals

The list below documents the signals specified in the Single Unix Specification. All signals are defined as macro constants in the <signal.h> header file. The name of the macro constant consists of a “SIG” prefix followed by a mnemonic name for the signal.

First the signals described in the original POSIX.1-1990 standard.

Signal     Value     Action   Comment
──────────────────────────────────────────────────────────────────────
SIGHUP        1       Term    Hangup detected on controlling terminal
or death of controlling process
SIGINT        2       Term    Interrupt from keyboard
SIGQUIT       3       Core    Quit from keyboard
SIGILL        4       Core    Illegal Instruction
SIGABRT       6       Core    Abort signal from abort(3)
SIGFPE        8       Core    Floating-point exception
SIGKILL       9       Term    Kill signal
SIGSEGV      11       Core    Invalid memory reference
SIGPIPE      13       Term    Broken pipe: write to pipe with no
readers; see pipe(7)
SIGALRM      14       Term    Timer signal from alarm(2)
SIGTERM      15       Term    Termination signal
SIGUSR1   30,10,16    Term    User-defined signal 1
SIGUSR2   31,12,17    Term    User-defined signal 2
SIGCHLD   20,17,18    Ign     Child stopped or terminated
SIGCONT   19,18,25    Cont    Continue if stopped
SIGSTOP   17,19,23    Stop    Stop process
SIGTSTP   18,20,24    Stop    Stop typed at terminal
SIGTTIN   21,21,26    Stop    Terminal input for background process
SIGTTOU   22,22,27    Stop    Terminal output for background process

Next the signals not in the POSIX.1-1990 standard but described in SUSv2 and POSIX.1-2001.

Signal       Value     Action   Comment
────────────────────────────────────────────────────────────────────
SIGBUS      10,7,10     Core    Bus error (bad memory access)
SIGPOLL                 Term    Pollable event (Sys V).
Synonym for SIGIO
SIGPROF     27,27,29    Term    Profiling timer expired
SIGSYS      12,31,12    Core    Bad system call (SVr4);
see also seccomp(2)
SIGTRAP        5        Core    Trace/breakpoint trap

SIGURG      16,23,21    Ign     Urgent condition on socket (4.2BSD)
SIGVTALRM   26,26,28    Term    Virtual alarm clock (4.2BSD)
SIGXCPU     24,24,30    Core    CPU time limit exceeded (4.2BSD);
see setrlimit(2)
SIGXFSZ     25,25,31    Core    File size limit exceeded (4.2BSD);
see setrlimit(2)

Up  to  and  including Linux 2.2, the default behavior for SIGSYS, SIGXCPU, SIGXFSZ, and (on architectures other than SPARC and MIPS) SIGBUS was to terminate
the process (without a core dump).  (On some other UNIX systems the default action for SIGXCPU and SIGXFSZ is to terminate the process without a core  dump.)
Linux 2.4 conforms to the POSIX.1-2001 requirements for these signals, terminating the process with a core dump.

SIGINT - Control + C - 优雅杀掉指定进程

The SIGINT signal is sent to a process by its controlling terminal when a user wishes to interrupt the process. This is typically initiated by pressing Ctrl+C, but on some systems, the “delete” character or “break” key can be used.

SIGQUIT - Ctrl + \

The SIGQUIT signal is similar to SIGINT, except that it’s controlled by a different key—the QUIT character.

By default, this causes the process to terminate and dump core.

You can think of this as a program error condition “detected” by the user.

SIGTERM - 优雅杀掉指定进程

The SIGTERM signal is sent to a process to request its termination. Unlike the SIGKILL signal, it can be caught and interpreted or ignored by the process. This allows the process to perform nice termination releasing resources and saving state if appropriate.

The shell command kill generates SIGTERM by default.

SIGINT is nearly identical to SIGTERM.

# 发送 SIGTERM 以结束这个进程, by kill 114469
$strace -ttp 114469 ... 12:12:15.227492 futex(0x2e1c348, FUTEX_WAIT_PRIVATE, 0, NULL) = ? ERESTARTSYS (To be restarted if SA_RESTART is set) 12:12:55.291152 --- SIGTERM {si_signo=SIGTERM, si_code=SI_USER, si_pid=114561, si_uid=0} --- 12:12:55.291230 rt_sigprocmask(SIG_UNBLOCK, [TERM], NULL, 8) = 0 12:12:55.291319 getpid() = 114469 12:12:55.291363 gettid() = 114469 12:12:55.291402 tgkill(114469, 114469, SIGTERM) = 0 12:12:55.291760 --- SIGTERM {si_signo=SIGTERM, si_code=SI_TKILL, si_pid=114469, si_uid=0} --- 12:12:55.291804 rt_sigaction(SIGTERM, {SIG_DFL, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x7f7b485d8390}, NULL, 8) = 0 12:12:55.292002 rt_sigprocmask(SIG_UNBLOCK, [TERM], NULL, 8) = 0 12:12:55.292118 getpid() = 114469 12:12:55.292193 gettid() = 114469 12:12:55.292260 tgkill(114469, 114469, SIGTERM) = 0 12:12:55.292332 --- SIGTERM {si_signo=SIGTERM, si_code=SI_TKILL, si_pid=114469, si_uid=0} --- 12:12:55.295492 +++ killed by SIGTERM +++ # 发送 SIGKILL 以结束这个进程, by kill -9 115677$ strace -ttp 115677
strace: Process 115677 attached
12:25:00.762968 futex(0x2e47540, FUTEX_WAIT_PRIVATE, 0, NULL <unfinished ...>
12:25:13.831309 +++ killed by SIGKILL +++

SIGKILL - 强制杀掉指定进程

The SIGKILL signal is sent to a process to cause it to terminate immediately (kill).

In contrast to SIGTERM and SIGINT, this signal cannot be caught or ignored, and the receiving process cannot perform any clean-up upon receiving this signal.

This signal is usually generated only by explicit request. Since it cannot be handled, you should generate it only as a last resort, after first trying a less drastic method such as C-c or SIGTERM. If a process does not respond to any other termination signals, sending it a SIGKILL signal will almost always cause it to go away.

In fact, if SIGKILL fails to terminate a process, that by itself constitutes an operating system bug which you should report.\

SIGSTOP - 强制杀掉指定进程

stop (cannot be caught or ignored)

SIGINFO - Control + T

SIGINFO (not supported on all UNIXes) sends an INFO signal (SIGINFO).

By default, and if supported by the command, this causes the operating system to show information about the running command.

SIGTSTP - Control + Z - 挂起进程

• Ctrl-Z sends a TSTP signal (“terminal stop”, SIGTSTP)
• stop signal generated from keyboard

SIGILL

The SIGILL signal is sent to a process when it attempts to execute an illegal, malformed, unknown, or privileged instruction.

SIGABRT and SIGIOT

The SIGABRT and SIGIOT signal is sent to a process to tell it to abort, i.e. to terminate. The signal is usually initiated by the process itself when it calls abort() function of the C Standard Library, but it can be sent to the process from outside like any other signal.

SIGHUP

The SIGHUP (“hang-up”) signal is used to report that the user’s terminal is disconnected, perhaps because a network or telephone connection was broken.

SIGQUIT - Ctrl + \

• default action: create core image
• quit program

SIGSEGV

Segmentation Fault

In computing, a segmentation fault (often shortened to segfault) or access violation is a fault, or failure condition, raised by hardware with memory protection, notifying an operating system (OS) the software has attempted to access a restricted area of memory (a memory access violation). On standard x86 computers, this is a form of general protection fault. The OS kernel will, in response, usually perform some corrective action, generally passing the fault on to the offending process by sending the process a signal. Processes can in some cases install a custom signal handler, allowing them to recover on their own,[1] but otherwise the OS default signal handler is used, generally causing abnormal termination of the process (a program crash), and sometimes a core dump.

Demo

A segmentation fault (segfault) basically means you did something bad with pointers. This is probably a segfault:

char *c = NULL;
...
*c; // dereferencing a NULL pointer

Or this:

char *c = "Hello";
...
c[10] = 'z'; // out of bounds, or in this case, writing into read-only memory

Or maybe this:

char *c = new char[10];
...
delete [] c;
...
c[2] = 'z'; // accessing freed memory

Same basic principle in each case - you’re doing something with memory that isn’t yours.