I'm working on this problem and am having some difficulties.  I know something important to keep in mind is that (as an example)  $1110001111$ is just one bit string despite it having two individual substrings with at least 3 consecutive ones.   I know there are $2^{10} = 1024$ total possible bit strings of length $n = 10$. We want to find the number of bit strings that contain at least $3$ consecutive ones.  I start by first counting the number of bit strings that contain $3$ consecutive ones.  There are ${10}\choose{3}$ possible ways to insert three ones in this bit string of length $10$, but that isn't what we want, we want to count the number of ways to have three consecutive ones in a bit string of length $10$. And this is where I'm getting stuck.   To solve this problem, I started with trying by exhaustively listing out the total possible strings, but quickly started to run into some problems and thought there was a more efficient way to do it. So then I was thinking about using the inclusion-exclusion principle, where my sets would be something like "$A_{1}$ is the set containing three consecutive ones; $A_{2}$ is the set containing four consecutive ones,..., $A_{10}$ is the set containing $10$ consecutive ones" but then I realized this would be a truly ginormous computation and that there must still be a better way to go about solving it.  So my question, is how to I count the number of bit strings of length $n = 10$ where I have at least $3 \leq k \leq 10$ consecutive ones?
I am trying to count the number of bit-strings of length 8 with 3 consecutive zeros or 4 consecutive ones. I was able to calculate it, but I am overcounting. The correct answer is $147$, I got $148$.  I calculated it as follows:  Number of strings with 3 consecutive zeros = $2^5+5\times2^4 = 112$, because the 3 zeros can start at bit number 1, 2, 3, .., 6  Number of strings with 4 consecutive ones = $2^4+4\times2^3 = 48$, I used the same reasoning.  Now I am trying to count the number of bit-strings that contain both 3 consecutive zeros and 4 consecutive 1s. I reasoned as follows:   the strings can be of the following forms: 0001111x, 000x1111, x0001111..thus there are $2+2+2 = 6$ possibilities for bit-strings where the 3 consecutive zeros come first. Symmetrically there are $6$ bit-strings where the 4 consecutive ones come first.  Thus the answer should be = $112+48-12 = 148$.  clearly there's something wrong with my reasoning, if someone could point it out, that would be awesome. Thanks
Git - how to force merge conflict and manual merge on selected file Let $f(n) = \sum_{(k,n)=1} e^\frac{2\pi ik}{n}$. Show that $f(n) = \sum_{k=1}^{n}\left(\sum_{d\mid (k,n)} \mu(d)e^{\frac{2\pi ik}{n}} \right) $ Why do most 2D platformers start off in the left and progress in the right direction? In almost all 2D platformers I've played, your avatar always starts off on the left side of the world, and continues on to the right. Is there something designers gain by doing this? How can I find unanswered questions with zero answers in some tag? BAD signature when trying to verify SHA256SUMS for Bionic Beaver ISO I am attempting to verify my download of Bionic Beaver on Windows 7.  I feel like I am missing something very obvious.  I went to  and clicked on both SHA256SUMS and SHA256SUMS.gpg  It seems like this does not download the files, but opens the text in the files in new tabs.  I used Ctrl-A and then copied the text into Notepad, naming the files SHA256SUMS and SHA256SUMS.gpg.  I made sure that windows didn't add any weird extensions when saving.  I manually downloaded both keys I used from https://keyserver.ubuntu.com, one with fingerprint  C598 6B4F 1257 FFA8 6632 CBA7 4618 1433 FBB7 5451   and the other with fingerprint  8439 38DF 228D 22F7 B374 2BC0 D94A A3F0 EFE2 1092   After I downloaded both keys I certified them with my personal key using Kleopatra, after verifying the key fingerprint with those at .  When I ran   gpg --verify SHA256SUMS.gpg SHA256SUMS   I got   gpg: Signature made 11/29/18 16:27:43 US Mountain Standard Time gpg:                using DSA key 46181433FBB75451 gpg: BAD signature from "Ubuntu CD Image Automatic Signing Key &lt;cdimage@ubuntu.c om&gt;" [full] gpg: Signature made 11/29/18 16:27:43 US Mountain Standard Time gpg:                using RSA key D94AA3F0EFE21092 gpg: BAD signature from "Ubuntu CD Image Automatic Signing Key (2012) &lt;cdimage@u buntu.com&gt;" [full]   When I ran   gpg --verbose --verify SHA256SUMS.gpg SHA256SUMS   I got  gpg: armor header: Version: GnuPG v1 gpg: Signature made 11/29/18 16:27:43 US Mountain Standard Time gpg:                using DSA key 46181433FBB75451 gpg: using pgp trust model gpg: BAD signature from "Ubuntu CD Image Automatic Signing Key &lt;cdimage@ubuntu.c om&gt;" [full] gpg: binary signature, digest algorithm SHA512, key algorithm dsa1024 gpg: Signature made 11/29/18 16:27:43 US Mountain Standard Time gpg:                using RSA key D94AA3F0EFE21092 gpg: BAD signature from "Ubuntu CD Image Automatic Signing Key (2012) &lt;cdimage@u buntu.com&gt;" [full] gpg: binary signature, digest algorithm SHA512, key algorithm rsa4096   I tried copying the data from SHA256SUMS and SHA256SUMS.gpg tabs over TOR instead, in case it was a local network problem, but no dice either.  What am I missing here? Is there some way to download the SHA256SUMS and SHA256SUMS.gpg files directly, as opposed to copying the data into a text editor and saving it?  Any help would be very appreciated. I am very confused and frustrated at this point. Does a constantly accelerating charged particle emit EM radiation or not? The  gives the recoil force, $\mathbf{F_{rad}}$, back on a charged particle $q$ when it emits electromagnetic radiation. It is given by:  $$\mathbf{F_{rad}} = \frac{q^2}{6\pi \epsilon_0 c^3}\mathbf{\dot{a}},$$  where $\mathbf{\dot{a}}$ is the rate of change of acceleration.  If a particle has a constant acceleration, $\mathbf{\dot{a}}=0$, then there is no reaction force acting on it. Therefore the particle does not lose energy.   Does this mean that a constantly accelerating charged particle does not emit electromagnetic radiation? Similar matrices and field extensions Given a field $F$ and a subfield $K$ of $F$. Let $A$, $B$ be $n\times n$ matrices such that all the entries of $A$ and $B$ are in $K$. Is it true that if $A$ is similar to $B$ in $F^{n\times n}$ then they are similar in $K^{n\times n}$?   Any help ... thanks! How do I connect multiple devices to an ISP that gives web-based portal for logging in? 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$$ "X Department" versus "Department of X" I would like to know whether these phrases "English Department" and "Department of English" have the same meaning. Thanks! How do I write a good title? A good title helps your question get the attention it deserves.  What goes into a good title? Lots of people would like to visit the EEA area to take holiday or to visit family or even to go for longer term visa arrangements in the Schengen zone.  In order to do this, they need a Schengen (or national) visa.  This appears to be a fairly straightforward process, but hints and tips can always be helpful.  Without focusing on any individual's circumstances, what are some helpful hints that can improve the likelihood of a successful application? Printing all instances of a class Play a short sound in iOS At least it's my understanding that AES isn't affected by known-plaintext. Is it immune to such an attack, or just resistant? Does this vary for chosen-plaintext? Adding many more neutrons to a nucleus decreases stability? If you take any large nucleus and add protons to it, the electrostatic repulsion between them will make the nucleus more unstable, because the electrostatic force between them is more repulsive at a greater distance than the strong force is attractive  So how come if you add more neutrons, which don't have a charge and so there is no electrostatic force, the nucleus still becomes more unstable?  Also why aren't there groups of neutrons bound together, so purely neutron nuclei (because they are neutral, I'm guessing they couldn't form atoms, because of the electrons needed for an atom) How do I specify unique constraint for multiple columns in MySQL? About number truncation of ticks display in ListPlot How to find string position within another string in C recursively? I would like to remove my Raspberry Pi from my iPhone 8 (running iOS 11.2.1) as a connected bluetooth device.  Normally, I would go into my Settings -> Bluetooth and select the Info button (a small blue circled "i") to show the "Disconnect" and "Forget Device" dialogs:    Unfortunately, iOS does not give me this option for my device. The bluetooth device list does not contain an "i" for the item, and there is seemingly no other way to disconnect.    How do I unpair this device if there is no button to trigger to the unpair prompt?  Due to work restrictions I cannot completely reset the device.