Monday, November 6, 2017

fourier transform - What's the difference between using DFT, IDFT or DCT to calculate cepstrum of a power spectrum?


I've seen different equations that calculate cepstrum from power spectrum, but the equations are not consistent. Some people use Fourier transform, some use the inverse Fourier transform, and some use the Cosine transform. I.e.:


$$ C(k) = IDFT(\log_{10}P(n)) \\ C(k) = DFT(\log_{10}P(n)) \\ C(k) = DCT(\log_{10}P(n)) \\ $$


For example to calculate LPCC (Linear Prediction Cepstral Coefficients), I see either IDFT and DFT being used equally commonly, while MFCC (Mel Frequency Cepstral Coefficients) uses DCT exclusively.


Are they different? If so what's the different? If not why is there an inconsistency?




c# - Entropy of an image


If I want to measure entropy of an image how should I do it?


My aim is to ignore things like tree leaves moving in the wind with my C# desktop application.


I know matlab has this functionality but I cannot see it within Emgu which is what I am using.



I got as far as finding 'Shannon Entropy' is probably the way forward but I am stuck as to how to implement it in C# speficially for images.



Answer



You have probably found out that entropy of a discrete random variable $X$ is defined by


$$H(X)=-\sum_{i=1}^N p_i\log_2 p_i\tag{1}$$


where $N$ is the size of the alphabet (i.e. the number of possible values of $X$), and $p_i$ is the probability that $X$ assumes the $i^{th}$ value of the alphabet. The entropy $H(X)$ can be interpreted as the average information obtained by observing $X$.


In the case of an image, you need to estimate the values $p_i$. You can do this by computing the histogram of the image: define a number $N$ of bins of (equal) grayscale ranges and simply count the number of pixels per bin. Dividing the number of pixels per bin by the total number of pixles gives you an estimate of $p_i$. Then you just need to plug these values into (1) and you get the entropy of the image.


kinetics - Second order reaction with two reactants



I'm interested in the second order reaction $\ce{A + B -> P}$. Mass action kinetics is assumed.



Let $[A]_0 = a$ and $[B]_0 = b$, then $[A] = a - x$ and $[B] = b - x$. The rate law becomes


$$-\frac{\mathrm dx}{\mathrm dt} = -k([A]_0 - x)([B]_0 - x)$$



Why is the right-hand side of the differential equation negative? Shouldn't it just be the left side when we look at the decrease of the reactant $\ce{A}$? Or is it because $x$ is equal to the concentration of $\ce{P}$?




grammar - How is 高めの used and constructed?


example sentence: コレステロールが高めの方の食品


I'd like to know how 高めの is made (verb stem + no?) and how it should be used. I'm guessing the example sentence means "food which heightens your cholesterol". Does 方 mean type/category here?



Answer



This 〜め is the one meaning "slightly" or "somewhat", and the is "people". So the sentence translates as "Foods that people with high(er than normal) cholesterol (eat)". It would probably sound more serious if it were just 高い, but using 〜め it sounds more of just a neutral magazine (pamphlet, etc.) headline.



As for the , that's needed to modify . With, 高い, it would just be 高い方, but 高め is not an イ-adjective, so it requires the : 高めの方.


See also this post: “slightly/somewhat” の 「~目」: Usage and limitations.


slang - Is verb ending ない shortened to ん?



Off the top of my head I remember hearing these sentences, which I assume are just shortenings:



すみません, 分からん


絶対許さん!



Along with these two I've seen in sentence examples:



もう我慢できん


彼にはその文の意味が理解できんかった - this one is a little funky, since there is no complete ない->ん conversion, but instead なかった->んかった




Is this kind of shortening common? Can one always shorten a verb-ending ない to ん?



Answer



The ん negative ending is a contraction of sorts of classical negative ending ぬ, precursor to modern ない. It's still pretty common. As illustration of this, the Microsoft IME gives 食べん as a valid conversion option after typing in taben, or 飲まん for noman.


Note that する with the negative ん is not しん, but instead せん, as again the negative ん is from classical ぬ, and the classical negative form of する is せぬ.


(蛇足: I think this せん was another layer of pun in the shortened name of the title character in Spirited Away.)


In addition, the ん in the polite negative ending ません is this same ぬ > ん contraction. ます for the most part conjugates in a similar way as する, with the classical negative ませぬ.


Occasionally, modern ない itself will contract to just ん without coming from the classical ぬ, as in the common informal contraction じゃん from ではない, or as in the なかった > んかった shift mentioned in the question. As a verb ending, though, negative ending ん is usually from classical negative ぬ.


Edit:


じゃん is sometimes explained as a contraction of ではない, where では becomes じゃ and ない becomes ん. Phonologically, the first half is well-established and accepted where で + は shifts to じゃ, but the ない > ん shift remains unexplained. A more likely sound shift would be based on the older phrases ではあらぬ or ではあらむ. あらぬ aranu is the older verb-based version of modern negative ない nai, meaning "[there | it] isn't", while あらむ aramu with an m sound is the older version of modern presumptive あろう arō, meaning "isn't [there | it]", confirming with the listener.


Semantically, modern じゃん is used either in a negative sense, or in a confirmation sense, matching these two older verb forms.



Phonetically, both あらぬ and あらむ were known to contract to あらん aran. So ではあらぬ / ではあらむ > じゃあらん. The corruption of -あらん to -あん can be observed in the slang of some modern speakers, such as 分からん > 分かん. So じゃあらん > じゃん.


So ultimately, I don't think there is any diachronic (i.e. historical) foundation for ない itself turning into ん directly. Instead, we see the precursor to ない, classical ぬ, turning into ん via clearly observable contraction processes.


Sunday, November 5, 2017

grammar - Listing two different object



I encounter this question in my problem set.



Reizoko ni kudamono ____ (_____) _____ _____ ga arimasu



  1. ga 2. mittsu 3. to 4. gyuunyuu



I see in the solution that the answer for word in parentheses is (2. mittsu). What is the complete sentence? What is the meaning of the sentence?



Answer



The correct sentence is:




冷蔵庫に果物が3つと牛乳があります。
Reizoko ni kudamono ga mittsu to gyunyu ga arimasu.



Which means "There are three pieces of fruit and milk in the fridge."


To correctly answer this question, you need to know:



  • How to use と (to) to list two or more nouns

  • Two ways to count things and how to use it in combination with と

  • 果物 is always "countable" with つ/個 (tsu/ko), while 牛乳 is not counted like this.



grammar - How to say "a year has 12 months"?


一年は十二ヶ月があります.


I'm trying to say "a year has 12 months" or "there are 12 months in a year." Is the above sentence correct?



Answer



You can simply say:




一年は十二ヶ月です。



With あります, we natives definitely say it without が.



一年は十二ヶ月あります。



Even though 「~にはがあります」is a basic correct structure, when it comes to amount/number of something, we seem to definitely prefer it without が, :



一年には十二ヶ月あります。  




I find we definitely say it with が when talking about the seasons:



一年には四季があります。



It's possible to say:



一年には季節が四つあります。[But never 四つがあります]






[Replying to additional request]



Could you explain why we don't say 一年は四季です or 一年には12ヶ月があります (even though 一年は12ヶ月です and 一年には四季があります both mean "A year has ~~") ?



