How many ways are there to arrange n objects into n bins, subject to the n constraints that the ith object can't go in the ith bin for any 1 &lt;= i &lt;= n ?  Each bin has to contain exactly one object.
I understand the whole concept of Rencontres numbers but I can't understand how to prove this equation  $$D_{n,0}=\left[\frac{n!}{e}\right]$$  where $[\cdot]$ denotes the rounding function (i.e., $[x]$ is the integer nearest to $x$). This equation that I wrote comes from solving the following recursion, but I don't understand how exactly the author calculated this recursion.  $$\begin {align*}  D_{n+2,0} &amp; =(n+1)(D_{n+1,0}+D_{n,0}) \\ D_{0,0} &amp; = 1 \\ D_{1,0} &amp; = 0  \end {align*} $$
Can TikZ create pixel art images? Can you create images like this:    when you have something like  0 = green (#54ff00) 1 = white (#ffffff) 2 = red   (#ff0000) 3 = blue  (#0048ff)  Image (Python list of integers defined above): [[2,0,0,0,0,0,0],  [0,3,0,0,0,0,0],  [0,3,2,1,1,0,0],  [0,3,2,2,2,1,1],  [0,3,2,0,0,1,0],  [0,0,0,0,0,1,0],  [0,0,0,0,0,1,0]]   with TikZ?  How far I got  The following MWE defines all colors, produces a grid of the correct size (though the size is determined by hand):  \documentclass[varwidth=true, border=2pt]{standalone} \usepackage{tikz} \usepackage{xcolor}  \begin{document}     \newcommand\n{7}     \definecolor{green}{HTML}{54FF00}     \definecolor{wite}{HTML}{FFFFFF}     \definecolor{red}{HTML}{FF0000}     \definecolor{blue}{HTML}{0048FF}     \begin{tikzpicture}         \foreach \x in {1,...,\n}{             \foreach \y in {1,...,\n}{                 \begin{scope}[shift={(\x,\y)}]                   \draw [fill=green] (0,0) rectangle (1,1);                 \end{scope}             }         }     \end{tikzpicture} \end{document}   Of course, I could simpy make a lot of adjusted                   \begin{scope}[shift={(\x,\y)}]                   \draw [fill=green] (0,0) rectangle (1,1);                 \end{scope}   but I've wondered if this can (with reasonable effort) be done in TikZ / LaTeX.  My problem is giving TikZ the color array. I don't have any idea how to do this. I only know two types of looks in TikZ:  \foreach \x in {0,1,2,3,4,5}{...} \foreach \number in {1,...,\n}{...}   I have never seen a nested over a 2D-array. All I have seen so far were 1D-Arrays of tuples (with fixed tuple size). Can a ultracentrifuge be used to test general relativity? With today's ultracentrifuge technology, they can spin so fast that the sample can be subjected to  accelerations of up to 2 millions Gs. That is equivalent to two solar masses. Has someone tried to measure the time dilation in a radioactive sample? How calculate that time dilation respect to the time outside the ultracentrifuge, for example one week. I think that that time dilation will be significant enough to be measured. I'm having trouble understanding the wording of one of my homework questions. Since this question appears early in the chapter, I have a feeling that I'm misinterpreting it.  Give a finite automaton that that accepts the following language: The language over $\{a, b\}$ of any even number of $a$'s and any odd number of $b$'s.   I'm having trouble with the usage of "and". Is it asking for an FA that accepts any string that is either an even number of $a$'s or an odd number of $b$'s, e.g. $aa$, $bbb$, $aaaa$, etc, but not accept strings like $aabbb$, $abbab$.   Or, is it asking for an FA that accepts any string that contains an even number of $a$'s or an odd number of $b$'s, e.g. $aabbb$, $ababb$, etc.   The first case is relatively simple, but I've been struggling with the second. I haven't even managed to convince myself that it is a regular language (because I haven't been able to come up with a regular expression that matches it).   My questions: Which interpretation seems most likely. Is the second case a regular language, if so, give a regular expression that recognizes it. There are infinitely many prime numbers $p$ for which $p + 2$ and $p + 4$ are also prime numbers I need help with this question: There are infinitely many prime numbers $p$ for which $p + 2$ and $p + 4$ are also primes.  Where should I start? what proof techniques will be useful?  Any input will be very useful to me. Trigger a php file on every post or page if a condition is met I was wondering if we can trigger a PHP file on every WordPress post or page if a certain condition is met. Let me detail what I want.   Can we write a simple PHP script that will be automatically loaded on every WP post and page. Once loaded, the script should scan the HTML and if it finds a specific DIV tag with the ID myID it should trigger another PHP file (let's say script.php). Once the target PHP file has been triggered or executed, the target PHP file (script.php) should be able to automatically fetch the URL of the post or page that triggered the file and store it in a variable.   Any ideas?? Is there a 'rule of thumb' that I can use to estimate depth of field while shooting? I can use a DoF calculator, or crunch the heavy math by hand if I really want to know exactly what my DoF is going to be... but most of the time knowing exactly is actually overkill, and taking the time to pull out a DoF calculator is impractical. I'm wondering if anyone knows of a 'rule of thumb' that is common for quickly figuring out a rough estimate of what my DoF will be when I'm in the field... Proving that $\mathbb{Z}[\sqrt{2}]$ is a Euclidean domain We're proving that $\mathbb{Z}[\sqrt{2}]$ is a Euclidean domain, using the norm function $$\nu (a + b\sqrt{2} ) = |a^2 - 2b^2|$$ and the first part says that since $\nu (a + b\sqrt{2} ) = |(a + b\sqrt{2})(a - b\sqrt{2})|$ it's clear that $\nu (xy) = \nu(x) \nu(y)$? ... Can someone please explain to me how this is clear? How to Store Fresh Herbs What is the best way to store fresh herbs like parsley or cilantro?  I find I have about the same luck with them whether they are left in a plastic bag or I put them in a cup of water. I wanted to add classpath to my JDK. While searching a way to do it I noticed everyone open .profile file using terminal. But when I want to open and edit it with a text editor I couldn't see that file in Home folder.  Can someone tell me why is this. And also if possible how can I access .profile in home folder the GUI way. What if an abbreviation is at the end of a declarative sentence? Should I duplicate a full stop sign? What if an abbreviation is at the end of a declarative sentence? Should I duplicate a full stop sign? If the following sentence begins with a proper noun, not putting two periods may be confusing, in theory. Edit: It used to be 'contraction' instead of 'abbreviation'. How can I write % into a file? How can I write % into an auxiliary file? % will not work, because LaTeX thinks that I start a comment with it (in the main file, not in the auxiliary file!), and \% will write \% into the file. How can it be accomplished?   \documentclass{article} \begin{document} \newwrite\outfile \immediate\openout\outfile=example.dat \immediate\write\outfile{%}% will not work, of course, but neither \% \immediate\closeout\outfile \end{document} Tiny lifeforms on planetoid that live at accelerated time rate A book I once owned and read back in late-80's or early-90's that I have not been able to identify title &amp; author for:  It was a SF story concerning tiny native lifeforms, living on either a planetoid or possibly a dead/neutron star, that evolve at a seemingly accelerated time rate. Most of their story is told in the few days of observation (from orbit) by a human expedition to the planet, during which time-frame the race below progresses from stone-age tech level to being more advanced than the human observers, and eventually flying up to meet the humans in small advanced craft powered by micro-singularities... one of which accidentally 'disintegrates' the tip of a human scientist's nose in the process. Textbook approach to modeling non-proportional hazards in the Cox model In Cox models with time varying coefficients, the effect of covariates on the hazard is allowed to change through time. In cases where a coefficient has a linear relationship with time, I am aware of at least two text books ( and an Appendix to ) that advocate for the following model, first in R code:  coxph(Surv(time, death) ~ disease + disease:time)   And now in mathematical notation:  $$ h(t|X) = h_0(t) \exp(\beta_1X + \beta_2X_T) $$ Where $h(t|X)$ is the instantaneous hazard rate at time $t$ given covariates $X$; $h_0(t)$ is the baseline hazard rate; and $T$ is the censoring or event times. $\beta_1$ represents the log hazard ratio for individuals with $T=0$ (which is sort of nonsensical since you can't have $T=0$ in the data), while $\beta_2$ is harder to interpret... $\beta_2$ shows how the log hazard ratio depends on censoring/event times, but that is circular because event times are also the response variable (this point is made in Terry Therneau’s vignette “”).  According to Therneau's vignette, to correctly specify a time varying coefficient, you need to use the following model, first in R code:  coxph(Surv(time, death) ~ disease + tt(disease), tt=function(x,t,...){x*t})   And now in mathematical notation: $$ h(t|X) = h_0(t) \exp(\beta_1X + \beta_2X_T) $$  The difference is that the time interaction is with $t$ in the model rather than with the event times $T$ in the data. The resulting parameters are easy to interpret: they are the intercept and slope of the linear relationship between the log hazard ratio of $X$ and time. This approach seems like the proper way to model a time varying effect.  Can anyone justify or advocate for the first approach to modeling non-proportional hazards in the Cox model? If it is really incorrect (as I suspect it is), what are the practical consequences of using this approach? I am moving from Egypt to the Netherlands and I need to take my PC with me. I won't be taking the monitor, just the case, but I'm wondering what the best way would be.  Am considering taking it as carry-on because I'm allowed 8kg and at least then I can handle it myself. Has anyone done this before and can give me tips or warn me that this doesn't work? Would putting it in my normal suitcase as checked baggage be a better idea? Why were there so many spells cast in the movies without saying the words to the spell? From my memory of the last Harry Potter movie I saw, I've seen many wizards cast spells without saying the spell at all.  During the final battle in Hogwarts, many wizards just swung their wands and their enemies were knocked out. I am 100% sure about this!  The most remarkable spells were the ones that emit a green or red beam in the final battle of Harry Potter against Voldemort when they pushed their beams towards each other.  So, the question is, are they cheating? Because, unless there are wordless spells, they must say the words for a spell. I have    iPhone 5 (with iOS 8.3) MacBook Pro Early 2013 (with OS X Yosemite 10.10.3) iPad Air (with iOS 8.3)   My iPhone is paired with the MacBook, so e.g when my phone rings, I can see it in my computer. But when I want to AirDrop photos from my iPhone the MacBook, then I can't see the MacBook in my iPhone AirDrop targets.  I can see the iPad, I can see my wife's iPhone, but not the MacBook.  On MacBook, I can see the iPad, my wife's phone and even my iPhone and I can drop to there, but not the other way around.  Before I started troubleshooting, the iPhone and MacBook were mutually invisible (I only saw iPad from both). After a while of trying things and sending files back and forth, my MacBook started to see the iPhone, but I did not manage to make it work from the other way. Still, the iPhone seems to be much "less" visible than the iPad - which I see almost instantly and always, the iPhone only seems to appear after a while.  Just to make it clear:   both iPhone and MBP have BT turned on both have AirDrop visibility set to Everyone   I would be glad for any suggestions to fix this - what settings to check, logs, whatever. How to evenly space vertices? I have a edge loop that has vertices on it. Is there a way I can separate the vertices on the the edge evenly without moving the end points? I would also like for the vertices to maintain the current shape. I am trying to use the  package.  I have the following counters defined (hopefully this is the right way to do it!)  \newtheorem{thm}{Theorem}[section] \newtheorem{lemma}[thm]{Lemma} \newtheorem{cor}[thm]{Corollary}   This works as I would like (i.e. Theorem 1.1, Corollary 1.2, Lemma 1.3, etc.)  My problem is \cref always returns Theorem 1.2, Theorem 1.3. I   Perhaps this is not right? (In my preamble)  \crefname{thm}{theorem}{theorem's} \crefname{lemma}{lemma}{lemma's} What happens to net acceleration in a non-inertial reference frame with cenripetal force? In a non-inertial reference frame, the centripetal force is balanced by a centrifugal force. Therefore, shouldn't the net acceleration be zero? Yet, you still feel an acceleration outwards? Why is that? How is Anti Aliasing Implemented in Ray Tracing? After reading a few articles online I can confidently say I am clueless on how Anti-Aliasing works when using Ray Tracing.  All I understand is that A Single Pixel/Ray is split into 4 sub-pixels and 4 rays rather than 1.  Could somebody please explain how this is done (preferably with code)?