text:
Physics
##### ASSERTION

Energy is a scalar quantity

##### REASON

All conserved quantities are scalars

Assertion is correct but Reason is incorrect

##### SOLUTION
Energy is a scalar quantity, it doesn't have direction
So Assertion is correct
All conserved quantities need not be scalar. For example, take momentum, it is vector quantity but it is conserved
So Reason is wrong
Therefore option $C$ is correct.

You're just one step away

Assertion & Reason Medium Published on 18th 08, 2020
Questions 244531
Subjects 8
Chapters 125
Enrolled Students 197

#### Realted Questions

Q1 TRUE/FALSE Medium
A force can change the shape and volume of an object.
• A. True
• B. False

Asked in: Physics - Physical World

1 Verified Answer | Published on 18th 08, 2020

Q2 Assertion & Reason Medium
##### ASSERTION

The total binding energy of the reacting molecules is less than the total binding energy of the product molecules in a chemical reaction.

##### REASON

The chemical reaction is exothermic if the total binding energy of product is more than the reactant.

• A. Both Assertion and Reason are correct and Reason is the correct explanation for Assertion
• B. Both Assertion and Reason are correct but Reason is not the correct explanation for Assertion
• C. Assertion is correct but Reason is incorrect
• D. Both Assertion and Reason are incorrect

Asked in: Physics - Physical World

1 Verified Answer | Published on 18th 08, 2020

Q3 Subjective Medium
Write a short note on initial space missions of USSR.

Asked in: Physics - Physical World

1 Verified Answer | Published on 18th 08, 2020

Q4 Single Correct Medium
Nano science is the study of fundamental principles that nature permits at the nanoscale or less than that $i e . . . . . . . . . . . .$
• A. The classical mechanics
• B. the wave mechanics
• C. The quantum mechanics
• D. none of these

Asked in: Physics - Physical World

1 Verified Answer | Published on 18th 08, 2020

Q5 Subjective Medium
"Every great physical theory starts as a heresy and ends as a dogma." Give some examples from the history of science of the validity of this incisive remark.

Asked in: Physics - Physical World

1 Verified Answer | Published on 18th 08, 2020


text:
## Cryptology ePrint Archive: Report 2013/201

Divesh Aggarwal and Yevgeniy Dodis and Shachar Lovett

Abstract: Non-malleable codes provide a useful and meaningful security guarantee in situations where traditional error-correction (and even error-detection) is impossible; for example, when the attacker can completely overwrite the encoded message. Informally, a code is non-malleable if the message contained in a modified codeword is either the original message, or a completely unrelated value. Although such codes do not exist if the family of "tampering functions" \cF is completely unrestricted, they are known to exist for many broad tampering families \cF. One such natural family is the family of tampering functions in the so called {\em split-state} model. Here the message m is encoded into two shares L and R, and the attacker is allowed to arbitrarily tamper with L and R {\em individually}. The split-state tampering arises in many realistic applications, such as the design of non-malleable secret sharing schemes, motivating the question of designing efficient non-malleable codes in this model.

Prior to this work, non-malleable codes in the split-state model received considerable attention in the literature, but were either (1) constructed in the random oracle model [DPW10], or (2) relied on advanced cryptographic assumptions (such as non-interactive zero-knowledge proofs and leakage-resilient encryption) [LL12], or (3) could only encode 1-bit messages [DKO13]. As our main result, we build the first efficient, multi-bit, information-theoretically-secure non-malleable code in the split-state model.

The heart of our construction uses the following new property of the inner-product function <L,R> over the vector space F_p^n (for any prime p and large enough dimension n): if L and R are uniformly random over F_p^n, and f,g: F_p^n \rightarrow F_p^n are two arbitrary functions on L and R, the joint distribution (<L,R>,<f(L),g(R)>) is close'' to the convex combination of "affine distributions" {(U,c U+d)| c,d \in F_p}, where U is uniformly random in F_p. In turn, the proof of this surprising property of the inner product function critically relies on some results from additive combinatorics, including the so called {\em Quasi-polynomial Freiman-Ruzsa Theorem} (which was recently established by Sanders [San12] as a step towards resolving the Polynomial Freiman-Ruzsa conjecture [Gre05]).

Category / Keywords: applications / Non malleable codes, Combinatorics

Date: received 8 Apr 2013, last revised 5 Nov 2013

Contact author: divesha at cs nyu edu

Available format(s): PDF | BibTeX Citation

[ Cryptology ePrint archive ]

format: plain


text:
# PARAM, AMLSASPC

Bulk Data Entry This parameter is used to indicate when to automatically constrain degrees-of-freedom with no stiffness for AMLS run.

Parameter Values Description
AMLSASPC 0, 1 This parameter is used to indicate when to automatically constrain degrees-of-freedom with no stiffness for AMLS run.
0 (Default)
The constraints are applied before constraint reduction.
1
The constraints are applied after constraint reduction.


text:
# Novikov Ring Proof

I have a four part question involving the Novikov ring.

For part (1), I have:

$$(\Sigma_{\gamma\in \tau}a_{\gamma}t^\gamma) +_{N} (\Sigma_{\gamma\in \tau}b_{\gamma}t^\gamma) =\Sigma_{\gamma\in \tau}(a_{\gamma}+b_{\gamma})t^\gamma$$

We know that $$(a_{\gamma}+b_{\gamma})\in \mathbb{Z}$$ because $$a_{\gamma} \in \mathbb{Z}$$ and $$b_{\gamma} \in \mathbb{Z}$$

But I am unsure how to show that it satisfies the condition:

Similarly, I am unsure about how to prove closure for $$\cdot_{N}$$

For part (2), I just need to prove that it is an integral domain, so I must show that it is commutative, and I must show that it has no zero divisors. Again, I am unsure how to start the zero divisors portion of this part.

For part (3), I know the units in this ring must act as "multiplicative inverses", but I am unsure on how to express them.

For part (4), I must show that the Novikov ring can be generated by a single element. I am unsure how to approach this as well.

Any help would be appreciated.

• But I am unsure how to show that it satisfies the condition: that condition is give to you as a hypothesis. You don't have to prove it. – rschwieb Jun 6 '16 at 4:10
• For part (4), I must show that the Novikov ring can be generated by a single element. that is not what a principal ideal ring is. You'd have to show every ideal is generated by a single element. – rschwieb Jun 6 '16 at 4:12


text:
# Find all vectors in R^3 that are perpendicular to [1; 3; -1]

1. Sep 12, 2006

### VinnyCee

THE PROBLEM:

The dot product is:

$$\overrightarrow{x}\,=\,\left[ \begin{array}{c} x_1 \\ x_2 \\ \vdots \\ x_n \end{array} \right]$$

$$\overrightarrow{y}\,=\,\left[ \begin{array}{c} y_1 \\ y_2 \\ \vdots \\ y_n \end{array} \right]$$

in $$\mathbb{R}^n$$:

$$\overrightarrow{x}\,\cdot\,\overrightarrow{y}\,=\,x_1\,y_1\,+\,x_2\,y_2\,+\,\ldots\,+\,x_n\,y_n$$

If the scalar $\overrightarrow{x}\,\cdot\,\overrightarrow{y}$ is equal to zero, the vectors are perpendicular.

Find all vectors in $\mathbb{R}^3$ that are perpendicular to
$$\left[ \begin{array}{c} 1 \\ 3 \\ -1 \end{array} \right]$$.

Draw a sketch as well.

MY WORK SO FAR:

$$\left[ \begin{array}{c} 1 \\ 3 \\ -1 \end{array} \right]\,\cdot\,\left[ \begin{array}{c} x \\ y \\ z \end{array} \right]\,=\,0$$

$$x\,+\,3\,y\,-\,z\,=\,0$$

$$z\,=\,x\,+\,3\,y$$

Let s = x and t = y

$$z\,=\,s\,+\,3\,t$$

$$\left[ \begin{array}{c} 1 \\ 3 \\ -1 \end{array} \right]\,\cdot\,\left[ \begin{array}{c} s \\ t \\ s\,+\,3\,t \end{array} \right]\,=\,0$$

Does the above look right?

Last edited: Sep 12, 2006
2. Sep 12, 2006

### HallsofIvy

Staff Emeritus
Yes, that looks good- but where is your answer? Since the problem asks for the set of all vectors perpendicular to [1, 3, -1] your answer should be something like "All vectors satisfying" or "all vectors spanned by". You have already calculated that a vector [x, y, z] in that space must satisfy x+ 3y- z= 0; just say that. You have also calculated form that that z= x+ 3y and got [s, t, s+3t] as a "representative" vector. You could answer "all vectors of the form [s, t, s+ 3t] where s and t can be any real numbers. Finally, since [s, t, s+ 3t]= s[1, 0, 1]+ t[0, 1, 3], you could answer "the subspace spanned by [1, 0, 1] and [0, 1, 3]."

Your picture, of course, would be the plane x+ 3y- z= 0.


text:
13/93
\begin{frame}{Pushdown Automata}
Next to the input alphabet $\Sigma$, there is now a \emph{stack alphabet} $\Gamma$.
\pause\medskip

\begin{block}{}
A \emph{stack} is a finite sequence of elements from $\Gamma$.
\pause\medskip

Elements can be added or removed only on the top of the stack.
\end{block}
\pause\medskip

\begin{goal}{}
A transition reads the topmost element of the stack
\begin{talign}
\delta : Q \times (\Sigma \cup \{ \lambda \}) \times \alert{\Gamma} \to \ldots
\end{talign}
\pause
and exchanges it with zero or more new elements:
\begin{talign}
\delta : Q \times (\Sigma \cup \{ \lambda \}) \times \Gamma \to 2^{Q \times \alert{\Gamma^*}}
\end{talign}
\pause
The nondeterministic choice $\delta(q,\alpha,b)$ must always be \alert{finite}!
\end{goal}
\pause\medskip

