text:
# Difference between revisions of "2021 AIME II Problems/Problem 12"

## Problem

A convex quadrilateral has area $30$ and side lengths $5, 6, 9,$ and $7,$ in that order. Denote by $\theta$ the measure of the acute angle formed by the diagonals of the quadrilateral. Then $\tan \theta$ can be written in the form $\tfrac{m}{n}$, where $m$ and $n$ are relatively prime positive integers. Find $m + n$.

## Solution

Since we are asked to find $\tan \theta$, we can find $\sin \theta$ and $\cos \theta$ separately and then use those values to find $\tan \theta$. Let us first draw a diagram of this quadrilateral.

[asy] unitsize(4cm); pair A,B,C,D,X; A = (0,0); B = (1,0); C = (1.25,-1); D = (-0.75,-0.75); draw(A--B--C--D--cycle,black+1bp); X = intersectionpoint(A--C,B--D); draw(A--C); draw(B--D); label("$A$",A,NW); abel("$B$",B,NE); label("$C$",C,SE); label("$D$",D,SW); dot(X); label("$X$",X,S); label("$5$",(A+B)/2,N) label("$6$",(B+C)/2,E); label("$9$",(C+D)/2,S); label("$7$",(D+A)/2,W); label("$\theta$",X,2.5E); label("$a$",(A+X)/2,NE); label("$b$",(B+X)/2,NW); label("$c$",(C+X)/2,SW); label("$d$",(D+X)/2,SE); [/asy]

~ my_aops_lessons


text:
# Relation of different definition of twists

Let $$G=GL_n$$ and $$W$$ the Weyl group of $$G$$. Let $$B$$ be a Borel subgroup of $$G$$ and $$U$$ the unipotent radical of $$B$$. Let $$B_-$$ be the Borel subgroup of $$G$$ such that $$B_- \cap B = T$$. In the paper and the paper, Berenstein-Fomin-Zelevinsky twist on $$U^w = U \cap B_-wB_-$$ is a map $$\eta: U^w \to U^w$$ which sends $$g \in U^w$$ to the unique element in $$U \cap B_- w g^T$$.

Let $$u, v \in W$$, $$G^{u,v} = BuB \cap B_-vB_-$$. For $$a \in G$$ which has a LDU decomposition, denote $$a = [a]_- [a]_0 [a]_+$$ be the LDU decomposition of $$a$$. In type $$A$$, denote $$\overline{s}_i = \varphi_i\left( \begin{matrix} 0 & -1 \ 1 & 0 \end{matrix} \right)$$ and $$\overline{\overline{s}}_i = \varphi_i\left( \begin{matrix} 0 & 1 \ -1 & 0 \end{matrix} \right)$$, where $$\varphi_i: SL_2 \to G$$ is the group homomorphism given by $$\varphi_i\left( \begin{matrix} 1 & t \ 0 & 1 \end{matrix} \right) = x_i(t)$$ and $$\varphi_i\left( \begin{matrix} 1 & 0 \ t & 1 \end{matrix} \right) = x_\overline{i}(t)$$, $$x_i(t) = \exp(te_i)$$, $$x_{\overline{i}}(t) = \exp(tf_i)$$, $$e_i, f_i, h_i$$ are standard generators of the Lie algebra $$\mathfrak{g}$$ of $$G$$.

On the other hand, in the paper, a twist map on $$\zeta_{u,v}: G^{u,v} \to G^{u^{-1}, v^{-1}}$$ is defined by \begin{align} \zeta_{u,v}(g) = ( [\overline{\overline{u^{-1}}} x]_-^{-1} \overline{\overline{u^{-1}}} x \overline{v^{-1}} [x \overline{v^{-1}}]_+^{-1} )^{\theta}, \end{align} where in type $$A$$, $$\theta: SL_n \to SL_n$$ is the map such that $$\theta(x)_{ij}$$ is the determinant of the submatrix of $$x$$ obtained from $$x$$ by deleting the $$i$$th row and $$j$$th column.

Let $$u=e$$ and $$v=w$$. Then $$G^{u,v}=B \cap B_-wB_- = T U^w$$ and $$\zeta_{e,w}: TU^w \to TU^{w^{-1}}$$.

I think that $$\eta: U^w \to U^w$$ is different from $$\zeta_{e,w}:TU^w \to TU^{w^{-1}}$$. What are the relation between these two maps? Thank you very much.

format: plain


text:
University of Hertfordshire

Radio constraints on dark matter annihilation in Canes Venatici I with LOFAR

Research output: Contribution to journalArticle

Documents

• Martin Vollmann
• Volker Heesen
• Timothy Shimwell
• Martin J. Hardcastle
• Marcus Brüggen
• Günter Sigl
• Huub Röttgering
Original language English Monthly Notices of the Royal Astronomical Society 26 Sep 2019 Submitted - 26 Sep 2019

Abstract

