Tuesday, July 31, 2018

tense - 相対テンス -- ①ハワイへ行く時、帽子を買う。 ②ハワイへ行く時、帽 子を買った。 ③ハワイへ行った時、帽子を買う。 ④ハワイへ行った時、帽子を買 った。


http://blog.livedoor.jp/robinsonrobin/archives/8036910.html



  1. ハワイへ行く時、帽子を買う。 

  2. ハワイへ行く時、帽子を買った。 

  3. ハワイへ行った時、帽子を買う。

  4. ハワイへ行った時、帽子を買った。


If I completely understand these, will I have undertood half of all the complex issues in Jp [relative tense] (相対テンス) ?



( but before we can get to that, we first have to understand these 4 sentences. )


What is a reasonable description of a "complete understanding" of these 4 sentences? I think it should at the very least include these:


(A). giving a simplified explanation to distinguish the 4 sentences.


(B). giving the biggest problems with that simplified explanation.


Could someone answer A and B ?




A. -- Here's the simplified explanation. If a speaker says (1-4) in Japan --




  • 買う。 means the speaker hasn't bought the hat.  買った。 means the speaker has.





  • 行く時、 means buying the hat in Japan. 行った時 means buying the hat in Hawaii.




This is good as a 1st approximation. However, . . . see responses to B.




B. -- Thank you for bringing up Mr. Niwa's page :



... されている http://www.geocities.jp/niwasaburoo/48toki.html のキャッシュ



 主節が過去の場合、よく例に出されるのは次の2つの文の違いです。


     タイへ行く時に、タイ語を少し習った。(日本で)
     タイへ行った時に、タイ語を少し習った。(タイで)


 上の二つの文は、「どこで習ったのか」という違いがはっきりあります。  「行く時」では「まだ行っていない」ので、タイではなく、ふつうは日本で習い、「行った時」では「もうタイにいる」ので、タイで習った、となると説明します。



I think that in both of these sample sentences, studying of the Thai language could've been in Japan or in Thailand.


 タイへ行った時に、タイ語を少し習った。 <--- Esp. in this second example. If this happened a long time ago (like 10 years ago), there is almost no sense of ordering (study then travel OR travel then study) expressed in this sentence. Do you agree?




reaction mechanism - Is there a relation between the ionization energy and the electron affinity?



I am aware of the definition and equation of IE and EA. I was wondering if there is a direct relation between this two quantities with the energy of the neutral specie.




halacha - May someone with a monotonic voice be a Ba'al Kri'ah?



I understand that the main purpose of trope is grammatical. The musical aspect, as I understand is secondary.


Halachically, when one reads the Torah publicly, is one required to sing it with the trope? (If he is able to do so?)


What about someone who has an artificial larynx sounds monotonic. As long as he knows to pause at the end of each verse (so at least this is a signal that he distinguishes the grammatical usage of the trope to the best of his voice ability), would he be allowed to be a Ba'al Kri'ah?


Please address both:




  • If someone else is available, but the monotonic person is more qualified, e.g., he is the shul's hired Ba'al Kri'ah, and he was injured.




  • No one else is available







halacha - What is the basic requirement for tzitzit knots?


different ways to tie tzitzit knots


There seems to be a lot of different ways to tie tzitzit knots. From the little I understand this is based on various symolism and numeric value (see this question/answer). I would like to know what the basic essential halacha is. Meaning, If I have 8 strings per corner and I tie 5 double knots is that sufficient?



Answer



The Gemara in Menahot 39a implies that the bare minimum Biblical obligation is only one knot. However, Tosfot there understand that this single knot mentioned by the Gemara is actually (what we would call) a double knot, because a single knot doesn't hold tight. However, there are other traditions of how to make this knot, such as in the example all the way to the right in your picture.


