Friday, August 31, 2018

mayim emtzaiyim - washing hands between eating fish and meat


Mishna B'rura 173:4 and Aruch Hashulchan 173:2 say we don't need to wash our hands between eating fish and eating meat. Do any latter-day pos'kim argue with this? Does any group practice this halacha of washing?




Answer



I think that R. Ovadia Yossef says it's good to do Mayim Emtsaiyim even if some poskim say it's not necessary since we use spoon, knife...


You can see in Yalqut Yossef (Kitsur Shulhan Arouch) hilchot Seouda. (For the end of your question, I practice this halacha)


Why do people drink expensive alcohol on purim?



The main point of drinking on purim is to be drunk. So why did the Rabbis establish the requirement to drink wine? Vodka gets one there faster and cheaper, so it should be preferable to drink it, as Chas Hatorah al mamonam shel yisrael?








nmr spectroscopy - 1H NMR of p-methoxy phenol, 32 possible lines?


This is a follow-up question, emerging from answering this one.



The Silverstein book 1 aims to rise awareness that not every 1H NMR signal that on first inspection may look like a doublet actually is a doublet. Triggered by counting possible number of lines of signals for p-methoxy phenol


enter image description here


-- which would yield just 16 (two ddd) I came across this part of the book about p-chloro nitrobenzene:


enter image description here


(loc. cit., p. 175)


Question: For the sake of understanding this part I leave out a potential simplification of the 1H NMR spectrum if some of the centres of the signals of the aryl H's accidentally may coincide, or some parts of the multiplets overlap. For a moment, I assume each aryl H's multiplet may be recorded without disturbance of the signals by any other aryl H.


Is my understanding of this section correct, in theory there were up to 32 (thirty-two) lines observable, as each of the aryl H's couples with the other three H's relatively in ortho, meta, para position, hence four ddd?


On the next page, the book actually displays an experimental 1H NMR spectrum of p-chloro nitrobenzene


enter image description here


and assuming the more intense peaks could be a partial overlap of two lines (not all of them are smooth), I "count" only 16 lines. As if -- a speculation follows -- obviously the p-coupling, as the one with the lowest coupling constant, was not-at-all resolved in this acquisition.



1 Spectroscopic Identification of Organic Compounds, Wiley, 6th edition, 1998, ISBN 0-471-13457-0




tzibur community - Group coordination for a siyum


My understanding is that a siyum should be made on the last bit of the text being studied. Thus, if the entire Mishna (all six "orders") is studied for someone's yahrzeit, the last mishna (individual piece of the Mishna) to be studied should be the one studied as the siyum.



It often occurs that many people band together to complete the Mishna before someone's first yahrzeit. There's a sign-up sheet, which says something along the lines of "Please complete your portion by [the yahrzeit]". And on the yahrzeit, someone completes the last bit at a meal.


