number of surjective functions from X to Y where card(Y)=k < n =card(X) Let $X=\{1,...,n\}$ and $Y=\{1,...,k\}$. If $n\gt\ k$ then the number of surjective functions $f:X\to Y$ $\;\;$is  $\;\sum_{j=0}^{k-1}  (-1)^j\binom{k}{j}(k-j)^n$  Here I show what I have done. I can't find my mistake:  Let $A=\{f:X\to Y\}$, $B=\{f:X\to Y:f\text{ surjective}\}$, $C=\{f:X\to Y:f\text{ not surjective}\}$. $\;$ We have that $\;$  $|A|=k^n$ $\;$ so $\;$ $|B|= k^n-|C|$   My strategy to calculate $|C|$ is to differentiate between different cases and I have considered that  \begin{align} |C|&amp;=|\{f:X\to Y:|\operatorname{Im}(f)|=k-1\}|+|\{f:X\to Y:|\operatorname{Im}(f)|=k-2\}|+{}\\ &amp;\qquad+\dots+|\{f:X\to Y:|\operatorname{Im}(f)|=2\}|+|\{f:X\to Y:|\operatorname{Im}(f)|=1\}|\\[1ex] &amp;= k(k-1)^n+\frac{k(k-1)(k-2)^n}{2!}+\dots+\frac{k(k-1)(k-2)\dots(k-(k-1))^n}{(k-1)!}\\&amp;=\sum_{j=1}^{k-1}  \binom{k}{j}(k-j)^n \end{align}  For instance, to calculate $|\{f:X\to Y:|\operatorname{Im}(f)|=k-2\}|=\frac{k(k-1)(k-2)^n}{2!}$   I take out the first element of Y where I have k possibilities. Then I take out the second element of Y and I have k-1 possibilities. As the order doesn't matter I divide by $2!$ . Now I can make $(k-2)^n$ functions with the rest of elements. (excuse my english)  And then $|B|=k^n-|C|=k^n-\sum_{j=1}^{k-1}  \binom{k}{j}(k-j)^n$
Counting the number of surjections. How many functions from set $\{1,2,3,\ldots,n\}$ to $\{A,B,C\}$ are surjections? $n \geq 3$  Attempt  I was hoping to count the number of surjections by treating $A,B,C$ like bins, and counting the number of ways to fill them with $1,2,3,\ldots,n$ such that no bins are empty. This is equivalent to putting two "separator" bars in between the $n$ numbers or $n-1 \choose 2$.  However, I think I am missing a step here: prior to putting in the separator bars, I should permutate the $n$ elements. So, multiply by $n!$.  The order of elements in the same bins do not matter. So I should be divided by the number of permutations of the elements in each bins. This is where I am stuck.  Additional Info  I made the question up myself. Feel free to modify the question into a more solvable form if it is too difficult/complicated.
Show that if $(b,c)=1$, then $(a,bc)=(a,b)(a,c)$. I am typing a command, I remember I have to check something, if I press Ctrl+U the command disappears and I can type something else, but then the command I was typing is not in the history.  Is there a way to recover that command, or a different shortcut that I can press to save somewhere the command? Realtime audio processing using Dynamic How to create and animate the water reflection (Caustics) on an object? What is the best method to create this kind of reflection and how to animate it? How can I remove the new weather information from the taskbar? Arguably the most famous scene in Star Wars is when Darth Vader reveals to Luke Skywalker that      He is Luke's father.   This surprise was kept secret to most of the crew and even the cast , with Dave Prowse, the actor playing Darth Vader, delivering a fake line, the actual line being overdubbed. (Of course, Darth Vader wasn't voiced by him in the first place; all lines were overdubbed by James Earl Jones).   Like Mark Hamill relates in :     But, for example, your big scene, one of the classic cinematic moments when Darth Vader divulges his true identity, is no longer a revelation.       It's such a great moment! The fake line that was put in there just to try and keep the secret was "You don't know the truth: Obi-Wan killed your father!" But as much as I enjoyed leaking false information, it was a wonderfully hard secret to keep because (Irvin) Kershner, the director, brought me aside and said "Now I know this, and George knows this, and now you're going to know this, but if you tell anybody, and that means Carrie or Harrison, or anybody, we're going to know who it is because we know who knows."   So how do we explain ?       And [David Prowse] offered a glimpse of a possible plot for the second sequel. Darth Vader and Luke Skywalker, the young hero in the first film played by Mark Hamill, are hooked up in a do-or-die light saber duel when Luke learns that Darth is, in fact, his long-lost father.   So exactly how secret was this secret anyway?    As DVK points out , the newspaper article is probably authentic. equivalent norms in Banach spaces of infinite dimension Suppose $ X $ is a Banach space with respect to two different norms, $ \|\cdot\|_1 \mathrm{ e } \|\cdot\|_2 $. Suppose there is a constant $ K &gt; 0 $  such that $$ \forall  x \in X, \|x\|_1 \leq K\|x\|_2 .$$ show then that these two norms are equivalent In Group theory proofs what is meant by "well defined" What is exactly meant or required for a mapping to be well defined. I was reading the first Homomorphism theorem () and the first thing the proof does is define a map and find it if its well defined.  Intuitively it makes sense, but what are the requirements for a map to be well defined? For example in the link given, I understand they show one-one relationship as being well defined and later on they again prove its injective.   What have I understood wrongly?  Soham How to trigger Ajax forms machinery I'm working on ajaxifying a form which uses Hierarchical Select widget. I need to update a text field based on the value of HS and a couple of other fields. I want to use Drupal forms Ajax API. I followed the . Now the form is updated when user fills in the text fields. But I can't cope with HS.   I was told  HS doesn't support regular Drupal #ajax mechanism. I can easily attach the handler to HS update event. So all I need now is to manually trigger Drupal Ajax machinery from my own handler. How it's best to be done?   I see there is a global Drupal.ajax object but can't figure out how to make use of it. If $p,q$ are primes $(pq,a)=1$ and $p-1|q-1$ then prove $a^{q-1}\equiv 1\pmod{pq}$ $p,q$  primes, $(pq,a)=1$ and $p-1|q-1$ then prove $a^{q-1}\equiv 1\pmod{pq}$   Got this in an exam today and had no idea how to do it. As of today I only knew about ubuntu-bug which I could use to report bugs about a specific program. But now I learned about apport-collect and apport-bug which basically are:  apport-bug - Reports problems to launchpad using Apport to collect a lot of information about your system to help the developers fix the problem and avoid unnecessary questions and answers.  apport-collect - Works as apport-bug but it send the information to an already existing bug report. In my case it was apport-collect 1060268 Thanks to Brad Figg in Launchpad.  Are there any other tools to report bugs? Why do we have an elementary charge $e$ in physics but no elementary mass? Is an elementary mass ruled out by experiment or is an elementary mass forbidden by some theoretical reason? How to convert strings into integers in Python? I often need to view on the canvas the (selected or not) features from the current active vector layer.  In this situation, I only need to view something on the canvas, without doing anything on the canvas itself (so, the active window is always the Attribute Table).  This is what I usually do:   Open the Attribute Table for the current active layer; Select the first feature; Press Ctrl+P button (i.e. the "Pan map to the selected row" button); Minimize the Attribute Table; View something on the canvas for the current feature; Go to the first step until needed.   Is there a way (a method, a shortcut) for directly browsing every feature on the canvas without the needing of going backwards and forwards with the Attribute Table? I mean, something like a "next" button?  (I may use the workaround of splitting the windows of the Attribute Table and of the canvas within the monitor, or also docking the Atrribute Table, but I would like to work on the full QGIS window).    EDIT I saw that my question was casted as a duplicate of  question. The two questions are very similiar, but I think it should be left as open for two reasons:   the related duplicated question doesn't have an accepted answer; my question is slightly different because I'm looking for the possibility of displaying only the selected features (and the @Joseph's , that I marked as accepted, answers well to my request). SQL Server compatibility with New TLS Standards The major browsers are moving beyond SSL3.0 and TLS1.0 . The PCI Security Council has declared an end-of-life date for these protocols to be considered sufficiently strong encryption.   We need to move away from these protocols, to use newer and stronger ones. On Windows servers, you can very easily disable these old protocols, and instead offer only TLS1.1 or greater.  However, as noted , Microsoft SQL Server 2008 R2 and SQL Server 2012 (Standard, at least) both will not start if those lower protocols are disabled.  However, there are a growing number of versions of MS SQL Server.  There are SQL Server Standard, Business Intelligence, Enterprise, Express, Web, and Compact editions.  And of course there is SQL Server 2008, 2012, 2014, and (in pre-release) 2016.  Which of these editions support or will support the use of only TLS1.1 or greater protocols? I need to prove this equivalence   Let $a,b \in \mathbb{Q^{+}}$ then $\sqrt{a} + \sqrt{b} \in \mathbb{Q} $ if and only if $\sqrt{a} \in \mathbb{Q}$ and $\sqrt{b} \in \mathbb{Q}$  I have already proved the reciprocal (the obvious part) but I am having difficulties with the other part  Please any hint will be appreciated.  Thanks in advance. For my MAC laptop, I only have 250GB and out of this 250GB MAC is taking up 129GB in the other section. I looked everywhere to the best of my knowledge. Please note my home directories is only 45GB. Can you somehow please help me? My multimeter is rated to 600V.  How can I readily (and safely) use it to measure higher voltages? Find all natural numbers $x,y$ such that   $$3^x=2y^2+1$$  solutions are $(1,1)$, $(2,2)$, $(5,11)$. I found that parity of both is same and If $x$ Is odd it is of the form $4k+1$. When to use "do" in phrases which are not questions?