Tuesday, February 28, 2017

vayeitzei - Why does the torah tell us Rachel was a shepherdess (Genesis 29:9)?


Within Genesis 29 the story around the well is described and while Ya'akov talks with the local shepherds it says something like this: While Ya'akov spoke with them, Rachel came, with the flock of her father; for she was a shepherdess.


Why was it so important to state that Rachel was a shepherdess? The verse already teaches that she came with the flock of her father, and the daughters of Yitro aren't called shepherdesses (see Exodus 2:16 & 19). Is there a more important reason why she is entitled this way?





sin - Nazir and Korban Chatas


I understand that the Torah orders that at the time that a Nazir finishes his year he is required to bring a Korban Chatas. I'm finding it difficult to understand this. First of all what issur did the Nazir do? The Nazir did a mitzvah by taking upon himself the nazirite oath. And secondly even if you want to find a way to say that the Nazir needs atonement, a Korban Chatas is only for someone that sins by accident, an example would be if a person forgot it was the sabbath and did one of the 39 biblical sabbath prohibitions by accident. However in this case, the Nazir knowingly and willfully takes upon himself the nazirite oath. So why does he bring a Chatas?




halacha - Can a Jew who dies on Mars be buried there?


Recently, the news has been talking about sending people on a 1-way trip to Mars.


AFAIK, no Jews have applied or are scheduled to make the trip. B"H, because I see all sorts of interesting halachic problems that may arise.


One of them - if a Jew dies on Mars, may they be buried there? Mars does have soil, after all. Or is there a specific requirement that Jews be buried only in Earth soil?



(For purposes of this question, assume that NASA or someone else can arrange a ship to get the body and bring it back. Granted, there may be other issues regarding how to preserve the body, etc. until the spaceship arrives and the return flight. Separate issue.)



Answer



Although rabbinic literature has yet to discuss death on Mars, the issue of being wholly buried underground, and the various complications to that happening (e.g., state requirements for burial in a coffin, a corpse under water, a buried corpse with limbs above ground, etc.), have been discussed. My theoretical answer depends on the work of the Rambam, the only rabbinic authority I'm familiar with that discussed both the halakhot of burial and that of Mars.


The halakha demands being buried in the ground (cf. Mishneh Torah, Evel, 4:4; Shulchan Arukh, Yoreh Deah 362), a mitzvah derived from the Torah:



בזעת אפיך תאכל לחם עד שובך אל־האדמה כי ממנה לקחת כי־עפר אתה ואל־עפר תשוב


By the sweat of your brow shall you get bread to eat, until you return to the earth--for from it you were taken. For dust you are, and to dust you shall return. (Gen 3:19)



Additionally, Ecc. 3:20 states:




הכל הולך אל־מקום אחד הכל היה מן־העפר והכל שב אל־העפר


Everything goes to the same place; everything is from the dust and everything returns to the dust.



Rabbinic literature significantly connects the land on Earth with the body of the individual; AFAIK, rabbinic literature does not equate the land on our planet with that of others. For example, in Mishneh Torah, Yesodei HaTorah 3:1, the Rambam explicitly refers to Mars as one of the nine spheres:



וגלגל חמישי שבו מאדים


And the fifth sphere contains the planet Madim (Mars)



Later (3:10), the Rambam distinguishes between these spheres and the forms of matter on Earth:




ברא האל למטה מגלגל הירח גולם אחד שאינו כגולם הגלגלים, וברא ארבע צורות לגולם זה ואינן כצורת הגלגלים ונקבע כל צורה וצורה במקצת גולם זה ... וצורה רביעית צורת הארץ נתחברה במקצתו ונהיה משניהם גוף הארץ


Below the sphere of the moon, God created a type of matter which differs from the matter of the spheres. He created four forms for this matter, which differ from the forms of matter of the spheres. ... The fourth of these forms is the form of earth. When it became connected to a portion of this matter, from the two there came into being a body of earth.



With this reasoning, Rambam makes a direct connection between the four elements found on our planet and the obligation of burial (4:4):



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


Since every entity will decompose and separate into these four fundamental elements, why was Adam told: "You will return to dust" [implying that man alone] will return to dust? Because the major part of man's composition is from dust.



Thus, Adam is derived from adamah (cf. Guide to the Perplexed, 1:14), as man is connected to the element of earth (an element he claims only exists on the planet Earth).


Obviously, the inaccuracy of the Rambam's Aristotelian physics should be accounted for in any practical decision-making (CYLOR). Nevertheless, it appears that the Rambam would argue that one cannot be buried on the planet Mars.



hashkafah philosophy - How do we know that the revelation at Sinai was not a magician's trick?


As quoted in this answer:




On the fiftieth day after they began counting the Omer--that is, fifty-one days after the Exodus, all of the Children of Israel, men, women and children, over two million people, stood at Mount Sinai and received the Torah amidst great miracles and heavenly fire. They saw no form or picture of G-d, but they saw many miracles that proved that G-d is the Creator of heaven and earth. They heard G-d's voice speak and command Moses to instruct the Children of Israel on how to prepare to receive the Torah. Then they heard G-d speaking directly to them, the Children of Israel, and commanding them to keep the Torah. The Children of Israel accepted the Torah and all its Commandments, and they said: "We agree to obey, even before we hear the actual Commandments."



We are told not to believe in miracles; how do we know that the voice of God at Sinai wasn't some magician's ploy to convert the masses and how do we know that the miracles that took place at Sinai were done by God and not some magician?




digital communications - Method of reconstructing a band-limited signal from discrete samples


I understand current cell phones use digital communications. Given that this industry brings in billions of dollars each year, there is much incentive to get the best performance possible. So what method of reconstructing an audio signal from discrete samples is normally used in a good cell phone these days? It seems there must be methods that work better than the ones I read about in text/reference books.



Answer




Some recent cell phone models use something like a Cirrus Logic CS42xx series audio IO chip, which seems to use a digital polyphase interpolation filter, a sigma delta modulator, followed by a switched capacitor DAC and low-pass filter.


Sinc interpolation (or, given finite hardware, a polyphase FIR kernel similar to a windowed Sinc) is one high quality method of reconstruction from bandlimited samples.


But reconstruction isn't the main issue with respect to audio quality. Quality or fidelity is more likely constrained by the audio data compression algorithm used (or required by standardization), and how much spectrum bandwidth is allocated by the comunications standard and regulations.


Monday, February 27, 2017

aqueous solution - Why do some substances ionize instead of dissolving in water?


My question can also be understood as



what make something electrolyte or nonelectrolyte?




I think this question stems mainly from my confusion with the definitions of ionizing and dissolving.


Dissolving of a ionic substance is due to ion-dipole attraction be/wn water molecules and ionic formula unit. If water molecule has enough attraction to break down the ionic compound, the the substance will dissolve.


Ionizing. Uh, all I know about it is...I don't really know. I think only ionic compound will ionize because it is composed of ions. So once it dissolves it basically ionize, right?



Answer



Dissolution is simply the mixing of two phases to produce a single homogeneous phase. Ionization is a process by which a substance with no net charge is converted into one or more ions. It includes the mundane example of dissolving an ionic compound in water that dissociates into its constituent ions as well as things like forming ions by knocking electrons off with an electron beam. They're both surprisingly complex topics, but I think the question can be answered conceptually by considering a few compounds: $\ce{NaCl}$ , acetic acid ($\ce{CH3COOH}$), and glucose:


glucose(source)


All dissolve readily in water, but only two of them are electrolytes. As you note, $\ce{NaCl}$ is composed of ions and breaks apart into $\ce{Na+}$ and $\ce{Cl-}$ in solution. An electrolyte is any compound that ionizes when dissolved in a given solution, so $\ce{NaCl}$ is an electrolyte in water. Moreover, because there's is no way for a salt to be dissolved without ionizing in water (i.e. $\ce{NaCl_{(aq)}}$ isn't possible), $\ce{NaCl}$ is known as a strong electrolyte as when it dissolves, it ionizes completely.


$\ce{CH3COOH}$ also dissolves readily in water, but isn't an ionic compound. Because it's a weak acid, it exists in this equilibrium in solution: $$\ce{CH3COOH_{(aq)} + H2O <=> CH3COO^{-}_{(aq)} + H3O+}$$


Because it can lose a proton to form ions, it does ionize in solution and is thus an electrolyte, but because it's a weak acid, the reaction doesn't go to completion and some $\ce{CH3COOH_{(aq)}}$ exists in solution making acetic acid a weak electrolyte as it doesn't completely ionize in solution.



Finally, glucose readily dissolves in acid, but none of its protons are readily lost so it doesn't ionize at all meaning that it isn't an electrolyte in water. Without getting too much into the thermodynamics of dissolution, the reason glucose is so soluble is because the many hydroxyl groups allow it to hydrogen bond extensively with water, where the equivalent compound without them, hexanal, is only slightly soluble due to the polar carbonyl group, and hexane is essentially insoluble.


phase - Are there any gases more dense than liquids?


Inspired by Is there any type of liquid, other than mercury, that PTFE teflon is known to "float" to the surface in?, are there gases that are more dense than liquids? (So bubbles would sink down instead of bubbling up?)



Answer



It depends on the conditions. Let's start decomposing your question in two related questions:


Denser gasses at SATP?