I believe it's because だ・です・である are to describe the subject, and also it's because we treat the words of amount/number as if they are adverbs.



一年は四季です



I don't say this is wrong, but I think you feel as though you're reading a metaphor.


I believe you don't have any problem with




一年には四季があります,



but I know you won't say



一年には四季あります



Here, we see that we don't treat 四季 in the same way as 12か月 or 10kg. We say この箱は10kgあります, but we never say この箱は10kgがあります。(I'm already getting used to 1年には12か月があります, however) 1年には12か月あります sounds just the right.


We say
会議は明日です。

But we don't say
会議は明日がです nor 会議は明日にです。
It's because the words like 明日 or 去年 or 当日 are acting like adverbs in this usage.



Ref: 名詞でありながら、文中であたかも副詞的なものとして機能する場合がある。例えば「昔・昨日・来年」「以前・以後・後日」などは、そのまま(つまり格助詞を伴わないで)文末の述語を修飾することができる。さらに「子供が3人遊んでいる」「夏休み中に小説を10 冊読んだ」の中の数量名詞も、その働きは副詞的である。(Source: 日本語教師のページ | 名詞の副詞的用法)



physical chemistry - What is the biggest known difference between rₑ and r₀?



What is the biggest known difference between $r_e$ and $r_0$? Where $r_0$ is the average bond length of the lowest vibrational state, and $r_e$ is the location where the potential is lowest.


For a perfect harmonic oscillator, these are the same (notice that the peak probability is exactly at the minimum of the potential):


peak probability of lowest vibrational state and harmonic oscillator


What is the largest known difference between $r_e$ and $r_0$ in a real molecule?


This is important because the CRC Handbook on Chemistry and Physics almost always gives $r_0$ because that's what can be determined more easily from experiment, but ab initio geometry optimization almost always gives $r_e$, yet many publications do not even say which type of bond length they are reporting.




coordination compounds - How do you determine the hybridisation state of a coordinate complex?


If an exercise asks for the hybridisation state of a coordinate complex (ion in solution) consisting of a central cobalt atom surrounded by $\ce{NH3}$ ligands, and neither coordination number or complex ion is given, how do you decide which configuration will occur?


The answer is that in a solution this will form a $\ce{[Co(NH3)6]3+}$ complex ion. I know that this means the hybridisation is $\mathrm{d^2sp^3}$ but can't figure out how to get there since cobalt is found in different oxidation states.




word choice - What is the difference between 「ほど」 (hodo) and 「ぐら い」 (gurai)?


As in the question title, what is the difference between the two sentences below?



一{いち}時{じ}間{かん}ほどかかります。
ichijikan hodo kakarimasu.


一時間ぐらいかかります。
ichijikan gurai kakarimasu.



How do we choose to use one over the other?




Answer



Matti's answer is sufficiently correct, but I'd also like to add that ほど seems to have more of an implication of the translation "extent" whereas "くらい/ぐらい" is more like "amount".


In the example you gave, I'd say they mean the same thing, but to me the former sounds more like "up to one hour (and very likely to be one hour)" whereas the latter is really "about an hour".


Calculating pH for titration of weak base with strong acid



Calculate the pH at the equivalence point for the titration of $\pu{0.130 M}$ methylamine ($\ce{CH3NH2}$) with $\pu{0.130 M}$ $\ce{HCl}$. The $K_\mathrm{b}$ of methylamine is ${5.0 \cdot 10^{–4}}$.



So I started with the equation:


$$\ce{HCl + CH3NH2 <=> CH3NH3+ + Cl-}$$


and then I knew that


$$\mathrm{pH} = \mathrm{p}K_\mathrm{a} + \log \left(\frac{\ce{[base]}}{\ce{[acid]}} \right)$$



So, I put ${\log \left(\frac{0.130}{0.130}\right) = \log 1 = 0}$ and then added that to the $\mathrm{p}K_\mathrm{a}$, which I got from the equation


$$\mathrm{p}K_\mathrm{a} = \frac{K_\mathrm{w}}{K_\mathrm{b}} \quad \rightarrow \quad \mathrm{p}K_\mathrm{a} = -\log(K_\mathrm{a})$$


However, after I plugged those in to get a $\mathrm{pH}$, it turned out to be wrong and then comments said that when titrated a weak base with a strong acid, the volume is doubled at equivalence point and the concentrations are halved.


Why is this? I now know that my original equation was wrong and it should be


$$\ce{CH3NH3+ <=> H+ + CH3NH2}$$


and from there I should make an ICE table with the concentration of $\pu{0.0650 M}$.



Answer



First of all, when you titrate a weak base (methylamine) with a strong acid, the equation of titration is:$$\ce{H+(aq) + CH3NH2 -> CH3NH3+ }$$The reaction of titration, as you can see is total and quantitative. The constant of the aforementioned equilibrium is: $$ K=\frac{K_\mathrm b}{K_\mathrm w}= 5\times 10^{10} \gg 10^3$$ According to the stoichiometry of the neutralization equation, at the equivalence point: $n_{\mathrm{acid}}=n_{\mathrm{base}}$ $$ C_{\mathrm{acid}}.V_{\mathrm{acid}}=C_{\mathrm{base}}.V_{\mathrm{base}}$$


As the initial concentration of the base equals the initial concentration of the acid, the volume of the acid at the equivalence point equals the volume of the base: $$ V_{\mathrm{acid}}^{equiv.}=V_{\mathrm{base}}$$ You can see that the total volume is doubled.


Now, let's calculate the $\mathrm{pH}$ at the equivalence point: We have a weak acid at the initial concentration $$C_{\ce{CH3NH3+}}=\frac{C_{\mathrm{base}}.V_{\mathrm{base}}}{V_{\mathrm{base}}+V_{\mathrm{acid}}}=\frac{C_{\mathrm{base}}.V_{\mathrm{base}}}{2V_{\mathrm{base}}}=\frac{C_{\mathrm{base}}}{2}= \frac{0.13}{2} = \pu{0.065 M}$$ It's in equilibrium with its conjugated base: $$\ce{CH3NH3+<=>H+(aq) + CH3NH2}$$ The acid is partially dissociated:$$ [\ce{CH3NH3+}]= 0.065-x$$ $$ [\ce{CH3NH2}]=x$$ $$ [\ce{H+(aq)}]=x$$ Let's write the constant of this equilibrium: $$K_\mathrm a= 0.2\times 10^{-10}= \frac{x^2}{0.065-x}$$ We solve this equation of second order to find $x$, the concentration of ion hydronium. We find: $\mathrm{pH}= 5.94$



terminology - What do you call these words?


I'm trying to figure out what the term is that describes words that look like this:




やっぱり; さっぱり; うっかり; こっそり; ひっそり; ぐっすり; すっきり



They seem similar to 擬態語、義質語、and 擬音語, but I think they have a separate classification...


Is there a term that describes words like this? (Please let me know if this has already been asked). If there is not a term, how would one talk about these adverbs in Japanese? If I needed to state that "I have problems remembering (these types) of adverbs", how would one go about explaining that?



Answer