But that meal is not always in the last minute of the day. So those finishing "by [the yahrzeit]" may not have finished their respective portion. How, then, does the one who's completing the last bit know that everyone's done by that time?



  • Does he not, and take his chances?

  • Does he hold the siyum after the yahrzeit?

  • Do those studying understand, generally, that they should finish before (and not on) the yahrzeit? (I haven't understood that!)

  • Does he call all those studying to see whether they've finished their respective portions and, if not, ask them to do so before x o'clock on the yahrzeit when the siyum will be made?

  • Or what?


Any sources, experience, anecdotes, etc. will be appreciated.





dft - Why is X(0) the DC component


Why exactly is X(0) the DC component of a signal?


How is it equal to N times x(n)'s average value and why it is at X(0)?



Answer



Follows from the DFT definition. It's defined as


\begin{equation} X(k) = \sum_{n=0}^{N-1} x(n) e^{-j2\pi \frac{kn}{N}} \end{equation}


So $X(0)$ is


\begin{equation} X(0) = \sum_{n=0}^{N-1} x(n) e^{-j2\pi \frac{0 \cdot n}{N}} \end{equation}


Having $k=0$ gives $e^0=1$ all the time so that


\begin{equation} X(0) = \sum_{n=0}^{N-1} x(n) 1 \end{equation}



Comparing this to the average


\begin{equation} \overline{x} = \frac{1}{N} \sum_{n=0}^{N-1} x(n) \end{equation}


shows that $X(0) = N \overline{x}$


halacha - Would a convert/Ba'al Teshuvah have to remove any tattoos they may have?



A Jew is prohibited from tattooing himself. If a person with tattoos were to convert to Judaism, would they be required to have the tattoos removed?


Would a Jew who got a tattoo and later repented be required to have it removed?




divorce - Why is it often Claimed a Forced Get is Invalid?



I've read that part of the problem of agunot ( women who are refused a divorce ) is that if we force the man to give a get then the get is invalidated, and thus Beitai Din in Israel refrain from using force.


However, that is not strictly true:



A most basic rule in Hilchot Gittin is that a Get must be given (and received by the wife, post-Cherem d'Rabbeinu Gershom) of one's own free will. (Rambam, Gerushin 1:1,2) If the husband is coerced, the Get is invalid. (Rambam, Hilchot Gerushin, 220[sic]) The oft-quoted dictum kofin osoh ad sheyomar rotzeh ani -- "we coerce him until he states 'I want to"' -- applies only in cases when (a) specific grounds for that verdict exist, (b) the Bet Din renders a verdict of kofin (we force him), and (c) the coercion is carried out by the Bet Din or others implementing its verdict.



We see that a Beit Din has the authority to coerce the man to give the get, and we can see from Rambam in הלכות אישות פרק טו, ב regarding a marriage without children for ten years that the Beit Din physically beats the husband till he gives a divorce (or takes a second wife).


In light of that, I don't understand why it seems that Batai Din refuse to use force in cases where the husband uses the refusal of a get as a means of blackmailing his wife, and where the claim of the Get being invalidated by the use of force comes from.




organic chemistry - Order of halide nucleophilicity in DMF


The order of nucleophilicity for halide family in DMF is: $\ce{Cl- > Br- > I-}$. I understand the reason for this must be that DMF, being a polar aprotic solvent, is unable to solvate the halide ions.


I was told by my teacher that this is true only for DMF and DMSO, while in other aprotic polar solvents, the order is as usual: $\ce{F- < Cl- < Br- < I-}$.


I'd like to know what is special about DMF and DMSO (and which is not possessed by other aprotic solvents like acetone) that leads to this order.


I have verified the order in DMF from March's 7th edition (page 427). The book mentions the usual order ($\ce{Cl- < Br- < I-}$) for acetone (another aprotic polar solvent).




halacha - Electronic sliding doors on shabbat


What can a person who is staying at a hotel which has only electronic sliding doors that open when one walks near them do to avoid any issue on shabbat?





  • Wait for someone else to enter and "piggyback"?




  • Tell the staff of the issue and have them open whenever they see the shabbat-observant customer without having to ask?




Are any of these viable/permissible solutions? Any other advice?




halacha - Permissible to speak lashon hara about repeat wrongdoers?



Is it permissible to speak lashon hara about a Jewish (non-religious) person that knows they are doing something wrong and still do it countless times? What is the source for this in Chafetz Chaim? I've heard that it's allowed, and I've heard that it's not.




minhag - Custom of not giving knives as a gift?


I'd heard that some people have a custom not to give knives as a gift (as knives are a sign of shortening life, not extending it); I asked one rabbi who said he hadn't heard of such a custom, but it seemed reasonable. Does anyone have a source for this custom? Would it therefore be advisable not to register for kitchen knives as part of a bridal registry?



Answer



"[Rabbi Nachman of Breslev said] in the name of the Ba'al Shem Tov, one should not give his fellow a knife as a gift" (Sichot Haran no. 9, first printed in 1815. Maaglei Tzedek pg. 3a. This tradition is also found in Baal Shem Tov al Hatorah, Parshas Re’ah in the Mekor Mayim Chaim, no. 6.).


There is an in depth article about this issue by Bency Eichorn on the Sefarim blog. In there he says that the earliest Jewish source is the aforementioned Sichot Haran. The non-Jewish sources for this custom predate the Jewish source by over 300 years. He also brings other students of the Ba'al Shem Tov who would give knives as gifts.


Maariv Motzoei Shabbos. Origin of the minhag not to say the verses of “Kedusha Desidra” aloud


The Oruch HaShulchan O. Ch. 132 (1) points out that Chazal did not institute to say “kedusha” at Maariv. Indeed we do not say “kedusha” at Maariv; but on Motzoei Shabbos we do say ואתה קדוש וכ׳ in what is called the “Kedusha Desidra”. (It is also said any time there is a post-Shmoneh-Esrei Nakh study (Tehillim 91, Esther, and Eikha are the three currently practiced examples for Maariv; at other prayers it's Tehillim 145/20)).



Normally in the “Kedusha Desidra”, the verses of the kedusha in Hebrew (e.g. קדוש קדוש קדוש ה׳ צבא.ות וכ׳) are said aloud.


I am informed that there is a (yekkische) minhag not to say them aloud on Motzoei Shabbos. Is the fact that normally Chazal did not institute to say “kedusha” at Maariv the source of this minhag?




Differences between chemical physics and physical chemistry?


What makes these two seemingly identical topics separate? What does each field more focus on, like do chemical physics researchers study more the atomic/molecular interactions while the physical chememists study more macroscopic properties? I assume they have quite a bit of overlap.



Answer



You are of course right, there is a lot of overlap. There are also the scientific publication series ChemPhysChem and Physical Chemistry Chemical Physics amongst others, that deal mainly with subjects from the both areas.


In principle they are most likely dealing with almost the same subjects. And you often find physicists working in chemistry and vice versa. However, there is a little difference in the general approach to problems.
Physical chemistry usually approaches the problems at hand from a chemist's point of view, focussing (initially) mainly on macroscopic properties of an ensemble and use physical laws to determine them. It is often considered the parent field for many other subjects, like physical organic chemistry, chemical kinetics, and spectroscopy, among others. Most common publication titles are Zeitschrift für physikalische Chemie and The Journal of Physical Chemistry A, B, C, and letters. And many others...
Chemical physics on the other hand studies chemical ensembles and reactions from a physicist's point of view. They focus more or less, like you assumed, on ions, atoms, clusters, surfaces, free radicals, and molecules interacting with each other. This does include, but is not limited to, the study of solvation effects and single entities like quantum dots. Here are fewer specialist titles, like The Journal of Chemical Physics and Chemical Physics Letters. Of course publications are often widely accepted also in other journals of neighbouring areas. (Sometimes it is also treated as a subfield of physical chemistry.)



In modern times the various fields are not separated by a sharp line, they most likely blur into each other. You could probably ask the same question for Biochemistry and Chemical Biology, or Computational Chemistry and Quantum Chemistry, or Polymer Chemistry and Material Sciences. And there are more. Interdisciplinary cooperation is encouraged by many researchers and institutions, it is important not to care too much about the labels anymore.


Thursday, August 30, 2018

downsampling - Why need an low pass filter after up-sampling?



I understand why there need an low pass filter before down-sampling, the sample frequency need to be at least twice of the max frequency signal, else there will be alias issue.


But base on the Wiki page, we need an lowpass filter after up-sampling.



Upsampling requires a lowpass filter after increasing the data rate, and downsampling requires a lowpass filter before decimation.




I don't understand that, can anyone explain it?



Answer



Let's say you've sampled an analog signal $x(t)$ with spectrum $X(\omega)$ at rate $1/T$ that is high enough to satisfy the sampling theorem. The spectrum (i.e. the discrete time Fourier transform (DTFT)) of the sampled signal $x_{1,k}$ will be a periodic repetition of $X(\omega)$. The repetition period is $1/T$.


Now you sample the same signal with a higher rate $L/T,\, L\in\mathbb N$ yielding $x_{L,k}$. Again the spectrum will be a periodic repetition of $X(\omega)$ but this time the repetition period is $L/T$, so the spectral images have greater frequency distance than before.


The task of upsampling consists in calculating $x_{L,k}$ from $x_k$. First, $L-1$ zeros are inserted after every sample of $x_k$. Actually this just changes the basic frequency support of the DTFT to $-L/(2T)\ldots L/(2T)$ containing $L$ copies of the original (analog) spectrum. Therefore the unwanted copies are filtered out with a lowpass filter so that only the original spectrum in range $-1/(2T)\ldots 1/(2T)$ remains. This is identical to $x_{L,K}$


The above steps are quite well explained in the figure of the Wiki article you quoted (in the same order).


solutions - How to think of solvated electrons?


This excellent answer explains at length what's happening in this fascinating video entitled Liquid Electrons - Periodic Table of Videos. In the screenshot below, the metallic-looking solvated electron layer (middle) has a bronze color.


I am trying to understand what "solvated electron" even means. Is the way that these electrons move around in solution more like a solvated ion, or proton in an acidic aqueous solution, or more like the conduction electrons in a typical liquid metal we might see in a laboratory, such as mercury or gallium? Or are both of those completely inadequate analogies?


I chose proton as the lightest thing I could think of that could be roughly thought of as a "bare charge". It is, of course, the opposite sign, so maybe a lithium ion?


enter image description here



Answer




The analogy with a proton is actually a good one if you are careful to remember that an electron is nearly 2000 times lighter than a proton. What does that mean? It means that despite the fact that an electron is very "small", the electron is actually going to be very large because lighter particles will tend to spread out and have a much more diffuse wavefunction. For instance, if we just take a case where the environment sets up a more or less constant potential for the electron to sit in, then it becomes very clear that a proton will spend much more time towards the bottom of the well than the electron will. Of course the environment wouldn't set up the same potential for both of them because this potential is determined by interactions with the electron or proton itself.


Ok so that's a basic picture. Essentially, you have to think of the solvated electron as being a very quantum mechanical ion if you wish to think of it as an ion.


Before we can get to full solvation, however, it is useful to understand the behavior of an excess electron in simpler systems. One good example, because they're studied all the time and are usually fairly representative of what might be going in the liquid phase, is a water cluster. In Sommerfeld and Jordan's paper[1] studying the behavior of excess electrons on water clusters, they provide the following wonderful image:


electrons bound on water clusters


This gives a great picture of what a solvated electron could look like. The point is that it can look like a lot of things. If you wish, you can think of these isosurfaces as being an "orbital" that the excess electron is free to move around in. The difference is that we draw orbitals as 90% probability densities, only these are drawn at a constant volume, and hence don't all contain the same "percentage of the electron". In fact many of these surfaces contain less than 50% of the charge density, which demonstrates these electrons are very diffuse!


Now, the arrangements where the electron is primarily inside the cluster is going to resemble a solvated electron the most. It is worth noting structures such as 20c and 20d. In these structures, the electron interacts electrostatically with the free $\ce{O-H}$ bonds. In structures such as 13a and 24b, the electron is actually bound by the dipole field of the cluster (these clusters all have large dipole moments). Because these electrons are bound by dipole interactions, they will be quite diffuse.


One way in which electrons like these are definitely not like a proton in solution is that correlation effects become very important for the behavior of these electrons. Indeed, some of the structures shown above only give a negative binding energy when correlation is included at the CI level. (See 1 for details on all this.)


Some more interesting papers on electrons bound to water clusters are 2 and [3].


So, this sets us up for thinking about fully solvated electrons (sticking with water because it's where the most work is done since water is very important). As it happens, our orital analogy applies quite nicely in liquid water. Below is the little cover art from a paper hot off the presses (2017) by Ambrosio et al.. [4]


States of hydrated electron



They actually show that the solvated electron in water is bound strongly enough to have multiple electronic states (they match with experiment quite well), and they can be seen to be s-like and p-like. That is, one of them is roughly spherical while the other has a node with a smaller lobe. Again, keeping our analogy with a proton in mind, these electrons are much larger than how we think of a proton in water. Both, however, induce a local structure in the water molecules to stabilize the excess charge.


The fact this aqueous electron has at least two electronic states tells us already that it is probably bound more strongly than the electrons in the sodium/liquid ammonia solution (at least for the concentrated solution). The difference being that excess electrons in water are going to be very dilute (there's not many of them), while the sodium/ammonia ones are quite concentrated when we see them.


These solvated electrons in water are actually quite mobile, as we might expect. See for instance[5], in which it is shown that a surface-bound electron actually has almost the same energy as a fully solvated electron. That doesn't really make sense to me besides that the stuff from the water clusters might be relevant. That is, for this to be true, you would expect that the dominant interactions at the surface would be different than in the bulk. I'd guess dipole-bound at the surface and primarily dispersion and other correlation effects in the bulk.


As one last way to beat the proton analogy to death, we can maybe understand the mobility of the solvated electron by noting that protons are also very mobile. That is, if I drop $\ce{DCl}$ into a solution of $\ce{H2O}$, I will eventually end up with a bunch of $\ce{HDO}$ molecules and some $\ce{D+}$ and mostly $\ce{H+}$. This is to say that the proton which I drop in and say "that's my proton" is going to get attached to a water molecule and some other hydrogen is going to become the proton, and so on.


The big difference for the solvated electron is that electrons are indistinguishable from each other, so I can't say that this is the solvated electron and those are the valence electrons of the surrounding solvent. Rather, we have to picture the solvated electron as just being part of the wavefunction describing the electrons of all nearby waters (well really the whole solution but let's not get carried away). Maybe this is where we start talking about solvated muons...


In any case, if you use google scholar there is a ton of reading on solvated electrons, so feel free to check it out, and hopefully this helps you have a picture for whatever people might be working on.




Sorry I could only speak about water. In general an aqueous electron might behave quite differently in other solvents, but it's definitely always going to be quite quantum mechanical. The fact it can be bound by purely correlation effects tells us what kind of beast we're dealing with.




[1]: Sommerfeld, T., & Jordan, K. D. (2006). Electron binding motifs of (H2O) n-clusters. Journal of the American Chemical Society, 128(17), 5828-5833.



2: Sommerfeld, T., DeFusco, A., & Jordan, K. D. (2008). Model potential approaches for describing the interaction of excess electrons with water clusters: Incorporation of long-range correlation effects. The Journal of Physical Chemistry A, 112(44), 11021-11035.


[3]: Jordan, K. D., & Wang, F. (2003). Theory of dipole-bound anions. Annual review of physical chemistry, 54(1), 367-396.


[4]: Ambrosio, F., Miceli, G., & Pasquarello, A. (2017). Electronic Levels of Excess Electrons in Liquid Water. The Journal of Physical Chemistry Letters, 8(9), 2055-2059.


[5]: Coons, M. P., You, Z. Q., & Herbert, J. M. (2016). The hydrated electron at the surface of neat liquid water appears to be indistinguishable from the bulk species. Journal of the American Chemical Society, 138(34), 10879-10886.


organic chemistry - Why does the unstabilised Wittig reaction selectively form cis alkenes?


This question is meant for a simple unstabilised ylide.


The mechanism of the Wittig reaction, as given on ChemTube3d, involves a concerted formation of the oxaphosphetane (this is generally favoured over the traditional stepwise mechanism with betaine formation):


enter image description here


Here the puckered transition state has been clearly shown but involves the direct formation of the oxaphosphetane (without any betaine intermediate). In this transition state, the two possibilities are for the methyl groups to be either cis or trans to each other. Surely the transition state with the methyl groups trans to each other will be more stable. Doesn't this support formation of the trans product?



Answer



To my knowledge the mechanism of the Wittig reaction isn't fully resolved yet. But maybe I can give you some ideas about why the Wittig reaction with unstabilized ylides is (Z)-selective (well, with the exception of the Schlosser modification) instead of (E)-selective.


In the excellent book by Clayden, Warren, and Greeves, there is a section beginning p. 690 that describes the oxaphosphetane formation as a concerted, antarafacial [2+2]-cycloaddition reaction (similar to your "puckered transition state").


Here, the phosphonium ylide and the carbonyl compound approach each other at right angles. The substituents are arranged in order to minimise steric repulsions in the transition state. In particular, the phenyl group (Ph) points away from the PPh3 group, and then the R group on the ylide points away from the Ph.


Stereoselectivity of Wittig reaction



The formation of the oxaphosphetane is irreversible and kinetically controlled. Hence, even though the trans oxaphosphetane is more stable, it is not formed.


(By the way, the book also has some justification why the Wittig reaction of stabilized ylides is E-selective.)




Edit:


Since the OP asked for it I will try to give some justification on why the ylide and the carbonyl group approach one another perpendicularly. For a proper description one would need the frontier orbitals of both compounds and then reason about the orbital interactions that bring about the [2+2] cycloaddition. Since I don't have those I will try to give some oversimplified description that should convey the general principle at work here. In the approximate orbital pictures I'm going to use I'll leave out the substituents for clarity.


To begin with, if one imagines the orbital interactions between the ylide and the carbonyl group, it is clear that the most important (primary) interaction for the reaction is the one between the HOMO of the ylide (nucleophile) and the LUMO of the carbonyl group (electrophile). What happens when both groups approach one another head-on or at right angles is shown in the following picture (for the perpendicular approach a top-view is used).


Comparison of suprafacial and antarafacial [2+2] cycloadditions


In both cases there are as many bonding interactions (black) as there are antibonding interactions (red). These situations are overall non-bonding and cannot lead to the desired product. This is the reason why [2+2] cycloadditions are usually thermally forbidden (by symmetry).


However, some compounds have additional orbitals that: (1) are similar in energy to the frontier orbitals drawn in the picture, and (2) possess the right symmetry to interact with the other orbitals. These "secondary orbital interactions" are weaker than the HOMO-LUMO interaction, but might provide enough bonding to tip the balance from an overall non-bonding to a bonding situation.


So, how does this translate to the situation of the Wittig reaction? Since O is more electronegative than C, the HOMO of the carbonyl group will have a larger orbital coefficient at O, while the LUMO will have a larger orbital coefficient at C. The situation is similar with the ylide. Since C is more electronegative than P, the HOMO of the ylide group will have a larger orbital coefficient at C. The ylide group is the nucleophile so the primary interaction will be between its HOMO and the LUMO of the electrophilic carbonyl group. Since the orbitals interact best where the coefficients are large, this primary interaction will be biased towards C–C bonding.



The question is now, is there a suitable secondary interaction? One can argue that P has a lot of orbitals (valence shell extension) and that the LUMO of the ylide might be some empty phosphorus orbital (or at least an orbital with a big coefficient on $\ce{P}$) - this could be a p-orbital perpendicular to the ylide's C=P π-orbitals, or a d-orbital, or something like that. This phosphorus orbital can then interact with the carbonyl group's HOMO, which has its biggest coefficient on O. So this bonding interaction will be biased towards P–O bonding. The situation is shown in the following picture:


Secondary orbital interactions in cycloaddition


The biases in the primary and secondary orbital interactions will lead to some distortions from the pure perpendicular approach which will become more pronounced the nearer the two species get to each other. For example, the ylide might rotate a bit so that its C and P atoms are closer to the carbonyl's C and O atoms respectively, in order to maximize the bonding overlap. And of course the perpendicular approach of ylide and carbonyl group will proceed in such a way that their respective biggest substituents are as far away from each other as possible (see diagram above).


After this quite lengthy answer I want to make clear that this description of mine is only a guess. The real reaction path is still a matter of debate and there are some compounds that rather react via a radical or ionic pathway. But I think it gives a good explanation for most of the observed behaviour and hope it helped the understanding. A more exact frontier orbital description of another thermal [2+2] cycloaddition, namely that of ketene with ethene, can be found in the textbook by Brueckner on p 653.


fft - Computation of the Inverse DCT (IDCT) Using DCT Or IFFT


Is there a way to compute the inverse discrete cosine transform (type-2) by leveraging either a DCT, FFT, or IFFT algorithm? I have seen ways to compute the DCT using FFTs, and I've seen ways to compute IFFT using FFT. I can't quite find a simple example with description.



Answer



Have a look at Fast DCT Algorithm (PDF Version).


It has both DCT and Inverse DCT using DFT (FFT).
They show how to do a DCT and Inverse without the reflection trick.


The standard (Less efficient then above) way doing so is:


numElements = 10;

vX = randn(1, numElements);


disp(vX); %
vDctRef = dct(vX);

% Forward DCR using FFT
vXX = [fliplr(vX), vX]; %vXDft = fft(vXX);

vGrid = [0:((2 * numElements) - 1)];


vShiftGrid = exp(-1j * 2 * pi * (numElements - 0.5) * vGrid / (2 * numElements));

vXDft2 = real(vXDft ./ vShiftGrid);

vDct = vXDft2(1:numElements) / sqrt(2 * numElements);
vDct(1) = vDct(1) / sqrt(2);

disp(vDctRef)
disp(vDct)


% Inverse DCT Using FFT
vDct(1) = vDct(1) * sqrt(2);
vDct = vDct * sqrt(2 * numElements);

vXDft = [vDct, 0, -fliplr(vDct(2:numElements))] .* vShiftGrid;
vXX = ifft(vXDft);

vX = real(fliplr(vXX(1:numElements)));
disp(vX);


A reference code for the IDCT by the more efficient method (As in reference):


numElements = 10;

% Signal (DCT Coefficients)
vXDct = randn(1, numElements);

% Reference Inverse IDCT
vXRef = idct(vXDct);


% Inverse IDCT Using FFT
vGrid = [0:(numElements - 1)];

vShiftGrid = exp((1j * pi * vGrid) / (2 * numElements));
vShiftGrid = vShiftGrid * sqrt(2 * numElements);
vShiftGrid(1) = vShiftGrid(1) / sqrt(2);


vTmp = vShiftGrid .* vXDct ;
vTmp = real(ifft(vTmp));


vX = zeros(1, numElements);

for ii = 0:((numElements / 2) - 1)
vX((2 * ii) + 1) = vTmp(ii + 1) ;
vX((2 * ii) + 2) = vTmp(numElements - ii) ;
end

disp(vXRef);
disp(vX);


Another reference is given by Lecture Notes for the Course MAT-INF2360 - Fourier Theory, Wavelet Analysis and Non Linear Optimization.
Have a look at 4.2 Efficient implementations of the DCT at page 115.


Enjoy...


Remark
When it is written DCT above it refers to DCT Type II.


sources mekorot - Did the Terumas haDeshen write a challah recipe?


Reading this article about challah-making, I noticed the following:



Using the starter, I tried the Rich Sourdough Barches recipe from Inside the Jewish Bakery, which the authors say is adapted from the Trumat HaDeshen, the writings of 15th-century sage Rabbi Israel ben Petachiah Isserlein.



Where does this recipe appear in the writings of the Terumas haDeshen?



Answer



We never claimed that the recipe originated from the Terumas Hadeshen; that was the article author's own conclusion. What we said in the book was, "As early as the fifteenth century, it is recorded that every Friday evening the Austrian sage Rabbi Israel ben Petahiah Isserlein (1390-1460) welcomed Shabbes with “three fine hallot kneaded with eggs oil, and a little water.” This is a quotation from the Leket Yosher of Rabbi Joseph bar Moshe and is cited in Eat and be Satisfied by John Cooper (Aronson, 1993), p. 175.


Since commercial yeast was not invented until the late 19th cent. CE, the only leaven available at the time would have been wild yeast (sourdough).



sources mekorot - "Evil Inclination" History



I'm a Christian who wants to know more about history of the Jewish concept of "The Evil Inclination". (I find myself often arguing against saint Augustine's Original Sin theology and the more early sources the better).


1) Anyway I'm interested in the Theological Development of that idea. What are the earliest direct references as far as Books of the Bible, Lexicon terms, midrash, quotes from sages and so on.


2) Concerning the use of this term by contemporary rabbi's as a kind of allegorical interpretation of the Serpent in the Garden of Genesis, are there likewise early sources for that? (This interpretation appears to me as something that came with later Judaism, like a medieval sage etc.)


Anyway, I look forward to hearing your responses!




minhag - Why do we wish someone “long life” on the occasion of the anniversary of the death of relative?


Why do english-speaking Orthodox Jews in the UK wish someone “long life” on the occasion of the anniversary of the death of relative?


I can understand this wish directly after the death when I have heard that a person should consider himself as being judged but I find it difficult to understand say 20 years later. I also understand the wish that the soul of the departed should be elevated in the world-to-come.




halacha - Kohen aliyah during shiva


If a kohen is in his shiva period, can he take the kohen aliyah if there is no other kohen present? We had such a situation on Shabbat at mincha. One ruling said that the kohen should take the aliyah in such a case, but on Monday at the Shiva house, the rabbi who was present (chabad) said he should not.




stereochemistry - Why is trans-cyclooctene chiral?


How does trans-cyclooctene exhibit chirality if there are no stereocenters?


Related follow-on questions:



  1. Are all higher cycloalkenes chiral?

  2. Do more double bonds cause a bigger number of stereoisomers in cycloalkenes?




Answer



Very interesting question! The key word you are looking for is planar chirality. In trans-cyclooctene, the polymethylene bridge can either go "in front of" or go "behind" the plane of the double bond, assuming you fix the double bond and the two hydrogens in place.


As pointed out by @jerepierre, they are considered different molecules due to a high-energy barrier which prevents the interconversion. Cyclooctene is the first cycloalkene to have both stable cis- and trans- isomers. The chain in trans-cyclooctene is not long enough to swing over the double bond. As the chain gets longer, the energy barrier to rotation decreases.


Here are the two mirror images of trans-cyclooctene (image source: own work).


enter image description here


These two molecules are mirror images of each other but are not superimposable. Therefore trans-cyclooctene is chiral despite not having a chiral center.


Source




Edit: this is the first time I learned that a chiral molecule does not have to have a chiral center. After making some searches online, I feel a need to expand the answer to clarify the concept of chirality.


A chiral molecule is one that has a non-superimposable mirror image. Mathematically a molecule is chiral if it is not symmetric under an improper rotation. Chirality arises due to:





  1. point chirality: typically a carbon center with four different substituents;




  2. axial chirality: such as allenes with different substituents on each carbon (see this question);




  3. planar chirality: such as the case of trans-cyclooctene;





  4. inherent chirality: due to the presence of a curvature in a structure that would be devoid of symmetry axes in any bidimensional representation, such as fullerenes.




water - Can 1 mole of H2 react partially with one mole of O2?


I am currently studying stoichiometry (high school level) and we came across the following equation in school:



$\ce{2H2 + 1O2 -> 2H2O}$


which is clear to me. We learned in school that reactions in chemistry only happen if there are enough atoms/molecules to react (so every molecule/atom can react), therefore the following reaction won't do anything:


$\ce{1H2 + 1O2 -> nothing happens}$


So now my first question: Why does the following not happen:


$\ce{1H2 + 1O2 -> 1H2O + 1O}$


And, as a follow up question, why does the following not work?


$\ce{H2 + O2 -> H2O + 1/2O2 (Left) }$


What do I do wrong? (maybe I simply misunderstood our teacher)


Are there any explanations for this? I'm especially interested in the answer of my example with $1$ mole of $\ce{H2}$ and $1$ mole of $\ce{O2}$. According to our teacher nothing will happen at all. I would assume that at least all $\ce{H2}$ molecules react with half of the oxygen molecules to $\ce{H2O}$ - leaving half a mole of $\ce{O2}$ left over. (otherwise this would mean that all molecules "know" each other so they are "aware" that not all molecules/atoms can react)


Can somebody help me? Or point out what I am doing wrong?




Answer



As you have said, you are studying stoichiometry at High School Level. From this I can guess, that you have probably not studied the concept of Limiting Reagent yet.


What is Limiting Reagent?



In a chemical reaction, the limiting reagent, also known as the "limiting reactant", is the substance which is totally consumed when the chemical reaction is complete. The amount of product formed is limited by this reagent since the reaction cannot proceed further without it. The other reagents may be present in excess of the quantities required to react with the limiting reagent.



As per your question, $\ce{H2}$ is limiting reagent. Hence it will get totally consumed when reaction happens and 1/2 Moles of $\ce{O2}$ will be left.



1 mole of H2 and 1 mole of O2 won't make 1 mole of H2O and 1/2 mole O2.




1 mole of $\ce{H2}$ and 1 mole of $\ce{O2}$ will make 1 mole of $\ce{H2O}$ and 1/2 mole $\ce{O2}$ will be left.


$\ce{H2 + O2 -> H2O + 1/2O2 (Left) }$


And here is an advice for you. If your teacher is saying that this will not happen at all, tell him to be sure that reactant in reaction are single molecules, not 1 mole.


Read this to be more clear on concept of limiting reagent.


Wednesday, August 29, 2018

grammar - What does からか mean?


I'm translating the following sentence from a book (exact sentence is directly after dialogue in the picture).



興奮からか銀髪の外国人の口調は、いつになく流暢だった。




I have absolutely zero clue what "からか" means in general and in the context of the above sentence, as I've never encountered it before in my Japanese classes (I know what "から" and the sentence-ending "か" mean, but not this). Can someone explain what it means?


Edit: Based on Ringil's answer, would the following be a possible, accurate translation while taking the からか into account?



"The doubtful interest in the silver-haired foreigner’s voice was unusually fluent."





Answer



You should think of this like から+か. If there wasn't a か, the following would just be a statement of a fact. The から is used to give the reason for the unusual fluency of the foreigner (in this case it is because the foreigner was excited/agitated).




興奮から銀髪の外国人の口調は、いつになく流暢だった。



With the か, the speaker is no longer certain for the reason. The speaker is now only speculating that the reason for the unusual fluency was because the foreigner was excited/agitated. The か indicates speculation/doubt. You might have seen a phrase like 本当かどうか before. It's the same idea.


EDIT: If you want an accurate translation you could say something like



The silver-haired foreigner was speaking unusually fluently. Perhaps it was because he/she was excited.



havdalah - Why extinguish the havdala candle in wine?


My family's custom is that, on motzae Shabas, someone making havdala, after drinking from the cup, pours some of the wine into the saucer (which, note, already had wine, because we overflow the cup on pouring it), and extinguishes the flame of the havdala candle in it.


Why extinguish the flame that way specifically, instead of by blowing it out or another means?




(I see that the Taame Haminhagim (416) says "so it will be apparent to everyone that the flame was lit only for the mitzva" of havdala. However, it seems from his footnote there ("therefore, if he made havdala on a household candle not lit for [havdala], then he need not extinguish it") that the reason he's giving is for why we extinguish the flame, and not for why we extinguish it in the wine specifically. While one could say that his reason also implies one should extinguish the flame in the wine, making a symbolic connection between the flame and the havdala, that seems weak to me, and I seek a source for it, or a different answer.)




Answer



Your question was asked of the Ohr Somayach "Ask the Rabbi" who answers about three things:


1) Extinguishing the havdalah candle immediately after havdalah


2) Extinguishing it in wine


3) Not blowing out candles in general


