amarillo of kerria

ライティング練習。ブラウザがChromeなら画面を右クリックからも翻訳できるよ。

数学の問題に出会った

I was reading a blog I've frequnted, and in its entry yesterday, there was a sort of quiz to readers. It was a mathematical one. The author of the blog was prompting readers to try to find by themselves a well-formulated solution to a mathematical question he came upon with, as the author himself couldn't formulate well the mathematical proof of it.


So for a while I pondered on that quiz, tinkering equations. I seem to have arrived, though somewhat dubious, at an answer ... so I decided to write it down as this post of my English diary (though the topic is not about English).


The question which was presented in the entry could be retold as follows:


You have a number which is a multiple of 3 (for instance, 525 which is 3 times 175). By exchanging the digits in the ones place and the tens place, you get another number (552). This new number is also a multiple of 3 (because 552 = 3*184). But how come this relation should seemingly always be true of any multiple of 3?


---


My answer was as follows (though it might be wrong, of course...):


Let n = 100x + 10y + z, where n, x, y, z are all non-negative integers and y and z are not greater than 9.


If n is divisible by 3,


(100x + 10y + z)/3 = p, where p is a non-negative integer. (A)


The equation (A) can be rewritten as:


(33 + 1/3)x + (3 + 1/3)y + (1/3)z = p


(33x + 3y) + (x + y + z)(1/3) = p


(x + y + z)(1/3) = p - (33x + 3y)


Here (33x + 3y) and p are both non-negative integers. Therefore, (x + y + z)(1/3) must also be an integer, because the right side of the equation is an integer. This means that (x + y + z) is divisible by 3.


Now, by exchanging the ones and tens digits of (A), you have the following equation:


(100x + 10z + y)/3 = q ... (B)


What you want to prove is that q is an integer.


The equation (B) can be rewritten as:


(33 + 1/3)x + (3 + 1/3)z + (1/3)y = q


(33x + 3z) + (x + y + z)(1/3) = q


Here (33x + 3z) is an integer, because x and z are integers; and we've known that (x + y + z) is divisible by 3, making (x + y + z)(1/3) amounting to an integer. Therefore q is an integer. Q.E.D.


Looking at the structure of the equation, it appears that it's also likely that all the digits of the multiple of 3 can be randomly rearranged to be a number divisible by 3.

英語学習のためにアドオンを自作

Previously, I made an add-on that changes the default highlight color - like this:




This was very useful to me ... for the default color is not so much gentle to my eyes.


But I've been in need of another add-on, an add-on that can highlight a sentence of text one by one with an easy operation. Why?


I am still not a fluent reader of English. So in order to concentrate on one sentence at one time, I very often highlight the sentence as I read it. With one sentence finished, then I highlight the next one ... But this is a bit awkward and it takes a second or seconds every time I do it. So I needed a tool to facilitate doing such a way of reading. It's why I today tried to make such an add-on.


This add-on is used like this:


1. Double-click a part of text with Control Key pressed and you can highlight the rest of the sentence including that part of the text. (In this example, I double-clicked the word "Vicipaedia.")



2. Then press Control Key and you can alternate the highlight part to the next sentence.



3. If you press the Control Key with Shift Key pressed, the highligted text is extended up to the next sentence.



4. Click any place on the screen, the highlight is undone.



Note that I am a real amateur of Javascript ... So the code is very likely to be unseemly. But it seems to more or less work as far as I've used it on Google Chrome for a bit.


Other English learners can utilise this add-on ... So I put here the code as follows. (But being such an amateur, I myself can't really assess how safe or dangerous it is to use this code. Therefore if one needs an add-on with a similar function to this, it would be FAR safer to look somewhere else.)


{
   "name": "sentence-by-sentence highlighter",
   "version": "1.0.0",
   "description": "Double-click a part of text with Control Key pressed and you can highlight the rest of the sentence including that part of the text. Then press Control Key and you can alternate the highlight part to the next sentence. If you press the Control Key with Shift Key pressed, the highligted text is extended up to the next sentence.",
   "manifest_version": 2,
   "content_scripts": [
      {
         "matches": [ "http://*/*", "https://*/*" ],
         "js": [ "sentenceBySentenceHighlighter.js" ]
      }
   ]
}


var selectedText;
var isHighlighted = false;
 
document.addEventListener("dblclick", highlightSentence);
 
document.addEventListener("keydown", replaceSentence);
 
document.addEventListener("click", cancelHighlight);
 
function highlightSentence(e) {
   if (e.ctrlKey) {
      selectedText = window.getSelection();
      selectedText.modify("extend", "forward", "sentence");
      isHighlighted = true;
   }
}
 
function replaceSentence(e) {
   if (e.ctrlKey && isHighlighted) {
      selectedText = window.getSelection();
      if (!e.shiftKey) {
         selectedText.collapseToEnd();
      }
      selectedText.modify("extend", "forward", "sentence");
   }
}
 
function cancelHighlight() {
   if (isHighlighted) {
      isHighlighted = false;
   }
}


Copy and paste this code onto Notepad, then save these as a json file (manifest.json) and a Javascript file (sentenceBySentenceHighlighter.js) respectively, then put these two files together into a folder of any name. By doing this, you'll have prepared the folder to install onto Chrome as an add-on. The installation can be done via the "load unpackaged extensions" button shown in the picture below.



Of course, this is an amateur work, so I can't have any responsibility if you have any troubles by using this add-on. And it can't be guaranteed whether this can work on other settings or conditions.

多読心得・続

As to my quantity-focused reading, I think as follows.


To choose appropriate reading materials is needed in reading exercise focused in quantity. As to this training, the materials for the main are more appropriate if they are:


- those which you are more or less interested in or you can willingly read


- those which are clear enough in logic


- those whose content is substantial enough (those which have a distinct content)


- those which you can read without (much) conceptual difficulty (those which discuss plainly enough and understandably enough)


Why these points? Those things are desirable so that you can see well the meaning of the text and in what context each sentence lies. With such clarity of understanding as to content, the semantical and syntactic aspects of sentences can be precisely and most efficiently absorbed.


In other words, in such kind of training, those texts or documents, or parts of them, which do not have all the points above are basically very okay to be skipped (or to do so is reasonable and appropriate).


This is the guideline I put for myself for now.