Consider the operation defined on $\mathbb{N}$ by $x*y=\gcd(x,y)$. I have two subpoints to solve in this problem. The first is:  $i)$ Prove that $(\mathbb{N}, *)$ is a commutative monoid  After proving that $*$ is an operation on $\mathbb{N}$, proving commutativity, and proving associativity (this was a bit harder than the other things to prove), the only thing that I had to prove was that $(\mathbb{N}, *)$ has an identity element. Meaning I have to prove that there $\exists$ $e \in \mathbb{N}$ such that $x * e = e * x = x$, $\forall$ $x \in \mathbb{N}$. So I chose $e = 0$ as the identity element, since $x * 0 = 0 * x = x$, $\forall$ $x \in \mathbb{N}$. Having these $4$ conditions, we can conclude that $(\mathbb{N}, *)$ is a commutative monoid. The second suboint is:  $ii)$ Show that $D_n = \{ x \in \mathbb{N}: \hspace{0.25cm} x\mid n \}$ is a stable subset of $(\mathbb{N}, *)$ and $(D_n, *)$ is a commutative monoid.  Through a bit of work, I managed to show the first part of this $ii)$. However, in the second part, I have to show that $(D_n, *)$ is a commutative monoid. We can prove that $(D_n, *)$ is an operation using the first part of $ii)$ (so $*$ is an operation on $D_n$ because $D_n$ is a stable subset of $(\mathbb{N}, *)$) and we can prove commutativity and associativity in a similar manner as we did in subpoint $i)$. The problem I have is with the identity element. I used $0$ as the identity element in subpoint $i)$, but I can't use $0$ here, since $0$ is not a divisor of any number, so $0 \notin D_n$ for any $n \in \mathbb{N}$. So I can't use that as the identity element. I though of using $e = x$ as the identity element for every $x \in D_n$, since $\gcd(x, x) = x$. But then we wouldn't really have the condition: $$\exists \hspace{0.2cm} e \in D_n \hspace{0.2cm} \text{such that} \hspace{0.2cm} x * e = e * x = x \hspace{0.2cm}, \forall x \in D_n$$ But, rather, we would have it the other way around: $$\forall x \in D_n, \hspace{0.2cm} \text{there} \hspace{0.2cm} \exists \hspace{0.1cm} e\in D_n  \hspace{0.2cm} \text{such that} \hspace{0.2cm} x * e = x * e = x$$ So I don't think this is right, since the condition met goes the other way around, although I am not sure. So how could I prove that $(D_n, *)$ is a commutative monoid? $0$ is not among $n$'s divisors so I can't use $0$ as the identity element. But a commutative monoid needs an identity element. What am I missing here?
Let $x*y=\gcd(x,y)$ on $D_n=\{x\in \mathbb N:x |n\}$. I have to prove that $(D_n,*)$ is a commutative monoid and I have a problem when finding the identity element.  $x*e=x$  So $gcd(x,e)=x \to e=xk,k\in \mathbb N^*$ and $e \leq n$  A good $e$ is $0$ but it's not in $D_n$
Convert file contents to lower case I have temp file with some lower-case and upper-case contents.  Input  Contents of my temp file:  hi Jigar GANDHI jiga   I want to convert all upper to lower.  Command  I tried the following command:  sed -e "s/[A-Z]/[a-z]/g" temp   but got wrong output.  Output  I want it as:  hi jigar gandhi jiga   What needs to be in the substitute part of argument for sed? Use Stokes's Theorem to show $\oint_{C} y ~dx + z ~dy + x ~dz = \sqrt{3} \pi a^2$ I am a little stuck on the following problem:  Use Stokes's Theorem to show that  $$\oint_{C} y ~dx + z ~dy + x ~dz = \sqrt{3} \pi a^2,$$  where $C$ is the suitably oriented intersection of the surfaces $x^2 + y^2 + z^2 = a^2$ and $x + y + z = 0$.  OK, so Stokes's Theorem tells me that:  $$\oint_{C}\vec{F} \cdot d\vec{r} = \iint_{S}\operatorname{curl} \vec{F} \cdot \vec{N} ~dS$$  I have calculated:  $$\operatorname{curl} \vec{F} = -\vec{i} - \vec{j} - \vec{k}.$$  I then figured that on the surface $S$ we must have:  $$\vec{N}dS = \vec{i} + \vec{j} + \vec{k}dxdy$$  since this follows from the equation of the given plane.  However this will then give me:  $$\operatorname{curl} \vec{F} \cdot \vec{N} = -1 -1 -1 = -3$$  And thus I would get, if project this onto the $xy$-plane:  $$\iint_{S} \operatorname{curl} \vec{F} \cdot \vec{N} ~dS = -3 \iint_{A} dA = -3 \pi a^2$$  which is obviously not correct.  I would greatly appreciate it if someone could help me with this.  I actually had multivariable calculus a few years ago, and I know that I knew this stuff then.  However, now that I need it again I notice that I've become quite rusty.  Thanks in advance :) After taking a statistics course and then trying to help fellow students, I noticed one subject that inspires much head-desk banging is interpreting the results of statistical hypothesis tests.  It seems that students easily learn how to perform the calculations required by a given test but get hung up on interpreting the results.  Many computerized tools report test results in terms of "p values" or "t values".  How would you explain the following points to college students taking their first course in statistics:   What does a "p-value" mean in relation to the hypothesis being tested?  Are there cases when one should be looking for a high p-value or a low p-value? What is the relationship between a p-value and a t-value? Merging dictionaries in C# What's the best way to merge 2 or more dictionaries (Dictionary&lt;T1,T2&gt;) in C#? (3.0 features like LINQ are fine).  I'm thinking of a method signature along the lines of:  public static Dictionary&lt;TKey,TValue&gt;                  Merge&lt;TKey,TValue&gt;(Dictionary&lt;TKey,TValue&gt;[] dictionaries);   or  public static Dictionary&lt;TKey,TValue&gt;                  Merge&lt;TKey,TValue&gt;(IEnumerable&lt;Dictionary&lt;TKey,TValue&gt;&gt; dictionaries);   EDIT: Got a cool solution from JaredPar and Jon Skeet, but I was thinking of something that handles duplicate keys. In case of collision, it doesn't matter which value is saved to the dict as long as it's consistent. Node access based on view mode How to find out what's accessing a particular hard drive on Windows? Possible Duplicate:          My HDD on a dock just started making noises like it's being accessed but I don't see any program accessing it.  Is there a program that shows which HDD is accessed by which program in percentages similar to how the task manager shows which programs use the most CPU? Am I required to pay UK/ USA Visa fees if I have a German residence permit? Here is the situation. I am non-european but staying in Germany with a Residence permit. I can visit all Schengen listed countries with no issue. Assuming that I would want to travel to a non-Schengen country e.g. UK or USA, can I use my residence permit to travel there or am I required to apply as a citizen of my country? Assuming Germans are not required to pay Visa fees to that country, will I have to pay since I only have a residence permit? Third case, Europeans can fly directly to the airport of some countries and apply for a visa from there. In some other countries, you are required to book a Visa appointment at the embassy, which may be granted or not. Does that apply for one with a residence permit? Best way to parse RSS/Atom feeds with PHP Why does bash say No such file or directory when the file is on the path Book: Nanobot apocalypse on Earth, originally used for weather control How is the minimum of a set of IID random variables distributed? If $X_1, ..., X_n$ are independent identically-distributed random variables, what can be said about the distribution of $\min(X_1, ..., X_n)$ in general? How do i enter my numeric password in iPhone 4 in VoiceOver mode? My iPhone 4 is in VoiceOver mode. It`s currently locked and not accepting my passcode which is absolutely correct. And now it's saying iPhone is disabled.  Any solution? We know that continuous version of $\sum$ is $\int$, but, can there be a continuous version of $\Pi$? Uninstall a program installed with Wine I am using Ubuntu 11.10. By using wine software i installed some software like nimbuzz and ibibo messenger. Both the programs are not working and showing the bug as We're sorry, but an unknown error has caused ibibo Messenger to close.  So I wanna uninstall those.   How to uninstall those type of programs which I installed through Wine? Open existing file, append a single line How are self-replicating mines supposed to work? Book about almost extinct warrior race with three castes: sen, kaa, ker The aliens in this book are an humanoid alien mercenary race, fighting for some other aliens, against humans?.   The Ker are the fighters, the sen are the wise ones, and the kaa the family/non-fighters.  Their clan gets almost wiped out because both their employers and humanity fear them, and the last survivors head towards their race' home planet, together with a human captive, who learns about their ways.  The other aliens are some blob-like aliens with little genetic variety.  Ring any bells? How are "needs to be washed," "needs washing," and the regional variant "needs washed" to be distinguished"? Find all $x$ such that $x^6 = (x+1)^6$. Is there a word for people who always act too friendly in order to curry favor with their acquaintances? Is there a single noun or adjective for a person who is always flattering friends and acquaintances, not only to be liked and accepted but, at other times, to curry favor with them as well ?  I'm not looking for regionalisms but a word that will be understood in any English speaking country.