Wednesday, February 28, 2018

inorganic chemistry - What is the reaction between oxalic acid and potassium permanganate?


I've already searched online some information about this equation, but everywhere I read, there's also sulfuric acid, which we did not use in the laboratory. We only used potassium permanganate and oxalic acid and water, there was no sulfuric acid. The purpose of the laboratory was to calculate experimentally the rate of the reaction at different concentrations, but in order to do so, I need the balanced equation. Can anyone help me out?


By the way, the oxalic acid was dihydrate.


If anyone is wondering, one of the experiments was as follows:


First we took $1.5~\pu{mL}$ of $\ce{H2C2O4}$ and added $1.5~\pu{mL}$ of $\ce{H2O}$, and finally, we added $1~\pu{mL}$ of $\ce{KMnO4}$ and then we shook the test tube until the colour changed from purple to ochre. Because from what I read, they said the $\ce{H2SO4}$ was necessary so the reaction takes place, but in the experiment, the reaction did occur and we didn't use it.



Answer



We had a titration of oxalic acid vs. potassium permanganate for an experiment in which we used concentrated $\ce{H2SO4}$.



Actually, the reaction requires an acidic medium i.e. $\ce{H+}$ is involved as a reactant... I suppose the $\ce{H+}$ released by the oxalic acid would be enough since you are studying the rate of the reaction though I am not sure.


The balanced ionic equation is: $\ce{2MnO4- + 5H2C2O4 + 6H+ -> 2 Mn^2+ + 10CO2 + 8H2O}$


As you can see, $\ce{H+}$ is involved as a reactant and that is why you might have read that conc.$\ce{H2SO4}$ is necessary.


birchas kohanim - Priestly blessing grammar - וישם


In the Priestly blessing (במדבר ו:כד-כה), for the word וישם, is the the root שים or is the root ישם?


ישם -'Implement', https://pealim.com/dict/864-leyasem
שים - 'Put', https://www.pealim.com/dict/45-lasim/




halacha - Am I allowed to fly from Australia on Motzei Shabbos?


If I take off from Melbourne on Motzei Shabbos, I will hit the Date-Line, loose a day, and end up flying on Shabbos for a short period of time until the sun catches up again. Am I allowed to do this?



  1. Do I have to keep Shabbos for that time?

  2. Is this forbidden the same way embarking on a ship less than 3 days before Shabbos is forbidden?

  3. If I daven, do I have to Daven Shabbos davening or Weekday?


  4. Do I have to do Havdala after that small period of "Shabbos"?



Answer



Flying on a plane before shabbos is not like embarking on a boat regardless of the reasoning (I remember 4 offhand):



  1. The sea-sickness will breach your kavod shabbos: Anyone who has been on a medium size boat in the ocean without dramamine knows that this is no comparison to flying on a plane which is pretty smooth.

  2. The crew is doing melacha for you: Does not apply if most of the passengers are not Jewish.

  3. You will be forced to do melacha in a dangerous situation: No weather satellites back then, so it was common to run into a storm and have to violate shabbos. Not true with a plane ride. Besides, what are you going to do?

  4. You may not travel beyond the techum on shabbos: If you are above 10 tefachim before shabbos, you are not subject to techum.



(At some point I'll bring sources and other possible issues that don't apply.)