They are called adverbs. Among them, やっぱり and うっかり are called sentential adverbs, and are independent of the core event described by the predicate. さっぱり, ひっそり, ぐっすり, and すっきり are called manner adverbs, and are directly tied to the core event described by the predicate. I am not sure which group こっそり belongs to.


experimental chemistry - How do I determine the amount of Calcium in a substance using EDTA titration?



I need to determine the amount of calcium in a substance (that also contains Magnesium) using EDTA titration. From what I understand, this can be done by adding Eriochrome T indicator to the solution, then titrating it with EDTA. The solution will start out Red then turn blue as the Ca ions bond with the EDTA. Many of the labs I search up online seem to follow these procedures. However, doesn't Magnesium also bond with EDTA? Wouldn't that affect my calculations since I'd be measuring Ca AND Mg as they both bind with both Eri T and EDTA?


Thanks




monochrome (1-bit black-and-white) image conversion


When converting scanned text to a 1-bit black-and-white image what are some filters that one can apply in the process to improve the result? Right now I am running into the problem where dithering errors make the image look horrible.


Update: I think trying to undo dithering is a much harder problem. How can I convert the first image to a monochrome image? The default approach convert -monochrome img1 img2 is shown below. I've also tried a two-step approach: 1) decrease depth (color palette) and gamma 2) convert to a bilevel image (not shown). Other things I played with included imagemagick's ordered-dither (at various settings), but it wasn't as good as the two-step approach.


text image monochrome image




Answer



I would suggest for this case that you upsample and apply a slight blur and then a sharpen, then apply the threshold operation. You won't get any more information from the pixel data, it's simply not there. But you'll get a smoother result out of the thresholding operation, and you won't need to dither. The end result is like a photocopier degradation.


Example:


result


Also, this is what it looks like when you just use a better diffusion dither algorithm ;)


enter image description here


Saturday, November 4, 2017

frequency spectrum - M-point FFT Amplitude of N-samples of a sinusoid


Suppose you have N samples of a sinusoid of frequency $f_0$.



$$ x[n] = A\sin[2\pi (f_0/f_s)n ] $$


Suppose you take an M-point FFT (where M may be greater than N) of your N samples of x. What will the amplitude of the peak of the spectrum be?


Reference: http://www.designnews.com/author.asp?section_id=1419&doc_id=236273&print=yes



Answer



In general the FFT of a sinusoid function is NOT a delta function. The FFT's maximum will be around the sine frequency but the exact value will be dependent on how well the frequency of the sine lines up with the FFT grid and there will be non-zero values for most other frequencies.


You only get a delta function if the sine frequency is an integer multiple of your FFT bin spacing (= sample rate divided by FFT length). In this case the amplitude will N/2 (for conventional FFT scaling) for both the positive and the negative bin.


If your FFT length is shorter than the sine wave you have to truncate and the above considerations apply. If the FFT length is longer, you will probably zero pad. This will often result in substantial increase of the energy at the "other" frequencies and the effects depend heavily on the details of the zero padding.


In all cases Parseval's Theorem holds: total energy in the time domain equals total energy in the frequency domain. That's how you can derive an amplitude of N/2 for the special case that the sine wave frequency falls on an FFT bin: A sine wave of amplitude 1 has an RMS value of sqrt(.5). A buffer of N samples has a total energy of sqrt(.5)*N. This is the total energy. In the frequency domain this gets split between the bins at +f and at -f. Each bin receives have of the total energy which is sqrt(.5)*sqrt(.5)*N = N/2.


halacha theory - What was in the beginning of Halachah?



In a civilized state here are tons of laws and regulations. We can trace them all to when they were officially legislated. For instance traffic laws or real estate laws. But what was before they were instituted? Probably "איש הישר בעיניו יעשה" - everyone was acting according to his will.



Eventually, we can take all the laws back to the time when there were no laws - "איש את רעהו חיים בלעו".


I'm trying to extrapolate the same logic to the Halacha. First, all the Rabbinical rulings can be traced back in the Gemorah to when they were instituted - some time in the middle of the second Temple and on.


But what was before? How did the Halacha look before it was ruled? Did everyone act according to his own understanding?


For instance - how did the Jews married before the Machlokes of Hillel and Shammay about Yibbum? DId they do Smicha on Yom Tov before H & S? How did they treat witnesses before the Machlokos in Sanhedrin?




inorganic chemistry - What's the bonding in the diborane(6)- hydrogen chloride dimer?


I was researching and Googling and researching again, about this very interesting molecule: Diborane.


Then I faced a very interesting structure, something that I have never seen before. Something that turns up lesser than 50 results in Google, most of which are behind paywalls, and thus leave me in pain of not understanding this species. I'm talking about diborane - hydrogen chloride.


Diborane - hydrogen chloride


Source


So, I'd like to understand this species better.


The bonding certainly doesn't seem ionic. What is the attraction force between $\ce{HCl}$ and $\ce{B2H6}$? There must be one or they wouldn't have written these two compounds together.





Edit: I'm specifically looking for the hydrogen chloride - diborane(6) dimer you can see in the image. And the Cl is pointing towards the H in diborane, so this isn't about dipole/induced dipole interactions. You can find more info about it in here. Interestingly, in calculating molar mass, both the $M$s of $\ce{HCl}$ and $\ce{B2H6}$ are taken into account.



Answer



I find this question to be quite interesting as it clearly pertains to non-covalent interactions.


I have analyzed two conformations of the diborane-HCl dimer system, one with the chlorine on HCl orientated toward diborane (HCl-Dib) and one with the chlorine oriented away from the diborane (ClH-Dib). For comparison, I have similarly analyzed the Water-HCl dimer with the chlorine oriented toward the two hydrogens on water.


Methodology


