Consider you have 2 sets of numbers A and B of size n and m respectively. Find the number of ways of arranging these numbers such that in the final output the order of numbers present in A and B remains same. Eg A={1,2,3} B = {4,5} One of the ways of arranging them is 1 2 4 5 3 Another way is 4 1 2 3 5 Notice how all the numbers of set A have same order  within themselves and same is true for numbers in B.
Suppose that, for a real application, I have ended up with a sorted list A = {$a_1, a_2, ..., a_{|A|}$} of elements of a certain kind (say, Type-A), and another sorted list B = {$b_1, b_2, ..., b_{|B|}$} of elements of a different kind (Type-B), such that Type-A elements are only comparable with Type-A elements, and likewise for Type-B.  At this point I seek to count the following: in how many ways can I merge both lists together, in such a way that the relative ordering of Type-A and Type-B elements, respectively, is preserved? (i.e. that if $P_M(x)$ represents the position of an element of A or B in the merged list, then $P_M(a_i)&lt;P_M(a_j)$ and $P_M(b_i)&lt;P_M(b_j)$ for all $i&lt;j$)  I've tried to figure this out constructively by starting with an empty merged list and inserting elements of A or B one at a time, counting in how many ways each insertion can be done, but since this depends on the placement of previous elements of the same type, I've had little luck so far. I also tried explicitly counting all possibilities for different (small) lengths of A and B, but I've been unable to extract any potential general principle in this way.
iOS 9.2 double touch fingerprint sensor Prove that $ S=\{0\}\cup\left(\bigcup_{n=0}^{\infty} \{\frac{1}{n}\}\right)$ is a compact set in $\mathbb{R}$, but $\bigcup_{n=0}^{\infty} \{\frac{1}{n}\}$ is not a compact set.   (Can we use definition of compact set for this problem? ) Is it bad to defrag a ssd? Or just pointless? I've read on some websites that it's bad to defrag an ssd. But I'm reading on this website now and one person was like "You didnt do any harm its just not necessary to defrag it." I feel like that's wrong since every other website I've read says it will damage the ssd. Let $p$ be a prime number, and let $\mathbb{F}_p$ be the field with $p$ elements. How many elements of $\mathbb{F}_p$ have cube roots in $\mathbb{F}_p$?   I had this question on an exam and after reviewing I am still not sure. Any help would be appreciated. Previous question:    That was when my buttons died.  On other days, my text dies.    And some times it's just italics.    Now, I like blaming @skiwi for this, and he's often nearby when it happens.  But today, he's not here, and it happened again.    I'm running Windows 8 and using Chrome 40.0.2214.94 m.  Refreshing and such does not fix the issue.  Inspect element -> console -> error log:  http://chat.stackexchange.com/chats/8595/messages/new Failed to load resource: the server responded with a status of 409 (Conflict) http://i.stack.imgur.com/2ZJdJ.png?s=128&amp;g=1&amp;g&amp;s=16 Failed to load resource: the server responded with a status of 502 (Bad Gateway) http://i.stack.imgur.com/boUZp.jpg?g&amp;s=16 Failed to load resource: the server responded with a status of 502 (Bad Gateway) http://i.stack.imgur.com/U8P3C.jpg?s=128&amp;g=1&amp;g&amp;s=32 Failed to load resource: the server responded with a status of 502 (Bad Gateway) http://i.stack.imgur.com/boUZp.jpg?g&amp;s=16 Failed to load resource: the server responded with a status of 504 (Gateway Time-out) http://chat.stackexchange.com/messages/19891816 Failed to load resource: the server responded with a status of 409 (Conflict)   What's going on here?  I should note, I can view italics by selecting, then alt-tabbing:    So it reeks of a client-side issue. What's hiding the text from me?  EDIT:  30 april 2015 it happened again =/ Given a Möbius transformation that maps one pair of concentric circles to another pair of concentric circles, why is the ratio of the radii preserved through the map?   I thought about how Möbius transformations are compositions of rotations, scaling, inversion, and translation, and that intuitively, these types of maps shouldn't change the ratio of radii between two circles.   Would it be correct to just say that if $\frac{r_1}{r_2}$ is the ratio of radii between the two circles, then   1) The radii are invariant under translation, $z \mapsto z+a$, so $\frac{r_1}{r_2}$ stays the same  2) Under scaling by a factor $z \mapsto az$, $\frac{ar_1}{ar_2} = \frac{r_1}{r_2}$   3) Under inversion, $z \mapsto \frac{1}{z}$, $\frac{1/r_1}{1/r_2} = \frac{r_2}{r_1}$  Or is there a different/better way to think about this problem? I know this has probably been asked before, but I couldn't find it with Google.   Given   Linux Kernel No configurations that change $HOME bash   Will ~ == $HOME be true? Combo box in Java - nullpointer How do I type Arabic text in Photoshop? I want to type Arabic text in Photoshop, but the text appears disjointed and the letters do not connect at all. For example محمد appears as م ح م د.   I'm using Photoshop CS6 on OSX Mountain Lion. Notepad++ incrementally replace Ignore citations in captions in list of figures when numbering Execute script after specific delay using JavaScript How can i find the python triggered by the GUI? I want to fully automatize some of my blender processes, an i run into a lot of problems not finding the correct commands, not using the correct args...  Can i just "see" in a log somewhere what were the commands blender ran ?  To be very precise, i want to load a gltf file, and export it to stl.  No problem through the gui, but i'm stuck with that bit of code :   import bpy import sys import os  file = open(r"C:\Users\theo1\Documents\GitHub\Hackathon2020\map&amp;mapdata\mini.gltf")  bpy.ops.import_scene.gltf(file) bpy.ops.export_mesh.stl(filePath=r"C:\Users\theo1\Documents\GitHub\Hackathon2020\map&amp;mapdata\mini.stl")   Which gives me this :   Traceback (most recent call last):   File "&lt;string&gt;", line 1, in &lt;module&gt;   File "C:\Users\theo1\Desktop\impExp.py", line 7, in &lt;module&gt;     bpy.ops.import_scene.gltf(file)   File "C:\Program Files\Blender Foundation\Blender 2.81\2.81\scripts\modules\bpy\ops.py", line 198, in __call__     C_dict, C_exec, C_undo = BPyOpsSubModOp._parse_args(args)   File "C:\Program Files\Blender Foundation\Blender 2.81\2.81\scripts\modules\bpy\ops.py", line 151, in _parse_args     raise ValueError("1-3 args execution context is supported") ValueError: 1-3 args execution context is supported   thanks. If $A/I \cong A/J$ as rings and $I\subseteq J,$ then $I=J.$ Let $A$ be a commutative Noetherian ring and let $I$ and $J$ be ideals of $A.$  Suppose that $I\subseteq J$ and that $A/I \cong A/J$ as rings.  I want to prove that $I=J.$    Observations so far:  1) If we drop the hypothesis $I\subseteq J,$ then the result is false:  $$\mathbb{Q}[X,Y]/(X)\cong \mathbb{Q}[X,Y]/(Y) \text{ but } (X)\neq (Y).$$  2) If $A/I\cong A/J$ as $A$-modules, then $I=J$:  $$I=\mathrm{Ann}_A(A/I)=\mathrm{Ann}_A(A/J)=J.$$  I'm now a bit stuck as to how to proceed. Any hints would be most helpful!  Many thanks :) Adding multiple CKEditor instances in jquery I really like the new sidebar. With the new top bar eliminating the &quot;Hot Questions&quot; area there, I think this is the perfect place for it. One-click access to time-wasting questions about topics I may or may not have an interest in. Seriously, it's a procrastinator's dream come true. The only suggestion I can add is to extend it. I assume the &quot;hot&quot; algorithm can spit out more than 12 questions, and since we now have a huge amount of room for it(without being restricted to a weird drop-down scrollbox), why not show more? If there's something else planned for that spot, disregard. At a minimum, the title could link to the , as ShaWizDowArd suggested in comments. I've been using SE for a couple years now, and I've never seen that page, so it would add visibility there.    Update: They added a link! Just noticed this, I'm pretty sure it wasn't there yesterday. When you click it, it loads 12 more. At the moment, the link disappears once clicked, so you can see a total of 24 here now. Not a link to the full list, but better: I have the following browsers on my phone:   stock Dolphin Mini Opera Mobile Firefox   I don't want to set a catch-all default because some pages render better on some browsers than on others.  When I click on a link on a non-browser app (e.g. google search or google reader) it asks me which browser to choose (as expected).  Can I set a default browser for some pages and a different default for others? Prove $\int\cos^n x \ dx = \frac{1}n \cos^{n-1}x \sin x + \frac{n-1}{n}\int\cos^{n-2} x \ dx$ I am trying to prove  $$\int\cos^n x \ dx = \frac{1}n \cos^{n-1}x \sin x + \frac{n-1}{n}\int\cos^{n-2} x \ dx$$  This problem is a classic, but I seem to be missing one step or the understanding of two steps which I will outline below.   $$I_n := \int\cos^n x \ dx = \int\cos^{n-1} x \cos x \ dx \tag{1}$$  First question: why rewrite the original instead of immediately integrating by parts of $\int \cos^n x \ dx$?  Integrate by parts with $$u = \cos^{n-1} x, dv = \cos x \ dx \implies du = (n-1)\cos^{n-2} x \cdot -\sin x, v = \sin x$$  which leads to  $$I_n = \sin x \ \cos^{n-1} x +\int\sin^2 x (n-1) \ \cos^{n-2} x \ dx \tag{2}$$  Since $(n-1)$ is a constant, we can throw it out front of the integral:  $$I_n = \sin x \ \cos^{n-1} x +(n-1)\int\sin^2 x \ \cos^{n-2} x \ dx\tag{3}$$  I can transform the integral a bit because $\sin^2 x + cos^2 x = 1 \implies \sin^2 x = 1-\cos^2 x$  $$I_n = \sin x \ \cos^{n-1} x + (n-1)\int(1-\cos^2 x) \ \cos^{n-2} x \ dx \tag{4}$$  According to Wikipedia as noted , this simplifies to:  $$I_n = \sin x \ \cos^{n-1} x + (n-1) \int \cos^{n-2} x \ dx - (n-1)\int(\cos^n x) \ dx \tag{5}$$  Question 2: How did they simplify the integral of $\int(1-\cos^2 x) \ dx$ to $\int(\cos^n x) \ dx$?  Assuming knowledge of equation 5, I see how to rewrite it as  $$I_n = \sin x \ \cos^{n-1} x + (n-1) I_{n-2} x  - (n-1) I_{n} \tag{6}$$  and solve for $I_n$. I had tried exploiting the fact that  $$\cos^2 x = \frac{1}{2} \cos(2x) + \frac{1}{2} $$  and trying to deal with $\int 1 \ dx - \int \frac{1}{2} \cos (2x) + \frac{1}{2} \ dx$  which left me with $\frac{x}{2} - \frac{1}{4} \sin(2x)$ after integrating those pieces. Putting it all together I have:  $$I_n = \sin x \ \cos^{n-1} x + (n-1) I_{n-2} x \left(-(n-1) (\frac{x}{2} - \frac{1}{4} \sin 2x) \right) \tag{7}$$  but I'm unsure how to write the last few terms as an expression of $I_{something}$ to get it to match the usual reduction formula of   $$\int\cos^n x \ dx = \frac{1}n \cos^{n-1}x \sin x + \frac{n-1}{n}\int\cos^{n-2} x \ dx$$ Upgrade from MaaS 2.6.2 to MaaS 2.7 Flag indicator present on Meta, but no flags visible