Using Inclusion-Exclusion, find the number of ways to write a word of length k over an n-letter alphabet so that the word uses every letter at least once?  how should I approach this?
Given an alphabet of size $n$, how many strings of length $c$ contain every single letter of the alphabet at least once?  I first attempted to use a recurrence relation to work it out:  $$ T(c) = \left\{ \begin{array}{cr} 0 &amp;\mbox{ if $c&lt;n$} \\ n! &amp;\mbox{ if $c = n$} \\ T(c-1) \cdot n \cdot c &amp;\mbox{ if $c &gt; n$} \end{array} \right. $$  As there's no strings that contain every letter if c &lt; n, and if c = n then it's just all permutations. When c > n you can take any string of size (c-1) that contains all letters (of which there are $T(c-1)$ to choose from), you choose which letter to add (of which there are $n$ choices) and there are $c$ different positions to put it. However, this gives out results that are larger than $n^c$ (the total number of strings), so it can't be right, and I realised it was because you could count some strings multiple times, as you can make them taking different inserting steps.   Then I thought about being simpler: you choose n positions in the string, put each letter of the alphabet in one of those positions, then let the rest of the string be anything:  $$ {c\choose{n}} \cdot n! \cdot n^{c-n} $$  But again this counts strings multiple times.  I've also considered using multinomial coefficients, but as we don't know how many times each letter appears in the string it seems unlikely they would be much help. I've also tried several other methods, some complicated and some simple, but none of them seem to work.  How would you go about working out a formula for this? I'm sure there's something simple that I'm missing.
I was trying to understand the internal structure of AES (Advanced Encryption Standard)  The Standard order of steps within a round:   Substitute Bytes Shift Rows Mix Columns Add Round Key   Substitute Bytes, Shift Rows &amp; Mix Columns satisfies the two most important properties required for a secure cipher i.e confusion and diffusion   Substitute Bytes provides Confusion i.e. that each binary digit (bit) of the ciphertext should depend on several parts of the key.  Shift Rows along with Mix Column provides Diffusion i.e. if we change a single bit of the plaintext, then (statistically) half of the bits in the ciphertext should change  Changing the order of Step 1 and Step 2 won't have any effect. But to what extent can we change the order of other steps? Does it weakens the security of AES, and if so, how? Is it implied that Porpetina and Queenie Goldstein are Jewish? If $M$ is an $R$-module and $I\subseteq\mathrm{Ann}(M)$ an ideal, then $M$ has a structure of $R/I$-module Let $M$ be an $R$-module and let $I$ be an ideal of $R$ such that $I$ is a subset of $\mathrm{Ann}(M)$. Define a product of an element of $R/I$ by an element of $M$ as follows: $$(r+I)\cdot m=rm.$$ (a) Show that this product is well defined. (b) Show that this product, together with the sum of elements of $M$, turns $M$ into an $R/I$-module.  My answer for (a): Let $r+I,s+I \in R/I$ such that $r+I=s+I$. Then $(r+I)m=(s+I)m$, for all $m \in M$. Then $rm=sm \implies r=s$  (since the inverse of $m$ is in $M$), so the product is well defined.  Is my answer to (a) correct?  How can I use Ann(M) to answer (b)? Is it possible to upgrade a BGA 1224 CPU? I want to upgrade the CPU of my T430s laptop from i7-3520M to i7-3632QM. I'm sure i7-3632QM is supported (same socket (BGA1224), same TDP (35W) and microcode found in BIOS (306A9.PAT)).  So my question is: 1) is it possible to de-solder the current CPU without damaging it, and to solder the new CPU without damaging it and the motherboard ? 2) if so, what tools are necessary? who can do that at a reasonnable cost?  Until now, I was unable to find anyone able (or willing) to do that (I'm located in France, and I have tried a local fablab, electronics shops, TV repair shops, ...). Any hint would be appreciated. variable access outside of if statement I have a simple question about calculating distances in PostGIS.  I would like to get the distance between two geometries. I am using this sid : 4269 in meters what i am doing now is this : ST_Distance((a.geom,b.geom)) FROM ... but I am getting result in degrees. I think that I should work with geography but how can I cast a geom to a geography? I tried with (a.geom::geography) but i am getting an error.  What can I do to get my result in meters?   Thank You Writing ISO 19139 compliant XML metadata from spreadsheet? I am looking at a way to migrate the metadata from a spreadsheet into ISO 19139 compliant XML metadata documents for a collection of shapefiles. I can parse the data out of the spreadsheet into strings without issue however I am getting lost on how to take those strings and use them to populate the elements.   This example:  covers most of what I want to do, however I would need to generate the tree beforehand based on the ISO 19139 schema. PyXB seems to have schema bundles for OpenGIS but I would like some insight on how to connect everything. Given any $10$ consecutive positive  integers , does there exist one integer which is relatively prime to the product of the rest ? How to prevent a background process from being stopped after closing SSH client in Linux How to Query all opportunities ids from account I write a sample query to fetch account Ids from cases of a particular record type.Then i wrote another sample query parent to child relationship to fetch opportunity ids from accounts.  My sample code  List&lt;Case&gt; c=new List&lt;Case&gt;(); c=[Select Id,accountId from case where RecordTypeId = '01290000000sF3L']; List&lt;Id&gt; accountIds= new List&lt;Id&gt;(); List&lt;Account&gt; accounts=new List&lt;Account&gt;(); List&lt;Opportunity&gt; opps=new List&lt;Opportunity&gt;(); for(Case cl:c)  { accountIds.add(cl.accountId); } accounts=[Select Id,name,(select Id,name from opportunities) from account        where Id in:accountIds]; System.debug('Data in accounts '+accounts);   But my issue is how to get opportunity id from above Soql accounts means how to add those opportunity id's to the list.  for(Account ao:accounts) { //How to fetch Opportunity ids from above account list. } As per passport my name is Manish Kumar Ahuja, but by mistake I book a ticket with the name of Manish Ahuja. My middle name is not on the ticket. Can I fly on this ticket? Because the airline can't add the name and they say that the ticket is non-refundable. Not sure if this is a bug or a feature, but I noticed today that if I , it annoyingly one-boxes a link to the room, which is not a link to the info page! That's it. I'm gonna pack up and leave! Such annoyance! But for the time being,  Is this behavior expected? If so, what is the reason for changing the links? If this is really a bug since the responsible bot is not seeing parts of the URLs and ends up one-boxing, and hence linking to the wrong message, could this be fixed please? Worth pointing out that too much exposure to annoying things results in a higher blood pressure. "Since", "until", "from", "to" on invoices or date ranges of a form Which is the correct form on an invoice, or a general date range in a form, and why?  Monkey dolls                        12 GBP From 2012-01-03 to 2013-01-02  Monkey dolls                        12 GBP Since 2012-01-03 until 2013-01-02   Form format (dates can be modified with a datepicker):  Since: 2012-01-03 until: 2013-01-02   Since+until makes sense and sounds ok to me, yet I know I can be very wrong, at least when it comes to the common usage in the UK and/or US, since English is not my first language.  I am interested in both British and American English.  Until now I've been using since+until, yet some articles explicitly say they may not ever be used together, while some people and some other articles get deep into grammar rules which I can't really apply on the context of invoices and forms.  Here's a recent article saying since and until can never be used together (last paragraph):   Edit: The date range can start in the past or in the future, and can end in the past or in the future. However, at the time of issuing an invoice or rendering a form, you cannot know when the document will be read or how the form will be filled. Generating random integer from a range I am designing gamecards in LaTeX  Everything is going pretty ok so far but when i try to insert the %-sign for a question about percentages my file keeps giving errors.  I tried putting the percentage between dollarsigns because i know just % will make it a 'remark' and that the dollarsign makes it 'mathematical data'.   Whats the reason for the error?   P.s. the error says: file ended while scanning use of \kaart. ...    Codesample:   {\kaart{Bekijk statistiek kaart F:   Schat het percentage mensen dat als lievelingseten spaghetti opgaven, je mag er slechts $ 2% $ langs zitten. } { $ 11% $}} Have men and women in the Wizarding World always had relatively equal rights? There are racial struggles and examples of racism, (Muggle-borns, centaurs, hous-elves, goblins, etc.) but are there any examples in the Wizarding World of sexism?  Have witches and wizards always had equal rights? Command with percent symbols not running in crontab The following crontab does not work:  # TEST LINE DOES DOT RUN */1 * * * * /bin/echo 'test '`/bin/date +%Y-%m-%d` &gt;&gt; /tmp/test   I also tried starting it with:  SHELL=/bin/bash   Update: I thought the backtick characters ` were the villains, but as the answer below clarifies the percentage % was the culprit! How do Rpy2, pyrserve and PypeR compare? Oven temperature for multiple ducks? Do I need to adjust the oven temperature in a roast duck recipe if I want to put more than one duck in the oven at a time.   I suspect I should keep the same temperature but keep them in longer.  Should I cover each duck in foil individually or together?  Does it matter if they are on the same pan? Possible Duplicate:          The  describes the expansion of the $n$th power of the sum $(a+b)$:  $$(a+b)^n = \sum_{k = 0}^n {n\choose k}a^kb^{n-k}$$  In calculus, there is a generalization of the product rule called , which describes the expansion of the $n$th derivative of the product of two functions $f$ and $g$:  $$(fg)^{(n)} = \sum_{k = 0}^n {n\choose k}f^{(k)}g^{(n-k)}$$  It's not difficult to prove using the product rule and induction, what I'm really trying understand here is why the formula is true. Is there a way to prove it using the binomial formula? How are these two formulas related? Is there a combinatorial proof for Leibniz's rule like there is for the ?   I understand this question is a bit vague, but I hope you'll agree that these two formulas look so similar it just feels like there should be some relation between the two. Of course this is not necessarily true, but I'm hoping it's not just a crazy coincidence.