text:
Line-of-sight propagation

Last updated

Line-of-sight propagation is a characteristic of electromagnetic radiation or acoustic wave propagation which means waves travel in a direct path from the source to the receiver. Electromagnetic transmission includes light emissions traveling in a straight line. The rays or waves may be diffracted, refracted, reflected, or absorbed by the atmosphere and obstructions with material and generally cannot travel over the horizon or behind obstacles.

In physics, electromagnetic radiation refers to the waves of the electromagnetic field, propagating (radiating) through space, carrying electromagnetic radiant energy. It includes radio waves, microwaves, infrared, (visible) light, ultraviolet, X-rays, and gamma rays.

Wave propagation is any of the ways in which waves travel.

In telecommunications, transmission is the process of sending and propagating an analogue or digital information signal over a physical point-to-point or point-to-multipoint transmission medium, either wired, optical fiber or wireless.

Contents

In contrast to line-of-sight propagation, at low frequency (below approximately 3  MHz) due to diffraction, radio waves can travel as ground waves, which follow the contour of the Earth. This enables AM radio stations to transmit beyond the horizon. Additionally, frequencies in the shortwave bands between approximately 1 and 30 MHz, can be reflected back to Earth by the ionosphere, called skywave or "skip" propagation, thus giving radio transmissions in this range a potentially global reach.

Low frequency or LF is the ITU designation for radio frequencies (RF) in the range of 30 kilohertz (kHz) to 300 kHz. As its wavelengths range from ten kilometres to one kilometre, respectively, it is also known as the kilometre band or kilometre wave.

The hertz (symbol: Hz) is the derived unit of frequency in the International System of Units (SI) and is defined as one cycle per second. It is named after Heinrich Rudolf Hertz, the first person to provide conclusive proof of the existence of electromagnetic waves. Hertz are commonly expressed in multiples: kilohertz (103 Hz, kHz), megahertz (106 Hz, MHz), gigahertz (109 Hz, GHz), terahertz (1012 Hz, THz), petahertz (1015 Hz, PHz), exahertz (1018 Hz, EHz), and zettahertz (1021 Hz, ZHz).

Diffraction refers to various phenomena that occur when a wave encounters an obstacle or a slit. It is defined as the bending of waves around the corners of an obstacle or through an aperture into the region of geometrical shadow of the obstacle/aperture. The diffracting object or aperture effectively becomes a secondary source of the propagating wave. Italian scientist Francesco Maria Grimaldi coined the word "diffraction" and was the first to record accurate observations of the phenomenon in 1660.