On 2, he says,



""Wine spilling like water," says the Talmud, "is a sign of blessing." In order to start the week off right, we fill the cup of havdalah so that a little spills out. And not only do we spill wine, but we spill it 'like water.' That is, we use it lavishly -- to put out a flame; something you would never think of doing with wine."



All his sources (not checked by me):



Rama, Orach Chaim 296:1


Shulchan Aruch HaRav 296:5


Kaf Hachaim, Yoreh De'ah chapter 116 halacha 115


Responsa Rivevot Ephraim IV 45:35, that one shouldn't blow out a flame


parshanut torah comment - Hazi"v La"kh: what's behind the division?


The Talmud (Rosh Hashana 31a) tells us that the Haazinu song (Devarim 32) was sung weekly in the Temple and divided into six segments, given by the mnemonic HaZIV LaKh הזיו לך (where each letter is the first letter in a section). It also tells us that this method of division should be used when dividing the aliyot in the synagogue. The Shulchan Aruch rules this way as well (OC 528:5).


There are a number of traditions regarding how exactly to split it up. The first three are:



  • ה​אזינו השמים ואדברה (verse 1)

  • ז​כר ימות עולם (verse 7)

  • י​רכיבהו על במתי ארץ (verse 13)


Most understand the next one to be:




  • ו​ירא יקוק וינאץ (verse 19)