\begin{block}{}
Initially, stack contains one symbol: \emph{stack start symbol} $z \in \Gamma$.
\end{block}
\bigskip
\end{frame}


text:
# nLab Birkhoff-von Neumann theorem

Zoran: there are several things called “Birkhoff’s theorem” in various field of mathematics and mathematical physics, and belong even to at least 2 different classical Birkhoff’s. Even wikipedia has pages for more than one such theorem. To me the first which comes to mind is Birkhoff’s factorization theorem, now also popular in Kreimer-Connes-Marcolli work and in connection to loop groups (cf. book by Segal nad Pressley). I would like that the $n$lab does not mislead by distinguishing one of the several famous Bikhoff labels without mentioning and directing to 2-3 others.

Ian Durham: Good point. I think this probably ought to be renamed the “Birkhoff-von Neumann theorem.” Is that a good enough label or should we get more specific with it?

Toby: I have moved it. See also the new page Birkhoff's theorem, which is basically just Zoran's comment above.

# The Birkhoff-von Neumann theorem

Given a permutation $\sigma \in S_n$, the permutation matrix that is associated with $\sigma$ is the $n \times n$ matrix $P_{\sigma}(j,k)$, where $1 \le j,k \le n$, whose entries are given by

P_{\sigma}(j,k)= \left \{ \begin{aligned} 1 & if \sigma (j)=k \\ 0 & otherwise. \end{aligned} \right.

An $n \times n$ doubly stochastic matrix $D$ is a square matrix whose elements are real and whose rows and columns sum to unity. Given such a matrix, there exist nonnegative weights $\{w_{\sigma}:\sigma \in S_n\}$ such that

$\sum_{\sigma \in S_n} w_{\sigma}=1$ and $\sum_{\sigma \in S_n} w_{\sigma} P_{\sigma}=D$.

The set of such matrices of order $n$ is said to form the convex hull of permutation matrices of the same order where the latter are the vertices (extreme points) of the former.

# Quantum extensions

In the quantum context, doubly stochastic matrices become doubly stochastic channels, i.e. completely positive maps preserving both the trace and the identity. Quantum mechanically we understand the permutations to be the unitarily implemented channels. That is, we expect doubly stochastic quantum channels to be convex combinations of unitary channels (that is channels that can be represented by some combination of unitary transformations). Unfortunately it is well-known that some quantum channels $cannot$ be written that way.

However, large tensor powers of a channel may be easier to represent in this way, because one need not use only product unitaries in the decomposition. Thus one proposed solution to the problem is to denote, for any doubly stochastic channel $T$, by $d_{B}(T)$ the Birkhoff defect, defined as the cb-norm distance from $T$ to the convex hull of the unitarily implemented channels. Then the key is to determine whether $d_{B}(T^{\otimes n})$ goes to zero as $n\to\infty$.

David Roberts: I’m guessing you wanted $T^{\otimes n}$ instead of $T\otimes n$.

Categorically, one possible way to approach this problem is to determine the relationship between the category of quantum channels, $QChan$, and the category of unitary transformations.

# Discussion

Ian Durham: Any suggestions concerning the last point?

David Roberts: There may be a functor between the two which is 'nice' in some sense (has an adjoint, say) which encapsulates the next best possible result.

Ian Durham: Hmmm. What I think I’m going to do is to try to tally up all the category theoretic properties of each. That should make it easier to see if there’s a functor between them, I would think.

Revised on April 11, 2010 18:34:59 by Toby Bartels (98.19.62.150)


text:
# Why is the Poincaré group non-abelian?

Based on what I've learned, I gather the Poincaré group is the group of isometries of Minkowski spacetime and it is a non-abelian Lie group.

Why is it non-abelian?

Or perhaps rather, does the fact that it is non-abelian mean anything significant for the differences we see between pre-SR and SR theory?

• Do you know that already 3D spatial rotations are non-abelian? – Qmechanic Jan 30 '15 at 22:50
• The group of rotations of ordinary 3-space is non-abelian as well – doetoe Jan 30 '15 at 22:50
• @doetoe: Touche! – Qmechanic Jan 30 '15 at 22:51
• @Qmechanic Oh, is that related to the right-handed rule idea? I haven't really learned much about this subject formally from a geometrical perspective. But I'm planning to. – Stan Shunpike Jan 30 '15 at 23:13

Already the simplest isometry you encounter in physics, that of rotations in ordinary Euclidean three space plus (or, rather, semi-direct product with) translations, is non-abelian, since the group of rotations $\mathrm{SO}(3)$ alone is non-abelian - it is not the same to first rotate about one axis and then about another or to do so in reverse.


text:
# How to solve this vibration equation?

• I
thaiqi
TL;DR Summary
How to solve this vibration equation?
$$\ddot{x} + \omega_{0}^2 x = {e \over m} E_{x}$$
Hello,everyone:
I got an equation:
$$\ddot{x} + \omega_{0}^2 x = {e \over m} E_{x}$$
I know the solution is:
$$x(t) = {e \over {\omega_{0} m}} \int_{0}^{t} E_{x}(\xi) \sin{ \omega_{0} } (t - \xi) d \xi \\$$
$$x(0) = \dot{x} (0) = 0$$

My attempt to verify this solution is by using formula:
$${d \over dx } \int_{\alpha (x)}^{\beta (x)} f(x,y)dy = \int_{\alpha (x)}^{\beta (x)} { {\partial f(x,y)} \over {\partial x}} dy + f[x, \beta (x)] \beta^{\prime}(x) - f[x, \alpha (x)] \alpha^{\prime}(x)$$
But I don't know how the physicist obtained it. Can anyone give an answer? Thanks.

Mentor
We don't give answers. You need to show what attempt you made to solve it and I don't see that in your post. We in turn will give you hints or tell you where you went wrong. This is how our site works.

We also have a template to fill out for homework type questions when posted into one of our homework forums.

1) Homework statement

2) Relevant equations

3) Attempt at a solution

dlgoff
thaiqi
We don't give answers. You need to show what attempt you made to solve it and I don't see that in your post. This is how our site works.
Thanks. Is there any book talking about equations of this form?

Mentor
2021 Award
Summary:: How to solve this vibration equation?
$$\ddot{x} + \omega_{0}^2 x = {e \over m} E_{x}$$

ut I don't know how the physicist obtained it. Can anyone give an answer? Thanks.
You basically have an equation of the form ##x''(t)+cx(t)=d## which is a simple second order differential equation. There are a lot of techniques to solve differential equations in general, but this one is especially simple and occurs very often in physics. You can e.g. set ##x(t))=a \sin(\alpha t)+b\cos(\beta t)## and solve the equation system which results from differentiating. ##x'' \sim x ## as given, already looks like sine and cosine, since those functions "reproduce" themselves by differentiation twice.

Delta2 and jedishrfu
thaiqi
You basically have an equation of the form ##x''(t)+cx(t)=d## which is a simple second order differential equation. There are a lot of techniques to solve differential equations in general, but this one is especially simple and occurs very often in physics. You can e.g. set ##x(t))=a \sin(\alpha t)+b\cos(\beta t)## and solve the equation system which results from differentiating. ##x'' \sim x ## as given, already looks like sine and cosine, since those functions "reproduce" themselves by differentiation twice.
Thanks first. It is rather of ##x''(t)+cx(t)=d(t)## type.
Second, I learned from some articles that this can be solved using what is called "Duhamel integral", will a common book on ordinary differential equation talk about that? If not, what book is suitable?

Mentor
2021 Award
... will a common book on ordinary differential equation talk about that? If not, what book is suitable?
Not sure whether it will talk about that integral, but certainly about equations of this form. A standard textbook about differential equations is a good recommendation for any physicist. However, I cannot name a special one.

Mentor
Some folks use Arfken and Weber Mathematical Methods for Physicists or Boaz.

Theres also Nearings book available free online.

http://www.physics.miami.edu/~nearing/mathmethods/

not sure if duhamel is mentioned though. You could search on diff equation books duhamel to find one since google indexed so many so far.

mpresic3
You are starting with a second order differential equation.
That rule you wrote involving the integral below is called Leibniz's rule. It is in the mathematical handbook by Schaums. The physicist (probably) attained it when (s)he was taking Calculus or perhaps advanced calculus classes. The rule (and even the method of solution) is also found in many books on modern control theory in engineering. Electrical and Aerospace engineers are well acquainted with these types of problems; but allow me to be of even more help.
Your starting point is a second order differential equation, and Leibniz rule involves an (i.e. one) integral. In order to use it you should express your second order differential equation as a first order differential equation involving matrices. Then you would obtain the state transition matrix. etc.
Your best bet would be to read relevant sections in Modern Control theory such as Modern Control Theory by Brogan. If you are a physicist, this book (and others in this area), are likely unfamiliar to you, and I do not know of the references to help.

thaiqi
Thanks for you all.

etropy
Sorry for the kinda stupid qustion, but is $$E_x$$ a function E differentiated with respect to x, or is $$E_x$$ just a constant?

jedishrfu
peterwang
Looking at the form of the equation, it involves time t, so Laplace transformation with respect to time t would be helpful. Looking at the form of the solution, it is the Laplace transformation of a convolution. So Laplace transformation is the solution.

Delta2
Homework Helper
Gold Member
Laplace transform is surely one way to go. Also (maybe not sure) Fourier transform. But i think it can be solved also with the Green's function method because the ODE is of the form $$Lf(t)=s(t)$$ where L a linear differential operator and s(t) a source function.