Dwarf galaxies are dark matter-dominated and therefore promising targets for the search for weakly interacting massive particles (WIMPs), which are well-known candidates for dark matter. Annihilation of WIMPs produce ultra-relativistic cosmic-ray electrons and positrons that emit synchrotron radiation in the presence of magnetic fields. For typical magnetic field strengths (few $\mu$G) and $\mathcal O$(GeV-TeV) WIMP masses (and thus typical electron energies of the same order) this emission peaks at hundreds of MHz. Here, we use the non-detection of 150-MHz radio continuum emission from the dwarf spheroidal galaxy `Canes Venatici I' with the LOw-Frequency ARray (LOFAR) to derive constraints on the annihilation cross section of WIMPs into primary electron-positron and other fundamental particle-antiparticle pairs. In this first-of-its-kind LOFAR study, we obtain new constraints on annihilating WIMP dark matter (DM). Using conservative estimates for the magnetic field strengths and diffusion coefficients, we obtain limits that are comparable with those by the Fermi Large Area Telescope (Fermi-LAT) using gamma-ray observations. Assuming s-wave annihilation and WIMPs making up 100% of the DM density, our limits exclude several thermal WIMP realisations in the $[2,20]$-GeV mass range. A more ambitious multi-wavelength and multi-target LOFAR study could improve these limits by a few orders of magnitude.

Notes

8 pages, 13 figures

ID: 17463245


text:
# Theorem style with name as argument

Is there some way to get a theorem type which will make a theorem with the name passed as a parameter? In other words, is there a way to define "named" such that

\begin{named}[NAME]
text
\end{named}

will print

"NAME: text"?

I tried using the definition \newtheorem*{named}{}, but that results in

"(NAME): text", which is quite different from what I am trying to do.

I know that I could also create a new instance of \newtheorem for each named theorem I want to use, but that is clunky and inconvenient. Is there a better way?

-

Here's one possible solution using thmtools as a front-end for amsthm:

\documentclass{article}
\usepackage{amsthm}
\usepackage{thmtools}
\usepackage{lipsum}

\declaretheoremstyle[
spaceabove=\topsep, spacebelow=\topsep,
notefont=\bfseries, notebraces={}{},
bodyfont=\normalfont\itshape,
name={\ignorespaces},
numbered=no,
{mystyle}
\declaretheorem[style=mystyle]{named}

\begin{document}

\begin{named}[NAME]
\lipsum[4]
\end{named}

\begin{named}[OTHERNAME]
\lipsum[4]
\end{named}

\end{document}

And without using thmtools, you can say something like:

\documentclass{article}
\usepackage{amsthm}
\usepackage{lipsum}

\makeatletter
\newtheoremstyle{mystyle}%
{\topsep}{\topsep}
{\itshape}{}
{\bfseries}{:}
{0.5em}
{\thmname{\@ifempty{#3}{#1}\@ifnotempty{#3}{\MakeUppercase{#3}}}}
\makeatother

\theoremstyle{mystyle}
\newtheorem*{named}{NAME}% here the second argument is the default name

\begin{document}

\begin{named}
\lipsum[4]
\end{named}

\begin{named}[Othername]
\lipsum[4]
\end{named}

\end{document}

With the second approach, you can set the default name for the structure in the second argument of \newtheorem*.

-
Thank you. This is precisely I was looking for. – yrudoy Aug 5 '12 at 17:37


text:
# How Is the Gaussian Kernel Related to the Euclidean Distance of the Neighborhoods in the Non Local Means Denoising Algorithm?

I am reading the paper A non-local algorithm for image denoising that describes the original non-local means algorithm. They define (p. 3 of the pdf) the distance between two square fixed neighbourhoods of two pixels as

\begin{align} \|v(\mathcal{N}_i) - v(\mathcal{N}_j) \|_{2, a}^2 \end{align}

where $$a> 0$$ is the standard deviation of the Guassian kernel. However, I don't understand this notation. How is the Gaussian kernel used in the formulation? How is it related to the Euclidean distance?

I would appreciate if someone more familiar with image processing and computer vision and all this notation can give me an explanation.

So we have 2 neighborhoods (Which are Matrices) $$v \left( {\mathcal{N}}_{i} \right)$$ and $$v \left( {\mathcal{N}}_{j} \right)$$. How could we calculate the distance between them?

One option would be the Euclidean Distance:

$${\left\| v \left( {\mathcal{N}}_{i} \right) - v \left( {\mathcal{N}}_{j} \right) \right\|}_{2}^{2} = \sum_{k} {\left( {v \left( {\mathcal{N}}_{i} \right)}_{k} - {v \left( {\mathcal{N}}_{j} \right)}_{k} \right)}^{2}$$

Yet this gives each pixel in the neighborhood window the same weight. The writes of the Non Local Means Denoising Algorithm thought it would be better to give the pixels near the center of the window higher weight.
They did it easily using by multiplying the difference window by a Gaussian Function and then summing. Something like:

$${\left\| v \left( {\mathcal{N}}_{i} \right) - v \left( {\mathcal{N}}_{j} \right) \right\|}_{2, a}^{2} = \sum_{k} {w}_{k} \left( a \right) {\left( {v \left( {\mathcal{N}}_{i} \right)}_{k} - {v \left( {\mathcal{N}}_{j} \right)}_{k} \right)}^{2}$$

Where $${w}_{k} \left( a \right)$$ is a weight based on a 2D Gaussian function with its center aligned to the center of the neighborhood window and its Standard Deviation is given by $$a$$.

### The Weight Function

In the classic Non Local Means implementation the Gaussian functions is used as weighing.

Assuming the $$v \left( \cdot \right)$$ operator is the Vectorization operator (Column Wise) then for a $$31 \times 31$$ window the following MATLAB code will define $${w}_{k} \left( \sigma \right)$$:

windowRadius    = 15;
kernelStd       = 3.5;

vK = exp(-((vX .^ 2) / (2 * kernelStd * kernelStd)));
vK = vK ./ sum(vK);
mW = vK.' * vK;
vW = mW(:);

figure();
surface(vX, vX, mW);

The weight function is given by:

Indeed centered pixels will have higher weight.

• If you put the definition of the Gaussian function in $w_k(a)$, I will accept this answer, which I think clarifies my doubt (that I had at the time) indeed. Anyway, why would you use such a notation to indicate that a Gaussian function is used to weight the distance? Even after all this time, I've never seen that notation anywhere else to indicate "weighting". – nbro Sep 22 at 15:20
• I think I tried to match the notations used by the inventor of the Non Local Means algorithm. I agree they are not wide spread. I will add the definition. – Royi Sep 22 at 16:13
• @nbro, I added the definition of the weighing function. – Royi Sep 22 at 16:27

So lets do it step by step:

Let us define $$k$$ as the norm on Gaussian Kernel with standard deviation $$a$$

$$k(i,j)=\|v(\mathcal{N}_i) - v(\mathcal{N}_j) \|_{2, a}^2$$

and the Gaussian kernel with the parameter $$a$$ is defined as:

$$G_a (x)= \frac{1}{4\pi a^2} e^{-\frac{\mid{x}\mid^2}{4a^2}}$$

And combining it you get:

$$k(i,j)=\frac{1}{4\pi a^2} e^{-\frac{\|v(\mathcal{N}_i) - v(\mathcal{N}_j) \|_{2}^2}{4a^2}}$$

So finally $$w$$ is defined as

$$w(i,j)=\frac{1}{Z(i)} e^{ -\frac{k(i,j)}{h^2} }$$

Coming back to your last question: "So, what is the difference between this exponential function that defines w and the Gaussian kernel? "

Difference is not the right question, $$w$$ depends on $$k$$ in a nested way as it is the argument of the exponential function.

So as mentioned in my comments, everything is in the article, take your time to read it focused. Write it down on paper and it will help you to structure your thoughts.

• You do not explain the only thing that I did not understand: what is the relation between the $a$ in the norm $k(i, j)$ and $G_a(x)$? How are they connected, in terms of formulas? – nbro Apr 10 '19 at 16:49
• I am surprised, first you don't know the definition, then you don't understand the relation between and so on and now you only don't understand the kernel. Have you ever considered to google "euclidean distance and gaussian kernel", nevertheless I edited my answer – Irreducible Apr 10 '19 at 16:57
• I knew the definition of the "kernel function" (from the paper), but I didn't know how the kernel function was related to the weights. This was my doubt since the beginning. So, are you saying that the subscript $a$ in the first definition of $k(i, j)$ means that that Euclidean distance is the input to the Gaussian kernel function? So, the weights will be defined as an exponential to an exponential?! I guess I will have to look at the definition of the Gaussian kernel function somewhere else, but this does not make any intuitive sense. Why would we do such a thing? – nbro Apr 10 '19 at 17:17
• I am not saying anything. I am just summarising the information of the paper for you. Besides that I wouldn’t be so fast to judge anything what I don’t understand. Once again take your time to understand it. Put some number in and see how it behaves. Nevertheless your main question is answered. For further question open a new post. But accept this one – Irreducible Apr 10 '19 at 17:27
• "I am just summarising the information of the paper for you", no, I could not have inferred what you wrote in your answer given my current knowledge of image processing, which is very limited. I couldn't understand that notation. You are not summarising anything. You have performed inference, not compression of information (summary). I will accept this answer once I understand that your answer is really correct, given that you don't want to explain it. – nbro Apr 10 '19 at 17:29


text:
Timezone: »

Poster
Counterfactual Off-Policy Evaluation with Gumbel-Max Structural Causal Models
Michael Oberst · David Sontag

Wed Jun 12 06:30 PM -- 09:00 PM (PDT) @ Pacific Ballroom #72

We introduce an off-policy evaluation procedure for highlighting episodes where applying a reinforcement learned (RL) policy is likely to have produced a substantially different outcome than the observed policy. In particular, we introduce a class of structural causal models (SCMs) for generating counterfactual trajectories in finite partially observable Markov Decision Processes (POMDPs). We see this as a useful procedure for off-policy debugging'' in high-risk settings (e.g., healthcare); by decomposing the expected difference in reward between the RL and observed policy into specific episodes, we can identify episodes where the counterfactual difference in reward is most dramatic. This in turn can be used to facilitate review of specific episodes by domain experts. We demonstrate the utility of this procedure with a synthetic environment of sepsis management.


text:
# Why can I see the whole moon during various non-full-moon phases?

Here's an image that describes the phenomenon I'm asking about. The very thin sliver to the left is of course the surface of the moon as lighted by the sun. But the rest of the moon is also faintly lighted -- by what?

I'm guessing that some amount of "earthshine" -- sunlight reflected from the earth -- is the culprit here, but I've found no authoritative confirmation online. It would be great to have a link to a source that explains what's really going on.

• "I've found no authoritative confirmation online". Pity indeed. Wikipedia even lacks the "citation needed", though Leonarda da Vinci is mentioned; tt'll be interesting to find that reference. – user51 Dec 3 '14 at 15:38
• @Evert Yes, but it is probably one of those very understandable "what word should I google"-cases. It is difficult today to find information about any what's-its-name topic. EDIT: Ah, damn, he does mention the keyword "earthshine", ouch... – LocalFluff Dec 3 '14 at 15:47
• Perhaps NASA is a more credible source (with further links at the bottom): [The Da Vinci Glow ](science.nasa.gov/science-news/science-at-nasa/2005/…). – user51 Dec 3 '14 at 15:50
• Yes, it was basically a case of not knowing what to google. And yep, it turns out "earthshine" is a great keyword for getting google results on this (e.g., "moon illuminated by earthshine" reveals much) Funny, I didn't think to use the term "earthshine" until writing this question here -- another case where merely asking the question is enough to point at the answer. – TwoMice Dec 3 '14 at 22:15

A global and absolutely calibrated albedo can be determined by measuring the amount of sunlight reflected from the Earth and, in turn, back to the Earth from the dark portion of the face of the Moon (the earthshine' orashen light'). For more than a decade we have been measuring the Earth’s large-scale reflectance from BBSO. The observations are now done remotely utilizing our earthshine coronagraph under the small dome appearing to the right of the NST dome in the Figure 1. To get full coverage of the Earth, we have installed a carefully calibrated copy of the BBSO earthshine telescope in Tenerife


text:
# How to make kpse.find_file aware of \input@path modifications?

I'm working on a \graphicspath like feature for GregorioTeX and having some problems making \input@path work with our Lua code. Basically, while \input@path works for \input statements, before we input the file our Lua code first locates the file using kpse.find_file so that it can be checked to see if it is up to date (and regenerate it from the appropriate source file if not). The problem is that kpse.find_file does not seem to be aware of the definition of \input@path.

So my question is what do I need to do to pass the definition of \input@path over to Lua so that kpse.find_file will search those additional paths for the file it's looking for? Alternatively, is there another way of locating the file in the Lua code that is aware of \input@path?

Since this involves accessing multiple files, I've posted my MWE as a zip file with the appropriate directory structure.

• The kpse environment variables (in your case TEXINPUTS, probably), are set up when luatex is started. I'm not sure whether the Lua kpse library can change the values on the fly. – egreg Jun 6 '19 at 15:05

\input@path is a very trivial system it just loops over the list until it finds something so if the list is aa/,bb/,cc/ and you are looking for file.foo then you want to do

kpse.find_file ("file.foo") or
kpse.find_file ("aaa/" .. "file.foo") or
kpse.find_file ("bbb/" .. "file.foo") or
kpse.find_file ("ccc/" .. "file.foo")

so all you need to do is pass in \input@path split it up to a Lua table then iterate through the table until you find the file

So... if the subdirectory zzz has a file test.foo we can find it using TeX or Lua via:

\documentclass{article}

\makeatletter
\def\input@path{{aaa/}{zzz/}}
\def\maketabl#1{\ifx\relax#1\else,"#1"\expandafter\maketabl\fi}
\directlua{
input_path = {""\expandafter\maketabl\input@path\relax}
}

\begin{document}

\IfFileExists{test.foo}{\typeout{FILE is \@filef@und\space (TeX)}}

\directlua{
f="test.foo"
%
for i,k in pairs(input_path) do
fp=kpse.find_file(k .. f)
if (fp) then
print("FILE is " .. fp .. " (Lua)")
break
end
end
}

\end{document}

which makes the terminal output

FILE is zzz/test.foo  (TeX)
FILE is ./zzz/test.foo (Lua)

• the number of z are back to normal ... – Ulrike Fischer Jun 6 '19 at 16:19
• @UlrikeFischer one day I'll buy you a UK keyboard, then you too will be able to find z. – David Carlisle Jun 6 '19 at 16:20
• but I wouldn't dare to use them, they are yours ;-) – Ulrike Fischer Jun 6 '19 at 16:22


text:
# HostName = ComputerName? I Am Wrong!

Contents

Is there any different between the result of “Hostname” & “$env:ComputerName” ? Before Windows Server 2016, I was thinking that they are not the same is because of following: • hostname is a exe wrapper from MS, it returns full computer name, even it’s more than 15 characters. •$env:computername is a var in PowerShell, it returns NetBIOSComputername which is limited in 15 characters

But today, I’m so wrong….

Environment:

• Container Host: Docker01-Gui
• Container name: < Random >

By using following command:

  1 2 3 4 5 6 7 8 9 10  Write-Host '$env:computername:'$env:computername $hostname = hostname Write-Host 'hostname.exe:'$hostname $w32compsys = Get-WMIObject Win32_ComputerSystem | Select-Object -ExpandProperty name Write-Host 'Get-WMIObject Win32_ComputerSystem | Select-Object -ExpandProperty name:'$w32compsys Write-Host '(Get-CIMInstance CIM_ComputerSystem).Name:' (Get-CIMInstance CIM_ComputerSystem).Name $machinename = [system.environment]::MachineName Write-Host '[system.environment]::MachineName:'$machinename $dnsname = [System.Net.Dns]::GetHostName() Write-Host '[System.Net.Dns]::GetHostName():'$dnsname

We got result in Container Host:

 1 2 3 4 5 6  $env:computername: DOCKER01-GUI hostname.exe: Docker01-Gui Get-WMIObject Win32_ComputerSystem | Select-Object -ExpandProperty name: DOCKER01-GUI (Get-CIMInstance CIM_ComputerSystem).Name: DOCKER01-GUI [system.environment]::MachineName: DOCKER01-GUI [System.Net.Dns]::GetHostName(): Docker01-Gui  We got result in Container itself:  1 2 3 4 5 6  $env:computername: WIN-E2ABUUD2V1V hostname.exe: Docker01-Gui Get-WMIObject Win32_ComputerSystem | Select-Object -ExpandProperty name: WIN-E2ABUUD2V1V (Get-CIMInstance CIM_ComputerSystem).Name: WIN-E2ABUUD2V1V [system.environment]::MachineName: WIN-E2ABUUD2V1V [System.Net.Dns]::GetHostName(): Docker01-Gui

As we can see above, “hostname.exe” and “[System.Net.Dns]::GetHostName()” are returning Container Host’name which is not the real value I think it should be…

I’m not sure if this is the expected value or a bug, but anyway, I’m going to use \$env:computername to retrieve the local logic physic host in the future.


text:
# How to calculate $T_{00}$ of the energy-momentum tensor?

I know the the energy momentum tensor $T^{uv}$ and $T^{00}$ stands for the energy density. But what about $T_{00}$? I think that for the metric tensor $g_{ij}$, $T_{00}=g_{0i}T^{ij}g_{0j}$ holds. Then, what is the meaning of $T_{00}$? It seems that $T_{00}$ is supposed to be a energy density just like $T^{00}$. But, the relation $T_{00}=g_{0i}T^{ij}g_{0j}$ mixes up everything, so I am totally stuck at figuring out what $T_{00}$ really means...Could anyone please help me?

• $T_{\mu\nu} = T^{\alpha\beta}g_{\alpha\mu} g_{\beta\nu}$ – John Rennie Feb 4 '18 at 8:58
• Then how can I determine that $T_{00}$ is just an energy density? – Keith Feb 4 '18 at 9:02
• $T^{00}$ is only the energy density in flat spacetime (or I suppose if you're using the Fermi normal coordinates) and in that case $T^{00}=T_{00}$. – John Rennie Feb 4 '18 at 9:26

You cannot select out components of a tensor a call them energy or something else. That is the point of general covariance. For instance if one has a four moment $p_\mu$ then the energy seen by an observer with four velocity $u^\mu$ is the Lorentz scalar $p.u$.
So what you want to ask is what is the energy density seen by an observer with four velocity $u$ on a spacelike infinitesimal volume $dS_\mu$. Well it's simply the scalar
$$\rho=u.T.dS$$


text:
# Weighted regression

Our example uses simulated data.

# similar to example in Chapter 1 of Venables and Ripley (2002)
options(digits = 3)
set.seed(357)

x <- seq(1, 20, by = 0.5)
sqrtw <- 1/x # std dev of y will be proportional to 1/sqrtw, i.e. proportional to x
y <- x + rnorm(x)/sqrtw
simdata <- data.frame(x, y, sqrtw)
rm(x, y, sqrtw)
head(simdata)
##     x      y sqrtw
## 1 1.0 -0.241 1.000
## 2 1.5  0.625 0.667
## 3 2.0  2.789 0.500
## 4 2.5  6.261 0.400
## 5 3.0  5.300 0.333
## 6 3.5  4.611 0.286
plot(y ~ x, data = simdata)
abline(0, 1) # true line

We can fit an unweighted regression. We can also fit a weighted regression.

fm <- lm(y ~ x, data = simdata) # unweighted model fitted, even though variances are not equal
fm1 <- lm(y ~ x, data = simdata, weight = sqrtw^2) # weighted regression
par(mfrow=c(1, 2))
plot(rstudent(fm) ~ fitted(fm), main = "unweighted regression",
xlab = "Fitted values", ylab = "Studentised residuals")
plot(rstudent(fm1) ~ fitted(fm1), main = "weighted regression",
xlab = "Fitted values", ylab = "Studentised residuals")

Above left: in the unweighted regression the studentised residuals clearly do not have constant variance, the variance is clearly increasing with the fitted value.

Above right: the weighted regression fixes the problem.

The weighted regression has fitted values $$\widehat{y}' = X'\widehat{\beta} = W^{1/2}X\widehat{\beta}$$ so the weighted residuals $$e' = y'-\widehat{y}' = W^{1/2}(y-X\widehat{\beta})$$ have variance matrix $$\sigma^2(I-H)$$ with $$H = W^{1/2} X(X^TWX)^{-1} X^TW^{1/2}$$. When we make a weighted regression, the $$\widehat\beta$$ above determines the fitted values in both weighted and unweighted coordinate systems. R returns the fitted values $$\widehat{y} = X\widehat\beta$$ and residuals $$e = (y-X\widehat\beta)$$ in the unweighted coordinates rather than $$\widehat{y}'$$ and $$e'$$. However, the standardised and studentised residuals are the same in the two coordinate systems. We plot the studentised residuals $$r'(e)$$ against the fitted values $$\widehat y$$ since they have the same diagnostic properties (independence and unit variance) as plotting $$r'(e')$$ against $$\widehat y'$$.

par(mfrow=c(1, 2))
qqnorm(rstudent(fm), main = "Q-Q Plot: unweighted regression")
qqline(rstudent(fm))
qqnorm(rstudent(fm1), main = "Q-Q Plot: weighted regression")
qqline(rstudent(fm1))

The heteroscedasticity (i.e. non-constant variance) appears to show up as non-normality in the left-hand Q-Q plot.

The weighted regression line (the green line below) should usually be the better estimate.

plot(y ~ x, data = simdata)
abline(0, 1) # true line, black
abline(fm, col = 2) # unweighted regression line, red
abline(fm1, col = 3) # weighted regression line, green
legend("topleft", c("true", "unweighted", "weighted"), lty = 1, col = 1:3)


text:
# User Input buffer

Discussion in 'CRM / Helpdesk / App Integration' started by millsey, Sep 17, 2012.

Not open for further replies.
1. ### millsey New Member

Joined:
Dec 21, 2011
Messages:
187
0
When using User Input, if we have a prompt with Allow Barge set to FALSE, any digits pressed during the prompt are stored and input as soon as the prompt finishes. Is there a way to clear the buffer as soon as the prompt finishes playing?

Thanks

Brian

#1

Joined:
Aug 6, 2009
Messages:
690
0
Hi Brian,

Not 100% sure, but something you could try is playing your non-interruptable prompt using a Prompt Playback component, and then continue with a User Input component. That way the prompt will be played outside the "field" element of the generated voicexml, and then as per the VoiceXML recommendation, the buffer should be cleared.

Please, give it a try and let me know.

The other option that comes to my mind would be manually changing the generated voicexml script, but that will be more difficult, and also you would have to do it after each build...

Regards,

#2
3. ### millsey New Member

Joined:
Dec 21, 2011
Messages:
187
0
I was wondering why this was nto working and came back to this discussion.

I have a userinput to ask if the caller knows their number, then press 1, I then have prompt playback followed by a second input ( if user has pressed one).

The input buffer is not cleared when the system progresses from the prompt playback to the user input. So if the user starts pressing buttons during the prompt, those buttons are added to the input.

Clearly this is a fault, I am looking for a workaround which does nto involve splitting the whole flow down into lots of little components.

Millsey

#3
4. ### millsey New Member

Joined:
Dec 21, 2011
Messages:
187
0
BUMP

Any way to clear the buffer? Even if I have to modify the XML files to add an instruction I will do this as we have a lot of people who start dialling early whilst the spoken instructions are being read out. Is there any hacky way to fix this e.g. put another component inbetween the prompt playback and the digit clollection?

Brian

#4

Joined:
Aug 6, 2009
Messages:
690
0
Hi Brian,

Try changing the prompt elements by adding the bargein attribute and setting it to false. For example, instead of:
<prompt count="1">

use this:
<prompt bargein="false" count="1">

As far as I know, the prompt should take the value from the bargein property, so maybe this change doesn't affect the behavior, but you could give it a try.

This is the Voice XML recommendation, you may find useful information there:
http://www.w3.org/TR/voicexml20/

#5
6. ### millsey New Member

Joined:
Dec 21, 2011
Messages:
187
0
Thanks, will try that tomorrow.

Millsey

#6
7. ### millsey New Member

Joined:
Dec 21, 2011
Messages:
187
0
Actually that causes the flow to fail.

<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.0" application="Root_SelfServe2.vxml">
<catch event="error.semantic">
<assign name="project$_CurrentErrorName$" expr="_event" />
<assign name="project$_CurrentErrorDescription$" expr="(_message == undefined ? '' : _message)" />
<goto next="SelfServe2_ErrorHandler.vxml" />
</catch>
<error>
<assign name="project$_CurrentErrorName$" expr="_event" />
<goto next="SelfServe2_ErrorHandler.vxml" />
</error>
<catch event="connection.disconnect telephone.disconnect">
<goto next="SelfServe2_DisconnectHandler.vxml" />
</catch>
<var name="application.SelfServe2_inputref_Result" expr="''" />
<var name="application.SelfServe2_inputref_Buffer" expr="''" />
<form id="userinput">
<property name="bargein" value="false" />
<property name="timeout" value="5s" />
<property name="interdigittimeout" value="5s" />
<property name="termtimeout" value="5s" />
<property name="termchar" value="#" />
<field name="userinput">
<grammar>[0|1|2|3|4|5|6|7|8|9|*]{7-13}</grammar>
<prompt count="2">
<audio src="file:///C:\ProgramData\3CX\Data\Http\Interface\ivr\SelfServe2_13\cant_find_ref_2.wav" />
<audio src="file:///C:\ProgramData\3CX\Data\Http\Interface\ivr\SelfServe2_13\dial_in_ref_2.wav" />
</prompt>
<catch event="nomatch noinput" count="3">
<assign name="SelfServe2_inputref_Result" expr="(_event == 'noinput' ? UserInputResult_Timeout : UserInputResult_InvalidDigits)" />
<assign name="SelfServe2_inputref_Buffer" expr="(application.lastresult$== undefined ? '' : application.lastresult$.utterance)" />
<goto next="SelfServe2_MF_inputref_Invalid_Input.vxml" />
</catch>
<nomatch count="1">
<prompt>
<audio src="file:///C:\ProgramData\3CX\Data\Http\Interface\ivr\SelfServe2_13\ref_number_not_found-010912.wav" />
</prompt>
<reprompt />
</nomatch>
<filled>
<assign name="SelfServe2_inputref_Result" expr="UserInputResult_ValidDigits" />
<assign name="SelfServe2_inputref_Buffer" expr="(application.lastresult$== undefined ? '' : application.lastresult$.utterance)" />
<goto next="SelfServe2_MF_inputref_Valid_Input.vxml" />
</filled>
</field>
</form>
</vxml>

Changing the <prompt count="2"> to <prompt bargein="false" count="2"> causes the input to repeat then cut the caller off.

I can see the variables for the buffer being set to blank, but the resultant output of this component contains anything dialled during the immediately previous prompt (which has bargein set to false) plus anything dialled during this input collection.

The imediately previous prompt is:

<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.0" application="Root_SelfServe2.vxml">
<catch event="error.semantic">
<assign name="project$_CurrentErrorName$" expr="_event" />
<assign name="project$_CurrentErrorDescription$" expr="(_message == undefined ? '' : _message)" />
<goto next="SelfServe2_ErrorHandler.vxml" />
</catch>
<error>
<assign name="project$_CurrentErrorName$" expr="_event" />
<goto next="SelfServe2_ErrorHandler.vxml" />
</error>
<catch event="connection.disconnect telephone.disconnect">
<goto next="SelfServe2_DisconnectHandler.vxml" />
</catch>
<form id="play">
<block>
<prompt bargein="false">
<audio src="file:///C:\ProgramData\3CX\Data\Http\Interface\ivr\SelfServe2_13\dial_in_ref_2.wav" />
</prompt>
<goto next="SelfServe2_MF_inputref.vxml" />
</block>
</form>
</vxml>

#7

Joined:
Aug 6, 2009
Messages:
690
0
So, if I understood it well, the problem are the digits entered during the previous prompt and not during the user input execution, right?

Something to try could be adding a <clear/> element between the prompt and the goto elements, so variables used into the form are cleared. I'm not sure if the buffer counts as a variable or not, but it's something to try. This is how the previous file should be:

The Voice XML specification states that if the prompt is configured with bargein="false" then the buffer should be automatically cleared after it transitions to the next document, and that is not happening, so maybe this is a bug in the implementation...

Please, give it a try and let me know.

Regards,

#8
9. ### millsey New Member

Joined:
Dec 21, 2011
Messages:
187
0
So, if I understood it well, the problem are the digits entered during the previous prompt and not during the user input execution, right?

-- Sort of. ALL digits dialled during but the previous prompt and the user input are collected together.

The addition of the <clear/> in the position you showed me did not work, it made no difference.

Millsey

#9

Joined:
Aug 6, 2009
Messages:
690
0
Well, it seems to be a problem in the underlying VoiceXML interpreter.

Is there a good reason why you need to avoid the bargin? Users usually learn to use the IVR and want to go quickly to the part they want, so they enter DTMF digits before the prompt is completed. If you really need to do this, then the only solution I can imagine is splitting the callflow in parts, and transfer the call from one callflow to another. This way each part is a different call, and then 100% sure the buffer will be cleared. But if you do this, you need to store the state that you need to persist into a database or something like that, because variables are reset between calls.

#10
11. ### millsey New Member

Joined:
Dec 21, 2011
Messages:
187
0
The reference number we are asking for is of the format 123456m3 and 123456FUN3 and 123456w1 and some F123456789 so we have to tell the caller to dial a star for any letters then press hash to finish. Otherwise we get all sorts of freestyle dialling which would prevent us from looking up the reference in a database.

Our announce is "PDial in your reference number replacing any letters with a star, then press hash"

What we get is people starting to dial, then they redial the digits from the start so instead of 123456*3 we get 123123456*3

The obvious fix is to clear the buffer as soon as we are listening.

THe only thing I can think of is because we haev a prompt before the user input, we don't have an initial prompt within the user input, could that make a difference?

#11

Joined:
Aug 6, 2009
Messages:
690
0
An initial prompt could make the difference, because the generated VoiceXML puts all the prompts into the same form. Please try changing that and let me know.

Anyway, for experienced users, it could be a bit annoying to be forced to wait until the prompt ends, if they already know the format to use...

#12
13. ### millsey New Member

Joined:
Dec 21, 2011
Messages:
187
0
I have added an initial prompt (a beep) and it did not fix the issue. I haev found another problem also, and will open a seperate thread for that one.

#13
14. ### millsey New Member

Joined:
Dec 21, 2011
Messages:
187
0
If I split the flow up, should I use components within a single flow or should I transfer to another flow?

Im thinking that if I play the advice in a flow then transfer to another flow, it will have a clear buffer, but will it be quick enough to be seamless for the user? I dont want it to delay receiving the digits or for the caller to hear momentary Music..

#14


text:
Limited access

In a recent poll of high school students, only $20\%$ of the students said that they did not vote if the school should change the lunch menu. However, a vote count showed that $55\%$ of the student body did not vote if the school should change the lunch menu.

Which of the following types of bias is most likely to have occurred in the poll?

A

Undercoverage bias.

B

Sampling bias.

C

Selection bias.

D

Non-response bias.

E

Response bias.

Select an assignment template


text:
# Algebraic Geometry II

###### David Mumford and Tadao Oda
Publisher:
Hindustan Book Agency
Publication Date:
2015
Number of Pages:
516
Format:
Hardcover
Series:
Texts and Reading in Mathematics 73
Price:
76.00
ISBN:
9789380250809
Category:
Textbook
[Reviewed by
Fernando Q. Gouvêa
, on
01/30/2017
]

Here is a book with an interesting history. David Mumford published Algebraic Geometry I: Complex Projective Varieties in 1976. In the introduction to that book, he explained that he had

… found it impractical to teach classical geometry and schemes at the same time. Therefore, the present volume, which is the first of several, introduces only complex projective varieties […] The next volume will deal with schemes, including cohomology of coherent sheaves on them and applications…

Soon after, however, Mumford’s mathematical interests changed, and there seemed to be no chance that those “several” volumes would ever appear. Springer later published The Red Book of Varieties and Schemes, based on older course notes that had circulated for years among students at Harvard.

In graduate school in the 1980s, I took “Algebraic Geometry I” with Joseph Harris. His approach followed Mumford’s lead in the sense that he too started with complex varieties. Harris later published Algebraic Geometry: A First Course (Springer GTM, 1992), giving his own take on this material. It turned out, however, that no one was scheduled to teach “Algebraic Geometry II” the following semester, so a group of graduate students persuaded David Mumford to oversee a reading course based on his existing notes for the course he had taught at Harvard before. This is how I ended up in possession of an early version of the book under review. The notes (I still have them!) cover about two-thirds of the material in the final book.

Many years later, Tadao Oda asked me and several others for copies of those lecture notes. He then worked with Mumford to finish the book. That is what we have here.

What is it like? One should first recall that Algebraic Geometry I is very much a graduate text, a terse book that covers a lot of classical algebraic geometry in less than 200 pages. (Harris’s book is 330 pages, and Shafarevich’s Basic Algebraic Geometry I, in the same spirit, is 310.) That has not changed here: we get a detailed but terse account of scheme-theoretic algebraic geometry.

The book is well written (as one would expect from Mumford) and insightful. I applaud the inclusion of a (short) chapter on group schemes, something not often found in other introductory texts. I also really like the chapter on the cohomology of coherent sheaves, which includes four sections on how one actually computes cohomology. There is also a rather useful discussion of the Leray spectral sequence.

To complete the book, Oda has added sections and has also included many notes and remarks. In particular, there is a new proof of the Riemann-Toch theorem due to John Tate, an account of Belyi’s three-point theorem written by Carlos Simpson and a section by Shigefumi Mori on his existence theorem for rational curves. These additions enrich and improve the book. Mori has marked them all as “added in publication”, a curious signal intended to tell us that Mumford is not responsible for those portions of the book.

There are some minor problems, however, when it comes to integrating the new material into the old. The first example appears on page 27. At the top of the page, Mumford gives the definition of a coherent sheaf. There follows:

Remark. (Added in publication) Although the notion of “locally of finite presentation” coincides with that of “coherent” for X locally Noetherian, the standard definition of the latter is slightly different for general X…

The (now?) standard definition follows. Two problems arise. The first issue (certainly minor) is that the reader gets no signal of when the “remark” ends. More seriously, however, how is the reader to know which definition is in use? There is a footnote that perhaps would help, telling us that coherent sheaves “will be used only on Noetherian X’s except in §4.4.” (The note, but not the exception clause, is from Mumford’s original notes.) This tells us that we need not worry except in that section… but a quick look at section 4.4 does not immediately reveal where non-Noetherian schemes are used. The effect is to leave the non-expert reader confused.

Something similar happens in section 1.8, also “added in publication.” The issue here is to discuss Grothendieck’s “functorial” approach, in which we want to understand schemes via their point functors. Mumford’s notes mention this in section 1.6, so updating the discussion is certainly relevant. It is cast at a high level, however, with references to all sorts of ideas and constructions that have not yet appeared in the book. Again this is fine for the expert, but it makes the book less useful as a textbook and especially for self-study.

Overall, however, the book’s brilliant exposition and savvy choice of topics far outweighs these inconveniences. Algebraic Geometry II is not an easy book, but working through it will provide a good base from which to proceed into research in algebraic geometry.

Fernando Q. Gouvêa is Carter Professor of Mathematics at Colby College.

Preface

1. Schemes and sheaves: definitions

1.1. $\mathrm{Spec}(R)$

1.2. $\tilde{M}$

1.3. Schemes

1.4. Products

1.5. Quasi-coherent sheaves

1.6. The functor of points

1.7. Relativization

1.8. Defining schemes as functors

Appendix: Theory of sheaves

2. Exploring the world of schemes

2.1. Classical varieties as schemes

2.2. The properties: reduced, irreducible and finite type

2.3. Closed subschemes and primary decompositions

2.4. Separated schemes

2.5. $\mathrm{Proj} R$

2.6. Proper morphisms

3. Elementary global study of $\mathrm{Proj} R$

3.1. Invertible sheaves and twists

3.2. The functor of $\mathrm{Proj} R$

3.3. Blow ups

3.4. Quasi-coherent sheaves on $\mathrm{Proj} R$

3.5. Ample invertible sheaves

3.6. Invertible sheaves via cocycles, divisors, line bundles

4. Ground fields and base rings

4.1. Kronecker’s big picture

4.2. Galois theory and schemes

4.3. The Frobenius morphism

4.4. Flatness and specialization

4.5. Dimension of fibres of a morphism

4.6. Hensel’s lemma

5. Singular vs. non-singular

5.1. Regularity

5.2. Kähler differential

5.3. Smooth morphisms

5.4. Criteria for smoothness

5.5. Normality

5.6. Zariski’s Main Theorem

5.7. Multiplicities following Weil

6. Group schemes and applications

6.1. Group schemes

6.2. Lang’s theorems over finite fields

7. The cohomology of coherent sheaves

7.1. Basic Čech cohomology

7.2. The case of schemes: Serre’s theorem

7.3. Higher direct images and Leray’s spectral sequence

7.4. Computing cohomology (1): Push $\mathcal{F}$ into a huge acyclic sheaf

7.5. Computing cohomology (2): Directly via the Čech complex

7.6. Computing cohomology (3): Generate $\mathcal{F}$ by “known” sheaves

7.7. Computing cohomology (4): Push $\mathcal{F}$ into a coherent acyclic sheaf

7.8. Serre’s criterion for ampleness

7.9. Functorial properties of ampleness

7.10. The Euler characteristic

7.11. Intersection numbers

7.12. The criterion of Nakai-Moishezon

8. Applications of cohomology

8.1. The Riemann-Roch theorem

Appendix: Residues of differentials on curves

8.2. Comparison of algebraic with analytic cohomology

8.3. De Rham cohomology

8.4. Characteristic p phenomena

8.5. Deformation theory

9. Two deeper results

9.1. Mori’s existence theorem of rational curves

9.2. Belyi’s three point theorem

References

Index


text:
Time to call the bluff [closed]

You are located outside of two rooms which have a door between them. Each room has one or more computers whose total power is unknown, so they cannot be reliably used as proof-of-work to compare times, however they are not strong enough to break cryptographic secrets. You cannot see who is in the rooms.

There are only two options:

1. there are two different people in the rooms: in each room there is a different, honest person who stays in their room, or

2. there is one dishonest person who pretends to be two different people, by moving between the rooms.

You and the person in each room can verbally communicate with each other only through a computer network. You can also send stuff back and forth between you and the rooms, e.g. cards, balls — in order to find out if these are two different people or one person who pretends to be two. However there is a random delay of up to one minute in all methods of communication due to limits of the communication infrastructure.

The people in the rooms can communicate with each other through you, assuming they are two different people.

However, you cannot do anything that would reveal the actual identity of a person, e.g. check their DNA, take their fingerprints, take their photo, collect a sample of their handwriting, ask to see their ID card, listen to their voice, etc.

What strategy would you devise in order to make the dishonest person reveal their pretension, if indeed there is only one person in the rooms?

P.S. It's always possible to send to each room a different secret number, and if a person can tell me both numbers, then they have proven that they have access to both rooms. However to achieve this, I will probably have to reward the dishonest person e.g. by paying them, or by threatening to punish honest people who cannot prove having access to both rooms. Which is exactly the opposite of what a good solution would achieve. A good solution would make a dishonest person expose their pretension without punishing (or punishing too severely) honest people.

• Is there a reason why you call these person(s) honest or dishonest? I ask to make sure this is not another one liar and one truth-teller riddle. – Abbas Sep 3 '19 at 11:20
• @Abbas In each of the two cases, the occupants of the rooms would claim that they are two different people. In the 2nd case it would be a lie. – rapt Sep 3 '19 at 11:29
• same principle applies I think. – Abbas Sep 3 '19 at 11:39
• what about rot13(Jbhyq lbh fnl lrf vs V nfxrq lbh, ner gurer gjb crbcyr va gur ebbz?) – Abbas Sep 3 '19 at 11:52
• @Adam This tag covers several other concepts. The dishonest person in my question is a spy, if I understand the term correctly. They may lie if they think it would help hide their secret. – rapt Sep 3 '19 at 12:09

All you have to do is preoccupy both sides using a method which cannot be abused by the dishonest person. For example any of these will do:
1. Hand both sides a woodwind instrument and tell them both to use it at the same time.
2. Send them both a locked container which contains a code word which they can only unlock by keeping all of their limbs on the container for an extended amount of time.
3. Send a device to each side that contains a code word and will only open when a button on it is held for an extended amount of time. The devices are set so that they will (for example) explode if they come within a certain proximity of each other.
4. You can give both sides a bottle which can only be drained if drunk. They must drink from it and give it back. You can check for tampering or if the bottle wasn't drained after you are handed it back. One of the bottles contain water; the other contains strong sleeping medication. Simply speak to both rooms afterwards, it will be very straightforward to figure out!
5. Give a typical and unique construction task to both rooms and time them. If they take longer than the average person then you should start to suspect it is the same person.
6. Have both sides read a long (never been released) book in a short amount of time and then ask about specific details of the books. Maybe the books chosen are such that someone who reads both of them fast will confuse the details which is another technicality on top of just reading the content.
7. Give both rooms a large cipher to decrypt.

• Your several variations of proof of work are interesting but possible to circumvent. Idea #4 (poison) is good, but it can be a sleep medication instead. How would you adjust it to my updated question, i.e. computer network communication, where people are not supposed to be knocked out? – rapt Sep 3 '19 at 11:14
• @rapt if I understand the scenario correctly, a delay in communication - with the communication through computer makes this question unsolvable without resorting to psychology. P.s. the methods I listed are all way more complicated to pull off in practice however I summarised them to be sufficient examples. – Adam Sep 3 '19 at 11:33
• @Adam the delay is only up to one minute, so most of your solutions are still fine. – OrangeDog Sep 4 '19 at 14:53

You could:

send one side a leaky propane tank and, after a little bit of messaging, send the other side a lit match. If it is the same person walking between both rooms, the gas will spread to the other side.

Or more humanely:

Send one side a strong smelling compound. Ask the other side to send back a sample of clothing. Use a trained dog to detect if the compound is on the clothing.

• How would the first method show if there are two people or one? The person does not need to carry the thing around? – infinitezero Sep 4 '19 at 11:44
• The second solution works well. Send them a box rigged to spray the smelly compound when opened. Ask them to open it to see what's inside. Then ask the other room to send you the shirt they're wearing – Stephen R Sep 4 '19 at 14:41
• Clarification: Send one of them the smelly stuff. Ask the other one for their shirt. – Stephen R Sep 4 '19 at 14:57

I may:

Preparing a rope with enough length, and put each end to each room. Then I'll also send each room a clock, and same note written "Pull the rope at XX:XX". If the rope could be pulled at same time, 2 individuals in separate room is proved. If only 1 end is pulled or nothing happened, maybe just 1 dishonest guy in the connected rooms.

Notes: This solution stands only when someone is impossible to stay in the middle door and could reach both rope ends with both hands, due to the distance between the entries to put/send stuffs is not mentioned.

Improved:

Maybe more simple.

Just send in same clocks and same notes written: "Show me your left(or right) hand(or foot) at XX:XX". If I could see same hands(or foots) at same time via the put/send stuff entries, then it's true that 2 individuals in separate rooms, else only 1 dishonest guy in connected rooms.

• What if there is no way to communicate between me and the person other than sending notes/stuff back and forth, and there is some random delay due to the communication infrastructure (in other words, imagine we communicate through a computer network)? – rapt Sep 3 '19 at 9:35
• Hmm, that should be a totally different question compared to the original one. If that, something authentication concept in IT may help, like public/private key or digital signature, to identify whom is the real guy to contact or just someone pretended. – Conifers Sep 3 '19 at 9:47
• A dishonest person may get two different sets of keys. Your task is through a clever communication find out if they are one person or two. – rapt Sep 3 '19 at 10:21
• Then you might to have modify your question or ask a new one, due to all of the answers should works, through common sense, simple logical deduction or physic property. Anyway, time to think more deeper :D – Conifers Sep 3 '19 at 10:30
• I have updated the question. It's hard to keep it simple and accurate at the same time. I hope this time around I did not miss anything. – rapt Sep 3 '19 at 10:54

This may be cruel yet very effective.

ask them to donate 1.5L of blood each. If it's a single person, they will have to donate 3L of blood, which will be fatal. Either person will confess to you, or you'll realise, once they stop responding.

• This would identify the person. – Veedrac Sep 4 '19 at 1:06
• How would this identify the person? – infinitezero Sep 4 '19 at 7:48
• Eg. the DNA in the blood. – Veedrac Sep 4 '19 at 18:01
• "check their DNA", if I collect it, I don't check it. – infinitezero Sep 4 '19 at 18:05

I claim that, under a stricter interpretation of the problem, the solution is

not possible.

Although the question is tagged I'm going to treat it as an problem, which means ignoring everything except the messages passed between rooms. I'll assume that the participants, either the two honest parties or the single malicious party, have bounded but unknown computational power, i.e. they are limited to solving polynomial-time problems and that we cannot use proof-of-work.

Under this model the question becomes, is it possible to distinguish between a single Turing machine from a pair of Turing machines? The answer is

no. Whatever programs run on the pair of Turing machines could be simulated by a single two-tape Turing machine, which can itself be simulated by an ordinary Turing machine with at most a quadratic slowdown.

This result is slightly stronger than needed, since we did not have to specify any restrictions on the messages being passed or the computations being run. The argument is also extendable to cover stronger computational models, like nondeterministic or probabilistic Turing machines, oracle machines, etc.

What all this means is that a real answer to the question as originally formulated will need to use

, like relying on the human nature of the participant(s)

I think the best way to come up with an answer to this question is to look at this backwards - instead of thinking of ways to reveal if there is one person or two, think of how you would try to keep your secret if you were the one in the rooms.

To start with, I would make sure that all my interactions were carefully recorded so that I wouldn't unintentionally use information I'd received from the wrong room. If the computer doesn't support reviewing messages received, I'd have a notepad in each room on which I'd write down all the information I was given while in that room. I'd also have a box in which to put any objects I'd been given, so that I wouldn't unintentionally give back an object to the wrong room. Being a well-trained spy, you can be certain that I would never slip up and reveal myself through information or objects received from the room that I wasn't currently in.

The random delay in communication certainly helps with this - I could consistently wait longer than necessary to reply to messages and to pick up or return objects. This would give me time to review whatever notes I needed in order to maintain the deception.

Now then, how would I uncover a spy like this? If I sent them anything to eat or drink, the spy would wisely say "I'm sorry, I'm not allowed to eat or drink anything that's been sent to me" and return the item to me. I could try to trip them up on the communications delay by sending them an item that can detect when it has been handled - after it has been returned to me I would be able to see when they first touched it, and when they last touched it, and check if it matches the communication delays that they have been claiming. However, if the spy maintains proper discipline and waits a while to even touch objects, this method still won't work.

I can only think of one way to guarantee that you can determine if there is one person or two (two if you're allowed to kill someone):

Determine what information the spy is trying to get, and send it to them encrypted with a nonce, and send that nonce to the other room. When a nonce is generated in a crytographically secure manner and only used once, it is a perfect form of encryption that cannot be broken by any amount of computational power. The only trick here is that you need to obtain some information that is important enough to the spy that they will be willing to reveal themself.

• 1. "only used once" - you mean only once for encryption (not necessarily for decryption)? 2. the simplest info is such that would stop something that would make life too difficult for a person who claims to be honest (i.e. who claims to stay in only one room), e.g. some code to prevent shutting the power off in the room of each honest person; however that goes against the principle of not punishing honest people. In that case instead of fancy encryption, just send each room a number, if a person knows both #s, I won't shut their power off. Any way to get the truth without punishing good guys? – rapt Sep 3 '19 at 21:46
• If there are two people, nothing stops them communicating with each other. – OrangeDog Sep 4 '19 at 15:00

Here is another possible solution
First, a simple one, then one that could deal with a more suspicious person.

What we need:

For example 1: A two-component poison, that is not deadly when taking only one component.
There are several real-world examples of these, including deadly drug combinations, or components of an euthanasia cocktail.
For example 2: The same poison, and a healthy dose of bluff and some patience.

This is our plan (simple version):

Our test subjects will have to eat at some point.
-Put one part of the two-component poison in each of their meals, without informing them.
-If there is only one person, their will not survive the poison combination.

If we are dealing with a more suspicious individual:

The person (if only one), may not eat at all, or eat only the food in one room. Because they are afraid of being poisoned (which I guess is a reasonable fear).
We are now entering a longer process:
-When giving them their daily meal, put one component of the poison in the food in one room, and the other component in the other.
-Wait until they would have starved if they didn't eat anything. Not sure how long that would be, but if we had infinite time, I guess a year would be plenty.
-After waiting, tell the persons that you have been putting a poison in the food for one of the persons that would slowly deteriorate them, killing them eventually.
-If there are 2 persons, they would be terrified (sorry), but safe.
-If there is only one person, they will have no choice but to start eating the food from both rooms, thinking they will be safe. That will in fact kill them quickly.

Some side notes:

If we use a deadly cocktail of narcotics, taking only one of the two component will have a clear effect (tripping, feeling nauseous, paranoia). That could be convincing them that they are actually being poisoned, hence convincing them to take the food in the other room.

Could the person just take the food in one room, and hope that it is the antidote?
That would be very illogical to do:
They are led to believe that one is poison and the other antidote. So, If they take only 1, they have either a 100% or 0% of survival. Taking the food in the other room will give them a 100% chance of survival. So regardless of which food they take first, it is always a good option to take the other food. (Or so they think...)

If we would have told the persons after a year that the poison would kill them quickly, they wouldn't believe us, because then they would already be dead.

Limitation:

If the person in the room has the same knowledge as us - and therefore not believe us - this is no solution. In that case, they would know that we are trying to give them a 2-component cocktail. They will just keep eating the food from one room.

Since I can't yet comment ("reputation" issues) I'm posting this as an answer, and would just like to point out that all "Ask the two rooms to perform a one-shot action on the same time" solutions (and by "one-shot" I mean it's not continuous work, you click a button, for example, and are done, as opposed, say, to typing in the entire text of "Hamlet" in one sitting) are wrong.

Since there is a random delay of up to a minute, and assuming (as it is not explicitly stated) that a single lying person can move between the rooms at near-instantaneous speed, it is easily possible that they perform the one-shot operation in both rooms themselves, relying on the randomness of the delay to not give their secret up: the fact that the key was reported as being pressed in room A first does not actually mean it was the first pressed!

In contrast, typing a large body of text at on sitting defeats said randomness (I'm assuming, for this claim, that once an input stream from one of the rooms started it is continuous, that is, if the person on the room started typing and I started getting its response once the random delay finished, I'll keep getting that user's typing in real-time, as long as the user keeps typing. Actually, a pause would then be the ultimate indicator).

• The random DELAY was added TO THE problem later to manage TIME based solutions, so THAT'S why it's in THERE. As for continuous TASKS, like typing A long SET OF characters, couldn't an HONEST person just need a BREAK every once in a while, KIND OF like how it's hard to CAPITALIZE ARBITRARY PARTS of a comment WHILE typing at the SAME SPEED all the TIME? – hdsdv Sep 4 '19 at 4:58
• Didn't know that about the delay, I don't usually look at the edit log. As to the "need a break"... well, of course, I'm making some assumptions about the person(s) abilities. Even so, if we assume the input stream is consistent once the delay has worn off and until a meaningful pause in the typing is detected, I stand by my solution. Even this comment, if you type it by hand without pause should do the trick of proving. Basically, any operation taking longer than 1 minute to complete would do. And BTW, I didn't capitalize ARBITRARY parts of my answer. Look better, you'll see the logic... :D – O.F. Sep 4 '19 at 5:37
• I claim it's arbitrary because if you read your answer, with all of the capitalized words uncapitalized, it doesn't change the meaning or anyone's ability to understand it in any meaningful way. People like to italicize (or capitalize, when they don't know the markup) things to make them seem important. But that doesn't make them important. – hdsdv Sep 4 '19 at 5:48
• I can't upvote (thank you stupid reputation limitations), so consider your comment upvoted. :) I got your point about arbitrariness, I just, as I'm sure you know, disagree. Thanks for this cheerful discussion (really, not being sarcastic), but it feels like we're having a private chat that, on top of all, is off-topic. Upvoting you again, and have a great day! – O.F. Sep 4 '19 at 6:01

I think the following would work:

Tell both ends to give you a random sequence of Zeros and Ones of large length, let's say 1000. Repeat this for several days. After a while you can compare (using algorithms from cryptography) the sequences given by the Person behind door A to the ones given by the Person behind door B. If the sequences from Person A are only self-similar as well as the sequences given by Person B, then it is highly likely that they are different Persons. If the cross-similarity is as high as the inter-similarity, then it is likely that there is only one Person behind both door A and door B.

• Do you have any evidence for this? – OrangeDog Sep 4 '19 at 14:58
• @OrangeDog paper , especially page 183: The ‘‘quality’’ of generated sequences is reported to be related to mental disorders [6,7,14] and the age of subjects [5]. Sorry for the formatting, the numerous edits and the deleted comment, I can't press enter without sending the comment. See also paper "We built a model that predicts[...], but also the deployment of patterns in another sequence generated by the same subject." – Supersamu Sep 4 '19 at 15:14
• They have a computer, so I don't think this works. The trickster might as well just use an RNG. – infinitezero Sep 4 '19 at 18:06

Ask them to type on the keyboard some complex poem one letter at a time (the left room should type odd letters, the right room even letters).

You just need to measure the time it takes. If there is one person in each room, it'll be reasonnably fast. You would get something like:

Words: Two households both equal in dignity
Time : 0----------------------------------->
Left : To hueod bt eul i dgiy
Right: w  oshls oh qa n int

If the person need to go from one room to the other, the latency to move from one room to the other will be visible:

Words: Two households both equal in dignity
Time : 0----------------------------------->
Left : To   hueod       bt   eul   i  dgiy
Right:    w       oshls   oh    qa  n     int

We are testing causality here.

• There is an up to 1 min random latency there. This won't work. – infinitezero Sep 4 '19 at 18:07
• This is for communicating with outside (or between room), not in the computer. So in the former case, the computer will measure a 1 unit of time between word (and can take 1mn to send the result, we don't care). In the latter case, the same computer will measure a 5 unit of times between words (and this will still take 1mn to send the result). – xryl669 Sep 4 '19 at 20:36

I have another quite simple one:

Prepare two identical looking boxes with red buttons on it

The first one will hurt (tazer, tear gas, whatever) the person when pressing the button, the second one will simply open and contains a sheet of paper with a message.

Send the first person the box. Tell this person: "Don't press the red button: It will hurt you badly (or even kill you) when trying. Tell the person that you will send the same box to person 2.

If the person does not believe you... oh well... he will be hurt, but you warned him.

A little later send the other box to person 2: Tell this person to open the box by pressing the red button and tell you whats inside. Don't mention the tazer or whatever from box 1.

If it is the same person, he will not open the second box and can't tell you what's inside, no matter whether he tried (and got tazed) or believed you...

If there are two distinct persons, the second will press the button and give you the message, not knowing anything about the danger of the first box...

Voila...

First option:

Send each of them a bath tube full of sticky, not easily cleanable color, one blue, one red and a big sheet of paper. Let them paint their body with the color and let them press the same part of their bodies on the paper (like their left hand or whatever you consider not revealing the identity). Then let them send back the paper. If the colors are clean, they are different people. If it is mixed, it was the same person.

Second option (warning: not for people who can't stand horror movies or violence):

Send them a saw and let each of them cut off 6 toes and then send them back to you. Works as long as they don't have extra toes. Does not specially punish honest people (At least not more then dishonest people).

Third option:

Send them a 4m long stick with a button on each side, which only permanently enables its light when both are pressed at the same time and let them send it back.

Fourth option:

Send them a camera and let them photograph part of their back from a certain distance (in a not identifiable way). A single person has a hard time taking a photo of his own back from a certain distance.

Fifth option:

Send them a device which only tells them a secret code to tell you, when it registers 15 different finger prints or otherwise identifies 2 different persons.

Sixth option:

Send in a trusted person who verifies if there are 1 or 2 persons and then sends back a secret code. There will be only 2 different codes for 1 or 2, so it won't be identifying.

Seventh option:

Burn down the building and watch whether the fire brigade rescues 1 or 2 persons.

Let's hope, nobody uses my answer to use it in real life in a game show ;)


text:
Please see the attached file !!!!

Thanks a lot!

2. Originally Posted by owenji81
Please see the attached file !!!!

Thanks a lot!
Are those definite or indefinite integrals?

RonL

3. indefinite integrals

4. The problem is we cannot find anti-derivatives on closed intervals, we require that $\displaystyle |x|<.5$ in that case $\displaystyle f(x) = 1 \mbox{ on }-.5<x<.5$ and hence the anti-derivative is $\displaystyle x$ on $\displaystyle (-5,5)$ and a constant everywhere.

So,
$\displaystyle f(x) = \left\{ \begin{array}{c}C_1 \mbox{ for }x<-.5\\ x+C_2 \mbox{ for }-.5<x<.5 \\ C_3 \mbox{ for }x>.5 \end{array} \right\}$

But $\displaystyle f$ needs to be continous differenciable at $\displaystyle x=\pm .5$ as well. So $\displaystyle C_1 = C_2 - .5$ and $\displaystyle C_3 = C_2+.5$ where $\displaystyle C_2$ is any arbitraty konstant.

5. Originally Posted by owenji81
Please see the attached file !!!!

Thanks a lot!
Well I still don't like it so I will do the following instead:

$\displaystyle c_K(x) = \int_{-\infty}^x K^2(u) du$

Then:

$\displaystyle c_K(x) = \left\{ \begin{array}{cc} 0 &\mbox{ for }x<-0.5 \\ x + 0.5& \mbox{ for }-0.5\le x \le 0.5 \\ 1& \mbox{ for }x>0.5 \end{array}\right.$

and if you add an arbitary constant onto this $\displaystyle c_K(x)$ you will still have an anti-derivative of $\displaystyle K(x)$.

If everything has worked out right with the extra arbitary constant this should be the same as the soution given by ImPerfectHacker.

RonL


text:
# Non-branching geodesics and optimal maps in strong $CD(K,\infty)$-spaces

created by rajala1 on 29 Jul 2012
modified on 15 Jul 2013

[BibTeX]

Accepted Paper

Inserted: 29 jul 2012
Last Updated: 15 jul 2013

Journal: Calc. Var. Partial Differential Equations
Year: 2012

Abstract:

We prove that in metric measure spaces where the entropy functional is $K$-convex along every Wasserstein geodesic any optimal transport between two absolutely continuous measures with finite second moments lives on a non-branching set of geodesics. As a corollary we obtain that in these spaces there exists only one optimal transport plan between any two absolutely continuous measures with finite second moments and this plan is given by a map.

The results are applicable in metric measure spaces having Riemannian Ricci-curvature bounded below, and in particular they hold also for Gromov-Hausdorff limits of Riemannian manifolds with Ricci-curvature bounded from below by some constant.

Tags: GeMeThNES
Keywords: Ricci curvature, metric measure spaces, branching geodesics


text:
# Specifying some points in rectangular coordinates and other points in polar coordinates

I would like to draw a right triangle inscribed in a circle on the Cartesian plane. In the following code, a circle of radius 3 and center (1,1) is drawn. One side of the triangle, the hypotenuse, is drawn - it is the diameter through (1,1) that is vertical. The endpoints of this diameter are two vertices of the triangle; they are labeled A and C. I would like to specify B using polar coordinates - with an angle measure of -135 degrees or -150 degrees. (I did not specify the coordinates of B in rectangular coordinates. So, no triangle is drawn by the following code.)

There is one other modification to the display that I would like. Vertical line \ell should be drawn in light blue, light green, or light gray. I remember seeing an option for help lines in the manual. Would this draw \ell the way I want it drawn?

\documentclass[10pt]{amsart}
\usepackage{tikz}
\usetikzlibrary{calc,angles,positioning,intersections,quotes,decorations.markings}
\usepackage{mathtools,systeme,array}

\usepackage{tkz-euclide}
\usetkzobj{all}
\usepackage{pgfplots}
\pgfplotsset{compat=1.11}

\begin{document}

\begin{tikzpicture}
\begin{axis}[width=3in,axis equal image,clip=false,
axis lines=middle,
xmin=-3,xmax=5,
xlabel=$x$,ylabel=$y$,
ymin=-5,ymax=5,
restrict y to domain=-5:5,
enlargelimits={abs=0.25cm},
axis line style={latex-latex},
ticklabel style={font=\tiny,fill=white},
xtick={\empty},ytick={\empty},
xlabel style={at={(ticklabel* cs:1)},anchor=north west},
ylabel style={at={(ticklabel* cs:1)},anchor=south west}
]

\draw (1,1) circle (3);
\draw [fill] (1,1) circle [radius=1.5pt] node[anchor=west,font=\tiny]{$(1, \, 1)$};
\addplot [dashed,latex-latex,line width=0.5\pgflinewidth,domain=-5:5] (1,x) node [pos=0.1, anchor=north west, font=\footnotesize] {$\ell$};

\draw (axis cs:1,4) coordinate(A) node[above right]{$A$};
%\draw (axis cs:) coordinate(B) node[above left]{$B$};
\draw (axis cs:1,-2) coordinate(C) node[below right]{$C$};

\end{axis}

%\draw[blue] (A) -- (B) -- (C) -- cycle;
%\tkzMarkRightAngle(A,B,C);

\end{tikzpicture}

\end{document}

• You mean you want to specify the rotation of B around the center of the circle don't you? (so that there is a right angle at <ABC) – Thruston Feb 5 '15 at 22:52
• Yes. B is a point on the circle. With respect to coordinate axes intersecting at (1,1), B should be rotated 110 degrees. – Adelyn Feb 6 '15 at 14:30
• Your graph is nice, but I want the code that I posted to be used with the modifications needed to plot B. – Adelyn Feb 6 '15 at 14:32

## 3 Answers

with tikz

\documentclass[tikz]{standalone}
%\usetikzlibrary{calc}
\def\ang{60}
\def\radius{3cm}
\def\mypoint{3}
\begin{document}
\begin{tikzpicture}
\draw[latex-latex,thick,gray!50] (-5,0) -- (5,0)node[right]{$x$};
\draw[latex-latex,thick, gray!50] (0,-5) -- (0,5)node[above]{$y$};
\begin{scope}[shift={(1,1)}]
\draw (0,0)node[circle,inner sep=2pt, fill](o){} circle (\radius);
\draw [dashed,latex-latex,blue] (0,5) -- node [pos=0.9, anchor=north west, font=\footnotesize] {$\ell$}
(0,-5);
\coordinate [label=above right:A] (A) at (\ang:\radius);
\coordinate [label=below left:C] (C) at (180+\ang:\radius);
\coordinate [label=above left:B] (B)  at (\mypoint*\ang:\radius);
\draw[blue] (A) -- (B) -- (C) -- cycle;
\end{scope}
\end{tikzpicture}
\end{document}

And more versatile tkz-euclide

\documentclass[11pt,a4paper,svgnames,usenames,dvipsnames]{article}
\usepackage{tkz-euclide}
\usetkzobj{all}

\begin{document}
\begin{tikzpicture}
\tkzDefPoint(3,-4){A}\tkzDefPoint(8,4){B}\tkzDefPoint(1,5){C}
\tkzDefMidPoint(A,B) \tkzGetPoint{O}
\tkzInterLC(C,A)(O,A) \tkzGetSecondPoint{M}
\tkzInterLC(C,B)(O,A) \tkzGetFirstPoint{N}
\tkzInterLL(B,M)(A,N) \tkzGetPoint{I}
\tkzDrawCircle[diameter](A,B)
\tkzDrawSegments(A,M B,N A,B B,M A,N)
\tkzMarkRightAngles[fill=Maroon!20](A,M,B A,N,B)
\tkzLabelPoints[below](O,A,B)
\tkzLabelPoint[above left](M){$M$}
\tkzLabelPoint[above](N){$N$}
\tkzDrawPoints[color=Maroon](O,A,B)
\end{tikzpicture}
\end{document}

Here is the version retaining axis environment:

\documentclass[10pt]{amsart}
\usepackage{tkz-euclide}
\usetkzobj{all}
\usepackage{pgfplots}
\pgfplotsset{compat=1.11}

\begin{document}

\begin{tikzpicture}
\begin{axis}[axis equal,
axis lines=middle,
xmin=-3,xmax=5,
xlabel=$x$,ylabel=$y$,
ymin=-5,ymax=5,
enlargelimits={abs=0.25cm},
axis line style={draw=gray!30,latex-latex},
xtick={\empty},ytick={\empty},
xlabel style={at={(ticklabel* cs:1)},anchor=north west},
ylabel style={at={(ticklabel* cs:1)},anchor=south west}
]
\addplot [dashed,latex-latex,line width=0.5\pgflinewidth,domain=-5:5] (1,x) node [pos=0.1, anchor=north west, font=\footnotesize] {$\ell$};

%\draw (1,3) coordinate(A) node[above right]{$A$};
%\draw (axis cs:) coordinate(B) node[above left]{$B$};
%\draw (1,-2) coordinate(C) node[below right]{$C$};

\begin{scope}[yshift=5mm,font=\footnotesize]
\draw (1,0) circle (1.5cm);
\path (1,0) -- +(80:1.5cm) coordinate(A) node[above]{$A$};
\path (1,0) -- +(260:1.5cm) coordinate(C) node[below]{$C$};
\draw [fill] (1,0) circle [radius=1.5pt] node[anchor=west,font=\tiny]{$(1, \, 1)$};
\path (1,0) -- +(135:1.5cm) coordinate(B) node[inner sep=2pt,above left]{$B$};
\draw[blue] (A) -- (B) -- (C) -- cycle;
\end{scope}
\end{axis}
\tkzMarkRightAngle(A,B,C);
\end{tikzpicture}

\end{document}

• I like your graphs. I want the code to include the code that I posted in order to maintain consistency with the codes for other graphs that I have in a file. In particular, I want to keep the axis environment and use TikZ. (I do like that your lines for the axes are light grey.) – Adelyn Feb 6 '15 at 15:42
• @Adelyn Sure, but time to go to bed now for me. Tomorrow I will update. – user11232 Feb 6 '15 at 15:46
• Can you find time today to send me the code? I want the code to include the code that I posted in order to maintain consistency with the codes for other graphs that I have in a file. In particular, I want to keep the axis environment and to use TikZ. (I do like that your lines for the axes are light grey, though.) – Adelyn Feb 9 '15 at 16:14
• @Adelyn I have updated the answer. – user11232 Feb 10 '15 at 0:16
• The display is exactly what I want! (The display of the axes is nice.) The code is almost what I want. The only modification I would like is to put the radius measurement in terms of the coordinate system, using the axis environment, instead of in terms of the metric system. – Adelyn Feb 10 '15 at 0:45

While you are waiting for an answer about how to define a point on your circle in pgf here is a version in Metapost showing you one way to define points on the circumference of a circle.

prologues := 3;
outputtemplate := "%j%c.eps";
newinternal degrees;
degrees := 1/45;

beginfig(1);

u = 1cm;

% axes
path xx, yy;
xx = (left -- right) scaled 5u;
yy = (down -- up)    scaled 5u;
drawarrow xx withcolor .7 white;
drawarrow yy withcolor .7 white;
label.rt (btex $x$ etex, point 1 of xx);
label.top(btex $y$ etex, point 1 of yy);

% circle and points and line
path C;
C = fullcircle scaled 6u shifted (1u,1u);

pair a, b, c;
a = point   80 degrees of C;
c = point -100 degrees of C;
b = point  140 degrees of C;

path ell;
ell = yy shifted (xpart center C,0);

% draw the dashed line
draw ell dashed evenly withcolor 0.8[blue,white];

% mark the right angle
draw unitsquare scaled 5 rotated angle (c-b) shifted b withcolor .7 white;

% draw the triangle
draw a -- b -- c -- cycle withcolor .67 blue;

% draw the circle (and center dot) on top
draw C; fill fullcircle scaled 3 shifted center C;

% finally label the points
label(btex $A$ etex, 1.1[center C, a]);
label(btex $C$ etex, 1.1[center C, c]);
label(btex $B$ etex, 1.1[center C, b]);
label.rt(btex $\ell$ etex, point 0.1 of ell);

endfig;
end.

• @PaulGessler Paul, can you give me the code for plotting the vertics of a triangle inscribed on a circle, not centered at the origin? I want to use the axis environment that I provided, which is similar to the way you used the axis environment from our previous discussion. Here, I need to specify points in polar coordinates ... but there is a shift of the center of the circle. – Adelyn Feb 10 '15 at 16:08
• @PaulGessler The code provided by Harish may be of help. The only modification that I would like is to put the radius measurement in terms of the coordinate system, using the axis environment, instead of in terms of the metric system. – Adelyn Feb 10 '15 at 16:12

You can use normal TikZ coordinate specifications including polar coordinates inside an axis environment by setting disabledatascaling. Note that this will only work if the range of your data isn't too large.

\documentclass[10pt]{amsart}
\usepackage{pgfplots}
\pgfplotsset{compat=1.11}

\begin{document}

\begin{tikzpicture}
\begin{axis}[width=3in,axis equal image,clip=false,
axis lines=middle,
xmin=-3,xmax=5,
xlabel=$x$,ylabel=$y$,
ymin=-5,ymax=5,
restrict y to domain=-5:5,
enlargelimits={abs=0.25cm},
axis line style={latex-latex},
ticklabel style={font=\tiny,fill=white},
xtick={\empty},ytick={\empty},
xlabel style={at={(ticklabel* cs:1)},anchor=north west},
ylabel style={at={(ticklabel* cs:1)},anchor=south west},
disabledatascaling
]

\draw (1,1) circle (3);
\draw [fill] (1,1) circle [radius=1.5pt] node[anchor=west,font=\tiny]{$(1, \, 1)$};
\addplot [densely dashed,latex-latex, blue!50,domain=-5:5] (1,x) node [pos=0.1, anchor=north west, font=\footnotesize] {$\ell$};

\draw (axis cs:1,4) coordinate(A) node[above right]{$A$};
\draw (axis cs:1,1) ++(-135:3) coordinate(B) node[below left]{$B$};
\draw (axis cs:1,-2) coordinate(C) node[below right]{$C$};

\draw [ultra thick, red, opacity=0.55, line join=round] (A) -- (B) -- (C) -- cycle;

\end{axis}
\end{tikzpicture}

\end{document}


text:
Bex - 9 months ago 95
LaTeX Question

Adding maths function in ggplot annotation

I have a density plot using ggplot and I have a mathematical function I want to add on the graph using +annotate() or something similar, but I am not sure how to do this.

The symbol I want in latex code is:

     $f_{\epsilon}(|R_{i}|)$

Thanks for any help :)

# install.packages("latex2exp")
test <- TeX("$f_{\\epsilon}(|R_{i}|)$")


text:
# AB * C = CB

Logic Level 1

$\begin{array} { l l l l } & & A & B \\ \times & & & C \\ \hline & & C & B \\ \end{array}$

If $A, B, C$ are distinct digits that satisfy the above cryptogram, what is the value of $B$?

×


text:
# zbMATH — the first resource for mathematics

Effect of temperature-dependent viscosity on forced convection heat transfer from a cylinder in crossflow of power-law fluids. (English) Zbl 1197.80028
Summary: The steady, two-dimensional and incompressible flow of power-law fluids across an unconfined isothermal heated circular cylinder is investigated numerically to ascertain the effect of temperature-dependent viscosity on the flow and forced convection heat transfer phenomena. Extensive numerical results elucidating the variation of the heat transfer characteristics and drag coefficient on the severity of temperature dependence of viscosity ($$0 \leqslant b \leqslant 0.5$$), power law index ($$0.6 \leqslant n \leqslant 1.6$$), Prandtl number ($$1 \leqslant Pr \leqslant 100$$) and Reynolds number ($$1 \leqslant Re \leqslant 30$$) are presented. The coupled momentum and energy equations are expressed in the stream function/vorticity formulation and solved using a second-order accurate finite difference method to determine the local and surface-averaged Nusselt numbers, the drag coefficient, and to map the flow domain in terms of the temperature and flow fields near the cylinder. The variation of viscosity with temperature is shown to have a substantial effect on both the local and surface-averaged values of the Nusselt number. As expected, the results also suggest that the rate of heat transfer shows positive dependence on the Reynolds number and Prandtl number. Furthermore, stronger the dependence of viscosity on the temperature, the greater is the enhancement in the rate of heat transfer. Finally, all else being equal, shear-thinning fluid behaviour facilitates heat transfer while the shear-thickening behaviour has deleterious effect on heat transfer.

##### MSC:
 80A20 Heat and mass transfer, heat flow (MSC2010) 76R05 Forced convection 76A05 Non-Newtonian fluids 76M20 Finite difference methods applied to problems in fluid mechanics 80M20 Finite difference methods applied to problems in thermodynamics and heat transfer
Full Text:


text:
## Advances in Differential Equations

### Multiple solutions for the Brezis-Nirenberg problem

#### Abstract

We establish the existence of multiple solutions to the Dirichlet problem for the equation $-\Delta u=\lambda u+|u|^{\frac{4}{N-2}}u$ on a bounded domain $\Omega$ of $\mathbb{R}^{N},$ $N\geq4.$ We show that, if $\lambda>0$ is not a Dirichlet eigenvalue of $-\Delta$ on $\Omega,$ this problem has at least $\frac{N+1}{2}$ pairs of nontrivial solutions. If $\lambda$ is an eigenvalue of multiplicity $m$ then it has at least $\frac{N+1-m}{2}$ pairs of nontrivial solutions.

#### Article information

Source
Adv. Differential Equations Volume 10, Number 4 (2005), 463-480.

Dates
First available in Project Euclid: 18 December 2012

Permanent link to this document


text:
# How to set initial state on IBM Q?

For my undergraduate final project I am working on a Quantum Inspired Genetic Algorithm.

For this I am using IBM Q real devices and I need to set a custom initial state on qubits. Using the statevector simulator this was possible, however I am not sure how to do so on real quantum hardware. For example I want to put qubit into state $$|\psi\rangle = \sqrt{0.3}|0\rangle + \sqrt{0.7}|1\rangle$$.

• Hi! Were you using qc.initialize() before? This can still be run on the real devices – met927 Feb 6 '20 at 18:06
• Did you have an issue with running it? I just tested and was able to – met927 Feb 6 '20 at 18:12
• Just note that quantum tomography is used for a quantum state measurement, not for qubits initialization. – Martin Vesely Feb 6 '20 at 18:16
• You can run qc.initialize([1,0], 0) to initialize it into the |0> state, where the 1st param is the vector to use and the 2nd is the qubits to apply it to. The state you are describing isn't a valid quantum state, as a^2 + b^2 = 1 – met927 Feb 6 '20 at 18:17
• I understand that Adhisha is looking for method how to initialize state of qubit and I edited the question accordingly. – Martin Vesely Feb 6 '20 at 22:12

To prepare an arbitrary single qubit state it is possible to use $$\mathrm{U3}$$ gate. The gate is defined by a matrix

$$\mathrm{U3}(\theta, \phi, \lambda)= \begin{pmatrix} \cos(\theta/2) & -\mathrm{e}^{i\lambda}\sin(\theta/2) \\ \mathrm{e}^{i\phi}\sin(\theta/2) & \mathrm{e}^{i(\phi+\lambda)}\cos(\theta/2) \end{pmatrix}.$$

When then gate is applied on a qubit in state $$|0\rangle$$ (i.e. initial state of all qubits on IBM Q), it is transformed to state

$$|\varphi_0\rangle = \cos(\theta/2)|0\rangle + \mathrm{e}^{i\phi}\sin(\theta/2)|1\rangle.$$

Setting parameters $$\theta$$ and $$\phi$$ allows you to get any single qubit state you need.

In your case $$|\psi\rangle = \sqrt{0.3}|0\rangle + \sqrt{0.7}|1\rangle$$, so obviously $$\phi = 0$$.

Since $$\cos(\theta/2) = \sqrt{0.3}$$ parameter $$\theta$$ is given as

$$\theta = 2 \arccos(\sqrt{0.3}) = 1.9823.$$

Note 1: In case $$\alpha$$ and $$\beta$$ are real numbers, $$\phi = 0$$ always and you can apply $$\mathrm{Ry}(\theta)$$ gate (i.e. y-rotation) with same parameter $$\theta$$ instead because $$\mathrm{Ry}(\theta) = \mathrm{U3}(\theta,0,0)$$.

Note 2: To preare any multiqubit quantum state, a method introduced in Transformation of quantum states using uniformly controlled rotations can be employed.


text:
# RMarkdown/Bookdown: Putting R markdown/bookdown cross references into a plot legend in a R chunk

I have a bookdown document with many equations with equation numbers. I want to put an equation number reference in a plot legend - pseudocode

\label{eq:Logistic4P}
{Absorbance = D + \frac{A-D}{1+\left(\frac{Concentration}{C}\right)^{1/B}}}

(ref:eqLog) @ref(eq:Logistic4P)

plot(y~x)
legend('topright',legend=some reference to equation number)

Of course, the job is to get the bookdown equation reference into the r chunk, similar to putting a cross reference into a figure caption. Can someone point me in the right direction and just tell me it can't be done?

Thanks
David


text:
• # question_answer A 1.0 g sample of substance A at $100{}^\circ C$ is added to 100 mL of ${{\text{H}}_{\text{2}}}\text{O}$at $25{}^\circ C$. Using separate 100 mL portions of${{\text{H}}_{\text{2}}}\text{O,}$the procedure is repeated with substance B and then with substance C. How will the final temperatures of the water compare? Substance Specific Heat A $0.60\,J{{g}^{-1}}{{\,}^{o}}{{C}^{-1}}$ B $0.40\,J{{g}^{-1}}{{\,}^{o}}{{C}^{-1}}$ C $0.20\,J{{g}^{-1}}{{\,}^{o}}{{C}^{-1}}$ A) ${{T}_{C}}>{{T}_{B}}>{{T}_{A}}$            B) ${{T}_{B}}>{{T}_{A}}>{{T}_{C}}$C) ${{T}_{A}}>{{T}_{B}}>{{T}_{C}}$            D) ${{T}_{A}}={{T}_{B}}={{T}_{C}}$

Heat absorbed or evolved, $\Delta Q=ms\Delta t.$ Where,$m=$ mass of substance, s = specific heat$\Delta t=$ temperature difference It means $s\propto \frac{1}{\Delta t}.$ Higher the temperature of the given solution, lesser is the temperature difference. So higher is the specific heat. As, the specific heat order is A > B > C. So, the order of temperature of solution is A > B > C. Hence, the correct option is [c].