However, at frequencies above 30 MHz (VHF and higher) and in lower levels of the atmosphere, neither of these effects are significant. Thus, any obstruction between the transmitting antenna (transmitter) and the receiving antenna (receiver) will block the signal, just like the light that the eye may sense. Therefore, since the ability to visually see a transmitting antenna (disregarding the limitations of the eye's resolution) roughly corresponds to the ability to receive a radio signal from it, the propagation characteristic at these frequencies is called "line-of-sight". The farthest possible point of propagation is referred to as the "radio horizon".

In electronics and telecommunications a transmitter or radio transmitter is an electronic device which produces radio waves with an antenna. The transmitter itself generates a radio frequency alternating current, which is applied to the antenna. When excited by this alternating current, the antenna radiates radio waves.

Light is electromagnetic radiation within a certain portion of the electromagnetic spectrum. The word usually refers to visible light, which is the visible spectrum that is visible to the human eye and is responsible for the sense of sight. Visible light is usually defined as having wavelengths in the range of 400–700 nanometres (nm), or 4.00 × 10−7 to 7.00 × 10−7 m, between the infrared and the ultraviolet. This wavelength means a frequency range of roughly 430–750 terahertz (THz).

In practice, the propagation characteristics of these radio waves vary substantially depending on the exact frequency and the strength of the transmitted signal (a function of both the transmitter and the antenna characteristics). Broadcast FM radio, at comparatively low frequencies of around 100 MHz, are less affected by the presence of buildings and forests.

In telecommunications and signal processing, frequency modulation (FM) is the encoding of information in a carrier wave by varying the instantaneous frequency of the wave.

Impairments to line-of-sight propagation

Low-powered microwave transmitters can be foiled by tree branches, or even heavy rain or snow. The presence of objects not in the direct line-of-sight can cause diffraction effects that disrupt radio transmissions. For the best propagation, a volume known as the first Fresnel zone should be free of obstructions.

Microwaves are a form of electromagnetic radiation with wavelengths ranging from about one meter to one millimeter; with frequencies between 300 MHz (1 m) and 300 GHz (1 mm). Different sources define different frequency ranges as microwaves; the above broad definition includes both UHF and EHF bands. A more common definition in radio engineering is the range between 1 and 100 GHz. In all cases, microwaves include the entire SHF band at minimum. Frequencies in the microwave range are often referred to by their IEEE radar band designations: S, C, X, Ku, K, or Ka band, or by similar NATO or EU designations.

A Fresnel zone, named after physicist Augustin-Jean Fresnel, is one of a series of confocal prolate ellipsoidal regions of space between and around a transmitter and a receiver. Transmitted radio, sound, or light waves can follow slightly different paths before reaching a receiver, especially if there are obstructions or reflecting objects between the two. The waves can arrive at slightly different times and will be slightly out of phase due to the different path lengths. Depending on the magnitude of the phase shift, the waves can interfere constructively and destructively. The size of the calculated Fresnel zone at any particular distance from the transmitter and receiver can help to predict whether obstructions or discontinuities along the path will cause significant interference.

Reflected radiation from the surface of the surrounding ground or salt water can also either cancel out or enhance the direct signal. This effect can be reduced by raising either or both antennas further from the ground: The reduction in loss achieved is known as height gain.

In electrical engineering, a ground plane is an electrically conductive surface, usually connected to electrical ground. The term has two different meanings in separate areas of electrical engineering. In antenna theory, a ground plane is a conducting surface large in comparison to the wavelength, such as the Earth, which is connected to the transmitter's ground wire and serves as a reflecting surface for radio waves. In printed circuit boards, a ground plane is a large area of copper foil on the board which is connected to the power supply ground terminal and serves as a return path for current from different components on the board.

It is important to take into account the curvature of the Earth for calculation of line-of-sight paths from maps, when a direct visual fix cannot be made. Designs for microwave formerly used 43 earth radius to compute clearances along the path.

Mobile telephones

Although the frequencies used by mobile phones (cell phones) are in the line-of-sight range, they still function in cities. This is made possible by a combination of the following effects:

• 1r 4 propagation over the rooftop landscape[ clarification needed ]
• diffraction into the "street canyon" below
• multipath reflection along the street
• diffraction through windows, and attenuated passage through walls, into the building
• reflection, diffraction, and attenuated passage through internal walls, floors and ceilings within the building

The combination of all these effects makes the mobile phone propagation environment highly complex, with multipath effects and extensive Rayleigh fading. For mobile phone services, these problems are tackled using:

• rooftop or hilltop positioning of base stations
• many base stations (usually called "cell sites"). A phone can typically see at least three, and usually as many as six at any given time.
• "sectorized" antennas at the base stations. Instead of one antenna with omnidirectional coverage, the station may use as few as 3 (rural areas with few customers) or as many as 32 separate antennas, each covering a portion of the circular coverage. This allows the base station to use a directional antenna that is pointing at the user, which improves the signal to noise ratio. If the user moves (perhaps by walking or driving) from one antenna sector to another, the base station automatically selects the proper antenna.
• rapid handoff between base stations (roaming)
• the radio link used by the phones is a digital link with extensive error correction and detection in the digital protocol
• sufficient operation of mobile phone in tunnels when supported by split cable antennas
• local repeaters inside complex vehicles or buildings

A Faraday cage is composed of a conductor that completely surrounds an area on all sides, top, and bottom. Electromagnetic radiation is blocked where the wavelength is longer than any gaps. For example, mobile telephone signals are blocked in windowless metal enclosures that approximate a Faraday cage, such as elevator cabins, and parts of trains, cars, and ships. The same problem can affect signals in buildings with extensive steel reinforcement.

The radio horizon is the locus of points at which direct rays from an antenna are tangential to the surface of the Earth. If the Earth were a perfect sphere without an atmosphere, the radio horizon would be a circle.

The radio horizon of the transmitting and receiving antennas can be added together to increase the effective communication range.

Radio wave propagation is affected by atmospheric conditions, ionospheric absorption, and the presence of obstructions, for example mountains or trees. Simple formulas that include the effect of the atmosphere give the range as:

${\displaystyle \mathrm {horizon} _{\mathrm {miles} }\approx 1.23\cdot {\sqrt {\mathrm {height} _{\mathrm {feet} }}}.}$
${\displaystyle \mathrm {horizon} _{\mathrm {km} }\approx 3.57\cdot {\sqrt {\mathrm {height} _{\mathrm {metres} }}}}$

The simple formulas give a best-case approximation of the maximum propagation distance, but are not sufficient to estimate the quality of service at any location.

Earth bulge and atmosphere effect

Earth bulge is a term used in telecommunications. It refers to the circular segment of earth profile that blocks off long distance communications. Since the geometric line of sight passes at varying heights over the Earth, the propagating radio wave encounters slightly different propagation conditions over the path. The usual effect of the declining pressure of the atmosphere with height is to bend radio waves down towards the surface of the Earth, effectively increasing the Earth's radius, and the distance to the radio horizon, by a factor around 43. [1] This k-factor can change from its average value depending on weather.

Geometric distance to horizon

Assuming a perfect sphere with no terrain irregularity, the distance to the horizon from a high altitude transmitter (i.e., line of sight) can readily be calculated.

Let R be the radius of the Earth and h be the altitude of a telecommunication station. The line of sight distance d of this station is given by the Pythagorean theorem;

${\displaystyle d^{2}=(R+h)^{2}-R^{2}=2\cdot R\cdot h+h^{2}}$

Since the altitude of the station is much less than the radius of the Earth,

${\displaystyle d\approx {\sqrt {2\cdot R\cdot h}}}$

If the height is given in metres, and distance in kilometres, [2]

${\displaystyle d\approx 3.57\cdot {\sqrt {h}}}$

If the height is given in feet, and the distance in miles,

${\displaystyle d\approx 1.23\cdot {\sqrt {h}}}$

The actual service range

The above analysis does not consider the effect of atmosphere on the propagation path of RF signals. In fact, RF signals don’t propagate in straight lines: Because of the refractive effects of atmospheric layers, the propagation paths are somewhat curved. Thus, the maximum service range of the station is not equal to the line of sight (geometric) distance. Usually, a factor k is used in the equation above, modified to be

${\displaystyle d\approx {\sqrt {2\cdot k\cdot R\cdot h}}}$

k > 1 means geometrically reduced bulge and a longer service range. On the other hand, k < 1 means a shorter service range.

Under normal weather conditions, k is usually chosen [3] to be 43. That means that the maximum service range increases by 15%.

${\displaystyle d\approx 4.12\cdot {\sqrt {h}}}$

for h in metres and d in kilometres; or

${\displaystyle d\approx 1.41\cdot {\sqrt {h}}}$

for h in feet and d in miles.

But in stormy weather, k may decrease to cause fading in transmission. (In extreme cases k can be less than 1.) That is equivalent to a hypothetical decrease in Earth radius and an increase of Earth bulge. [4]

Example

In normal weather conditions, the service range of a station at an altitude of 1500 m with respect to receivers at sea level can be found as,

${\displaystyle d\approx 4.12\cdot {\sqrt {1500}}=160{\mbox{ km.}}}$

Related Research Articles

In telecommunication, the term critical frequency has the following meanings:

Path loss, or path attenuation, is the reduction in power density (attenuation) of an electromagnetic wave as it propagates through space. Path loss is a major component in the analysis and design of the link budget of a telecommunication system.

The total harmonic distortion (THD) is a measurement of the harmonic distortion present in a signal and is defined as the ratio of the sum of the powers of all harmonic components to the power of the fundamental frequency. Distortion factor, a closely related term, is sometimes used as a synonym.

In radio-frequency engineering, a transmission line is a specialized cable or other structure designed to conduct alternating current of radio frequency, that is, currents with a frequency high enough that their wave nature must be taken into account. Transmission lines are used for purposes such as connecting radio transmitters and receivers with their antennas, distributing cable television signals, trunklines routing calls between telephone switching centres, computer network connections and high speed computer data buses.

A transmission medium is something that can mediate the propagation of signals for the purposes of telecommunication.

The horizon or skyline is the apparent line that separates earth from sky, the line that divides all visible directions into two categories: those that intersect the Earth's surface, and those that do not. The true horizon is actually a theoretical line, which can only be observed when it lies on the sea surface. At many locations, this line is obscured by land, trees, buildings, mountains, etc., and the resulting intersection of earth and sky is called the visible horizon. When looking at a sea from a shore, the part of the sea closest to the horizon is called the offing.

Very high frequency (VHF) is the ITU designation for the range of radio frequency electromagnetic waves from 30 to 300 megahertz (MHz), with corresponding wavelengths of ten meters to one meter. Frequencies immediately below VHF are denoted high frequency (HF), and the next higher frequencies are known as ultra high frequency (UHF).

Rayleigh fading is a statistical model for the effect of a propagation environment on a radio signal, such as that used by wireless devices.

Radio waves are a type of electromagnetic radiation with wavelengths in the electromagnetic spectrum longer than infrared light. Radio waves have frequencies as high as 300 gigahertz (GHz) to as low as 30 hertz (Hz). At 300 GHz, the corresponding wavelength is 1 mm, and at 30 Hz is 10,000 km. Like all other electromagnetic waves, radio waves travel at the speed of light in vacuum. They are generated by electric charges undergoing acceleration, such as time varying electric currents. Naturally occurring radio waves are emitted by lightning and astronomical objects.

Medium frequency (MF) is the ITU designation for radio frequencies (RF) in the range of 300 kilohertz (kHz) to 3 megahertz (MHz). Part of this band is the medium wave (MW) AM broadcast band. The MF band is also known as the hectometer band as the wavelengths range from ten to one hectometer. Frequencies immediately below MF are denoted low frequency (LF), while the first band of higher frequencies is known as high frequency (HF). MF is mostly used for AM radio broadcasting, navigational radio beacons, maritime ship-to-shore communication, and transoceanic air traffic control.

Radio propagation is the behavior of radio waves as they travel, or are propagated, from one point to another, or into various parts of the atmosphere. As a form of electromagnetic radiation, like light waves, radio waves are affected by the phenomena of reflection, refraction, diffraction, absorption, polarization, and scattering. Understanding the effects of varying conditions on radio propagation has many practical applications, from choosing frequencies for international shortwave broadcasters, to designing reliable mobile telephone systems, to radio navigation, to operation of radar systems.

In radio communication, skywave or skip refers to the propagation of radio waves reflected or refracted back toward Earth from the ionosphere, an electrically charged layer of the upper atmosphere. Since it is not limited by the curvature of the Earth, skywave propagation can be used to communicate beyond the horizon, at intercontinental distances. It is mostly used in the shortwave frequency bands.

In telecommunications, particularly in radio frequency, signal strength refers to the transmitter power output as received by a reference antenna at a distance from the transmitting antenna. High-powered transmissions, such as those used in broadcasting, are expressed in dB-millivolts per metre (dBmV/m). For very low-power systems, such as mobile phones, signal strength is usually expressed in dB-microvolts per metre (dBµV/m) or in decibels above a reference level of one milliwatt (dBm). In broadcasting terminology, 1 mV/m is 1000 µV/m or 60 dBµ.

Non-line-of-sight (NLOS) and near-line-of-sight are radio transmissions across a path that is partially obstructed, usually by a physical object in the innermost Fresnel zone.

A cellular repeater is a type of bi-directional amplifier used to improve cell phone reception. A cellular repeater system commonly consists of a donor antenna that receives and transmits signal from nearby cell towers, coaxial cables, a signal amplifier, and an indoor rebroadcast antenna.

Earth bulge is a term used in telecommunications, meaning the curvature of the Earth's surface, which limits the range of communication methods that require a line-of-sight path, like high frequency radio waves, microwaves, or lasers.

The radar horizon is a critical area of performance for aircraft detection systems that is defined by the distance at which the radar beam rises enough above the Earth's surface to make detection of a target at low level impossible. It is associated with the low elevation region of performance, and its geometry depends on terrain, radar height, and signal processing. This is associated with the notions of radar shadow, the clutter zone, and the clear zone.

Ground Wave propagation is a method of radio wave propagation that uses the area between the surface of the earth and the ionosphere for transmission. The ground wave can propagate a considerable distance over the earth's surface particularly in the low frequency and medium frequency portion of the radio spectrum.

The Two-Rays Ground Reflected Model is a radio propagation model which predicts the path losses between a transmitting antenna and a receiving antenna when they are in LOS. Generally, the two antenna each have different height. The received signal having two components, the LOS component and the multipath component formed predominantly by a single ground reflected wave.

References

1. Christopher Haslett. (2008). Essentials of radio wave propagation, pp 119120. Cambridge University Press. ISBN   052187565X.
2. Mean radius of the Earth is ≈ 6.37×106 metres = 6370 km. See Earth radius
3. Busi, R. (1967). High Altitude VHF and UHF Broadcasting Stations. Technical Monograph 3108-1967. Brussels: European Broadcasting Union.
4. This analysis is for high altitude to sea level reception. In microwave radio link chains, both stations are at high altitudes.


text:
include pdf in latex

# include pdf in latex

StartLaTeX faqLaTeX topicsLaTeX course
< logical and, or, not    > colored frames latex

## include pdf in latex

There are two possibilities (of course there are more ways) to include a pdf file into LaTeX:
1. usepackage pdfpages
2. usepackage graphicx

### example pdfpages

\documentclass{article}
\usepackage{pdfpages}
...
\begin{document}
include the first page from pdf file Test.pdf
\includepdf[pages=1]{Test}
...
\end{document}

### example graphicx

\documentclass{article}
\usepackage{graphicx}
...
\begin{document}
include the first page from pdf file Test.pdf
\includegraphics[page=1]{Test}
...
\end{document}

### put more then one page on a page

By using option nup from usepackage pdfpages, it is also possible to put more then one page from the origin pdf file on one page of the new document.

### example pdfpages 2

\documentclass{article}
\usepackage{pdfpages}
...
\begin{document}
include all pages from pdf file Test.pdf, but put allways four of them on one single page.
\includepdf[pages=-, nup=2x2]{Test}
...
\end{document}

### How to deal with blanks in file names?

Sometimes you got file with blanks in the file name. The problem now is pdfpages could not handle this, but usepackage grffile could.

### example pdfpages 3

\documentclass{article}
\usepackage{grffile}
\usepackage{pdfpages}
\begin{document}
\includepdf[pages=-]{Test X}
\end{document}

format: plain


text:
# neuralforecast

A Non Linear Time Series Prediction Approach with Neural Networks

neuralforecast: is a Non Linear Time Series Prediction Approach with Neural Networks


text:
Question 11.
we assume:
(1) For every $t \geq 0, Y_t$ and $U_{t+1}$ are independent random variables.
(2) The covariance matrix of $\mathrm{Y}0$ is $\mathrm{W}_0$ and the covariance matrix of $\mathrm{U}{\mathrm{t}+1}$ is $\mathrm{V}$ for every $t \geq 0$.
(3) For every non-zero $\beta \in \mathrm{R}^{\mathrm{n}}, \beta^{\mathrm{T}} \mathrm{V} \beta>0$.
Q1. Show that for every $Y_t \geq 0$, Yt has the covariance matrix: $\mathrm{W}{\mathrm{t}}=\sum{j=0}^{t-1} \mathrm{~A}^j \mathrm{~V}\left(\mathrm{~A}^{\mathrm{T}}\right)^j+\mathrm{A}^{\mathrm{t}} \mathrm{W}0\left(\mathrm{~A}^{\mathrm{T}}\right)^{\mathrm{t}}$ Q2. A main issue in the analysis of time series is whether $\mathrm{W}{\mathrm{t}} \mathrm{con}$ verges as $t \rightarrow \infty$.
Throughout the question we focus on the case where $\mathrm{A}$ is diagonalizable in complex numbers: A $=$ PDP $^{-1}$ for some invertible complex matrix $P$ and diagonal matrix $\mathrm{D}$. The diagonal entries of $\mathrm{D}$ are denoted by $\lambda_1, \lambda_2, \ldots, \lambda_{\mathrm{n}}$. It is assumed that $\left|\lambda_j\right| \leq\left|\lambda_1\right|$ for every $j$ and $\left|\lambda_1\right|<1$. Show that there exists an $M>0$ and $\mathrm{b} \in(0,1)$ such that every matrix entry of $A^j V\left(A^T\right)^j$ has absolute value less than $\mathrm{Mb}^{\mathrm{j}}$ for every $\mathrm{j} \geq 0$.
Q3. Consider the following process:
$$x_{t+1}=a_1 x_t+a_2 x_t-1+a_3 x_{t-2}+\epsilon_{t+1}, \text { for } t=2,3,4, \ldots$$
Here $\mathrm{x}{\mathrm{t}}$ and $\epsilon{\mathrm{t}}$ are random variables for $\mathrm{t} \geq 0$ and $\epsilon_{\mathrm{t}+1}$ is independent of $\left(\mathrm{x}{\mathrm{t}}, \mathrm{x}{\mathrm{t}-1}, \mathrm{x}{\mathrm{t}}\right.$ ${ }{-2}$ ) for every $t \geq 2$. the above equation (1) may be rewritten as the following system of equations:
\begin{aligned} \mathrm{x}{\mathrm{t}+1} &=\mathrm{a}_1 \mathrm{x}{\mathrm{t}}+\mathrm{a}2 \mathrm{x}{\mathrm{t}-1}+\mathrm{a}3 \mathrm{x}{\mathrm{t}-2}+\epsilon_{\mathrm{t}+1} ; \ \mathrm{x}{\mathrm{t}} &=\mathrm{x}{\mathrm{t}}+0 \mathrm{x}{\mathrm{t}-1}+0 \mathrm{x}{\mathrm{t}-2}+0 ; \ \mathrm{x}{\mathrm{t}-1} &=0 \mathrm{x}{\mathrm{t}}+\mathrm{x}{\mathrm{t}-1}+0 \mathrm{x}{\mathrm{t}-2}+0 . \end{aligned}
the last two equations hold trivially for every $t \geq 2$. Using this trick, convert the above equation (1) to the form in equation (2) with appropriately chosen $\mathrm{A}, \mathrm{Y}{\mathrm{t}}$ and $\mathrm{U}{\mathrm{t}+1 \text { : }}$
$$Y_{t+1}=A Y_t+U_{t+1} \text {, for } t=0,1,2, \ldots .$$
Here $\mathrm{Y}{\mathrm{t}}$ and $\mathrm{U}{\mathrm{t}+1}$ are both $\mathrm{R}^{\mathrm{n}}$-valued random variables for every $\mathrm{t} \geq 0$ and $\mathrm{A}$ is an $\mathrm{n} \times \mathrm{n}$ matrix assumed to be known.

And then find the characteristic polynomial of your $\mathrm{A}$ in terms of $\mathrm{a}_1, \mathrm{a}_2$ and $\mathrm{a}_3$.

# Math 545 Syllabus

This is a Qualifying Eligible (QE) course for the Math PhD with regular, graded HW and a comprehensive final exam.

#### Prerequisites

Undergraduate background in real analysis (Math 431) and probability (Math 230 or 340)

#### Syllabus

• Brownian Motion and Stochastic Processes, Martingales
• Construction and properties of Brownian motion, Kolmogorov extension theorem, continuity theorem
• Ito Integrals with respect to Brownian motions and Ito processes
• Ito’s Formula and Quadratic Variation
• Stochastic Differential Equations: Existence and Uniqueness, Weak and strong solutions, Markov Property
• PDEs and SDE: Infinitesimal generators, optional stopping, stoping times, localization
• Connection with PDEs: Forward and  Backward Kolmogorov equation, Dirichlet Problems and hitting probabilities, Poisson Equations and Feynman-Kac formula
• Levy-Doob theorem,  martingales representation theory
• Kolmogorv-doob like inequalities for martingales
• Girsonov’s Theorem, Time changes
• One Dimensional Feller processes:  reachable and unreachable boundary points, nature scale, speed measures
• Bessel process
• Invariant measures
• Tanaka formula
• Examples of SDE models

#### References

•  Fima C. Klebaner, Introduction to stochastic calculus with applications
•  Ioannis Karatzas and Steven E. Shreve, Brownian motion and stochastic calculus
•  Richard Durrett, Stochastic calculus
•  Bernt Øksendal, Stochastic differential equations
•  H. P. McKean, Stochastic integrals
•  Daniel Revuz and Marc Yor, Continuous martingales and Brownian motion


text:
# [.net] locking in c#

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

## Recommended Posts

edit: I was doing everything all wrong, but I still do not understand how to protect a variable from being accesse in another thread. Could you explain how? [Edited by - Daniel Miller on June 3, 2005 12:41:01 PM]

##### Share on other sites
edit: irrelavent now

[Edited by - Daniel Miller on June 3, 2005 2:07:47 PM]

##### Share on other sites
Threading is a fairly large subject, here are some resources.

The easiest way to make a variable thread safe (if that is what you are asking) is to declare it with the volatile keyword.

##### Share on other sites
Actually, I was looking for the Monitor class, which locks a variable for a specific thread. I was looking at it so wrong you couldn't even imagine (I was trying to use 'lock' on a variable).

##### Share on other sites
Does Monitor grant exclusive access to an actual object on the heap?

edit: weird things are happenning when I try and use Monitor.Enter.

For one, when I try to lock a public field of an instance of a class, it highlights "for (int x = 0;" on the next line and then that a says that a 'System.ArgumentNullException' was thrown.

But that is only when I try to attach a monitor to the field itself. Attaching it to the entire object has no effect.

edit: Whenever I make a change, it works for the first run, then never works again.

edit2: It's now alternating between working and not working. When it doesn't work, the output is strangely uniform for something that should be somewhat random. It should be all '*' without any '#' (ignore the '%%%%%'), but when it doesn't work:

%%%%% * %%%%% # %%%%% * %%%%% * %%%%% # %%%%% * %%%%% * %%%%% # %%%%% * %%%%% *%%%%% # %%%%% * %%%%% * %%%%% # %%%%% * %%%%% * %%%%% # %%%%% * %%%%% * %%%%% #%%%%% * %%%%% * %%%%% # %%%%% * %%%%% * %%%%% # %%%%% * %%%%% * %%%%% # %%%%% *%%%%% * %%%%% # %%%%% * %%%%% * %%%%% # %%%%% * %%%%% * %%%%% # %%%%% * %%%%% *%%%%% # %%%%% * %%%%% * %%%%% # %%%%% * %%%%% * %%%%% # %%%%% * %%%%% * %%%%% #%%%%% * %%%%% * %%%%% # %%%%% * %%%%% * %%%%% # %%%%% * %%%%% * %%%%% # %%%%% *%%%%% * %%%%% # %%%%% * %%%%% * %%%%% # %%%%% * %%%%% * %%%%% # %%%%% * %%%%% *%%%%% # %%%%% * %%%%% * %%%%% # %%%%% * %%%%% * %%%%% # %%%%% * %%%%% * %%%%% #%%%%% * %%%%% * %%%%% # %%%%% * %%%%% * %%%%% # %%%%% * %%%%% * %%%%% # %%%%% *%%%%% * %%%%% # %%%%% * %%%%% * %%%%% # %%%%% * %%%%% * %%%%% # %%%%% * %%%%% *%%%%% # %%%%% * %%%%% * %%%%% # %%%%% * %%%%% * %%%%% # %%%%% * %%%%% * %%%%% #%%%%% * %%%%% * %%%%% # %%%%% * %%%%% * %%%%% # %%%%% * %%%%% * %%%%% # %%%%% *%%%%% * %%%%% # %%%%% * %%%%% * %%%%% # %%%%% * %%%%% * %%%%% # %%%%% * %%%%% *%%%%% # %%%%% * %%%%% * %%%%% # %%%%% * %%%%% * %%%%% # %%%%% * %%%%% * %%%%% #%%%%% * %%%%% * %%%%% # %%%%% * %%%%% * %%%%% # %%%%% * %%%%% * %%%%% # %%%%% *%%%%% * %%%%% # %%%%% * %%%%% * %%%%% # %%%%% * %%%%% * %%%%% # %%%%% * %%%%% *%%%%% # %%%%% * %%%%% * %%%%% # %%%%% * %%%%% * %%%%% # %%%%% * %%%%% * %%%%% #%%%%% * %%%%% * %%%%% # %%%%% * %%%%% * %%%%% # %%%%% * %%%%% * %%%%% # %%%%% *

[Edited by - Daniel Miller on June 3, 2005 1:18:33 PM]

##### Share on other sites
I would like to chime in to prevent confusion and errors.

I don't know what turnpast means exactly with "make a variable thread-safe", but to my sense, putting the "volatile" keyword doesn't solve all problems with multithreading. It should not be confused with Java's "synchronized".

"volatile" is a lightweight way to make some code thread-safe, but you have to carefully understand what it does and what this implies. It doesn't solve all multithreading scenarioes, and that's why there's the lock semantic.

For example, defining x as a volatile int will not make "x += 3" thread-safe (because it's not atomic). The result could be incorrect, if another thread reads/writes x after the reading but before the writing.

A few pointers:
C# specs, section 10.4.3 volatile fields. Explains what a volatile field is, and gives a small example of how it can be used to make some thread-safe code.

System.Threading.Interlocked class. Offers some atomic primitives (increment, exchange, ...) that are generally implemented in a lightweight fashion (i.e. using atomic CPU instructions).

C# lock keyword. Explains what the lock instruction is, what it does, and some examples. Note that the suggestion about what to lock on aren't that good, and I suggest you to read: Choosing what to lock on also.

System.Threading namespace. Contains other threading related primitives for synchronization. Look at classes Interlocked, Monitor, Mutex, ReaderWriterLock, ...

I know this is a lot of materials, but making efficient multithreading code is no simple issue.

Good luck,
jods

##### Share on other sites
Thank you, but I am trying to make a single object un accessable from other threads. I am having the problems I mentioned above when I do so (I'm using monitor).

##### Share on other sites

Monitor.Enter and Exit are used to build critical sections. That means section of code that are going to be executed by only one thread at a time. In C#, instead of calling Monitor directly, you can use the lock keyword. That's basically the same, but may be more readable. lock calls Monitor.Enter, add a try...finally block, and calls Monitor.Exit in the finally clause.

Enter is a blocking call that will "acquire" the object you pass to it. Which object you pass is totally irrelevant. Enter will block if another thread has already "acquired" the same object, until it releases it. A thread releases an object that it has acquired by calling Exit.

There is no way to grant "exclusive access" to an object in C#. You have to protect the sections of code that access this object instead (here encapsulation / thread-safe classes are an obvious benefit).

##### Share on other sites
Fixed the formatting, I think.

Main.cs:

using System;using System.Threading;namespace LockThreadingTest{	public class MainClass	{		public static void Main()		{			Speaker speaker = new Speaker();			SpeakerUser user = new SpeakerUser(speaker);			Thread thread = new Thread(new ThreadStart(user.Run));			thread.Start();			Monitor.Enter(speaker);			for (int x = 0; x != 1000; ++x)			{				speaker.quote = "*";				Console.Write("%");				Console.Write("%");				Console.Write("%");				Console.Write("%");				Console.Write("%");				speaker.Speak();			}			Monitor.Exit(speaker);			thread.Abort();			thread.Join();			Console.Read();		}	}}

Speaker.cs
using System;namespace LockThreadingTest{	public class Speaker	{		public void Speak()		{			Console.Write(" " + quote + " ");		}		public void SpeakForever()		{			while(true)			{				Console.Write(" " + quote + " ");			}		}		public string quote;	}}

SpeakerUser.cs

[source  lang="c#"]using System;namespace LockThreadingTest{	public class SpeakerUser	{		public SpeakerUser(Speaker speaker)		{            this.speaker = speaker;		}		public void Run()		{			while (true)			{				speaker.quote = "#";			}		}		private Speaker speaker;	}}

That is the code as I have it.

I am trying to prevent speaker.quote from being over written in the other thread.

##### Share on other sites
Maybe what I am trying to do is simply a matter of locking sections of code.

• 17
• 10
• 19
• 14
• 19


text:
why quantum gravity doesnot exist?

I am not an astrophysicist and not its student.All my knowledge about astronomy comes from you tube videos and discovery channel.From them i knew that to solve the mysteries of black hole both relativity and quantum theories should be combined as quantum gravity.But it does not exist.What is the problem in quantum gravity concept?

• Possibly better for Physics because there might be related questions there. But I will say that only a theory of quantum gravity does not exist. – HDE 226868 Oct 8 '14 at 14:59

I'm not sure what you mean by saying that quantum gravity "doesn't exist". But because this is the Astronomy SE, I will interpret your question as primarily asking why astronomy hasn't found evidence of quantum gravity. This is a reasonable question; after all, nineteenth-century astronomers have found evidence of funny business in the perihelion precession of Mercury, which in the twentieth century was understood as the relativistic corrections to the Newtonian orbits. Then astronomy one-upped that and found more evidence for general relativity.

So why not now? Because gravity is weak. Very weak. Weakness per se isn't a big problem theoretically; it makes it possible to calculate quantum gravity corrections when they aren't too large, which can be interpreted as a running Newton's constant: $$G(r) = G\left[1 - \frac{167}{30\pi}\frac{G\hbar}{r^2c^2} + \ldots\right]\text{.}$$ For example, for the Sun's gravitational field near the Sun's surface (mass $M_\odot\sim 2\times 10^{30}\,\mathrm{kg}$, radius $R_\odot\sim 7\times 10^8\,\mathrm{m}$), the relativistic corrections are of order $GM_\odot/rc^2\sim 10^{-6}$, a few parts per million, while the quantum gravity corrections are on the order of $G\hbar/r^2c^3\sim 10^{-88}$, which is so much smaller as to be completely hopeless.

Making the Sun a black hole would not improve things by much, since in that case $r = 2GM_\odot/c^2$ means while the relativistic corrections become appreciable, the quantum gravity corrections are on the order of $10^{-76}$. Note that larger black holes are actually worse, which is sensible because large-scale quantum gravity must agree with general relativity.

An interesting overview by Cliff P. Burgess can be found Living Rev. Relativity 7 (2004) 5, here.

Quantum gravity could be the reason protons overcome the coulomb force and bond at the nucleus of an atom (strong force). If you extrapolate the mass energy of the plank units that fill up the volume of the proton nucleus it could satisfy the Schwarzschild condition, which is indeed, relatively quite a bit of gravity.

• (Using 1 standard deviation of the 2012 measurement of the proton charge radius) – Dave Oct 31 '14 at 18:04
• Well, the reason protons stay together is the strong nuclear force. – HDE 226868 Oct 31 '14 at 18:14
• I'm saying the strong force can be explained by quantum gravity: sciencedomain.org/… – Dave Oct 31 '14 at 18:15
• Where does it say that in the PDF? I skimmed it, and I don't think that's the conclusion the author reached. – HDE 226868 Oct 31 '14 at 18:18
• I've heard the author explain the applications of his findings since then. Also note that this math uses the 2010 CODATA and in 2012 an even smaller charger radius was measured which led to several science magazines stating there is a problem in the standard model with the new more accurate size measurement of the proton being much smaller than the standard model's proton size. – Dave Oct 31 '14 at 18:38


text:
equation echo

+ 1 like - 0 dislike
77 views

The latex is compiling three times for me, in successively smaller text so $\beta$ looks like $\beta \beta \beta$.

I'm running chrome Version 41.0.2272.89 (64-bit) (up to date). I'm not running any scripts that should interfere with equation compiling.

Here's what it looks like

asked Mar 16, 2015 in Bug
edited Mar 17, 2015

I can't reproduce this bug - what browser (and version) are you using, and do you have any userscripts installed? Also, could you produce a screenshot, so I know exactly what you're talking about (what does "in successively smaller text" mean?)?

Hm, that's odd - it works fine for me on Firefox, IE, Opera as well as Chrome (with the same build as you stated). Are you sure you encounter this problem only on PhysicsOverflow? Do you encounter this problem on other sites that run MathJaX too, e.g. MathOverflow (e.g.) or Stack Exchange?

No problem on mathoverflow. :/

Actually now it's fixed??

@RyanThorngren OK, in that case I'll mark the bug as status-nobug, comment here if you ever encounter the bug again.

 Please use answers only to (at least partly) answer questions. To comment, discuss, or ask for clarification, leave a comment instead. To mask links under text, please type your text, highlight it, and click the "link" button. You can then enter your link URL. Please consult the FAQ for as to how to format your post. This is the answer box; if you want to write a comment instead, please use the 'add comment' button. Live preview (may slow down editor)   Preview Your name to display (optional): Email me at this address if my answer is selected or commented on: Privacy: Your email address will only be used for sending these notifications. Anti-spam verification: If you are a human please identify the position of the character covered by the symbol $\varnothing$ in the following word:p$\hbar$ysi$\varnothing$sOverflowThen drag the red bullet below over the corresponding character of our banner. When you drop it there, the bullet changes to green (on slow internet connections after a few seconds). To avoid this verification in future, please log in or register.


text:
## sarah_98 2 years ago ryan puts $500 into a bank account. the bank pays 5% compound interest per year. how much is the interest after one year? • This Question is Closed 1. ParthKohli Continuous compounding. $$\color{Black}{\Rightarrow 500(1 + 0.05) \large^n }$$ 2. ParthKohli $$n\textbf{ is the number of years.}$$ 3. sarah_98 ok 4. ParthKohli $$\color{Black}{\Rightarrow 500(1.05)^1 }$$ $$\color{Black}{\Rightarrow 500 \times 1.05 }$$ 5. sarah_98$525?

6. sarah_98

is it?

7. ParthKohli

This is compounded interest.

8. sarah_98

im confused :s

9. ParthKohli

And yes it is \$525 :)

10. sarah_98

oh ok there's part 2

11. ZhangYan

lol sorry parth read mistake ;)

12. ParthKohli

Interest = Amount - Principal Interest = 525 - 500 Interest = 25

13. sarah_98

work out the total amount he has in his bank account after 2 yrs

14. ParthKohli

@ZhangYan if it's one year then both simple and compound may apply :) so your answer is correct but not the method :S

15. sarah_98

work out the total amount he has in his bank account after 2 yrs


text:
How Neural Network Works using Simple Example
/ November 11, 2017

The simplest definition of a neural network, more properly referred to as an ‘artificial’ neural network (ANN), is provided by the inventor of one of the first neurocomputers, Dr. Robert Hecht-Nielsen. He defines a neural network as: “…a computing system made up of a number of simple, highly interconnected processing elements, which process information by their dynamic state response to external inputs. ANNs are processing devices (algorithms or actual hardware) that are loosely modeled after the neuronal structure of the mamalian cerebral cortex but on much smaller scales. A large ANN might have hundreds or thousands of processor units, whereas a mamalian brain has billions of neurons with a corresponding increase in magnitude of their overall interaction and emergent behavior. Although ANN researchers are generally not concerned with whether their networks accurately resemble biological systems, some have. For example, researchers have accurately simulated the function of the retina and modeled the eye rather well. Figure 1 Neural Network Example Although the mathematics involved with neural networking is not a trivial matter, a user can rather easily gain at least an operational understanding of their structure and function. Neural networks are typically organized in layers. Layers are made up of a…

Insert math as
$${}$$


text:
### Bogosort

2020

You are given an array $a_1, a_2, \dots , a_n$. Array is good if for each pair of indexes $i < j$ the condition \$j […]


text:
# zbMATH — the first resource for mathematics

The dimension of the SLE curves. (English) Zbl 1165.60007
Let the random curve $$\gamma:[0,\infty)\to \overline{\mathbb{H}}$$ be a trace of the chordal $$SLE_{\kappa}$$ where $$\overline{\mathbb{H}}$$ is a closure of the upper-half plane $$\mathbb{H}$$ (for details concerning the Schramm–Loewner Evolution, i.e. a family of maps $$\{g_t,t\geq 0\}$$ called $$SLE_{\kappa}$$ and introduced by the following PDE: $\partial_tg_t(z) = \frac{2}{g_t(z) - \sqrt{\kappa} B_t},\;\;g_0(z)=z,$ where $$(B_t)$$ is a standard Brownian motion and $$\kappa$$ is a positive parameter, see, e.g., [S. Rohde, O. Schramm, Ann. Math, (2) 161, 883–924 (2005; Zbl 1081.60069)]. In the above mentioned paper the authors proved that the Hausdorff dimension of the $$SLE_{\kappa}$$ trace is not larger than $$1+\frac{\kappa}{8}$$ when $$\kappa \leq 8$$, and they conjectured the sharpness of this bound. The main result of the present paper provides the proof of this conjecture. Namely, almost surely one has $$\dim_H(\mathcal{H}) = 2 \wedge (1+ \frac{\kappa}{8})$$ where $$\mathcal{H}= \gamma([0,\infty))$$. This result was known for $$\kappa \geq 8$$ because the curve is then space-filling.

##### MSC:
 60D05 Geometric probability and stochastic geometry 60G17 Sample path properties 28A80 Fractals
Full Text:
##### References:
 [1] Bass, R. F. (1998). Diffusions and Elliptic Operators . Springer, New York. · Zbl 0914.60009 [2] Beffara, V. (2004). Hausdorff dimensions for SLE 6 . Ann. Probab. 32 2606-2629. · Zbl 1055.60036 [3] Camia, F. and Newman, C. M. (2006). The full scaling limit of two-dimensional critical percolation. Comm. Math. Phys. 268 1-38. · Zbl 1117.60086 [4] Duplantier, B. (2000). Conformally invariant fractals and potential theory. Phys. Rev. Lett. 84 1363-1367. · Zbl 1042.82577 [5] Friedrich, R. and Werner, W. (2002). Conformal fields, restriction properties, degenerate representations and SLE. C. R. Math. Acad. Sci. Paris 335 947-952. · Zbl 1101.81095 [6] Kenyon, R. (2000). The asymptotic determinant of the discrete Laplacian. Acta Math. 185 239-286. · Zbl 0982.05013 [7] Lawler, G. F. (1999). Geometric and fractal properties of Brownian motion and random walk paths in two and three dimensions. In Random Walks ( Budapest , 1998 ). Bolyai Soc. Math. Stud. 9 219-258. János Bolyai Math. Soc., Budapest. · Zbl 0955.60076 [8] Lawler, G. F., Schramm, O. and Werner, W. (2001). The dimension of the Brownian frontier is 4/3. Math. Res. Lett. 8 410-411. · Zbl 1114.60316 [9] Lawler, G. F., Schramm, O. and Werner, W. (2001). Values of Brownian intersection exponents. II. Plane exponents. Acta Math. 187 275-308. · Zbl 0993.60083 [10] Lawler, G. F., Schramm, O. and Werner, W. (2002). Sharp estimates for Brownian non-intersection probabilities. In In and Out of Equilibrium ( Mambucaba , 2000 ). Progr. Probab. 51 113-131. Proceedings of the 4th Brazilian School of Probability . Birkhäuser, Boston. · Zbl 1011.60062 [11] Lawler, G. F., Schramm, O. and Werner, W. (2003). Conformal restriction: The chordal case. J. Amer. Math. Soc. 16 917-955. · Zbl 1030.60096 [12] Lawler, G. F., Schramm, O. and Werner, W. (2004). Conformal invariance of planar loop-erased random walks and uniform spanning trees. Ann. Probab. 32 939-995. · Zbl 1126.82011 [13] Lawler, G. F., Schramm, O. and Werner, W. (2004). On the scaling limit of planar self-avoiding walk. In Fractal Geometry and Applications : A Jubilee of Benoît Mandelbrot , Part 2. Proc. Sympos. Pure Math. 72 339-364. Amer. Math. Soc., Providence, RI. · Zbl 1069.60089 [14] Rohde, S. and Schramm, O. (2005). Basic properties of SLE. Ann. of Math. ( 2 ) 161 883-924. · Zbl 1081.60069 [15] Schramm, O. (2000). Scaling limits of loop-erased random walks and uniform spanning trees. Israel J. Math. 118 221-288. · Zbl 0968.60093 [16] Schramm, O. and Sheffield, S. (2005). Harmonic explorer and its convergence to SLE 4 . Ann. Probab. 33 2127-2148. · Zbl 1095.60007 [17] Smirnov, S. (2001). Critical percolation in the plane: Conformal invariance, Cardy’s formula, scaling limits. C. R. Acad. Sci. Paris Sér. I Math. 333 239-244. · Zbl 0985.60090 [18] Smirnov, S. and Werner, W. (2001). Critical exponents for two-dimensional percolation. Math. Res. Lett. 8 729-744. · Zbl 1009.60087 [19] Wilson, D. B. (1996). Generating random spanning trees more quickly than the cover time. In Proceedings of the Twenty-Eighth Annual ACM Symposium on the Theory of Computing ( Philadelphia , PA , 1996 ) 296-303. ACM, New York. · Zbl 0946.60070
This reference list is based on information provided by the publisher or from digital mathematics libraries. Its items are heuristically matched to zbMATH identifiers and may contain data conversion errors. It attempts to reflect the references listed in the original paper as accurately as possible without claiming the completeness or perfect precision of the matching.


text:
# Matrix multiplication notation

This is from my textbook:

If $A=(a_{ij})\in M_{mn}(\Bbb F), B=(b_{ij})\in M_{np}(\Bbb F)$ then $C=A\times B=(c_{ij})\in M_{mp}(\Bbb F)$. $c_{ij}=\sum_{k=1}^{n} a_{ik}b_{kj}$ where $i=1,...m, j=1,...p$

I know how to multiply matrices but I don't understand this notation : $c_{ij}=\sum_{k=1}^{n} a_{ik}b_{kj}$

Can someone explain what that represents by giving me an example? And how did we get that formula?

• Example: To find $c_{11}$, you multiply the first row of matrix $A$ with the first column of matrix $B$. – Prahlad Vaidyanathan Dec 18 '16 at 10:18
• $c_{ij}$ is the element on $i$-th row and $j$-th column of $C$. Similarly, $a_{ik}$, $b_{kj}$ are elements of matrices $B$ and $C$. – Peter Franek Dec 18 '16 at 10:19
• If you know coding, this is how we multiply two matrices. – Rohan Dec 18 '16 at 10:20

Visualisation might help. I'll use your notations and dimensions of the given matrices:

If $$A=(a_{ij})\in M_{mn}(\Bbb F), B=(b_{ij})\in M_{np}(\Bbb F)$$ then $$C=A\times B=(c_{ij})\in M_{mp}(\Bbb F)$$. $$c_{ij}=\sum_{k=1}^{n} a_{ik}b_{kj}$$ where $$i=1,...m, j=1,...p$$

You say you know how to multiply matrices, so take a look at one specific element in the product $$C=AB$$, namely the element on position $$(i,j)$$, i.e. in the $$i$$th row and $$j$$th column.

To obtain this element, you:

• first multiply all elements of the $$i$$th row of the matrix $$A$$ pairwise with all the elements of the $$j$$th column of the matrix $$B$$;
• and then you add these $$n$$ products.

You have to repeat this procedure for every element of $$C$$, but let's zoom in on that one specific (but arbitrary) element on position $$(i,j)$$ for now:

$$\begin{pmatrix} a_{11} &\ldots &a_{1n}\\ \vdots& \ddots &\vdots\\ \color{blue}{\mathbf{a_{i1}}} &\color{blue}{\rightarrow} &\color{blue}{\mathbf{a_{in}}}\\ \vdots& \ddots &\vdots\\ a_{m1} &\ldots &a_{mn} \end{pmatrix} \cdot \begin{pmatrix} b_{11}&\ldots &\color{red}{\mathbf{b_{1j}}} &\ldots &b_{1p}\\ \vdots& \ddots &\color{red}{\downarrow} & \ddots &\vdots\\ b_{n1}&\ldots &\color{red}{\mathbf{b_{nj}}}&\ldots &b_{np} \end{pmatrix} = \begin{pmatrix} c_{11}&\ldots& c_{1j} &\ldots &c_{1p}\\ \vdots& \ddots & & &\vdots\\ c_{i1}& & \color{purple}{\mathbf{c_{ij}}} & &c_{ip}\\ \vdots& & & \ddots &\vdots\\ c_{m1} &\ldots& c_{mj} &\ldots &c_{mp} \end{pmatrix}$$ with element $$\color{purple}{\mathbf{c_{ij}}}$$ equal to: $$\mathbf{\color{purple}{c_{ij}} = \color{blue}{a_{i1}} \color{red}{b_{1j}} + \color{blue}{a_{i2}} \color{red}{b_{2j}} + \cdots + \color{blue}{a_{in}} \color{red}{b_{nj}}}$$ Now notice that in the sum above, the left outer index is always $$i$$ ($$i$$th row of $$A$$) and the right outer index is always $$j$$ ($$j$$th column of $$B$$). The inner indices run from $$1$$ to $$n$$ so you can introduce a summation index $$k$$ and write this sum compactly using summation notation: $$\color{purple}{\mathbf{c_{ij}}}=\sum_{k=1}^{n} \color{blue}{\mathbf{a_{ik}}}\color{red}{\mathbf{b_{kj}}}$$ The formule above thus gives you the element on position $$(i,j)$$ in the product matrix $$C=AB$$ and therefore completely defines $$C$$ by letting $$i=1,...,m$$ and $$j=1,...,p$$.

Can someone explain what that represents by giving me an example? And how did we get that formula?

The illustration above should give you an idea of the general formula, but here's a concrete example where I took $$3 \times 3$$ matrices for $$A$$ and $$B$$ and focus on the element on position $$(2,3)$$:

$$\begin{pmatrix} a_{11} & a_{12} &a_{13}\\ \color{blue}{1} &\color{blue}{2} &\color{blue}{3}\\ a_{31} & a_{32} &a_{33} \end{pmatrix} \cdot \begin{pmatrix} b_{11}&b_{12} &\color{red}{6}\\ b_{21}&b_{22} &\color{red}{5}\\ b_{31}&b_{32} &\color{red}{4} \end{pmatrix} = \begin{pmatrix} c_{11}& c_{12} &c_{13}\\ c_{21}& c_{22} &\color{purple}{\mathbf{c_{23}}}\\ c_{31}& c_{32} &c_{33} \end{pmatrix}$$ with element $$\color{purple}{\mathbf{c_{23}}}$$ equal to: $$\begin{array}{rccccccc} \color{purple}{c_{23}} & = & \color{blue}{a_{21}} \color{red}{b_{13}} &+& \color{blue}{a_{22}} \color{red}{b_{23}} &+& \color{blue}{a_{23}} \color{red}{b_{33}} & = & \displaystyle \sum_{k=1}^{3} \color{blue}{a_{2k}}\color{red}{b_{k3}} \\ & = & \color{blue}{1} \cdot \color{red}{6} &+& \color{blue}{2} \cdot \color{red}{5} &+& \color{blue}{3} \cdot \color{red}{4} \\[8pt] & = & 6&+&10&+&12 & =& 28 \end{array}$$

As you can see the sum run over $k$ from $1$ to $n$, but after you fix $i,j$. You said that you know how to multiply matrices, so you know that if $C=AB$, then $(i,j)-th$ element $c_{ij}$ is obtained fixing the $i-th$ row of $A$, the $j-th$ column of $B$, and then you multiply the elements $a_{i1}$ with $b_{1j}$, $a_{i2}$ with $b_{2j}$, $\dots$, $a_{in}$ with $b_{nj}$, and finally you sum all products. Thus

$$c_{ij}=\sum_{k=1}^n a_{ik}b_{kj}$$


text:
# Why don't these function definitions work? [closed]

picked up Mathematica (transitioning from Python) a couple of days ago so forgive me for the newbie question. I'm trying to create a function which takes in a list of numbers and returns a list of the permutations of the number formed by the concatenation of those numbers. To be more clear ->

foo({1,2,1}) would output {121, 112, 211}. This is how I've tried to implement it.

my_function[x_] := FromDigits /@ Permutations[x]

Thinking that as long as the user input was a list like {1,2,3} this would work just fine. It doesn't seem to, so then I tried

my_function[x_,y_,z_] := FromDigits /@ Permutations[{x,y,z}]

This also didn't work.

This isn't the first time I've had trouble getting function definitions to work. What is it about my function definitions in this case that is causing them not to work?

Also - I've gone through the fast introduction for Python programmers. Any other recommended newbie resources?

Thanks

## closed as off-topic by Carl Lange, Bob Hanlon, m_goldberg, kirma, Alex TrounevMay 22 at 22:27

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – Carl Lange, Bob Hanlon, m_goldberg, kirma, Alex Trounev
If this question can be reworded to fit the rules in the help center, please edit the question.

• You can't use underscore in identifiers in the way you are used to in python. See here for details. That Q/A you may find generally useful as well. For resources, I recommend this QA. – Leonid Shifrin May 21 at 20:12
• Specifically, change my_function to function and it will work. – mikado May 21 at 20:23
• Thank you to both of you for your answers. – Jordan Man May 21 at 20:35


text:
### Home > CALC > Chapter 2 > Lesson 2.3.3 > Problem2-127

2-127.

Pay attention to variance in the slope of the graph.

When does the fastest growth of the plant occur?

Estimate the slope of the secant line at t = 3.

$\approx \frac{3}{4}\text{ feet/month}$

The average rate of growth is the slope of the secant line between t = 0 and t = 5.


text:
/ nucl-ex CERN-PH-EP-2013-085

D meson elliptic flow in non-central Pb-Pb collisions at sqrts(s_NN) = 2.76TeV

Pages: 17

Abstract: Azimuthally anisotropic distributions of D0, D+ and D*+ mesons were studied in the central rapidity region (|y|<0.8) in Pb-Pb collisions at a centre-of-mass energy sqrts(s_NN) = 2.76TeV per nucleon-nucleon collision, with the ALICE detector at the LHC. The second Fourier coefficient v2 (commonly denoted elliptic flow) was measured in the centrality class 30-50% as a function of the D meson transverse momentum pt, in the range 2-16GeV/c\$. The measured v2 of D mesons is comparable in magnitude to that of light-flavour hadrons. It is positive in the range 2 < pt < 6 GeV/c with 5.7 sigma significance, based on the combination of statistical and systematic uncertainties.

Note: *Temporary entry*; 17 pages, 3 captioned figures, authors from page 10 to page 12

Total numbers of views: 2453
Numbers of unique views: 876


text:
# PLZ SOLVE I WILL GIVE BRAINLESET

PLZ SOLVE I WILL GIVE BRAINLESET

$PLZ SOLVE I WILL GIVE BRAINLESET$

## This Post Has 5 Comments

1. lilyplant4289 says:

i did a little reaserch into this and i find b as the most plausable awnser i might be wrong tho so tell me if i am

Explanation:

2. tiffcarina69 says:

Lb is 5 foot

Step-by-step explanation:

3. weridness80 says:

X+x+1=51+x+2
2x+1=x+53
x=52

integeers are 52. 53 and 54

4. Indigosiniy says:

Lb is 5 feet sorry if wrong

5. MilanPatel says:

The integers are $\boxed{52}$, $\boxed{53}$ and $\boxed{54}$.

Further explanation:

Given:

The sum of the first two is 51 more than the third.

Explanation:

Consider the first integers as $x$.

So the second integers is $x+1.$

Therefore, the third integers is $x+2.$

Given that the sum of first two numbers is 51 more than the third.

\begin{aligned}\left( x \right) + \left( {x + 1} \right) &= 51 + \left( {x + 2} \right)\\x + x + 1 &= 51 + x + 2\\2x + 1 &= 53 + x\\2x - x &= 53 - 1 \\x&= 52\\\end{aligned}

The first integer is 52.

The second integer can be calculated as,

\begin{aligned}{\text{Second integer}} &= x + 1\\&= 52 + 1\\&= 53\\\end{aligned}

The second integer can be calculated as,

\begin{aligned}{\text{Third integer}}&= x + 2\\&= 52 + 2\\&= 54\\\end{aligned}

Hence, the integers are $\boxed{52}, \boxed{53}$ and $\boxed{54}.$


text:
# What is the meaning of a confidence interval taken from bootstrapped resamples?

I've been looking at numerous questions on this site regarding bootstrapping and confidence intervals, but I'm still confused. Part of the reason for my confusion is probably that I'm not advanced enough in my statistics knowledge to understand a lot of the answers. I'm about half-way through an introductory statistics course and my math level is only about mid-Algebra II, so anything past that level just confuses me. If one of the knowledgeable people on this site could explain this issue at my level it would be extremely helpful.

We were learning in class how to take resamples using the bootstrap method and use those to build up a confidence interval for some statistic we'd like to measure. So for example, say we take a sample from a large population and find that 40% say they'll vote for Candidate A. We assume that this sample is a pretty accurate reflection of the original population, in which case we can take resamples from it to discover something about the population. So we take resamples and find (using a 95% confidence level) that the resulting confidence interval ranges from 35% to 45%.

My question is, what does this confidence interval actually mean?

I keep reading that there's a difference between (Frequentist) Confidence Intervals and (Bayesian) Credible Intervals. If I understood correctly, a credible interval would say that there's a 95% chance that in our situation the true parameter is within the given interval (35%-45%), while a confidence interval would say that there's a 95% that in this type of situation (but not necessarily in our situation specifically) the method we're using would accurately report that the true parameter is within the given interval.

Assuming this definition is correct, my question is: What's the "true parameter" that we're talking about when using confidence intervals built up using the bootstrap method? Are we referring to (a) the true parameter of the original population, or (b) the true parameter of the sample? If (a), then we'd be saying that 95% of the time the bootstrap method will accurately report true statements about the original population. But how could we possibly know that? Doesn't the whole bootstrap method rest on the assumption that the original sample is an accurate reflection of the population it was taken from? If (b) then I don't understand the meaning of the confidence interval at all. Don't we already know the true parameter of the sample? It's a straightforward measurement!

I discussed this with my teacher and she was quite helpful. But I'm still confused.

If the bootstrapping procedure and the formation of the confidence interval were performed correctly, it means the same as any other confidence interval. From a frequentist perspective, a 95% CI implies that if the entire study were repeated identically ad infinitum, 95% of such confidence intervals formed in this manner will include the true value. Of course, in your study, or in any given individual study, the confidence interval either will include the true value or not, but you won't know which. To understand these ideas further, it may help you to read my answer here: Why does a 95% Confidence Interval (CI) not imply a 95% chance of containing the mean?

Regarding your further questions, the 'true value' refers to the actual parameter of the relevant population. (Samples don't have parameters, they have statistics; e.g., the sample mean, $\bar x$, is a sample statistic, but the population mean, $\mu$, is a population parameter.) As to how we know this, in practice we don't. You are correct that we are relying on some assumptions--we always are. If those assumptions are correct, it can be proven that the properties hold. This was the point of Efron's work back in the late 1970's and early 1980's, but the math is difficult for most people to follow. For a somewhat mathematical explanation of the bootstrap, see @StasK's answer here: Explaining to laypeople why bootstrapping works . For a quick demonstration short of the math, consider the following simulation using R:

# a function to perform bootstrapping
boot.mean.sampling.distribution = function(raw.data, B=1000){
# this function will take 1,000 (by default) bootsamples calculate the mean of
# each one, store it, & return the bootstrapped sampling distribution of the mean

boot.dist = vector(length=B)     # this will store the means
N         = length(raw.data)     # this is the N from your data
for(i in 1:B){
boot.sample  = sample(x=raw.data, size=N, replace=TRUE)
boot.dist[i] = mean(boot.sample)
}
boot.dist = sort(boot.dist)
return(boot.dist)
}

# simulate bootstrapped CI from a population w/ true mean = 0 on each pass through
# the loop, we will get a sample of data from the population, get the bootstrapped
# sampling distribution of the mean, & see if the population mean is included in the
# 95% confidence interval implied by that sampling distribution

set.seed(00)                       # this makes the simulation reproducible
includes = vector(length=1000)     # this will store our results
for(i in 1:1000){
sim.data    = rnorm(100, mean=0, sd=1)
boot.dist   = boot.mean.sampling.distribution(raw.data=sim.data)
includes[i] = boot.dist[25]<0 & 0<boot.dist[976]
}
mean(includes)     # this tells us the % of CIs that included the true mean
[1] 0.952

• Which particular assumptions are we relying on? – iarwain Jan 30 '14 at 2:02
• Thanks. I think I found what I was looking for in the second answer to that thread: "Remember that we are not using the means of the bootstrap samples to estimate the population mean, we use the sample mean for that (or whatever the statistic of interest is). But we are using the bootstrap samples to estimate properties (spread, bias) of the sampling proccess. And using sampling from a know population (that we hope is representative of the population of interest) to learn the effects of sampling makes sense and is much less circular." ... – iarwain Jan 30 '14 at 17:14
• ... In other words, all the CI is telling us is that in a population roughly similar to ours we would expect 95% of samples taken from that population to reflect the true value +/- the margin of error. So all we're doing is giving a very rough clue - though perhaps the best clue we have - to around how close our sample statistic might be to the true population parameter. If so, then it sounds like we shouldn't take the exact numbers in the CI too seriously - they just mean something like, "the sample statistic is probably roughly accurate to probably roughly this degree." Did I get that right? – iarwain Jan 30 '14 at 17:42
• That's essentially correct. A CI gives us a sense of the precision of our estimate, but we never know if our actual (realized) CI does contain the true value. The primary assumption is that our data are representative of the population of interest. Note that neither of these are particular to bootstrapped CIs, you have the same interpretation & assumption in a CI calculated via asymptotic theory. – gung - Reinstate Monica Jan 30 '14 at 18:05
• This is an excellent explanation. I would add only that the "true value" is at times an artifact of the study design. In polling for political candidates, stratified samples give much more precise and reliable estimates than would a random sample. The cost is a risk of oversampling the wrong group by design. In that case, the 95% CI is centered on the correct value, the one which is achieved by replicating the study ad infinitum, but that value is not the other sense of a true parameter: the parameter we wanted to estimate. This is why study design and inference are intrinsically linked. – AdamO Dec 13 '17 at 17:12

What you are saying is that there is no need to find confidence interval from bootstrapped resamples. If you are satisfied with the statistic (sample mean or sample proportion) obtained from bootstrapped resamples, do not find any confidence interval and so, no question of interpretation. But if you are not satisfied with the statistic obtained from bootstrapped resamples or satisfied but still want to find the confidence interval, then the interpretation for such confidence interval is same as any other confidence interval. It's because when your bootstrapped resamples are exactly representing (or assumed to be so) the original population, then where is the need of confidence interval? The statistic from the bootstrapped resamples is the original population parameter itself but when you do not consider the statistic as the original population parameter, then there is a need to find the confidence interval. So, it's all about how you consider. Let's say you calculated 95% confidence interval from bootstrapped resamples. Now the interpretation is: "95% of the times, this bootstrap method accurately results in a confidence interval containing the true population parameter".

(This is what I think. Correct me if there are any mistakes).

We are referring to the true parameter of the original population. It is possible to do this assuming that the data were drawn randomly from the original population -- in that case, there are mathematical arguments showing that the bootstrap procedures will give a valid confidence interval, at least as the size of the dataset becomes sufficiently large.

• So it sounds like in order to understand why it works I'll need to know enough math to follow the mathematical proofs. Is that correct? – iarwain Jan 30 '14 at 0:04
• I think so (I am not familiar with the proofs) – Gareth Jan 30 '14 at 1:49
• Intuitively though, you can see that as the sample size gets large, the sample starts to look a lot like the population. For example, say I take 1 million samples from a normal distribution with given mean and variance. Call this sample X. A random sample (with replacement) drawn from X looks a lot like a random sample drawn from the original distribution. I think this is the basic idea of why it works. – Gareth Jan 30 '14 at 1:56


text:
## Index of Approved and Conditionally Approved 12GeV Experiments at Jefferson Lab

Other Indexes: | 12GeV Authors by Institution Index| | 12GeV Author Last Name Index
| Users Group Institutions | Users Group Last Name Index|
| All Users Institutions | All Users Last Name Index |

# 12GeV Experiments in Hall A

 ( E1206114 ) ; Measurements of Electron-Helicity Dependent Cross Sections of Deeply Virtual Compton Scattering with CEBAF at 12 GeV ( E1206122 ) ; Measurement of neutron asymmetry A1n in the valence quark region using 8.8 GeV and 6.6 GeV beam energies and Bigbite spectrometer in Hall A ( E1207108 ) ; Precision Measurement of the Proton Elastic Cross Section at High Q^2 ( E1207109 ) ; Large Acceptance Proton Form Factor Ratio Measurements at 13 and 15 (GeV/c)2 Using REcoil Polarization Method ( E1209005 ) ; An Ultra-precise Measurement of the Weak Mixing Angle using Moller Scattering ( E1209016 ) ; Measurement of the Neutron Electromagnetic Form Factor Ratio Gen/GMn at High Q2 ( E1209018 ) ; Measurement of the Semi-Inclusive pi and kappa electro-production in DIS regime from transversely polarized 3He target with the SBS&BB spectrometers in Hall A ( E1209019 ) ; Precision Measurement of the Neutron Magnetic Form Factor up to Q2=18.0 (GeV/c)2 by the Ration Method ( E1210006 ) ; An update to PR12-09-014: Target Single Spin Asymmetry in Semi-Inclusive Deep-Inelastic Electro Pion Production on a Trasversely Polarized 3He Target at 8.8 and 11 GeV ( E1210007 ) ; Precision Measurement of Parity-Violation in Deep Inelastic Scattering Over a Broad Kinematic Range ( E1210009 ) ; Search for new Vector Boson A1 Decaying to e+e- ( E1210103 ) ; Measurement of the F2n/F2p, d/u Ratios and A=3 EMC Effect in Deep Inelastic Scattering off the Tritium and Helium Mirror Nuclei ( E1211007 ) ; Asymmetries in Semi-Inclusive Deep-Inelastic Electro-Production of Charged Pion on a Longitudinally Polarized He-3 Target at 8.8 and 11 GeV ( E1211101 ) ; PREX-II: Precision Parity-Violating Measurement of the Neutron Skin of Lead ( E1211108 ) ; Target Single Spin Asymmetry inSemi-Inclusive Deep-Inelastic (e,e'\pi^{\pm}) Reaction on a Transversely Polarized Proton Target ( E1211112 ) ; Precision measurement of the isospin dependence in the 2N and 3N short range correlation region ( E1212004 ) ; CREX: PARITY-VIOLATING MEASUREMENT of theWEAK CHARGE DISTRIBUTION of 48Ca to 0.02 fm ACCURACY ( E1212006 ) ; Near Threshold Electroproduction of J/Psi at 11 GeV ( E1214009 ) ; Ratio of the electric form factor in the mirror nuclei 3He and 3H ( E1214011 ) ; Proton and Neutron Momentum Distributions in A = 3 Asymmetric Nuclei ( E1214012 ) ; Measurement of the Spectral Function of 40Ar through the (e,e2p) reaction

Number of 12GeV Experiments in Hall A = 21

# 12GeV Experiments in Hall B

 ( E1206106 ) ; Study of Color Transparency in Exclusive Vector Meson Electroproduction off Nuclei ( E1206108 ) ; Hard Exclusive Electroproduction of pi0 and eta with CLAS12 ( E1206109 ) ; The Longitudinal Spin Structure of the Nucleon ( E1206112 ) ; Probing the Proton's Quark Dynamics in Semi-Inclusive Pion Production at 12 GeV ( E1206113 ) ; The Structure of the Free Neutron at Large x-Bjorken ( E1206117 ) ; Quark Propagation and Hadron Formation ( E1206119 ) ; Deeply Virtual Compton Scattering with CLAS at 11 GeV ( E1207104 ) ; Measurement of the Neutron Magnetic Form Factor at High Q2 Using the Ratio Method on Deuterium ( E1207107 ) ; Studies of Spin-Orbit Correlations with Longitudinally Polarized Target ( E1209003 ) ; Nucleon Resonance Studies with CLAS12 ( E1209007 ) ; Studies of partonic distributions using semi-inclusive production of kaons ( E1209008 ) ; Studies of the Boer-Mulders Asymmetry in Kaon Electroproduction with Hydrogen and Deuterium Targets ( E1209009 ) ; Studies of Spin-Orbit Correlations in Kaon Electroproduction in DIS with polarized hydrogen and deuterium targets ( E1211003 ) ; Deeply Virtual Compton Scattering on the Neutron with CLAS12 at 11 GeV ( E1211005 ) ; Meson spectroscopy with low Q2 electron scattering in CLAS12 ( E1211006 ) ; Heavy Photon Search at Jefferson Laboratory ( E1211106 ) ; High Precision Measurement of the Proton Charge Radius ( E1212001 ) ; Timelike Compton Scattering and J/psi photoproduction on the proton in e+e- pair production with CLAS12 at 11 GeV ( E1212007 ) ; Exclusive Phi Meson Electroproduction with CLAS12 ( E1214001 ) ; The EMC Effect in Spin Structure Functions

Number of 12GeV Experiments in Hall B = 20

# 12GeV Experiments in Hall C

 ( E1206101 ) ; Measurement of the Charged Pion Form Factor to High Q2 ( E1206104 ) ; Measurement of the Ratio R=sigmaL/sigmaT in Semi-Inclusive Deep-Inelastic Scattering ( E1206105 ) ; Inclusive Scattering from Nuclei at $x > 1$ in the quasielastic and deeply inelastic regimes ( E1206107 ) ; The Search for Color Transparency at 12 GeV ( E1206110 ) ; Measurement of Neutron Spin Asymmetry A1n in the Valence Quark Region Using an 11 GeV Beam and a Polarized 3He Target in Hall C ( E1206121 ) ; A Path to 'Color Polarizabilities' in the Neutron: A Precision Measurement of the Neutron $g_2$ and $d_2$ at High $Q^2$ in Hall C ( E1207105 ) ; Scaling Study of the L-T Separated Pion Electroproduction Cross Section at 11 GeV ( E1209002 ) ; Precise Measurement of pi+/pi- Ratios in Semi-inclusive Deep Inelastic Scattering PartI: Charge Symmetry violating Quark Distributions ( E1209011 ) ; Studies of the L-T Separated Kaon Electroproduction Cross Section from 5-11 GeV ( E1209017 ) ; Transverse Momentum Dependence of Semi-Inclusive Pion Production ( E1210002 ) ; Precision measurements of the F_2 structure function at large x in the resonance region and beyond ( E1210003 ) ; Deuteron Electro-Disintegration at Very High Missing Momentum ( E1210008 ) ; Detailed studies of the nuclear dependence of F2 in light nuclei. ( E1211002 ) ; Proton Recoil Polarization in the 4He(e,e'p)3H, 2H(e,e'p)n, and 1H(e,e'p) Reactions ( E1211009 ) ; The Neutron Electric Form Factor at Q^2 up to 7 (GeV/c)^2 from the Reaction d(e,e'n)p via Recoil Polarimetry ( E1211107 ) ; In Medium Nucleon Structure Functions, SRC, and the EMC effect ( E1213007 ) ; Measurement of Semi-Inclusive Àæ Production as Validation of Factorization ( E1213010 ) ; Exclusive Deeply Virtual Compton and Neutral Pion Cross-Section Measurements in Hall C ( E1214002 ) ; Precision Measurements and Studies of a Possible Nuclear Dependence of R ( E1214003 ) ; Wide-angle Compton Scattering at 8 and 10 GeV Photon Energies ( E1214005 ) ; Wide Angle Exclusive Photoproduction of pi-zero Mesons ( E1214006 ) ; Initial State Helicity Correlation in WideAngle Compton Scattering

Number of 12GeV Experiments in Hall C = 22

# 12GeV Experiments in Hall D

 ( E1206102 ) ; Mapping the Spectrum of Light Quark Mesons and Gluonic Excitations with Linearly Polarized Photons ( E1210011 ) ; A Precision Measurement of the eta Radiative Decay Width via the Primakoff Effect ( E1213003 ) ; An initial study of hadron decays to strange final states with GlueX in Hall D ( E1213008 ) ; Measuring the Charged Pion Polarizability in the $\gamma \gamma \rightarrow \pi^+ \pi^-$ Reaction

Number of 12GeV Experiments in Hall D = 4

# 12GeV Experiments in Hall Inj

 ( E1213005 ) ; Measurement of 16O(³,±)12C with a bubblechamber and a bremsstrahlung beam

Number of 12GeV Experiments in Hall Inj = 1


text:
HTCondor has a general purpose language for transforming ClassAds, this language is used by the condor_schedd for submit transforms, and as of version 8.9.7 by the job router for routes and pre and post route transforms.

There is also a stand alone tool condor_transform_ads than can read ClassAds from a file or pipe, transform them, and write the resulting ClassAds to a file or pipe.

The transform language is build on the same basic macro expansion engine use by HTCondor configuration and by condor_submit and shares many of the same features such as $() macro expansion and if statements. This transform language is a superset of an earlier transform language based on New ClassAds. The condor_schedd and condor_job_router will still allow the earlier transform language, and they will automatically convert configuration from earlier New ClassAds style transforms to the to the native transform language when they read the configuration. ## General Concepts¶ Tranforms consists of a sequence of lines containging key=value pairs or transform commands such as SET. Transform commands execute in order from top to bottom and may make use of macro values set by earlier statements using $(var) macro subsitution. Unlike configuration files, Transform commands will use the value of $(var) defined at the time, rather than the last value defined in the configuration file. If/else statements and macro functions such as $INT(var) can be used in transforms, but include may not be used.

A macro expansion of the form $(MY.<attr>) will expand as the value of the attribute <attr> of the ClassAd that is being transformed. Expansion will expand simple string values without quotes but will not evaluate expressions. Use $STRING(MY.<attr>) or $INT(MY.<attr>) if you need to evalute the ClassAd attribute before expanding it. The existence of an attribute in the ClassAd being transformed can be tested by using if defined MY.<attr> In the definitions below. <attr> must be a valid ClassAd attribute name <newattr> must be a valid ClassAd attribute name <expr> must be a valid ClassAd expression after $() macro expansion. Dont forget to quote string values!

<var> must be a valid macro name

<regex> is a regular expression

<attrpat> is a regular expression substitution pattern, which may include capture groups \0, \1, etc.

## Transform Commands¶

<var> = <value>

Sets the temporary macro variable <var> to <value>. This is the same sort of macro assigment used in configuration and submit files, the value is everything after the = until then end of the line with leading and trailing whitespace removed. Variables set in this way do not directly affect the resulting transformed ClassAd, but they can be used later in the transform by $(var) macro expansion. In the condor_job_router some macro variable names will affect the way the router behaves. For a list of macro variable names have have special meaning to the condor_job_router see the Routing Table Entry Commands and Macro values section. REQUIREMENTS <expr> Apply the tranform only if the expression given by <expr> evaluates to true when evaluated against the untransformed ClassAd. SET <attr> <expr> Sets the ClassAd value of <attr> to <expr> in the ClassAd being transformed. DEFAULT <attr> <expr> Sets the ClassAd value of <attr> to <expr> in the ClassAd being tranformed if that ClassAd does not currently have <attr> or if it is currently set to undefined. This is equivalent to if ! defined MY.<Attr> SET <Attr> <value> endif  EVALSET <attr> <expr> Evaluate <expr> and set the ClassAd value of <attr> to the result of the evaluation. Use this when the ClassAd value of <attr> must be a simple value rather than expression, or when you need to capture the result of evaluating at tranform time. Note that it is usually better to use SET with macro expansions when you want to modify a ClassAd attribute as part of a transform. EVALMACRO <var> <expr> Evaluate <expr> and set the temporary macro variable <var> to the result of evaluation. $(var) can the be used in later transform statements such as SET or if.

COPY <attr> <newattr>

Copies the ClassAd value of <attr> to a new ClassAd attribute <newattr>. This will result in two attributes that have the same value at this step of the transform.

COPY /<regex>/ <attrpat>

Copies all ClassAd attributes that have names matching the regular expression <regex> to new attribute names. The new attribute names are defined by <attrpat> which may have regular expression capture groups to substitute portions of the original attribute name. \0 Is the entire attribute name, and \1 is the first capture, etc. For example

::

# copy all attributes whose names begin with Resource to new attribute with names that begin with OriginalResource COPY /Resource(.+)/ OriginalResource1

RENAME <attr> <newattr>

Renames the attribute <attr> to a new attribute name <newattr>. This is the eqivalent of a COPY statement followed by a DELETE statement.

RENAME /<regex>/ <attrpat>

Renames all ClassAd attributes that match the regular expression <regex> to new attribute names given by the substitution pattern <attrpat>.

DELETE <attr>

Deletes the ClassAd attribute <attr> from the transformed ClassAd.

DELETE /<regex>/

Deletes all ClassAd attributes whose names match the regular expression <regex> from the transformed ClassAd.


text:
over 4 years ago

## Quick Glance of Java 8 - Closure

In my impression of the offical bimonthly "Java Manazine," many articles discussed the Lambda expression coming with Java 8, but the closure was not been discussed much. With a rough search, I just found the closure mentioned in the article of discussing the Lambda expression in the 2013 July-August issue. I think the phenomenon comes from two reasons: (1) without Lambda, the anonymous class still can capture the (effectively final) variables; (2) the Lambda expression captured variables are still effectively final. Since the free variables don't perfect work, the closure is not an important point to be advertised with the Java Lambda expression. In the description of the Closure on the Wikipeida (not formal enough, but easy to acess than the books of programming languages), the closure can manipulate the captured free variables just like normal variables. However, the supports of the free variables are not the same in all languages.

Objective C, the language I use much in my work as an example. Through the concept of the shared storage, Apple offical document gives some examples to discuss the variables captured by the code blocks. Well, the concept of the memory storage is an unavoidable flaw for the language sensitive to memory address. However, in this article, I try to use a more abstract description to discuss the variables captured by code blocks. By default, the code block only captures the value of the variable, so any change to the variable after the block is not seen by the block. Thus, in Code List 1, the result of the NSLog is 42, not 84.

To capture the variable, not its value, in the code block, a modifier __block should be placed on the variable declaration like Code List 2. With the modifier, the result of NSLog becomes 84 because when the code block executed (line 6), the captured variable anInteger has been changed to 84 (line 5).

With the __block modifier, the code block captured the variable, not its value, the value of the variable can be modified inside the code block. Therefore, in Code List 3, the NSLog is called after the execution of callback(), the displayed result of anInteger is 100. I think the design has both advantages and disadvantages. For the language abstraction, the need of the __block modifier forces the programmers be aware of the existence of the memory address that lowers the language abstraction (non-intuitive). However, Objective C can use the modifier to optimize the compilation for performance. Objective C can provide both read-only and read-write captured variables, but also compile-time check, e.g., without __block modifier, any change to the captured variable is seen as compile error. Therefore, I think the __block modifier is not a bad design .

Well, it is time back to Java. As mentioned before, without Lambda, the anonymous class can capture the scope-visible vairable x like Code List 4, but the problem is that the captured variable x is effectively final. Therefore, to uncomment the line x = 48; will get a compile error.

Even with Lambda, Code List 5 as an example, the variable x in the Lambda is still a final variable, unable to modify the value. To uncomment the line x = 48; will still get a compile error

However, the final modifier in Java only limits the change to the variable. If the variable is an object reference, calling the methods of the object is allowed, even that the method will change the status of the object. Thus, Code List 4 can be modified to Code List 6. The same, trying to uncomment the line x = new AtomicInteger(48); will get a compile error, but use x.set(48); can change the value of x. (This also applies to Objective C)

Therefore, Code List 5 can be also modified to Code List 7. Unfortunately, the data types that support Autoboxing and Unboxing, e.g., Integer, are immutable data type. To use captured variables is not as convenient as JavaScript, or other languages that treat primitive types as objects. However, this way can provide some kinds of free variables similar.

Although Java 8 supports Lambda expression, I think the closure is still not the first-class citizen of Java. And as mentioned in the previous article, for testability, besides the one-line Lambda or the code too simple to break, I still like to write small and easy-to-test classes, not Lambda expression. To capture variables? Injecting variables through the constructor can be considered as a good way. As for when to write one-line Lambda or the code too simple to break, I think Stream, the new Collection API, opens the large possibility.


text:
# Forcing line breaks without changing bar lines

3 messages
Open this post in threaded view
|

## Forcing line breaks without changing bar lines

 Is it possible to make a function that will do the equivalent of...  \breakwhen at a bar boundary, and  \bar "" \breakotherwise?Basically, I just want a line break at a point, without lilypond fussing about whether the break is at a valid position or not, but I also don't want to erase any bar lines (which happens if I just indiscriminately use \bar "" \break).Thanks,lj _______________________________________________ lilypond-user mailing list [hidden email] https://lists.gnu.org/mailman/listinfo/lilypond-user


text:
# Math Help - Countable Sets

1. ## Countable Sets

This will be the second of a set of questions concerning real analysis. I've been having much trouble understanding how to go about writing the proofs since math classes such as these haven't exactly gone that well for me.

The question reads:

Show that the set of all finite subsets of N is a countable set.

Any help on this would be greatly appreciated. Thanks.

2. A countable union of countable sets is countable. Since the subsets have finite elements, they are essentially a finite union of n, for n \in N, which means they are countable.


text:
# 51 constructions of the Moonshine module

```@article{Carnahan201751CO,
title={51 constructions of the Moonshine module},
author={Scott Carnahan},
journal={arXiv: Representation Theory},
year={2017}
}```
We show using Borcherds products that for any fixed-point free automorphism of the Leech lattice satisfying a "no massless states" condition, the corresponding cyclic orbifold of the Leech lattice vertex operator algebra is isomorphic to the Monster vertex operator algebra. This induces an "orbifold duality" bijection between algebraic conjugacy classes of fixed-point free automorphisms of the Leech lattice satisfying this condition and algebraic conjugacy classes of non-Fricke elements in the… Expand
9 Citations
Systematic Orbifold Constructions of Schellekens' Vertex Operator Algebras from Niemeier Lattices
• Mathematics
• 2020
We present a systematic, rigorous construction of all 70 strongly rational, holomorphic vertex operator algebras V of central charge 24 with non-zero weight-one space V1 as cyclic orbifoldExpand
Systematic Orbifold Constructions of Schellekens' Vertex Operator Algebras from Niemeier Lattices
• Mathematics
• 2020
We present a systematic, rigorous construction of all 70 strongly rational, holomorphic vertex operator algebras \$V\$ of central charge 24 with non-zero weight-one space \$V_1\$ as cyclic orbifoldExpand
Characterizing moonshine functions by vertex-operator-algebraic conditions
• Mathematics
• 2017
Given a holomorphic \$C_2\$-cofinite vertex operator algebra \$V\$ with graded dimension \$j-744\$, Borcherds's proof of the Monstrous Moonshine Conjecture implies any finite order automorphism of \$V\$ hasExpand
Duality defect of the monster CFT
• Physics, Mathematics
• 2019
We show that the fermionization of the Monster CFT with respect to Z2A is the tensor product of a free fermion and the Baby Monster CFT. The chiral fermion parity of the free fermion implies that theExpand
A Self-Dual Integral Form of the Moonshine Module
• Scott Carnahan
• Mathematics
• Symmetry, Integrability and Geometry: Methods and Applications
• 2019
We construct a self-dual integral form of the moonshine vertex operator algebra, and show that it has symmetries given by the Fischer-Griess monster simple group. The existence of this form resolvesExpand
Four self-dual integral forms of the moonshine module
We give four constructions of self-dual integral forms of the moonshine vertex operator algebra, each of which has symmetries given by the Fischer-Griess monster simple group. The existence of theseExpand
Monstrous Moonshine over the integers
Monstrous moonshine began in 1978 with a numerical observation by McKay relating representations of the monster simple group with coefficients of the modular J function. This observation initiallyExpand
A Short Introduction to the Algebra, Geometry, Number Theory and Physics of Moonshine
Moonshine arose in the 1970s as a collection of coincidences connecting modular functions to the monster simple group, which was newly discovered at that time. The effort to elucidate theseExpand
Dimension Formulae and Generalised Deep Holes of the Leech Lattice Vertex Operator Algebra
• Mathematics
• 2019
We prove a dimension formula for the weight-1 subspace of a vertex operator algebra \$V^{\operatorname{orb}(g)}\$ obtained by orbifolding a strongly rational, holomorphic vertex operator algebra \$V\$ ofExpand

#### References

SHOWING 1-10 OF 45 REFERENCES
Generalized moonshine, II: Borcherds products
The goal of this paper is to construct infinite dimensional Lie algebras using infinite product identities, and to use these Lie algebras to reduce the generalized moonshine conjecture to a pair ofExpand
Generalized moonshine I: Genus-zero functions
We introduce a notion of Hecke-monicity for functions on certain moduli spaces associated to torsors of finite groups over elliptic curves, and show that it implies strong invariance properties underExpand
A resolution for standard modules of Borcherds Lie algebras
Abstract In this paper we construct a Bernstein–Gelfand–Gelfand-type resolution of a standard (irreducible) module for a Borcherds Lie algebra g . The resolution involves generalized Verma modules;Expand
Vertex algebras, Kac-Moody algebras, and the Monster.
• R. Borcherds
• Mathematics, Medicine
• Proceedings of the National Academy of Sciences of the United States of America
• 1986
An integral form is constructed for the universal enveloping algebra of any Kac-Moody algebras that can be used to define Kac's groups over finite fields, some new irreducible integrable representations, and a sort of affinization of anyKac-moody algebra. Expand
Fricke Lie algebras and the genus zero property in Moonshine
We give a new, simpler proof that the canonical actions of finite groups on Fricke-type Monstrous Lie algebras yield genus zero functions in generalized Monstrous Moonshine, using aExpand
Modular-Invariance of Trace Functions¶in Orbifold Theory and Generalized Moonshine
• Mathematics, Physics
• 1997
Abstract: The goal of the present paper is to provide a mathematically rigorous foundation to certain aspects of the theory of rational orbifold models in conformal field theory, in other words theExpand
\$\Z_3\$-orbifold construction of the Moonshine vertex operator algebra and some maximal \$3\$-local subgroups of the Monster
• Mathematics
• 2016
In this article, we describe some maximal \$3\$-local subgroups of the Monster simple group using vertex operator algebras (VOA). We first study the holomorphic vertex operator algebra obtained byExpand
Monstrous Moonshine from orbifolds
We consider the Monster Module of Frenkel, Lepowsky, and Meurman as aZ2 orbifold of a bosonic string compactified by the Leech lattice. We show that the main Conway and Norton Monstrous MoonshineExpand
Generalized Kac-Moody Lie algebras, free Lie algebras and the structure of the Monster Lie algebra
Abstract It is shown that any generalized Kac-Moody Lie algebra g that has no mutually orthogonal imaginary simple roots can be written as g = u + ⊕ ( g J + h ) ⊕ u −, where g J is a Kac-MoodyExpand
BPS algebras, genus zero and the heterotic Monster
• Physics, Mathematics
• 2017
In this note, we expand on some technical issues raised in (Paquette et al 2016 Commun. Number Theory Phys. 10 433-526) by the authors, as well as providing a friendly introduction to and summary ofExpand


text:
# Brute force script for printing a password

I wrote a script that reads a file containing a password ("password"), loops each character in that file to see if it matches a character in the alphabet, and when every letter has been found the password is printed.

def readFile():
file = raw_input("Enter file that contains the password: ");
file = open(file, 'r');

alphabet = 'abcdefghijklmnopqrstuvwxyz';

Notfound = True;

while Notfound:
for i in readFile():
for j in alphabet:
if i == j:
Notfound = False;

Could this be considered a VERY basic implementation of a brute force script?

• I don't understand what you are asking. If I answered with "You are doing what should be a very simple task in an unnecessarily difficult and inefficient way, and probably not quite as intended", would you be satisfied? – 200_success Apr 8 '15 at 2:47
• In other words, what do you want to accomplish, and why did you write the code this way? – 200_success Apr 8 '15 at 2:48
• I am not trying to print the contents of a file. The goal is to create a script that can run through all the possibilities of what a password might be then print it to the user. What I am asking is if the way in which I am obtaining the password could be considered a brute force technique. Consider this, if I found a website which is vulnerable to sql injection, I could use a similar method to obtain a password in the database using get commands and running through all the possibilities of what the password could be by comparing each character to a predefined set of characters @200_success – l30n1d45 Apr 8 '15 at 2:51
• So again; my question is if the method I am using could be considered as a brute force attack @200_success – l30n1d45 Apr 8 '15 at 2:57

I don't understand what you are trying to accomplish, or how it constitutes an attack. I'm also not certain that your code matches your stated goal. What do you mean by "every character has been found" — every character in what? You're just filtering file contents for characters that are lowercase letters, and stop after you find a file that contains such letters. Nearly every file on a computer will meet that requirement.

If you want to do that, you might as well write it better.

readFile() should be named prompt_and_read_file() to conform to Python naming conventions, and to indicate that it does more than one thing. File handles should be opened using a with block, so that they will be automatically closed. Semicolons at the end of statements are not idiomatic in Python.

Many tasks that require looping in other languages can often be done in Python using other techniques. Here, filtering out non-lowercase letters can be done using a regular expression.

import re

with open(raw_input("Enter file that contains the password: ")) as f:

while True:
password = ''.join(re.findall(r'[a-z]', file_contents))
break

Could this be considered a basic brute-force? Sure, for a limited use-case, but even then it is pretty inefficient.

To be clear, normally a brute-force system requires checking all combinations against some hashing function to see if the hashed result matches the hashed password. For example, imagine the password is "password", and the hashed version of that is: 286755fad04869ca523320acce0dc6a4 (that's the actual MD5-hash of "password"). What you normally have for a brute-force system, is the hashed version, not the original version.

You would normally have to generate many possible passwords, and hash the results, and then see if the hashed results match the known hash, and from that, deduce that the passwords must have been guessed.

In your case, you are just checking each letter 1-at-a-time, against the raw password. That's not a very realistic situation. Still... you are brute-forcing things.

Let's work your algorithm to make it more efficient though.

What you are doing is reading files until you find one which has a password that is only letters a through z. How about code that does the negative of what you have:

def readFile():
file = raw_input("Enter file that contains the password: ");
file = open(file, 'r');

alphabet = set('abcdefghijklmnopqrstuvwxyz');

while True:


text:
12.11 Conditionals¶

As categories have parameters, the actual operations exported by a conditional category can depend on these parameters. As an example, the operation determinantdeterminantMatrixCategory from category MatrixCategory is only exported when the underlying domain R has commutative multiplication:

if R has commutative("*") then
determinant: $-> R  Conditionals can also define conditional extensions of a category. Here is a portion of the definition of QuotientFieldCategory: QuotientFieldCategory QuotientFieldCategory(R) : Category == ... with ... if R has OrderedSet then OrderedSet if R has IntegerNumberSystem then ceiling:$ -> R
...

Think of category QuotientFieldCategory(R) as denoting the domain Fraction(R), the class of all fractions of the form a/b for elements of R. The first conditional means in English: If the elements of R are totally ordered ( R is an OrderedSet), then so are the fractions a/b. Fraction

The second conditional is used to conditionally export an operation ceiling which returns the smallest integer greater than or equal to its argument. Clearly, ceiling makes sense for integers but not for polynomials and other algebraic structures. Because of this conditional, the domain Fraction(Integer) exports an operation ceiling: Fraction Integer->Integer, but Fraction Polynomial Integer does not.

Conditionals can also appear in the default definitions for the operations of a category. For example, a default definition for ceilingceilingField within the part following the add reads:

if R has IntegerNumberSystem then
ceiling x == ...

Here the predicate used is identical to the predicate in the Exports part. This need not be the case. See ugPackagesConds for a more complicated example.