but Tosfot quotes Masechet Sofrim (12:7) that it surprisingly (because that would mean that that section (=aliya) is only 2 verses long) refers to:



  • ו​ישמן ישרון ויבעט (verse 15)


The last two are a big machloket.


Rashi, Tosfot, Tosfot Rosh, and Haghot Ashri (Ashkenaz, generally speaking) hold that it refers to:



  • ל​ולא כעס אויב אגור (verse 27)


  • כ​י ידין יקוק עמו (verse 36)


while Rambam, Rif, Rosh, and Meiri (Not Ashkenaz, generally speaking) hold that it refers to:



  • ל​ו חכמו ישכילו זאת (verse 29)

  • כ​י אשא אל שמים ידי (verse 40)


The Shibbolei Haleket (306) had the custom to uses verses 27 and 40, while Rabbeinu Chananel had 29 and 36.


The Beit Yosef says the custom (in Safed) is like the Rambam, while the Bach says the custom (in Krakow) is like Rashi.


These machlokot can all be attributed to botched traditions. I'm looking for some other more meaningful explanations for the argument, possibly from a Parshanut perspective or based on Midrashim surrounding those verses. Is there a latent conceptual difference of opinion in understanding these verses, or the Song in general? In understanding Teshuva? In understanding singing in the Mikdash? In understand getting an Aliyah?