There are indeed some gasses that are quite dense. Sulfur hexafluoride has a density of 6.17 g/L while tungsten hexafluoride of 12.4 g/L. But usually, they are not so dense compared to the density of liquids.


Lightest liquid at SATP?


The density of liquids largely depends on the atomic mass of the compounds. Hydrogen that is the compound with the lowest atomic mass has a density of 70.85 g/L, which is probably the lowest density you can find.


So at room temperature is not possible but if you increase the pressure the density of the gasses will increase while the density of the liquid won't increase much because liquids are not appreciably compressible. It is hence theoretically possible to achieve a gas with a greater density compared to that one of a liquid, and also the coexistence of the two phases should be possible in certain conditions but the pressure required won't allow you to observe it.


Bubbles sinking down?



That won't happen also if there was a denser gas compared to a liquid. Bubble formation is quite a different process in this case inverting the gravity would be better! ;-)


nuances - When does it make sense to use 「〜でない。」?


「〜でない。」, which isn't particularly common as a sentence-ender, does occasionally get used.


I get the feeling it is pretty curt; I often see it with 「〜べきでない。」 or 「ただし、〜は、この限りでない。」 or 「〜は明らかでない。」, etc.



However, I don't have a good understanding of when it makes sense to choose it over 「〜ではない。」. Is it when you're trying to be more declarative/emotionless as opposed to emphatic/opinionated?



Answer



Basically it's a matter of grammar rather than nuance.


As you may know, 「は」 in 「ではない」 is (semantically almost bleached out but still functioning) topic marker in the theme-rheme structure of Japanese. In other words, it delimits theme and rheme parts of a clause. And one clause may only contain up to one theme and rheme respectively.


Then, what happens if you use two は at once in a sentence?



核兵器は使用するべきではない。



You may feel a sense of dissonance because:




  • 核兵器は [ [ 使用するべきで ] はない ]

  • [ [ 核兵器 ] は使用するべきで ] はない