Full geometry optimizations and corresponding harmonic vibrational frequency computations were performed with Gaussian 09 using Grimme's B97D density functional along with the 6-31+G(d',p') basis set. All geometries were characterized to C$_{2V}$ symmetry. Symmetry adapted perturbation theory (SAPT) was implemented at the SAPT2+3(CCD) level using the Psi4 software package. These computations implemented Dunning's heavy-aug-cc-pVTZ (haTZ) basis set (i.e. aug-cc-pVTZ for non-hydrogen atoms and cc-pVTZ for all hydrogen atoms). Finally, natural charges were quantified using the Natural Bond Orbital (NBO) analysis routine available in Gaussian 09 (see http://nbo6.chem.wisc.edu/ for more details).


Results


Both diborane-containing complexes were minima on the B97D potential energy surface. The H$_2$O-HCl dimer is a higher order saddle point exhibiting two imaginary modes of vibration. The interaction energy ($E_{\mathrm{int}}$) can be quantified by attractive and repulsive contributions, the former consisting of electrostatics ($E_{\mathrm{elst}}$), induction ($E_{\mathrm{ind}}$), and dispersion ($E_{\mathrm{disp}}$) and the latter consisting of exchange ($E_{\mathrm{exch}}$). The table below summarizes the SAPT results.


Contributions to the interaction energy for various dimers computed at the SAPT2+3(CCD)/haTZ level of theory.



Clearly, the dominant attractive force in each case is dispersion. The ClH-Dib complex exhibits the strongest interaction energy and contains a dipole that points from the diborane monomer to the chlorine. The HCl-Dib complex has an interaction energy that is about 1 kcal mol$^{-1}$ smaller in magnitude and exhibits a dipole pointing toward the diborane monomer. The analogous H$_2$O-HCl system is qualitatively similar to the HCl-Dib complex in terms of the magnitudes of the components to the interaction energy. Surprisingly, this dipole-dipole interaction is slightly weaker (by about 0.1 kcal mol$^{-1}$) than that seen in the dipole/induced-dipole system of HCl-Dib.


I have included below figures for the HCl-Dib, ClH-Dib, and H$_2$O-HCl complexes, respectively, with corresponding natural atomic charges shown on each atom.




Figure 1 - HCl-Dib


HCl-Dib




Figure 2 - ClH-Dib


ClH-Dib




Figure 3 - H$_2$O-HCl



H$_2$O-HCl




Interestingly, when chlorine is pointed toward diborane (Figure 1), the natural atomic charges for diborane remain rather symmetrical and diborane barely exhibits an individual dipole moment. The H$\cdots$Cl separation between the two monomers is about 3.4 Angstroms, a long-range interaction. However, when chlorine is pointed away from diborane (Figure 2), the H$\cdots$H interaction is much smaller, exhibiting a separation of about 2.2 Angstroms. When considering water, the separation increases once again (Figure 3) to about 3.2 Angstroms.


Conclusions


The dominate attractive force to the interaction energy for these dimer systems is dispersion, though we see a competing contribution from electrostatics in ClH-Dib (Figure 2). Surprisingly, the orientation of the halogen significantly affects the geometry and energetics of these systems. When chlorine is oriented toward the two hydrogens, a weaker interaction and a larger inter-monomer separation is seen. However, when hydrogen is oriented toward the two hydrogens, the interaction energy increases in magnitude and the inter-monomer separation decreases.


Q/A


I find it more convenient to address some of Martin's comments within the answer itself (sometimes responses can become quite long).


Which compound is lower in energy?



  • Based on absolute energies, H$_2$O-Cl is the lowest in energy of the three dimers (by about 23 Hartrees).



How stable are they wrt decomposition?



  • The interaction energy will give you this information (defined as the energy difference between the interacting monomers in an optimized dimer geometry and infinitely separated monomers adopting the geometry they have in the dimer complex). Given that the magnitude of $E_{\mathrm{int}}$ is less than 2 kcal mol$^{-1}$, I would say that these are not very 'stable'.


Have you tried asymmetric states?



  • No. I do not believe breaking symmetry in the diborane-containing complexes will change the energy/geometry appreciably.


I find it quite surprising, that the BH--ClH distance is much longer (0.6A) than the sum of the respective vdW radii, while the BH--HCl distance is about the sum of the vdW radii. Still, in both cases there should be (about) no contribution from the orbitals. How do the bond lengths change in the two conformations?




  • In the diborane-containing complexes, the bond lengths deviate by about 0.01 Angstroms (so... no change).


Can you make a rough comparison between the B--Cl distance in the two cases? They appear to be quite similar.



  • In HCl-Dib, the B$\cdots$Cl separation is about 3.79 Angstroms. In ClH$\cdots$Dib, the B$\cdots$Cl separation is about 3.86 Angstroms. Similar they are indeed.


halacha - What is the obligation of respecting parents


Is respecting parents doing what they want (hint) or doing what they command (ask for)


Does a son have an obligation to find/figure out what the father wants him to do?
Or can he just simply do what his father command him?
Or does he only need to respect him in the specific ways written in the Shulchan Aruch yd 240.4,7 feed, drink, cloth, cover, take him in and take him out, with a nice face, stand up before him




grammar - What's the meaning of 〜というものではない?


I have two textbooks, and they seem to give opposite definitions for 「〜というものではない」. The first one says it means "it's not just a matter"; while the other one says that



[It follows] a statement to express that the speaker really feels the statement to be accurate or appropriate. [It emphasizes] the speaker's desire to convey the meaning of the statement or the essence of the matter discussed.



My confusion manifests in the following example sentences, which appear to have almost opposite meanings given each explanation:




  • この病気は寝ていれば治るというものではない。

  • 相手が好きだから結婚できるというものでもない。


From what I understand, I would translate them either (using the first explanation) as



  • Curing this disease isn't just a matter of resting in bed.

  • You cannot marry your partner just because you love him/her.


or (using the other explanation) as




  • I really think that resting in bed will cure you of this disease.

  • I really think that you can marry your partner because you love him/her.


Can someone fill me in on the points I'm obviously missing? Thank you.




Edit: I checked with my teacher; and she agrees with the two answers below. Thanks again!



Answer



The first explanation is correct, that is to say the appropriate translations for your examples would be:





  • Curing this disease isn't just a matter of resting in bed.

  • You cannot marry your partner just because you love him/her.



Another example:



  • どんなことでもお金で解決できるというものではない。 It's not always possible to resolve any problem with money.


Now I somewhat agree with your second manual, in that it brings some emphasis. But not to the statement preceding 〜というものではない, it would be to the whole sentence. It would be interesting if this (second) manual included some examples...


theology - What did Bnei Yisrael experience at Matan Torah?


I'm having trouble understanding what the Israelites actually experienced at the Revelation at Mt Sinai. Did they all see God? Did they all hear Him? Did they all understand Him? Did they hear all of the '10 Commandments,' some of them, or none of them? Or did only Moshe and/or a few select people experience God directly?


Please source your answers, preferably from the relevant verses.




grammar - Rules for には usage


So I came across this sentence その元気な男の子にはたくさんの友達がいます。I was wondering what には was doing in this sentence. Additionally, I was wondering what the different uses and the rules for the uses of には were? So far the most comprehensive list I've found is here https://en.wikipedia.org/wiki/Japanese_particles, and the only rules I've found so far where in the Dictionary of Intermediate Japanese Grammar, defined as verb plain form or suru noun in front of には as being for the purpose of.




Friday, November 3, 2017

grammar - The topic is the restaurant, or the conversation is at the restaurant?


I have this sentence in my JLPT textbook:



話{はなし}の種{たね}に、新{あたら}しくできたレストランに食{た}べに行{い}ってみた。



I think I understand the part after the comma, which I believe is saying, "... tried to go eat at the new restaraunt."


But I have a hard time connecting it with the part before the comma, 話{はなし}の種{たね}に. 話{はなし}の種{たね} is, as far as I understand it, a "topic of conversation."



Does it mean something like, "We went to go eat at the new restaraunt to have a conversation"? Or maybe, "we talked about going to eat at the new restaurant"?


What does this sentence mean, and how does it come together?



Answer



The most natural reading of the sentence is something like this:



I went to the new restaurant because I thought it would be an interesting experience to bring up in conversation.



So sure, as ssb says, the speaker could be about to bring it up in conversation now, or he could have brought it up in the past or could bring it up in the future. But the important thing is that at the time that he went the intention (or one of the intentions) was to be able to bring it up in conversation later.


Just some cultural background: It's not uncommon for Japanese to talk about the fact that even if an experience wasn't enjoyable or useful per se, it was (might be) useful because of its value in conversation.


hashkafah philosophy - Eilu V'Eilu from Heaven - who said it applies to every Rabbi?


IIRC, the only examples of Elu Ve'elu (אלו ואלו דברי אלקים חיים) appear in the Talmud in the name of the Heaven (see here):




  1. Machlokes B"H and B"S (see for example Eruvin 13b): ...a Divine Voice emerged and proclaimed: Both these and those are the words of the living God.





  2. Pilegesh Bagiv'ah (see Gittin 6b): G-d (or Eliyahoo) testified that R' Evyatar and R' Yonatan are both "Elu Ve'elu".




As we see in those examples the saying is very specific and focused on an argument between two Rabbis and does not extrapolate on all Rabbis and all Rabbinical arguments.


I'd like to know, who extrapolated/applied the saying on all Rabbis and all Machlokos, that in all arguments both sides are right?


(Thanks DoubleAa for accentuating this point).




word choice - How to introduce oneself in relation to ones husband?


I know there are a few ways to essentially say "wife" (妻、家内、女房). Can they be used by a speaker to refer to themselves?


Examples I thought of:



(私はAの)妻/家内/女房です。



妻/家内/女房の○○です。



I have a feeling one can't use 奥さん, かみさん, because of the さん. I've almost never heard 家内 or 女房 used in real life, either.


How does one introduce oneself in relation to ones husband?


Related: How to introduce myself in relation to my wife?



Answer



口頭でしたら、



(はじめまして。+)
「妻の花子です。/ 太郎の妻です。/ 山田の妻です。」

「家内の花子です。/ 太郎の家内です。/ 山田の家内です。」
(+(いつも)主人がお世話になっております。)



のように言えると思います。(「家内」を使うのは正しくない、という人もいますが、実際には結構使われています。)でも、



「山田です。(いつも)主人がお世話になっております。」



というふうに、「妻」「家内」などの言葉を使わずに、少し遠回しに表現することも多いと思います。


または、ご主人が、




「あ、(こちら)妻/家内(1)です。」



と言って、そこで奥さんが、



「(はじめまして。)(花子です。)(いつも)(主人が(2))お世話になっております。」



のように言う形もよく見られると思います。



(1) 関西の人は「妻」「家内」の代わりに「嫁」を使うことも多いです。
カジュアルな場面では、「これ、(うちの)かみさんです。」と言ったり、「奥さん」「うちのやつ」(関西ではよく「嫁さん」「嫁はん」)を使ったりします。


(2) フォーマルな場面では、自分の夫を苗字で呼んで、「いつも山田がお世話になっております。」のように言うこともあります。少し年配の人が使う表現かもしれません。


Why shouldn't Gentiles keep Shabbat?


I know little about Judaism and it's a first time question, so please forgive any mistakes.


According to this question non-Jews are forbidden from keeping Shabbat. What is the reasoning behind this? I would have expected keeping Shabbat to be a God-honouring thing, especially in the cited case of a person considering conversion.



Answer



This article brings several reasons why gentiles are forbidden from observing Shabbos:



1. The Rambam in codifiying this law (Melachim uMilchamot 10:9) explains that the issue is in gentiles innovating their own laws:



Similarly, a gentile who rests, even on a weekday, observing that day as a Sabbath, is obligated to die. Needless to say, he is obligated for that punishment if he creates a festival for himself. The general principle governing these matters is: They are not to be allowed to originate a new religion or create mitzvot for themselves based on their own decisions. They may either become righteous converts and accept all the mitzvot or retain their statutes without adding or detracting from them.



2. The Maharsha (Sanhedrin 58b) compares Shabbos to the bride of the Jewish people, and compares gentiles observing it to adultery:



The Maharsha explains that the Sabbath is, metaphorically, a bride. Indeed, the Talmud refers to the Sabbath as a bride and the Shabbos is greeted in the same way that a bride is greeted. This imagery was immortalized by Rabbi Shlomo Alkabetz (a 16th century poet and Kabbalist from Tzfas) in his classical liturgical song, Lecha Dodi, which is sung just before the reception of the Holy Shabbos. Rabbi Avraham Sperling writes, based on this allegorical comparison, that “Shabbos” is the female companion to the Israelite nation. The Jewish Nation is “married” to Shabbos. Therefore, when a non-Jew follows the rules of Shabbos, it is as if he is committing “adultery” with the married bride “Shabbos”, and so he is liable for the death penalty.



3. He suggest (based on Rashi's explanation) that the resting of Shabbos is an exclusive gift to the Jews:




When Adam sinned by eating the Forbidden Fruit, he was punished by all future males having to work, “with the sweat of his brow.” This implies that HaShem expects man to work continuously without rest. However, two thousand four hundred and forty-eight years later, HaShem granted the Jews a special present, namely, the Holy Sabbath, with which they can rest, in contrast to the remainder of society. Therefore, world society is not allowed to rest because of the curse of Adam, while the Jews are allowed to rest because the Torah specifically calls for a Mitzvah of Shabbos, which was a unique gift granted to the Jewish Nation . . Rabbi Meir ben Todros HaLevi Abulafia (1170-1244) explains that the gift of Shabbos was given specifically to the Jews, and therefore if a Noahide keeps Shabbos, he is actually stealing from the Jews and is therefore liable for the prohibition of stealing (which is one of the Seven Noachide Laws).



fft - Hermitian symmetry in OFDM systems


I am trying to understand the usage of Hermitian symmetry in OFDM systems and have a couple of questions regarding this.



  1. What is the reason of using the Hermitian symmetry in OFDM?

  2. How can we arrange the data in terms of Hermitian symmetry?

  3. In OFDM system where do we arrange our data as Hermitian symmetry?

  4. Is there any reference or documentation that explains Hermitian symmetry in OFDM system?




halacha - Can a man remove hair?


May a man remove hair from his body through any of the following methods:



  • Electrolysis

  • Tweasing

  • Plucking



I am asking specifically about hair between the eyes (unibrow) but I would be interested if there are halachot that apply to other parts of the body as well. Does this fall under "Lo Tilbash"?


similar topic is discussed here




halacha - Sculptures of Animals for non-worship


Is it permitted for a Jew to buy animal sculptures for decoration purposes.




mysticism kabbalah - Animals Created By Sefer Yetzirah



The Malbim explains that someone created a calf using Sefer Yetzirah, and it could then be eaten with milk. What is it about the animals created from Sefer Yetzirah which make it permissible to eat their meat with milk?



Answer



Rav Betzalel ben Shlomo from Slutzk (1640-1691) in his sefer עמודיה שבעה here says:



An animal which is created using the Sefer Yetzirah, since it was not produced by real flesh and blood parents it is not called flesh and blood at all, but rather it is considered merely air. Therefore, it is not governed by any of the restrictions which apply to normal meat since it is not called meat, and thus can be eaten with milk and is not subject to the laws of אבר מן החי.



trop cantillation - Explain the usage of the double zarka trope


There are 3 places in the Torah (that I know of) that have a double zarka trope note before the segol:



What does the double zarka mean grammatically, and why is it only in these places?




quantum chemistry - Why is Coupled Cluster not variational?


It has been noted in several sources (e.g. J. Romero et al. Strategies for quantum computing molecular energies using the unitary coupled cluster ansatz. arXiv:1701.02691 [quant-ph]) that one of the disadvantages of the Coupled Cluster method for the description of electron correlation is that, since $e^T$ in $$E_\mathrm{CC} = \langle0|e^{-T}He^T|0\rangle$$ isn't unitary, the method isn't variational (the energy obtained by solving CC equations isn't a rigorous upper bound to the exact energy).


Could someone please explain to me the connection between non-unitarity of $e^T$ and the method not being variational.




Thursday, November 2, 2017

halacha - Posture for listening to Kiddush and Havdalah


I heard that when anyone else is listening to someone make kiddush or havdalah, l’chatchilah they must be either sitting or standing depending on what the person making kiddush or havdalah is doing. In addition, the Chazon Ish indicates that if a person did not do so he/ she is not yotzei even b’di’eved. Can you please tell me the source for this?



Answer



SA OC 396:6



אומר הבדלה מיושב: הגה: ויש אומרים מעומד (אגודה וכל בו ואגור) וכן נוהגיןבמדינות אלו:




MB 27



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



inorganic chemistry - What's so special about chelation?




There is another closely related post here , and I've also read the referenced wiki article including applications of chelation, but I still don't see what's so special about chelation. I understand the structure of the bond - the 'capturing' of a metal cation by an organic agent, but I still fail to see why this chemical reaction might be so special relative to other possible organic chemical reactions with a metal cation.


Why is chelation so special?




quantum chemistry - Hellmann-Feynman Forces with Hartree-Fock


The energy in the Hartree-Fock approximation is given as:


$$E_{HF}=\left<\psi_{HF} \left| \hat{H} \right| \psi_{HF} \right>=\sum_{i,j}P_{i,j}H_{i,j}^{core}+\frac{1}{2}\sum_{i,j,k,l}P_{i,j}P_{l,k}(ij||kl)+V_{NN} \tag{1}$$



The geometrical derivative of the Hartree-Fock energy can be shown to be [1]:


$$\frac{\partial E_{HF}}{\partial X_A}=\sum_{i,j}P_{i,j}\frac{\partial H_{i,j}^{core}}{\partial X_A}+\frac{1}{2}\sum_{i,j,k,l}P_{i,j}P_{l,k}\frac{\partial (ij||kl)}{\partial X_A}-\sum_{i,j}Q_{i,j}\frac{\partial S_{i,j}}{\partial X_A}+\frac{\partial V_{NN}}{\partial X_A} \tag{2}$$


The Hellmann-Feynman Theorem states:


$$\frac{dE}{d X_A}=\left<\psi \left| \frac{d\hat{H}}{d X_A} \right| \psi \right>$$


The Hellmann-Feynman Theorem implies that the energy derivative only depends on the parts of the Hamiltonian that have a dependency on the derivative. This leads to the geometrical derivative being equal to:


$$\frac{dE}{d X_A}=\left<\psi \left| \frac{d\hat{V}_{NN}}{d X_A} + \frac{d\hat{V}_{Ne}}{d X_A} \right| \psi \right> = \left<\psi \left| \frac{d\hat{V}_{NN}}{d X_A} \right| \psi \right> + \left<\psi \left| \frac{d\hat{V}_{Ne}}{d X_A} \right| \psi \right>=\left<\psi \left| Z_A\sum_B\frac{Z_B(X_B-X_A)}{R^3_{AB}} \right| \psi \right> + \left<\psi \left| -Z_A\sum_i\frac{X_i-X_A}{r^3_{iA}} \right| \psi \right>$$


Now the Hellmann-Feynman theorem can be applied to find the derivative geometrical of the Hartree-Fock energy:


$$\frac{\partial E_{HF,\ce{Hellmann-Feynman}}}{\partial X_A}=\left<\psi_{HF} \left| \frac{\partial\hat{H}}{\partial X_A} \right| \psi_{HF} \right>=\sum_{i,j}P_{i,j}\frac{\partial V_{Ne,ij}}{\partial X_A}+\frac{\partial V_{NN}}{\partial X_A} \tag{3}$$


I tried to implement equation $(2)$ and equation $(3)$, and used them to calculate, the force between H and Li for different distances, with cc-pVDZ and cc-pVTZ. and got the following:


enter image description here



Hartree-Fock refers to equation $(2)$ and Hellmann-Feynman refers to equation $(3)$. I have read that the Hellmann-Feynman theorem is only valid for exact solutions, but should become a better and better approximation, when going towards the Hartree-Fock limit. As can be seen in the picture, equation $(3)$ performs worse with the larger basisset cc-pVTZ. This now leads me to my question, were am I wrong in my understanding of the application of the Hellmann-Feynman theorem to the Hartree-Fock approximation?


[1] Attila Szabo, Neil S. Ostlund; Modern Quantum Chemistry: Introduction to Advanced Electronic Structure Theory; equation C. 12




particle の - What is the difference between 「女性一人」 and 「一人の女 性」?


So far, I've learnt that a quantity (number + counter) can be attached to a noun to quantify it by using の:



一人の女性。One woman.



However, I came across a sentence in my textbook where the noun an the number+counter are grouped in the opposite order and withouta any particle:



女性一人。One woman.



I wonder if there is any difference in terms of meaning, usage or style for each possibility.



You can check the original answer in the Japanese Stack Exchange from which my question arised here. It might provide the context necessary to address this question.


よろしくお願いします!


EDIT: the question was identified as a duplicate by myself because both expressions have the same meaning as stated in the linked question. However, as the excellent answer provided by broccoli forest explains, there is a different nuance between them. This differenve is not explained in the linked question, therefore I think this question is not a duplicate but it is different from the linked one.



Answer



In short, 一人の~ sounds more specific and ~一人 more general. 一人の女性 often translates into "a certain woman".





  1. 一人の女性を愛した男性







  2. 女性一人を愛した男性





If I heard these phrases, I'd take #1 as "a man who loved (only) one woman" but #2 as "men who loved (only) one woman". That is because 一人の女性 probably means a specific woman, so I think that the man is specific, too. On the other hand, 女性一人 is probably unspecific, so I think that it is talking about a group of, or generally men each of whom loved a sole (but different) woman in his life.


Similarly(?), 三匹の子豚 reminds me of a fable about certain imaginary pigs and a certain imaginary wolf, but 子豚三匹 only of barbecue in your ranch.


Now, taking from the sample in the question you linked:






  1. 一人の女性が生む子どもの数






  2. 女性一人が生む子どもの数






In the original context, it talks about birth rate, thus I feel #4 is more preferable than #3 (though not ununderstandable). The reason is that the number is an average, while the number of children each actual woman has is very diverse and 一人の女性 cannot help but be related with a random woman. You can say "a whale is a mammal" to mean "whales are mammals", but replacing "women are shorter than men" with "a woman is shorter than a man" is weird, because obviously a certain woman is not necessarily shorter than a certain man. In this case, using 一人の~ with words that explicitly mean uncertainty (e.g. 平均 "average", 確率 "probability") makes it much better.


halacha - Can one buy a car on Hol Hamoed?



One is restricted to do certain types of melachos (creative work) during hol hamoed.


Do these restrictions extend to prohibiting the purchase of a new car?




halacha - Tweeting close to Shabbos


Is there any problem with tweeting at a time when it is Shabbos somewhere in the world? Jewish followers may reply or re tweet etc.




infinite impulse response - Is initializing a digital filter's output with no "momentum" a non-trivial task?



I'm working on implementing a filter with a very slow step response. This filter is implemented as a cascaded second-order-section filter (transposed direct form 2). I'm using the output of this filter as the input to a controller. Thus I'm trying to slow down how quickly the controller set point is able to change.


I'm running into an issue where I would like to initialize the set point of this controller. In order to do this, I need to provide initial conditions to the filter.


Let's assume I have a 7th order filter implemented in SOS stages as described above. Is it is a trivial task to find initial conditions such that I can specify the output but also have it such that the there is no "momentum" in the filter for it to drive from its initial output?


If this were an analog filter, I am essentially trying to specify that y(0) = constant, while y'(0), y"(0), ... etc. all equal zero.


I've never attempted to do something similar with a digital filter. Is this trivial? Is this non-trivial? Are there any references on the subject?


Thanks for the help!


Edit: So I've changed up my system design such my filter output isn't the setpoint, but rather a deviation from a setpoint. This allows me to simply zero the filter to achieve what I was originally trying to do. However, my question still stands for a matter of interest.



Answer



If you want a stable linear time-invariant system to output constant $y$, it must have received input $x$ that is the ratio of the constant output and the zero frequency response of the system $H(1):$


$$y = H(1)x\quad \Leftrightarrow \quad x = \frac{y}{H(1)}$$



Or, you'd want to change the state of the system so that it reflects that situation. The system must satisfy the condition $H(1) \ne 0.$


For a composite filter that consists of a serially connected cascade of second-order sections, you can start with the first section with input $x$ and calculate sequentially using $y = H(1)x$ (recycling the variable names to mean the inputs and outputs of a single section) the constant intermediate output of each section. Or you could start from the other end and use $x = y/H(1).$ Knowing both the input $x$ and output $y$, use the signal flow diagram of each section to calculate its state variables, starting with the summation point with dependency only to known constants. Because all oscillation has settled due to constant input and stability of the filter, all signals are constants rather than functions of time, and the delays in the flow diagram have become identities.


Transposed direct form 2 flow diagram
Figure 1. Transposed direct form II biquad signal flow diagram. (CC BY-SA 3.0 by Fcorthay)


Given constant input $x$, the constant output $y$ of a biquad section decipted in Fig. 1 is:


$$y = H(1)x = \frac{b_0+b_11^{-1}+b_21^{-2}}{1+a_11^{-1}+a_21^{-2}}x = \frac{b_0 + b_1 + b_2}{1 + a_1 + a_2}x$$


As for the state variables, the top sum $m_0,$ the middle sum $m_1,$ and the bottom sum $m_2$ are calculated as (start calculation from the bottom):


$$\begin{align} m_0 &= b_0x + m_1\\ m_1 &= b_1x - a_1y + m_2\\ m_2 &= b_2x - a_2y\\ \end{align}$$


The top sum $m_0$ should equal $y$, which we can verify:


$$\begin{align}m_0 &= b_0x + b_1x - a_1y + m_2\\ &= b_0x + b_1x - a_1y + b_2x - a_2y\\ &= b_0x + b_1x - a_1\frac{b_0 + b_1 + b_2}{1 + a_1 + a_2}x + b_2x - a_2\frac{b_0 + b_1 + b_2}{1 + a_1 + a_2}x\\ &= \frac{b_0 + b_1 + b_2}{1 + a_1 + a_2}x\\ &= y \end{align}$$



Wednesday, November 1, 2017

halacha theory - Following the stringencies of different opinions


There is a tangential discussion in 'Eruvin, Daf 6b-7a about whether or not we can take the stringencies of two conflicting opinions. The Gemara seems adamant that we cannot, though there are examples brought that seem to contradict this. I've tried to follow the trail of Tosafoth and other Gemaras that are referenced, but they have not led me to any conclusion. Furthermore, there is nothing in the margin notes ('Ein Mishpat, Ner Mitzvah) that I see that is relevant to guide one to a conclusion. The Gemara seems to finally conclude that, so long as the two different opinions don't directly contradict such that they cannot coexist, you can take the stringencies of the two opinions.


First, if the two conflicting opinions are irreconcilable and mutually exclusive, of course you cannot take the two conflicting stringencies. What is this Gemara teaching us?


Second, despite the above, there is a widely-practiced ruling among Ashkenazim to have a Mezuzah angled, so as to satisfy the two conflicting opinions, one that it should be vertical, and the other that it should be horizontal. In light of this Gemara, how did it come about that so many people follow the practice to fulfill the conflicting opinions?




sources mekorot - Rav Soloveichik foundational essay on what Modern Orthodoxy is


I was having an argument with someone about Modern Orthodoxy, me being pro him being against, he said that even The Rav said in his foundational essay on Modern Orthodoxy that the reason for Modern Orthodoxy is because nowadays we need madah to survive as a nation in the Modern World, making it a bidyeved movement according to The Rav.


Does anyone know what he might be talking about? I've been searching for this essay and I can't find anything.



Answer



Perhaps your interlocutor was referring to "Joseph and his Brothers", printed in The Rav Speaks, where R. Soloveitchik says (my emphasis):




The Biblical Joseph relates: "and behold the sun and the moon and the eleven stars bow down to me" (Gen. 37:9) — there is secular culture, great and powerful technology creating wonders and changing the foundations of our life. Even if it is true that in Canaan we can get along without it — this secular culture entails destructive elements, many negative and perverse aspects; it may be a blessing and a curse simultaneously, and thus as long as one can live without it, so much the better for the spirit — finally we will have to relate to it. The confrontation will not take place in Canaan, however, where life flows serenely, but in a new and alien land where the tempo of life is greatly accelerated and fundamental changes occur daily.



I don't know that this would be termed R. Soloveitchik's "foundational essay on Modern Orthodoxy", though.


sources mekorot - Why Does the Torah Cycle start/end on Simchat Torah?


If the Torah was given on Shavu'ot, wouldn't it be logical to make that day the time to start the reading cycle (or, at least, line up the yearly cycle so I am up to the narrative of matan torah naturally at that time) at that point? Instead, we start and end the cycle on Shmini Atzeret which is not a time which is, as far as I can tell, inherently related to the Torah. This answer quotes a source which posits a possible explanation but nothing definite. This website presents an explanation of sorts but with no sources, and its point is that we should be starting the cycle on Yom Kippur but to avoid some sort of religious confusion, we push off the celebration to what ends up being an arbitrary date.


This explanation, though, devalues Shavu'ot then (or turns it into "Shavuot is therefore more about a relationship with G-d than the Torah itself"). If it isn't about Matan Torah, then why do we celebrate it as "zman matan torateinu"?


When did this cycle timing start and why, and why would we then retain Shavu'ot in its current form, instead of turning it into a spiritual day which ignores the giving of the Torah aspect?




grammar - い-Adjective Conjugation: かったです vs でした


When we first studied adjective conjugation in my Japanese class, I kept making the same mistake habitually; I would conjugate the past tense of い-adjectives with でした at the end instead of dropping the い and adding かったです. My teacher would correct me, and now I've more or less started doing かったです, but I still wonder about how "wrong" adjective-でした is.




○ あのテストは難しかったです。


×? あのテストは難しいでした。



Is the second sentence straight out wrong and/or extremely unnatural-sounding? Would anybody in Japan conjugate adjectives like this? Or does it possibly introduce a slightly different meaning?



Answer



あのテストは難しいでした to me sounds strange. If you search Google for テストは難しいでした, you get about 10 results, many of them written by foreign speakers. テストは難しかったです however gets far more results.


I wouldn't right out say that it's wrong to use 難しいでした as you can find many instances of it when you search for it. However, I think it's overwhelmingly used by females when you look through the results. It's just a speculation of mine, but it may sound slightly "cuter" or "younger" to use 難しいでした as in 確かに難しいでしたけれどーー字の雰囲気で何となく解りましたから――ー大丈夫でした and similar examples.


That said, I think people learning Japanese should use 難しかったです rather than 難しいでした.


Disclaimer: I'm not a native speaker, just my thoughts.


State Space representation


I'm trying to change this filter transfer function to state space representation


$ y_t=\frac{1+b_1 z^{-1}}{1+a_1 z^{-1} +a_2 z^{-2}}u_t $


I tried writing it as time series


$ y_t+a_1 y_{t-1}+a_2 y_{t-2}=u_t+b_1 u_{t-1} $



Here is where I am not sure how to continue, I wrote an expression


$ x_t=\frac{1}{1+a_1 z^{-1}+a_2 z^{-2}}u_{t-1} $


such that


$ y_t=(1+b_1z^{-1})x_{t+1}=x_{t+1}+b_1x_t $


and


$ (1+a_1 z^{-1} +a_2 z^{-2})x_t=u_{t-1}$


The idea was to get:


$ x_t=u_{t-1}-a_1x_{t-1}-a_2x_{t-2} $ $ (1)$


$ x_{t+1}=u_{t}-a_1x_{t}-a_2x_{t-1} $ $(2)$


renaming



$ x_{t+1}=x_{a,t+1} $


$ x_{t}=x_{b,t+1} $


and write my state equations as


$ \begin{bmatrix} x_{a,t+1}\\ x_{b,t+1}\end{bmatrix}=\begin{bmatrix} -a_1 && -a_2\\ 1&&0\end{bmatrix} \begin{bmatrix} x_{a,t}\\ x_{b,t}\end{bmatrix} +\begin{bmatrix} 1\\ 0\end{bmatrix}u_t$


from (2) my states are


$ x_{a,t}=x_t $


$ x_{b,t}=x_{t-1} $


But my problem comes when I want to state my output equation, which is


$ y_t=x_{t+1}+b_1x_t $


but $ x_{t+1} $ is not one of my states so I'm not being able to express my output equation in terms of $x_{a,t}$ and $x_{b,t}$



I would appreciate any hint on where I am making the mistake, thanks for your help.



Answer



You can just write $(2)$ in $y_t$, so it becomes


$$y_t = \begin{bmatrix} b_1-a_1 && -a_2\end{bmatrix} \begin{bmatrix} x_{a,t}\\ x_{b,t}\end{bmatrix} +\begin{bmatrix} 1 \end{bmatrix}u_t $$


Actually, this representation is called controllable canonical form. However, your system is not strictly proper, so you need to split it as


$$G(z)=\frac{z^2 + b_1 z}{z^2 + a_1 z + a_2} = 1 + \frac{(b_1 - a_1) z - a_2}{z^2 + a_1 z + a_2}$$


See how the coefficients appear?


halacha - In regard to a Sotah, does "zchus tola la" also apply to the person she was mezanah with?


By a Sotah, there's a concept of "zchus tola lah" Mishnah Sotah 3:4



אִם יֶשׁ לָהּ זְכוּת, הָיְתָה תוֹלָה לָהּ. יֵשׁ זְכוּת תּוֹלָה שָׁנָה אַחַת, יֵשׁ זְכוּת תּוֹלָה שְׁתֵּי שָׁנִים, יֵשׁ זְכוּת תּוֹלָה שָׁלשׁ שָׁנִים.


If she has merit, it [the effects described above] would be suspended for her. There is merit that suspends for one year, there is merit that suspends for two years, there is merit that suspends for three years.



Namely that if she had good deeds (ex: like bringing her kids to yeshiva) then she won't immediately die after drinking the "mei Sotah".


Yet, there's also a concept of "whatever happens to her, happens to her boel too"


Mishnah Sotah 5:1




כְּשֵׁם שֶׁהַמַּיִם בּוֹדְקִין אוֹתָהּ, כָּךְ הַמַּיִם בּוֹדְקִין אוֹתוֹ, שֶׁנֶּאֱמַר (במדבר ה) וּבָאוּ, וּבָאוּ.


Just as the water checks her [the woman], so does the water check him [the man], as it says, (Numbers 5:22, 5:27) "and it shall enter," "and it shall enter"



So being as her bo'el gets the same punishment she gets, does he also get this "zchus tola lah" exemption that she gets?



Answer



Talmud Yerushalmi 5,1 quoted by Tosfos Sotah Bavli 27b:



בדקו אותה ולא בדקו אותו אני אומר הזכות תלה ליה
If the water checks her but not him i say that his merit of Torah learning protected him




The Mishne Lemlech http://hebrewbooks.org/rambam.aspx?mfid=102916&rid=3990 quotes this Yerushalmi as Halacha


Low pass and High pass filter Coefficient


Is there any way to tell whether a filter is high pass or low pass by observing only it's time domain samples or coefficients?




song poetry - Why do we sing Chad Gadya and Echad Mi Yodea at the seder?


Some of the songs at the end of the seder have an obvious connection to what has come before. Adir Hu is about praising God, which we've been doing all night; Eliyahu HaNavi makes sense because Eliyahu is part of the seder; Bashana Haba'ah fits with our desire to be in Eretz Yisrael next year. And then there are the two progressive songs, one about a goat and one that counts up various important things, none of them about Pesach in particular. Why were these songs chosen for the seder?


I am aware of this similar question about Echad Mi Yodea. The comments and answer there are basically "to keep busy", but that doesn't answer the question of why these songs in particular.




purim torah in jest - PTIJ: Sarah's two lives



In Gen 23:1, we read about Sarah's two lives.




וַיִּהְיוּ חַיֵּי שָׂרָה מֵאָה שָׁנָה וְעֶשְׂרִים שָׁנָה וְשֶׁבַע שָׁנִים שְׁנֵי חַיֵּי שָׂרָה


And Sarah's lives were 127 years long, Sarah's two lives.



We know from here that Sarah had two lives, each 127 years long. During which of her two lives do the Torah's stories occur (ie. the first or the second), and what do we know about Sarah's other 127-year life?







halacha - Decorated Tallis gadol



It is quite common to see people with colorfully decorated tallises in non-Orthodox (especially Conservative) shuls, but much less common to see the same thing in Orthodox shuls. Is there any halachic issue with having a decorated tallis gadol?




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