Is there something deeper here?




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.



grammar - What are the valid potential forms of special "suru" verbs?


Good afternoon all,


From what I understand, special "suru" verbs only have one potential form which is formed using the syntax:


[verb-stem] + [せる]

For example, 愛す・愛する → 愛せる and 訳す・訳する → 訳せる.


However, A Dictionary of Advanced Japanese Grammar claims that "熱する (ねっする)" and "察する (さっする)" conjugates in the same way as "する". Snippet:


enter image description here



By that claim, it seems to mean that the potential form of "熱する" would be "熱できる (uh, ねっできる?)" and the potential form of "訳する" would be "訳できる".


WWWJDIC also has a chart which shows that the potential form of "訳する" is "訳しえる" and/or "訳しうる" (link).


So now we have these potential forms:




  1. [verb-stem] + [せる] (e.g. 愛せる, 訳せる, 熱せる, 察せる)




  2. [verb-stem] + [しえる] (e.g. 愛しえる, 訳しえる, 熱しえる, 察しえる)





  3. [verb-stem] + [しうる] (e.g. 愛しうる, 訳しうる, 熱しうる, 察しうる)




  4. [verb-stem] + [できる] (e.g. 愛できる, 訳できる, 熱できる, 察できる)




Are all of these 4 conjugations grammatically valid potential forms of special "suru" verbs?



Answer



As @fefe mentions, the 4th one is wrong for the examples you mention. I think your grammar book forgot about the potential.



I don't know the detailed etymology, but I guess somehow 愛する, 訳する, 熱する, 察する are more like "proper verbs" (although they inherit most of the irregularities of する), whereas 勉強する etc. are still more like a compound: noun+する, thereby inheriting also the suppleted potential of する, できる.


radioactivity - Stability variation in heavy nuclei


The heavier the atom, the more unstable it gets, right?


That is not true about Uranium and we know it. I wondered why. A brief explanation stated that since more neutrons are there in the nucleus there is more nuclear force to 238U than 235U. Seems legitimate, but then that should have been true about the other radioactive species. Again, we know that's not true.


So, either the explanation about the Uranium exception is not totally true or the principle of the heavier-atom instability (of course, exceptions occur at elements like U) is not a principle. Or maybe there is a relation between these two (nuclear force and atomic weight) which is beyond me.


My hunch is that the latter is true; searched some sites which had an answer to the question, but no acceptable results gained.



Answer



If the ratio of neutrons to protons in the nucleus is too high, the nucleus is unstable to beta decay. A neutron emits an electon and becomes a proton.


If the ratio of neutrons to proton is too low, the nucleus is unstable to positron decay and/or electron capture.


But how high/low is too high/low, and why does this occur?


We need to look at the Semi-empirical mass formula.



$$E = vA -sA^{2/3} - c\frac{Z^2}{A^{1/3}} - a\frac{N-Z}{A} - \delta (A,Z) $$


Where $E$ is the binding energy of the nucleus, $N$ is number of neutrons, $Z$ is number of protons, $A$ is $N + Z$, and $v$, $c$, $s$ and $a$ are empirical constants.


Only the $c$ (coulomb) and $a$ (asymmetry) terms involve the relative number of protons and neutrons.


The asymmetry term is zero when the number of protons and neutrons are equal, and relates to the Pauli exclusion princple (neutrons and protons being fermions).


Except for the coulomb term (that protons electrostatically repel each other), the ideal ratio of protons to neutrons would be 1 to 1. Electrostatic repulsion of protons explains why somewhat more neutrons than protons is favorable.


hashkafah philosophy - Hashem is here and there and everywhere?


Is Hashem really in front of us, behind us, next to us, etc?



Answer



I would have agreed with Mordechai1's answer if he would have given the correct definition of Panentheism, but since he did not give me that impression, I want to spell out what I believe he should be saying in a layman's terms:


One cannot say that Hashem Himself is in a particular spot or direction. Such a belief is quasi-pantheistic in nature because it places Hashem in a limited context, within the Creation. We would call such a belief heretical.


Those who claim this is a genuine Jewish belief are willing to say Hashem is beyond space (transcendent) and within space (immanent) simultaneously and they erroneously conclude therefore that you can point somewhere particular and say Hashem is there.


That He is immanent and transcendent is true, but the problem is that Hashem's immanence by definition cannot be understood as His particular location because then it would contradict His transcendence. So it must be understood as His interaction with His creation through Tzimtzum (contraction), hence the name "Elokim" (which represents the concept of boundaries, discipline, and definition, Din) is always used when discussing His immanence. This is all especially true if one espouses the Habad understanding (and before Habad, the Rashash) of Tzimtzum because Hashem contracted the Light of Ein Sof and not Himself. See What is the machlokes between the Gra and Ba'al HaTanya?