It has two possible breakdowns so you can't decide which is the main theme of the sentence.
(Note that some people don't feel anything wrong because they conceive ではない to be a monolithic chunk.)
Thus carefully written sentences often omit the は in ではない in order to avoid confusing readers by any chance.



  • 核兵器使用するべきでない

  • 核兵器を使用するべきでない



Of course, in the colloquial language, じゃない has taken over them so that the difference between でない and ではない is neutralized.


Group cascading IIR filters of different orders


Is it possible to make one IIR filter from various cascading IIR filters of different orders?


I know it is possible to do it from filters of the same order, but what about filters with different orders?



Answer



You certainly can. In theory you can cascade any type of linear time invariant filter (FIR, IIR, overlap-add, warped allpass, etc.) of any filter order in any sequence and happily mix them up. The transfer function of the cascade is simply the product of all the individual transfer functions.



In practice, especially for fixed point systems, you need to watch gain, stability and noise, so depending on your application there may be some practical constraints.


The most common IIR implementation is cascaded biquad filters (also known as second order sections) since they are the easiest to manage in terms of noise, gain and stability.


parshanut torah comment - Calling the name of God


Chapter 3 in Joel:



א וְהָיָה אַחֲרֵי-כֵן, אֶשְׁפּוֹךְ אֶת-רוּחִי עַל-כָּל-בָּשָׂר, וְנִבְּאוּ, בְּנֵיכֶם וּבְנוֹתֵיכֶם; זִקְנֵיכֶם, חֲלֹמוֹת יַחֲלֹמוּן--בַּחוּרֵיכֶם, חֶזְיֹנוֹת יִרְאוּ.‏
ב וְגַם עַל-הָעֲבָדִים, וְעַל-הַשְּׁפָחוֹת, בַּיָּמִים הָהֵמָּה, אֶשְׁפּוֹךְ אֶת-רוּחִי. ‏

ג וְנָתַתִּי, מוֹפְתִים, בַּשָּׁמַיִם, וּבָאָרֶץ: דָּם וָאֵשׁ, וְתִימְרוֹת עָשָׁן. ‏
ד הַשֶּׁמֶשׁ יֵהָפֵךְ לְחֹשֶׁךְ, וְהַיָּרֵחַ לְדָם--לִפְנֵי, בּוֹא יוֹם יְהוָה, הַגָּדוֹל, וְהַנּוֹרָא. ‏
ה וְהָיָה, כֹּל אֲשֶׁר-יִקְרָא בְּשֵׁם יְהוָה--יִמָּלֵט: כִּי בְּהַר-צִיּוֹן וּבִירוּשָׁלִַם תִּהְיֶה פְלֵיטָה, כַּאֲשֶׁר אָמַר יְהוָה, וּבַשְּׂרִידִים, אֲשֶׁר יְהוָה קֹרֵא.‏



God said his name was יְהוָה and that is his name forever Exodus 3, 15:



וַיֹּאמֶר עוֹד אֱלֹהִים אֶל-מֹשֶׁה, כֹּה-תֹאמַר אֶל-בְּנֵי יִשְׂרָאֵל, יְהוָה אֱלֹהֵי אֲבֹתֵיכֶם אֱלֹהֵי אַבְרָהָם אֱלֹהֵי יִצְחָק וֵאלֹהֵי יַעֲקֹב, שְׁלָחַנִי אֲלֵיכֶם; זֶה-שְּׁמִי לְעֹלָם, וְזֶה זִכְרִי לְדֹר דֹּר.‏



Clearly, the passage in Joel says "whoever calls on the name יְהוָה will be saved."


How do you reconcile your tradition to not speak HaShem, with the prophecy in Joel, so that the tradition does not obscure, prohibit, or prevent calling on the name יְהוָה



Is the prohibition on speaking HaShem tradition or oral law? And, if it is oral law, could an appeal be made to the beit din on this matter?


The Psalmist actually calls upon His name to much avail, and many others as recorded in Scripture, I offer just one, Psalm 30:9-11:



ט אֵלֶיךָ יְהוָה אֶקְרָא; וְאֶל-אֲדֹנָי, אֶתְחַנָּן. י מַה-בֶּצַע בְּדָמִי, בְּרִדְתִּי אֶל-שָׁחַת: הֲיוֹדְךָ עָפָר;
הֲיַגִּיד אֲמִתֶּךָ. יא שְׁמַע-יְהוָה וְחָנֵּנִי; יְהוָה, הֱיֵה-עֹזֵר לִי. ‏





maaser tithes - Is the Mitzvah of Tzedakah fulfilled in a fraud?


If someone gives Tzedakah to a person or fund, without knowing that that person or fund is deceiving them, is the Mitzvah still fulfilled?


And a very practical application: If maaser money was used, and the fraud is later made public, does that person need to backtrack and give more maaser money to cover it?




organic chemistry - What causes the smell in rotten meat-grease and how can I get rid of it thoroughly?


We've just spilled the can of used meat-grease we collect so that it doesn't go down the drain and it turns out it was rotten. Now the granite counter-top and the wood-laminate floor of the kitchen smell very bad even after repeated cleaning with (1) dish-soap, (2) vinegar and (3) Murphy's Oil Soap as well as an enzymatic product called anti-icky-poo.


Extensive googling suggests that the smelly chemical is either putrescine or cadaverine. Am I right about that? How can I clean my kitchen such that it does not smell so bad?



Answer



If the stench is caused by putrescine or cadaverine, then you are in luck! Both putrescine and cadaverine are amines ($\ce{RNH2}$), which react with acids to form water-soluble ammonium salts ($\ce{RNH3+}$). Most soaps, surfactants, and other cleaning products are basic to help remove fats and oils (by hydrolysis). Try white vinegar, which contains acetic acid. If that fails, you can buy muriatic acid (a dilute solution of hydrochloric acid), which is used to clean pools. Find it wherever pool supplies are found.


Caution: While both of these solutions are fine for the granite, muriatic acid may not be fine for your floor - test in a small hidden area first. Vinegar should be okay for the floor as long as you don't let it soak.


Putrescine:


Putrescine


Cadaverine:



Cadaverine


pirke avot ethicsof - Why was the statement of Ben Hei Hei added at the end of Pirkei Avos 5?


The Alter Rebbe of Lubavitch writes:



ואף גם זאת דבן ה' למקרא היא ברייתא שלא הובאה בגמרא, ואינה משנה לגירסת הרמב"ם בפירוש המשניות עיין שם במדרש שמואל



That the statement of Ben Hei Hei commonly printed at the end of chapter 5 is not part of the Mishna of Pirkei Avos according to the Rambam and the Medrash Shmuel, rather it is a Braisa that is not brought in the Gemara (and thus could arguably not be relevant to psak halacha).


In addition, Double AA pointed out that older manuscripts of the Mishna don't include it.


I have heard of editions of Pirkei Avos that puts the statement before the end, perhaps to avoid finishing with something negative.


So given all of that, why was it added at all?




Sunday, February 26, 2017

translation - What does 叱ってやりたい mean in this context?


On twitter I saw this:



なのに風呂掃除したら100円もらってたおれ…叱ってやりたい!笑



What does it mean?


This is the previous tweet:



最近だなー。食ったらすぐ食器洗うのが習慣になったの。実家に居た頃は全部母親がやってたから甘えちゃってた。仕事もしてて家事も完璧にやってた母親、今更ながら尊敬します。





Answer



When this person used to live with the parent(s), the mother had a job and did household work, both completely. Nevertheless, this person recieved 100 yen from the mother each time for washing the bath tub (Washing the bath tub is a typical daily household job assigned to children in Japan). After living alone and learned to do household work by him/herself, this person now understands the burden of household work, and wants to scold himself/herself of the past for having received 100 yen for just doing a small portion of the household work without considering the hard work the mother had been doing.


Of course, you cannot actually go back to the past and scold yourself. This is only possible within imagination. If you couldn't take this meaning easily, probably this kind of mentality is difficult to understand for a native English speaker, who are more rational than literary.


やる means to do something resulting in either positive or negative effect on the person.




  • 子供におもちゃを買ってやる 'I will buy a toy for the child (with a positive effect).'

  • お前を叱ってやる 'I will scold you on you (with a negative effect).'
    Cf. お前を叱る 'I will scold you.'




A politer/slightly feminine form is あげる. This is only used for positive effect.




  • 子供におもちゃを買ってあげる 'I will buy a toy for the child (with a positive effect).'



acid base - Why does H₂Se have a bigger Ka2 than H₂Te


Why does $\ce{H2Se}$ have a bigger $K_\text{a2}$ than both $\ce{H2S}$ and $\ce{H2Te}$?




sources mekorot - Minhag not to learn Torah on the night of Nitel (Who and where)


This related question explains what this minhag is and a couple of reasons for it.


I was wondering to what extent is this minhag practiced today apart from Chabad (see Hayom Yom - 17 Tevet)? Do all Chasidim have this minhag? I'm curious, because I heard that one branch of Chasidim practice this on a different day altogether (some time in January) because that was when the Christians of their area celebrated that festival.



Also, is it practiced in all parts of the world - even in places which never officially celebrated the 25th of December?




organic chemistry - Endo rule and stereoselectivity in the Diels-Alder reaction


Do you agree with the stereocenter with the $\ce{-CF3}$ and $\ce{-CN}$ substituents in the product?



Diels Alder


source


I thought that since $\ce{-CF3}$ is a better electron withdrawing group than $\ce{-CN}$, it would be placed opposite the diene, giving the product in which $\ce{-CF3}$ points up and $\ce{-CN}$ points down.


However, I believe my proposal above is wrong, because probably the substituent with the highest electron-withdrawing property, the $\ce{-CF3}$ should be placed endo because of secondary orbital interactions. Therefore, I expect the product above should be the correct one.


enter image description here


source


When I try to do the endo-product of the following reaction I came to the other syn product with absolute stereochemistry (S,R) instead of the (R,S)-product shown here. So I'm wondering, why we get endo selectivity in the first reaction and exo selectivity here instead.



Answer




Do you agree with the stereocenter with the CF3/CN in the product?




No, I would have expected the other isomer, the one with the $\ce{CN}$ and $\ce{NO2}$ groups pointing down in your drawing.


Rationale:


When exo and endo isomers can form in the Diels-Alder reaction, there is often a preference for formation of the endo isomer. Although this endo preference is often referred to as the "endo rule", it is not a "rule", just a general, and rather weak, preference for endo product formation. In fact, in most cases both isomers are formed, just more of the endo isomer (see figure below).


The explanation most often advanced for the endo preference is "secondary orbital interactions." The following diagram illustrates the two possible transition states (TS) in the reaction of cyclopentadiene and an $\alpha,\beta$-unsaturated carbonyl compound. One TS leads to the exo product, the other TS to endo. Note how the endo TS has the unsaturated carbonyl bond tucked under the double bonds in the cyclopentadiene ring; the exo TS does not. It is speculated (1) that the overlap of the carbonyl unsaturation with the diene unsaturation somehow stabilizes the endo TS making endo product preferred. The accompanying table illustrates how weak the endo preference can be.


enter image description here


image source


In your top example, this endo preference for a TS with overlapping unsaturation would lead me to suspect that the product with the unsaturated nitro and cyano groups (the $\ce{CF3}$ group is not unsaturated) oriented away from the 3-carbon bridge and tucked towards the double bond would be preferred.


Also, keep in mind that the endo preference applies to cases were the Diels-Alder reaction is run under kinetic control. As the following example shows, the exo product is generally thermodynamically preferred (less steric crowding). So if the reaction is run under conditions (high temperature) where the initially formed kinetic (endo) product reverts to starting material, eventually the thermodynamically favored product (exo) will be formed eliminating the kinetic preference for the endo product.


enter image description here



(1) see here for an alternate explanation for the endo preference


tehilim psalms - You set a table before me in the presence of my adversaries; You anointed my head with oil; my cup overflows.?


Tehillim - Psalms - Chapter 23


5 .You set a table before me in the presence of my adversaries; You anointed my head with oil; my cup overflows.


Could someone explain The meaning of this verse?


I will controle my adversaries? I'm above them? They have no power over me?


How are we to understand this verse?




usage - Verbs + ところ / Verbs + とこ / Verbs + ばかり


I learnt:



  • 食べるところ:about to eat.

  • 食べているところ:in the middle of eating.

  • 食べたところ:just ate.

  • 食べたばかり:just ate.



I would like to know if I can change ところ for とこ in spoken language.


and if there is any difference between 食べたところ and 食べたばかり. which one is more rude, or more polite; and if I can use both in any situation.



Answer



~たところ and ~たばかり both mean "just did X". I was always taught that ~たところ means "I just did X and haven't done anything else", whereas ~たばかり means "I just did X (but could've been a little while ago)." The "scope" of the event can determine the recentness.


例文




  • 昼食を食べたところだ。 → I just ate lunch (right now).



  • (午後3:00) 昼食食べたばかりなんで、眠たい。 → (At 3:00pm) I just ate lunch (even though it was several hours ago), so now I'm sleepy.




  • (隣の人に車を見せながら) 新しい車買ったところやで! → (Show his neighbor) I just bought this new car (as in just came home from the dealership)!



  • (電車の改札口で) 森内さん、回数券多いね。新しい車買ったばかりじゃない? → (At the ticket gate for the train) Moriuchi, you sure do have a lot of commuter (train) tickets. Didn't you just buy a new car? (could have been several days or even a few weeks ago).



Low Pass FIR Filter



I want to design FIR low-pass filter with the following specifications:


 Cut-off frequency: 200 Hz 


Order: 20

Sampling frequency: 1000 Hz

what should be the stepwise method to do so



Answer



Your filter is highly under-specified, so I assume that your design is supposed to be very basic. A very basic method would be to simply truncate and shift the impulse response of an ideal low pass filter with cutoff frequency $\omega_c=2\pi f_c/f_s=0.4\pi$ (where $f_s$ is the sampling frequency):


$$h_{ideal}(n)=\frac{\sin(\omega_c n)}{\pi n}$$


Note that since your filter must be causal you need to shift and truncate the ideal impulse response such that it is symmetric with respect to its maximum:



$$h(n)=\frac{\sin(\omega_c (n-10))}{\pi (n-10)},\quad n=0,1,\ldots,20\tag{1}$$


Equation (1) gives you the 21 filter coefficients $h(n)$ of a causal FIR filter approximating an ideal low pass filter response. Note that the filter order is 20.


A simple Matlab/Octave code could look like this:


n = -10:10;
omc = 0.4*pi; % normalized cut-off frequency in rad
h = sin(omc*n)./(pi*n); % impulse response
h(11) = omc/pi; % correct NaN value at n=0
H = fft(h,1024); % complex frequency response
f = 1000/1024*(0:512); % FFT frequency grid up to fs/2
plot(f,abs(H(1:513))); % plot magnitude of frequency response

Saturday, February 25, 2017

grammar - Ending sentences with the て form



I have a question pertaining to the following line in a manga.



いや実【じつ】は最近【さいきん】下【した】の名前【なまえ】で呼【よ】び合【あ】う事【こと】になって



The speaker just called his girlfriend by her first name, and this surprises someone. That person then asks about it, and the speaker is explaining it to that person.


What confuses me is the て form ending the sentence. What would be the difference between 「なって」 and 「なった」 here?


I am fairly confident that this is not a request or command. If something is being omitted, I am not sure what it could be.


There have been other circumstances, though never in formal written material. In conversation, are sentences perhaps occasionally ended in the て form out of carelessness?


I would appreciate any help understanding this.



Answer




It's not so much by carelessness as constructive intention or sense. It keeps the sentence unfinished and can attract the listener's attention by making him/her wonder what happens then.


However, in this case, I guess what's omitted here is what the speaker said before the example sentence, in short, the te form stands for causal relationship between the omitted part, which should be the preceding remark.


grammar - ねば in 食べねば; relation between ねば and なければ


I would like to know a bit more about the "ねば" grammatical construction. Every now and then, I hear people say sentences like



東京に行かねばならぬ


粘々丼を食べねば倒れる


なんとかせねばいい




It's quite clear that ねば means the same as なければ, but



  • Is it a shorten form of なければ, or a different construction?

  • Is it an old form, or something that has been around for 20 years or so?

  • Is its usage limited to some regions? ages? social classes?

  • How (in)formal is it?

  • Is it like なきゃ and なくちゃ? (as far as usage is concerned, not nuances)



Answer




ねば can be divided into two parts:



  • ね, the 已然形 (realis) form of the Classical Japanese auxiliary verb ず

  • ば, basically the same as modern ば


So to answer your questions in detail (great format, by the way!):



  • It is a different construction -- actually なければ is a reinvention of the same concept (已然形 + ば) using modern parts!

  • It is a very old form, here it is in the Manyoshu: "... 君が目見ねば苦しかりけり" ("... Not seeing you (lit. your eyes), I suffer." -- note the use of the 已然形 was a bit different back then. This changed a few hundred years ago (IIRC) to something more like our usage)

  • I don't think its usage is especially limited except insofar as it is a bit of an archaism. (Note that the first two examples include ならぬ and 倒る, also archaisms.) I think most people would recognize it, but few would use it except for intentional effect (intentionally overformal speech as joke, etc.). However, this kind of pseudo-archaic talk is quite popular among certain internet circles, so it might be more common and "normal" there, and might have seeped out into real life from that point. I hope that someone else will be able to provide better info on this point.


  • As above, it is a bit of an archaism and so while not informal as such, it might be considered inappropriate or unusual in a case where standard Japanese was expected.

  • なきゃ and なくちゃ are normal standard Japanese, just informal (as you know of course), so it is not like them.


physical chemistry - Why do some chemical reactions require many steps?


I posted the following question in Physics SE and was advised to transfer it to Chemistry SE.




I studied physics in college ten years ago and I recently started to learn biochemistry. I enjoy finding out that some familiar concepts in physics play important roles in biochemistry such as entropy and the Gibbs free energy.



For example, as a (ex-)student of physics, I am happy to know that the Gibbs free energy determines the directions of chemical reactions. I feel this is a good example where a sort of fundamental law of physics determines how a phenomenon looks like.


However, I still can not understand why the chemical reactions in a body need to be so complex. Many chemical systems consist of more than several steps to achieve their purposes. According to Wikipedia, glycolysis takes ten steps through its process. Why are so many steps necessary?


I tried to find out a physical law that prohibit the glycolysis process from being achieved in one or two steps, but I could not find an answer. I would like to know (or discuss) whether there is a physical law that makes chemical systems so complex (many steps required).


My assumption is that some physical law prohibit the existence of an enzyme that realizes a one-step process of glycolysis.



Answer



There is no fundamental law preventing simple chemical reactions: things are complex because of the combinatorial complexity of chemical compounds


The complexity of many chemical reactions is a byproduct of the fact that there is a very, very large variety of possible chemicals. Much of that complexity happens because of the almost infinite way even some simple elements can be combined together to give complicated structures (carbon being the archetypal example). Theoretically, for example (theoretical because not all of the examples can exist in 3D space) there are 366,319 ways to build different alkane compounds from just 20 carbon atoms and hydrogen atoms (see this question here and this entry in the Encyclopaedia of integer sequences). And this number drastically understates the real complexity as it ignores mirror images and more complicated ways of joining the carbon atoms together (like in rings, for example). The complexity just gets more mind boggling if you start adding other elements to the mix.


No physical law prevent us making any possible compound in one step. But the sheer complexity of the end products makes simple ways to reach many of them extraordinarily unlikely from the laws of probability alone, never mind the specific ways chemical components can be easily joined up to make more complex things.


Here is a simple analogy. Let's say you want to assemble a Lego model of the Star Wars Death Star weapon. There are 4,016 pieces of lego that have to be assembled in the right combination and the right order. There is no physical law that says you couldn't somehow do that in a single step. But no sane person's intuition would assume that this was easy or likely. It isn't physical law that prevents one step assembly: it is combinatorial complexity. Chemistry is, do I really need to say this, more complicated than Lego: not least because atoms can be joined up in many more complex ways than the simple, standard-sized physical pins that join Lego bricks together.


Both nature and synthetic chemists have explored many ways to achieve particular end products from simpler building blocks. Sometimes new chemical Death Star equivalents (like the geometrically beautiful hydrocarbon dodecahedrane, which, incidentally, has 20 carbons but isn't counted in the list of 20 carbon alkanes) are made only after long sequences of reactions. The original synthesis of dodecahedrane took 29 steps but others found better, higher yielding, routes that took only 20. Many important drugs are first synthesised in long sequences of reactions but are later found to be available via much shorter routes (there is nothing like the economics of manufacturing cost to encourage creativity).



So the reason many chemical reactions take multiple steps isn't physical laws but probability theory. There are just too many possible chemicals and too many ways to combine things for single step routes to most given products to be likely to work. Doing one thing at a time (just like you would if building the Lego Death Star) is the way to get what you want.


grammar - Confused about ~させていただきたいと思います



それでは皆様。本日の晩餐を始めさせていただきたいと思います。



I'm a bit confused with honorific forms.


I understand 始めさせて as "Allow me to start" and いただく as the humble form of もらう, but why is it いただきたいと思います. Is it just the "want" form ? As in "I think I would like you to allow me to start today's dinner." ?



Answer



(I had to ramble at the beginning. For the quick answer, please go straight to the last part.)



「させていただく」 is (or was) indeed a "controversial" honorific phrase among us native speakers. It is, however, so incredibly wide-spread now that we do not even discuss it often anymore.


If you search 「させていただく」 on Yahoo Japan, many of the first few hundred hits are indeed regarding this controversy.


https://search.yahoo.co.jp/search?p=%E3%81%95%E3%81%9B%E3%81%A6%E3%81%84%E3%81%9F%E3%81%A0%E3%81%8F&search.x=1&tid=top_ga1_sa&ei=UTF-8&aq=-1&oq=%E3%81%95%E3%81%9B%E3%81%A6%E3%81%84%E3%81%9F%E3%81%A0%E3%81%8F&ai=XyfinzCgRpyhKC.JRT.rXA&ts=5700&fr=top_ga1_sa&b=131


The point of the controversy as viewed from the perspective of the opposing faction is that the phrase is simply too artificially and overly humble while yet sounding kind of pushy with a "weird" combination of causative and humble.


「させていただく」 simply means, or is supposed to mean, the same as 「します」 or 「いたします」. Until a couple of decades ago, therefore, using 「いたします」 was regarded as 100% polite enough for business use, so it was what most people/businesses used for humble and respectful speech. Some people, however, still strongly believe that 「いたします」 is humble, polite and respectful enough, hence the above-mentioned controversy.


A couple of decades ago, some people -- perhaps some large and influential corporations -- started using 「させていただきます」 in speaking and writing to their customers and it caught on very quickly, resulting in "everyone" using it in no time. The expression was new and it sounded very nice and polite to many.


「~~させていただきたいと思います」 literally means "I think we would like to kindly receive the favor of you graciously letting us ~~." No wonder why there is a controversy, eh?


Thus, the sentence in question means:



"And now, ladies and gentlemen, I think we would like to kindly receive the favor of you graciously letting us start today's banquet."




I trust that you could easily rephrase that the way it would sound more natural to English-speakers.


Friday, February 24, 2017

inorganic chemistry - What is the bonding type in hydrides of group 2 elements?


In one of my MCQ questions, there was a statement saying all group 2 elements form covalent hydroxides. I know it is incorrect. I know that $\ce{BeH2}$ is a covalent hydride. What about the rest? Are all of them metallic hydrides? Is it true that metallic hydrides produce the hydroxide and give off $\ce{H2}$ with water?



Answer



There is a quite extensive chapter about hydrogen and its compounds in Holleman and Wibereg's book "Inorganic Chemistry". As I only have the german version, I will briefly summarise what I read.


You are of course right, hydrogen forms salt-like structures with alkaline and earth alkaline elements, except for beryllium. Compounds like $\ce{LiH}$, $\ce{NaH}$, $\ce{KH}$, $\ce{RbH}$ and $\ce{CsH}$ crystallise in a sodium chloride structure. Every cation is coordinated by six hydride ions and vice versa. The compounds $\ce{CaH2}$, $\ce{SrH2}$ and $\ce{BaH2}$ crystallise in a fluorite structure. The hydride ions are tetrahedrally coordinated by four earth alkaline cations. The cations are cubically coordinated by eight hydride ions. This β-structure is persistent at higher temperatures. Below $780~^\circ\mathrm{C}$ ($\ce{CaH2}$), $855~^\circ\mathrm{C}$ ($\ce{SrH2}$), and $598~^\circ\mathrm{C}$ ($\ce{BaH2}$) it changes to the α-form, i.e. the lead dichloride structure. The magnesium compound exists in a rutile structure. Hydride ions are trigonally coordinated by magnesium ions. The cations are octahedrally coordinated by hydride ions.


However, according to the difference in the electronegativities, you would expect a predominant covalent character. The maximum is $1.3$ for $\ce{CaH2}$ and the minimum $1.0$ for $\ce{MgH2}$, which translates to a maximum $30\%$ and minimum $18\%$ ionic contribution. Maybe this is where the statement of the question originates from. Experimental findings rather support the more ionic nature of the compounds though, i.e. the found lattice energies were supported by calculations assuming a purely ionic structure.



The conclusion of this according to Holleman and Wiberg is that the elements are fused by ionic bonds with covalent contributions. The latter increases from $\ce{CsH}$ to $\ce{LiH}$ and from $\ce{BaH2}$ to $\ce{MgH2}$. The magnesium hydride is already borderline covalent.


The question about their reactivity towards water is mainly answered in the chapters for the elements itself. Magnesium reacts readily with water and releases hydrogen. Because of this it is sometimes used as a drying agent. $$\ce{MgH2 + 2H2O -> Mg(OH)2 + H2 ^ }$$ The other elements react similar. The reaction is highly exothermic, the reaction of calcium hydride releases $228~\mathrm{kJ/mol}$. It is often used as a drying agent for gasses because of this feature. Strontium and Barium also react exothermic, i.e. they release $177~\mathrm{kJ/mol}$ and $172~\mathrm{kJ/mol}$, respectively.


halacha theory - Are there Published Legal Defenses Resolving Objections Against Rabbinic Authority?


Are there Rabbinic "apologetic or polemic works" that focus only on the rational validity, and logical objections raised by other Jews1 -- against: (1.) the Rabbinate's authority in Judaism over other Jews; and (2.) The authority to supersede Written Law with Oral Law, (De-Rabbanan over De-'Oraita)?


These objections all assume the premises that: (1.) God Is; and (2.) A certainty that God revealed himself at Sinai, and through His Prophets.


I'm looking for Apologetic Works more-so than Polemic if possible; (Defensive rather than Combative).


For Example:



  1. Saadia Gaon: Published a series of works explicitly written to other Jews, and as I recall, exhibited well formed arguments; But I am not certain which. Perhaps Emunoth Ve-Deoth? Are there other works like this?


But Not:





  1. Not Ḥizzuq Emunah (חזוק אמונה): This is a Polemic Work which is widely published that attacks Christianity and other religions -- but does not resolve the internal conflict / rational objections against Rabbinicism -- by other Jews.




  2. Not Sefer Ha Kuzari: This is largely a Polemic work, whose defense is attacking the Karaites, Sadducees, Boethusians, and Christians -- rather than answering the objections raised. For example: "Thou shalt not add to, or diminish thereof." And in response, "This was only said to the masses, that they should not conjecture and theorise as the Karaites do", (Kuzari 3:41).




The Polemic works seem to insufficiently tackle the internal objections listed below; (Insufficient because they do not adhere to the Rabbinate's own Rules of Interpretation (the 4 & the 13 Principles), and/or the fundamentals Formal Logic).





1 Examples of types of objections to Rabbinic Judaism raised:




  1. Challenging the authority to supersede Written Law with Oral Law.




  2. Circular Fallacy, Begging the Question -- the source of rabbinic authority is rabbinic statements. (Also noted in this question.)




  3. Rabbinic arguments depend on (1) whether all traditions were actually gathered (Introduction to the Mishneh Torah 14); and (2) whether or not there was actually universal acceptance, (ibid. 29).





  4. Inconsistent interpretation or application of the law: Partiality in Cases where the same law might be applied more strictly or leniently depending on if the Rabbinate is involved, as opposed to anyone else, (regarding adding to or diminishing the law, the authority to issue death sentences without trial or witnesses, penalties for false prophecy and causing stumbling, etc, etc).






safrus - Criteria for special formats of some chapters in the Tanach Scrolls


Usually, when writing verses in Tanach Scrolls, words are written across the column from the right margin to the left (except, of course, for required Parsha spacing.)


I have seen two "special" formats:


The "brick" layout, which seems to be reserved for "songs". Examples:



  • Shirat Hayam (Song of the Sea) in Shemot

  • Devorah's song in Shoftim (Judges)

  • David's song in Shmuel II (Samuel II)



The 2 column straight layout. Examples:



  • Ha'azinu near the end of Sefer Devarim (Deut.)

  • Words beginning "To everything there is a time" in Kohelet (Ecclessiastes)

  • List of Haman's 10 sons in Esther

  • Tehillim, Mishlei, and most of Iyov


The 4 column straight layout. Example (the only one?):




  • The kings in Yehoshua


What common theme or criteria are used to decide which layout to use for which of these areas?


From what I can tell, the "brick" layout seems to reserved for "songs", though ha'azinu is called a "song" and it has the 2 column layout.


Why are these specific layouts appropriate for these areas? (I.e. - why choose one layout vs. the other?) Why does it get any layout at all? Why not leave the writing straight across as with everything else?




purim torah in jest - Is Cholent DeOraitha or DeRabbanan?



As definitively proven by an 'Am HaAretz Gamur MiDeOraitha (a title of high distinction if ever there was one), eating Cholent on Shabbath is required. Every week. Without exception.


But is this absolute requirement, with which no one dissents, based on a biblical commandment, or rabbinic enactment?







sources mekorot - Why allowed on Yom Tov?


According to the Torah, melacha isn't permitted on Yom Tov days except for what is needed for food. I read that certain laws, like carrying, don't apply on these days because they are loosened for food preparation... and if for food, then also for anything else that is needed for the holiday.


How is this leap derived, from 'food' to 'things needed for celebrating the day'?


What makes the question more interesting is that I think one couldn't take a different perspective of the halachic process for him or herself as an individual (and treat the day like Shabbos, except for preparing food) because it would interfere with lighting candles as the community is obliged to.




product recommendation - What is the ultimate portable Succah?


What is the best design for a do it yourself portable Succah?
(just focusing here on walls, Scach will be a mat)
I am thinking something I can take to the park, and set it up right over the existing picnic tables. Most are about 5.5 feet wide with the seats, so a 6' by 4' Succah with 3 walls can cover a good portion of one. I dont need to stand it it, but should be able to move around, so 5 ft tall should be enough.
Requirements would be:



  • Easy to assemble

  • Can fit in the back of a mininvan

  • Walls that will not sway in the wind (can use 'lavud' walls)

  • Extra points for light weight and for low cost.





audio - Detection of wobbling sound with rising notes


In an audio file I would like to find calls of a specific bird specie, one that makes wobbling sound with rising notes. Can you recommend what would be the best audio feature to calculate in time or frequency domain to capture its essence?


Among others I tried MFCC, but the results were not promising (or perhaps my implementation poor) .


[Edit]


In this post I explained briefly the problem and included exemplary audio file with spectrogram: Example.


Here is another example. All marked areas contain kiwi (famous flightless bird from New Zealand) calls I am trying to identify. Mark that the original audio is very noisy; presented spectrogram is a result of applying high-pass filter and spectral subtraction on areas identified as noise-only.


enter image description here




organic chemistry - Structure of Buckminsterfullerene


In several pictures that I have seen of buckminsterfullerene and graphite (such as below), each carbon is bonded to only 3 other carbons, so it only forms 3 covalent bonds. enter image description here enter image description here


I asked my teacher about this and he says that each carbon only make 3 bonds and has a lone pair. These lone pairs are de-localised hence, that is why buckminsterfullerene is able to conduct electricity.



However, I am doubtful about this as how can a lone pair on an atom be de-localised. Would the electrons be in their orbitals, and not be able to freely move around the compound. I try searching the internet for any information, but there is no mention on how many bonds each carbon atoms makes.


I am guessing that there is alternating double bonds between each carbon so that each carbon has 4 bonds. It is these pi bonds which along the compound that makes it a hyper-conjugated compound. This would explain why buckminsterfullerene and graphite are able to conduct electricity. Am I correct?



Answer



Have you ever seen a picture of graphite, to begin with? It shares the same feature, i.e., that each carbon is bonded to exactly 3 other carbons. You may call it "alternating double bonds", but this is not quite correct either, because in fact all bonds are equal. Think of it as a resonance structure, much like benzene. This is the reason for graphite conductivity, too.


The idea about that lone pair is plain wrong. Carbon has but 4 valence electrons; once 3 of them are spent for sigma bonds, how could it have a lone pair?


Pure buckminsterfullerene does not conduct electricity (strictly speaking, it is a semiconductor, not a conductor like any metal). Some of its derivatives do, but that's another story.


Thursday, February 23, 2017

halacha - Are you allowed to study (not Torah) on Tisha Bi'Av


For example if someone has a big math test on Yud Av, is he allowed to study math (my question was applied to math but goes to learning anything besides Torah) on Tisha Bi'Av?



Answer



As sam said in the comments


"If it takes away someone's mind from aveilus then it should not be done,just like working on Tisha bav even after chatzos see Shulchan Aruch 554:22 with the Mishna Brurah there"


So since it most probably would take your mind off aveilus the answer is you are not allowed to.


fir - Vector length output of discrete time convolution



Suppose that the impulse response of a discrete time filter is $h[i]$ where $i=0,1,2,...,N-1$ and the input sequence to the filter is $x[i]$ for $i=0,1,2,.., M-1,$ what would be the length of output vector length?


I have concluded it is $N$ because according to discrete time convolution


\begin{align} y[0] &= x[0]h[0]\\ y[1] &= x[0]h[1]+x[1]h[0]\\ y[2] &= x[0]h[2]+x[1]h[1]+x[2]h[0]\\ \vdots &=\vdots\\ y[N] &= x[1]h[N-1]+x[2]h[N-2]+...+x[N]h[0] \end{align}


Is this correct?




nomenclature - What is the convention of numbering carbon atoms in organic molecules?



I am in high school and haven't had a formal chemistry course, however I am fascinated with biology and picked up a biology book more advanced than the one the school is using to read on my own. The book is: Biology by Peter Raven (2007) ISBN: 0073227390


I am confused about something in the organic chemistry section.


I don't understand the convention that is used to number carbon atoms in for example, glucose.


In case you don't know what I'm talking about, here is an example: a structural diagram of an a-glucose molecule courtesy of Wikipedia.


enter image description here


The numbers next to the carbon atoms, I don't understand how they are ordered. Can someone please explain? I know this is an elementary question for most of you, but the help is appreciated.



Answer




Glucose occurs as the open chain form aldehyde that determines atom numbering, and as the epimeric cyclic hemiacetal(s) you provided,



Glucose open and cyclic


The "ether" is a hemiacetal. C-1's -OH can be up or down. Either way, it opens and reversibly dehydrates to the aldehyde R-C(=O)H. Number one atom in a chain is the end that bears the highest total mass. Double bonds count double their other end atom. The cyclic form's C=1 also has the largest summed mass attached, two oxygens plus a carbon and a hydrogen.


boiling point - Liquefying butane in a freezer


If place a can of pressurized liquid butane (such as a lighter refill canister) into a freezer to get it below its boiling point of $-1\ \mathrm{^\circ C}$, and then release it into a container kept at a freezing temperature, will it remain in the liquid state without boiling off (until it reaches its boiling point), or will it boil off immediately?


I had a cold metal container kept at a stable temperature of $-7\ \mathrm{^\circ C}$, but when I released room temperature butane into it, it boiled off instantly.


Why did that happen, and what will happen when it is released from the can at a temperature at or below $-1\ \mathrm{^\circ C}$?



Answer



Since the room temperature butane didn't instantly cool when it hit the container, it was still above the boiling point.


If you had a large freezer that was roughly at equilibrium at a temperature below $-1^\circ C$, and you put both the pressurized container and the empty container in there and let them reach equilibrium, then when you opened the pressurized container it would not boil and you could conceivably pour it into the other container.


However, butane has a large vapor pressure (the enthalpy of vaporization is relatively small). This means that even at low temperatures, it will evaporate very quickly. This is especially true because the atmosphere does not normally have any butane in it - so even a small partial pressure combined with convective transport in the air will cause it to evaporate even faster. If you imagine pouring some rubbing alcohol out on a table and then putting a fan next to it, it is the same idea. Butane molecules randomly have enough energy to escape the liquid, and air currents carry them away. Since there is no butane vapor nearby to establish an equilibrium with the liquid, more butane evaporates to take its place.


The net result of this is that even if you did the experiment in a freezer and made sure everything was below $-1^\circ C$ (which includes you wearing well-insulated gloves and not breathing on it), it might still evaporate so fast that it would look as if it were boiling.



From wikipedia, here is a plot of vapor pressure vs T for butane:


The boiling point is the point where the vapor pressure line exceeds atmospheric pressure. Atmospheric pressure is usually around 760 mmHg. This is a log plot for the P axis, which means one large grid step is ten times larger than the previous one. From this graph, you can see that at $-30^\circ C$, the vapor pressure is still ~200 mmHg. This means that roughly 26% of the air at equilibrium would be butane. Unless you have a very tiny freezer, that is a lot. This means that you might have to wear a gas mask and get a 55 gallon drum of butane before you could really do any "pouring" in the traditional sense.


At $-100^\circ C$ you are down to 1 mmHg vapor pressure. At this point I would say that even a small amount (like what is in a lighter) would stay liquid long enough that you could pour it.


Log plot of vapor pressure of butane vs temperature


halacha - Would the internet be considered muktzeh due to Nolad (a new thing)


There is a category of muktzeh on shabbat called Nolad. Nolad means literally, something that is born on shabbat. It is interpreted in the modern era, as meaning anything which you did not have access to before shabbat, you can not make use of on shabbat.


Mail for example (in countries that deliver on shabbat) is considered Nolad. An egg laid on shabbat is a classic example.


If we found a way to access the internet without breaking shabbat, (through some advancements in technology) would the content accessible through said technological advancement be considered nolad?


My rationale is as follows.




  1. Facebook is updated by the minute, so social networks have new content from people.. what you are reading was likely written within the past 12 -24 hours.





  2. Websites are generated dynamically. When you load a page, it instantly calculate which ads to show, which content to display etc. This layout and what things you see from second to second, as a single unit, I would argue is nolad.




  3. When you visit a website, it updates your cookies, or the page hit counter, which update and are displayed with that new information (tracking, or on the site itself)




Arguments against:




  1. The programs existed before shabat, as did most of the content, it is only being displayed differently.





  2. You don't physically touch the internet, so it can't really have a muktzeh status.





Answer



Nolad governs muktzeh, physical items you shouldn't move because they weren't acessible before shabbos started.


I can't see any way how that could possibly apply to information. If a non-Jew who had been halfway across the world on Friday night delivers a package to me on shabbos afternoon, it's muktza. If he tells me a joke (or the news, or acts out a play), we have no such rule governing it.


Further proof is a well-known incident whereby the Netziv was sent a telegram on yomtov; a non-Jew came and delivered it to him, and he read it: the entire yeshiva was celebrating Shavuos if I recall, and the telegram's news was that his sister had passed away. He continued with the festivities until the holiday ended, at which point he broke down on the floor sobbing.


I am bothered by the question "if somehow you could surf online on shabbos ..." and looking for some loophole requirement for/against what you're doing online at that point. We're all so wired, connected, have-to-have-the-latest 24-7 throughout the week, that it's really important that on Shabbos we just let it go and see how G-d's world still manages to function without my tweets (or anyone else's, for that matter).



So you could argue about the spirit of shabbos, as learned from things like nolad. But the actual prohibition of nolad per se, as you're proposing, is completely irrelevant here.


halacha - Can a Torah be laid on a bare table?


When people read or roll a Torah, I have always seen the table covered either with a cloth or a tallit. Is it necessary to cover the table? Why? If not, and this is a minhag, what is its source?



Could the reason be because of what is said in Talmud Bavli Megillah 32. ? -



"Rabbi Parnach Rabbi Yohanan said that one who handles a Torah bare (without a cloth) is buried bare ... Abaye explains this as meaning "bare" without this mitzvah."



This is referring to handling a bare Torah. Would that include laying it on a bare table?



Answer



While not strictly necessary, it is done in order to avoid making the table a tashmish kedusha. A tashmish kedusha may not be discarded and must be buried (genizah) (OC 154:3, YD 282:12). Placing a cloth over the table ensures that the table (even if the table was designated for this use, such as the bimah in shul), will only be a tashmish d'tashmish, and permitted to be discarded (Megillah 26b), while the cloth (if designated for this use) will become a tashmish kedusha (see Rashi Megillah 26b, Taz YD 282:9). However, if the cloth (or tallis) is only used temporarily, then the cloth was never designated to be a tashmish kedusha, and is therefore permitted to be discarded (See Beis Yosef YD 282).


number - 420 Noachide Commandments?


I know there are seven specific commandments to noachides but recently I was talking to a Rabbi who told me actually noachides have 420 commandments and the Jewish nation has 613. Can anyone point me to where I can find these 420 commandments he spoke of? Was he just making something up or is there somewhere I can read these? I am aware they are in the Torah but I would like to find them ordered if there is already a list someone is aware of.



Answer



I remember a PHD thesis (I think by Rabbi Lichtenstein, but I will have to find it) in which he stated that the 7 are actually categories, each of which consists of a number of different mitzvos (as far as making a link with the Torah goes). For example, there is the category of theft which can be broken down it individual mitzvos.


grammar - How can we determine the subject of 「彼{かれ}が来{こ}ないこと を知{し}りませんでした。」?


Consider the following sentence.



彼{かれ}が来{こ}ないことを知{し}りませんでした。



I really get confused in determining the subject. Which is the correct translation?




  1. I did not know that he will not come.





  2. He did not know about the absence.





Roughly speaking, most of the available answers said that the speaker is the person knows about that thing.


However, today I found almost the same sentence quoted from


A Handbook of Japanese Grammar Patterns for Teachers and Leaners on page 317-318,


as follows.



enter image description here


enter image description here


Its translation is apparently contrary to the analysis given in the existing answers. I am now in a critical position but committing suicide is not my option.



Answer



This sentence can technically mean both, but it usually (or almost always) means 1.


To mean 2., we normally say



来ないことを知りませんでした。 = He didn't know about the (someone else's) absense.



because 彼 is the topic of the whole sentence.



In other words, the use of が after 彼 more or less indicates that "彼がこない" is the relative clause which modifies こと.


Making a siyum on a mesechta


In order to make a siyum on a mesechta, does one have to leave over the last piece for the siyum, & if not, how soon after completing the masechta does one have to make the siyum?




matlab - Why Butterworth filter always starts my signal from from zero mark (amplitude)?


I am trying to filter my force signal using Butterworth low pass filter.enter image description here


so this is the signal, I have to filter (noise frequency is around 33 Hz). So when I use Butterworth filter with following command in MATLAB (with sixth order):


[B,A]=butter(6,5/100,'low');

forceS=filter(B,A,forceS);

the result I get is enter image description here


So the problem is the filtered signal start from zero mark instead of around 1.5. How can i start the filtered signal from the same value as unfiltered signal has?


Thanks



Answer



Filters do have a delay (a lag) since they do not act immediately on your signal. Also all samples before the time 0 are zeros, thus in general you will start from the "zero mark", as you said (just imagine your filter equation with all zeros).


There are ways to make a filter to have a zero lag. It is done by so called zero-phase filtering, also known as forward-backward filtering. The way you do it is by filtering your signal twice - in forward and in backward direction. Obviously this can work only for offline applications. In MATLAB you can do it very easily using the filtfilt function.


Please find below a code corresponding to your case.


fs = 100;

T = 2;
t = 0:1/fs:T;
f = 2;
s = 1.5*cos(2*pi*f*t) + 0.7*sin(2*pi*33*t);

[B,A]=butter(6, 5/fs,'low');
S=filter(B, A, s);
Sff=filtfilt(B, A, s);

plot(t, s)

hold on
plot(t, S)
plot(t, Sff)
grid on
legend({'Original signal', 'Signal filtered using filter', 'Signal filtered using filtfilt'})

That yields what I suspect you want:


enter image description here


Wednesday, February 22, 2017

halacha - Polyandry and Polygamy In Judaism


What is rule and constraint on polygamy and polyandry in Jewish law? Are they allowed or prohibited? In both cases--whether allowed or not--give me the sources.


I found one or two questions on polygamy, but no one discussed polyandry.



Answer




There are commonly two answers given as to why its ok for a man to marry multiple wives, but not ok for a women to marry multiple husbands.




  1. Since tribal affiliation is determined by the father, and eventually land distribution as well, it would create a conflict since you can never really be sure who the father is. However, you should seemingly always know who the mother is.




  2. There is a theory that the only reason why a man is allowed to marry two wives in the first place, is so that there is a method for society to take care of women, who otherwise would not be able to get work and be cared for. Since it is assumed that a man can get along as a single person just fine in society, there is no reason for a woman to marry an extra man. Except for orphans, or the extremely poor or sick, there is no special commandment to take care of the Widower. However, there is a commandment to take care of a widow.


    2a. (Kabbalah) By the nature of the way that humans pro-create, a Woman is designated as a "receiver" (egg) and a man is designated as a "giver" (sperm). In marriage, this is also true, and the man is obligated to give and take care of his wife, however a wife has no similar obligation to her husband. A woman having two husbands, would seem to be a situation where you have the "receiver" being in the dominant position of who can "give", and would thus be a distortion of roles, similar to the prohibition of a woman not being allowed to wear men's clothing and visa versa.





audio - Hilbert transform to compute signal envelope?


I've heard that the Hilbert transform can be used to calculate the envelope of a signal. How does this work? And how is this "Hilbert envelope" different from the envelope one gets by simply rectifying a signal?


I'm interested specifically in finding a way to calculate an envelope for use in dynamic range compression (i.e., "turning down the volume" of the loud parts of an audio signal automatically).



Answer



The Hilbert transform is used to calculate the "analytic" signal. See for example http://en.wikipedia.org/wiki/Analytic_signal. If your signal is a sine wave or an modulated sine wave, the magnitude of the analytic signal will indeed look like the envelope. However, the computation of the Hilbert transform is not trivial. Technically it requires a non-causal FIR filter of considerable length so it will require a fair amount of MIPS, memory and latency.


For a broad band signal, it really depends on how you define "envelope" for your specific application. For your application of dynamic range compression you want a metric that is well correlated with the the perception of loudness over time. The Hilbert Transform is not the right tool for that.


A better option would be to apply an A-weighted filter (http://en.wikipedia.org/wiki/A-weighting) and then do a lossy peak or lossy RMS detector. This will correlate fairly well with perceived loudness over time and is relatively cheap to do.


jewish books - How can private letters be published?



Rabbeinu Gershom issued a Cherem (ban) on unauthorized reading of private letters.



I would like to know how books which contain private correspondence or sh'elos us'shuvos between Rabbis and other people are published?




avodah zarah - What exactly do Noahides do?


There is a modern "Noahide" movement(I believe propagated by the Lubavitcher Rebbe), where people join together to be b'nei noah and not part of another religion. From some googling, I've seen that there are a fair amount of people on the web who identify religiously as Noahides. My question is, given that the 7 Noahide laws are relatively easy to follow (even if there are of course issues in Noahide halachah), what exactly do members of the modern Noahide movement do? For example, do they pray in an organized manner? If so, what forms do the prayers take? Do they study Torah? (Are they allowed to study Torah?) Or do they just follow the 7 rules? Is there any sort of organized religion for Noahides?




particles - Word choose between か and のか


I have a question about the following sentence:



お母さんが、八百屋で長いこと、何を買うか決まらず迷っています。



Is it possible to replace "か" with "のか" without misunderstanding in this sentence? Namely,




お母さんが、八百屋で長いこと、何を買うのか決まらず迷っています。





fft - Cross-correlation peak


How get cross-correlation peak and based on it calculate correlation score for similarity of two audio samples. SO far I've



  1. FFT two samples

  2. complex conjugate second

  3. multiply results

  4. IFFT

  5. cross-correlate with itself(autocorrelate)



Thanks for any advice



Answer



As Matt stated, you should use the correlation coefficient!.


Points 1 to 4 calculate the crosscorrelation. From that you have to find the highest peak (or lowest, if it has a higher absolute value). This value is the value of the nominator.


The denominator consists of the two autocorrelation values. Those are obtained by using the same algorithm where both signals are the equal. Here the peak should be in the middle (t=0) as already stated by welcomedungeon. Taking the square root of both autocorrelation values and multiplying them, gives the denominator.


Edit: Maybe this description is more clear:


$\frac{max(abs(ifft(fft(x_1)*fft(x_2)')))}{sqrt(max(abs(ifft(fft(x_1)*fft(x_1)'))))*sqrt(max(abs(ifft(fft(x_2)*fft(x_2)'))))}$


The apostroph means conjugate complex.


Edit: Two examples with Matlab code:



Using the same signal:


x = rand(1000,1)-0.5;
max(abs(ifft(fft(x).*fft(x)')))/(sqrt(max(abs(ifft(fft(x).*fft(x)')))).*sqrt(max(abs(ifft(fft(x).*fft(x)')))));

gives 1;


Using a sine and a cosine, should also give 1 because they are delayed versions of each other:


x = sin([0:pi/100:10*pi]);
y = cos([0:pi/100:10*pi]);
max(abs(ifft(fft(x).*fft(y)')))/(sqrt(max(abs(ifft(fft(x).*fft(x)')))).*sqrt(max(abs(ifft(fft(y).*fft(y)')))))


gives approximately 1


Using windowing before transformation to frequency domain should improve results.


polymers - Is there ANY chemical that can destroy PTFE, or Teflon?


Polytetrafluoroethylene was discovered by accident. It now is an important material in the industry mainly because of its extremely high bonding energy, which prevents corrosion, halts reaction, and reduces friction (yeah carbon-fluorine bonds!)


And people would have definitely put it to the test, making it contain some of the most vicious and chemically diabolical substances ever created. There is a whole HOST of items it can contain that some chemists have gone so far as to say they were 'evil':




  1. Dioxygen Difluoride
    Known as the gas of Lucifer, there is a whole list of people blown up and killed while just trying to work with one of its components, fluorine. It ignites stuff at temperatures that most of the stuff that we breathe in would be in liquid form. No one really knows about its atomic structure (obviously).





  2. Fluoroantimonic Acid
    With a staggering pH of -25, it chews through stuff you might not even believe could be corroded; like wax or glass. It can even strip hydrogen off of methane




...There are a lot of other chemical demons it can contain, but this is not the point. Let this suffice: Chemical Resistance Comparison (Spoiler: Fluorine is good at this corrosion thing.)


With this kind of hyper-resistance to about anything chemically destructive, is there anything that can destroy Teflon through only chemical means? A chemical that reacts exothermically to release heat, which melts the PTFE does not count. You get the drift.


Also, I am very curious as to whether there is anything more resilient than Teflon? Polytetrafluoroethylene is made of many carbon-fluorine bonds in series. However, carbon-fluorine is second only to the Si-F bond. Is there an "overclocked" Teflon made of silicon-fluorine bonds that is even stronger?


EDIT: Now I know that some, but very few, solvents can make a mark on Teflon; but my question has not been answered: Is there any more resistant substances?



(More Teflon bragging: Here. Take that aqua regia)



Answer



Just to add a bit to Ben's excellent answer...



  • A number of fluorinating agents also react with PTFE, $\ce{XeF2}$ and $\ce{CoF3}$ being examples

  • Ben mentioned the reaction of magnesium metal. Typically with metals, they must be in intimate contact with the PTFE surface, so molten metals or metals dissolved in anhydrous solvents will react.


The magnesium reaction is of special interest because it serves as the basis of the thermite flare. A pyrotechnic device commonly used in the countermeasures aircraft use to evade heat-seeking missiles. The reaction of metals with PTFE is given by the following equation (I think this is the general description for the reaction of metals with PTFE; I'm suspect of the reaction proposed by Ben involving the formation of poly-perfluoroacetylene).


$$\ce{2Mg + -(C2F4){-} → 2MgF2 + 2C}$$


The formation of $\ce{MgF2}$ is extremely exothermic. The heat given off along with the carbon soot provides a new, much hotter, target for the attacking missile to lock onto.



As to whether there is anything more resistant, I suspect that is unlikely. The $\ce{C-F}$ bond is shorter (135 pm) than the $\ce{Si-F}$ bond (160 pm) and therefore better serves to encase and protect the carbon backbone. While there are some other polymers that have better mechanical or thermal properties, I am not aware of any that have better chemical resistance. In Polymers for Electronic & Photonic Application from 2013, the author states, "PTFE is the most chemically resistant polymer known".


inorganic chemistry - Do all salts taste salty?


Recently, I am learning the production of soluble and insoluble salts. My friend and I have done this experiment at the school lab.


We wanted to taste them to see whether they are salty are not. The teacher luckily stopped us from doing that.



So without tasting them, I would really like to know whether all salts are salty.



Answer



No. There are sweet, bitter, and various other salts. (Likely, there are tasteless salts too). Pure salty taste is as far as I know exclusive for table salt, though I wouldn't bet on it.


Lead and Beryllium salts are said to be sweet, though toxic. Epsom salt, $\ce{MgSO4}$, is bitter. $\ce{CuSO4}$ has an incomprehensible, persistent metallic taste. (Based on personal experience. Copper salts are slightly toxic, but not extremely, so I survived with no consequences.)


Salts with hydrolysing cation (various alums) are acidic in addition to other notes.


Tuesday, February 21, 2017

Verifying Linear Time Invariance


I have a system of the form:


$$T(x(n))=x(n)+3x(n-2)-5x(n-3)x(2n)$$


I claim that


$$T(x(n-k))=x(n-k)+3x(n-k-2)-5x(n-k-3)x(2n-2k),$$ $$y(x(n-k)= x(n-k)+3x(n-k-2)-5x(n-k-3)x(2n-2k)$$



and


$$T(ax_1(n)+bx_2(n))=ax_1(n)+bx_2(n)+3\left( ax_1(n-2)+bx_2(n-2)\right) - 5 \left(ax_1(n-3)+bx_2(n-3) \right)\left( ax_1(2n)+bx_2(2n)\right),$$ $$aT(x_1(n))+bT(x_2(n))) = ax_1(n)+3x_1(n-2)-5x_1(n-3)x_1(2n) + ax_2(n)+3x_2(n-2)-5x_2(n-3)x_2(2n)$$


Hence, the system is not linear, but is time-invariant. I'm I applying the formulas correctly?



Answer



The term $x(2n)$ is not time invariant: it gives the even samples of $x$. Shift the input by 1 sample and you'll get the odd terms, which are different from the even terms shifted 1 place.


Your reasoning above is not correct. You should compare $T(x(n-k))$ to $T(x(n))|_{n-k}$ (that is, the original output, shifted by $k$ samples).


Edit: These type of exercises are a common source of confusion because of the following abuse of notation: $x(n)$ is not a signal, but the nth sample of the signal, and having $n$ inside of the expressions is formally wrong. Even Oppenheim's book makes this mistake when working with LTI systems and impulse response.


The correct way for expressing transforms between signals is as follows:


Let $x$ and $y$ be signals; $T\{\cdot\}$ be the transformation (system) under scrutiny; $R_k\{\cdot\}$ be a delay of $k$ samples.


So, in general you would write the relation between input and output signals as $y = T\{ x \}$, where the whole signals are involved. Using $n$ inside these expressions collapses the signal to a single sample and this is wrong. And having the same variable $n$ on both sides of the equation only leads to confusion.



Then, a system is time-invariant if $R_k\{T\{ \cdot \}\} = T\{ R_k\{ \cdot \}\}$ for all integer $k$.


This is why I gave the example above with even-odd samples, in order to avoid the usual confusion with $n$ inside the expressions.


Now, going back to the system $T$ that evaluates to $y[n] = x[2n]$ for each sample $n$:


Let $x_k = R_k\{x\}$ and $y_k = R_k\{y\} = R_k\{T\{x\}\}$.


Evaluating all these signals at sample $n$: $x_k[n] = x[n-k]$; $y_k[n] = x[2n - 2k]$.


Now, $T\{x_k\}$ at sample $n$ is $x_k[2n] = x[2n - k]$ which is different from $y_k$.


particles - ~にしては vs. ~としては


I know one implies the thing I'm comparing actually is the thing I'm comparing it to, and the other doesn't.


Can someone suggest an easy example or trick for remembering which is which?




combustion - What is the oxidation mechanism of gunpowder?


I've been recently looking into fireworks and the chemistry of explosives, and I found out that, amongst others, one of the most important reactions in gunpowder ignition is the oxidation of charcoal and sulfur by $\mathrm{KNO_3(s)}$. I am curious as to whether it is known if this reaction occurs between charcoal/sulfur and solid state potassium nitrate or if the potassium nitrate decomposes first and the reaction occurs via gaseous oxygen as an intermediate.


Is there a general mechanism of oxidation between solid oxidizing salts and organic matter/sulfur? Does the same thing happen with $\mathrm{KClO_3(s)}$ or $\mathrm{KMnO_4(s)}$ for example?




inorganic chemistry - What is formed when you leave iron(II) sulfate in plain air?


What is formed when you leave iron(II) sulfate in plain air?


Knowing that iron(II) is easily oxidised to iron(III), and assuming that the reactive component of air is oxygen, I solved it this way:



$$\ce{FeSO4 + O2 -> Fe2O3 + SO2}$$


But in my textbook it's given that iron(III) sulfate, $\ce{Fe2(SO4)3}$, is formed. Is this because $\ce{Fe2O3 + SO2}$ react to form $\ce{Fe2(SO4)3}$?



Answer



Usually, the original iron(II) sulfate is present as green $\ce{FeSO4.7H2O}$.


Oxygen can oxidize $\ce{Fe(II)}$ salts to $\ce{Fe(III)}$ salts; for example, at $\mathrm{pH}=0$:


$$\begin{alignat}{2} \ce{[Fe(H2O)6]^3+ + e- \;&<=> [Fe(H2O)6]^2+}\quad &&E^\circ = +0.771\ \mathrm{V}\\ \ce{O2 + 4H+ + 4e- \;&<=> 2H2O}\quad &&E^\circ = +1.229\ \mathrm{V} \end{alignat}$$


$\ce{Fe(II)}$ is even easier oxidized under alkaline conditions; for example, at $\mathrm{pH}=14$:


$$\begin{alignat}{2} \ce{FeO(OH) + H2O + e- \;&<=> Fe(OH)2 + OH-}\quad &&E^\circ = -0.69\ \mathrm{V}\\ \ce{O2 + 2H2O + 4e- \;&<=> 4OH-}\quad &&E^\circ = +0.401\ \mathrm{V} \end{alignat}$$


However, you cannot simply oxidize iron(II) sulfate $\left(\ce{FeSO4}\right)$ to iron(III) sulfate $\left(\ce{Fe2(SO4)3}\right)$ in dry air since you would need additional sulfate to balance the equation:


$$\ce{2FeSO4 + SO4^2- -> Fe2(SO4)3 + 2e-}$$



Nevertheless, $\ce{Fe(II)}$ can be oxidized to $\ce{Fe(III)}$.


The resulting $\ce{Fe(III)}$ is subject to hydrolysis. By way of comparison, the ion $\ce{[Fe(H2O)6]^3+}$ is only stable under strong acidic conditions. Already at $\mathrm{pH}=0{-}2$, it turns into yellow $\ce{[Fe(OH)(H2O)5]^2+}$ and begins to form $\ce{[Fe(OH)2(H2O)4]+}$:


$$\begin{align} \ce{[Fe(H2O)6]^3+ \;&<=> [Fe(OH)(H2O)5]^2+ + H+}\\ \ce{[Fe(OH)(H2O)5]^2+ \;&<=> [Fe(OH)2(H2O)5]+ + H+}\\ \end{align}$$


Further addition of base causes precipitation of amorphous iron(III) hydroxide.


Accordingly, the likely product when iron(II) sulfate is oxidized is basic iron(III) sulfate, i.e. approximately:


$$\ce{4FeSO4 + O2 + 2H2O -> 4Fe(OH)SO4}$$


However, the real weathering and aging of iron(II) sulfate in dry air actually yields a mixture of various compounds, including iron(III) sulfate and iron(III) oxide-hydroxide.


You may observe this reaction in some iron fertilizers for lawns. The fresh product typically contains green iron(II) sulfate, which gradually becomes yellow.


physical chemistry - How does the inverted Marcus region explain chemiluminescence?


The invert Marcus region offers one explanation of chemiluminescence, the process by which light is one of the products of a chemical reaction.


I tried reading one of Marcus's original papers on the subject [1], but I don't really get his argument. I get confused about which of the potential energy surfaces in his Figure (copied here, hopefully that's okay) that refer to the ground state reactant, ground state product, excited reactant, and excited product.


enter image description here


[1] R.J. Marcus (1965), "On the Theory of Chemiluminescent Electron-Transfer Reactions", The Journal of Chemical Physics 43(8):2654-2657




tisha bav - Why not recite Havdalah without wine on Saturday Night Tishah BeAv?


When Tishah BeAv falls on Shabbat and the fast is postponed to the next day, or when Tishah BeAv falls on Sunday, the problem arises how to deal with the requirement of making havdalah over a cup of wine (or another drink). The positions generally discussed are: (1) to perform havdalah immediately after Shabbat but to give the wine to a minor; (2) to omit havdalah; (3) to perform havdalah the following night. The actual halachah has been determined by the Sages according to opinion (3).


I expected a fourth opinion to be part of this discussion, which is reciting the havdalah formula immediately after Shabbat but without a cup of wine (or another drink). According to this option only the blessing over the flame would be recited, followed by the havdalah formula (the blessings over wine and flagrances being omitted). In my opinion the reason for this fourth possibility lies in the fact that the havdalah formula doesn’t itself mention a cup of wine or in any way refer to it. Thus there seems to be no inherent necessity to recite this formula exclusively over a filled cup. So why can it not be recited “dry”?




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