However, the Rabbis have a tradition (quoted in that same place, Menahot 38b-39a) that there must also be 'chulyot', which is usually translated to mean 'windings', which is why you see in the picture that you have a combination of knots and windings. The Gemara (there) states that one should alternate windings and knots, and that there can be anywhere between 7 and 13 windings. (However, it isn't clear if each 'winding' refers to wrapping the string around once, or groups of a few windings, as in most of the examples in your picture.) This may imply that the minimum (Rabbinic) requirement is 7 knots.


Another tradition, quoted by Rashi (Numbers 15:38) and the Midrash Tanhuma (Korach 12) is to make five knots on each corner. Therefore, the minimum Rabbinic requirement would be five knots, which is indeed followed by most Jewish communities, with a few variations on the number of windings (see Shulchan Aruch O.C. 11:14 and commentators there). Therefore, if you were to merely tie five knots, (separated by series of one string wound around the rest at least 7 times) that would almost certainly fulfill the mitzvah according to the Rabbinic requirements.


word choice - What is the difference between 乗り場 and バス停?


I've seen them both with the meaning of 'Bus Stop.' Could someone please explain how they're different?


Thank you in advance!



Answer



Firstly, のりば is not limited to buses. It means essentially "getting on point". (Cf. タクシーのりば "taxi stand".) There's a word for "getting off point" as well: おりば (降り場).



バスのりば is used in larger terminals for indicating where the bus stops are. The individual platforms are sometimes numbered as 1番のりば, 2番のりば, etc., or 1番線, 2番線, etc.


A バス停 (short for バス停留所) is a "conventional" bus stop outside a terminal. I would think of it as a sign at the side of a road, where a bus stops. Usually, for most bus lines, the のりば and おりば are one and the same—some people get off the bus, others get on. Calling a バス停 a のりば (or おりば) would only really make sense to disambiguate のりば from おりば for a particular (group of) bus lines. For example, there may be a roadside bus stop outside a large bus/train terminal, which is the おりば for a bus line whose のりば is inside the terminal.


Software/server for calculation of protonation states of small molecules depending on pH


For docking calculations at different values of pH, I am working with flavonoids and would like to know about any software/server that can prepare ligands depending on the pH. Up to now I read about Maestro (Schrodinger) but it is too expensive for us. I wonder if you could suggest other alternatives.




women - Woman wearing her husband's comfortable clothing


Is there any printed discussion about a woman wearing her husband's comfortable clothing?


While there is an Isur for a woman to wear a man's clothing, I've read in several places that this is about a woman specifically trying to look like a man.


On the other hand, it is quite common in American society for women to wear the clothing of their husbands (or boyfriends), for reasons ranging from comfort to status symbols. The least appealing, from a religious perspective, is probably a girl or young woman wearing her boyfriend's clothing - jacket, sweatshirt, etc. - to show off that they are a romantic item.


What about a married woman wearing her husband's sweatshirt or sweatpants as sleepwear, or as loungewear around the house for warmth, or to exercise in because they are loose-fitting and comfortable - and not as revealing as standard women's fitness-wear?





Monday, July 30, 2018

halacha theory - How does "getting a heter" work?


I have heard of the concept of "getting a heter" to do something that is not ordinarily permitted, but I don't have a good idea of what it means. I am interested in explanations of what this process entails, particularly when the question is big enough that one needs to get a heter "officially."


I would appreciate answers that address some or all of the following:


If someone needs a heter to do something (either something for which heterim are understood as readily available, like using birth control after having two children; shortening the niddah period in order to conceive; or going without hair covering [women] after divorce--or something personal and more unusual), how does one "officially" get a heter to do so?


--Is it simply a matter of getting the go-ahead from anyone with semikha--or must the approval be from the "official" rabbi of one's community? Or must it, moreover, be from an expert in that area of halacha? A rov? A member of a vaad or beis din?... Or, if I find the loophole myself, and see that it applies to me, can I then take advantage of my "heter"?


Also: when petitioning a rov, does one always have to present a catalogue of extenuating circumstances, or in some cases is even the desire for a heter enough to get one? (That is, if I have a son and daughter already, must I have a special reason in order to be eligible to use birth control? ...And if not--if everyone gets one--why bother going to the rov at all?)



Perhaps this question can be best summed up by my own situation, its motivation: I asked my community rabbi a shayla about a personal circumstance. He gave a stunningly lenient answer about what to do. Would it now be correct for me to say I have a "heter" to do such and such according to his advice?



Answer



It really depends on the question and severity of the issue at hand ie. Shaas hadchak, money considerations, mental health. But generally, big questions such as medical issues, end of life issues etc. should asked to a world expert on that particular topic. Like medical issues should be asked to a rav who is competent in those issues and has good medical advisors as well.


Famously in regards to allowing abortion, Rav Shlomo Zalman Auerbach generally refused to answer questions put to him in certain circumstances but often he would send the questioner to get a Heter from The Tzitz Eliezer who was lenient in extremely specific cases (See Tzitz Eliezer 13:102). Despite the fact that the questioner came to Rav Shlomo Zalman nonetheless he would send them to get, if needed, a Heter from the Tzitz Eliezer - Rav Eliezer Waldenberg (Posek of Bikur Cholim Hospital in Jerusalem) who in his great knowledge in Torah and expertise in Medicine was willing to issue such a brave psak.


Of course when asking, all pertinent information should be presented to the Rav so as to make sure the psak is fitting with your life circumstances.


A responsible Jew should ask a Rav before deciding for themselves especially in regards to complex questions where more often than not personal bias plays a heavy role as well as a serious lack of knowledge of the source material.


As per your personal case I don't think this site is the forum for such guidance. Although, I will say if your Rav fits in the category as stated above (well versed in the sugya, takes issue seriously, has guidance in this realm) then I would not be overly concerned.


There are many capable Rabbonim who are generally reachable through specific channels such as Rav Dovid Feinstein, Rav Yisroel Belsky (Zt"l) , Rav Dovid Cohen, Rav Moshe Heinemann, and many more who are capable of dealing with such questions.


Where can I get an open source implementation of the Parks-McClellan optimal FIR filter design algorithm?


Background: Often times I am doing some sort of signal processing task that requires a unique filter. Usually at this point I go to MATLAB and generate a new unique filter using $\tt firpm()$. The MATLAB firpm() function implements that Parks-McClellan algorithm. Now I have a filter and I put the filter into a hardcoded array. But here's the problem I now have a hardcoded filter that only works for one scenario.


The problem: I can now solve my signal processing problem du-jour... but only for a very SPECIFIC single sample rate or SPECIFIC scenario.


The goal: I want to be able to call $\tt firpm()$ from C code or some other language and make my signal processing code more generic. I can't find an open source implementation of firpm() !


Where can I get an open source implementation of the Parks-McClellan optimal FIR filter design algorithm (aka $\tt firpm()$ in MATLAB)?




  • P.S. I am aware that I can design filters differently using windowing or something else... feel free to mention those in the comments. But the point of this question is not to ask "what are other filter design techniques?" the point is to find an open source implementation of the VERY VERY useful $\tt firpm()$... or something similar.





  • P.P.S. One of the goals of this question is to learn how the Parks-McClellan algorithm works by looking at the code first and then I plan on reading some background theory.





Answer



Here's an LGPL version of the Remez exchange algorithm. The octave code seems to be derived from it. It was linked from the wikipedia page Parks McClellan page.
The original Janovetz code might be more easily usable in your project, since it doesn't have the octave calls, but it would be wise to dig through the octave-forge svn changelog for any info about bugfixes or speedups in the remez.cc file.


modulation - About FM signal's proving


My text book (Communication Systems analysis and design P.334, 335) have a FM signal is



$s_{FM}(t) = A cos[2\pi[f_c+ks(t)]t+\phi]$ where k is a constant and $\phi$ is the arbitrary phase angles




then the textbook suggest



while in FM, instantaneous frequency minus carrier frequency is a linear function of s(t)



So, I try to prove the $s_{FM}(t)$ is a FM signal


The instantaneous frequency is $f(t)= \frac {d\psi}{dt}=2\pi f_c+2 \pi s'(t) t +2 \pi s(t)$


and the instantaneous carrier ferquency is $f_{carrier} (t)=\frac{d\psi_{carrier}}{dt}=\frac {d}{dt} [2 \pi f_c t + \theta]=2 \pi f_c$. Assume the carrier signal is $Asin(2 \pi f_c t + \theta)$


So, $f(t)-f_{carrier}(t)=2 \pi s'(t) t +2 \pi s(t)$.


And my problem is why the text book suggest that signal is a FM signal? Clearly, I cannot prove the signal is linear.



Answer




As you have correctly derived, the difference of carrier and instantaneous frequency is


$$ g(s(t)) = \omega(t) - \omega_\mathrm{carrier} = 2\pi k s(t) + 2\pi k s(t)'t $$


I will omit $t$ for convenience. If $g(s)$ is a linear function of $s$ it must fulfill the following condition:


$$ g(c(a + b)) = cg(a) + cg(b) $$ So here: $$ g(c(a+b)) = 2\pi k c(a + b) + 2\pi k \left[\frac{d}{dt}(c(a + b))\right]t\\ = 2\pi k c a + 2\pi k c b + 2\pi k c a' t + 2\pi k c b' t\\ = c(2\pi k a + 2\pi k a' t) + c(2\pi k b + 2\pi k b' t)\\ = cg(a) + cg(b) $$ Thus, $g(s(t))$ is indeed a linear function of $s(t)$.


tefilla - What is the point of Davening/Praying


What is the point of praying?


It is for sure not because Hashem needs/wants it. (Hashem is not lacking in any way he is infinite, and thus does not need our tefillos or our mitzvos)


And it seems that the point of davening is more saying the words then thinking the words -- the proof of that is because davening is not accepted if you only think (and not say) the words and there meaning.


But on the other hand it is accepted if you only say the words and not think the meaning of the words.



So even though I agree that thinking the meaning of the words are important but we see from this that saying the words is more important and the main point of davening appears to be just saying the words.


So what is the point of just saying words?




halacha - Correct kavanah in certain words in the first bracha of shemoneh esrei


When one desires to concentrate on every word of the first bracha of Shemoneh Esrei, as required, in order to fulfil the obligation of daily prayer, when he gets to the words "magen Avraham," should the intention when he says "magen" be "shield" and then the intention of "Avraham" be "of Avraham," like it indicates in the interlinear Artscroll translation, or should he think "shield of" when saying "magen" and "Avraham" when saying "Avraham"?



Answer



If you understand the terms, think "magen" (knowing it means "shield of") when you say magen and Avraham (knowing it means "Abraham") when you say Avraham.


meaning - How do Japanese people infer if a verb is a ichidan verb or a godan ending in ru?



In Japan, if a Japanese person sees a new verb ending in ru, what would they do to try and infer if it's a ichidan or godan verb before just looking it up or asking someone?



Answer



When native Japanese speakers encounter or coin new verbs, such verbs are assumed to be godan verbs, despite the fact that many ordinary verbs that end with -i-ru/-e-ru are ichidan-verbs. Here I'm talking about native Japanese adults who can conjugate common verbs like 切る/着る/帰る/変える without thinking. And native speakers don't usually think about verb types; verb types are something we learn at middle school, but most people forget about that soon after they graduate.


For example, when you present an imaginary verb あべる to a native speaker and tell them to conjugate it in various ways, the response would be 「あべらない」「あべります」「あべって」「あべれ」 rather than 「あべない」「あべます」「あべて」「あべろ」. Likewise, the conjugation of an imaginary verb れぴる would be 「れぴらない」「れぴります」「れぴれ」「れぴろう」 rather than 「れぴない」「れぴます」「れぴろ」「れぴよう」.


This I think is because all verbs that were recently coined from loanwords are godan-verbs. コピる is an example of godan verbs that may look like ichidan at first (We say コピれ but not コピろ).


passover - Haircuts Erev Pesach


Are you allowed to take a Haircut The day of Erev Pesach after Burning the Chometz? Does it make a difference if your are a Male or female are small children Different?



Answer



As long as it is before Hatzos then it may be done Lechatehilah. If it is after Hatzos then it may be done by a non-Jew.(SA OC 468 1 MB 5)


Under Bar or Bas Mitzvah may be given a haircut after Hatzos Lechatihilah.


quantum chemistry - How to compute 2-electron integral for Hartree-Fock code?


I'm working on writing my own code for $\ce{H2}$ in an STO-3G basis set using Hartree-Fock (HF), and I am currently stuck on how to construct the two-electron integral matrix. I know how to evaluate the primitive two-electron integrals, but I can't figure out how to transform that into the $4\times4$ matrix of possible values for this system.


For my previous integrals, I determined the sum of the primitives by constructing a $6\times6$ matrix of the primitive integrals, and did a transformation using a $6\times2$ matrix of the coefficient values from the fit to the Slater function, for example: \begin{align} \mathbf{D} &= \begin{bmatrix} d_{11} & 0 \\ d_{12} & 0 \\ d_{13} & 0 \\ 0 & d_{21} \\ 0 & d_{22} \\ 0 & d_{23} \end{bmatrix}\\ \mathbf{S} &= \mathbf{D}' * \mathbf{S}_{prim} * \mathbf{D} \end{align}


I tried doing a similar technique for the two-electron integrals but with a $12\times12$ matrix, but the values didn't come out right. It seems that I need to make a $4$-dimensional array of all the primitive integrals, but I don't know how to evaluate that in order to determine the sum and hence the final

$4\times4$ matrix.


I've been using Szabo and Ostlund's Modern Quantum Chemistry book as my main reference.



Answer



You can also write this down in a similar way as for the one-electron integral. You already had:


\begin{equation} \mathbf{S} = \mathbf{D_2}' * \mathbf{S}_{\rm prim} * \mathbf{D_2} \end{equation}


where $\mathbf{S}$ is $(2\times2)$, $\mathbf{D_2}$ is $(6\times2)$ and $\mathbf{S}_{\rm prim}$ is $(6\times6)$.


For the 2-electron integral we now need


\begin{equation} \mathbf{V} = \mathbf{D_4}' * \mathbf{V}_{\rm prim} * \mathbf{D_4} \end{equation}


where $\mathbf{V}$ is $(2\times2\times2\times2)$, $\mathbf{D_4}$ is $(6\times2\times6\times2)$ and $\mathbf{V}_{\rm prim}$ is $(6\times6\times6\times6)$.


You can get $\mathbf{D_4}$ from $\mathbf{D_2}$: \begin{equation} \mathbf{D_4} = \mathbf{D_2} * \mathbf{D_2} \end{equation} where you do not sum over any index in order to get the 4-index tensor.



The equation for $\mathbf{V}$ is a bit more tricky, since you need to pay attention over which indices you sum (which is actually not specified by the notation). I add an example on how you can do this with Python/Numpy with Einstein summations.


# 1-electron integral
S = numpy.einsum('ba,bc,cd', D2, Sprim, D2)

# 2-electron integral Option 1: form (6x2x6x2) tensor
D4 = numpy.tensordot(D2, D2, 0)
V = numpy.einsum('badc,bedf,egfh->agch', D4, Vprim, D4)

# 2-electron integral Option 2: transform indices one-by-one
V = Vprim.copy()

V = numpy.einsum('ba,bcde->acde', D2, V) # i
V = numpy.einsum('abcd,be->aecd', V, D2) # j
V = numpy.einsum('da,bcde->bcae', D2, V) # k
V = numpy.einsum('abcd,de->abce', V, D2) # l

You will need to give D2, Sprim and Vprim as input.


(If anyone knows how to write this down in a formal notation, please edit.)


You were asking how to get $\mathbf{V}$ as a 2-index $(4\times4)$ matrix. For this we can simply reshape the above 4-index tensors. So $\mathbf{V}_{\rm prim}$ becomes $(36\times36)$. Now this means $\mathbf{D_4} $ needs to be $(36\times4)$, and not $(12\times12)$. To these reshaped 2-index matrices we can apply again the same transformation equation from above. Here is the code for my example:


# 2-electron integral Option 3: reshape to 2-index matrices
Vprim = Vprim.reshape((Nprim**2, Nprim**2))

D4 = numpy.swapaxes(D4, 1, 2) # making sure to combine the correct axes
D4 = D4.reshape((Nprim**2, Ncntr**2))
V = numpy.einsum('ba,bc,cd', D4, Vprim, D4)

Now $\mathbf V$ will be: \begin{bmatrix} (\phi_1\phi_1|\phi_1\phi_1) & (\phi_1\phi_1|\phi_1\phi_2) & (\phi_1\phi_1|\phi_2\phi_1) & (\phi_1\phi_1|\phi_2\phi_2)\\ (\phi_1\phi_2|\phi_1\phi_1) & (\phi_1\phi_2|\phi_1\phi_2) & (\phi_1\phi_2|\phi_2\phi_1) & (\phi_1\phi_2|\phi_2\phi_2) \\ (\phi_2\phi_1|\phi_1\phi_1) & (\phi_2\phi_1|\phi_1\phi_2) & (\phi_2\phi_1|\phi_2\phi_1) & (\phi_2\phi_1|\phi_2\phi_2) \\ (\phi_2\phi_2|\phi_1\phi_1) & (\phi_2\phi_2|\phi_1\phi_2) & (\phi_2\phi_2|\phi_2\phi_1) & (\phi_2\phi_2|\phi_2\phi_2) \end{bmatrix}


And here is the structure of $\mathbf{D_4}$: \begin{equation} \mathbf{D_4} = \mathbf{D_2} * \mathbf{D_2} = \begin{bmatrix} d_{11}*\mathbf{D_2} & 0*\mathbf{D_2} \\ d_{12}*\mathbf{D_2} & 0*\mathbf{D_2} \\ d_{13}*\mathbf{D_2} & 0*\mathbf{D_2} \\ 0*\mathbf{D_2} & d_{21}*\mathbf{D_2} \\ 0*\mathbf{D_2} & d_{22}*\mathbf{D_2} \\ 0*\mathbf{D_2} & d_{23}*\mathbf{D_2} \\ \end{bmatrix} \end{equation}


Sunday, July 29, 2018

halacha - Do cremated remains contaminate with tumas mes?



If a body is cremated, do the ashes transmit tumah as do other human remains, or does cremation render the body no longer tamei?



Answer



This is a matter of dispute in the Mishna Oholos 2:2. Rabbi Eliezer says one quarter kav worth of ash does transmit impurity, whilst the Sages say it does not transmit impurity at all. Rambam (Hilchos Tumas Meis 3:9-10) rules like the Sages.


acid base - Dissolving Organic Tissues



Watching some movie/TV this question came to mind, purely theoretical of course, if one wanted to dissolve a human corpse, like getting rid of a body after killing someone, is it better to use an acid or a base? In the movies (as well the popular perception for some reason) they always use acid. The movie I was watching they had a bathtub full of acid in which they throw in the body. But I also remember my chem teacher telling me (a long long time ago) that if she had a choice of an acid or a base in her eye, she would take acid any day because a base will dissolve organic tissue faster. So assuming that the acid and base have the same level of strength (say a pH of 1 and 13 respectively) which is better for getting rid of a corpse?


Thanks!



Answer



I would say that acids are better.


Why? Bases and acids dissolve flesh pretty easily (I'm thinking of $\ce{NaOH}$ and $\ce{HCl}$ here, weaker acids/bases -- not so much). Most of our body is made up of proteins, which are overall pretty much neutral (generally). Both acids and bases can dissolve protein.


On the other hand, there is one major component of our body which is easier to dissolve with acid. Bones. The major component of bone is $\ce{CaCO3}$. The reaction $\ce{2HCl +CaCO3 -> H2O + CO2 ^ + CaCl2}$ is much more efficient/faster than $\ce{2NaOH + CaCO3 -> Na2CO3 + Ca(OH)2}$. Why is this? Well, for one, in the acid reaction, a gas is being released. This speeds up the reaction, by Le Châtelier's principle.


Apparently, NaOH is not able to dissolve bone completely, you are left with a fragile shell. Either way, it will be much slower than $\ce{HCl}$ while dissolving bone.


Here's an interesting article (no claims on validity) of why lime shouldn't be used to dissolve a corpse.





While (as far as I can tell) acids may be the better way to dissolve a body, I feel that filmmakers use acids because the term is known to most of the general public (unlike "bases", which isn't)


Difference Between Equiripple & Least Squares Design for FIR Digital Filters


For an efficient and optimized digital FIR filter design, there are two methods available broadly, Equiripple filter design & Least Squares filter design. A general method for designing a filter is also Frequency Sampled FIR design but it is not an optimized design



The basic knowledge I have is that Equiripple filter, as the name suggests, has equal ripples in passband & stopband, which means the signal distortion that happens at the edge of the passband due to presence of a large ripple is avoided in Equiripple design BUT, Equiripple design has a large transition band, thus limiting the total passband width.


On the other hand, in a Least Squares design, the transition band width is smaller than for Equiripple design, hence the passband width is more, but the passband ripple are not equi-ripple & exhibit a spike at the passband edge due to Gibbs phenomenon, which causes signal distortion at the edge.


My question is can somebody present or quote the all the differences & advantages over other, in a technical language, for the Equiripple design vs Least squares design of digital low pass FIR filter.




organic chemistry - How to explain the selectivity between methanol and methanethiol in an SN1 reaction with an halogenated hydrocarbon?



Consider the SN1 reaction shown below:


https://imgur.com/a/EuMnG


Would different products be formed if $\ce{CH3SH}$ was an additional reagent?


https://imgur.com/a/BCBM9


Superimpose both energy diagrams on top of each other.



For the first question, yes, two products would be formed. I'm confused about the second question though. I know The rate determining step would remain unchanged, as the rate depends on the concentration of the substrate not the nucleophile (SN1 is unimolecular). However, methanethiol is a better nucleophile than methanol. Would the activation energy for the second transition state be less for methanethiol?





halacha - Is it Asur to watch violent sports?


Is it Asur to watch violent sports like boxing or UFC, or some of the horrific videos of war footage that can be found online (which were pointed out to me, and to which I won't link here) for entertainment?




wavelet - Feature extraction/reduction using DWT


For a given time series which is n timestamps in length, we can take Discrete Wavelet Transform (using 'Haar' wavelets), then we get (for an example, in Python) -


>>> import pywt
>>> ts = [2, 56, 3, 22, 3, 4, 56, 7, 8, 9, 44, 23, 1, 4, 6, 2]
>>> (ca, cd) = pywt.dwt(ts,'haar')
>>> ca
array([ 41.01219331, 17.67766953, 4.94974747, 44.54772721,

12.02081528, 47.37615434, 3.53553391, 5.65685425])
>>> cd
array([-38.18376618, -13.43502884, -0.70710678, 34.64823228,
-0.70710678, 14.8492424 , -2.12132034, 2.82842712])

where ca and cd are approximation and detailed coefficients. Now if I use all of them I can construct my original time series back using inverse DWT. But instead I want to use a fewer coefficients (like in Fourier Transform if we use only first few coefficients, we can approximately reconstruct the original time series). If I just use ca or just use cd I don't get the desired results. If I use only we coefficients from each of them (like first 4), I get only half of the time series.


How should I select the coefficients (from ca and cd) so that I can approximately create the original signal from them (i.e. most of its energy)?



Answer



I think it is kind'a similar to soft and hard thresholding using in wavelet de-noising. Have you come across this topic? pywt has already an in-built function for this purpose. Please take a closer look at this code and try to play with it:


import pywt

import matplotlib.pyplot as plt
import numpy as np

ts = [2, 56, 3, 22, 3, 4, 56, 7, 8, 9, 44, 23, 1, 4, 6, 2]

(ca, cd) = pywt.dwt(ts,'haar')

cat = pywt.thresholding.soft(ca, np.std(ca)/2)
cdt = pywt.thresholding.soft(cd, np.std(cd)/2)


ts_rec = pywt.idwt(cat, cdt, 'haar')

plt.close('all')

plt.subplot(211)
# Original coefficients
plt.plot(ca, '--*b')
plt.plot(cd, '--*r')
# Thresholded coefficients
plt.plot(cat, '--*c')

plt.plot(cdt, '--*m')
plt.legend(['ca','cd','ca_thresh', 'cd_thresh'], loc=0)
plt.grid('on')

plt.subplot(212)
plt.plot(ts)
plt.hold('on')
plt.plot(ts_rec, 'r')
plt.legend(['original signal', 'reconstructed signal'])
plt.grid('on')

plt.show()

This will produce following - hope this will guide you.


enter image description here


Note on running the code with the latest versions:


if you get an error like this:


module 'pywt' has no attribute 'thresholding'


use on line 9 and 10:


 cat = pywt.threshold(ca, np.std(ca)/2, mode='soft')
cdt = pywt.threshold(cd, np.std(cd)/2, mode='soft')


if you get an error on:


plt.hold('on') then comment this line out:


  # plt.hold('on')

halacha - May a Jew sell marijuana?


It is held by Rav Moshe zt''l that a Jew may not smoke marijuana, but following the legalization of marijuana in Washington, I am curious if a Jew may run a store that sells marijuana in a jurisdiction that allows it (so dina d'malchuta isn't an issue)?


In other words, may a Jew sell a product he is forbidden to consume, especially given the strength of the words Rav Moshe used to forbid marijuana consumption? Does the risk that another Jew might buy the product pose a problem (stumbling block)? Does it matter whether or not Noahides may consume marijuana? (May they?)


(For the sake of argument, let's ignore the fact that US federal law still prohibits marijuana, but in real life, this would obviously mean there are still some dina d'malchuta issues in the US, though not in other countries like Uruguay)




halacha - Implications of Samoa skipping a Friday


This week, the island of Samoa is switching time zones, causing it to skip from Thursday directly to Saturday. Out of simple curiosity, what implications might this have on any Jews on the island? Since one cannot "jump" into the middle of Shabbat, does that mean all observant Jews would have to leave the island?




Answer



The civil date line doesn't affect the Halachic day with regards to Shabbos.


Where is the location date line is subject to Halachic argument


According to the Chazon Ish, the Halachic dateline hugs the coast of Australia, China and Russia. Anything to the east (Japan, etc) is considered to be on the same day as the United States. Therefore, it's Shabbos in Japan on their Sunday.


Samoa used to have Shabbos on Saturday (like Hawaii). Now it will be pushed off a day (to be like) Japan and have it on Sunday.


According to R' Tukachinsky, the halachic date line is between Hawaii and California. Therefore, Hawaii is on the Japanese side and Shabbos is on their Friday.


Samoa used to have Shabbos on Friday (like Hawaii). Now it will be pushed off a day to Saturday.


There are other opinions that it runs straight through the middle of the Pacific, though there are arguments of exactly where does it run.


organic chemistry - Why are beta-ketoacids better at decarboxylation than gamma or delta?


My book claims that beta-ketoacids and beta-dicarboxylic acids are better at decarboxylating than their gamma and delta counterparts. Why is that?


I would assume that since gamma and delta keto-acids make a larger ring intermediate (less ring strain) and thus the energy barrier for reaching that intermediate would be lower...




Answer



It has to do with the stability of the electrons that are ejected from the bond that breaks. In B-ketoacids, the electrons can resonate onto the oxygen and form an enol/enolate intermediate, which is much more stable than forming a carbanion on a gamma or delta ketoacid (because there is nowhere for the electrons to go other than go on the carbon atom that participates in the bond-breaking event).


enter image description here


Saturday, July 28, 2018

halacha - Jewish definition of a charity



I know that Jews are supposed to give 10% of their income to charity, but what constitutes a charity? I know that Shuls, Jewish schools and poor people in your community count, but what about secular organizations? There are some that save lives, such as the Red Cross. How about organizations that help children, perhaps a secular orphanage or Make a Wish foundation? Then there are the cultural arts, museums and zoos.


I'm sure the jewish definition of charities can's be as simple as the IRS' definition.



Answer



Rabbi Yitzchak Breitowitz gave a lecture on charity a few years ago, and someone asked him this. He said the key was "providing for those who otherwise wouldn't have." An orphanage or library certainly does that. (He mentioned Catholic charities that have helped Jewish parents adopt a baby, too.) As for arts organizations, he asked if they provided something for those who couldn't afford it on their own.


He also pointed out that compared to "general" secular charities, Jewish charities have a much narrower donor base, so your donations might be needed more; but certainly the Red Cross or the like can count toward the 10% figure. And that different people will have different values for different causes and give accordingly; this is okay, and as a result, many different causes get funded.


hashkafah philosophy - Is free will limited to humans?


Do other beings besides humans have free will? Perhaps animals have free will? What about angels?


Does the status of other types of beings' freedom of will affect us in any way?




transfer function - Converting mel spectrogram to spectrogram



I have a set of songs for which I extracted the STFT (Short-Time Fourier Transform) and used the magnitude spectrum $|S|$ to calculate the mel spectrogram by using a mel filterbank matrix $M$, so $X=\log(M\times |S|)$. I want to know is there any method to reverse this process, i.e. convert from the mel spectrogram back to the spectrogram. I performed some dimensionality reduction on the mel spectrogram, and reconstructed the mel spectrogram from lower dimensions. Now I want to regenerate the audio signal from the reconstructed mel spectrogram, so I guess first reconstruct the spectrogram and then the audio signal.


The problem is that the mel filter bank matrix is not a square matrix, since we the reduce the no of frequency bins, so inverse of $M$ cant be used like this : $ \hat{S}=M^{-1}\exp(X)$. So is there any way to generate the inverse mapping, like some inverse transfer function that can convert from $X$ to $S$?




kashrut kosher - Finding Meat After 6 Hours


Suppose you wait 6 hours (or more) and then realize you have a small piece of meat stuck in your teeth:



  • Do you have to remove it before eating dairy?

  • [assuming you have to remove it] Do you have to wait any additional time, and/or rinse your mouth before eating dairy?


(six: assuming that's your minhag)



Answer




See @YDK's answer to this related question.


Edit:



Summary: Definite particles must be removed after 6 hours (plus a mouth rinse). Unknown particles are of no concern.



hashkafah philosophy - What is the reason the religious adherence is currently inversely proportional to the standard of living?



It is a well-established fact that the most religious modern societies are the poorest, having the least life expectancy, most infant mortality, hunger, wars, wild animals and everything that's on the Torah's list of curses.


It appears that the principle of reward-and-punishment should work for all nations, especially for Christians and Muslims that accept the 7 Noahide Laws and probably most of what the Torah could expect from gentiles.


Needless to say that this is true for the Jewish communities as well - compare Meah Sharim to Tel-Aviv or ... (I don't know about America).


How this phenomenon can be theologically explained at large (from Torah's viewpoint)?



(I already suggested "צדיק ורע לו" here.)




inorganic chemistry - How to explain the dipole moment anomaly of methyl fluoride and methyl chloride with respect to their hydracids?


I was checking dipole moment orders, and came across a very peculiar result: Methyl fluoride $(\ce{CH3F})$ has lesser dipole moment than methyl chloride ($\ce{CH3Cl}$), but hydrofluoric acid ($\ce{HF}$) has more dipole moment than hydrochloric acid ($\ce{HCl}$).


At first I thought it was about distance, but upon seeing the second one, it led me to think about polarizability. So my question shortens to this: Which factor dominates while checking dipole moments and when?





periodic trends - Why color of alkali metal peroxides, superoxides and ozonides deepens down the group?


This is basically a continuation of the question-"Why is potassium monoxide (K2O) coloured?"


I knew that color of alkali metal oxides deepens down the group:



  • Lithium oxide ($\ce{Li2O}$) is the lightest alkali metal oxide and a white solid. It melts at 1570 °C.

  • Sodium oxide ($\ce{Na2O}$) is a white solid that melts at 1132 °C and decomposes at 1950 °C.


  • Potassium oxide ($\ce{K2O}$) is a pale yellow solid that decomposes at 350°C.

  • Rubidium oxide ($\ce{Rb2O}$) is a yellow solid that melts at 500 °C.

  • Caesium oxide ($\ce{Cs2O}$) is a yellow-orange solid that melts at 490°C.


The reason is due to what @Oscar said in the answer of previous question:



If we go further down the alkali metal oxides the band gap gets smaller, and more visible light with longer blue/green wavelengths may be absorbed. Then the color becomes stronger and more reddish.



But, it is observed that not only color of normal oxides deepens down the group but the peroxides and superoxides also follow the trend:




  • Lithium peroxide ($\ce{Li2O2}$) is a white solid that melts at 195 °C.

  • Sodium peroxide ($\ce{Na2O2}$) is a pale yellow solid that melts at 460 °Cand boils at 657 °C.

  • Potassium peroxide ($\ce{K2O2}$) is a yellow solid that melts at 490 °C.





  • Sodium superoxide ($\ce{NaO2}$) is a yellow-orange solid that melts at 551.7°C.

  • Potassium superoxide ($\ce{KO2}$) is a yellow solid that decomposes at 560°C.






  • Lithium ozonide ($\ce{LiO3}$) is a red solid which is produced from caesium ozonide via an ion-exchange process.

  • Sodium ozonide ($\ce{NaO3}$) is a red solid which is produced from caesium ozonide via an ion-exchange process.

  • Potassium ozonide ($\ce{KO3}$) is a dark red solid which is produced when potassium is burned in ozone or exposed to air for years.

  • Rubidium ozonide ($\ce{RbO3}$) is a dark red solid which is produced when rubidium is burned in ozone.

  • Caesium ozonide ($\ce{CsO3}$) is a dark red solid which is produced when caesium is burned in ozone.


What is the reason behind the deepening of the color? Is it due to the same reason as @Oscar pointed out? Or is it any other reason? Although superoxides and ozonides are paramagnetic and are colored, the peroxides are diamagnetic but still they are colored. Why?



Answer



Most likely, we are seeing the same band structure effects.



There is an additional trend, whereby the compounds become darker and more reddish as one adds more oxygen. In oxygen-chain species such as $\ce {O2^{2-}} $, antibonding molecular orbital are occupied. So The valence band containg these electrons is raised. That lowers the band gap enabling absorption of more visible light.


Incidentally, the visual effects described here are limited to alkali metal (when oxygen is the electronegative element). When we move to the corresponding alkaline earth oxide the monoxides are white and the peroxides ($\ce {Mg}$ and heavier) are white too. Less strongly ionic bonding and a lower cation/anions ratio lead to less negative charge on the oxygen species, thus lower valence band energies and gaps remaining large enough to remain uv-absorptive only.


nomenclature - Is there a word for a compound that has both ionic and covalent bonds?


For example, calcium carbide (CaC$_2$) has covalent C‒C bonds and ionic Ca$^{2+}$‒ C$_2^{2-}$ bonds.




Friday, July 27, 2018

sources mekorot - Rambam on Sacrifices


I seem to recall hearing that the Rambam stated somewhere that animal sacrifices were not necessary from G-d's point of view, but that He decided to institute them because of what the Israelites were used to. Anyone know which text this is or if I've miss attributed it?




grammar - と particle usage - am I understanding it correctly?


These two sentences don't seem to fit to the grammar rules on と that I've been able to dig up so far:



ぼんやりとした意識{いしき}のまま窓{まど}に視線{しせん}をやると、とっくに日が昇{のぼ}っていた。



This form seems to fit と as an 'if/when' conjunction, however the grammar book I'm using states that と must be a natural consequence of the verb clause the precedes it [lit: "a subordinate conjunction which marks a condition that brings about an noncontrollable event or clause"]. Surely, the speaker turning her head couldn't have caused the sun to have "risen a long time ago" (this doesn't make any sense to me, at least)?


What else is it, then?


From the context it seems to be "when I turn my head, I see the sun's already risen" but I this is pure conjecture on my part. How does と work here?


The next sentence seems to fit another familiar structure, と used as a particle to list things:




冬{ふゆ}にしては暖{あたた}かな空気{くうき}と、シーツにくるまりたい欲求{よっきゅう}と少しだけ格闘{かくとう}した。



So ~空気と、~欲求と少しだけ格闘した would make sense from pure grammar standpoint but it doesn't make sense when I translate it as "I [slightly] grapple with the temptation to roll up in my sheets and (???) the air that is quite warm considering it's winter". Fighting a temptation makes perfect sense but fighting air? Is it just a creative quirk on the author's part (and I'm completely fine with that if it's the case here) or am I completely misunderstanding something from the grammar standpoint?


よろしくお願いします



Answer




ぼんやりとした意識のまま窓に視線をやると、とっくに日が昇っていた。



The と is like "when I ~~, (I found) ~~".




冬にしては暖かな空気と、シーツにくるまりたい欲求と少しだけ格闘した。



The first と means "and", connecting 空気 and シーツ; you want to roll up in the warm air and the sheets.


The second と is "against"; you fight against your desire, or resist the temptation (=欲求と格闘). 


halacha - Menstruating on Wedding Day


What happens in the case of a bride menstruating on her wedding day or her menstruation ending a few days before her wedding day and cannot go to the mikvah?


Does the rabbi refuse to perform the chuppah? What are the options?




halacha - Study of Written Law Without Comprehension


What are the earliest sources that confirm or contradict the assertion that recitation of Torah Shebiksav fulfills the obligation to study Torah even without understanding of the words?




Preferred: Halachic sources not kabbalistic sources.



Answer



Shulchan Aruch Harav (18th century) quoted here writes that one does. Further support (although not proof) can be adduced for this from a responsum of Maimonides (P'er HaDor 104) in which he makes the unqualified statement that even to read a single verse of the Torah one must recite the blessing for Torah. Furthermore, he continues and writes that this would be the case even if the verses were recited in the context of prayer, rather than study. This might imply that the blessing, and by extension, the mitzva is related to reading the words themselves; not appreciating their contents.


halacha - Is there tashlumin for n'ila?


Being that n'ila is a unique prayer, in that it only occurs once a year, can one make up (do tashlumin for) n'ila at the next prayer or the previous one at n'ila?



Answer



R' Joseph B. Soloveitchik's understanding of Ne'ila, which I saw in the Machzor Mesoras Harav, is that it's a uniquely dependent prayer whose purpose is to ask God to accept all the other prayers we've engaged in over Yom Kippur. He was confident enough in this understanding that he proposed a practical Halachic outcome: If someone happened to miss all four of the preceding Yom Kippur prayers, that person would not be allowed to daven Ne'ila.



Based on that, my guess would be that Ne'ila is different enough from other prayers that indeed, it can't make up for them or be made up for.


If I'm right, the additional question would be whether the preceding Yom Kippur prayer, Mincha, could be made up for during the first Ma'ariv after Yom Kippur.


UPDATE: Here's the language from the Machzor (p. 768 in the first Ashkenaz edition; some Hebrew transliterated by me):



While in the days of the Temple, the Avodah service was considered synonymous with the Yom Kippur experience, today our own cognitive association with Yom Kippur is that of a day devoted entirely to prayer. According to the Rav, prayer on Yom Kippur takes on a complexion fundamentally different from prayer during the rest of the year. The day of Yom Kippur must be transformed into a yom tefila, a day of prayer. To accomplish this transformation, Chazal instituted the Ne'ilah service. The purpose of Ne'ilah is to request that all the previous prayers of the day be accepted before God. (see Rambam, Hilchos Tefillah 1:7).


This conception of the role of the Ne'ilah service was so compelling to the Rav that he actually posited a halachah on this basis. If, during the year, one would forget to recite any of the three daily prayers (Shacharis, Minchah or Maariv) in its proper time, his halachic right to participate in subsequent prayers would be unaffected. If, however, for some reason one did not pray at all on Yom Kippur until the time for Ne'ilah had arrived, the Rav maintained that he could not participated in the Ne'ilah service. The function of Ne'ilah is to transform all previous prayers into one unified prayer activity. Without the earlier prayers there can be no Ne'ilah (Before Hashem, pp. 159-160). Elsewhere, the Rav suggested that one who missed even a single one of the previous Yom Kippur prayers may not recite Ne'ilah (Mesorah Journal, Volume 6, p. 23).



The first citation is simply to a previous work by the Machzor commentary's author in which this piece of commentary previously appeared. The second is quoted in a footnote in the former, reproduced here with thanks to Amazon:


Mesorah Journal passage


The last position would certainly be incompatible with making up for Mincha at Ne'ila, and I maintain that the overall message is incompatible with Ne'ila being made up for by any other prayer.



filters - Why is a linear phase important?


If symmetry conditions are met, FIR filters have a linear phase. This is not true for IIR filters.


However, for what applications is it bad to apply filters that do not have this property and what would be the negative effect?




Answer



A linear phase filter will preserve the waveshape of the signal or component of the input signal (to the extent that's possible, given that some frequencies will be changed in amplitude by the action of the filter).


This could be important in several domains:




  1. coherent signal processing and demodulation, where the waveshape is important because a thresholding decision must be made on the waveshape (possibly in quadrature space, and with many thresholds, e.g. 128 QAM modulation), in order to decide whether a received signal represented a "1" or "0". Therefore, preserving or recovering the originally transmitted waveshape is of utmost importance, else wrong thresholding decisions will be made, which would represent a bit error in the communications system.




  2. radar signal processing, where the waveshape of a returned radar signal might contain important information about the target's properties





  3. audio processing, where some believe (although many dispute the importance) that "time aligning" the different components of a complex waveshape is important for reproducing or maintaining subtle qualities of the listening experience (like the "stereo image", and the like)




physical chemistry - How to determine whether a compound is gas or liquid or solid?




  • My book says, methyl chloride, methyl bromide, ethyl chloride and some cholorofluromethanes are gases at room temperature, whereas higher members are liquids or solids. Why?

  • With this question, I got another question for which the former would be subset. How to determine whether a compound is gas or liquid or solid (assume room temperature)? Thinking about this question, I thought molecular force between the molecules is going to be the key for answer of this query door. But how to determine, whether a compound has stronger intermolecular force between the molecules or not?

  • We have another way to check if a compound is gas or solid or liquid, i.e. entropy (randomness), which is given by heat gained or lost divided by temperature. In general, compound which has greater randomness will be gas. We can expect most of the compounds to be gases, which have standard molar entropy greater than $200\ \mathrm{J K^{-1} mol^{-1}}$ at $298\ \mathrm{K}$.

  • Entropy concept brings many questions under light, for example, $\ce{H2}$ gas has standard molar entropy of $130.7\ \mathrm{JK^{-1}mol^{-1}}$, which is lesser than $\ce{Br2}$ liquid, which has standard molar entropy of $152.3\ \mathrm{JK^{-1}mol^{-1}}$. We would had expected $\ce{H2}$ gas to have greater randomness than $\ce{Br2}$ liquid, because gases should have greater randomness than liquids. Anyway it becomes difficult, to determine a compound as solid or liquid or gas using entropy.



LINKS




  • http://chemed.chem.purdue.edu/genchem/topicreview/bp/ch4/gases1.html#roomt (This link helps to determine a compound as gas, but leads to still more questions like: Why most non metals are gases? Why all the gases are covalent bonded that contain two or more non metals? Why gases are defined to have low molecular weights, in spite of knowing that molecular interactions matter? Can’t ionic bonded compounds be gases?)




  • I will try to find list of solid and liquid compounds, but now I have just the above link. If any one have links related to this particular topic, they are welcome.






ark aron kodesh - What will happen if the Ark of the Covenant is discovered today?


I read this question and the answer says that the Ark of the Covenant was buried somewhere beneath Jerusalem during the First Temple period (~580 BC), to hide it from the Babylonian invaders. It seems no one has discovered it yet since that time.


What will be the reaction of Jewish people if the Ark of the Covenant is discovered today? Objectively speaking, have any rabbinic authorities discussed what the consequences might be? Would it be a good thing? What would they do with it? Would they reinsitute the old practices of the Tabernacle System?




word choice - 「〜したことがある」 vs 「〜したことがあった」


One of the first patterns a learner of the Japanese language will come across is:



〜したことがある


(I) have 〜 before.



わたしは中国を3回訪れたことがあります


I have visited China three times before.



However, I also occasionally come across sentences like:



以前に一度会ったことがあった


以前、6人がかりで、注射をいやがる私を取り抑えなくてはならなかったことがありました



With the former, they seem to be interchangeable, but the latter was originally a sentence that I wrote, but had 「あります」 changed to 「ありました」, though among other things.


However, I also came across the following similar sentence.




以前も組織の男で40人で取り押さえねばならんほどの大騒動になった事がある



What is the difference between these two patterns?


More concretely, what would be the difference between the following two sentences?



以前に一度会ったことがあった


以前に一度会ったことがある



Edit



I would also appreciate an explanation as to why the following sentence is valid.



仕事で大阪に引っ越す前、大阪を訪れたことが1度だけある




Answer



以前に一度会ったことがあった/ある。To me, they seem to be saying the same thing, though I think the former is close to ‘I met him once before‘ with more emphasis on the fact and the latter is close to ‘I’ve met him once before’ with more emphasis on experience, if I venture to say the difference. I think ’一度会ったことがある’ is smoother and more natural than ’一度会ったことがあった.’ Repetition of the words ‘会った’ and ’あった’ phonetically pronounced same looks awkward and sounds somewhat abrasive to me. It's like you're trying a tongue twister.


tefilla - Why do women and girls not immerse before prayer?


According to Lubavitcher Rebbe, daily ritual immersion is a commendable practice, as a praying Jew is likened to the kohen who would always immerse before his avoda. Why do the women of those communities where men immerse daily not do so if they plan to pray?


Girls often have prayers at school on a scheduled daily basis (as opposed to married women). Does wanting to prevent self-justified extra-marital relations really have priority over this commendable practice?




biochemistry - Can reaction of gastric acid with swallowed things be dangerously exothermic?


Okay, okay. I know that swallowing a large enough amount of any substance would be considered dangerous. That isn't the point of this question, however.


As you probably know, the stomach has hydrochloric acid in it to help digest food, and kill off some microorganisms. I suspect the swallowing aluminum foil (or a decent-sized ingot if aluminum) would be dangerous, because it reacts with hydrochloric acid exothermically to form aluminum chloride and hydrogen gas.



$$\ce{2Al(s) + 6HCl(aq) → 2AlCl3(aq) + 3H2(g)}$$


Here is a video of aluminum's exothermic and vigorous reaction with hydrochloric acid: https://youtu.be/LaaORZ0ofCY?t=1m12s


aluminum and hydrochloric acid reaction


Now imagine that going on inside your stomach. I believe that the hydrogen gas may be able to escape through the mouth, but the intense heat might evaporate water (thus creating more gas that must escape), and would burn and kill cells inside the stomach. Plus, there's always the possibility that the hydrogen gas that is escaping could ignite, and burn through the mouth (where it escaped from) and into the body.


So why isn't everyone worried about accidentally swallowing aluminum foil? Wouldn't it be considered very dangerous to do so? Is there something I'm missing or otherwise not thinking of?



Answer



For an average healthy adult person maximum concentration of hydrochloric acid in gastric juice is $C = \pu{0.16 M}$, and on average there is $V = \pu{2 L}$ of gastric acid in the stomach, assuming it's daily secretion of roughly $\pu{1.5 L}$ and some leftovers. Considering that the acid hasn't been used for the purpose yet, and the following reaction


$$\ce{Al + 3HCl -> AlCl3 +1.5H2},\tag{1}$$


one can make an assumption that the mass of aluminium metal that can possibly be digested is


$$m_\ce{Al} = \frac{1}{3} CVM_\ce{Al} = \frac{1}{3} \times \pu{0.16 mol L^{-1}} \times \pu{2 L} \times \pu{26.98 g mol^{-1}} = \pu{2.85 g}.$$



In reality the outcome depends on the health conditions and biometrics of the given individual. People suffering from acid deficiency won't be able to digest even this amount. Larger or overweight specimen can have larger/stretched stomach, so the amount of acid and its pH may vary quite a lot.


On the other hand, having certain decease such as gastric ulce may amplify the effect of digestive system reacting to the produced $\ce{AlCl3}$ and heat. Also, aluminium(III) chloride is considered to be a neurotoxin. Acute oral toxicity ($\ce{LD_{50}}$, mouse) of $\ce{AlCl3}$ is $\pu{3805 mg/kg}$. Reaction (1) produces approx. $\pu{14 g}$ of $\ce{AlCl3}$, which is not all that bad.


As @MaxW noticed in the comments, swallowing any metal is potentially dangerous and may or may not cause unwanted effects.


Thursday, July 26, 2018

beit din court - How would the 'split the baby in half' situation be resolved according to halacha?


In 1 Kings 3:16-27 there is a story of two prostitutes who appear before King Shlomo, each having a newborn baby. One of the babies died and there was a dispute as to which one. There were no witnesses to consult and so Shlomo employs his wisdom, by suggesting to cut the baby in half and give each half to one of the women, to discern which woman is the true mother of the living child.


My question is: what would the halacha dictate in this case?




equilibrium - Difference in calculated pH and the real pH of a phosphate buffer?


I'm from Colombia and I joined this site to ask a question that I could not solve yet. I am calculating the amounts to prepare a phosphate buffer with two salts. I want to prepare a buffer system with pH = 7.0 and a total concentration of Ct = 0.1 M. All my calculations are in the image attached. When I mix the calculated amounts, the obtained pH = 6.5 in the lab. I thought it was my mistake in calculations or an error when I weighed the amounts, but I repeated everything several times and still not get the pH = 7, and the value always was 6.4 or 6.5.


I don't know the reason but I would like to know this. Please help me. I think that If the concentration of the monobasic salt is greather than the dibasic, the pH tends to decrease, but in the calculations the relation [dibasic]/[monobasic] is always less than 1 and this again causes that [monobasic] > [dibasic]. Thanks, I really need a help.


Calculations



Answer




The flaw in your calculations is the assumption that there exists a pK that is a constant independent of concentration.


In reality, pK is a function of ionic strength.


At infinite dilution (zero ionic strength) the pK is 7.199 as you assumed.


At 0.1M phosphate concentration, the pK is 6.81.


See Phosphate Buffers which cites to A. A. Green, "The Preparation of Acetate and Phosphate Buffer Solutions of Known PH and Ionic Strength", J. Am. Chem. Soc. 55, 2331, (1933).


window - Moving average vs. Moving median


I have read in many places that Moving median is a bit better than Moving average for some applications, because it is less sensitive to outliers.


I wanted to test this assertion on real data, but I am unable to see this effect (green: median, red: average). See here:


enter image description here




Here's the sample audio data test.wav. Here's the Python code:


import numpy as np

from scipy.io.wavfile import read
import matplotlib.pyplot as plt

def median(lst): return np.median(np.array(lst))
def mean(lst): return sum(lst)/len(lst)

(fs, x) = read('test.wav')

x = abs(x)
env = np.zeros_like(x)

env2 = np.zeros_like(x)

for i in range(len(x)):
env[i] = median(x[max(i-1000,0):i+1])
env2[i] = mean(x[max(i-1000,0):i+1])

plt.plot(range(len(x)), env, color = 'green')
plt.plot(range(len(x)), env2, color = 'red')
plt.show()


I have tried with various values for Window width (here in the code : 1000), and it was always the same: the moving median is not better than moving average (i.e. not less sensitive to outliers).




The same with Window width = 10000 (10000 >> the spike width) :


enter image description here





Can you provide an example showing that moving median is less sensitive to outliers than moving average? And if possible using the sample .WAV file data-set (download link).


i.e. is it possible to do a moving median on this data such that the result is like this yellow curve? (i.e. no more spike!)


enter image description here




kaddish - Is the Talmud 100% Oral Torah?


I've been taught that the Oral Torah was passed from generation to generation from Moshe Rabbeinu. And I've also heard that the Talmud is basically a recollection of Oral Torah. This would suggest everything in the Gemara comes from knowledge that was given by Hashem to Moshe.


But I recently studied part of the Masechet Brachot in school, and one of the things we read was the importance of the Kaddish and how Hashem reacts in heaven when we say it. But the Kaddish wasn't there at the time of Moshe. How could this be part of the Oral Torah then?


Please correct me if something I said is wrong. But I really don't understand this.



Answer



As far as the main question is concerned, the Ramban in his debate with Pablo Christiani states (in the beginning of the section entitled "על האגדות") that the corpus of the Torah can be divided into three sections:



  1. The Bible, in which we all have complete faith

  2. The explanation of the mitzvos in the Talmud, which we also fully accept


  3. The midrashim, or sermons on the bible, which we are not required to accept as part of the Oral Law, as they represent the private opinions of the person who said the sermon.


Being that a significant portion of the Talmud contains aggadic material that fits in the last category, it is logical to conclude that the Talmud is not 100% Oral Law.


With regards to Kaddish specifically, Kaddish could be considered part of the Oral Law insofar as it's recitation was an enactment of the Rabbi's, similar to the lighting of Chanukka candles or the celebration of Purim, both of which commemorate events which took place after the bible was canonized, and therefore perforce are not of the Written Law.


grammar - Expressing Opinions ~と思う


I am doing an exercise in Genki Book I. The question is:




Translate "I don't think Chieko likes Mayumi" into Japanese.



I think the answer is:



ちえこさんはまゆみさんが好きじゃないと思います。



Is the meaning of this Japanese sentence ambiguous? Could it instead mean that Chieko thinks Mayumi doesn't like (something)?


If I wanted to include 私は, to make it clear that this is my opinion, what happens with the particles in the rest of the sentence? Does the は after ちえこさん become が? Is this the only thing that changes?




私はちえこさんまゆみさんが好きじゃないと思います。



Is this correct?



Answer




"I don't think Chieko likes Mayumi."



Your TL of that is:



「ちえこさんはまゆみさんが好きじゃないと思います。」




Your translation is good if the purpose of the lesson is to learn to use 「思う」 in the affirmative form even though the sentence in question is clearly in the negative form "I don't think".


As a Japanese sentence, it is impeccable. Its meaning is not ambiguous at all unless you say it in a situiation where talking about who Chieko likes or dislikes is clearly irrelevant. Japanese is an incredibly contexual language; Take that from a veteran native speaker.


If you wanted to use 「私は」, I would suggest you place it right in front of the verb at the end instead of at the beginning of the sentence. That would be:



「ちえこさんまゆみさん好きじゃないと私は思います。」



It is, of course, grammatical to say:



私は、ちえこさんまゆみさん好きじゃないと思います。」




Mentioning all three persons at the beginning makes it look/sound kind of crammed, which is why I used a comma after the 「私は」.


「私は」 is not required at all in Japanese though it might take time for you to get used to it.



Could it instead mean that Chieko thinks Mayumi doesn't like (something)?



Again, it could if it is said in a situation/context where the topic of the discussion is who likes or dislikes something (instead of who likes or dislikes someone), which is why I have to type the same sentence here everyday: "Japanese is a contextual language".


The exact same phrase/sentence can mean completely different things.


Finally, your sentence:




「私は、ちえこさんまゆみさん好きじゃないと思います。」



means a different thing than:



「私は、ちえこさんまゆみさん好きじゃないと思います。」



To say the former sentence, you need to have been talking about multiple people who might or might not like Mayumi. Then you are saying that out of all those people, it is Chieko who does not like Mayumi.


To say the latter, no particular context is needed. You are just saying that Chieko does not like Mayumi.


If nothing I am saying makes sense to you, do not worry too much about it now. You will get used to our particles in a few years. As if I had met someone who had mastered the particles in a few years...


shiurim measurements - How large was the menorah?


This question asking why the menorah didn't have rings and staves for carrying reminded me that, unlike with the other mishkan objects, we're not given any dimensions for the menorah. I've always imagined it as large enough to stand on the ground and provide overhead light. (That image is probably reinforced by the arch of Titus, but I'd be cautious about inferring too much from that.) But was it?


According to Rashi on Shemot 25:31, the menorah was cast from a talent of gold weighing 64 pounds (citing Tan. Beha’alothecha 3). The size question also came up in our torah study recently, where none of the chumashim on hand provided illumination. An engineer who was present told us that that amount of gold would yield something closer to a table lamp than a floor lamp. This site says that a kilo (2.2 pounds) of gold is about the size of an iPhone 6. 30 of those doesn't seem enough to make a large, solid (not hollow) menorah.


I know that the group in Jerusalem who are building utensils for the third temple interpret it as a floor lamp, like what I imagined. I don't know their sources.


How tall was the menorah? Sources, please.



Answer



The Talmud says on Menachot 28b:



אמר שמואל משמיה דסבא


גובהה של מנורה שמנה עשר טפחים



הרגלים והפרח ג' טפחים וטפחיים חלק וטפח שבו גביע וכפתור ופרח וטפחיים חלק וטפח כפתור ושני קנים יוצאין ממנו אחד אילך ואחד אילך ונמשכין ועולין כנגד גובהה של מנורה וטפח חלק וטפח כפתור ושני קנים יוצאין ממנו אחד אילך ואחד אילך נמשכין ועולין כנגד גובהה של מנורה וטפח חלק וטפח כפתור ושני קנים יוצאין ממנו אחד אילך ואחד אילך ונמשכין ועולין כנגד גובהה של מנורה וטפחיים חלק נשתיירו שם ג' טפחים שבהן ג' גביעין וכפתור ופרח


Samuel said in the name of an old scholar, The height of the candlestick was eighteen handbreadths: three handbreadths for the base and the flower upon it, two handbreadths plain, one handbreadth for cup, knop and flower, again two handbreadths plain, one handbreadth for a knop out of which two branches come forth, one on each side, extending and rising to the same height as the candlestick, then one handbreadth plain, one handbreadth for a knop out of which two branches come forth, one on each side, extending and rising to the same height as the candlestick, then again one handbreadth plain, and one handbreadth for a knop out of which two branches come forth, one on each side, extending and rising to the same height as the candlestick, and then two handbreadths plain; there now remained three handbreadths, in which space were three cups, a knop and a flower.



Translation from Soncino, via halakhah.com PDF.


Assuming the value in this OU glossary of 3.2 inches per tefach, that comes to about 58 inches tall.


Wednesday, July 25, 2018

matlab - PSD of sine wave


I'm learning some basic signal processing to use in my research. So I'm trying to understand the pwelch function in MATLAB to calculate the PSD. My understanding was that the PSD is the density of power in the frequency bins, and thus the PSD of a sine wave should be a delta function. However, when I run my simple code I get a distribution.



enter image description here



  • Why is this happening?

  • Is this something to do with windowing?

  • Or is my understanding of PSD wrong?


EDIT:


Here is my MATLAB code:


rng('default');
fs = 1

n = 0:1/fs:200000;
x = sin(2*pi*n);
pwelch(x);


halacha - If one surpasses ones rebbi does one still have to honor him?



One has to give kovod, honor to ones main rebbi (teacher). There are many dinim of how this kovod must be shown. One pertaining to the gemoro in eiruvin is that one must not be in a bath house at the same time because this lowers the "distance" and awe between them (unless the rebbi needs his services there). This din applies all his life even after he has finished studying under him.


What happens if he "surpasses" his rebbi and now his rebbi has to study under him? Does he still have to honor his "previous" rebbi?




word choice - What's the difference between "さけ" (sake) and "しゃけ" (shake)?


Today I saw onigiri claiming to contain "しゃけ" (shake). When I asked my friend what that was, she said it was the same as "さけ" (sake), "salmon".


So are these two just different readings of a kanji, regional differences, used by different generations, etc? How did the two pronunciations come about? Which should I use?




Answer



Both さけ and しゃけ mean salmon and are written as 鮭 in kanji (but I will avoid using this kanji in this answer for an obvious reason). As far as I know, there is no difference in meaning, but some people seem to distinguish the two words in meanings (see below).


According to a webpage by Maruha Nichiro Foods, Inc., the Kōjien dictionary lists the word しゃけ as a variation of the word さけ with the same meaning. The webpage also states that there is no obvious geographical tendency between the use of さけ and しゃけ.


According to this page and this page, some people distinguish the two words, in which case さけ means living or raw salmon and しゃけ means cooked salmon. I had never heard of this distinction personally, and I doubt that many people distinguish the use of the two words.


halacha - Any Halachic problems with app publishing?



I'm currently in the process of developing a mobile app, that, be'h will have various Israel related feeds. I was wondering if there could be any Halachic issues with respect to including news feeds from the likes of The Jerusalem Post that will feature articles written by Jews on Shabbos.


Also, occasionally, articles have Loshon Hora issues + promote ideas against halacha. Bearing this in mind, would it be permissible to include these news organizations?


Are there any Halachic issues insofar as making my app available to the general public, which would thus inevitably include Jewish people who would use it on Shabbos r’l. (Lifnei Iver or Mesayeia/Mesayeia Ledavar Aveira comes to mind).




Tuesday, July 24, 2018

usage - Meaning of ここで引くなどご法度



ここで引くなどご法度



I've read several articles on nado, and have found that it can mean 'whatnot, and such, etc.' but to me that doesn't make sense here. Can anyone help with this?




Answer




ここで引くなどご法度 ≂ ここで引くなんて、ご法度(だ)。



The など in your example is definition #❸-㋑ in 明鏡国語辞典:



など〘副助詞〙
❸ 軽んじる気持ちをこめて取り上げる。
㋑ 《活用語の言い切りの形に付いて、発言や思考の表現を伴って》おおよその内容を、反発の気持ちをこめて示す。「今さら行くなどと言ってももう遅い。」「許してもらおうなどという甘い考えは捨てろ。」




It's a belittling / derogatory suffix, close in meaning and usage to なんて.
When attached to the end-form of 活用語(conjugatable words) and used with a quoted remark or an expression of thoughts, it indicates the feeling/emotion of opposing, rejecting or denying the preceding part.


ご[法度]{はっと} means "(strictly) forbidden; banned; taboo", or "out of the question".
The 引く here is like "withdraw; retreat; back out; back down".
ここで is literally "here" or "in this situation", but it can mean "after coming this far" "now that it's come to this" or "now that we've reached a point of no return".


Put together, ここで引くなどご法度 can mean "Now that it's come to this, I'm/you're never allowed to withdraw" / "I/You can't possibly back down after coming this far", or more concisely, "I/You can't back down now."


sources mekorot - The greatest prophet after Moses


R. Jacob Emden, in his comments to Eruvin 43a, refers to Elijah the Prophet as the greatest prophet after Moses:



אליהו הנביא הגדול בנביאים אחרי משרע"ה




That Moses was the greatest prophet is hardly controversial. It is attested to in Scripture and enshrined into fundamental Jewish theology by Maimonides.


Elijah is probably the most famous prophet in Judaism. This is probably due to his involvement, according to various traditions, in Jewish life throughout the millenia – attending circumcisions, drinking wine from every house on Passover Eve, hanging out with some of the Sages in the Talmud as well as the Hasidic masters, etc.


The question is, though, is there anything to indicate that he was actually the greatest prophet after Moses? Whence did R. Emden know this?


In fact, perusal of some other parts of rabbinic literature leads to a different conclusion. R. David Kimchi, in his commentary to Psalms 99:6 writes that Samuel was possibly the greatest prophet after Moses, and in his commentary to Jeremiah he states this definitively and cites several verses that could be indicative of this:


Psalms 99:6



וזכר שמואל לפי שהיה ממשפחת משה ואהרן ונביא כמו הם ואפשר שהיה גדול בנבואה משאר הנביאים אחר משה, וכן אמר אם יעמוד משה ושמואל לפני



Jeremiah 15:1




והגדול שבנביאים אחר משה רבינו היה שמואל וכן אמר משה ואהרן בכהניו ושמואל בקוראי שמו ונאמר כי נאמן שמואל לנביא לה' ונאמר ולא הפיל מכל דבריו ארצה



R. Kimchi's ranking is perhaps supported by the Midrash Tanchuma which refers to Samuel as "Master/Teacher of all the prophets":


Leviticus Chapter 21



שמואל [רבן] של כל הנביאים



Beyond this, though, are there any authoritative sources that discuss prophet rankings (the earlier the better)? Either in support of, or contravening, R. Emden's view or R. Kimchi's view?




Interestingly, R. Emden's statement has been edited out of most editions of the Talmud. The only edition I was able to find it in was the Nehardea Talmud. Below is an image showing the Nehardea edition with the statement of Elijah's rank, followed by an image showing the Oz V'hadar edition with the part about Elijah's rank missing. That many of R. Emden's Talmudic comments have been censored/edited/concealed has already been pointed out by R. Jacob J. Schachter in his dissertation on R. Emden:



Jacob Emden: Life and Major Works Chapter 2 Note 60



These novellae differ from Emden's Hagahot 'al ha-Shas printed in the back of the standard Vilna edition of the Talmud. Those comments represent a partial transcription of Emden's marginalia on his personal copy of the Talmud, presently found in the Jewish National and University Library of the Hebrew Universit in Jerusalem (Heb 4o 181). See Y. Yoel, "'Osef Kitvei-Yad bi-Bet Dfus Rom," KS XIII (1937), 521-522. Even a cursory comparative study indicates that not everything written by Emden in the margins of his private books was included in the Vilna edition.



enter image description here


enter image description here




Are women halachically obligated to fast on the minor fasts?



A friend of mine has told me they are not halachically obligated and yet I can not see any mention of this in the Shulchan Aruch. Please show מקורות.




talmud gemara - “Teiku” (תיקו): why Eliyahu and not Moshe Rabbeinu to resolve unanswered Talmudic questions?


Sometimes in the Talmud when there's a difficult question, the Talmud concludes with "תיקו".


Usually "Teiku" is translated to mean "let it stand" but another suggestion is that "תיקו" is actually an acronym for:



"תשבי יתרץ קושיות ובעיות".


"Tishbi [Elijah]- will answer- questions- and inquiries "




(see this MY answer which suggests its earliest source)




My question is on the acronym:


Why is Eliyahu HaNavi going to be the one who answers our questions?
Wouldn't Moshe Rabbeinu make more sense since he's the one who gave us the Torah?




hebrew - In the phrase זכר למעשה בראשית in Kiddush, is the word זכר an adjective?


Usually, a word that has a segol such as "zecher" gets a tzerei when it becomes an adjective. Example - "mateh" becomes "matei" when used as an adjective as in "matei Levi".



Q - in the phrase זכר למעשה בראשית is the word זכר considered an adjective? On the one hand, I would say, yes by the fact that it has a tzerei. However, I am not sure because the next word starts with ל (meaning "to" or "for"), which is a preposition.



Answer



It's a noun. (As far as I know, zecher is always a noun.) Many a noun has a tzere, such as סֵפֶר and חֵלֶק. See Gesenius, 84aa and 93.


grammar - Compound verb with きれる


In the sentence:



田中さんは諦めきれなかった。



what is the function/meaning of きれる? I assume the sentence means "Tanaka didn't give up", but how does it differ from 諦めなかった?



Answer



The verb 切る, besides meaning "to cut", can also be used as a suffix to a verb in the pre-masu form (i.e. 食べ) to mean "to do something completely".



Therefore 諦めきれない would mean "cannot completely give up".


Other places where this is used are verbs like 待ちきれない (can't wait) or 理解しきれない (can't completely understand).


Here is a page which has a lot more examples of ~切る (written by me)


EDIT: Kentaro Tomono pointed out highly that I had not responded to the original poster's question about the difference between "諦めなかった".


As 諦めなかった simply means "he didn't give up", it lacks the meaning of "not being able to" which is present in 諦めきれなかった.


A more interesting question would be the difference between 諦められなかった. Here, I would say 諦めきれなかった, having the concept of not "completely" able to do something, would have greater emphasis. Or it might be more appropriate to say he was torn between giving up and continuing on, so at some point he had partially given up (諦めかけた)but never completely.


I think changing the original sentence to simply use 諦められなかった would be OK and not have a major change in meaning.


What kind of conjugation is 謝んなくった?



I'm playing through Toradora right now, and there's a scene where Ryuuji apologizes to his mom because he can't remember anything. She responds with 「ううん、謝んなくったっていいんだよ。」


I understand she's saying don't apologize, but I've never seen an ending with なくった before. Is this some kind of colloquial contraction?



Answer




「謝{あやま}なくったっていいだよ。」



Needless to say, this is colloquial speech which uses what I call the "two distinct hallmarks" of colloquial speech -- 「ん」 and the small 「っ」.


Now, watch the hallmarks disappear instantly as I put the phrase into the "dictionary" form.



「謝らなくてもいいのですよ」




In Kanto (and even a larger area because of TV), 「ら」 often changes to 「ん」 in negative verb forms in colloquial speech.


ない to 謝ない、わかない to わかない、太{ふと}ない to 太ない, etc.


「たって/ったって」 is also a very common 'word' which should be in any free online dictionaries. Not sure about bilingual dictionaries as I do not use them (because I do not trust them much).


https://kotobank.jp/word/%E3%81%9F%E3%81%A3%E3%81%A6-561378#E5.A4.A7.E8.BE.9E.E6.9E.97.20.E7.AC.AC.E4.B8.89.E7.89.88


「~~たって/ったって」 means 「~~ても」 or 「~~たとしても」= "even if". Thus, 「謝んなくったって」 is in the concessive conditional form. The speaker is offering a concession to the listener.


「ったって」 sounds slightly more emphatic than 「たって」. That is the power of the small 「っ」 to begin with. With double small 「っ」, 「ったって」 would naturally sound very colloquial -- even to the point of sounding slangy.


俺 and 僕 used as second person singular pronouns


I often see couples where the girl sometimes speaks to her boyfriend using 俺 as a 'you'.


Where does it come from?
Can other pronouns like 僕、私、あたし, etc. can be used the same way?



Answer




In a word: imitation.


Between couples, often men will refer to themselves as ore. A woman may refer to him (hence "you") by imitating his pronoun of choice. Often ore is not appropriate in various social situations, such as work. As such, some men may refer to themselves as boku. As a result, some people (both male and female), such as bosses (who may refer to themselves as ore), may refer to him (hence "you") by imitating the choice of his pronoun.


I cannot recall hearing it with regard to wata(ku)si or atasi. wata(ku)si, though, is rather unlikely since it could just as equally apply to either person, so the sense of imitation would be more difficult to catch.


Monday, July 23, 2018

compression - Exam Question - end-to-end delay from video capture to video playout



Hi I'm preparing for my exam tomorrow and I've come across a 17 Mark question which seems trivially easy, so I think I'm missing a key point giving the rest of this exam is fairly difficult. The question is below and my attempt is below that.


Question


enter image description here


The frame sizes are below:


enter image description here


My attempt:


I looked up video capture on wikipedia and it defined it as the process of converting an analog signal to digital - so I took the point at which frames were captured as being after they were digitised. We are told to ignore the time taken for compression and decompression, so the next part is just to send the data. The total amount of data in the frame sequence is 54KB (I'm not sure why the frame sequence starts and ends with an I-frame to be honest - doesn't seem to make sense). So to transfer 1s of video will take 0.27s.


To be play a second of frames smoothly the the playout buffer must contain 25 frames minimum. The sequence of frames is IBBPBBI which has a total size of 54 KB. In one second the playout is 54 x 25 = 0.432 MB/s.


I'm pretty sure that we would need to make some estimations to solve the rest of this.


As always I'm open to any suggestions! Thanks for reading :D





periodic trends - Comparing radii in lithium, beryllium, magnesium, aluminium and sodium ions

Apparently the of last four, $\ce{Mg^2+}$ is closest in radius to $\ce{Li+}$. Is this true, and if so, why would a whole larger shell ($\ce{...