However, (Jewish) panentheism places the universe within Hashem (so to speak) and that is why we call Him "HaMakom" (The Place). It does not mean Hashem has physical dimensions but rather that He constantly upholds the concept of space within His will and therefore everything dimensional (including the concept of dimension) exists within His will. The term "HaMakom" can also be understood as deriving from "HaMikayeim" -The One who upholds existence through His will. (Akeidas Yitzchak, Sha'ar 48)


filter design - Practical vs ideal lowpass interpolator


Consider a signal with a sample rate $f_s = 44.1$ kHz. Let us upsample the signal by a factor of $L = 2$ and interpolate the zeros.



An ideal lowpass interpolator would have a gain of $L$ and a cutoff frequency of:


$$f_c = \frac{f_s}{L}$$


An ideal lowpass filter has an infinitesimally small transition band.


In practice I see real lowpass interpolators have a small transition band centred around $f_c$.


The transition band can be quite large, say, $0.45 f_s$ to $0.55 f_s$.


My question is: why do we centre the transition band of a practical lowpass interpolator around the ideal cutoff frequency? By doing that the practical lowpass stopband is above the ideal cutoff which does not make sense to me as that will allow a small unwanted spectral image from the $0.45 f_s$ to $0.50 f_s$ region to creep into the new signal. The obvious alternative is to make the stopband of the practical lowpass $0.5 f_s$ and put up with a passband starting at $0.4 f_s$ assuming we can't make the transition band steeper. There must be some reason this isn't the way it's done.



Answer



When designing a filter, you really care about its behavior in two regions:





  1. Passband: You want little attenuation in this region, and maybe other properties as well, like linear phase, depending upon your application.




  2. Stopband: You want as much attenuation as needed in this region.




Between these two is the transition region. This is treated as somewhat of a "don't-care" band. You don't typically constrain the response too tightly in this area, so you can't really count it being usable. In your example, the passband lies below $0.45 f_s$; after the interpolator, you only plan on using frequency content below this threshold.


This means that you can allow some aliasing in order to simplify your filter design. Your transition region starts at $0.45 f_s$; everything above that frequency in your filter's output will either have a response that is unpredictable given your filter specs (if it lies in the transition band) or one that is highly attenuated (if it lies in the stopband). The takeaway:



You can't rely upon any frequency content past the passband edge in your filter output anyway. So if it makes the filter design cheaper, why not allow the frequencies above the passband edge in the filter output to contain aliased garbage?




This technique is commonly used in multirate filters as you've noticed, as it allows savings in the required filter order in order to meet a given set of passband/stopband specifications.


halacha - How many degrees of separation from food does one have to kasher?


I understand that the sink, the dishwasher, and sponges, etc. all need to be kashered, presumably because they touch things (plates, utensils) that also touch food.


But how many degrees of separate objects/surfaces need to be kept kosher in such a way? For example, if I am using hot rocks to kasher my counter or dishwasher, do the rocks first need to be kashered? If not, why not?


Supposedly, tabletops and counters need to be kashered and/or covered. Do placemats? Trivets? Vases that sit on the table? If not, wouldn't they treyf up the table and thus the food?


Related: Knife sharpening - can it be done anywhere?


Does a kosher pot become non-kosher after you kasher utensils in it?


Transfer of taste to/from non-food items



Answer



There isn't any real halakhic requirement to kasher items that are any degrees of separation from food. You only need to kasher items that are directly being used to cook food.




The only time we are required to apply the Koshering Process is on items that are normally used directly on the fire, or are in contact with hot foods that are directly on the fire. These are called Keli Rishon and Iruy Keli Rishon respectively.


Sinks, refrigerators, trash cans, counters, dishwashers, stovetops, tables, cutting boards, mixmasters, silver kiddush cups, and anything not used with hot foods from the fire do not need any koshering.



Silverware are typically kashered because on occasion one uses them in the cooking process, therefore it's easier to kasher them along with anything else. But nothing else "needs" to be kashered, or even covered since:


1) it's not being used in the cooking process


2) the temperature of its involvement is diminished to the point it can't absorb, or it can't transfer what it has absorbed back into any of your vessels


So there aren't any degrees of separation to worry about, one only needs to kasher the item directly involved with cooking food.


Source: http://kashrut.org/halacha/?law=kashering


halacha - May one marinate fish on Shabbat?


I was viewing O.C. 321 and there are a few halachot at the beginning that mentions that one cannot salt or put cabbage in vinegar on Shabbat because it is similar to cooking. My understanding of this rule is that it seems to be in terms of preserving the vegetable for later. There seem to be permission to salt vegetables that will be eaten immediately.