I asked my Rav regarding my neighbor who travels to Asia and Australia. He said that although the Chazon Ish could do it, we would have a problem. The Chazon Ish would keep Friday and Friday night until he got to the Asian coast, then it would be Saturday night. But since there was never a clear ruling on the dateline, once we cross the international dateline (but before the Chazon Ish's dateline) we would be in doubt about our obligations. That night, are we obligated in kiddush or havdala? It might be possible to work it out a situation where there are no doubts, but I haven't tried.


I hope it is clear that you must keep the "little" shabbos and make havdala. Of course you'll have to ask someone to stand in front of the lavatory for you since the light will go on if you slide the lock!


Verb classification of honorific/humble verbs


These verbs:



Are all listed as 五段 verbs, but they don't follow the usual conjugation rules for them.
For example:



  • 命令形: いらっしゃる -> いらっしゃい, not いらっしゃれ

  • 連用形: Same as above, not いらっしゃり


Is there a separate name/classification for these types of verbs? Such as カ変 for 来る and サ変 for する.





particle と - usage of と in this sentence



戻ってくると、千波が我先に駆け寄った。




once we came back, chinami was the first to run up to (us).


how does this sentence change without the と after 我先に? Doesn't seem to quotatitive or conditional.


thank you



Answer



This と is "the optional と" that attaches certain adverbs. In your case, dropping と does not change the meaning of the sentence.


See:



我先に【われさきに】 is a set phrase meaning "striving to be the first". It does not necessarily mean Chinami was actually the first one.


signal analysis - Element-wise powering vs. discrete version of binomial theorem on a sum of Gaussians


I had recently posted a question on applying powers on a sum of Gaussians (here) to enhance signal resolution artificially. The discussion has given rise to another query. Consider this problem. We have two Gaussian time functions $G_1$ and $G_2$. Suppose we wish sum these Gaussians and raise it to a power of 2.


Situation no. 1: $(G_1+G_2)^2$, we should get another function $G$= $G_1^2$ + $2G_1G_2$ + $G_2^2$. The product of two $G_1G_2$ is another Gaussian. We should see three peaks in this case.


Situation no. 2: We sum the two Gaussians element wise i.e., $S_i$ = $g(t)_{1i}$ + $g(t)_{2i}$ where $g(t)_i$ 's are the corresponding elements of $G_1$ + $G_2$. Now each summed element $S_i$ is raised to power 2. We get only two peaks as a result.



I discussed this issue with some of my colleagues including the person who had proposed this method; they seek agree that both operations are equivalent. It seems they are not, because in situation 2, we will never see $G_1G_2$. What would the discrete version of situation 1?


I feel there is some fallacy here and some mathematical insight should be able to settle this problem.


Thanks.


For Situation no. 2: Here is the MATLAB code.


t=[0:1/200:60]';

u1= 19; % mu the mean time peak i

u2= 22; % mu the mean time peak j


A= 250; %Area

s_ij=[0.84 0.87];; %s_ij represent the sigma of i,j pair; Choose elements by indexing

G_ij=A*normpdf(t, u1, s_ij(1,1))+ A*normpdf(t, u2, s_ij(1,2)); %Sum normpdf is a built in function for a unit area Gaussian from statistical package.

Power= (G_ij).^2;

subplot(2,1,1); plot(t,G_ij);title('Unresolved Gaussians');


subplot(2,1,2); plot (t, Power);title ('Gaussian Sum Raised to Power 2');

Answer



([a b c] .+ [d e f]).^2 = [a+d b+e c+f].^2
= [(a+d)^2 (b+e)^2 (c+f)^2]
= [a^2+2ad+d^2 b^2+2be+e^2 c^2+2cf+f^2]

I suspect that:



  • The problem may be in your assumptions: "We should see three peaks in this case" sounds like a hypothesis that may be false.

  • You may have a bug in your code, which might be why "We get only two peaks as a result".



Here is some code to illustrate that (A.+B).^2 = A.^2 .+ 2A.*B .+ B.^2:


t=0:1/200:60;
gauss1 = 250*normpdf(t,19,0.84);
gauss2 = 250*normpdf(t,22,0.87);
m1 = gauss1.^2+2*gauss1.*gauss2+gauss2.^2;
m2 = (gauss1+gauss2).^2;
fprintf('Difference: %1.2f\n', sum(abs(m1-m2)));
subplot(2,1,1);plot(m1);title('Method 1');
subplot(2,1,2);plot(m2);title('Method 2');


I get:


Difference: 0.00

and


enter image description here


So, the math is correct. You may still be wondering, how come the third Gaussian $G_1G_2$ is not apparent in the plot? This is the point where it's useful to challenge your assumption that the third Gaussian should be visible. If we plot $G_1G_2$ by itself we obtain:


plot(2*gauss1.*gauss2);

enter image description here



Look at the amplitude and the position in the x-axis: this third Gaussian is not apparent in the plot because it is completely swamped by the other two, much larger, surrounding peaks.


grammar - Usage of ~じゃん (~じゃない)


I'd like to know if I can put ~じゃん at the end of every adjective, if there are any exceptions to that usage, and if it's different from ~じゃない.


Adj (na) + じゃん



便利じゃん



便利だったじゃん


便利じゃないじゃん


便利じゃなかったじゃん



Adj (i) + じゃん



楽しいじゃん


楽しかったじゃん


楽しくないじゃん


楽しくなかったじゃん




Is this possible? Wouldn't the correct way would be 楽しくない instead of 楽しいじゃん?


Verb + じゃん



あるじゃん


やるじゃん


いるじゃん


くるじゃん


...





Answer



The first thing to understand here is that じゃん forms a tag question, so it's entirely different than the negative form:



このゲームは楽しい。 This game is fun.


このゲームは楽しいじゃん。 This game is fun, isn't it?


このゲームは楽しくない。 This game isn't fun.


このゲームは楽しくないじゃん。 This game isn't fun, is it?



じゃん is an informal version of じゃない; this use of じゃない as a tag question was covered by Tsuyoshi Ito previously.


Since 形容詞 (けいようし; "い-adjectives") have different conjugation patterns than 形容動詞 (けいようどうし; "な-adjectives"), you can easily tell when a tag question is being used. But you know that with 形容動詞, じゃない may be present in the negative form. Without additional context, the following could be ambiguous:




便利じゃない。 It's not convenient. Or, It's convenient, isn't it?



In this example, intonation distinguishes tag questions from negatives: a tag question will put a rising intonation on じゃない, while a negative will put a falling intonation on じゃない. (じゃん, however, is always a tag question and never forms a negative.)


In writing, this ambiguity can be cleared up by using a question mark or the question particle か:



便利じゃない? It's convenient, isn't it?


便利じゃないか。 It's convenient, isn't it?



Additionally, it's worthwhile to discuss here the difference between じゃない (じゃん) as a tag question and the sentence-ending particle ね:




あの映画、けっこうおもしろかったね。 That movie was pretty good, wasn't it?


あの映画、けっこうおもしろかったじゃん。 That movie was pretty good, wasn't it?



With ね, the speaker is merely making a statement and anticipating the listener will agree, but じゃん can often imply that the speaker wants to convince the listener to agree. In the above example, you would use the first sentence after seeing a movie with a friend without any prior expectation of how good the movie would be. But the second is more appropriate if, for example, your friend went into the movie thinking it would be bad, and after seeing it, you wanted to get him to agree with you that it was in fact a good movie.


hashkafah philosophy - How can the Rambam's Eighth Principle of Jewish Faith be believed in light of Hazal?


The Rambam's eighth Principle of Jewish Faith states that the entire Torah in our possession - every verse - was dictated to Mosheh Rabbenu and that it has not changed.


However, we have explicit passages in Hazal that tell us that the Torah had to be critically reconstructed from a multiplicity of scrolls, each with slightly different wording in certain passages (cf. y.Ta`anith 4:2) and that these were apparently used by Ezra HaSofer in his reconstruction (cf. Avoth De-Rabi Nathan 30b).


Additionally, we have an explicit text in the Gemara that says that the Amoraim were not experts in defective and plenary spellings in the words of the Torah (cf. b.Qidhushin 30a).


And in the Rambam's own day there were multiple versions of the Torah (differing only in a very few, slight ways), including the mesorah of Yemen which differs from Ashkenazi and Sefaradi mesorah in five places!


Not to mention the accurate placement of petuhoth and setumoth, which has enough halakhic weight to pasul a sefer Torah if made incorrectly.


My question is:



Surely the Rambam knew these passages from Hazal and the facts on the ground, so how could he write such a seemingly dogmatic statement regarding the Torah "in our possession"? Are we missing something? Was he?


NOTE: I am aware of the simplistic and non-Maimonidean wording of the popular "Ani Ma'amin" on this principle of faith and I reject it as not accurately representing the intent of the Rambam in his fuller, more original wording of the eighth principle.




Tuesday, February 27, 2018

etymology - Similar 音・訓読み: Coincidence, or something more?


Occasionally, some 漢字 will have quite similar 音読み and 訓読み; such as, for instance 困; with 困{コン} and 困{こま}る; or 灰 with 灰{はい} and 灰{カイ}.


Are these cases exclusively coincidence, or are there situations in which Chinese words have been fully internalised as Japanese words rather than Sino-Japanese loanwords? (Or even; Japanese words exported to Chinese as fully internalised loanwords?)



Edit:


Thanks to naruto's comment; I remembered the one I really wanted to ask about (it was nagging at me as I wrote the question): 死, with 死{し}ぬ and 死{シ}.



Answer



Looking at the etymologies independently:



This term appears in the Man'yōshū poetry compilation completed circa 759, so this is an older word. The older kana spelling of this was はひ, indicating an Old Japanese reading of /papi/.


Meanwhile, the on'yomi has an older kana spelling of くわい (probably realized as /kwai/), closer to the Middle Chinese it came from, which has a reconstructed reading of /xwoj/ -- think of the /x/ as a hard H like in Scottish loch, and think of the /j/ on the end like a Y.


The older kun'yomi of /papi/ doesn't overlap with the older on'yomi of /kwai/ in any way that I can find, so I think the similarity between modern on'yomi kai and kun'yomi hai is purely a coincidence of historical phonetic development.



The komaru reading with a sense of "stuck, troubled" only seems to appear from the early Edo period, from what I can find. I suspect this is an extension from / alteration of ancient root verb 込{こ}む "to go into something; to put something into something else", much like the English "stuck" can be interpreted as the passive participle form of root verb "stick" (as in, "to be stuck [into a bad situation]").



The older root's sense of "into" doesn't overlap much with the 困 kanji's meaning of "besieged, troubled", so I suspect this similarity is another coincidence of historical semantic development.


Other cases


Although the above two are coincidental, there are cases where the kun'yomi developed from the on'yomi. One example is 文{ふみ}, where the kun'yomi of fumi apparently came from an older on'yomi of pun. More at the Wiktionary entry.


In general, sound similarities are probably accidental. To find out for sure, you have to dig into the historical development of each term.


organic chemistry - Reaction of ethylene glycol with PI₃ (P + I₂)


We know that $\ce{2P + 3I2 -> 2PI3}$


Ethylene glycol reacts with $\ce{PCl3}$ to give ethylene dichloride, but why does it gives ethylene when it reacts with $\ce{P + I2}$?


I don't really know why it happens so as it is quite contradictory because in case of primary alcohols, corresponding iodoalkane is formed.




meaning - What's the difference between 程 and 程度?


What the difference between 程 and 程度?


I haven't been able to find any using my dictionary.



Answer



ほど is usually used as particle, whereas 程度 is a noun, e.g.




BほどAの程度は大きくない。
A's degree is not as high as B's.



ほど can be used as noun, but I would say 程度 is more common. The dictionary definitions show that the meaning is not that different (e.g. 大辞泉 has 許容される限度。 for 程度; 大辞林 has 許される程度。限度。 for ほど).


statistics - How many Parshios are in each Sefer of Tanach?


How many words are there in Tanach? already asks about several statistics about Sifrei Tanach, but there's one that was left out:


How many Parshios are in each Sefer of Tanach?


A Parsha is defined as all the text between one gap in a Sefer Torah and the next, whether that gap is a 9-letter space ("setumah"), continues until the end of the line ("pesuchah"), or is the end of the Sefer.


I'm aware that there are different Minhagim on the matter; I'd be curious to see all of the major ones.



Answer



According to the Aleppo Codex the number of breaks are:




  • Genesis - 92

  • Exodus - 165

  • Leviticus - 99

  • Numbers - 159

  • Deuteronomy - 159


(based on Rambam's testimony in Hilkhot Sefer Torah chapter 8)



  • Joshua - 106


  • Judges - 88

  • Samuel - 369

  • Kings - 205

  • Isaiah - 242

  • Jeremiah - 281

  • Ezekiel - 185

  • Hosea - 18

  • Joel - 7

  • Amos - 28

  • Obadiah - 1


  • Jonah - 4

  • Micah - 17

  • Nahum - 4

  • Habakkuk - 9

  • Zephania - 7

  • Haggai - 8

  • Zachariah - 36

  • Malakhi - 8

  • Chronicles - 519

  • Ruth - 2


  • Canticles - 20

  • Ecclesiastes - 2

  • Lamentations - 134

  • Esther - 23

  • Daniel - 28

  • Ezra - 319


(based on Mechon Mamre's text with variations, based on testimony of the Codex's contents, in places where the Codex is currently missing and MM used another source)


Gzeira Shava By Purim



We know that the Gemara darshens the laws of Purim from Yom Kippur. If so why are we not obligated to fast on Purim?




יליף פורים פורים מיום הכפורים








pronunciation - IPA for ふーん/んふふ pronounced with your mouth closed


I know that ふ is normally pronounced as [ɸɯ]. But ふ is sometimes used to represent a clearly different sound that occasionally appears in spoken Japanese, and I'm having trouble identifying its IPA representation.


The following is what I know about this sound:



  • It does sound like the h consonant to me, but it can be produced with your mouth completely closed.


  • No normal Japanese word contains this sound, but a few interjections and onomatopoeias like ふーん, ふふんっ, んふふ, ふっふっふ, ふがふが are often pronounced with this "sound".

  • It's the very first sound in this video. It's written as ーん but it's obviously not [ɸɯ].


  • Japanese Wikipedia suggests this sound is 無声鼻腔摩擦音 ("voiceless nasal fricative"?).



    無声鼻腔摩擦音を「ふ」で表すことがある(例:「ふん」と鼻で笑う)。



    But the article gives no IPA representation, and this term appears nowhere else in Wikipedia.



  • I think English "hmm" and "humph" have a similar sound, and some sources including this suggest this sound is [m̥] (the voiceless version of [m]). But other sources including this and this seem to suggest [m̥] is a rare consonant.



So what is this sound in IPA? How do you transcribe ふーん and んふふ said with your mouth closed?



Answer



When we say //ha// or //ho//, the actual phonetic realization of the //h// sound is the same as the following vowel, but voiceless. In other words, we could potentially choose to transcribe [[hɑ]] as [[ɑ̥ɑ]], with a ring diacritic under the first vowel to show that it's been devoiced.


Likewise, English hmm //hm// can be transcribed phonetically as [[m̥m̩]]. The English interjection uh-huh //mhm// is typically pronounced [[ʔm̩m̥m̩]] when your mouth is closed, with a short voiceless period separating the two syllabic nasals. If you pronounce this word slowly, you'll notice that you're making the same sound, just stopping and starting the vibration of your vocal folds partway through. Aside from the opening and closing of the vocal folds, nothing else is changing, so it's hard to say that [[m̥]] is an incorrect transcription.


As long as we're talking specifically about interjections, [[m̥]] is not really such a rare sound, but then, interjections are special in many ways. In Japanese, the interjection うん //ɴ// is typically pronounced [[ʔɴ̩ː]] or [[ʔm̩ː]], but outside of interjections Japanese words are usually considered not to begin with //ɴ// due to phonotactic constraints. This is another way that interjections are special.


I see no reason not to transcribe the sound in question as [[m̥]] if your lips are closed, as in ふーん [[m̥m̩ːː]] and んふふ [[ʔm̩ːm̥m̩m̥m̩]].


agriculture - How to grow your own aravos


On Sukkos, Jews are commanded to take the four species, among them the "ערבי נחל" or "willow branches," commonly referred to as ערבות aravos.


How might one go about growing them himself, at home?


(I don't ask about the other three, because אתרוג and לולב, AFAIK, can not be grown out of tropical environments without a lot of special equipment, and הדסים are difficult to care for. If you would like to see these discussed you can always ask.)



Answer




  1. After Sukkos is over (and you don't need them for mitzvah purposes anymore), collect your leftover aravah branches that you used for ד' מינים and הושענות. (You may also want to collect other's branches, because many people just leave their הושענות in shul when they're done with them -- that's another 5 branches per bundle!)

  2. Place the branches in water, with the cut side in the water.

  3. Leave them this way over the winter, changing the water occasionally (honestly, it doesn't have to be all that often, but you should probably do it whenever the water starts to look dark and murky). [this is because new bushes aren't strong enough to last through the winter where I live, and need to form roots....they may fare better in warmer climates, but I don't have any experience with that.]


  4. When Spring comes, place the plants in the ground, cut side in the ground.


Now you have your own aravos bush! You may want to dump some water on it whenever you start feeling guilty about leaving this plant outside, but it doesn't really need all that much extra water. Enjoy your cheap aravos for many years to come!


I have done this myself and it works. The plan is my father's, whose bushes still provide many great aravos every year.


Also they should be trimmed twice a year. Every time they are trimmed they grow out. They should be trimmed at the end of July and after Sukkot.


minhag - Why doesn't Chabad read Ruth on Shavuot?


I was at Chabad this Shavuot and they did not read Ruth. Everywhere else I've been (all Nusach Ashkenaz) has read it claiming that it's appropriate since this is the time of the wheat harvest.



Are there other groups who do not read Ruth on Shavuot? Are Ashkenazim the only ones who do? Where did the custom originate?


Also (and maybe this should be a separate question), does Chabad (and other groups who omit Ruth) read Kohelet on Sukkot?



Answer



Only Ashkenazic communities read all five megillos in a public setting over the course of the year. Sefardic and Chassidic communities generally will only read Eicha on Tisha B'av and (of course) Esther on Purim, but not the other three on the shalosh regalim.


The custom to read Ruth on Shavuos (as well as Shir Hashirim on Pesach, I think) is mentioned earliest in Maseches Sofrim (14:18) (although the custom of exactly when during the holiday to say it is not the same). Many reasons are given for each megilla for why it is read on its corresponding holiday, but as far as I know, those are found in more recent works.


inorganic chemistry - Does water have a chemical name?


The title sums up the question:



Does water have a chemical name?



If so, what is it?



P.S. I checked up the web and got all sorts of crazy answers like dihydrogenmonoxide, oxidane, hydrogendihydride etc. Please validate.



Answer



TL;DR IUPAC hasn’t made up their mind, but plain old water appears to be an appropriate name. However, chemical derivatives of water may not be named using water.




In Nomenclature of Organic Chemistry: IUPAC Recommendations and Preferred Names 2013 it is stated (P-21.1.1.2) that



The common names water, ammonia, [...] are used in these recommendations but their use as preferred IUPAC names is deferred pending publication of recommendations for the selection of preferred inorganic names; thus, no PIN label will be assigned in names including them.



I’m not sure when the next edition of the Red Book (i.e. inorganic chemistry nomenclature recommendations) is coming out, but I can quote the relevant section from the most recent version.


Table IR-6.1 of Nomenclature of Inorganic Chemistry: IUPAC Recommendations 2005 lists "oxidane" as the parent hydride name for $\ce{H2O}$. However, it also adds the caveat that




The names ‘azane’ and ‘oxidane’ are only intended for use in naming derivatives of ammonia and water, respectively, by substitutive nomenclature, and they form the basis for naming polynuclear entities (e.g. triazane, dioxidane). Examples of such use may be found in Section IR-6.4 and Table IX.



Therefore the compound $\ce{ONONO} = \ce{(ON)2O}$, a nitrosylated derivative of water, is named "dinitrosooxidane" and not "dinitrosowater". More examples may be found in Table IX of the same publication.


Water itself is still called water. For example, tritiated water $\ce{H^3HO}$ is named (3H1)water (Section IR-2.2.3.2).


algorithms - Detecting a fixed template image out of a semi-constant frame of video


There are a number of videos that I'm looking to process of different video games to detect various "states" in them.


The first game that I am tackling is any edition of Super Street Fighter 4.


In it, I'd like to detect when the "vs" character screen comes up. Here's an example of one frame of the video:


Akuma vs. Ryu - SSF4
(taken from ~10s mark of this video)


If I could detect the "vs", then I'd be able to detect that frame of video is indeed the "vs" screen, which would allow me to look for other information (for now, let's say I'll use it to detect the timestamp in the video where the match is about to start).


That said, here is what can be assumed about the frames from the videos that I will be processing (this is not the only video, there are thousands, if not tens or hundreds of thousands of videos, but the issue of scale in processing that many videos is a completely different domain):




  • I'd prefer (but it's not necessary) to process the lowest resolution image possible with reliable results (lower resolutions = faster processing time). The image above is 480 x 270 pixels (taken from a YouTube video with a fmt 18) but they may come in different sizes (I've gotten YouTube videos with fmt 18 but with dimensions 640 x 360 pixels).

  • Most videos will be direct-feed

  • Most videos will be 16:9 aspect ratio

  • The reddish background will be animated, but generally be within that orange-red color (it's flames)

  • Sometimes there will be a badge fading in and out over the lower part of the "vs" to indicate a version (that will be important, but not right now), which might obfuscate the "vs", like so:


Sagat vs. Adon - SSF4:AE 2012
(taken from ~3s mark from this video; also note that the above is a resolution of 640 x 360 pixels)



  • The size and position of the "vs" is going to be roughly the same (I haven't verified this yet but I know it doesn't move) in proportion to other direct-feed videos


  • The characters will be chosen from a pool of more than 30 on each side (in other words, those areas of the frame will vary)

  • The videos will generally be anywhere from two to four minutes long, with somewhere between 4,000 and 6,00 frames. However, there might be longer videos (maybe a two hours) which have various other games and live action cut in. These videos are not as important, but if a solution tells me where a certain game pops up in the larger overall video, great

  • The native resolution of the captures is 720p, so a baseline image of the "vs" can be taken at what would be considered a "native" size.


Ultimately, I'm looking to code this pipeline in .NET, but that's not super important, the proof-of-concept is more important here as well as an understanding of the techniques involved so that I can translate and optimize it for .NET as well as for other videos of other games in the same genre (if I can pick out the significant discriminators, and videos of say, Ultimate Marvel vs. Capcom 3, Street Fighter x Tekken, BlazBlue: Continuum Shift, etc.).


I'm also dipping my toes in Mathematica and have home version 8.0, so a proof-of-concepts in that environment is more than welcome as well.



Answer



If the "VS" is pretty much the same (save for some badge overlays as in the second example), you can use straightforward cross-correlation to detect the presence of the template in your video frame. I answered a similar question on doing this in MATLAB on Stack Overflow. You can use something like the "magic wand" tool in Photoshop to select the "VS" from the frame to create a template. I've done so and binarized the image to obtain this template.


Looking at the different color channels (RGB) in your two images, the red channel appears to be the best for detecting your template.


enter image description here



You can now cross-correlate the red channel with your binarized template and you should get a peak at the location of the template. I choose to threshold and binarize the red template too, although you can detect it without doing so. I prefer to use a distance function rather than raw cross-correlation values, as it tends to be a bit more robust against false positives. I don't know C#/.NET, but here's an outline of the approach in Mathematica:


image = Import["http://i.stack.imgur.com/7RwAh.png"];
ImageCorrelate[ Binarize[ColorSeparate[image][[1]], 0.1], vsTemplate,
NormalizedSquaredEuclideanDistance] // Binarize[#, 0.2] & // ColorNegate

which gives you the following. The white dot marks the region with the minimum distance in each of the two images


enter image description here enter image description here


You can then use the above in your next step as desired. Note that typically, cross-correlation will result in an overhang. In other words (using a 1D example) if you're cross-correlating an $N$ point signal with an $M$ point one, you'll get a result that's $N+M-1$ point long. Mathematica's implementation takes care of the overhang for you. However, I don't know what C# does, and you might want to keep this in mind (MATLAB doesn't do it, and I had to account for this in my linked answer above).


You can also build upon this and implement a more robust thresholding criterion of your own. For now, I shall just highlight the detection for the benefit of others:


enter image description here enter image description here



You can generate the above with a combined function:


detectVS[i_Image] := 
Module[{mask =
ImageCorrelate[ Binarize[ColorSeparate[i][[1]], 0.1], vsTemplate,
NormalizedSquaredEuclideanDistance] ~Binarize~ 0.2 //
ColorNegate},

ColorConvert[i, "Grayscale"]~ImageAdd~
ImageMultiply[i, Image[mask]~Dilation~ DiskMatrix@100]
]


There is a lot of potential for improvement here. I'm an armchair hobbyist at image processing, so I don't know what the fastest algorithms are. However, there are a few things you could look into:



  1. If the VS is is roughly the same location in every video, you needn't cross-correlate using the entire image – you can just select a box in the middle and work with that.

  2. This might be an expensive operation to do for each and every frame. However, looking at your video, you have about a little over 4 seconds worth of frames where you have the VS displayed and the character names. So I would suggest that you analyze a frame every second or at most every 2 seconds, thereby guaranteeing that you will land on one with a VS on it. Once you detect VS, you can then start processing every successive frame to do the next part of your processing.

  3. This process should be, to a reasonable extent, robust towards change in size i.e., you could do cross-correlations on small images, but you'll need a suitable template to match. If you know that your images are going to be in certain set/standard sizes, then you could create templates for each of them and select the appropriate template depending on the image size.

  4. The thresholds I chose were by trial and error, but they do seem to work for the two images above and from the other related youtube videos, they probably will work for most of them. A more specialized approach would involve dividing it up into blocks and looking at the histogram to infer if it belongs to VS or not – perhaps a Bayesian classifier. However be absolutely sure that you need to do this before embarking on it. It seems to me that it's simple enough that you won't need it.


organic chemistry - Determining aromaticity of compounds




Which of the following planar structures would be aromatic?




molecules


Could someone help me determining the aromaticity of the compounds?


My Attempt:


(i) Not an aromatic compound since it only has 4 pi electrons that does not satisfy Hückel's (4n+2) rule.


(ii) Not aromatic because it only has 4 pi electrons, however I'm not sure if the oxygen contributes a p-orbital, but it shouldn't matter since 5 pi electrons still does not satisfy Hückel's rule.


(iii) I'm very confused because I'm not sure if the ketones are considered "part of the ring" therefore do they also contribute p orbitals? However if we ignore the ketones, then I believe the Nitrogens contribute 2 e- since they are sp2 hybridized? Therefore the 2 N atoms and 2 C atoms contribute a total of 4-not aromatic either?



Answer



(i) that's correct


(ii) is aromatic, it fit's the 4n+2 rule with n=1. Here is a drawing of furan showing 2 lone pair electrons in a p-orbital that completes the cyclic aromatic ring. Furan's other lone pair of electrons is perpendicular to the pi system and does not play a role in furan's aromaticity.



enter image description here


(image source)


(iii) Edit to incorporate @jerepierre's comment:


Just like phenol can exist in equilibrium with its non-aromatic tautomeric keto form


enter image description here


so can derivatives of pyrimidinedione (or uracil). However, unlike phenol were the equilibrium lies far to the aromatic phenol side, these compounds usually (it depends on the substituents) exist in the keto form. The strength of the keto and amide bonds outweigh the weaker aromaticity of the pyrimidine skeleton and shift the equilibrium to the keto side.


enter image description here


(image source)


The question remains, is the keto form aromatic? As jerepierre points out, you can draw the following resonance structure for the keto form. In this double-dipolar resonance structure there are 6 pi electrons 2 in the double bond and 2 [a lone pair] on each nitrogen) suggesting that this resonance structure would be aromatic. Since this resonance structure contributes to the overall description of the molecule, it would be fair to say that this molecule has some aromatic character; certainly not as much as benzene or furan - but some.


enter image description here



word choice - Difference between なり (meaning 'either.. or...') and か (meaning 'or')



I came across the construction ~なり~なり (meaning either... or...) on JGram and I saw this example:


ジュースなりコーラなり、お好きなものをどうぞ
juice.. cola.. have whatever you like


That made me wonder what the difference is in this case if か is used instead:


ジュースかコーラか、お好きなものをどうぞ


Is it maybe a difference of register? Or does it have a different meaning?



Answer



The first sentence 「ジュースなりコーラなり、お[好]{す}きなものをどうぞ。」 is perfectly natural. It is asking you to choose whatever you want to drink and "juice" and "cola" are only two examples of what is available. Point is you have other choices as well.


The second sentence is different. By using 「か」, the speaker is giving the addressee two choices only --- "juice" and "cola". For this reason, the sentence is NOT very natural with the word choice of 「もの」. To use 「お好きなもの」, one needs to have at least three choices. Thus, the 「もの」 needs to be replaced by 「[方]{ほう}」. 「お好きな方」 means "the one you prefer among the two".




「ジュースかコーラか、お好きな方をどうぞ。」



Thermodynamics and equilibrium constant



I just wanted to make sure how we can know whether it is $K_c$ (equilibrium constant of concentrations) or $K_p$ (equilibrium constant of pressures) which "comes out" of the equation, $\Delta G^o= -RT \ln(K)$.


Until now, I have always taken $K_c$ when the reaction was in a solution or $K_p$ if it was a gas. But as there is a difference between their values, I'd like to know exactly which one to take.




syntax - Sentence structure and meaning


here is an extract from a manga that gives me troubles : (|| = column breaks in the manga)




ただし||お前達の相手は||私一人でいい||一対一で闘い||私が勝ったら||次の者が||また 私と闘うのだ...



First : can you confirm that there are 2 different sentences :



ただしお前達の相手は私一人でいい。


However, I will be your only opponent. (???)



And



一対一で闘い私が勝ったら次の者がまた私と闘うのだ...



We wll fight one vs one and, if I win, the next person will fight with me again....



And that 闘い is equivalent to 闘って there? (Which sounds weird to me because I learned that it had a litterary use only and the character is speaking informally the rest of the time, using だ instead of です, 楽しませてくれ, instead ot 楽しませてください and so on...)


Assuming I'm right until there, I don't get what the first sentence means (especially why いい is used instead of a simple 私一人だ, but I found a lot of 私一人でいい occurences on google so...)。


Or I'm wrong and で is the てform of だ and いい modifies 一対一で, and I don't understand it either : Fight a good one vs one?)


Or, (thinking while writing), I'm wrong again and 闘い is just a noun and not the equivalent of 闘って and there is an を particle ommited after 闘い and いい modifies 一対一で闘い and then :



ただしお前達の相手は私一人で



However, I will be your only opponent, and




いい一対一で闘いを私が勝ったら



If I win a good one on one fight,



次の者また私と闘うのだ...



The next person will fight with me again...



Answer



That is clearly two sentences and you divided it correctly at the end of 「[私一人]{わたしひとり}でいい」.



「[闘]{たたか}い」 is the [連用形]{れんようけい} of the verb 「闘う」 and it has the same meaning as 「闘って」, the inexplicably popular form among Japanese-learners. 「闘い」 is surely more formal than 「闘って」 but it is NOT for literary use only as you seem to have learned incorrectly somewhere. 連用形 is used in fairly informal speech as well.


「ただしお[前達]{まえたち}の[相手]{あいて}は私一人でいい。」 is 100% natural. You could replace the 「でいい」 by a 「だ」 if it were only for grammatical correctness. Meaning-wise, however, 「でいい」 adds much more. It expresses the speaker's agreement to the fighting rules that could possibly be disadvantageous to him. In other words, the speaker is already very confident of his victory as he speaks.


「いい」 does not modify 「一対一で」 as the first sentence ends with the 「いい」. And no, 「闘い」 is not a noun here; It is a verb.



"However, I do not mind being you guys' only opponent."


"We will fight one on one (at a time) and if i win, the next guy will fight with me again."



words - Sanhedrin 99a: אין להם משיח לישראל שכבר אכלוהו בימי חזקיה


In Sanhedrin 99a, we find the phrase אין להם משיח לישראל שכבר אכלוהו בימי חזקיה.




ר' הילל אומר אין להם משיח לישראל שכבר אכלוהו בימי חזקיה אמר רב יוסף שרא ליה מריה לרבי הילל חזקיה אימת הוה בבית ראשון ואילו זכריה קא מתנבי בבית שני ואמר (זכריה ט) גילי מאד בת ציון הריעי בת ירושלים הנה מלכך יבא לך צדיק ונושע הוא עני ורוכב על חמור ועל עיר בן אתונות



What is the sense of אכלוהו here, and is it (i.e., אכל) used elsewhere (in the same sense) in any contemporary Jewish writings or even in the Tanakh?


I know אכל typically means "to eat," but that doesn't seem to be the sense the author (ר' הילל) used it in that passage (since there are no extant accounts testifying that Hezekiah was ever literally eaten by his peers).



Answer



To the first point: "Achluhu" means, consumed rather than merely eaten. In this context it means that the Moshiach was consumed, used up, in the days of Chizkiyahu.


To the second: One other example is Shemot 24:17 - וּמַרְאֵה כְּבוֹד יְהוָה, כְּאֵשׁ אֹכֶלֶת בְּרֹאשׁ הָהָר, לְעֵינֵי, בְּנֵי יִשְׂרָאֵל. The term eish ochelet comes from the same root word achilah, but refers to a consuming fire rather than an eating fire.


If you are still worried about R' Hillel seeming heretical, see this post by R' Gil Student that sheds some light on your aforementioned passage:


http://hirhurim.blogspot.com/2010/06/was-rabbi-hillel-heretic.html



Monday, February 26, 2018

word choice - How interchangeable are の/である/なる/たる when qualifying nouns?


So we know that we can qualify/equate two things with a .




  • 友達のジョン → My friend John

  • 先生の山田さん → A/My teacher Ms. Yamada


  • 勝利者の亀さん → The winner: the turtle (as opposed to the hare)



It seems like most of the time, the can be replaced with である without any change in meaning. Or is there some nuance where the meaning changes slightly? With 先生の山田さん, to me it has more of the sense of my teacher, whereas 先生である山田さん definitely does not. Does the である necessarily diminish the personal-ness of the qualification, or does it just depend on what you happen to be talking about?


Further, we can go on to include the なる connector as I discuss somewhat in this topic (“Grammatically-correct” particle-less phrases/sayings). なる appears to add a little more formality, but other than that I can't really see what else it brings to the table. For example, in my Japanese Bible, I've seen the following when referring to God:




  • 父なる神様 → God the/our Father; Father God

  • 神なる主【しゅ】 → Our Lord God




If I recall correctly, these were both instances (although appearing multiple times in the whole Bible) where someone was referring to God while speaking to other people. Is this likely just due to a different writing style by different Biblical authors, or is there really some subtle difference in meaning?


Finally, there is たる which seems to be the most formal (?), most archaic (?), and mostly literary (?). Again, all I can tell is that I usually see this paired with some kind of recommendation / moral suggestion / responsibility.




  • 教師たる者、忍耐力がなくてはならない → All teachers must have patience

  • 学生たるもの、勉強すべきである → All students should study



Obviously if the meaning changes completely they are not interchangeable.





  • (社長たる道 = 社長の道) ≠ 社長である道 ≠ 社長なる道

    • Doesn't work because we're showing a possessive with the の, not equating.





So at what times are these connectors interchangeable, and what nuance(s) does each bring? Is my reasoning correct in any of these areas?




Answer



These are my thoughts.



友達のジョン → My friend John
先生の山田さん → A/My teacher Ms. Yamada
勝利者の亀さん → The winner: the turtle (as opposed to the hare)



These are all adnominal copulas historically coming from the defective Old Japanese copula, に (infinitive), にて (continuative), にあり (conclusive), の (adnominal).


It can be replaced with である, but である has a slightly more literary/formal feeling. That is the only difference in my (non-native) opinion.




父なる神様 → God the/our Father; Father God



This is the adnominal form of one of the Classical Japanese copula, なり (coming from に + あり). It has a more historical/old feel to it than である.



教師たる者、忍耐力がなくてはならない → All teachers must have patience



This is the adnominal form of the other Classical Japanese copula, たり (coming from と + あり). My feeling is that it has an even more archaic feel to it than なり. Historically, the difference between it and なり was that it expressed something temporary and なり expressed something permanent, but I do not think that distinction exists in Modern Japanese.


thermodynamics - Le Châtelier's Principle and heat


Consider the following reaction at equilibrium. $$\ce{A->B}, \Delta H < 0 $$


Suppose I increase the temperature. Now, quite a few people would invoke Le Châtelier's Principle and say that since "heat" is a product of this reaction, the equilibrium should shift backwards. This is clearly wrong because "heat" is not a species you can have in a reaction. You can't incorporate it into the reaction quotient.


If you take $$\Delta G = \Delta H - T\Delta S$$ for $\Delta S < 0$, you could make a claim of the equilibrium shifting backwards at higher $T$. This doesn't have anything to do with the sign of $\Delta H$ however.


Is there an actual theoretical basis for the following claim that does not invoke a principle that does not apply:




For an exothermic reaction at equilibrium, increasing the temperature will cause the equilibrium to shift towards reactants.




Answer



Before to show you that what you said is false (I'm sorry ^^) be sure you understand the constant of a reaction depends on the temperature.




Let the same reaction you want $$\mathrm{A \rightleftharpoons B}$$


With a constant $\mathrm{K^{\circ}}$. Imagine you heat your system a little with $\mathrm{d}T>0$, then by Van't Hoff's law we get:


$$\frac{\mathrm{d}\ln(K^{\circ})}{\mathrm{d}T}=\frac{\Delta_rH^{\circ}}{RT^2}$$ Where $R$ is the perfect gas constant which is positive. Then $RT^2>0$. So $\mathrm{d}\ln(K^{\circ})$ as the same sign as $\Delta_rH^{\circ}\cdot \mathrm{d}T$.


So if you have an endothermic reaction $\Delta_rH^{\circ}>0$ because $\mathrm{d}T>0$ then, $$\mathrm{d}\ln(K^{\circ})>0$$



Then $K^{\circ}$ will increase with the temperature. If you take $\mathrm{d}T<0$ for an endothermic reaction then the constant of the reaction will decrease with the temperature.


I let you do the same final reasoning for an exothermic reaction. So the "Le Châtelier principle" is still true.


Note: If you know the chemical affinity, you can do the same proof, just a bit longer!


grammar - Help understanding いいやって and いやだなって


I'm confused about the parts in bold in the sentence below:



山田みたいに、ぜんぜん勉強しなくていいやって、わりきれるわけじゃないわりにはそれほど勉強しないし、怒られても気にしない性格じゃないし...すごくいやだなって思ってるのに、ついつい怒られているよ...ああ、最悪の人生だね。


Like 山田, I don't study at all ??? It doesn't mean that I'm satisfied with not studying that much, and I'm not the sort of person who doesn't care about making people angry...even though I think it's really unpleasant ... unintentionally making people angry ... it's the worst life (my translation attempt)




My best guess at what いいやって means is "play well and..." but shouldn't that be よくやって?


As for すごくいやだなって, I'm assuming って is the quote marker for 思う. And いやだな is just いやだ (it's unpleasant) with a な on the end for emphasis.


Also, my translation of "even though" for のに seems a bit incongruous.


Please explain any errors I have made.



Answer



I'll elaborate on the いいや.


From 大辞林:




㊃(終助)② 軽く言い放つような気持ち,または,なげやりな気持ちを表す。

「まあ,いい」 「今さらどうしようもない



The 〜や adds an “oh well” or a “whatever” kind of sentiment. You use it like you would use 〜よ, but to yourself and with a sense of resignation.


いい can sometimes be safely translated to “don't mind”, but perhaps it would be easier to just think of it as an “okay”:



A: ここ座っていい(Is it okay if I sit here?)
B: いい(Okay)



Then, when you're telling yourself that something is okay, you might say:




このベンチ汚いけど座っていいかな? いいや、座っちゃおう。
This bench is dirty, is it okay if I sit? Okay, what the heck, I'll sit.



grammar - Understanding use of における



明治【めいじ】時代【じだい】における学校【がっこう】教育【きょういく】について




Please help understand the use of ~における. Is it a form of において?


Why wouldn't it be a past form then?



Answer



における can be thought of as a prefix version of において. While you can say for example △においては, this usually means something like "about △", における can be used when you want to focus on a particular aspect of your subject matter. In this case your subject matter is the Meiji era, and you are focusing on its school education. You can also translate における as "pertaining to". I would translate your phrase, depending on the continuation, as



About the school education of/during the Meiji era...



halacha - Are chess pieces with faces on them considered idols?


If a chess set has pieces which seem to be mini sculptures of faces etc. (like many of the hand-made ones you will find in South Africa), are they considered idols? Did anyone hear of something like this? Sources would be appreciated.



Answer



There is definitely no question of Avodah Zarah if they are not worshiped or made for worshiping.


As to the concern of Lo Ta'asun Iti, the prohibition of making even those statues of man not constructed for the purposes of worship, Shulchan Aruch YD 141:10 says that the statue needs to be of a full man in order to be prohibited. A bust with a head but no body, or a statue of a body with no head is excluded from the prohibition. As such I suspect chess pieces are allowed.


halacha - May I use my neighbor's Wi-Fi without asking permission?



My neighbor has never set up password protection on his wireless router. If I wanted, I could wirelessly connect to his high-speed Internet service.


May I use his Internet service without asking him for permission? Or is this considered stealing?




calendar - Getting a head start on Shnayim Mikra


(Inspired by this question)


Can one get a head start on Shnayim Mikra? Would it count if someone either started early (perhaps during the weeks with no Sedra in Tishrei), or just had some spare time and went on to the next week's (and then the next and the next) Parashah?



Answer



Mishneh Torah, in Hilkhot Tefilah u-Bhirkat Kohanim 13:25, says:




אף על פי שאדם שומע כל התורה כולה, בכל שנתו בציבור, חייב לקרות לעצמו בכל שבוע ושבוע, סדר של אותה שבת--שניים מקרא, ואחד תרגום



In English( taken from here):



Although a person hears the entire Torah [portion] each Sabbath [when it is read] communally, he is obligated to study on his own each week the sidrah of that week, reading it twice in the original and once in the Aramaic translation.



Shulchan Arukh, in Orach Chayim 285:1, says the same, and adds, in 285:3, that from Sunday onwards is considered "with the congregation"( "עם הצבור" in Berakhot 8a; in English see here).


In short, the answer is: No, one can't fulfill the obligation of Shenayim Miqra ve-Echad Targum for that week when starting before the end of the previous week's public Torah reading.


Electronegativity Considerations in Assigning Oxidation States


I have never seen anything other than a set of rules like these when textbooks present how to assign oxidation numbers. Such as these:


enter image description here


However, if we keep in mind that oxidation numbers are simply imaginary numbers which suppose all bonding to be ionic - i.e. not electron sharing - and if we keep in mind simply relative electronegativity, we can easily work out the oxidation state of any element in any compound.


For example, take water. Bonding order: $\ce{H-O-H}$. Oxygen has two lone pairs. Oxygen is more electronegative than hydrogen. So we suppose that oxygen takes both electrons in both bonding pairs. Oxygen has 8 electrons. Its valence is 6. 6-8 is -2; oxygen has two more electrons assigned to it than what it has in its valence, so naturally its oxidation state is negative 2. No rules needed.



Now hydrogen peroxide. $\ce{H-O-O-H}$. Here we have an oxygen-oxygen bond so in this case, neither element wins the electronegativity battle. Electrons are split between the oxygen and the oxygen. However, since the oxygens are much more electronegative than the hydrogens, we assign both electrons in both the $\ce{O-H}$ bonding pairs to oxygen. Oxygen has 7 electrons assigned to it; oxygen has a valence of 6; oxidation state: -1. No need to memorize exceptions as stated in the table above.


We could go on. However, I am curious:


1) Has anyone been taught to assign oxidation states this way? 2) If not, what do you think of this method?



Answer



In the IUPAC Recommendations 2016 the definition of oxidation state underwent a significant and comprehensive change. It does now resemble the version wich was proposed be Hans-Peter Loock and is quoted in the earlier version of this answer, parts of which are included below.


The electronegativity battle scheme is most helpful for all kinds of compounds since it is one of the most generic ways to derive oxidation states. The table represents just a cheat sheet that might be very helpful in the beginning. If you are spending most of your time with chemistry, this table will be present as some sort of muscle memory - usually referred to as chemical intuition.


The IUPAC gold book now defines oxidation state as follows:



oxidation state
gives the degree of oxidation of an atom in terms of counting electrons. The higher the oxidation state (OS) of a given atom, the greater is its degree of oxidation. Definition:

OS of an atom is the charge of this atom after ionic approximation of its heteronuclear bonds.


The underlying principle is that the ionic sign in an $\ce{AB}$ molecule is deduced from the electron allegiance in a LCAO-MO model: The bond’s electrons are assigned to its main atomic contributor. Homonuclear $\ce{AA}$ bonds are divided equally. In practical use, the ionic-approximation sign follows Allen electronegativities (see Source). There are two general algorithms to calculate OS:




  1. Algorithm of assigning bonds, which works on a Lewis formula showing all valence electrons in a molecule: OS equals the charge of an atom after its heteronuclear bonds have been assigned to the more electronegative partner (except when that partner is a reversibly bonded Lewis-acid ligand) and homonuclear bonds have been divided equally:
    O04365-1




  2. Algorithm of summing bond orders: Heteronuclear-bond orders are summed at the atom as positive if that atom is the electropositive partner in a particular bond and as negative if not, and the atom’s formal charge (if any) is added to that sum, yielding the OS. This algorithm works on Lewis formulas and on bond graphs of atom connectivities for an extended solid:
    O04365-2





NOTE:



  1. Specific uses may require modified OS values: Electrochemical OS is nominally adjusted to represent a redox-active molecule or ion in Latimer or Frost diagrams. Nominal OS values may also be chosen from close alternatives for systematic-chemistry descriptions.

  2. Some OS may be ambiguous, typically when two or more redox-prone atoms enter bonding compromises and nearest integer values have to be chosen for the OS.

  3. The caveat of reversibly bonded Lewis-acid ligands originates from the simplifying use of electronegativity instead of the MO-based electron allegiance to decide the ionic sign. Typical examples are the transition-metal complexes with so called Z ligands in the CBC ligand-classification scheme (see Source).

  4. When used in chemical nomenclature as a symbol, the OS value is in roman numerals.

  5. At the introductory teaching level, prior to the bonding-based definition and algorithms: OS for an element in a chemical formula is calculated from the overall charge and postulated OS values for all the other atoms. For example, postulating $\text{OS} = +1$ for $\ce{H}$ and $−2$ for $\ce{O}$ yields correct OS in oxides, hydroxides, and acids like $\ce{H2SO4}$; with coverage extended to $\ce{H2O2}$ via decreasing priority along the sequence of the two postulates. Additional postulates may expand the range of compounds to fit a textbook’s scope.



Source:



  1. Karen, P.; Mcardle, P.; Takats, J. Toward a comprehensive definition of oxidation state (IUPAC Technical Report). Pure Appl. Chem. 2014, 86 (6), 1017–1081 DOI: 10.1515/pac-2013-0505.

  2. Karen, P.; Mcardle, P.; Takats, J. Comprehensive definition of oxidation state (IUPAC Recommendations 2016). Pure Appl. Chem. 2016, 88 (8), 831–839 DOI: 10.1515/pac-2015-1204.

  3. Nomenclature of Inorganic Chemistry. IUPAC Recommendations 2005. p. 34. Available as pdf from old.iupac.org



I recommend having a look at the sources cited above, they contain a lot more information. (Note that the link from the gold book to the red book on the IUPAC website is broken.)


Prior to 2016 the IUPAC defined oxidation states in their gold book (via the Internet Archive) differently. I am including this definition, since it will be still present in prominent text books and it is what lead to the postulates given in the table of the original question.




oxidation state (deprecated, pre-2016 definition) A measure of the degree of oxidation of an atom in a substance. It is defined as the charge an atom might be imagined to have when electrons are counted according to an agreed-upon set of rules:



  1. the oxidation state of a free element (uncombined element) is zero;

  2. for a simple (monatomic) ion, the oxidation state is equal to the net charge on the ion;

  3. hydrogen has an oxidation state of $1$ and oxygen has an oxidation state of $-2$ when they are present in most compounds. (Exceptions to this are that hydrogen has an oxidation state of $-1$ in hydrides of active metals, e.g. $\ce{LiH}$, and oxygen has an oxidation state of $-1$ in peroxides, e.g. $\ce{H2O2}$;

  4. the algebraic sum of oxidation states of all atoms in a neutral molecule must be zero, while in ions the algebraic sum of the oxidation states of the constituent atoms must be equal to the charge on the ion. For example, the oxidation states of sulfur in $\ce{H2S}$, $\ce{S8}$ (elementary sulfur), $\ce{SO2}$, $\ce{SO3}$, and $\ce{H2SO4}$ are, respectively: $-2$, $04, $+4$, $+6$ and $+6$. The higher the oxidation state of a given atom, the greater is its degree of oxidation; the lower the oxidation state, the greater is its degree of reduction.



What we see is, that the table in the original question actually reflects some of these rules. However, this set is not generic at all and it lacks a definition for compounds that do not contain oxygen or hydrogen, are elemental or monoatomic ions. With only these rules it is impossible do determine the oxidation states for $\ce{BF3}$ and many, if not most, compounds.


The lack of the definition is very well known, but it took the IUPAC until 2016 to actually change the official set. Hans-Peter Loock proposed a much simpler concept in Expanded Definition of the Oxidation State, which resembles the currently used definition quite well.




The oxidation state of an atom in a compound is given by the hypothetical charge of the corresponding atomic ion that is obtained by heterolytically cleaving its bonds such that the atom with the higher electronegativity in a bond is allocated all electrons in this bond. Bonds between like atoms (having the same formal charge) are cleaved homolytically.



So he basically came to the same conclusion as Dissenter in the question. Another statement from this article is



This is not a new definition, but it predates the IUPAC rules by several decades. For example, Linus Pauling provided a similar definition of the oxidation state in his 1947 edition of General Chemistry (3).


(3):Pauling, L. General Chemistry; Freeman: San Francisco, CA, 1947. Republished by Courier Dover Publications, 2012.



meaning - Detailed distinction and relationship between 文、文書、文章、 本書、本文、作文、文字、作成、表記 (and possibly others)


Every time I come upon these words, I get confused, because the meanings of them are either very similar with each other or have more than one meaning. For example, on goo辞書, the first meaning of 本書, shows to me 主, and this kanji has various meanings! Besides, it shows 文書, too (主となる文書). Apparently, 主 means しゅ, but I didn't understand very well the meaning of this expression 主となる (it becomes the main thing?). As you can see, when you try to understand 本書, you have to know if it's exactly the 主(しゅ)reading, the meaning of that expression and possibly of 主 by itself, and 文書. Very confusing for someone who doesn't have a deep Japanese knowledge. Besides, 本書 has more 3 possible meanings!


If I use an English-Japanese dictionary, like Jisho.org, I get only similar meanings without further explanation (everything looks like to mean "writing"; argh). On the other hand, if I choose a Japanese dictionary, like goo辞書, either I get more confused because hard new words are exposed to me, or one of these words from the title appears again.



Please, could you provide in detail the main meanings of these words? For example, in English, the word "writing" can mean more than 10 things! So, if you're going to use a word that repeats between the translations a lot, or that it has a translation of other word that can mean more than one thing, prefer to say, for example, "writing, as in...", or its contextually specific use (for example, apparently, 表記 seems to mean "to write on a surface", but is it the action, the result of it, or both? Is it writing on a surface like a table, or a paper on a table? Also, 文書 seems to mean something related with "paper", which I didn't find on goo辞書; I guess so). Furthermore, it would be appreciated if you explain the various meanings of a specific word, but that are in fact used. As I said before, for example, 本書 has 4 meanings, but are these 4 meanings really used?


I know that I'm asking too much, so if you say just the single and main meaning of these words, it helps me and the community a lot; I didn't find a post showing the difference between all of these words. I tried to do by myself, but I feel like walking in circles with the meanings (English is not my first language, maybe the word "writing" is straightforward to you, but I'm confused).



Answer



I would say the meanings of these words are not really similar...



  • 文: sentence (delimited by periods)

  • 文書: document (e.g., report, letter, memorandum, Word document)

  • 文章: sentences; text; paragraphs

  • 本書: this book (as in "In this book, I will explain XYZ...")

  • 本文: main text (as opposed to footnotes, captions, etc)


  • 作文: composition; writing; essay (as homework/test)

  • 文字: character; letter (Latin alphabet, kanji, etc)

  • 表記: text/character representation, notation, orthography, how to write something using characters/symbols


本 is a tricky kanji which works like a prefix that means either "main (主)" or "this/our/present (当)" depending on the context. But 本書 almost always means "this book" in reality, and practically you can forget the other little-known definitions. I admit goo辞書 is confusing in this case because the most common meaning is listed as the last definition, but maybe the editors thought 本書 in such a sense was actually two words. This type of 本 can attach many words, e.g., 本章 ("this chapter"), 本節 ("this section"), 本記事 ("this article"), 本書類 ("this document"), 本病院 ("our hospital"), 本ウェブサイト ("this/our website") and so on. Well, maybe 本記事 might occasionally mean "main article", too, depending on the situation.


作成 is just "creating", "making". It's not directly related to language.


words - Wording in Torah when Moshe is commanded to appear before Pharaoh



This shabbos, the Parasha, Bo, starts with Moshe being told to "Bo El Paroh", "Come to Pharaoh". I don't understand this wording, should it have said "Lech El Paroh", "go to Pharaoh"? Is there a reason why the command was worded that way?




sampling - up sample and down sample



Let's say that I have a sampled signal x[n], it is being, in this exact order, up sampled by 2, down sampled by4, up sampled by 4 and down sampled by 2 to produce y[n].


It seems to me that it should be pretty self evident that since we up sampled the signal by 2 and down sampled it by 2, then up sampled it by 4 and down sampled by 4, I should just get the original x[n] back.


Am I right?


So the real question is, can the various up/down sampling pieces be readily swapped?



Answer



To make Matt L.'s answer more precise: whenever a downsampling operation results in a sampling frequency that is less than twice the maximum frequency in your signal, you'll end up losing some of the signal's energy.


In the downsampling implementations I've seen, the signal is low-pass filtered prior to downsampling, so no actual aliasing occurs.


power spectral density - How to average coherences estimated using Welch's method in MATLAB


I'm trying to estimate the average coherence of discontinuous snippets of a signal in MATLAB. For Welch's spectrum estimates, the following works:



w = blackmanharris(50);  % window
n = numel(w); % fft length
o = 0; % overlap

x = rand(200,1); x1 = x(1:100); x2 = x(101:200);

s = pwelch(x, w, o, n);
s1 = pwelch(x1, w, o, n);
s2 = pwelch(x2, w, o, n);
sa = (s1+s2)/2;


max(abs(s-sa)) % almost zero

However, when estimating coherences using Welch's method, the arithmetic mean yields an incorrect result:


y = rand(200,1); y1 = y(1:100); y2 = y(101:200);

c = mscohere(x, y, w, o, n);
c1 = mscohere(x1, y1, w, o, n);
c2 = mscohere(x2, y2, w, o, n);
ca = (c1+c2)/2;


max(abs(c-ca)) % very different from zero

How can I average two coherence estimates correctly?



Answer



If you look at the documentation of mscohere which contains the definition of magnitude squared coherence, you will see that it is the absolute squared of the cross spectral density, divided by the product of the two separate spectral densities. Since power densities enter numerator and denominator of the expression, the MSC estimate from a full time series is not simply the average of the estimates from the parts.


To get a good "average" MSC estimate, do the following: estimate in each segment separately cross and single spectral densities, average these three over the segments, and then combine them in the end into an average MSC. Continuing your code:


sx1 = pwelch(x1, w, o, n);
sy1 = pwelch(y1, w, o, n);
sxy1 = cpsd(x1, y1, w, o, n);


sx2 = pwelch(x2, w, o, n);
sy2 = pwelch(y2, w, o, n);
sxy2 = cpsd(x2, y2, w, o, n);

sxa = (sx1 + sx2) / 2;
sya = (sy1 + sy2) / 2;
sxya = (sxy1 + sxy2) / 2;
ca = abs(sxya) .^ 2 ./ sxa ./ sya;


Now max(abs(c-ca)) is almost zero.


technology - Large scale hydroponics and Shmita


The gemara in Nedarim 59 (among many other places) discusses the concept of shmita produce and plants grown from them retaining their status when the original "seed" isn't destroyed when planted. In discussing this point, it brings down that the kedusha of shmita is caused by the land itself. This would imply that objects "not grown in the land itself" would not have shmita upon them even IF they were "grown in Israel."


Nominally, this would exclude things like hydroponics or pot grown vegetables.


However, we also have a halacha that a large enough vessel is considered equivalent to the ground itself, as it comprises an immovable object. As such, a date tree (say) grown in a sufficiently large planter WOULD, in fact, have all the requirements of shmita.


Given that there are concerns in general with hydroponics and their status re: making a bracha, would the "large container" concern still apply to render such produce kodesh lishmita?




Sunday, February 25, 2018

talmud bavli - To what extent is someone on the way to do a mitzvah protected from danger?


Pesachim 8A (link) says:



R. Elazar taught that harm will not befall a Shali'ach (someone on the way to do a) Mitzvah!




That is a short excerpt from a discussion about being protected when doing a mitzvah in the context of searching for chametz before Pesach where there might be a danger. It seems to say that if someone is going to do a mitzvah, unless there is something especially dangerous, one is protected from harm.


Of what degree of protection does it speak? Protection from death? Major injury that wouldn't heal (loss of limb)? Major injury that doesn't have a major long term effect (hip fracture that is set but has residual minor long-term effects)? Temporary injury (broken toe that gets set and fully healed)? Even temporary minor injury (paper cut)?



Answer



From the ברייתא cited further in the Gemara, it would appear that any and all damages, even of the slightest and likeliest nature and occurring anywhere on one's property are included in this discussion (at least according to the opinion voiced there, although there is no contradictory sentiment earlier in the discussion that I've detected) [text of Rashi follows that of the Gemara]:



תניא: איסי בן יהודה אומר: כלפי שאמרה תורה "ולא יחמד איש את ארצך", מלמד שתהא פרתך רועה באפר ואין חיה מזיקתה, תרנגולתך מנקרת באשפה ואין חולדה מזיקתה; והלא דברים קל וחומר, ומה אלו שדרכן לזוק אינן ניזוקין, בני אדם שאין דרכן לזוק על אחת כמה וכמה; אין לי אלא בהליכה, בחזרה מנין, תלמוד לומר: "ופנית בבקר והלכת לאהליך", מלמד שתלך ותמצא אהלך בשלום.


כלפי שאמרה תורה: מתוך שאמרה תורה כך, אנו למדים שהבטיחו הכתוב שלא יוזק ממונו, וכל שכן גופו ד*אין דרכלזוק, דאדם אית ליה מזלא ואינו מהיר להיות ניזק בגופו.



To quote the outline on the page you provided in your question:




(Beraisa - Isi ben Yehudah): "V'Lo Yachmod Ish Es Artzecha" teaches that one [who goes to Yerushalayim for the festival] may leave his cow grazing in the dirt and his chicken pecking in the wasteheap, and Chayos and weasels will not attack them;


It is normal for animals to be damaged, yet the Torah promises that they will not be [due to the Mitzvah]. All the more so people, who are not normally damaged [because they have Mazel, i.e. supernatural protection], will not be harmed!


Question: This teaches that they will not be harmed on the way. What is the source regarding the way back?


Answer: "U'Fanisa va'Boker v'Halachta l'Ohalecha" - you will return and find your tent b'Shalom (intact).



midrash - Moshe's Weapon Against Og


Is there anything particularly special about the weapon Moshe used against Og? The Gemara Brachos (54b) records



משה כמה הוה עשר אמות שקיל נרגא בר עשר אמין שוור עשר אמין ומחייה בקרסוליה וקטליה.


The story concludes: How tall was Moses? He was ten cubits tall. He took an ax ten cubits long, jumped up ten cubits, and struck Og in the ankle and killed him.



(Based on the years of experiences with the staff, I expected Moshe to use the miraculous matteh to finish off Og - as the Me'am Loez Haggada (p.69) quotes the Zohar Chadash, Beshalach saying the "staff was under Moshe's authority until the Mishkan was erected....he could take it anytime he needed it to perform a miracle." Taking on Og would seem to be one of those miracles.)





What makes a wine valid for Kiddush?


Where do we draw the line to define what drinks are valid to do Kidush (Shabbat)?


Does it matter if it says so on the bottle?


I saw that some bottle say "valid for kiddush" or something like this. I was wondering if all Kosher wines are valid, of if there is really something to it.



Answer




I'm marking this as community wiki, so anyone who has more information (and/or sources) please add it.


Some things to think about when choosing a wine for kiddush:




  • You must be able to say Borei Pri Hagafen on the wine (so it has to be made out of grapes). Manishewitz for example, makes some cherry wine, which is Shehakol (and says so on the bottle) and unfit for Kiddush.




  • There are some wines/grape juices that are mixed with water. This would not be valid for kiddush. The question here is if you add water to the wine, when do you say sheacol? There's a difference of opinion of maran and rama. It is well known that for many years the eda haharedit would give hechsher to wine/juice that has enough water in the mixture to be considered water for sefaradim. The Rav Ovadia would say that it is not only not casher for kidush but we say sheacol to drink. Because of this, today many wineries print that their wine/juice is also casher for havdala and kidush as the opinion of the maran habet iosef.





  • The wine should not be pagum (disqualified?) (See fn. 6 here). You can fix this wine by adding some more wine from the bottle (there are other ways to fix it as well, see Shulchan Aruch Orach Chaim 182:5-6). - If you have no other alternative it is better to make Kiddush on pagum wine, than not to make Kiddush at all (OC 182:7).




  • There is a discussion amongst Rabbinical Authorities whether wine that is Mevushal (cooked) may be used for Kiddush. The Rambam holds that wine must be fit to be offered on the altar in order to be good for Kiddush, and cooked wine may not be offered on the altar. As such, it may not be used for Kiddush. Others disagree. In practice maran in shulhan aruch mentions in three places than wine mevushal is casher (for kidush, avdala and 4 cups) (see here).




  • There is a discussion among Rabbinical Authorities whether grape juice may be used for Kiddush. (see here). And there is disagreement amongst modern Halachic Authorities whether reconstituted grape juice may be used for Kiddush. (see here)




My understanding is that when it says "Kosher for Kiddush" on the bottle, it is just letting you know that it is at least mostly grape product (if not %100 grape) and nothing more. It should also say Mevushal or non-Mevushal on the bottle.



beis hamikdash - What is the halacha regarding archeological digging near the Temple Mount?


Follow up to this question that discusses the holiness of the stone that fell off the Western Wall.


What is the halachic status regarding any kedusha (holiness) in doing archeological excavations on the Temple Mount? When I last visited Jerusalem (too long ago - I'm overdue!) I recall seeing that to the left of the Kotel there were many deep excavations. My brother, a licensed tour guide explained that Jerusalem was built in layers. So, the top layer was built post-Temple period, but archeologist may have dug down to an area as far back as the 1st Temple period.



If any of these stones or, perhaps, if they find any remnants of 1st Temple utensils (a firepan or some other tools related to the sacrificial offerings, etc.) do these have holiness? What if there is a safek (doubt)? Archeologists find something but they aren't sure what it is or when it dates from? Can they dig further, or can they take a sample to a lab to determine what it is? Or do they need to err on the cautious side and assume that it might have kedusha?




linguistics - 一段動詞が五段動詞に進化できますか?



日本語の文法では五段動詞の方が一段動詞より多いです。文法が変化すると、一段動詞が五段動詞に変化する可能性がありますか?


私は日本語を練習したいです。上手くなければすみません。



Answer



A few evidences may show people are inclined to use godan verbs more often.


ら抜き言葉 refers to making a "wrong" potential form from ichidan verbs as if they were godan verbs.



Recent verbs coined from loanwords or onomatopoeia are usually godan verbs.



In addition, some people on the net like to jokingly use the wrong imperative form for ichidan verbs as if they were godan verbs. On sites like 2ch you may find people saying よく見れ or やめれ instead of よく見ろ or やめろ. (Note that these are still jokes like "All your base are belong to us.")


These may indicate ichidan verbs may become unpopular far in the future. Still, I'm not aware of any ichidan verb that was turned into godan completely. Except for the ら抜き, the conjugation rule for ichidan verbs are well preserved, and no one say 見らない or 食べります, for example.



EDIT: According to this entry, 蹴る was an ichidan verb in archaic Japanese, but somehow merged into the godan verb family in modern Japanese. Many people are still confused with the imperative form of 蹴る. Nevertheless, such a conversion seems to be very rare in the history.


tefilla - Where can I get the free Hebrew text of the Siddur or Benching?


Where can I get the text of the siddur/prayer book (or at least benching/grace, mincha/afternoon prayer, and/or ma'ariv/evening prayer) in a free computer friendly format? I'd like to be able to make materials that include commonly needed teffilos(prayers) (e.g. a bencher card) on my computer.


I'd like the text to ideally be:



  • In different nusachos (versions, like Nusach Sefared or Ashkenaz)

  • Free (copyright free and free of charge)

  • In a computer format that can be copied or pasted (not an image)

  • In Unicode


  • In Hebrew

  • With Nikkudos (Vowels)


even if only some of the prayers are available and have only some of the features listed above, I'd be interested.



Answer



A good place to start would be here, on Hebrew Wikisource. It looks like their texts would meet all of your criteria.


Saturday, February 24, 2018

halacha - Shabbos Shira - putting out bread for the birds


Is there a problem with putting out bread for birds on Shabbos (in a case where there is no carrying issues)?



Answer



I noted elsewhere that it's



forbidden to feed an animal on שבת, unless that animal is dependent for food upon the one feeding it. For this reason, מג״א writes that the custom of feeding stray birds on שבת שירה is improper. עה״ש justifies the custom, writing that we do not feed the birds for their own sake, but, rather, for ours, as we wish to remember the joy of the crossing of the sea.... Indeed, the entire reason we may not feed stray animals on שבת is that it is too much labor (טירחא) for us; if we do it for our own sake, not the animals', or, especially, if we do it in fulfillment of a custom, then there is no problem. So goes the argument. Nonetheless, שו״ע הרב,‎ קש״ע, and מ״ב — a formidable list of latter-day פוסקים — all write, as מג״א does, that the practice is forbidden, and שש״כ accepts this as הלכה. However, שש״כ quotes אשל אברהם as writing that since the reason for the prohibition is merely טירחא, it is permissible to allow one's children to feed animals, and it is appropriate to do so on שבת שירה. Further, if one is going to shake off his tablecloth anyway, then there is no greater טירחא in doing so out of doors (where there is an עֵרוב), in the direction of birds. Finally, אשל אברהם also writes the obvious היתר that one can feed pet birds, if he has any — birds that are dependent on him for sustenance.




digital communications - Understanding the Matched Filter

I have a question about matched filtering. Does the matched filter maximise the SNR at the moment of decision only? As far as I understand, ...