text:
1. ## double integral

integral from 1 to 2 and integral from 1 to 3 of e^(-(x+y))

Is there any reference I can go to to refresh my calculus.
It's been over 10years since I took my Calculus

Judi

2. Originally Posted by Judi
integral from 1 to 2 and integral from 1 to 3 of e^(-(x+y))

Is there any reference I can go to to refresh my calculus.
It's been over 10years since I took my Calculus

Judi
By the rules of exponents
e^{-x-y} = e^{-x} * e^{-y}
so you can write your integral as separate integrations over x and y:
Int[e^{-x-y} dx dy] = Int[e^{-x} dx] * Int[e^{-y} dy]

and

Int[e^{-x} dx] = -e^x (over the appropriate limits)

As I don't know which limits go with which variable I can't help any further, but I suspect you can take it from here.

(I'll let someone else handle the question about references.)

-Dan

3. Thank you!

4. Originally Posted by topsquark
By the rules of exponents
e^{-x-y} = e^{-x} * e^{-y}
so you can write your integral as separate integrations over x and y:
Int[e^{-x-y} dx dy] = Int[e^{-x} dx] * Int[e^{-y} dy]

and

Int[e^{-x} dx] = -e^x (over the appropriate limits)

As I don't know which limits go with which variable I can't help any further, but I suspect you can take it from here.

(I'll let someone else handle the question about references.)

-Dan
As the integrand is separable into a product of two functions one containing
only one of the variables and the other the remaining variable, and these
two functions are the same (except for the name of the variable) it does
not matter which set of limits go with which variable the integral is the same
which ever way they are allocated to the variables.

RonL

5. Originally Posted by Judi
in

Is there any reference I can go to to refresh my calculus.
It's been over 10years since I took my Calculus
There are plenty of online resources for calculus one I like is William Chen's
lecture notes, which you can find here, but a google search for "calculus notes"
will give you more links that you can shake a stick at.

If it you want a good text book, I like Morris Klein's Calculus which has the
advantages of being cheap and good.

RonL

6. Originally Posted by CaptainBlack
As the integrand is separable into a product of two functions one containing
only one of the variables and the other the remaining variable, and these
two functions are the same (except for the name of the variable) it does
not matter which set of limits go with which variable the integral is the same
which ever way they are allocated to the variables.

RonL
I was just trying to be general. Okay! Okay! I didn't notice that.

-Dan

7. Thank you guys!


text:
# ToC affected by titleformat

Thanks to Bernard i was able to accomplish this look: which is what I was looking for. Though, my ToC is also affected by this: , and I would like to make my ToC look normal, like nothing has happened to it. I wrote titleformat in order to get the look from the first picture, but is there a way which configures the ToC look so that it can look normal? My coding looks like this:

\titleformat{\section}[display]{ \scshape \bfseries }{}
{3ex}

\titlespacing*{\section}{0pt}{2in}{10ex}

Thanks, and happy new year!

• \tableofcontents uses \section* (in an article - like class), your \titleformat does not take care of \section*, but is a sledge-hammer for all \section macros, \section is basically a wrapper for more code that checks whether it is the \section* or the real unstarred version of it. – user31729 Dec 31 '17 at 15:55
• A solution is to shift the \titleformat content after \tableofcontents. And please post complete code, not only fragments – user31729 Dec 31 '17 at 15:59
• Christian Hupfer's solution worked, thanks a lot. Happy New Year! – Cazo Dec 31 '17 at 16:03

The number (the label in the terminology of titlesec) belongs in the third argument of titleformat:

\RequirePackage{fix-cm}
\documentclass{article}
\usepackage{titlesec}
\usepackage[dvipsnames]{xcolor}

\titleformat{\section}
{\scshape \bfseries}
{\fontsize{149}{50}\selectfont \color{ForestGreen} \thesection}
{20pt}
{\Huge}

%\titlespacing*{\section}{0pt}{2in}{10ex}

\begin{document}
\tableofcontents
\section{abc}
blblbl

\end{document}

• Thanks a lot, this worked! My mistake, happy new year! :) – Cazo Jan 1 '18 at 2:37


text:
# A geometry problem by Pankaj Joshi

Geometry Level 2

If the area of a cyclic quadrilateral ABCD is $$\frac{3*\{\sqrt3\}}{4}$$. The radius of the circle circumscribing it is 1 . If AB = 1 , BD = $$\sqrt3$$ , then evaluate BC.CD

×


text:
Infoscience

Journal article

# Automatic Tonal Harmonization for Multi-Spectral Mosaics

When producing a mosaic of multiple multi-spectral images one needs to harmonize the colours so that the tone transition is smooth from one image to the other. Given two images $Im ^{ a }$ and $Im ^{ b }$ , a transform T is sought to map $Im ^{ b }$ to an image that is harmonious in multi-spectral appearance to $Im ^{ a }$ . We give the above problem of tonal harmonization an analytical framework, in which both ideal and practical solutions of the problem are studied. Using a physically motivated image formation model, we prove that a perfect tonal harmonizing operator cannot in general be found, but that whenever such an operator exists it is linear. In the latter case, finding the optimal harmonizing transformation can be cast as a linear programme (LP), which is a type of problem that can be efficiently solved using known techniques. Finally, strong empirical evidence is provided for the efficacy of the proposed solution.

#### Reference

• EPFL-ARTICLE-211426

Record created on 2015-09-18, modified on 2016-08-09


text:
Welcome, Guest. Please login or register.Did you miss your activation email? March 21, 2018, 01:05:50 AM 1,514,539 Posts in 45,359 Topics by 1,082 Members Latest Member: viagra without a doctor p
 0 Members and 1 Guest are viewing this topic.
 Pages: [1]
 Author Topic: What does your moral compass come from?  (Read 1020 times)
JohnnyRingo2
Mershaq

JohnnyRingo2

Posts: 42
Quota: 0%
Doodthingocity: 0
Lüts: 4294.00

Windows 7

Firefox 30.0

 « on: July 24, 2014, 08:07:38 PM »

I was wondering this, because on one hand I believe that all values and ethics are intrinsically arbitrary. Society categorizes what is beneficial or detrimental and calls it good and evil.

But then, there are certain actions that are never deemed permissible for normal individuals on any level. Rape, pedophilia, necrophilia and unprovoked murder are universally condemned. It's clear our moral compass is not only a societal function, but the product of some intrinsic value set within us.

Individuals who commit most of these acts routinely usually fall within the category of highly anti-social or psychopaths. I believe it is our sense of empathy that allows us to feel wronged in some capacity for others we wrong or see wronged, and I believe that social interaction instills within us a sense of group identification. See a man hit his finger with a hammer and you'll reflexively grimace, see a man cheated on by a lover and you may feel a sense of injustice.

What are your thoughts? How do you decide which actions you will not take, and furthermore, why do you not take them?
 Logged
SVT
fly
Secret Muslim

silvertone

Posts: 23,172
Quota: 0.67%
Doodthingocity: 2
Lüts: 2397.00

Windows NT 6.3

Firefox 30.0

 « Reply #1 on: July 27, 2014, 04:26:20 AM »

people had sex w/ boys and no one gave a fuck back in socrate's time ...

 Logged

YPargh
Aracde Champion
Manager

I like sports.

Posts: 46,139
Quota: 4.22%
Doodthingocity: -104
Lüts: 109447.06

Android

Webkit

 « Reply #2 on: July 27, 2014, 03:33:38 PM »

Rape, pedophilia, murder are considered evil to most people but on an individual basis or in certain historical instances they have been seen as justifiable. And if you can manage to rationalize your misbehavior odds are you will repeat your actions and soon they will come without second thoughts which stem from an internal debate of right or wrong.

I myself have done this with sex. Old YPR would find my actions reprehensible. Current YPR hardly thinks about it. It's kind of sad really. Other members have justified their shoplifting by condemning corporations but really they're just convincing themselves that their illegal gains are acceptable. It is akin to a dog getting a taste for blood. A dog may have never considered killing another animal but once they gain the flavor they become repeat offenders. Of course these behaviors can be modified but often not without external help.

My initial moral compass came from my religion and parents. It has obviously been somewhat altered from its origins. My religion does not approve of premarital sex. My parents do not approve of drugs. I really wish i was not such a product of my environment sometimes. Seems like manipulation
 Logged

Nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp. Nyerp nyerp, nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp? Nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp........nyerp nyerp nyerp nyerp. Nyerp nyerp nyerp nyerp. Nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp, nyerp.
Alexis
Sympa
Christman

Thyme

Posts: 40,470
Quota: 1.67%
Doodthingocity: 31
Lüts: 162036.32

Windows 7

Firefox 30.0

 « Reply #3 on: July 27, 2014, 03:55:39 PM »

i'm such a shallow motherfucker lol;

mine is pretty much the silver rule

i'm too lazy and selfish to follow the golden rule
 « Last Edit: July 27, 2014, 04:00:05 PM by Boyah 2: This Thyme It’s Personal » Logged

JohnnyRingo2
Mershaq

JohnnyRingo2

Posts: 42
Quota: 0%
Doodthingocity: 0
Lüts: 4294.00

Windows 7

Firefox 30.0

 « Reply #4 on: July 27, 2014, 08:14:27 PM »

*Hella lengthy quote*
That makes sense. I've often wondered then why do we feel the need to rationalize our actions to ourselves at all? The shoplifting example, it might assuage your guilt thinking your actions are justifiable because the corporation but why even bother rationalizing them? What is it in us that makes us feel the need to lie to ourselves about our motivations. I've been in multiple situations in which I'd tell myself "I'm only going in for a drink" or "They've got enough people without me" knowing somewhere in my mind that was a blatant lie, but it was a lie that was comfortable like intent was what made the thing wicked.

If I was honest, a lot of the reasons I do charity work is because it feels good to be recognized and to help. My morality here is self-serving in that it helps my social standing and boosts my morale.
 Logged
YPargh
Aracde Champion
Manager

I like sports.

Posts: 46,139
Quota: 4.22%
Doodthingocity: -104
Lüts: 109447.06

Android

Webkit

 « Reply #5 on: July 27, 2014, 09:13:19 PM »

Well no one wants to think of themselves as the bad guy. Everyone is writing their own story and considers themselves the protagonist. Even in cases of mass murder such as the holocaust the directors of such atrocitie believe ttheir actions to be for the better, in that case ridding vermin and vice from German society. It would be hard to act on that without a rationalization. The many soldiers who did not share the belief but acted within the camps could rationalize horrific actions by telling themselves they were just following orders and/or preserving their own livelihood. For those who are unable to rationalize their own actions as either moral or as a special exception will find themselves deeply depressed. In the case of such horrible actions, people have been known to kill themselves, unwilling to live with themselves and pretending what they have done is okay. They are their own judge and jury, already knowing the verdict. Rationalization can therefore act as a survivalmmechanism, protecting us from even our own judgment and allowing us to carry on as an exceptional person whose own motives are innocent.

Volunteer work is of course, honorable. Even if done for purely selfish reasons it is still helpful to others. Volunteer work of course can also be a punishment, whether imposed by court or by oneself. There is no monetary gain but a spiritual one that helps to make one feel like a better person that whatever action they or the court are punishing themselves for. It can even be a form of rejection of society. A society that would allow people to suffer... Time from that world is shunned for time with a people possibly  considered more pure since they are perceived to be less greedy and corrupt - the less fortunate. It is hard to make a truly selfless action so don't feel bad about it. We're wired to work for ourselves whether the rewards are monetary, emotional, spiritual, or for recognition; whether in the short or long term. If you got nothing out of volunteering you probably wouldn't do it. Really that you're willing to donate your time just to feel a sort of social superiority is hardly offensive  considering the actual benefit you're providing others
 Logged

Nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp. Nyerp nyerp, nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp? Nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp........nyerp nyerp nyerp nyerp. Nyerp nyerp nyerp nyerp. Nyerp nyerp nyerp nyerp nyerp nyerp nyerp nyerp, nyerp.
Lifetrends
Director

Eager Beaver

infinitefluxury

Posts: 9,499
Quota: 0%
Doodthingocity: 42
Lüts: 171087.00

Mac OS X

Chrome 38.0.2104.0

 « Reply #6 on: July 29, 2014, 04:23:14 PM »

Super-ego
 Recent Track: Dethroned Emperor - Celtic Frost Logged

$HARD AS ROCK COLD AS ICE AHHHH$
 Pages: [1]


text:
Publication
Title
The determination of the Dirac density matrix of the d-dimensional harmonic oscillator for an arbitrary number of closed shells
Author
Abstract
 In 1959, March and Young (Nucl. Phys. 12 237) rewrote the equation of motion for the Dirac density matrix gamma(x, x(0)) in terms of sum and difference variables. Here, gamma((r) over right arrow, (r) over right arrow (0)) for the d-dimensional isotropic harmonic oscillator for an arbitrary number of closed shells is shown to satisfy, using the variables \(r) over bar + (r) over bar (0)\/2 and \(r) over right arrow - (r) over right arrow (0)\/2, a generalized partial differential equation embracing the March-Young equation for d = 1. As applications, we take in turn the cases d = 1, 2, 3 and 4, and obtain both the density matrix gamma((r) over right arrow,(r) over right arrow (0)) and the diagonal density rho(r) = gamma((r) over right arrow, (r) over right arrow (0))\((r) over right arrow0=(r) over right arrow), this diagonal element already being known to satisfy a third-order linear homogeneous differential equation for 1 through 3. Some comments are finally made on the d-dimensional kinetic energy density, which is important for first-principles density functional theory in allowing one to bypass one-particle Schrodinger equations (the so-called Slater-Kohn-Sham equations).
Language
English
Source (journal)
Journal of physics: A: mathematical and general. - London, 1968 - 2006
Publication
London : 2002
ISSN
0305-4470
Volume/pages
35:24(2002), p. 4985-4997
ISI
000176858400004
Full text (Publisher's DOI)
Full text (publisher's version - intranet only)
UAntwerpen
 Faculty/Department Research group Publication type Subject Affiliation Publications with a UAntwerp address


text:
# Making a newspaper entrytype based on the article entrytype

I'm having a great deal of difficulty with defining a newspaper entrytype and adjusting the citation style to match my university's guidelines. I'm required to use Harvard format, so my newspaper entries need to look like:

Norton, A 2011, 'Why teaching must be rated', The Age, 11 October, viewed 13 October 2011, link

@Article format is close, and looks like:

but I need to know how to insert the day and month after the journaltitle.

MWE

\documentclass[a4paper,10pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[british]{babel}
\usepackage[style=authoryear,backend=biber,eprint=false]{biblatex}
\usepackage{csquotes}
\usepackage{filecontents}

\begin{filecontents*}{\jobname.bib}
@online{VCAA,
Author  = {{Victorian Curriculum and Assessment Authority}},
Title   = {The {Australian} Curriculum in {Victoria}},
Year    = 2015,
url     = {<http://ausvels.vcaa.vic.edu.au/>},
Urldate = {2015-03-18}}

@article{SMH,
Author  = {McNeilage, A.},
Title   = {Computer science reforms to test teachers' skills},
Journal = {Sydney Morning Herald},
Month   = jan,
day     = 12,
Year    = 2014,
url     = {<http://www.smh.com.au/national/computer-science-reforms-to-test-teachers-skills-20140111-30nj4.html>},
urldate = {2015-03-18},
entrysubtype = {newspaper}}

@article{DigitalNative,
Author      = {Demirbilek, M.},
Title       = {The ‘digital natives’ debate: an investigation of the digital
propensities of university students},
Journaltitle = {Eurasia Journal of Mathematics, Science \& Technology Education},
Year        = {2014},
volume      = {10},
number      = {2},
pages       = {115--123}}

@article{scratch,
Author = {Resnick, M. and Maloney, J. and  Monroy-Hern\'andez, A. and others},
title = {Scratch: programming for all},
Journaltitle = {Communications of the ACM},
number = {11},
year = {2009},
volume = {52},
pages = {60--67}}

@article{itwire,
Author = {Philipson, G.},
Title = {Parents ‘want kids taught digital skills’},
Year = 2015,
Month = feb,
day = 23,
url = {<http://www.itwire.com/government-tech-news/govenrment-tech-policy/67067-parents-%E2%80%98want-kids-taught-digital-skills%E2%80%99>},
urldate={2015-03-18},
Journal = {iTwire},
entrysubtype = {newspaper}}

@article{guardian,
Author = {Williams, R.},
Title = {Why, and how, to teach computer hacking.},
Year = {2015},
Month = feb,
url =  {<http://www.theguardian.com/education/2015/jan/06/computer-hacking-security-teaching-schools>},
day = {6},
urldate={2015-03-20},
Journal = {The Guardian},
entrysubtype = {newspaper}}
\end{filecontents*}

\addbibresource{\jobname.bib}
\DefineBibliographyStrings{english}{%
urlseen = {Accessed},
}

\DeclareNameAlias{sortname}{last-first}
\DeclareNameAlias{default}{last-first}
\renewbibmacro{in:}{%
\ifentrytype{article}{}{\printtext{\bibstring{in}\intitlepunct}} % suppress in if not article
}
\DeclareFieldFormat{url}{\url{#1}}

\patchcmd{\bibsetup}{\interlinepenalty=5000}{\interlinepenalty=10000}{}{}
\begin{document}
Critics to this sort of adjustment may well point to under-training
of teachers  as a significant barrier to implement any kind of drastic
overhaul of the ICT curriculum \parencite{guardian}.
\end{document}

My bib file is here, and an example .tex is here.

If there's a step by step guide to doing this for those who are new to BibLaTeX that would elaborate how to make new entrytypes based on existing ones, that would be most helpful.

• Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. When you provide a MWE it is encouraged to make it so minimal that you can post it in source-code form verbosely into your question. (I have copy-pasted your MWE to here and only deleted a few lines that have nothing to do with the problem at hand.) – moewe Mar 22 '15 at 6:46
• @moewe I am looking for answer to a very similar question. Can you or someone else may be able to help with this? – Dr Krishnakumar Gopalakrishnan Feb 8 '19 at 19:46
• @Krishna I suggest you ask a new question with your requirements and what you have so far. I don't remember why this question here in particular got nowhere, but it is always easier if there can be direct communication and it doesn't have to go via a third-party question. If it turns out that the questions are extremely similar we can always close this one here as a duplicate of the new one (some purists might object, but I think that would be reasonable if they are similar enough). – moewe Feb 9 '19 at 7:07

## 1 Answer

Interesting exercise. Definition of "like" is going to be key.

First step is seeing what styles are closest. The @article bib entry type contains only data; all formatting, parsing and processing is done by the style coding.

Before we start: Some minor things in the .bib file, not crucial, but helps keep things tidier for later.

For quotation marks in titles, do not hard code them, use \mkbibquote instead. It will take care of quote nesting, and work in conjunction with the csquotes package.

Title = {Parents \mkbibquote{want kids taught digital skills}},

For dates, I put them in ISO format in the date field.

date = {2014-01-12}

Biblatex is quite adept at dates (and names) and will parse them into their components and recombine and reformat them as required.

Having the newspapers in their own entry, a @periodical entry, is also handy. The child @article entry then needs a crossref field, to inherit everything from the parent @periodical.

@periodical{j1,journaltitle={The Sydney Morning Herald},location={Sydney},date = {2014-01-12}}

@article{SMH,
Author  = {McNeilage, A.},
Title   = {Computer science reforms to test teachers' skills},
url     = {<http://www.smh.com.au/national/computer-science-reforms-to-test-teachers-skills-20140111-30nj4.html>},
urldate = {2015-03-18},
entrysubtype = {newspaper},
crossref={j1},
}

Part 1 A whirlwind tour of some biblatex styles that do author-year ("Harvard") styling in various ways.

OXYEAR

BATH

NOTTINGHAM

PHILOSOPHY-MODERN

Rather elegant.

TRAD-ALPHA

MLA

Wise choice when it comes to URLs.

APA

Part 2

Now, biblatex is, in effect, a programming language, and what the biblatex style writers do is, using the raw input data from the .bib file, fields and constraints are defined; parts of components are derived and calculated; components are built up into citation and bibliographic component blocks and sub-blocks, then into bibmacros (which can then form part of more complex bibmacros) and then those go in the entry type's "driver".

In the case at hand, randomly taking the oxyearbiblatex style as a starting point (and it is already building on the default biblatex styles and defining and redefining and xpatching all over the place, across multiple files, very astutely), and stepping through our required changes one at a time:

First: Tracking down the part that prints the url and date, it turns out to be a bibmacro called url+urldate

Here it is:

\newbibmacro*{url+urldate}{%
\usebibmacro{url}%
\iffieldundef{urlyear}
{}
{\setunit*{\addspace}%
\usebibmacro{urldate}}}

It prints the URL, and, if there is a URL-seen date, prints that date with a space before the date. We need to reverse the seen-date and the URL, so that the URL comes last.

Let's redefine the bibmacro to print space + seen-date + colon + space + URL (we'll do this in the preamble of our current document, but in a proper style definition, the code would be in its own file(s)).

\newbibmacro*{url+urldate}{%
\iffieldundef{urlyear}
{}
{\setunit*{\addspace}%
\usebibmacro{urldate}%
\addcolon\addspace\usebibmacro{url}
}%if
}

But urldate is formatted to have the local language equivalent of the word "seen" + space put before the date.

\DeclareFieldFormat{urldate}{\bibstring{urlseen}\space#1}

We want it to say "viewed" (when the language is English).

All string constants are defined in the matching .lbx file, usually named after the language. We'll make a custom file (call it pcc\jobname.lbx). It will contain:

\NewBibliographyString{urlviewed}
\DeclareBibliographyStrings{%
inherit   = {english},
urlviewed     = {{viewed}{viewed}},
}

The bibstring urlviewed is defined with the full form of the string constant that we want, and the abbreviated form. In this case, both are the same.

The inherit is important, because otherwise biblatex will not know, for example, what "Jan" means.

And in our preamble we map to the file with:

\DeclareLanguageMapping{english}{pcc\jobname}

Running the code produces output, including a dot at the end of the item in the bibliography: the reader will ask, "Is the dot part of the URL?"

To visually identify the URL, we will wrap it with "<" and ">".

Back to the .lbx, which now reads:

\NewBibliographyString{urlviewed,urlleftangle,urlrightangle}
\DeclareBibliographyStrings{%
inherit   = {english},
urlviewed     = {{viewed}{viewed}},
urlleftangle     = {{<}{<}},
urlrightangle     = {{>}{>}},
}

We need to update the bibmacro definition to include these bibstrings.

\newbibmacro*{url+urldate}{%
\iffieldundef{urlyear}
{}
{\setunit*{\addspace}%
\usebibmacro{urldate}%
\addcolon\addspace\bibstring{urlleftangle}\usebibmacro{url}\bibstring{urlrightangle}
}%if
}

Note for the curious: for items without a URL, what in the code above stops "<>" from being printed at the end of the item?

Next is converting the newspaper name (journaltitle) to plain text, not italics. That is (luckily) done within this style by redefining the formatting directive to just print the value (#1, for the current bib item being processed) without any adornment:

\DeclareFieldFormat{journaltitle}{#1}

The original definition doing the emphasis is:

\DeclareFieldFormat{journaltitle}{\mkbibemph{#1}}

Next is the date with brackets after the author name. That is done via bibmacro date+extradate, with the year part of date coming from the internally-derived field labelyear, so we can redefine the bracketless bibmacro as:

\renewbibmacro{date+extradate}{%
\addspace\printfield{labelyear}%
}

Next is the (day-month-year) after the newspaper name: remove the brackets, and only show day and month (and a comma). Luckily, the style writers are consistent, and the day and month components of date are stored in labelday and labelmonth (in this style). There is also a handy biblatex macro that can convert the year-month-day numbers into text (remember the .lbx file, with its inherit?). So we have:

\renewbibmacro{issue+date}{%
\addcomma\addspace\mkbibdatelong{}{labelmonth}{labelday}%
}

That's it.

Result:

(except for removing the dot after the author's name - that may be left as an exercise for the reader).

MWE:

\documentclass[a4paper,10pt]{article}
%\usepackage[utf8]{inputenc}
\usepackage[british]{babel}
\newcommand\abibstyle{style=oxyear}
\usepackage[
\abibstyle ,
%   style=authoryear-ibid,
%   backend=biber,
eprint=false,
]{biblatex}
\newcommand\mynote{biblatex option used: \texttt{\abibstyle}, tweaked in half a dozen places.}
\defbibnote{abibnote}{\mynote}
\usepackage{csquotes}

\usepackage{filecontents}

\begin{filecontents*}{pcc\jobname.lbx}
\NewBibliographyString{urlviewed,urlleftangle,urlrightangle}
\DeclareBibliographyStrings{%
inherit   = {english},
urlviewed     = {{viewed}{viewed}},
urlleftangle     = {{<}{<}},
urlrightangle     = {{>}{>}},
}
\end{filecontents*}

\begin{filecontents*}{\jobname.bib}
@online{VCAA,
Author  = {{Victorian Curriculum and Assessment Authority}},
Title   = {The {Australian} Curriculum in {Victoria}},
Year    = 2015,
url     = {<http://ausvels.vcaa.vic.edu.au/>},
Urldate = {2015-03-18}}

@periodical{j1,journaltitle={The Sydney Morning Herald},location={Sydney},date = {2014-01-12}}

@article{SMH,
Author  = {McNeilage, A.},
Title   = {Computer science reforms to test teachers' skills},
url     = {<http://www.smh.com.au/national/computer-science-reforms-to-test-teachers-skills-20140111-30nj4.html>},
urldate = {2015-03-18},
entrysubtype = {newspaper},
crossref={j1},
}

@article{DigitalNative,
Author      = {Demirbilek, M.},
Title       = {The \mkbibquote{digital natives} debate: an investigation of the digital
propensities of university students},
Journaltitle = {Eurasia Journal of Mathematics, Science \& Technology Education},
Year        = {2014},
volume      = {10},
number      = {2},
pages       = {115--123}}

@article{scratch,
Author = {Resnick, M. and Maloney, J. and  Monroy-Hern\'andez, A. and others},
title = {Scratch: programming for all},
Journaltitle = {Communications of the ACM},
number = {11},
year = {2009},
volume = {52},
pages = {60--67}}

@periodical{j2,journaltitle={iTwire},date = {2015-02-23},}

@article{itwire,
Author = {Philipson, G.},
Title = {Parents \mkbibquote{want kids taught digital skills}},
%  Year = {2015},
%  Month = {2},
%  day = {23},
url = {<http://www.itwire.com/government-tech-news/govenrment-tech-policy/67067-parents-%E2%80%98want-kids-taught-digital-skills%E2%80%99>},
urldate={2015-03-18},
%  Journal = {iTwire},
entrysubtype = {newspaper},
crossref={j2},
}

@periodical{j3,journaltitle={The Guardian},date={2015-02-06},}

@article{guardian,
Author = {Williams, R.},
Title = {Why, and how, to teach computer hacking.},
%  Year = {2015},
%  Month = feb,
url =  {<http://www.theguardian.com/education/2015/jan/06/computer-hacking-security-teaching-schools>},
%  day = {6},
urldate={2015-03-20},
entrysubtype = {newspaper},
crossref={j3},
}
\end{filecontents*}

\addbibresource{\jobname.bib}

%The .lbx file: has the string definitions:
\DeclareLanguageMapping{english}{pcc\jobname}

%\DefineBibliographyStrings{english}{%
%  urlseen = { {Accessed}{Accessed}},
%}

%\DeclareNameAlias{sortname}{last-first}
%\DeclareNameAlias{default}{last-first}
%\renewbibmacro{in:}{%
%  \ifentrytype{article}{}{\printtext{\bibstring{in}\intitlepunct}} % suppress in if not article
%}
%\DeclareFieldFormat{url}{\url{#1}}
%
%\patchcmd{\bibsetup}{\interlinepenalty=5000}{\interlinepenalty=10000}{}{}

%Orig: biblatex.def
%\DeclareFieldFormat{urldate}{\mkbibparens{\bibstring{urlseen}\space#1}}
\DeclareFieldFormat{urldate}{\bibstring{urlviewed}\space#1}

%Orig:
%\newbibmacro*{url+urldate}{%
%  \usebibmacro{url}%
%  \iffieldundef{urlyear}
%    {}
%    {\setunit*{\addspace}%
%     \usebibmacro{urldate}}}

%redefine as without italics:
\DeclareFieldFormat{journaltitle}{#1}

%For exploring:
%\newbibmacro*{url+urldate}{%
%  \iffieldundef{urlyear}
%       {}
%       {\setunit*{\addspace}%
%     \usebibmacro{urldate}%
%     \addcolon\addspace\bibstring{urlleftangle}\usebibmacro{url}\bibstring{urlrightangle}\usebibmacro{date} \printfield{title} \printnames{author} xxx\printfield{datelabel} yyy\printfield{labeldate} zzz \usebibmacro{date+extradate} aaa \printfield{labelyear} bbb \printfield{labelday} ccc \printfield{labelmonth} ddd \printfield{title} \usebibmacro{title} \usebibmacro{labeltitle} eee \mkbibdatelong{}{labelmonth}{labelday}       fff \printfield{citetitle} ggg \printfield{shorttitle} hhh \usebibmacro{title} iii \usebibmacro{journal+issuetitle} jjj \printfield{issuetitle} kkk \printfield{title} lll \printfield{journaltitle} mmm \usebibmacro{date} nnn \usebibmacro{issue} ooo  \usebibmacro{issue+date}%
%   }%if
%}

\newbibmacro*{url+urldate}{%
\iffieldundef{urlyear}
{}
{\setunit*{\addspace}%
\usebibmacro{urldate}%
\addcolon\addspace\bibstring{urlleftangle}\usebibmacro{url}\bibstring{urlrightangle}
}%if
}

%(yyyy) > yyyy
\renewbibmacro{date+extradate}{%
\addspace\printfield{labelyear}%
}

%(dd mmm yyyy) > dd mmm,
\renewbibmacro{issue+date}{%
\addcomma\addspace\mkbibdatelong{}{labelmonth}{labelday}%
}

%italic journal title (issue date) > plain title, date, :
%\newbibmacro
%\renewbibmacro{journal+issuetitle}{%
%   \def\mytemp{\usebibmacro{journal+issuetitle}}
%   \mytemp\addcomma\addspace\mkbibdatelong{}{labelmonth}{labelday}\addcomma\addspace
%}

%\renewbibmacro{journaltitle}{%
%   \addspace\printfield{labelyear}%
%}

%\DeclareFieldFormat{datelabel}{\mkbibparens{#1}}
%\DeclareFieldFormat{labeldate}{%
%  \iflabeldateisdate{%
%    \def\currentfield{date}%
%  }{%
%    \iflabeldateisanydate{%
%      \def\currentfield{\thefield{labeldatesource}date}%
%    }{%
%      \def\currentfield{\thefield{labeldatesource}}}}%

%\newbibmacro*{date}{\mkbibbold{\printdate{date}}}
%\renewbibmacro*{date}{xxx\printdate}

\begin{document}
Need to format \texttt{@article} entry \texttt{newspaper} subentry in the bibliography as \begin{quotation}Norton, A 2011, 'Why teaching must be rated', The Age, 11 October, viewed 13 October 2011, link\end{quotation}

Critics to this sort of adjustment may well point to under-training
of teachers  as a significant barrier to implement any kind of drastic
overhaul of the ICT curriculum \autocite{guardian}.

And also \autocite{SMH}. Text itwire \autocite{itwire}.

Not online: \autocite{scratch}.

\printbibliography[prenote=abibnote]
\end{document}

Part 3

That took about six or so (leisurely-paced) hours. What we need is a plug-and-playable modification ability. Currently, the code is, shall I say?, "linear" and layered, and style-builders may easily get their declarations and IFs "interlocked" in terms of logic and sequence. On the other hand, there is a linguistic-like elegance in the structures at a meta-level, so open-ended and not constrained.

P.S. IN terms of time to expend, I expect your university was asking you to do something like Part 1. If you were being asked to do Part 2, could you please also invent a new three-dimensional Dewey classification system at the same time? :) It would be a great addition and handy to see knowledge as if along the planes and orientations of a crystalline or snowflake structure.

Part 4 To answer the question, a similar type of exercise would have to be done with the original MWE's style=authoryear style, if that were the one to be used.

=== Edit:

Moewe is quite right in the comments, from the contents of the bib file all the way to the methods of assembling the units, there are better and more efficient ways than the rudimentary hacks presented here. (In effect, the intention was to see how and what a set of change instructions would begin to look like, and the time and effort involved; there is not even a logical certainty that the changes would even work in the @article class beyond the four bib entries in the example (indeed, as moewe shows, in items 3, 5 and 6 on the comments)).

Note the date hack breaks very easily in other styles.

Further, the changes done do not take into consideration all possible scenarios that a usable style should and ought (missing data, different data, non-article entry types, or in combinations, for example like "when the url was seen in footcites too when the author is unknown" as a different question asks). Something may break anywhere along there.

Also, testing the changes on the other styles revealed that most of them will need additional general tweaking, especially so for the date processing. Different style authors do things different ways.

So tweaking must then have a defined purpose and a specific boundary of application.

How well do the changes live with other styles?

Testing against other styles:

authoryear - OK

apa - different date fields used for the article; URL date missing the 'viewed' text

mla - different date fields used; long journal title difference (treated like a name?); URL has doubled << and >>; style uses a print bibstring for ending the segment, and the bibstring is undefined (unstranslated) for the non-online entry

trad-alpha - different date fields

philosophy-modern - different date fields; it affected indentation of the first line

nottsclassic - OK; viewed date doesn't convert to month-name, though

bath - OK; adds [Online] to journal title; but inserts "Available from: " in front of the URL, before the < and > are added.

• +1: Interesting read. May I suggest one or two things, though? In no particular order (1) When you clean up the .bib entries I would also remove the <...> in the url fields. It seems that Biber strips outer <...> from URLs automatically, but this is not something I would want to rely on (and BibTeX users can't rely on that) and it breaks with the "The url field should contain only the raw URL" rule, which I like. (2) You can redefine the predefined bibstring urlseen instead of a new string urlviewed. – moewe Mar 30 '19 at 15:55
• (3) It is a bit of judgement call, but I would not use bibstrings to wrap the URL in <...> instead I would probably define a macro for that (cf. \mkbiburlangle in tex.stackexchange.com/q/446633/35864) and apply it in the field format. (4) If at all possible I would avoid bare \add... punctuation commands in bibmacros: they should either be wrapped in a \setunit/\printunit or appear in a field format. (In the case of \addcolon\addspace in url+urldate I would probably use the \setunit.) – moewe Mar 30 '19 at 16:00
• (5) The redefinition of date+extradate as \addspace\printfield{labelyear} also breaks the "no bare \add..." rule. It also completely disables the mergedate feature (that might be desired to some degree) and other date controls that biblatex offers. You will also not get the little disambiguation letter for works by the same author from the same year. For the standard styles the parentheses can be removed as explained in tex.stackexchange.com/q/428190/35864 for oxref styles you can just say \DeclareFieldFormat{datelabel}{#1}. – moewe Mar 30 '19 at 16:07
• ... cf tex.stackexchange.com/q/476416/35864 for biblatex-bath, which was written by the same author. (6) Structurally similar issues apply to the redefinition of issue+date. I don't quite like the raw \mkbibdatelong{}{labelmonth}{labelday} but I have to admit that I have no idea at the moment for a better alternative. – moewe Mar 30 '19 at 16:11


text:
• ### Optical Characterization of the SPT-3G Focal Plane(1805.03219)

The third-generation South Pole Telescope camera is designed to measure the cosmic microwave background across three frequency bands (95, 150 and 220 GHz) with ~16,000 transition-edge sensor (TES) bolometers. Each multichroic pixel on a detector wafer has a broadband sinuous antenna that couples power to six TESs, one for each of the three observing bands and both polarization directions, via lumped element filters. Ten detector wafers populate the focal plane, which is coupled to the sky via a large-aperture optical system. Here we present the frequency band characterization with Fourier transform spectroscopy, measurements of optical time constants, beam properties, and optical and polarization efficiencies of the focal plane. The detectors have frequency bands consistent with our simulations, and have high average optical efficiency which is 86%, 77% and 66% for the 95, 150 and 220 GHz detectors. The time constants of the detectors are mostly between 0.5 ms and 5 ms. The beam is round with the correct size, and the polarization efficiency is more than 90% for most of the bolometers
• In the context of the ESA M5 (medium mission) call we proposed a new satellite mission, Theia, based on relative astrometry and extreme precision to study the motion of very faint objects in the Universe. Theia is primarily designed to study the local dark matter properties, the existence of Earth-like exoplanets in our nearest star systems and the physics of compact objects. Furthermore, about 15 $\%$ of the mission time was dedicated to an open observatory for the wider community to propose complementary science cases. With its unique metrology system and "point and stare" strategy, Theia's precision would have reached the sub micro-arcsecond level. This is about 1000 times better than ESA/Gaia's accuracy for the brightest objects and represents a factor 10-30 improvement for the faintest stars (depending on the exact observational program). In the version submitted to ESA, we proposed an optical (350-1000nm) on-axis TMA telescope. Due to ESA Technology readiness level, the camera's focal plane would have been made of CCD detectors but we anticipated an upgrade with CMOS detectors. Photometric measurements would have been performed during slew time and stabilisation phases needed for reaching the required astrometric precision.
• ### Quasars can be used to verify the parallax zero-point of the Tycho-Gaia Astrometric Solution(1511.01896)

Nov. 17, 2015 astro-ph.IM
Context. The Gaia project will determine positions, proper motions, and parallaxes for more than one billion stars in our Galaxy. It is known that Gaia's two telescopes are affected by a small but significant variation of the basic angle between them. Unless this variation is taken into account during data processing, e.g. using on-board metrology, it causes systematic errors in the astrometric parameters, in particular a shift of the parallax zero-point. Previously, we suggested an early reduction of Gaia data for the subset of Tycho-2 stars (Tycho-Gaia Astrometric Solution; TGAS). Aims. We aim to investigate whether quasars can be used to independently verify the parallax zero-point already in early data reductions. This is not trivially possible as the observation interval is too short to disentangle parallax and proper motion for the quasar subset. Methods. We repeat TGAS simulations but additionally include simulated Gaia observations of quasars from ground-based surveys. All observations are simulated with basic angle variations. To obtain a full astrometric solution for the quasars in TGAS we explore the use of prior information for their proper motions. Results. It is possible to determine the parallax zero-point for the quasars with a few {\mu}as uncertainty, and it agrees to a similar precision with the zero-point for the Tycho-2 stars. The proposed strategy is robust even for quasars exhibiting significant fictitious proper motion due to a variable source structure, or when the quasar subset is contaminated with stars misidentified as quasars. Conclusions. Using prior information about quasar proper motions we could provide an independent verification of the parallax zero-point in early solutions based on less than one year of Gaia data.
• ### Gaia astrometry for stars with too few observations - a Bayesian approach(1507.02963)

Aug. 22, 2015 astro-ph.IM
Gaia's astrometric solution aims to determine at least five parameters for each star, together with appropriate estimates of their uncertainties and correlations. This requires at least five distinct observations per star. In the early data reductions the number of observations may be insufficient for a five-parameter solution, and even after the full mission many stars will remain under-observed, including faint stars at the detection limit and transient objects. In such cases it is reasonable to determine only the two position parameters. Their formal uncertainties would however grossly underestimate the actual errors, due to the neglected parallax and proper motion. We aim to develop a recipe to calculate sensible formal uncertainties that can be used in all cases of under-observed stars. Prior information about the typical ranges of stellar parallaxes and proper motions is incorporated in the astrometric solution by means of Bayes' rule. Numerical simulations based on the Gaia Universe Model Snapshot (GUMS) are used to investigate how the prior influences the actual errors and formal uncertainties when different amounts of Gaia observations are available. We develop a criterion for the optimum choice of priors, apply it to a wide range of cases, and derive a global approximation of the optimum prior as a function of magnitude and galactic coordinates. The feasibility of the Bayesian approach is demonstrated through global astrometric solutions of simulated Gaia observations. With an appropriate prior it is possible to derive sensible positions with realistic error estimates for any number of available observations. Even though this recipe works also for well-observed stars it should not be used where a good five-parameter astrometric solution can be obtained without a prior. Parallaxes and proper motions from a solution using priors are always biased and should not be used.
• ### The Tycho-Gaia astrometric solution. How to get 2.5 million parallaxes with less than one year of Gaia data(1412.8770)

Dec. 30, 2014 astro-ph.SR, astro-ph.IM
Context. The first release of astrometric data from Gaia will contain the mean stellar positions and magnitudes from the first year of observations, and proper motions from the combination of Gaia data with Hipparcos prior information (HTPM). Aims. We study the potential of using the positions from the Tycho-2 Catalogue as additional information for a joint solution with early Gaia data. We call this the Tycho-Gaia astrometric solution (TGAS). Methods. We adapt Gaia's Astrometric Global Iterative Solution (AGIS) to incorporate Tycho information, and use simulated Gaia observations to demonstrate the feasibility of TGAS and to estimate its performance. Results. Using six to twelve months of Gaia data, TGAS could deliver positions, parallaxes and annual proper motions for the 2.5 million Tycho-2 stars, with sub-milliarcsecond accuracy. TGAS overcomes some of the limitations of the HTPM project and allows its execution half a year earlier. Furthermore, if the parallaxes from Hipparcos are not incorporated in the solution, they can be used as a consistency check of the TGAS/HTPM solution.
• ### Joint astrometric solution of Hipparcos and Gaia: A recipe for the Hundred Thousand Proper Motions project(1407.4025)

July 29, 2014 astro-ph.IM
The first release of astrometric data from Gaia is expected in 2016. It will contain the mean stellar positions and magnitudes from the first year of observations. For more than 100 000 stars in common with the Hipparcos Catalogue it will be possible to compute very accurate proper motions due to the time difference of about 24 years between the two missions. This Hundred Thousand Proper Motions (HTPM) project will be part of the first release. Our aim is to investigate how early Gaia data can be optimally combined with information from the Hipparcos Catalogue in order to provide the most accurate and reliable results for HTPM. The Astrometric Global Iterative Solution (AGIS) was developed to compute the astrometric core solution based on the Gaia observations and will be used for all releases of astrometric data from Gaia. We adapt AGIS to process Hipparcos data in addition to Gaia observations, and use simulations to verify and study the joint solution method. For the HTPM stars we predict proper motion accuracies between 14 and 134 muas/yr, depending on stellar magnitude and amount of Gaia data available. Perspective effects will be important for a significant number of HTPM stars, and in order to treat these effects accurately we introduce a scaled model of kinematics. We define a goodness-of-fit statistic which is sensitive to deviations from uniform space motion, caused for example by binaries with periods of 10-50 years. HTPM will significantly improve the proper motions of the Hipparcos Catalogue well before highly accurate Gaia- only results become available. Also, HTPM will allow us to detect long period binary and exoplanetary candidates which would be impossible to detect from Gaia data alone. The full sensitivity will not be reached with the first Gaia release but with subsequent data releases. Therefore HTPM should be repeated when more Gaia data become available.
• ### Improving distances to nearby bright stars: Combining astrometric data from Hipparcos, Nano-JASMINE and Gaia(1407.4270)

July 16, 2014 astro-ph.IM
Starting in 2013, Gaia will deliver highly accurate astrometric data, which eventually will supersede most other stellar catalogues in accuracy and completeness. It is, however, lim- ited to observations from magnitude 6 to 20 and will therefore not include the brightest stars. Nano-JASMINE, an ultrasmall Japanese astrometry satellite, will observe these bright stars, but with much lower accuracy. Hence, the Hipparcos catalogue from 1997 will likely remain the main source of accurate distances to bright nearby stars. We are investigating how this might be improved by optimally combining data from all three missions in a joint astrometric solu- tion. This would take advantage of the unique features of each mission: the historic bright-star measurements of Hipparcos, the updated bright-star observations of Nano-JASMINE, and the very accurate reference frame of Gaia. The long temporal baseline between the missions pro- vides additional benefits for the determination of proper motions and binary detection, which indirectly improve the parallax determination further. We present a quantitative analysis of the expected gains based on simulated data for all three missions.
• ### Combining and comparing astrometric data from different epochs: A case study with Hipparcos and Nano-JASMINE(1201.2849)

Jan. 13, 2012 astro-ph.IM
The Hipparcos mission (1989-1993) resulted in the first space-based stellar catalogue including measurements of positions, parallaxes and annual proper motions accurate to about one milli-arcsecond. More space astrometry missions will follow in the near future. The ultra-small Japanese mission Nano-JASMINE (launch in late 2013) will determine positions and annual proper motions with some milli-arcsecond accuracy. In mid 2013 the next-generation ESA mission Gaia will deliver some tens of micro-arcsecond accurate astrometric parameters. Until the final Gaia catalogue is published in early 2020 the best way of improving proper motion values is the combination of positions from different missions separated by long time intervals. Rather than comparing positions from separately reduced catalogues, we propose an optimal method to combine the information from the different data sets by making a joint astrometric solution. This allows to obtain good results even when each data set alone is insufficient for an accurate reduction. We demonstrate our method by combining Hipparcos and simulated Nano-JASMINE data in a joint solution. We show a significant improvement over the conventional catalogue combination.


text:
# Wrong use of asymptotic notation in the Multi-dimensional Arrays page

I’m learning Julia and, reading the documentations in the past days, I wrote down few comments on typos, unclear sentences, etc. I’m new to the community and I’m unsure whether I should directly open an issue on GitHub, and/or create a pull request.

For example, in the third sentence of the second paragraph of the Implementation section of the Multi-dimensional Arrays documentation page it is written

It is recommended that these operations have nearly constant time complexity, or technically Õ(1) complexity, as otherwise some array functions may be unexpectedly slow.

AFAIK, Õ(1)  is quite an abuse of notation, since \tilde O(f(n)) := O(f(n)\textrm{polylog}(f(n))), that is O(f(n)) up to polylogarithms of f(n) (see e.g. Wikipedia), while here it is used as if it meant up to polylogarithms of n.

I do think it should say O(\text{polylog}(n)) or \cup_{\epsilon > 0} O(n^\epsilon) to be clearer, and to be honest this is the first time seeing the soft O notation, so I am not as certain if it is commonly used.

I guess you mean \cap_{\epsilon>0} O(n^\epsilon), which I would call sub-polynomial, where with polynomial I refer to any function of the form n^c with c>0 (the latter terminology is customary in theoretical computer science, AFAIK). However, I think that here nearly-constant means at most polylogarithmic.

Perhaps I should open a pull request where I propose to remove the Õ(1), and avoid proposing to substitute it with something else.

I don’t know that there’s a true standard across the community, but my general impression is that issues are fine, but if there’s an obvious and concrete fix, and you’re willing to make the PR, just go for it. If there’s a CONTRIBUTING.md, read that first, just in case.

The only time I’d say it might be better to lead with an issue is if the fix will take a lot of effort, and you’re not sure that the fix is actually desired by the package maintainers.

2 Likes

compare Polylogarithm function:

with polynomial in the logarithm:

it would be good if you’re changing the docs not to make that confusion.

3 Likes


text:
# Conditional Maximum Likelihood for the Rasch Model

Tip

This example is also available as a Jupyter notebook: $rasch.ipynb$

The Rasch model is used in psychometrics as a model for assessment data such as student responses to a standardized test. Let $X_{pi}$ be the response accuracy of student $p$ to item $i$ where $X_{pi}=1$ if the item was answered correctly and $X_{pi}=0$ otherwise for $p=1,\ldots,n$ and $i=1,\ldots,m$. The model for this accuracy is

where $\xi_p > 0$ the latent ability of person $p$ and $\epsilon_i > 0$ is the difficulty of item $i$.

We simulate data from this model:

Random.seed!(123)
n = 1000
m = 5
theta = randn(n)
delta = randn(m)
r = zeros(n)
s = zeros(m)

for i in 1:n
p = exp.(theta[i] .- delta) ./ (1.0 .+ exp.(theta[i] .- delta))
for j in 1:m
if rand() < p[j] ##correct
r[i] += 1
s[j] += 1
end
end
end
f = [sum(r.==j) for j in 1:m];

Since the number of parameters increases with sample size standard maximum likelihood will not provide us consistent estimates. Instead we consider the conditional likelihood. It can be shown that the Rasch model is an exponential family model and that the sum score $r_p = \sum_{i} x_{pi}$ is the sufficient statistic for $\xi_p$. If we condition on the sum score we should be able to eliminate $\xi_p$. Indeed, with a bit of algebra we can show

where $\gamma_r(\mathbf\epsilon)$ is the elementary symmetric function of order $r$

where the sum is over all possible answer configurations that give a sum score of $r$. Algorithms to efficiently compute $\gamma$ and its derivatives are available in the literature (see eg Baker (1996) for a review and Biscarri (2018) for a more modern approach)

function esf_sum!(S::AbstractArray{T,1}, x::AbstractArray{T,1}) where T <: Real
n = length(x)
fill!(S,zero(T))
S[1] = one(T)
@inbounds for col in 1:n
for r in 1:col
row = col - r + 1
S[row+1] = S[row+1] + x[col] * S[row]
end
end
end

function esf_ext!(S::AbstractArray{T,1}, H::AbstractArray{T,3}, x::AbstractArray{T,1}) where T <: Real
n = length(x)
esf_sum!(S, x)
H[:,:,1] .= zero(T)
H[:,:,2] .= one(T)

@inbounds for i in 3:n+1
for j in 1:n
H[j,j,i] = S[i-1] - x[j] * H[j,j,i-1]
for k in j+1:n
H[k,j,i] = S[i-1] - ((x[j]+x[k])*H[k,j,i-1] + x[j]*x[k]*H[k,j,i-2])
H[j,k,i] = H[k,j,i]
end
end
end
end

esf_ext! (generic function with 1 method)

The objective function we want to minimize is the negative log conditional likelihood

ϵ = ones(Float64, m)
β0 = zeros(Float64, m)
last_β = fill(NaN, m)
S = zeros(Float64, m+1)
H = zeros(Float64, m, m, m+1)

function calculate_common!(x, last_x)
if x != last_x
copyto!(last_x, x)
ϵ .= exp.(-x)
esf_ext!(S, H, ϵ)
end
end
function neglogLC(β)
calculate_common!(β, last_β)
return -s'log.(ϵ) + f'log.(S[2:end])
end

neglogLC (generic function with 1 method)

Parameter estimation is usually performed with respect to the unconstrained parameter $\beta_i = -\log{\epsilon_i}$. Taking the derivative with respect to $\beta_i$ (and applying the chain rule) one obtains

where $\gamma_{r-1}^{(i)} = \partial \gamma_{r}(\mathbf\epsilon)/\partial\epsilon_i$.

function g!(storage, β)
calculate_common!(β, last_β)
for j in 1:m
storage[j] = s[j]
for l in 1:m
storage[j] -= ϵ[j] * f[l] * (H[j,j,l+1] / S[l+1])
end
end
end

g! (generic function with 1 method)

Similarly the Hessian matrix can be computed

$$\dfrac{\partial^2 \log L_C(\mathbf\epsilon|\mathbf{r})}{\partial \beta_i\partial\beta_j} =$$

where $\gamma_{r-2}^{(i,j)} = \partial^2 \gamma_{r}(\mathbf\epsilon)/\partial\epsilon_i\partial\epsilon_j$.

function h!(storage, β)
calculate_common!(β, last_β)
for j in 1:m
for k in 1:m
storage[k,j] = 0.0
for l in 1:m
if j == k
storage[j,j] += f[l] * (ϵ[j]*H[j,j,l+1] / S[l+1]) *
(1 - ϵ[j]*H[j,j,l+1] / S[l+1])
elseif k > j
storage[k,j] += ϵ[j] * ϵ[k] * f[l] *
((H[k,j,l] / S[l+1]) - (H[j,j,l+1] * H[k,k,l+1]) / S[l+1] ^ 2)
else #k < j
storage[k,j] += ϵ[j] * ϵ[k] * f[l] *
((H[j,k,l] / S[l+1]) - (H[j,j,l+1] * H[k,k,l+1]) / S[l+1] ^ 2)
end
end
end
end
end

h! (generic function with 1 method)

The estimates of the item parameters are then obtained via standard optimization algorithms (either Newton-Raphson or L-BFGS). One last issue is that the model is not identifiable (multiplying the $\xi_p$ by a constant and dividing the $\epsilon_i$ by the same constant results in the same likelihood). Therefore some kind of constraint must be imposed when estimating the parameters. Typically either $\epsilon_1 = 0$ or $\prod_{i=1}^m \epsilon_i = 1$ (which is equivalent to $\sum_{i=1}^m \beta_i = 0$).

con_c!(c, x) = (c[1] = sum(x); c)
function con_jacobian!(J, x)
J[1,:] .= ones(length(x))
end
function con_h!(h, x, λ)
for i in 1:size(h)[1]
for j in 1:size(h)[2]
h[i,j] += (i == j) ? λ[1] : 0.0
end
end
end
lx = Float64[]; ux = Float64[]
lc = [0.0]; uc = [0.0]
df = TwiceDifferentiable(neglogLC, g!, h!, β0)
dfc = TwiceDifferentiableConstraints(con_c!, con_jacobian!, con_h!, lx, ux, lc, uc)
res = optimize(df, dfc, β0, IPNewton())

 * Status: success

* Candidate solution
Minimizer: [1.48e+00, 8.80e-01, -9.81e-01,  ...]
Minimum:   1.302751e+03

* Found with
Algorithm:     Interior Point Newton
Initial Point: [0.00e+00, 0.00e+00, 0.00e+00,  ...]

* Convergence measures
|x - x'|               = 1.49e-08 ≰ 0.0e+00
|x - x'|/|x'|          = 1.01e-08 ≰ 0.0e+00
|f(x) - f(x')|         = 0.00e+00 ≤ 0.0e+00
|f(x) - f(x')|/|f(x')| = 0.00e+00 ≤ 0.0e+00
|g(x)|                 = 4.49e-12 ≤ 1.0e-08

* Work counters
Seconds run:   0  (vs limit Inf)
Iterations:    28
f(x) calls:    60
∇f(x) calls:   60

Compare the estimate to the truth

delta_hat = res.minimizer
[delta delta_hat]

5×2 Array{Float64,2}:
1.14112    1.48015
0.597106   0.880231
-1.30405   -0.981096
-1.2566    -0.955468
-0.706518  -0.423819


text:
# Reconciling two solutions to locus problem involving area of triangle and equations of the sides.

I was solving the following problem where I was unable to reach the same conclusion using two methods.

The problem :

The area of a triangle formed by the intersection of the line parallel to X-axis and passing through $$P(h,k)$$ with the lines $$y-x=0$$ and $$x+y=2$$ is $$4h^2$$. Find the locus of point $$P$$.

My solution :

I found the points of intersection to be $$A(1,1),B(k,k),C(2-k,k)$$ and then I used the formula given below to equate the area to $$4h^2$$. On simplification I got the following relationship as the locus : $$8h^2 = (2k-1)(k-1)$$

The formula :

\begin{align*} \text{Area} &= \frac12 \big| (x_A - x_C) (y_B - y_A) - (x_A - x_B) (y_C - y_A) \big|\\ &= \frac12 \big| x_A y_B + x_B y_C + x_C y_A - x_A y_C - x_C y_B - x_B y_A \big|\\ &= \frac12 \big|\det \begin{bmatrix} x_A & x_B & x_C \\ y_A & y_B & y_C \\ 1 & 1 & 1 \end{bmatrix}\big| \end{align*}

The solution in my book :

Since $$y+x=2$$ and $$y=x$$ are perpendicular, the area of the triangle can also be found using $$(1/2)AB*AC$$ where $$AB = \sqrt{2}*|k-1|$$ and $$AC=\sqrt{2}|k-1|$$.

This on simplification gives the locus to be $$2x = +-(y-1)$$.

My questions :

1. Why does my answer vary from the given solution? Is there something I have overlooked in my solution that causes this?

2. If my answer is the same as the given solution then how do I write it as such.

• The line $y-x=0$? – Shubham Johri Mar 27 at 10:20
• Oh yes! I'll edit that. – JC2000 Mar 27 at 10:22

$$\frac12 \big|\det \begin{bmatrix} x_A & x_B & x_C \\ y_A & y_B & y_C \\ 1 & 1 & 1 \end{bmatrix}\big|=\frac12 \big|\det \begin{bmatrix} 1&k&2-k\\ 1&k&k\\ 1&1&1 \end{bmatrix}\big|=(k-1)^2$$