Ceviche is a dish made by marinating raw fish in lemon or lime juice, mainly. If the ceviche will be eaten for a Shabbat meal, may one marinate the fish? Are the parameters of the marinating prohibition based on either the type of food being marinated (i.e. are veggies a problem but fish is not?) or is it a "time" concern (i.e., it's not a problem if you are eating the food immediately.)



Answer



The Mishna Berura in 321:5 (21) states that one may not salt raw fish or meat; whether to eat it on that Shabbat or to prevent it from spoiling.


He says that it's a Rabbinic decree as it looks like one is preserving it, since the salt makes it edible.



{כא} אסור למלוח וכו' - דהא דמתירין לעיל בביצה למלחה היינו לצורך אותה סעודה אבל למלוח הבשר וביצה כדי להניח לאחר זמן דמי לעיבוד וכבישה והנה דעת המ"א וט"ז דאפילו דעתו לאכול ביומו אם הוא לצורך סעודה אחרת יש ליזהר בזה [והיינו כשהסעודה אחרת נמשך זמן רב אחר סעודה ראשונה] אבל הא"ר מצדד דאין לאסור רק אם בדעתו להניח לאחר שבת וכן משמע מביאור הגר"א ובפרט אם העת חם והוא עושה כן כדי שלא יסריח בודאי יש להקל לצורך סעודה אחרת דגם הט"ז מתיר בזה - בשר או דג חי אסור למולחו בשבת כדי שלא יסריח ואפילו במקום הפסד אסור ואפילו רוצה למלחו כדי לאכלו אחר מליחתו חי אסור דאע"ג דאין עיבוד באוכלין מדאורייתא מ"מ אסור דמתחזי כעיבוד שהמלח מכשיר האוכל ומתקנו אבל מותר להדיח הבשר כדי לאכלו אח"כ חי ואין זה מקרי תיקון שאין התיקון בגוף הבשר אלא שמדיחו משום דם בעין שעליו. ומ"מ נראה דאסור להדיח הבשר שלא נמלח כשחל יום ג' להיות בשבת וכדי שלא יאסר אח"כ לבישול כיון שאין רוצה לאכול היום וגם אין דרך לאכול חי ניכר שעושה לצורך חול ואפילו ע"י א"י אסור להדיח שאין כאן הפסד כ"כ אם לא ידיחנו שיוכל לאכול צלי כ"כ המג"א ומיירי ביחיד בביתו אבל בקצב המוכר לאחרים בודאי יש הפסד בזה ויכול לעשות ע"י א"י וכן באווזות פטומות שיפסיד השומן אם יצלם גם להמ"א מותר ע"י א"י אפי' יחיד בביתו. ואפי' בבשר בהמה הסכימו הרבה אחרונים דיש להקל להדיח ע"י א"י ודלא כמ"א ועיין בא"ר ובתשובת נודע ביהודה שכתבו דאם אי אפשר ע"י א"י מותר גם ע"י ישראל אך אם מונח הבשר בכלי טוב שירחוץ ידיו עליו עד שיהיה שרוי הבשר במים:‏



sources mekorot - Are there any early mentions of the concept of "l'iluy nishmas"?


On his Rationalist Judaism blog, R' Natan Slifkin posed this question:



I am very interested to know if there are any early mentions of the phrase "l'iluy nishmas" or the concept thereof. (I am not referring to the concept of atoning for the departed via charity, but to the concept of elevating the soul, particularly via Torah learning.) My hunch is that it does not appear in the period of the Rishonim at all. Please let me know if I am wrong!



Do you know of any references to this concept from the period of the Rishonim or before?




tefilla - Why did people not go to Shul at Yom Tov by night?


The sages instituted the Bracha MeEin Sheva on Friday night because shuls were located in the field and if someone would be late to minyan, he'd be endangered by having to walk home alone.


On a weeknight, no one went to Shul due to being late at work and would rather Daven at home (!), so the Rabbis didn't see a need to institute this blessing.


But Yom Tov doesn't have this blessing either, which implies that no one went to Shul on Yom Tov night. Why not? It's not that people can work into the night?




parashat bereishit - What was Hevel (Abel's) sin?


The Arizal says that Hevel was reincarnated many times to purify his sin. What was his sin?



Answer



See here as a translation from the Arizal:



Cain and Abel also damaged [reality]. [Not only Cain but also] Abel "gazed and damaged".



According to the Sages, when Abel offered his sacrifice to G-d, he gazed upon the Divine Presence and therefore became incurred the death penalty (which is why it was divine providence that Cain killed him). Gazing upon the Divine Presence means experiencing divine consciousness for selfish intentions. The individual considers himself an independent agent who may rightfully pursue his own satisfaction. Having chosen to sunder himself from G-d, the source of life, he forfeits life - even if the object of his satisfaction is none other than the Divine glory!


This is the mystical meaning of the phrase: And G-d paid heed to Abel and his offering (Gen. 4:4). We would have expected this phrase to read: "And G-d paid heed to Abel's offering." The meaning of G-d turning to Abel here is that He allowed him to gaze [on the Divine Presence].


Abel should have demurred, aware that it doing this would cause him to experience G-dliness as one separate from it. Indeed, when Moses realized that the burning bush was a revelation of G-d, he "hid his face, for he was afraid of gazing at G-d." (Commentary of Rabbi Shalom Sharabi on Ex. 3:6.)



Raises the next question of where the reference is to "According to the Sages" but that is another question.


inorganic chemistry - Why is it difficult to measure the pH of environmental water samples accurately (near 7)?



I've read in several places (edit: 1, 2, 3, 4, 5, 6, 7, 8. 9, 10, 11, 12) that there are many practical factors that make accurate pH measurements of roughly neutral environmental water samples more challenging than significantly basic or acidic samples.


Since the glass probes are sensitive fairly specifically to hydrogen or hydronium activity, why would concentrations around $\ce10^{-7}$ be more challenging than a much higher or especially much lower concentration, say $\ce10^{-10}$?


Discussions of the problem seem to center around issues related "solutions of low ionic strength", so a basic solution near pH 10 and a buffered solution near ph 7 would both have less practical measurement issues than a non-ionic solution near pH 7.


Is there a way to explain the practical issues clearly, but in fairly simple, somewhat physical rather than purely mathematical terms?




Tuesday, August 28, 2018

organic chemistry - Do enolates get protonated at the carbon or oxygen atom?



An enolate has two resonance structures. When it gets protonated, where is the $\ce{H+}$ more likely to go? On the oxygen to produce an enol, which tautomerizes to the keto, or on directly onto the carbon (no enol intermediate). I know that both lead to the same product, but when drawing the mechanism this would be good to know.


enter image description here



Answer



Like all ions in solution, the enolate does not exist on its own in free form. It will be solvated with maximum efficiency. Depending on the solvent itself, the counter ion might be further or closer away, but charge balance needs to be maintained in the bigger picture.


Contrary to popular belief, the enolate ion is nothing that truly exists in non-gaseous phase. Therefore the question what gets protonated first turns into the question: Does the oxgen or the carbon have the stronger interaction with the solvent? This is quite hard to judge and very dependent on the whole system. there is certainly no general rule for it and as previously stated by bon, it does not really matter, because keto-enol tautomerism is fast and the ratio is entirely determined by the relative stabilities to the involved species.


There is another issue when talking about protonation. The proton itself is not free, either. In an aqueous solution the smallest model would be the hydronium ion. But this is far from being complete either. A whole branch of computational and theoretical chemists work on describing water clusters with models. It is extensive. One of the reasons for it being hard to comprehend is the high flexibility and mobility of protons even when bound to other species. The high conductivity of an acidic or basic solution is mainly governed by the Grotthuss mechanism. This kind of mechanism can in first approximation also be applied to keto-enol tautomerism.


But before we dig deeper into any mechanism, I would like to look at the properties bon outlined for the enolate. The following results were obtained at the DF-BP86/def2-SVP level of theory for the deprotonated butan-2-one resonance hybrid.
Let's look at the obvious first: resonance. With the help of the natural bond orbital theory (NBO) I performed the analysis. The first and most obvious thing is that it finds a so called hyper-bond between the oxygen and the two carbons with an occupancy of 3.95 electrons. As we will see in the refined analysis, this is in favour of the carbon-carbon bond (59.5/40.5 considering only these three atoms).
A more refined analysis, I chose a cut-off of 5%, include secondary resonance structures, seven in total, gives us the following weights for the major contributors:


mesomeric structures of the enolate ion



From these structures we can support the highlighted arguments in the statement by bon:



Attack on an enolate by an electrophile (in this case just a proton) is governed by the balance between electrostatic interactions, which are strongest at the oxygen atom due to its greater negative charge, and orbital interactions, which tend to be stronger at the carbon atom because the HOMO of the enolate has a greatest contribution at this atom [carbon].



The predominant contributor is is the enolate, hence in the overall description also its negative charge should be predominant. The π-system is certainly part of the HOMO in any case. Since it is mainly localised over the carbons, the highest contribution should be there.


We can further support that by looking at the natural charges of this model. More prominent is it looking at the charges obtained in terms of the quantum theory of atoms (QTAIM) in parenthesis.


charges of the enolate ion


The second part can be cleared up by looking at the HOMO; on this level of theory, the major contribution is C3-p of 56% and C2-p of 32%. The contribution of O1-p is below the threshold of printing, hence it is <10%. The major contribution of O1-p is found in HOMO -2 with 44% and a contribution of C2-p of 35%. It certainly looks a bit different in the picture. The contour value is set to 0.04.


highest orbitals of the enolate


All these calculations are only evaluations of the ion in the gas phase, so they can serve as an example to understand the true nature a bit more. It is in no way intended to be complete, it shall only provide a more concise educated guess of the general nature.





Now that we have a lot of information on the enolate itself, it's time to look towards a mechanism of a solvent-mediated keto-enol tautomerism. I have chosen the most simplest model possible, with one water (hydronium) explicitly included. The result is a six-membered cyclic transition state, where a proton is transferred from the oxygen of the enol to the oxygen of water, and one proton is transferred from water to the carbon of the double bond.
In theory there might well be many more water molecules involved. In principle any protic solvent is capable of doing this. The principle reaction path is the same for a base mediated mechanism, for example with ammonia.


transition state of keto-enol tautomerism


If you look closely enough, I have borrowed heavily from the Grotthuss mechanism. A somewhat simultaneous transfer of protons. It needs to be acknowledged, that this is only an approximation of a stationary system. The animation only shows the transitional vibration mode (imaginary mode). It is not the calculated structural change or reaction path.
Unfortunately the calculations even on this low level of theory take quite some time. Currently I have no barrier height to report as an estimate, how fast this reaction would be approximately. I'll update this as soon as I can.


There is of course the possibility of a non-mediated transition state. This one, however, proceeds through a four-membered cyclic transition state. This one is highly strained, if you like the concept of ring strain, and seems unlikely compared to the above in any other medium than the gas phase.
If you are repulsed by the concept of ring strain, then you might want to look at it from a different angle. The deformation energy is high, since the carbon-carbon-oxygen is forced into a near 90° angle, hence increasing the p-content of the bonding orbitals. Higher p-orbital content means higher energy of the molecule. Therefore the activation energy will also be higher.


transition state of keto-enol tautomerism without solvent mediation


For a deeper insight into this, I recommend “Ab Initio Molecular Dynamics Study of the Keto–Enol Tautomerism of Acetone in Solution” (Clotilde S. Cucinotta, Alice Ruini, Alessandra Catellani, András Stirling, Chem. Phys. Chem. 2006, 7 (6), 1229-1234), which is available at researchgate.net.



organic chemistry - Geometrical Isomerism (Cis-Trans) in trans-2-fluoro-3-methylpent-2-ene


trans-2-fluoro-3-methylpent-2-ene this compound in also known as (Z)2-fluoro-3-methylpent-2-ene. I have given my possible structure in the image but it is wrong, Can anyone explain this ?



My possible structure



Answer



The structure you drew


enter image description here


is ‒ according to the CIP-rules ‒ (E)-configured. These rules are applied on each side of the double bond; namely



  • C of the ethyl group has a higher priority than C of the methyl group

  • F has a higher priority than C

  • C(ethyl group) opposes F, as seen across the double bond



This is not in contradiction that the two methyl groups are opposing each other, are in (trans)-relationship with each other.


In instances with only two subsitutents around a double bond, like (E)-2-pentene, you may use (E), derived from German "entgegen", literally "opposing", as synonym to (cis). For the opposite instance, (Z), derived from German "zusammen", like "together", to describe a (trans)-configuration.


In instances with three or four substitutions around a double bond, and instances of several conjugated double bonds, follow IUPAC and adhere to the (E/Z) notation; which is absolute and not ‒ as (cis/trans) ‒ relative and potentially ambiguous. See the example E/Z notation, for example. (Or, as one teacher told me, "stay on the E-Z pass".)


messiah - Holidays in the future



There is a tradition that in the Messianic era,



Our Sages teach that when the Messiah arrives the festivals will cease to be observed, but Purim will continue to be observed. The Midrash (Mishlei 9) derives this unusual conclusion from a statement in Megillat Esther, (9:28) “the memory of Purim will never cease from among their descendants.”



from https://www.ou.org/holidays/purim/purim_is_forever/


This was brought up in discussions of Pesach in the future (in the third to last comment) and might be implicitly challenged by the future status of Tisha B'Av.


But in the Artscroll Machzor for Sukkot, the explanatory note on the Haftarah of the 1st day reads



this topic [Gog and Magog] is related to Succos because of the prophecy that those nations who would survive the wars would join Israel every year in celebrating the Succos festival.




(emphasis mine)


The prophecy is found later in that Haftarah.


How are we to understand the nature of holidays in the Messianic era if we have so many apparently contradictory positions about which holidays will and won't exist?




halacha - Can non jews give death penalty for something other then the 7 laws of noah


Can non jews give death penalty for something other then the 7 laws of noah?
Source and clarification (in what cases) please





particle に - Function of に in this passive construction


I understand the basics of the "suffering passive". For example, it's my understanding that in a sentence like 友達にビールを飲まれた, "tomodachi ni" marks the person who drank your beer.



ぼくにもんくいわれても困る



Who does ぼく refer to and what is the role of ぼくに in this sentence?


bokunimonkuiwaretemokomaru




Answer



You're right that the sentence is Suffering Passive (迷惑の受身), a kind of Indirect Passive (間接受身).


Here in [僕]{ぼく}[文句]{もんく}言われても[困]{こま}る, 僕に doesn't mark the person who does 文句言う, but the indirect object of 言う.



文句(を)言う = (you) complain to me.



It's saying "I will 困る if you 文句を言う to me."


electronic configuration - Do atoms react to fill outer shell or 8 valence electrons?




I recall in middleshool chemistry we simply said electron shell configurations were 2,8,8,many which I would have no problems with.


But now I'm learning that shells contain $2n^2$ electrons where n is the shell number.


Then why is "full outer shell" and "8 valence electrons" still used interchangeably when describing stability? i.e we are taught that atoms react in ways that achieve an outer shell of 8 valence electrons. But at the same time, they react to form full outer shells.




matlab - I have a pressure signal and want to do SPL analysis on it


Signal


I have an acoustic signal from a Ffowcs Williams Hawkings CFD analysis and would like to convert it to the frequency domain and see the SPL and OASPL. I know I need to use fft() but I am unsure why my plot differs so much from the one from FLUENT.



time = data{1};
p = data{2};

Fs = 1/(time(end)-time(end-1));
L = 0.887*Fs+1;
N = 2^9;
Y = fft(p,N);

for k = 1:N/2
f(k) = (k-1)*Fs/N;

end
spl=20*log10(abs(Y(1:length(Y)/2)));
semilogx(f,spl,'k','Linewidth',2)


halacha theory - Yalkut Yosef or Mishneh Torah for a Sephardic Jew?



My Hebrew is rusty and my knowledge of all the halachot is equally rusty. I want to take on a new project to complete either one of those compilations.


For someone coming from a Sephardic heritage, which compilation would be better suited for gaining a practical and comprehensive know-how of the dos and don'ts of Judaism?


What are the major differences between the two compilations?


Or would it be even better to start with the original Shulchan Aruch?



Answer



Coming from a similar background, I highly recommend Yalqut Yosef as a first stop as opposed to Mishneh Torah or Shulhhan Arukh. In contrast to Mishneh Torah and Shulhhan Arukh, Yalqut Yosef - having been written relatively recently - has modern examples that are more practical to the Ba'al Teshuva.


If you can manage in Hebrew, the Yalqut Yosef Kitzur Shulhhan Arukh is fantastic (available online here). For brevity, however, it does not always go into long explanations on rulings. For that, you could tackle the full Yalqut Yosef (some of which has also been translated into English - Shabbat, for example). Unfortunately, the 2-volume Kitzur has not yet been translated to my knowledge.


Good luck!


physical chemistry - Is there a least reactive chemical species?


As a total chemistry layman I enjoyed reading "Why doesn't $\ce{H2O}$ burn?", but it prompted another question in my mind. One of the answers there was that $\ce{H2O}$ can burn in the presence of a stronger oxidizer like fluorine, so burning stable compounds is just a question of using a stronger oxidizers.


Or is it? Is there a chemical species, or a "least reactive compound" that, once made, is difficult or impossible to chemically transform into something else? A chemical black hole, if you will.


Does the above answer change if we allow high temperatures and pressures versus restricting ourselves to roughly standard temperature and pressure?



Answer



I think a good argument can be made for either helium or neon, the most noble of the noble gasses. Those are the two prototypical unreactive elements. They are the only two stable elements for which no more complex compounds (i.e., other than the single atoms themselves) have yet been isolated, at any temperature. The slightly more reactive element argon will admit formation of compounds such as argon hydrofluoride ($\ce{HArF}$). This compound is only stable up to $\mathrm{17\ K}$, because any hotter and the frail bonds are overcome by random thermal collisions which break the compound apart into $\ce{Ar}$ and $\ce{HF}$.


Picking which of helium or neon is less reactive is a bit more difficult. A naive analysis of periodic trends would point to helium as the most inert, but more detailed computational studies suggest that at least in some cases neon may be less reactive. For example, the extremely Lewis acidic compound beryllium monoxide ($\ce{BeO}$) may potentially form an isolable, if very weakly bound, compound with helium, $\ce{HeBeO}$, but neon is not thought to form the analogous $\ce{NeBeO}$. $\ce{HHeF}$ may also be just barely stable, whereas $\ce{HNeF}$ is not thought to form. None of these have yet been observed in the laboratory, but there is definitely ongoing research into coaxing helium and neon to make isolable compounds.


All that said, we can get helium and neon to react, if we drop the requirement that the product must be isolated (that is, "put into a bottle"). Chemical species such as $\ce{He2^+}$, $\ce{Ne2^+}$ and $\ce{HeNe^+}$ have long been known from mass spectrometry experiments, they just can't be isolated because that would require the presence of a counterbalancing negative ion, which would immediately proceed to react with the positive ion and cause decomposition with release of the noble gas. You can also bring what is arguably the most reactive species in chemistry, the hydrogen cation ($\ce{H^+}$) into the fray. Helium and neon will both easily react with $\ce{H^+}$ to form $\ce{HeH+}$ and $\ce{NeH+}$ , as shown by the exothermic proton affinities of $\ce{He}$ and $\ce{Ne}$. Again, these composite particles cannot be isolated, as they are amongst the strongest Brønsted-Lowry acids in existence, and will protonate anything they come into contact with in order to release the neutral noble gas atom. Some other possible non-isolable relevant noble gas ions are $\ce{FHeO^{-}}$, $\ce{HeCCH+}$ and $\ce{PbHe15^{2+}}$ (!), among others.


Edit: I forgot to mention that there are a few other cases of helium or neon binding to other atoms. By exciting one of the electrons in the atom, it is possible to coax it to bond with another one, forming an excimer or exciplex. See for example, the dihelium excimer $\mathrm{He_2^{*}}$. This is a short-lived species that still can't be isolated, however, because in a matter of microseconds it releases a photon and de-excites, promptly separating into the two free atoms.


halacha - Organ donations


Besides a kidney, are there any other organs that you are allowed to donate?




Answer



Well according to Wikipedia, here's the list of organs that can currently be transplanted from a living donor. For something like a kidney donation, the donor has two and gives one. For something like a liver donation, they take a piece from the donor, which he can live without (and will be enough to help the recipient):



  • Lung

  • Kidney

  • Liver

  • Intestine

  • Skin

  • Islets of Langerhans (Pancreas Islet Cells)

  • Bone marrow/Adult stem cell


  • Blood transfusion/Blood Parts Transfusion

  • Bone

  • Heart valve? (Anyone know more about this?)


As far as I know, the halachic logic is the same for all of these: you're putting yourself at "some risk" (safek sakana) to save the life of someone in "serious mortal danger" (vadai sakana). (Okay with an ordinary blood transfusion your risk is quite minimal. With something like bone-marrow, from what I hear there's also a question not so much of risk but of pain.) The common psak l'halacha is that the Yerushalmi requires one to put himself in some risk to save a life, but we follow the Babylonian Talmud, which allows it and considers it a great mitzva. One exception would be if the donor risk exceeds the recipient's risk. Another exception would be certain cases, if the procedure has a <50% success rate: as long as the recipient could get off the operating table without this transplant, he's considered "presumed alive" and we try to save his life. But if, for instance, they've already taken out his heart and are about to put in a new one, he's no longer "presumed living", and thus we need 50+% chances. (This was R' Untermann's ruling regarding heart transplants from dead donors; the success rate has since exceeded 50%.) A last exception would be that as it's permitted but not required, if the donor's family objects or there's similar reason weighing against doing so. But basically if I understand the current numbers, all of these should be allowed.


As for donations from a dead body, we allow anything to be done to a dead body to save a life (see above caveats); the bigger concern is which organs get harvested before halachic death.


If I recall, Newsweek had a detailed description of a living-donor liver transplant, circa 2002. The recipient had damaged his liver from a youth full of drugs and alcohol, but had been clean for many years. I asked Rabbi Welcher if we factor into our decision whether the person in danger brought it upon himself like this case, he said probably not.


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{...